Bug 1207734 - Part 3. Add rotate/translate/scale properties into nsCSSPropList. r=emilio,heycam
☠☠ backed out by 6002f08576ab ☠ ☠
authorcku <cku@mozilla.com>
Wed, 06 Dec 2017 17:58:05 +0800
changeset 453937 2bc1fdf79e03573395a94cbd8f66d7d0a81439d5
parent 453936 7d5913531948892d4e77a046bfd7c8254806f97a
child 453938 8991d046864265d64f7c7804b601741248215ffc
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio, heycam
bugs1207734
milestone59.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 1207734 - Part 3. Add rotate/translate/scale properties into nsCSSPropList. r=emilio,heycam MozReview-Commit-ID: 3nb365nnqGF
layout/style/nsCSSParser.cpp
layout/style/nsCSSPropList.h
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -11826,16 +11826,21 @@ CSSParserImpl::ParsePropertyByFunction(n
     return ParseImageLayerPositionCoord(aPropID,
                aPropID == eCSSProperty_mask_position_x);
   case eCSSProperty_mask_size:
     return ParseImageLayerSize(eCSSProperty_mask_size);
   case eCSSProperty__webkit_text_stroke:
     return ParseWebkitTextStroke();
   case eCSSProperty_all:
     return ParseAll();
+  case eCSSProperty_translate:
+  case eCSSProperty_rotate:
+  case eCSSProperty_scale:
+    // These properties aren't implemented in the old style system.
+    return false;
   default:
     MOZ_ASSERT(false, "should not be called");
     return false;
   }
 }
 
 // Bits used in determining which background position info we have
 #define BG_CENTER  NS_STYLE_IMAGELAYER_POSITION_CENTER
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -3606,16 +3606,29 @@ CSS_PROP_POSITION(
         CSS_PROPERTY_STORES_CALC |
         CSS_PROPERTY_UNITLESS_LENGTH_QUIRK |
         CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH,
     "",
     VARIANT_AHLP | VARIANT_CALC,
     nullptr,
     offsetof(nsStylePosition, mOffset),
     eStyleAnimType_Sides_Right)
+CSS_PROP_DISPLAY(
+    rotate,
+    rotate,
+    Rotate,
+    CSS_PROPERTY_PARSE_FUNCTION |
+        CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
+        CSS_PROPERTY_CREATES_STACKING_CONTEXT |
+        CSS_PROPERTY_FIXPOS_CB,
+    "layout.css.individual-transform.enabled",
+    0,
+    nullptr,
+    offsetof(nsStyleDisplay, mSpecifiedRotate),
+    eStyleAnimType_None)
 CSS_PROP_TEXT(
     ruby-align,
     ruby_align,
     RubyAlign,
     CSS_PROPERTY_PARSE_VALUE,
     "",
     VARIANT_HK,
     kRubyAlignKTable,
@@ -4235,16 +4248,29 @@ CSS_PROP_TEXT(
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
         CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
     "layout.css.prefixes.webkit",
     VARIANT_HKL | VARIANT_CALC,
     kBorderWidthKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_Discrete)
+CSS_PROP_DISPLAY(
+    scale,
+    scale,
+    Scale,
+    CSS_PROPERTY_PARSE_FUNCTION |
+        CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
+        CSS_PROPERTY_CREATES_STACKING_CONTEXT |
+        CSS_PROPERTY_FIXPOS_CB,
+    "layout.css.individual-transform.enabled",
+    0,
+    nullptr,
+    offsetof(nsStyleDisplay, mSpecifiedScale),
+    eStyleAnimType_None)
 CSS_PROP_TEXT(
     text-transform,
     text_transform,
     TextTransform,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
         CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
     "",
@@ -4407,16 +4433,29 @@ CSS_PROP_DISPLAY(
     TransitionTimingFunction,
     CSS_PROPERTY_PARSE_VALUE_LIST |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
     "",
     VARIANT_KEYWORD | VARIANT_TIMING_FUNCTION, // used by list parsing
     kTransitionTimingFunctionKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
+CSS_PROP_DISPLAY(
+    translate,
+    translate,
+    Translate,
+    CSS_PROPERTY_PARSE_FUNCTION |
+        CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH |
+        CSS_PROPERTY_CREATES_STACKING_CONTEXT |
+        CSS_PROPERTY_FIXPOS_CB,
+    "layout.css.individual-transform.enabled",
+    0,
+    nullptr,
+    offsetof(nsStyleDisplay, mSpecifiedTranslate),
+    eStyleAnimType_None)
 #ifndef CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND
 CSS_PROP_TEXTRESET(
     unicode-bidi,
     unicode_bidi,
     UnicodeBidi,
     CSS_PROPERTY_PARSE_VALUE,
     "",
     VARIANT_HK,