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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/page/PageAnimator.h" 6 #include "core/page/PageAnimator.h"
7 7
8 #include "core/animation/DocumentAnimations.h" 8 #include "core/animation/DocumentAnimations.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 WillBeHeapVector<RefPtrWillBeMember<Document>> documents; 43 WillBeHeapVector<RefPtrWillBeMember<Document>> documents;
44 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) { 44 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) {
45 if (frame->isLocalFrame()) 45 if (frame->isLocalFrame())
46 documents.append(toLocalFrame(frame)->document()); 46 documents.append(toLocalFrame(frame)->document());
47 } 47 }
48 48
49 for (size_t i = 0; i < documents.size(); ++i) { 49 for (size_t i = 0; i < documents.size(); ++i) {
50 if (documents[i]->frame()) { 50 if (documents[i]->frame()) {
51 documents[i]->view()->serviceScrollAnimations(monotonicAnimationStar tTime); 51 documents[i]->view()->serviceScrollAnimations(monotonicAnimationStar tTime);
52 52
53 if (const FrameView::ScrollableAreaSet* scrollableAreas = documents[ i]->view()->scrollableAreas()) { 53 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = d ocuments[i]->view()->animatingScrollableAreas()) {
54 for (ScrollableArea* scrollableArea : *scrollableAreas) 54 // Iterate over a copy, since ScrollableAreas may deregister
55 // themselves during the iteration.
56 Vector<ScrollableArea*> animatingScrollableAreasCopy;
57 copyToVector(*animatingScrollableAreas, animatingScrollableAreas Copy);
58 for (ScrollableArea* scrollableArea : animatingScrollableAreasCo py)
55 scrollableArea->serviceScrollAnimations(monotonicAnimationSt artTime); 59 scrollableArea->serviceScrollAnimations(monotonicAnimationSt artTime);
56 } 60 }
57 } 61 }
58 } 62 }
59 63
60 for (size_t i = 0; i < documents.size(); ++i) { 64 for (size_t i = 0; i < documents.size(); ++i) {
61 DocumentAnimations::updateAnimationTimingForAnimationFrame(*documents[i] , monotonicAnimationStartTime); 65 DocumentAnimations::updateAnimationTimingForAnimationFrame(*documents[i] , monotonicAnimationStartTime);
62 SVGDocumentExtensions::serviceOnAnimationFrame(*documents[i], monotonicA nimationStartTime); 66 SVGDocumentExtensions::serviceOnAnimationFrame(*documents[i], monotonicA nimationStartTime);
63 } 67 }
64 68
(...skipping 30 matching lines...) Expand all
95 // setFrameRect(). This will be a quick operation for most frames, but the 99 // setFrameRect(). This will be a quick operation for most frames, but the
96 // NativeWindowWidgets will update a proper clipping region. 100 // NativeWindowWidgets will update a proper clipping region.
97 view->setFrameRect(view->frameRect()); 101 view->setFrameRect(view->frameRect());
98 102
99 // setFrameRect may have the side-effect of causing existing page layout to 103 // setFrameRect may have the side-effect of causing existing page layout to
100 // be invalidated, so layout needs to be called last. 104 // be invalidated, so layout needs to be called last.
101 view->updateLayoutAndStyleForPainting(); 105 view->updateLayoutAndStyleForPainting();
102 } 106 }
103 107
104 } 108 }
OLDNEW
« 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