Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1363)

Unified Diff: Source/core/page/PageAnimator.cpp

Issue 463493004: In PageAnimator iterate through collected documents instead of frames (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PageAnimator.cpp
diff --git a/Source/core/page/PageAnimator.cpp b/Source/core/page/PageAnimator.cpp
index 0412bd9adc3d5e2601c605b812c633d12494a35e..0fd03145c9273b25d5d2d74905423020c3ac87b0 100644
--- a/Source/core/page/PageAnimator.cpp
+++ b/Source/core/page/PageAnimator.cpp
@@ -28,22 +28,22 @@ void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime)
m_animationFramePending = false;
TemporaryChange<bool> servicing(m_servicingAnimations, true);
- for (RefPtr<Frame> frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
- if (frame->isLocalFrame()) {
- RefPtr<LocalFrame> localFrame = toLocalFrame(frame.get());
- localFrame->view()->serviceScrollAnimations(monotonicAnimationStartTime);
-
- DocumentAnimations::updateAnimationTimingForAnimationFrame(*localFrame->document(), monotonicAnimationStartTime);
- SVGDocumentExtensions::serviceOnAnimationFrame(*localFrame->document(), monotonicAnimationStartTime);
- }
- }
-
WillBeHeapVector<RefPtrWillBeMember<Document> > documents;
for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
if (frame->isLocalFrame())
documents.append(toLocalFrame(frame)->document());
}
+ for (size_t i = 0; i < documents.size(); ++i) {
+ if (documents[i]->frame())
+ documents[i]->view()->serviceScrollAnimations(monotonicAnimationStartTime);
+ }
+
+ for (size_t i = 0; i < documents.size(); ++i) {
+ DocumentAnimations::updateAnimationTimingForAnimationFrame(*documents[i], monotonicAnimationStartTime);
+ SVGDocumentExtensions::serviceOnAnimationFrame(*documents[i], monotonicAnimationStartTime);
+ }
+
for (size_t i = 0; i < documents.size(); ++i)
documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698