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

Unified Diff: Source/WebCore/page/FrameView.cpp

Issue 8714006: Add autoresize capability for Chromium. (Closed) Base URL: http://git.chromium.org/external/WebKit_trimmed.git@master
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698