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

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

Issue 584033002: [New Multicolumn] Add support for column-span:all (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix ref in test. Tables don't do subpixel, and that made a difference on Windows and Mac. Created 6 years, 2 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
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | Source/core/rendering/RenderFlowThread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 356f8d868f1f483623db8d66f6b639b43fb3d2ac..b93a4e29e2633533789d0434f1c4ea235b03ab52 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"
@@ -216,6 +217,11 @@ void RenderBox::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle
updateShapeOutsideInfoAfterStyleChange(*style(), oldStyle);
updateGridPositionAfterStyleChange(oldStyle);
+
+ if (RenderFlowThread* flowThread = flowThreadContainingBlock()) {
+ if (flowThread != this)
+ flowThread->flowThreadDescendantStyleDidChange(this);
+ }
}
void RenderBox::updateShapeOutsideInfoAfterStyleChange(const RenderStyle& style, const RenderStyle* oldStyle)
@@ -1482,7 +1488,11 @@ LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const
if (hasOverrideContainingBlockLogicalWidth())
return overrideContainingBlockContentLogicalWidth();
- RenderBlock* cb = containingBlock();
+ RenderBlock* cb;
+ if (isColumnSpanAll())
+ cb = flowThreadContainingBlock()->containingBlock();
+ else
+ cb = containingBlock();
return cb->availableLogicalWidth();
}
@@ -1491,7 +1501,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);
}
@@ -2113,7 +2127,7 @@ bool RenderBox::autoWidthShouldFitContent() const
void RenderBox::computeMarginsForDirection(MarginDirection flowDirection, const RenderBlock* containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUnit& marginStart, LayoutUnit& marginEnd, Length marginStartLength, Length marginEndLength) const
{
if (flowDirection == BlockDirection || isFloating() || isInline()) {
- if (isTableCell() && flowDirection == BlockDirection) {
+ if ((isColumnSpanAll() || isTableCell()) && flowDirection == BlockDirection) {
// FIXME: Not right if we allow cells to have different directionality than the table. If we do allow this, though,
// we may just do it with an extra anonymous block inside the cell.
marginStart = 0;
@@ -4181,7 +4195,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
+ // 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
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | Source/core/rendering/RenderFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698