Bug 974125 - Use RepaintFrame change hint for will-change. r=dbaron
authorChris Lord <chrislord.net@gmail.com>
Thu, 30 Oct 2014 15:12:11 +0000
changeset 213918 2b4400abcbecc93798b316b61258a6045931e574
parent 213917 f24cc6f4a15e544d8b7ab8e5bbaff8dcf9db5a05
child 213919 6066f395207ab227495e47504ef67d5ec97a39d2
push id27768
push userkwierso@gmail.com
push dateWed, 05 Nov 2014 02:19:03 +0000
treeherdermozilla-central@a1823d3c7365 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs974125
milestone36.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 974125 - Use RepaintFrame change hint for will-change. r=dbaron
layout/style/nsStyleStruct.cpp
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -2810,25 +2810,27 @@ nsChangeHint nsStyleDisplay::CalcDiffere
       if (HasTransformStyle()) {
         NS_UpdateHint(hint, transformHint);
       } else {
         NS_UpdateHint(hint, nsChangeHint_NeutralChange);
       }
     }
   }
 
+  // Note that the HasTransformStyle() != aOther.HasTransformStyle() 
+  // test above handles relevant changes in the
+  // NS_STYLE_WILL_CHANGE_TRANSFORM bit, which in turn handles frame 
+  // reconstruction for changes in the containing block of 
+  // fixed-positioned elements.  Other than that, all changes to 
+  // 'will-change' can be handled by a repaint.
   uint8_t willChangeBitsChanged =
     mWillChangeBitField ^ aOther.mWillChangeBitField;
-  if (willChangeBitsChanged & NS_STYLE_WILL_CHANGE_STACKING_CONTEXT) {
+  if (willChangeBitsChanged) {
     NS_UpdateHint(hint, nsChangeHint_RepaintFrame);
   }
-  if (willChangeBitsChanged & ~uint8_t(NS_STYLE_WILL_CHANGE_STACKING_CONTEXT)) {
-    // FIXME (Bug 974125): Don't reconstruct the frame
-    NS_UpdateHint(hint, nsChangeHint_ReconstructFrame);
-  }
 
   // Note:  Our current behavior for handling changes to the
   // transition-duration, transition-delay, and transition-timing-function
   // properties is to do nothing.  In other words, the transition
   // property that matters is what it is when the transition begins, and
   // we don't stop a transition later because the transition property
   // changed.
   // We do handle changes to transition-property, but we don't need to