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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 void PageAnimator::scheduleVisualUpdate() | 58 void PageAnimator::scheduleVisualUpdate() |
59 { | 59 { |
60 // FIXME: also include m_animationFramePending here. It is currently not the
re due to crbug.com/353756. | 60 // FIXME: also include m_animationFramePending here. It is currently not the
re due to crbug.com/353756. |
61 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting) | 61 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting) |
62 return; | 62 return; |
63 m_page->chrome().scheduleAnimation(); | 63 m_page->chrome().scheduleAnimation(); |
64 } | 64 } |
65 | 65 |
66 void PageAnimator::updateLayoutAndStyleForPainting(LocalFrame* rootFrame) | 66 void PageAnimator::updateLayoutAndStyleForPainting(LocalFrame* rootFrame) |
67 { | 67 { |
68 RefPtr<FrameView> view = rootFrame->view(); | 68 RefPtrWillBeRawPtr<FrameView> view = rootFrame->view(); |
69 | 69 |
70 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true); | 70 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true); |
71 | 71 |
72 // In order for our child HWNDs (NativeWindowWidgets) to update properly, | 72 // In order for our child HWNDs (NativeWindowWidgets) to update properly, |
73 // they need to be told that we are updating the screen. The problem is that | 73 // they need to be told that we are updating the screen. The problem is that |
74 // the native widgets need to recalculate their clip region and not overlap | 74 // the native widgets need to recalculate their clip region and not overlap |
75 // any of our non-native widgets. To force the resizing, call | 75 // any of our non-native widgets. To force the resizing, call |
76 // setFrameRect(). This will be a quick operation for most frames, but the | 76 // setFrameRect(). This will be a quick operation for most frames, but the |
77 // NativeWindowWidgets will update a proper clipping region. | 77 // NativeWindowWidgets will update a proper clipping region. |
78 view->setFrameRect(view->frameRect()); | 78 view->setFrameRect(view->frameRect()); |
79 | 79 |
80 // setFrameRect may have the side-effect of causing existing page layout to | 80 // setFrameRect may have the side-effect of causing existing page layout to |
81 // be invalidated, so layout needs to be called last. | 81 // be invalidated, so layout needs to be called last. |
82 view->updateLayoutAndStyleForPainting(); | 82 view->updateLayoutAndStyleForPainting(); |
83 } | 83 } |
84 | 84 |
85 } | 85 } |
OLD | NEW |