Chromium Code Reviews| Index: Source/core/frame/FrameView.cpp |
| diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp |
| index 060b1587d439f485b2557b0e3d6b4e93227b9769..9d4013f04454791abf07828416e8f9d4f230214e 100644 |
| --- a/Source/core/frame/FrameView.cpp |
| +++ b/Source/core/frame/FrameView.cpp |
| @@ -104,33 +104,6 @@ static RenderLayer::UpdateLayerPositionsFlags updateLayerPositionFlags(RenderLay |
| return flags; |
| } |
| -class FrameViewLayoutStateMaintainer { |
| - WTF_MAKE_NONCOPYABLE(FrameViewLayoutStateMaintainer); |
| -public: |
| - FrameViewLayoutStateMaintainer(RenderObject& root, bool inSubtreeLayout) |
| - : m_view(*root.view()) |
| - , m_inSubtreeLayout(inSubtreeLayout) |
| - , m_disabled(inSubtreeLayout && m_view.shouldDisableLayoutStateForSubtree(root)) |
| - { |
| - if (m_inSubtreeLayout) |
| - m_view.pushLayoutState(root); |
| - if (m_disabled) |
| - m_view.disableLayoutState(); |
| - } |
| - |
| - ~FrameViewLayoutStateMaintainer() |
| - { |
| - if (m_disabled) |
| - m_view.enableLayoutState(); |
| - if (m_inSubtreeLayout) |
| - m_view.popLayoutState(); |
| - } |
| -private: |
| - RenderView& m_view; |
| - bool m_inSubtreeLayout; |
| - bool m_disabled; |
| -}; |
| - |
| FrameView::FrameView(LocalFrame* frame) |
| : m_frame(frame) |
| , m_canHaveScrollbars(true) |
| @@ -792,7 +765,8 @@ void FrameView::performLayout(RenderObject* rootForThisLayout, bool inSubtreeLay |
| // FIXME: The 300 other lines in layout() probably belong in other helper functions |
| // so that a single human could understand what layout() is actually doing. |
| - FrameViewLayoutStateMaintainer statePusher(*rootForThisLayout, inSubtreeLayout); |
| + LayoutState layoutState(*rootForThisLayout); |
| + |
| forceLayoutParentViewIfNeeded(); |
| // FIXME (crbug.com/256657): Do not do two layouts for text autosizing. |
| @@ -1042,7 +1016,7 @@ void FrameView::invalidateTree(RenderObject* root) |
| // Until those states are fully fledged, I'll just disable the ASSERTS. |
| DisableCompositingQueryAsserts compositingQueryAssertsDisabler; |
| - RootLayoutStateScope rootLayoutStateScope(*root); |
| + LayoutState rootLayoutStateScope(*root); |
|
esprehn
2014/06/14 03:08:26
rootLayoutState
|
| root->invalidateTreeAfterLayout(*root->containerForPaintInvalidation()); |