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

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

Issue 792513004: Implement CSSOM smooth scroll for Elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PageAnimator.cpp
diff --git a/Source/core/page/PageAnimator.cpp b/Source/core/page/PageAnimator.cpp
index 4a1e2837db6cf382dfb6fb4394cfc16708e9c6f4..d4e8024fa54e51daffb7ae62aefcff2133a6676a 100644
--- a/Source/core/page/PageAnimator.cpp
+++ b/Source/core/page/PageAnimator.cpp
@@ -50,8 +50,12 @@ void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime)
if (documents[i]->frame()) {
documents[i]->view()->serviceScrollAnimations(monotonicAnimationStartTime);
- if (const FrameView::ScrollableAreaSet* scrollableAreas = documents[i]->view()->scrollableAreas()) {
- for (ScrollableArea* scrollableArea : *scrollableAreas)
+ if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = documents[i]->view()->animatingScrollableAreas()) {
+ // Iterate over a copy, since ScrollableAreas may deregister
+ // themselves during the iteration.
+ Vector<ScrollableArea*> animatingScrollableAreasCopy;
+ copyToVector(*animatingScrollableAreas, animatingScrollableAreasCopy);
+ for (ScrollableArea* scrollableArea : animatingScrollableAreasCopy)
scrollableArea->serviceScrollAnimations(monotonicAnimationStartTime);
}
}
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698