| 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 26 matching lines...) Expand all Loading... |
| 37 RefPtrWillBeRawPtr<PageAnimator> protector(this); | 37 RefPtrWillBeRawPtr<PageAnimator> protector(this); |
| 38 TemporaryChange<bool> servicing(m_servicingAnimations, true); | 38 TemporaryChange<bool> servicing(m_servicingAnimations, true); |
| 39 | 39 |
| 40 WillBeHeapVector<RefPtrWillBeMember<Document>> documents; | 40 WillBeHeapVector<RefPtrWillBeMember<Document>> documents; |
| 41 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver
seNext()) { | 41 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver
seNext()) { |
| 42 if (frame->isLocalFrame()) | 42 if (frame->isLocalFrame()) |
| 43 documents.append(toLocalFrame(frame)->document()); | 43 documents.append(toLocalFrame(frame)->document()); |
| 44 } | 44 } |
| 45 | 45 |
| 46 for (size_t i = 0; i < documents.size(); ++i) { | 46 for (size_t i = 0; i < documents.size(); ++i) { |
| 47 if (documents[i]->frame()) { | 47 if (documents[i]->view()) { |
| 48 documents[i]->view()->scrollableArea()->serviceScrollAnimations(mono
tonicAnimationStartTime); | 48 documents[i]->view()->scrollableArea()->serviceScrollAnimations(mono
tonicAnimationStartTime); |
| 49 | 49 |
| 50 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = d
ocuments[i]->view()->animatingScrollableAreas()) { | 50 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = d
ocuments[i]->view()->animatingScrollableAreas()) { |
| 51 // Iterate over a copy, since ScrollableAreas may deregister | 51 // Iterate over a copy, since ScrollableAreas may deregister |
| 52 // themselves during the iteration. | 52 // themselves during the iteration. |
| 53 Vector<ScrollableArea*> animatingScrollableAreasCopy; | 53 Vector<ScrollableArea*> animatingScrollableAreasCopy; |
| 54 copyToVector(*animatingScrollableAreas, animatingScrollableAreas
Copy); | 54 copyToVector(*animatingScrollableAreas, animatingScrollableAreas
Copy); |
| 55 for (ScrollableArea* scrollableArea : animatingScrollableAreasCo
py) | 55 for (ScrollableArea* scrollableArea : animatingScrollableAreasCo
py) |
| 56 scrollableArea->serviceScrollAnimations(monotonicAnimationSt
artTime); | 56 scrollableArea->serviceScrollAnimations(monotonicAnimationSt
artTime); |
| 57 } | 57 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 RefPtrWillBeRawPtr<FrameView> view = rootFrame->view(); | 91 RefPtrWillBeRawPtr<FrameView> view = rootFrame->view(); |
| 92 | 92 |
| 93 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true); | 93 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true); |
| 94 | 94 |
| 95 // setFrameRect may have the side-effect of causing existing page layout to | 95 // setFrameRect may have the side-effect of causing existing page layout to |
| 96 // be invalidated, so layout needs to be called last. | 96 // be invalidated, so layout needs to be called last. |
| 97 view->updateLayoutAndStyleForPainting(); | 97 view->updateLayoutAndStyleForPainting(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 } | 100 } |
| OLD | NEW |