Chromium Code Reviews| Index: Source/core/rendering/RenderBlock.cpp |
| diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp |
| index 214547c748476c0822eee7db37752ae2794aaab8..63581e45ad2ae30dfdf22b03cb335f4f89611776 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,10 +3420,14 @@ 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); |
| + if (style()->isOverflowPaged()) { |
| + info->setProgressionAxis((style()->overflowY() == OPAGEDX) == style()->isHorizontalWritingMode() ? ColumnInfo::InlineAxis : ColumnInfo::BlockAxis); |
|
rune
2014/02/07 16:44:27
I find this hard to read. Would it be better with
mstensho (USE GERRIT)
2014/02/11 10:44:14
Done.
|
| + } else { |
| + info->setDesiredColumnCount(count); |
| + info->setProgressionAxis(style()->hasInlineColumnAxis() ? ColumnInfo::InlineAxis : ColumnInfo::BlockAxis); |
| + info->setProgressionIsReversed(style()->columnProgression() == ReverseColumnProgression); |
| + } |
| } |
| } |