Bug 1086937 patch 2 - Use eRestyle_ChangeAnimationPhaseDescendants to get the right style data in RestyleManager::RebuildAllStyleData. r=birtles
authorL. David Baron <dbaron@dbaron.org>
Wed, 12 Nov 2014 23:28:52 -0800
changeset 215428 2a8b31cd89389fc4f03299f583910573c12c2fe2
parent 215427 e3c54b11c885ac32b07d580a31644d030cf20038
child 215429 dfe2aa84c776707f5e08bb03d0eff060af43a383
push id51758
push userdbaron@mozilla.com
push dateThu, 13 Nov 2014 07:29:16 +0000
treeherdermozilla-inbound@dfe2aa84c776 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1086937, 960465
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 1086937 patch 2 - Use eRestyle_ChangeAnimationPhaseDescendants to get the right style data in RestyleManager::RebuildAllStyleData. r=birtles Until we get rid of animation phases in bug 960465, we need to ensure we're producing style data for the correct animation phase. This makes this optimization slightly less beneficial until then.
layout/base/RestyleManager.cpp
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -1448,19 +1448,22 @@ RestyleManager::RebuildAllStyleData(nsCh
   MOZ_ASSERT(!mIsProcessingRestyles, "Nesting calls to processing restyles");
 #ifdef DEBUG
   mIsProcessingRestyles = true;
 #endif
 
   // Until we get rid of these phases in bug 960465, we need to skip
   // animation restyles during the non-animation phase, and post
   // animation restyles so that we restyle those elements again in the
-  // animation phase.
+  // animation phase.  Furthermore, we need to add
+  // eRestyle_ChangeAnimationPhaseDescendants so that we actually honor
+  // these booleans in all cases.
   mSkipAnimationRules = true;
   mPostAnimationRestyles = true;
+  aRestyleHint |= eRestyle_ChangeAnimationPhaseDescendants;
 
   DoRebuildAllStyleData(mPendingRestyles, aExtraHint, aRestyleHint);
 
   mPostAnimationRestyles = false;
   mSkipAnimationRules = false;
 #ifdef DEBUG
   mIsProcessingRestyles = false;
 #endif