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

Side by Side Diff: Source/core/page/PageAnimator.cpp

Issue 134443003: Implement CSSOM Smooth Scroll API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
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 13 matching lines...) Expand all
24 } 24 }
25 25
26 void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime) 26 void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime)
27 { 27 {
28 m_animationFramePending = false; 28 m_animationFramePending = false;
29 TemporaryChange<bool> servicing(m_servicingAnimations, true); 29 TemporaryChange<bool> servicing(m_servicingAnimations, true);
30 30
31 for (RefPtr<Frame> frame = m_page->mainFrame(); frame; frame = frame->tree() .traverseNext()) { 31 for (RefPtr<Frame> frame = m_page->mainFrame(); frame; frame = frame->tree() .traverseNext()) {
32 if (frame->isLocalFrame()) { 32 if (frame->isLocalFrame()) {
33 RefPtr<LocalFrame> localFrame = toLocalFrame(frame.get()); 33 RefPtr<LocalFrame> localFrame = toLocalFrame(frame.get());
34 localFrame->view()->serviceScrollAnimations(); 34 localFrame->view()->serviceScrollAnimations(monotonicAnimationStartT ime);
35 35
36 DocumentAnimations::updateAnimationTimingForAnimationFrame(*localFra me->document(), monotonicAnimationStartTime); 36 DocumentAnimations::updateAnimationTimingForAnimationFrame(*localFra me->document(), monotonicAnimationStartTime);
37 SVGDocumentExtensions::serviceOnAnimationFrame(*localFrame->document (), monotonicAnimationStartTime); 37 SVGDocumentExtensions::serviceOnAnimationFrame(*localFrame->document (), monotonicAnimationStartTime);
38 } 38 }
39 } 39 }
40 40
41 WillBeHeapVector<RefPtrWillBeMember<Document> > documents; 41 WillBeHeapVector<RefPtrWillBeMember<Document> > documents;
42 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) { 42 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) {
43 if (frame->isLocalFrame()) 43 if (frame->isLocalFrame())
44 documents.append(toLocalFrame(frame)->document()); 44 documents.append(toLocalFrame(frame)->document());
(...skipping 27 matching lines...) Expand all
72 // setFrameRect(). This will be a quick operation for most frames, but the 72 // setFrameRect(). This will be a quick operation for most frames, but the
73 // NativeWindowWidgets will update a proper clipping region. 73 // NativeWindowWidgets will update a proper clipping region.
74 view->setFrameRect(view->frameRect()); 74 view->setFrameRect(view->frameRect());
75 75
76 // setFrameRect may have the side-effect of causing existing page layout to 76 // setFrameRect may have the side-effect of causing existing page layout to
77 // be invalidated, so layout needs to be called last. 77 // be invalidated, so layout needs to be called last.
78 view->updateLayoutAndStyleForPainting(); 78 view->updateLayoutAndStyleForPainting();
79 } 79 }
80 80
81 } 81 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLBodyElement.cpp ('k') | Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698