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

Unified Diff: Source/core/paint/DeprecatedPaintLayer.cpp

Issue 1235133004: Use LayoutObject to locate the flow thread. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | « LayoutTests/fast/multicol/dynamic/multicol-with-abspos-svg-with-foreignobject-with-multicol-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « LayoutTests/fast/multicol/dynamic/multicol-with-abspos-svg-with-foreignobject-with-multicol-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698