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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 1955073002: LayoutObject::paintingLayer() to correctly handle column-span:all (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index f9c613c511a1d71c54ad4f14d7160c8104822cc8..9144760cc08f88f976199724a3fe5f87d5f1e747 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -615,7 +615,7 @@ PaintLayer* LayoutObject::findNextLayer(PaintLayer* parentLayer, LayoutObject* s
PaintLayer* LayoutObject::enclosingLayer() const
{
- for (const LayoutObject* current = this; current; current = current->parent()) {
+ for (const LayoutObject* current = this; current; current = current->isColumnSpanAll() ? current->spannerPlaceholder() : current->parent()) {
if (current->hasLayer())
return toLayoutBoxModelObject(current)->layer();
}
@@ -1245,17 +1245,7 @@ void LayoutObject::invalidateDisplayItemClient(const DisplayItemClient& displayI
#if ENABLE(ASSERT)
static void assertEnclosingSelfPaintingLayerHasSetNeedsRepaint(const LayoutObject& layoutObject)
{
- PaintLayer* enclosingSelfPaintingLayer = nullptr;
- const LayoutObject* curr = &layoutObject;
- while (curr) {
- if (curr->hasLayer() && toLayoutBoxModelObject(curr)->hasSelfPaintingLayer()) {
- enclosingSelfPaintingLayer = toLayoutBoxModelObject(curr)->layer();
- break;
- }
- // Multi-column spanner is painted by the layer of the multi-column container instead of
- // its enclosing layer (the layer of the multi-column flow thread).
- curr = curr->isColumnSpanAll() ? curr->containingBlock() : curr->parent();
- }
+ PaintLayer* enclosingSelfPaintingLayer = layoutObject.enclosingLayer() ? layoutObject.enclosingLayer()->enclosingSelfPaintingLayer() : nullptr;
ASSERT(!enclosingSelfPaintingLayer || enclosingSelfPaintingLayer->needsRepaint());
}
#endif

Powered by Google App Engine
This is Rietveld 408576698