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

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

Issue 712553003: [New Multicolumn] Actual support for layout of column-span:all. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase master Created 6 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/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index f60375f6c683c1d4b275c218ae8a1715967072b0..e31b6fd83f7d459b4c7771cb175df483dd246085 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -46,6 +46,7 @@
#include "core/rendering/PaintInfo.h"
#include "core/rendering/RenderDeprecatedFlexibleBox.h"
#include "core/rendering/RenderFlexibleBox.h"
+#include "core/rendering/RenderFlowThread.h"
#include "core/rendering/RenderGeometryMap.h"
#include "core/rendering/RenderGrid.h"
#include "core/rendering/RenderInline.h"
@@ -1427,7 +1428,11 @@ LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const
if (hasOverrideContainingBlockLogicalWidth())
return overrideContainingBlockContentLogicalWidth();
- RenderBlock* cb = containingBlock();
+ RenderBlock* cb;
+ if (isColumnSpanAll())
+ cb = flowThreadContainingBlock()->containingBlock();
+ else
+ cb = containingBlock();
Julien - ping for review 2014/11/17 23:47:11 Why don't we patch containingBlock to return the r
mstensho (USE GERRIT) 2014/11/18 13:29:26 Done. A patch for this particular issue is uploade
return cb->availableLogicalWidth();
}
@@ -1436,7 +1441,11 @@ LayoutUnit RenderBox::containingBlockLogicalHeightForContent(AvailableLogicalHei
if (hasOverrideContainingBlockLogicalHeight())
return overrideContainingBlockContentLogicalHeight();
- RenderBlock* cb = containingBlock();
+ RenderBlock* cb;
+ if (isColumnSpanAll())
+ cb = flowThreadContainingBlock()->containingBlock();
+ else
+ cb = containingBlock();
return cb->availableLogicalHeight(heightType);
}
@@ -4121,7 +4130,11 @@ bool RenderBox::hasUnsplittableScrollingOverflow() const
bool RenderBox::isUnsplittableForPagination() const
{
- return isReplaced() || hasUnsplittableScrollingOverflow() || (parent() && isWritingModeRoot());
+ // FIXME: column spanners are only unsplittable (or rather: they do not participate in
Julien - ping for review 2014/11/17 23:47:11 It's unclear what action needs to be taken to clos
mstensho (USE GERRIT) 2014/11/18 13:29:26 Done. I just removed the column spanner condition
+ // fragmentation) in their nearest ancestor multicol container. If there are additional
+ // fragmentation contexts further up in the tree, spanners still need to take those into
+ // account.
+ return isReplaced() || hasUnsplittableScrollingOverflow() || (parent() && isWritingModeRoot()) || isColumnSpanAll();
}
LayoutUnit RenderBox::lineHeight(bool /*firstLine*/, LineDirectionMode direction, LinePositionMode /*linePositionMode*/) const

Powered by Google App Engine
This is Rietveld 408576698