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

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

Issue 1941403002: Make servicing of SMIL animations require a FrameView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGDocumentExtensions.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 "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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 document->view()->getScrollableArea()->serviceScrollAnimations(monot onicAnimationStartTime); 50 document->view()->getScrollableArea()->serviceScrollAnimations(monot onicAnimationStartTime);
51 51
52 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = d ocument->view()->animatingScrollableAreas()) { 52 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = d ocument->view()->animatingScrollableAreas()) {
53 // Iterate over a copy, since ScrollableAreas may deregister 53 // Iterate over a copy, since ScrollableAreas may deregister
54 // themselves during the iteration. 54 // themselves during the iteration.
55 HeapVector<Member<ScrollableArea>> animatingScrollableAreasCopy; 55 HeapVector<Member<ScrollableArea>> animatingScrollableAreasCopy;
56 copyToVector(*animatingScrollableAreas, animatingScrollableAreas Copy); 56 copyToVector(*animatingScrollableAreas, animatingScrollableAreas Copy);
57 for (ScrollableArea* scrollableArea : animatingScrollableAreasCo py) 57 for (ScrollableArea* scrollableArea : animatingScrollableAreasCo py)
58 scrollableArea->serviceScrollAnimations(monotonicAnimationSt artTime); 58 scrollableArea->serviceScrollAnimations(monotonicAnimationSt artTime);
59 } 59 }
60 SVGDocumentExtensions::serviceOnAnimationFrame(*document);
60 } 61 }
61 // TODO(skyostil): These functions should not run for documents without views. 62 // TODO(skyostil): This function should not run for documents without vi ews.
62 SVGDocumentExtensions::serviceOnAnimationFrame(*document, monotonicAnima tionStartTime);
63 document->serviceScriptedAnimations(monotonicAnimationStartTime); 63 document->serviceScriptedAnimations(monotonicAnimationStartTime);
64 } 64 }
65 65
66 // Oilpan: This is performance optimization to promptly clear the backing 66 // Oilpan: This is performance optimization to promptly clear the backing
67 // storage of the vector and reuse it in the next PageAnimator::serviceScrip tedAnimations. 67 // storage of the vector and reuse it in the next PageAnimator::serviceScrip tedAnimations.
68 documents.clear(); 68 documents.clear();
69 } 69 }
70 70
71 void PageAnimator::scheduleVisualUpdate(LocalFrame* frame) 71 void PageAnimator::scheduleVisualUpdate(LocalFrame* frame)
72 { 72 {
73 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting) 73 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting)
74 return; 74 return;
75 m_page->chromeClient().scheduleAnimation(frame->view()); 75 m_page->chromeClient().scheduleAnimation(frame->view());
76 } 76 }
77 77
78 void PageAnimator::updateAllLifecyclePhases(LocalFrame& rootFrame) 78 void PageAnimator::updateAllLifecyclePhases(LocalFrame& rootFrame)
79 { 79 {
80 FrameView* view = rootFrame.view(); 80 FrameView* view = rootFrame.view();
81 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true); 81 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true);
82 view->updateAllLifecyclePhases(); 82 view->updateAllLifecyclePhases();
83 } 83 }
84 84
85 } // namespace blink 85 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGDocumentExtensions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698