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

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: code review. Kill the fast path that almost nobody treads. 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..a7b780e80a783c8f0b4e73aafb666f3e70891dbb 100644
--- a/Source/core/paint/DeprecatedPaintLayer.cpp
+++ b/Source/core/paint/DeprecatedPaintLayer.cpp
@@ -476,37 +476,9 @@ 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;
- }
- }
-
- // 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();
chrishtr 2015/07/14 19:57:43 Should there be code that nulls out m_enclosingPag
mstensho (USE GERRIT) 2015/07/14 20:05:31 That shouldn't be necessary, since updatePaginatio
}
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