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

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

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase past r181764 Created 6 years, 3 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 { 61 {
62 // FIXME: also include m_animationFramePending here. It is currently not the re due to crbug.com/353756. 62 // FIXME: also include m_animationFramePending here. It is currently not the re due to crbug.com/353756.
63 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting) 63 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting)
64 return; 64 return;
65 m_page->chrome().scheduleAnimation(); 65 m_page->chrome().scheduleAnimation();
66 } 66 }
67 67
68 void PageAnimator::updateLayoutAndStyleForPainting(LocalFrame* rootFrame) 68 void PageAnimator::updateLayoutAndStyleForPainting(LocalFrame* rootFrame)
69 { 69 {
70 RefPtr<FrameView> view = rootFrame->view(); 70 RefPtr<FrameView> view = rootFrame->view();
71
72 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true); 71 TemporaryChange<bool> servicing(m_updatingLayoutAndStyleForPainting, true);
73 72
74 // In order for our child HWNDs (NativeWindowWidgets) to update properly, 73 // In order for our child HWNDs (NativeWindowWidgets) to update properly,
75 // they need to be told that we are updating the screen. The problem is that 74 // they need to be told that we are updating the screen. The problem is that
76 // the native widgets need to recalculate their clip region and not overlap 75 // the native widgets need to recalculate their clip region and not overlap
77 // any of our non-native widgets. To force the resizing, call 76 // any of our non-native widgets. To force the resizing, call
78 // setFrameRect(). This will be a quick operation for most frames, but the 77 // setFrameRect(). This will be a quick operation for most frames, but the
79 // NativeWindowWidgets will update a proper clipping region. 78 // NativeWindowWidgets will update a proper clipping region.
80 view->setFrameRect(view->frameRect()); 79 view->setFrameRect(view->frameRect());
81 80
82 // setFrameRect may have the side-effect of causing existing page layout to 81 // setFrameRect may have the side-effect of causing existing page layout to
83 // be invalidated, so layout needs to be called last. 82 // be invalidated, so layout needs to be called last.
84 view->updateLayoutAndStyleForPainting(); 83 view->updateLayoutAndStyleForPainting();
85 } 84 }
86 85
87 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698