OLD | NEW |
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 "core/page/PageAnimator.h" | 5 #include "core/page/PageAnimator.h" |
6 | 6 |
7 #include "core/animation/DocumentAnimations.h" | 7 #include "core/animation/DocumentAnimations.h" |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
10 #include "core/page/ChromeClient.h" | 10 #include "core/page/ChromeClient.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver
seNext()) { | 41 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver
seNext()) { |
42 if (frame->isLocalFrame()) | 42 if (frame->isLocalFrame()) |
43 documents.append(toLocalFrame(frame)->document()); | 43 documents.append(toLocalFrame(frame)->document()); |
44 } | 44 } |
45 | 45 |
46 for (auto& document : documents) { | 46 for (auto& document : documents) { |
47 DocumentAnimations::updateAnimationTimingForAnimationFrame(*document); | 47 DocumentAnimations::updateAnimationTimingForAnimationFrame(*document); |
48 if (document->view()) { | 48 if (document->view()) { |
49 if (document->view()->shouldThrottleRendering()) | 49 if (document->view()->shouldThrottleRendering()) |
50 continue; | 50 continue; |
51 document->view()->scrollableArea()->serviceScrollAnimations(monotoni
cAnimationStartTime); | 51 document->view()->getScrollableArea()->serviceScrollAnimations(monot
onicAnimationStartTime); |
52 | 52 |
53 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = d
ocument->view()->animatingScrollableAreas()) { | 53 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = d
ocument->view()->animatingScrollableAreas()) { |
54 // Iterate over a copy, since ScrollableAreas may deregister | 54 // Iterate over a copy, since ScrollableAreas may deregister |
55 // themselves during the iteration. | 55 // themselves during the iteration. |
56 WillBeHeapVector<RawPtrWillBeMember<ScrollableArea>> animatingSc
rollableAreasCopy; | 56 WillBeHeapVector<RawPtrWillBeMember<ScrollableArea>> animatingSc
rollableAreasCopy; |
57 copyToVector(*animatingScrollableAreas, animatingScrollableAreas
Copy); | 57 copyToVector(*animatingScrollableAreas, animatingScrollableAreas
Copy); |
58 for (ScrollableArea* scrollableArea : animatingScrollableAreasCo
py) | 58 for (ScrollableArea* scrollableArea : animatingScrollableAreasCo
py) |
59 scrollableArea->serviceScrollAnimations(monotonicAnimationSt
artTime); | 59 scrollableArea->serviceScrollAnimations(monotonicAnimationSt
artTime); |
60 } | 60 } |
61 } | 61 } |
(...skipping 17 matching lines...) Expand all Loading... |
79 } | 79 } |
80 | 80 |
81 void PageAnimator::updateAllLifecyclePhases(LocalFrame& rootFrame) | 81 void PageAnimator::updateAllLifecyclePhases(LocalFrame& rootFrame) |
82 { | 82 { |
83 RefPtrWillBeRawPtr<FrameView> view = rootFrame.view(); | 83 RefPtrWillBeRawPtr<FrameView> view = rootFrame.view(); |
84 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true); | 84 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true); |
85 view->updateAllLifecyclePhases(); | 85 view->updateAllLifecyclePhases(); |
86 } | 86 } |
87 | 87 |
88 } // namespace blink | 88 } // namespace blink |
OLD | NEW |