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

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 test expectation for Mac failure 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..2ab467b592559b24680d1ad5781078fa46af4657 100644
--- a/Source/core/page/PageAnimator.cpp
+++ b/Source/core/page/PageAnimator.cpp
@@ -29,16 +29,26 @@ 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());
+ 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();
+ }
+ }
+ }
+
+ 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 | « LayoutTests/fast/scroll-behavior/sub-frame-scroll-expected.txt ('k') | Source/core/rendering/RenderLayerScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698