| 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 15 matching lines...) Expand all Loading... |
| 26 return new PageAnimator(page); | 26 return new PageAnimator(page); |
| 27 } | 27 } |
| 28 | 28 |
| 29 DEFINE_TRACE(PageAnimator) | 29 DEFINE_TRACE(PageAnimator) |
| 30 { | 30 { |
| 31 visitor->trace(m_page); | 31 visitor->trace(m_page); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime) | 34 void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime) |
| 35 { | 35 { |
| 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>, 32> documents; | 39 HeapVector<Member<Document>, 32> 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()); | 46 ScopedFrameBlamer frameBlamer(document->frame()); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 74 void PageAnimator::scheduleVisualUpdate(LocalFrame* frame) | 74 void PageAnimator::scheduleVisualUpdate(LocalFrame* frame) |
| 75 { | 75 { |
| 76 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting) | 76 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting) |
| 77 return; | 77 return; |
| 78 m_page->chromeClient().scheduleAnimation(frame->view()); | 78 m_page->chromeClient().scheduleAnimation(frame->view()); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void PageAnimator::updateAllLifecyclePhases(LocalFrame& rootFrame) | 81 void PageAnimator::updateAllLifecyclePhases(LocalFrame& rootFrame) |
| 82 { | 82 { |
| 83 FrameView* view = rootFrame.view(); | 83 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 |