Bug 1207734 - Part 8.a. (gecko) Update alias names for rotate/translate/scale. draft
authorcku <cku@mozilla.com>
Tue, 12 Dec 2017 12:25:43 +0800
changeset 711212 c6344e75135ebf9eb878247c8b0902bedb78a58d
parent 711211 28d9feb3310fa09dd14fa92fb958f310a875cbea
child 711213 91c37bf065c0c3bbabc9dd264ec51a43a20de48a
push id93016
push userbmo:cku@mozilla.com
push dateWed, 13 Dec 2017 13:30:55 +0000
bugs1207734
milestone59.0a1
Bug 1207734 - Part 8.a. (gecko) Update alias names for rotate/translate/scale. Add webkit alias for individual transform since we already have webkit alias for 'transform' property. MozReview-Commit-ID: DUd52DYAppz
layout/style/nsCSSPropAliasList.h
layout/style/test/property_database.js
--- a/layout/style/nsCSSPropAliasList.h
+++ b/layout/style/nsCSSPropAliasList.h
@@ -319,37 +319,51 @@ CSS_PROP_ALIAS(-webkit-animation-timing-
                WebkitAnimationTimingFunction,
                WEBKIT_PREFIX_PREF)
 
 CSS_PROP_ALIAS(-webkit-filter,
                _webkit_filter,
                filter,
                WebkitFilter,
                WEBKIT_PREFIX_PREF)
+CSS_PROP_ALIAS(-webkit-rotate,
+               _webkit_rotate,
+               rotate,
+               WebkitRotate,
+               "layout.css.individual-transform.enabled")
 CSS_PROP_ALIAS(-webkit-text-size-adjust,
                _webkit_text_size_adjust,
                _moz_text_size_adjust,
                WebkitTextSizeAdjust,
                WEBKIT_PREFIX_PREF)
-
+CSS_PROP_ALIAS(-webkit-scale,
+               _webkit_scale,
+               scale,
+               WebkitScale,
+               "layout.css.individual-transform.enabled")
 CSS_PROP_ALIAS(-webkit-transform,
                _webkit_transform,
                transform,
                WebkitTransform,
                WEBKIT_PREFIX_PREF)
 CSS_PROP_ALIAS(-webkit-transform-origin,
                _webkit_transform_origin,
                transform_origin,
                WebkitTransformOrigin,
                WEBKIT_PREFIX_PREF)
 CSS_PROP_ALIAS(-webkit-transform-style,
                _webkit_transform_style,
                transform_style,
                WebkitTransformStyle,
                WEBKIT_PREFIX_PREF)
+CSS_PROP_ALIAS(-webkit-translate,
+               _webkit_translate,
+               translate,
+               WebkitTranslate,
+               "layout.css.individual-transform.enabled")
 CSS_PROP_ALIAS(-webkit-backface-visibility,
                _webkit_backface_visibility,
                backface_visibility,
                WebkitBackfaceVisibility,
                WEBKIT_PREFIX_PREF)
 CSS_PROP_ALIAS(-webkit-perspective,
                _webkit_perspective,
                perspective,
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -6315,16 +6315,40 @@ if (IsCSSPropertyPrefEnabled("layout.css
   gCSSProperties["scale"] = {
     domProp: "scale",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "none" ],
     other_values: [ "10", "10 20", "10 20 30", "0 2.0"],
     invalid_values: ["150%", "10px", "10deg" ],
   };
+
+  if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) {
+    gCSSProperties["-webkit-rotate"] = {
+      domProp: "webkitRotate",
+      inherited: false,
+      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+      alias_for: "rotate",
+      subproperties: [ "rotate" ],
+    };
+    gCSSProperties["-webkit-translate"] = {
+      domProp: "webkitTranslate",
+      inherited: false,
+      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+      alias_for: "translate",
+      subproperties: [ "translate" ],
+    };
+    gCSSProperties["-webkit-scale"] = {
+      domProp: "webkitScale",
+      inherited: false,
+      type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+      alias_for: "scale",
+      subproperties: [ "scale" ],
+    };
+  }
 }
 
 if (IsCSSPropertyPrefEnabled("layout.css.touch_action.enabled")) {
     gCSSProperties["touch-action"] = {
         domProp: "touchAction",
         inherited: false,
         type: CSS_TYPE_LONGHAND,
         initial_values: ["auto"],