Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Side by Side Diff: Source/core/page/PageAnimator.cpp

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switch LocalFrame::m_pluginElements rep to HashSet<HTMLPlugInElement*> Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698