Chromium Code Reviews| Index: Source/core/paint/DeprecatedPaintLayer.cpp |
| diff --git a/Source/core/paint/DeprecatedPaintLayer.cpp b/Source/core/paint/DeprecatedPaintLayer.cpp |
| index 8167ca351f47d5c7b89ad8c07e566e66749ae215..ace277e51b2c0c2cd58f39e821bd18650987fc31 100644 |
| --- a/Source/core/paint/DeprecatedPaintLayer.cpp |
| +++ b/Source/core/paint/DeprecatedPaintLayer.cpp |
| @@ -476,37 +476,17 @@ void DeprecatedPaintLayer::updatePagination() |
| return; |
| } |
| - if (!m_stackingNode->isTreatedAsStackingContextForPainting()) { |
| - // We cannot take the fast path for spanners, as they do not have their nearest ancestor |
| - // pagination layer (flow thread) in their containing block chain. |
| - if (!layoutObject()->isColumnSpanAll()) { |
| - // Content inside a transform is not considered to be paginated, since we simply |
| - // paint the transform multiple times in each column, so we don't have to use |
| - // fragments for the transformed content. |
| - m_enclosingPaginationLayer = parent()->enclosingPaginationLayer(); |
| - if (m_enclosingPaginationLayer && m_enclosingPaginationLayer->hasTransformRelatedProperty()) |
| - m_enclosingPaginationLayer = 0; |
| - return; |
| - } |
| + // Unless we're a spanner or establish a stacking context, we can take the fast path: Just use |
| + // the same pagination layer as our parent. Spanners cannot do this, because they don't have |
| + // that pagination layer in their containing block chain. |
| + if (!m_stackingNode->isTreatedAsStackingContextForPainting() && !layoutObject()->isColumnSpanAll()) { |
|
chrishtr
2015/07/14 18:54:01
Is this fast path needed for correctness?
Also, y
mstensho (USE GERRIT)
2015/07/14 19:13:39
No, I don't think so. I really hope not. :) I real
chrishtr
2015/07/14 19:46:44
Let's kill it.
mstensho (USE GERRIT)
2015/07/14 19:52:34
Done.
|
| + m_enclosingPaginationLayer = parent()->enclosingPaginationLayer(); |
| + return; |
| } |
| - // Walk up our containing block chain looking for an enclosing layer. Once we find one, then we |
| - // just check its pagination status. |
| - LayoutView* view = layoutObject()->view(); |
| - LayoutBlock* containingBlock; |
| - for (containingBlock = layoutObject()->containingBlock(); |
| - containingBlock && containingBlock != view; |
| - containingBlock = containingBlock->containingBlock()) { |
| - if (containingBlock->hasLayer()) { |
| - // Content inside a transform is not considered to be paginated, since we simply |
| - // paint the transform multiple times in each column, so we don't have to use |
| - // fragments for the transformed content. |
| - m_enclosingPaginationLayer = containingBlock->layer()->enclosingPaginationLayer(); |
| - if (m_enclosingPaginationLayer && m_enclosingPaginationLayer->hasTransformRelatedProperty()) |
| - m_enclosingPaginationLayer = 0; |
| - return; |
| - } |
| - } |
| + // Use the layout tree to find our enclosing pagination layer. |
| + if (LayoutFlowThread* containingFlowThread = layoutObject()->flowThreadContainingBlock()) |
| + m_enclosingPaginationLayer = containingFlowThread->layer(); |
| } |
| void DeprecatedPaintLayer::clearPaginationRecursive() |