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..56934c7b20f3b0c159fb541a99d000008c07fb0e 100644 |
| --- a/Source/core/page/PageAnimator.cpp |
| +++ b/Source/core/page/PageAnimator.cpp |
| @@ -29,16 +29,24 @@ void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime) |
| m_animationFramePending = false; |
| TemporaryChange<bool> servicing(m_servicingAnimations, true); |
| - for (RefPtr<LocalFrame> frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) { |
| - frame->view()->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()) |
| + for (RefPtr<LocalFrame> frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) |
| documents.append(frame->document()); |
|
weiliangc
2014/04/14 19:04:32
Like this?
abarth-chromium
2014/04/14 20:15:34
Yes, thank you.
|
| + for (RefPtr<LocalFrame> frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) { |
|
abarth-chromium
2014/04/14 20:15:34
Please iterate the documents collection instead of
weiliangc
2014/04/14 20:29:38
I need to use FrameViews. as long as document->fra
|
| + frame->view()->serviceScrollAnimations(); |
| + |
| + if (const FrameView::ScrollableAreaSet* scrollableAreas = frame->view()->scrollableAreas()) { |
| + for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas->begin(); it != scrollableAreas->end(); ++it) |
| + (*it)->serviceScrollAnimations(); |
| + } |
| + } |
| + |
| + 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); |