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

Unified Diff: Source/core/rendering/RenderView.cpp

Issue 18601002: Add infrastructure for partial layouts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer comments. Add PartialLayoutState and PartialLayoutDisabler Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderView.cpp
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
index 5defa3002da327f0d24c7f9d4c89d0cf25ce193b..009071ec868153d72e8246375802f569c2a93674 100644
--- a/Source/core/rendering/RenderView.cpp
+++ b/Source/core/rendering/RenderView.cpp
@@ -120,8 +120,13 @@ void RenderView::layoutContent(const LayoutState& state)
ASSERT(needsLayout());
RenderBlock::layout();
+
+ if (m_frameView->partialLayout().shouldStop())
+ return;
+
if (hasRenderNamedFlowThreads())
flowThreadController()->layoutRenderNamedFlowThreads();
+
#ifndef NDEBUG
checkLayoutState(state);
#endif
@@ -214,6 +219,11 @@ bool RenderView::initializeLayoutState(LayoutState& state)
// as detected in the previous step.
void RenderView::layoutContentInAutoLogicalHeightRegions(const LayoutState& state)
{
+ if (!m_frameView->partialLayout().shouldStop()) {
+ // Disable partial layout for any two-pass layout algorithm.
+ m_frameView->partialLayout().reset();
+ }
+
// We need to invalidate all the flows with auto-height regions if one such flow needs layout.
// If none is found we do a layout a check back again afterwards.
if (!flowThreadController()->updateFlowThreadsNeedingLayout()) {
@@ -283,6 +293,11 @@ void RenderView::layout()
else
layoutContent(state);
+ if (m_frameView->partialLayout().shouldStop()) {
+ m_layoutState = 0;
+ return;
+ }
+
#ifndef NDEBUG
checkLayoutState(state);
#endif

Powered by Google App Engine
This is Rietveld 408576698