Chromium Code Reviews| Index: Source/core/rendering/RenderBox.cpp |
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
| index 756e3c00c2177f83efa9b99d618d940c759a822d..e7865ea928c6bdbec05224544226509259efa19c 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) |
| @@ -1486,7 +1492,11 @@ LayoutUnit RenderBox::containingBlockLogicalWidthForContent() const |
| if (hasOverrideContainingBlockLogicalWidth()) |
| return overrideContainingBlockContentLogicalWidth(); |
| - RenderBlock* cb = containingBlock(); |
| + RenderBlock* cb; |
| + if (isColumnSpanAll()) |
| + cb = flowThreadContainingBlock()->containingBlock(); |
|
Julien - ping for review
2014/09/30 00:39:32
It seems like we should be updating containgBlock(
mstensho (USE GERRIT)
2014/09/30 20:20:28
Yeah, I've been thinking about this, and it's cert
|
| + else |
| + cb = containingBlock(); |
| return cb->availableLogicalWidth(); |
| } |
| @@ -1495,7 +1505,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); |
| } |
| @@ -2117,7 +2131,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; |
| @@ -4185,7 +4199,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 |