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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2787203002: Fix GraphicsLayerUpdater::UpdateContext::compositingContainer() for corner cases (Closed)
Patch Set: Fix Created 3 years, 9 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
Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 8934d817ae5842737cc219258a1933eb78162190..4e536688394b1b4dc167976972c0f4081097a937 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -877,22 +877,6 @@ PaintLayer* PaintLayer::containingLayer(const PaintLayer* ancestor,
*skippedAncestor = false;
LayoutObject& layoutObject = this->layoutObject();
- // Column span need to find the containing layer through its containing block.
- // TODO(wangxianzhu): This can be combined with the loop handing possible
- // floating objects.
- if (layoutObject.isColumnSpanAll()) {
- Optional<LayoutObject::AncestorSkipInfo> skipInfo;
- if (skippedAncestor)
- skipInfo.emplace(&ancestor->layoutObject());
- if (auto containingBlock = layoutObject.containingBlock(
- skippedAncestor ? &*skipInfo : nullptr)) {
- if (skippedAncestor && skipInfo->ancestorSkipped())
- *skippedAncestor = true;
- return containingBlock->enclosingLayer();
- }
- return nullptr;
- }
-
if (layoutObject.isOutOfFlowPositioned()) {
auto canContainThisLayer =
layoutObject.isFixedPositioned()
@@ -912,7 +896,9 @@ PaintLayer* PaintLayer::containingLayer(const PaintLayer* ancestor,
// between this layer (included) and parent layer which need to escape the
// inline parent to find the actual containing layer through the containing
// block chain.
- if (!parent() || parent()->layoutObject().isLayoutBlock())
+ // Column span need to find the containing layer through its containing block.
+ if ((!parent() || parent()->layoutObject().isLayoutBlock()) &&
+ !layoutObject.isColumnSpanAll())
return parent();
// This is a universal approach to find containing layer, but is slower than

Powered by Google App Engine
This is Rietveld 408576698