| Index: Source/core/rendering/RenderBlock.cpp
|
| diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
|
| index 1d0beea7b1ca9faef5f50a1c2d8357da8eef8016..c5e76a9d796e090d948ec589d6f848b59f7ba822 100644
|
| --- a/Source/core/rendering/RenderBlock.cpp
|
| +++ b/Source/core/rendering/RenderBlock.cpp
|
| @@ -3391,9 +3391,9 @@ void RenderBlock::calcColumnWidth()
|
|
|
| bool RenderBlock::requiresColumns(int desiredColumnCount) const
|
| {
|
| - // If overflow-y is set to paged-x or paged-y on the body or html element, we'll handle the paginating
|
| - // in the RenderView instead.
|
| - bool isPaginated = (style()->overflowY() == OPAGEDX || style()->overflowY() == OPAGEDY) && !(isRoot() || isBody());
|
| + // Paged overflow is treated as multicol here, unless this element was the one that got its
|
| + // overflow propagated to the viewport.
|
| + bool isPaginated = style()->isOverflowPaged() && node() != document().viewportDefiningElement();
|
|
|
| return firstChild()
|
| && (desiredColumnCount != 1 || !style()->hasAutoColumnWidth() || !style()->hasInlineColumnAxis() || isPaginated)
|
| @@ -3420,37 +3420,15 @@ void RenderBlock::setDesiredColumnCountAndWidth(int count, LayoutUnit width)
|
| gColumnInfoMap->add(this, adoptPtr(info));
|
| setHasColumns(true);
|
| }
|
| - info->setDesiredColumnCount(count);
|
| info->setDesiredColumnWidth(width);
|
| - info->setProgressionAxis(style()->hasInlineColumnAxis() ? ColumnInfo::InlineAxis : ColumnInfo::BlockAxis);
|
| - info->setProgressionIsReversed(style()->columnProgression() == ReverseColumnProgression);
|
| - }
|
| -}
|
| -
|
| -void RenderBlock::updateColumnInfoFromStyle(RenderStyle* style)
|
| -{
|
| - if (!hasColumns())
|
| - return;
|
| -
|
| - ColumnInfo* info = gColumnInfoMap->get(this);
|
| -
|
| - bool needsLayout = false;
|
| - ColumnInfo::Axis oldAxis = info->progressionAxis();
|
| - ColumnInfo::Axis newAxis = style->hasInlineColumnAxis() ? ColumnInfo::InlineAxis : ColumnInfo::BlockAxis;
|
| - if (oldAxis != newAxis) {
|
| - info->setProgressionAxis(newAxis);
|
| - needsLayout = true;
|
| - }
|
| -
|
| - bool oldProgressionIsReversed = info->progressionIsReversed();
|
| - bool newProgressionIsReversed = style->columnProgression() == ReverseColumnProgression;
|
| - if (oldProgressionIsReversed != newProgressionIsReversed) {
|
| - info->setProgressionIsReversed(newProgressionIsReversed);
|
| - needsLayout = true;
|
| + if (style()->isOverflowPaged()) {
|
| + info->setProgressionAxis(style()->hasInlinePaginationAxis() ? ColumnInfo::InlineAxis : ColumnInfo::BlockAxis);
|
| + } else {
|
| + info->setDesiredColumnCount(count);
|
| + info->setProgressionAxis(style()->hasInlineColumnAxis() ? ColumnInfo::InlineAxis : ColumnInfo::BlockAxis);
|
| + info->setProgressionIsReversed(style()->columnProgression() == ReverseColumnProgression);
|
| + }
|
| }
|
| -
|
| - if (needsLayout)
|
| - setNeedsLayoutAndPrefWidthsRecalc();
|
| }
|
|
|
| LayoutUnit RenderBlock::desiredColumnWidth() const
|
|
|