Bug 1207734 - Part 6.a. Update LayerAnimationInfo list according to the new added transform properties. draft
authorcku <cku@mozilla.com>
Wed, 06 Dec 2017 23:42:26 +0800
changeset 711208 69c6faf9548bb227775203b7b482f5072d29fd94
parent 711207 36e245a0707c113be4a133a9a67ad3b55f05b573
child 711209 e6ff516adc74024155b03d5b3d22695a417bced0
push id93016
push userbmo:cku@mozilla.com
push dateWed, 13 Dec 2017 13:30:55 +0000
bugs1207734
milestone59.0a1
Bug 1207734 - Part 6.a. Update LayerAnimationInfo list according to the new added transform properties. MozReview-Commit-ID: GVcjfGQIJ6O
layout/style/LayerAnimationInfo.cpp
layout/style/LayerAnimationInfo.h
--- a/layout/style/LayerAnimationInfo.cpp
+++ b/layout/style/LayerAnimationInfo.cpp
@@ -9,16 +9,25 @@
 #include "nsCSSProps.h" // For nsCSSProps::PropHasFlags
 
 namespace mozilla {
 
 /* static */ const LayerAnimationInfo::Record LayerAnimationInfo::sRecords[] =
   { { eCSSProperty_transform,
       DisplayItemType::TYPE_TRANSFORM,
       nsChangeHint_UpdateTransformLayer },
+    { eCSSProperty_rotate,
+      DisplayItemType::TYPE_TRANSFORM,
+      nsChangeHint_UpdateTransformLayer },
+    { eCSSProperty_translate,
+      DisplayItemType::TYPE_TRANSFORM,
+      nsChangeHint_UpdateTransformLayer },
+    { eCSSProperty_scale,
+      DisplayItemType::TYPE_TRANSFORM,
+      nsChangeHint_UpdateTransformLayer },
     { eCSSProperty_opacity,
       DisplayItemType::TYPE_OPACITY,
       nsChangeHint_UpdateOpacityLayer } };
 
 #ifdef DEBUG
 /* static */ void
 LayerAnimationInfo::Initialize()
 {
--- a/layout/style/LayerAnimationInfo.h
+++ b/layout/style/LayerAnimationInfo.h
@@ -20,15 +20,15 @@ struct LayerAnimationInfo {
   // For CSS properties that may be animated on a separate layer, represents
   // a record of the corresponding layer type and change hint.
   struct Record {
     nsCSSPropertyID mProperty;
     DisplayItemType mLayerType;
     nsChangeHint mChangeHint;
   };
 
-  static const size_t kRecords = 2;
+  static const size_t kRecords = 5;
   static const Record sRecords[kRecords];
 };
 
 } // namespace mozilla
 
 #endif /* !defined(mozilla_LayerAnimationInfo_h) */