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

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

Issue 209863003: [New Multicolumn] balancer confused by content with top margins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test failures in debug mode. Created 6 years, 9 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/LayoutState.cpp
diff --git a/Source/core/rendering/LayoutState.cpp b/Source/core/rendering/LayoutState.cpp
index e9cb94b10e2472b672b4caf5e24b973d10338639..d50da0e3b09e0289380d6521406d5dc405fd8d85 100644
--- a/Source/core/rendering/LayoutState.cpp
+++ b/Source/core/rendering/LayoutState.cpp
@@ -89,6 +89,7 @@ LayoutState::LayoutState(LayoutState* prev, RenderBox& renderer, const LayoutSiz
m_pageOffset = LayoutSize(m_layoutOffset.width() + (!isFlipped ? renderer.borderLeft() + renderer.paddingLeft() : renderer.borderRight() + renderer.paddingRight()),
m_layoutOffset.height() + (!isFlipped ? renderer.borderTop() + renderer.paddingTop() : renderer.borderBottom() + renderer.paddingBottom()));
m_pageLogicalHeightChanged = pageLogicalHeightChanged;
+ m_isPaginated = true;
} else {
// If we don't establish a new page height, then propagate the old page height and offset down.
m_pageLogicalHeight = m_next->m_pageLogicalHeight;
@@ -97,8 +98,12 @@ LayoutState::LayoutState(LayoutState* prev, RenderBox& renderer, const LayoutSiz
// Disable pagination for objects we don't support. For now this includes overflow:scroll/auto, inline blocks and
// writing mode roots.
- if (renderer.isUnsplittableForPagination())
+ if (renderer.isUnsplittableForPagination()) {
m_pageLogicalHeight = 0;
+ m_isPaginated = false;
+ } else {
+ m_isPaginated = m_pageLogicalHeight || m_next->m_columnInfo || renderer.flowThreadContainingBlock();
+ }
}
if (!m_columnInfo)
@@ -119,8 +124,6 @@ LayoutState::LayoutState(LayoutState* prev, RenderBox& renderer, const LayoutSiz
#endif
}
- m_isPaginated = m_pageLogicalHeight || m_columnInfo || renderer.isRenderFlowThread();
-
// FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present.
}
« no previous file with comments | « LayoutTests/fast/multicol/newmulticol/leading-margin-expected.html ('k') | Source/core/rendering/RenderBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698