Chromium Code Reviews| Index: Source/core/page/PageAnimator.cpp |
| diff --git a/Source/core/page/PageAnimator.cpp b/Source/core/page/PageAnimator.cpp |
| index 33b2d8365e336c68681c12392a40b464b532858b..e7c4b8ae6e0ac02c4d4a48b987be96b267b8ef31 100644 |
| --- a/Source/core/page/PageAnimator.cpp |
| +++ b/Source/core/page/PageAnimator.cpp |
| @@ -29,15 +29,20 @@ void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime) |
| m_animationFramePending = false; |
| TemporaryChange<bool> servicing(m_servicingAnimations, true); |
| + Vector<RefPtr<Document> > documents; |
| + |
| for (RefPtr<LocalFrame> frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) { |
| frame->view()->serviceScrollAnimations(); |
| + |
| + if (const FrameView::ScrollableAreaSet* scrollableAreas = frame->view()->scrollableAreas()) { |
| + for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas->begin(); it != scrollableAreas->end(); ++it) |
| + (*it)->serviceScrollAnimations(); |
| + } |
| + |
| DocumentAnimations::updateAnimationTimingForAnimationFrame(*frame->document(), monotonicAnimationStartTime); |
| SVGDocumentExtensions::serviceOnAnimationFrame(*frame->document(), monotonicAnimationStartTime); |
| - } |
| - |
| - Vector<RefPtr<Document> > documents; |
| - for (LocalFrame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) |
| documents.append(frame->document()); |
|
abarth-chromium
2014/04/14 18:52:25
Please just move this loop to the top of the funct
abarth-chromium
2014/04/14 18:52:57
By the top of the function, I mean between lines 3
|
| + } |
| for (size_t i = 0; i < documents.size(); ++i) |
| documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime); |