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

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

Issue 214953004: Enable Scroll Animation for RenderLayerScrollableArea (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add Layout test Created 6 years, 8 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 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();
abarth-chromium 2014/04/10 21:05:34 Don't we need to collect up all the RefPtr<Documen
weiliangc 2014/04/10 21:26:39 Every frame owns a list of scrollableAreas that co
+ }
+
DocumentAnimations::updateAnimationTimingForAnimationFrame(*frame->document(), monotonicAnimationStartTime);
SVGDocumentExtensions::serviceOnAnimationFrame(*frame->document(), monotonicAnimationStartTime);
- }
-
- Vector<RefPtr<Document> > documents;
weiliangc 2014/04/10 21:26:39 This was moved because we are traversing the frame
abarth-chromium 2014/04/10 22:21:32 I suspect we need to move this to the top of the f
weiliangc 2014/04/14 17:12:39 I moved it to (almost) top of function(line 32), a
- for (LocalFrame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext())
documents.append(frame->document());
+ }
for (size_t i = 0; i < documents.size(); ++i)
documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime);
« 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