Bug 1211101 part 2: Add supported (preffed off) webkit-prefixed CSS property aliases to property_database.js, for use in mochitests. r=heycam
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 06 Oct 2015 20:56:47 -0700
changeset 266435 a23e9cbf415d7dfe54ad6ad687a90492ac039796
parent 266434 798a47128b77bf682f5d67b13379f08c1a7d3dc1
child 266436 c51389e092304761ccfa882400c214e86fbc3123
push id66188
push userdholbert@mozilla.com
push dateWed, 07 Oct 2015 03:58:12 +0000
treeherdermozilla-inbound@a23e9cbf415d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1211101
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1211101 part 2: Add supported (preffed off) webkit-prefixed CSS property aliases to property_database.js, for use in mochitests. r=heycam
layout/style/test/property_database.js
testing/profiles/prefs_general.js
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -6333,16 +6333,236 @@ if (IsCSSPropertyPrefEnabled("layout.css
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "none" ],
     other_values: ["mandatory", "proximity"],
     invalid_values: [ "auto",  "1px" ]
   };
 }
 
+if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) {
+  gCSSProperties["-webkit-animation"] = {
+    domProp: "webkitAnimation",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    alias_for: "animation",
+    subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count", "animation-play-state" ],
+  };
+  gCSSProperties["-webkit-animation-delay"] = {
+    domProp: "webkitAnimationDelay",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "animation-delay",
+    subproperties: [ "animation-delay" ],
+  };
+  gCSSProperties["-webkit-animation-direction"] = {
+    domProp: "webkitAnimationDirection",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "animation-direction",
+    subproperties: [ "animation-direction" ],
+  };
+  gCSSProperties["-webkit-animation-duration"] = {
+    domProp: "webkitAnimationDuration",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "animation-duration",
+    subproperties: [ "animation-duration" ],
+  };
+  gCSSProperties["-webkit-animation-fill-mode"] = {
+    domProp: "webkitAnimationFillMode",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "animation-fill-mode",
+    subproperties: [ "animation-fill-mode" ],
+  };
+  gCSSProperties["-webkit-animation-iteration-count"] = {
+    domProp: "webkitAnimationIterationCount",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "animation-iteration-count",
+    subproperties: [ "animation-iteration-count" ],
+  };
+  gCSSProperties["-webkit-animation-name"] = {
+    domProp: "webkitAnimationName",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "animation-name",
+    subproperties: [ "animation-name" ],
+  };
+  gCSSProperties["-webkit-animation-play-state"] = {
+    domProp: "webkitAnimationPlayState",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "animation-play-state",
+    subproperties: [ "animation-play-state" ],
+  };
+  gCSSProperties["-webkit-animation-timing-function"] = {
+    domProp: "webkitAnimationTimingFunction",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "animation-timing-function",
+    subproperties: [ "animation-timing-function" ],
+  };
+  gCSSProperties["-webkit-text-size-adjust"] = {
+    domProp: "webkitTextSizeAdjust",
+    inherited: true,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "-moz-text-size-adjust",
+    subproperties: [ "-moz-text-size-adjust" ],
+  };
+  gCSSProperties["-webkit-transform"] = {
+    domProp: "webkitTransform",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "transform",
+    subproperties: [ "transform" ],
+  };
+  gCSSProperties["-webkit-transform-origin"] = {
+    domProp: "webkitTransformOrigin",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "transform-origin",
+    subproperties: [ "transform-origin" ],
+  };
+  gCSSProperties["-webkit-transform-style"] = {
+    domProp: "webkitTransformStyle",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "transform-style",
+    subproperties: [ "transform-style" ],
+  };
+  gCSSProperties["-webkit-transition"] = {
+    domProp: "webkitTransition",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    alias_for: "transition",
+    subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ],
+  };
+  gCSSProperties["-webkit-transition-delay"] = {
+    domProp: "webkitTransitionDelay",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "transition-delay",
+    subproperties: [ "transition-delay" ],
+  };
+  gCSSProperties["-webkit-transition-duration"] = {
+    domProp: "webkitTransitionDuration",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "transition-duration",
+    subproperties: [ "transition-duration" ],
+  };
+  gCSSProperties["-webkit-transition-property"] = {
+    domProp: "webkitTransitionProperty",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "transition-property",
+    subproperties: [ "transition-property" ],
+  };
+  gCSSProperties["-webkit-transition-timing-function"] = {
+    domProp: "webkitTransitionTimingFunction",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "transition-timing-function",
+    subproperties: [ "transition-timing-function" ],
+  };
+  gCSSProperties["-webkit-border-radius"] = {
+    domProp: "webkitBorderRadius",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    alias_for: "border-radius",
+    subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ],
+  };
+  gCSSProperties["-webkit-border-top-left-radius"] = {
+    domProp: "webkitBorderTopLeftRadius",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "border-top-left-radius",
+    subproperties: [ "border-top-left-radius" ],
+  };
+  gCSSProperties["-webkit-border-top-right-radius"] = {
+    domProp: "webkitBorderTopRightRadius",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "border-top-right-radius",
+    subproperties: [ "border-top-right-radius" ],
+  };
+  gCSSProperties["-webkit-border-bottom-left-radius"] = {
+    domProp: "webkitBorderBottomLeftRadius",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "border-bottom-left-radius",
+    subproperties: [ "border-bottom-left-radius" ],
+  };
+  gCSSProperties["-webkit-border-bottom-right-radius"] = {
+    domProp: "webkitBorderBottomRightRadius",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "border-bottom-right-radius",
+    subproperties: [ "border-bottom-right-radius" ],
+  };
+  gCSSProperties["-webkit-appearance"] = {
+    domProp: "webkitAppearance",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "-moz-appearance",
+    subproperties: [ "-moz-appearance" ],
+  };
+  gCSSProperties["-webkit-background-clip"] = {
+    domProp: "webkitBackgroundClip",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "background-clip",
+    subproperties: [ "background-clip" ],
+  };
+  gCSSProperties["-webkit-background-origin"] = {
+    domProp: "webkitBackgroundOrigin",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "background-origin",
+    subproperties: [ "background-origin" ],
+  };
+  gCSSProperties["-webkit-background-size"] = {
+    domProp: "webkitBackgroundSize",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "background-size",
+    subproperties: [ "background-size" ],
+  };
+  gCSSProperties["-webkit-border-image"] = {
+    domProp: "webkitBorderImage",
+    inherited: false,
+    type: CSS_TYPE_TRUE_SHORTHAND,
+    alias_for: "border-image",
+    subproperties: [ "border-image-source", "border-image-slice", "border-image-width",  "border-image-outset", "border-image-repeat" ],
+  };
+  gCSSProperties["-webkit-box-shadow"] = {
+    domProp: "webkitBoxShadow",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "box-shadow",
+    subproperties: [ "box-shadow" ],
+  };
+  gCSSProperties["-webkit-box-sizing"] = {
+    domProp: "webkitBoxSizing",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "box-sizing",
+    subproperties: [ "box-sizing" ],
+  };
+  gCSSProperties["-webkit-user-select"] = {
+    domProp: "webkitUserSelect",
+    inherited: false,
+    type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+    alias_for: "-moz-user-select",
+    subproperties: [ "-moz-user-select" ],
+  };
+}
+
 if (IsCSSPropertyPrefEnabled("layout.css.unset-value.enabled")) {
   gCSSProperties["animation"].invalid_values.push("2s unset");
   gCSSProperties["animation-direction"].invalid_values.push("normal, unset", "unset, normal");
   gCSSProperties["animation-name"].invalid_values.push("bounce, unset", "unset, bounce");
   gCSSProperties["-moz-border-bottom-colors"].invalid_values.push("red unset", "unset red");
   gCSSProperties["-moz-border-left-colors"].invalid_values.push("red unset", "unset red");
   gCSSProperties["border-radius"].invalid_values.push("unset 2px", "unset / 2px", "2px unset", "2px / unset");
   gCSSProperties["border-bottom-left-radius"].invalid_values.push("unset 2px", "2px unset");
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -156,16 +156,19 @@ user_pref("layout.css.contain.enabled", 
 user_pref("layout.css.object-fit-and-position.enabled", true);
 
 // Enable CSS Ruby for testing
 user_pref("layout.css.ruby.enabled", true);
 
 // Enable unicode-range for testing
 user_pref("layout.css.unicode-range.enabled", true);
 
+// Enable webkit prefixed CSS features for testing
+user_pref("layout.css.prefixes.webkit", true);
+
 // Disable spammy layout warnings because they pollute test logs
 user_pref("layout.spammy_warnings.enabled", false);
 
 // Enable Media Source Extensions for testing
 user_pref("media.mediasource.mp4.enabled", true);
 user_pref("media.mediasource.webm.enabled", true);
 
 // Enable fragmented MP4 parser for testing