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

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

Issue 855413002: [New Multicolumn] Support for block direction margins on spanners. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: code review - add descriptions to tests. Created 5 years, 11 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/RenderBlockFlow.cpp
diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp
index c377df7c9a8cd3c3d2dd0244a9f67aa80f9d1ba0..84707a62709d017f10bf0b77de88dbf96687fd10 100644
--- a/Source/core/rendering/RenderBlockFlow.cpp
+++ b/Source/core/rendering/RenderBlockFlow.cpp
@@ -1067,7 +1067,12 @@ void RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, SubtreeLayoutSc
if (child->isColumnSpanAll()) {
// This is not the containing block of the spanner. The spanner's placeholder will lay
// it out in due course. For now we just need to consult our flow thread, so that the
- // columns (if any) preceding and following the spanner are laid out correctly.
+ // columns (if any) preceding and following the spanner are laid out correctly. But
+ // first we apply the pending margin, so that it's taken into consideration and doesn't
+ // end up on the other side of the spanner.
+ setLogicalHeight(logicalHeight() + marginInfo.margin());
+ marginInfo.clearMargin();
+
LayoutUnit adjustment = flowThreadContainingBlock()->skipColumnSpanner(child, offsetFromLogicalTopOfFirstPage() + logicalHeight());
setLogicalHeight(logicalHeight() + adjustment);
continue;
@@ -1477,7 +1482,7 @@ void RenderBlockFlow::marginBeforeEstimateForChild(RenderBox& child, LayoutUnit&
RenderBox* grandchildBox = childBlockFlow->firstChildBox();
for ( ; grandchildBox; grandchildBox = grandchildBox->nextSiblingBox()) {
- if (!grandchildBox->isFloatingOrOutOfFlowPositioned())
+ if (!grandchildBox->isFloatingOrOutOfFlowPositioned() && !grandchildBox->isColumnSpanAll())
break;
}
« no previous file with comments | « LayoutTests/fast/multicol/span/trailing-margin-before-spanner-expected.html ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698