| Index: Source/WebCore/page/FrameView.cpp
|
| diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp
|
| index 84134cb9b2ed428b3b4bd231a8f8a4c6aedce034..86bdf7b511db6519a1ac5c092b9ec97eaddea33c 100644
|
| --- a/Source/WebCore/page/FrameView.cpp
|
| +++ b/Source/WebCore/page/FrameView.cpp
|
| @@ -1007,7 +1007,6 @@ void FrameView::layout(bool allowSubtree)
|
| FontCachePurgePreventer fontCachePurgePreventer;
|
|
|
| m_nestedLayoutCount++;
|
| -
|
| if (!m_layoutRoot) {
|
| Document* document = m_frame->document();
|
| Node* body = document->body();
|
| @@ -1026,6 +1025,10 @@ void FrameView::layout(bool allowSubtree)
|
| #endif
|
| }
|
|
|
| + Page* page = m_frame ? m_frame->page() : 0;
|
| + if (page)
|
| + page->chrome()->client()->layoutBeforeScrollbarUpdate(m_frame.get());
|
| +
|
| ScrollbarMode hMode;
|
| ScrollbarMode vMode;
|
| calculateScrollbarModesForLayout(hMode, vMode);
|
| @@ -1091,7 +1094,9 @@ void FrameView::layout(bool allowSubtree)
|
|
|
| m_inLayout = true;
|
| beginDeferredRepaints();
|
| - root->layout();
|
| + // If an intermediate step has already done the layout, then skip it.
|
| + if (root->needsLayout())
|
| + root->layout();
|
| endDeferredRepaints();
|
| m_inLayout = false;
|
|
|
| @@ -1099,8 +1104,8 @@ void FrameView::layout(bool allowSubtree)
|
| root->view()->popLayoutState(root);
|
| }
|
| m_layoutRoot = 0;
|
| -
|
| - m_layoutSchedulingEnabled = true;
|
| + if (m_nestedLayoutCount == 1)
|
| + m_layoutSchedulingEnabled = true;
|
|
|
| if (!subtree && !toRenderView(root)->printing())
|
| adjustViewSize();
|
| @@ -1175,7 +1180,7 @@ void FrameView::layout(bool allowSubtree)
|
| if (m_nestedLayoutCount)
|
| return;
|
|
|
| - Page* page = frame() ? frame()->page() : 0;
|
| + page = m_frame ? m_frame->page() : 0;
|
| if (!page)
|
| return;
|
|
|
|
|