| 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 25 matching lines...) Expand all Loading... |
| 36 TemporaryChange<bool> servicing(m_servicingAnimations, true); | 36 TemporaryChange<bool> servicing(m_servicingAnimations, true); |
| 37 clock().updateTime(monotonicAnimationStartTime); | 37 clock().updateTime(monotonicAnimationStartTime); |
| 38 | 38 |
| 39 HeapVector<Member<Document>> documents; | 39 HeapVector<Member<Document>> documents; |
| 40 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver
seNext()) { | 40 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver
seNext()) { |
| 41 if (frame->isLocalFrame()) | 41 if (frame->isLocalFrame()) |
| 42 documents.append(toLocalFrame(frame)->document()); | 42 documents.append(toLocalFrame(frame)->document()); |
| 43 } | 43 } |
| 44 | 44 |
| 45 for (auto& document : documents) { | 45 for (auto& document : documents) { |
| 46 ScopedFrameBlamer frameBlamer(document->frame()); |
| 47 TRACE_EVENT0("blink", "PageAnimator::serviceScriptedAnimations"); |
| 46 DocumentAnimations::updateAnimationTimingForAnimationFrame(*document); | 48 DocumentAnimations::updateAnimationTimingForAnimationFrame(*document); |
| 47 if (document->view()) { | 49 if (document->view()) { |
| 48 if (document->view()->shouldThrottleRendering()) | 50 if (document->view()->shouldThrottleRendering()) |
| 49 continue; | 51 continue; |
| 50 // Disallow throttling in case any script needs to do a synchronous | 52 // Disallow throttling in case any script needs to do a synchronous |
| 51 // lifecycle update in other frames which are throttled. | 53 // lifecycle update in other frames which are throttled. |
| 52 DocumentLifecycle::DisallowThrottlingScope noThrottlingScope(documen
t->lifecycle()); | 54 DocumentLifecycle::DisallowThrottlingScope noThrottlingScope(documen
t->lifecycle()); |
| 53 if (ScrollableArea* scrollableArea = document->view()->getScrollable
Area()) | 55 if (ScrollableArea* scrollableArea = document->view()->getScrollable
Area()) |
| 54 scrollableArea->serviceScrollAnimations(monotonicAnimationStartT
ime); | 56 scrollableArea->serviceScrollAnimations(monotonicAnimationStartT
ime); |
| 55 | 57 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 81 } | 83 } |
| 82 | 84 |
| 83 void PageAnimator::updateAllLifecyclePhases(LocalFrame& rootFrame) | 85 void PageAnimator::updateAllLifecyclePhases(LocalFrame& rootFrame) |
| 84 { | 86 { |
| 85 FrameView* view = rootFrame.view(); | 87 FrameView* view = rootFrame.view(); |
| 86 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true); | 88 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true); |
| 87 view->updateAllLifecyclePhases(); | 89 view->updateAllLifecyclePhases(); |
| 88 } | 90 } |
| 89 | 91 |
| 90 } // namespace blink | 92 } // namespace blink |
| OLD | NEW |