Bug 1150810 part 12 - Flush styles in AnimationTimeline::GetAnimations(); r=jwatt
authorBrian Birtles <birtles@gmail.com>
Mon, 15 Jun 2015 11:05:43 +0900
changeset 252005 85a593b6fe428ab20755998b74cac0f12662d979
parent 252004 865b4e9c2ea30b35beee7230c9f2cdaf1b5769dc
child 252006 97e547e727ddc9de1ff09b065d411e0bc0eadb93
push id29020
push usercbook@mozilla.com
push dateThu, 09 Jul 2015 15:56:37 +0000
treeherdermozilla-central@d656ef3c4936 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1150810
milestone42.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 1150810 part 12 - Flush styles in AnimationTimeline::GetAnimations(); r=jwatt
dom/animation/AnimationTimeline.cpp
--- a/dom/animation/AnimationTimeline.cpp
+++ b/dom/animation/AnimationTimeline.cpp
@@ -44,17 +44,23 @@ AppendAnimationToSequence(nsRefPtrHashKe
   params->mSequence.AppendElement(animation);
 
   return PL_DHASH_NEXT;
 }
 
 void
 AnimationTimeline::GetAnimations(AnimationSequence& aAnimations)
 {
-  // FIXME: Flush the document here (fixed in a subsequent patch)
+  nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(mWindow);
+  if (mWindow) {
+    nsIDocument* doc = window->GetDoc();
+    if (doc) {
+      doc->FlushPendingNotifications(Flush_Style);
+    }
+  }
 
 #ifdef DEBUG
   AddAnimationParams params{ aAnimations, this };
 #else
   AddAnimationParams params{ aAnimations };
 #endif
   mAnimations.EnumerateEntries(AppendAnimationToSequence, &params);
 }