| 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 "sky/engine/config.h" | 5 #include "sky/engine/config.h" |
| 6 #include "sky/engine/core/page/PageAnimator.h" | 6 #include "sky/engine/core/page/PageAnimator.h" |
| 7 | 7 |
| 8 #include "sky/engine/core/animation/DocumentAnimations.h" | 8 #include "sky/engine/core/animation/DocumentAnimations.h" |
| 9 #include "sky/engine/core/frame/FrameView.h" | 9 #include "sky/engine/core/frame/FrameView.h" |
| 10 #include "sky/engine/core/frame/LocalFrame.h" | 10 #include "sky/engine/core/frame/LocalFrame.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 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 Vector<RefPtr<Document> > documents; | 31 Vector<RefPtr<Document> > documents; |
| 32 documents.append(m_page->mainFrame()->document()); | 32 documents.append(m_page->mainFrame()->document()); |
| 33 | 33 |
| 34 WTF_LOG(ScriptedAnimationController, "PageAnimator::serviceScriptedAnimation
s: #documents = %d", | 34 WTF_LOG(ScriptedAnimationController, "PageAnimator::serviceScriptedAnimation
s: #documents = %d", |
| 35 static_cast<int>(documents.size())); | 35 static_cast<int>(documents.size())); |
| 36 for (size_t i = 0; i < documents.size(); ++i) { | |
| 37 if (documents[i]->frame()) { | |
| 38 if (const FrameView::ScrollableAreaSet* scrollableAreas = documents[
i]->view()->scrollableAreas()) { | |
| 39 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas
->begin(); it != scrollableAreas->end(); ++it) | |
| 40 (*it)->serviceScrollAnimations(monotonicAnimationStartTime); | |
| 41 } | |
| 42 } | |
| 43 } | |
| 44 | 36 |
| 45 for (size_t i = 0; i < documents.size(); ++i) | 37 for (size_t i = 0; i < documents.size(); ++i) |
| 46 DocumentAnimations::updateAnimationTimingForAnimationFrame(*documents[i]
, monotonicAnimationStartTime); | 38 DocumentAnimations::updateAnimationTimingForAnimationFrame(*documents[i]
, monotonicAnimationStartTime); |
| 47 | 39 |
| 48 for (size_t i = 0; i < documents.size(); ++i) | 40 for (size_t i = 0; i < documents.size(); ++i) |
| 49 documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime); | 41 documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime); |
| 50 } | 42 } |
| 51 | 43 |
| 52 void PageAnimator::scheduleVisualUpdate() | 44 void PageAnimator::scheduleVisualUpdate() |
| 53 { | 45 { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 70 // setFrameRect(). This will be a quick operation for most frames, but the | 62 // setFrameRect(). This will be a quick operation for most frames, but the |
| 71 // NativeWindowWidgets will update a proper clipping region. | 63 // NativeWindowWidgets will update a proper clipping region. |
| 72 view->setFrameRect(view->frameRect()); | 64 view->setFrameRect(view->frameRect()); |
| 73 | 65 |
| 74 // setFrameRect may have the side-effect of causing existing page layout to | 66 // setFrameRect may have the side-effect of causing existing page layout to |
| 75 // be invalidated, so layout needs to be called last. | 67 // be invalidated, so layout needs to be called last. |
| 76 view->updateLayoutAndStyleForPainting(); | 68 view->updateLayoutAndStyleForPainting(); |
| 77 } | 69 } |
| 78 | 70 |
| 79 } | 71 } |
| OLD | NEW |