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 "config.h" | 5 #include "config.h" |
6 #include "core/page/PageAnimator.h" | 6 #include "core/page/PageAnimator.h" |
7 | 7 |
8 #include "core/animation/DocumentAnimations.h" | 8 #include "core/animation/DocumentAnimations.h" |
9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 (*it)->serviceScrollAnimations(monotonicAnimationStartTime); | 46 (*it)->serviceScrollAnimations(monotonicAnimationStartTime); |
47 } | 47 } |
48 } | 48 } |
49 } | 49 } |
50 | 50 |
51 for (size_t i = 0; i < documents.size(); ++i) { | 51 for (size_t i = 0; i < documents.size(); ++i) { |
52 DocumentAnimations::updateAnimationTimingForAnimationFrame(*documents[i]
, monotonicAnimationStartTime); | 52 DocumentAnimations::updateAnimationTimingForAnimationFrame(*documents[i]
, monotonicAnimationStartTime); |
53 SVGDocumentExtensions::serviceOnAnimationFrame(*documents[i], monotonicA
nimationStartTime); | 53 SVGDocumentExtensions::serviceOnAnimationFrame(*documents[i], monotonicA
nimationStartTime); |
54 } | 54 } |
55 | 55 |
56 for (size_t i = 0; i < documents.size(); ++i) | 56 for (size_t i = 0; i < documents.size(); ++i) { |
57 documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime); | 57 documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime); |
| 58 if (const FrameView::ScrollableAreaSet* scrollableAreas = documents[i]->
view()->scrollableAreas()) { |
| 59 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas->be
gin(); it != scrollableAreas->end(); ++it) |
| 60 (*it)->serviceScrollbarAnimations(); |
| 61 } |
| 62 } |
58 } | 63 } |
59 | 64 |
60 void PageAnimator::scheduleVisualUpdate() | 65 void PageAnimator::scheduleVisualUpdate() |
61 { | 66 { |
62 // FIXME: also include m_animationFramePending here. It is currently not the
re due to crbug.com/353756. | 67 // FIXME: also include m_animationFramePending here. It is currently not the
re due to crbug.com/353756. |
63 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting) | 68 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting) |
64 return; | 69 return; |
65 m_page->chrome().scheduleAnimation(); | 70 m_page->chrome().scheduleAnimation(); |
66 } | 71 } |
67 | 72 |
(...skipping 10 matching lines...) Expand all Loading... |
78 // setFrameRect(). This will be a quick operation for most frames, but the | 83 // setFrameRect(). This will be a quick operation for most frames, but the |
79 // NativeWindowWidgets will update a proper clipping region. | 84 // NativeWindowWidgets will update a proper clipping region. |
80 view->setFrameRect(view->frameRect()); | 85 view->setFrameRect(view->frameRect()); |
81 | 86 |
82 // setFrameRect may have the side-effect of causing existing page layout to | 87 // setFrameRect may have the side-effect of causing existing page layout to |
83 // be invalidated, so layout needs to be called last. | 88 // be invalidated, so layout needs to be called last. |
84 view->updateLayoutAndStyleForPainting(); | 89 view->updateLayoutAndStyleForPainting(); |
85 } | 90 } |
86 | 91 |
87 } | 92 } |
OLD | NEW |