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

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

Issue 343663003: Revert "Enable Scroll Animation for RenderLayerScrollableArea" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix compile error in PageAnimator Created 6 years, 6 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
Index: Source/core/page/PageAnimator.cpp
diff --git a/Source/core/page/PageAnimator.cpp b/Source/core/page/PageAnimator.cpp
index 5f950cf1cef03e9368e8862437dd4b70277116eb..558b40d0ba5ba016cb267e37f510218e4b2284ac 100644
--- a/Source/core/page/PageAnimator.cpp
+++ b/Source/core/page/PageAnimator.cpp
@@ -29,26 +29,20 @@ void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime)
m_animationFramePending = false;
TemporaryChange<bool> servicing(m_servicingAnimations, true);
- WillBeHeapVector<RefPtrWillBeMember<Document> > documents;
for (RefPtr<Frame> frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
- if (frame->isLocalFrame())
- documents.append(toLocalFrame(frame.get())->document());
- }
+ if (frame->isLocalFrame()) {
+ RefPtr<LocalFrame> localFrame = toLocalFrame(frame.get());
+ localFrame->view()->serviceScrollAnimations();
- for (size_t i = 0; i < documents.size(); ++i) {
- if (documents[i]->frame()) {
- documents[i]->view()->serviceScrollAnimations();
-
- if (const FrameView::ScrollableAreaSet* scrollableAreas = documents[i]->view()->scrollableAreas()) {
- for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas->begin(); it != scrollableAreas->end(); ++it)
- (*it)->serviceScrollAnimations();
- }
+ DocumentAnimations::updateAnimationTimingForAnimationFrame(*localFrame->document(), monotonicAnimationStartTime);
+ SVGDocumentExtensions::serviceOnAnimationFrame(*localFrame->document(), monotonicAnimationStartTime);
}
}
- for (size_t i = 0; i < documents.size(); ++i) {
- DocumentAnimations::updateAnimationTimingForAnimationFrame(*documents[i], monotonicAnimationStartTime);
- SVGDocumentExtensions::serviceOnAnimationFrame(*documents[i], monotonicAnimationStartTime);
+ Vector<RefPtr<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)
« no previous file with comments | « LayoutTests/fast/scroll-behavior/sub-frame-scroll.html ('k') | Source/core/rendering/RenderLayerScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698