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

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

Issue 2388723004: [SPInvalidation] Fix PrePaintTreeWalk for multicol spanner (Closed)
Patch Set: Positioned descendants of spanner; Unit test Created 4 years, 2 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/PrePaintTreeWalk.cpp
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
index 582e8cb0846d910ff4a08ea66cfdc6869475143f..117b0ecfea6a15dbc95ba4f184743333ab9ebab3 100644
--- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
+++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
@@ -56,6 +56,17 @@ void PrePaintTreeWalk::walk(const LayoutObject& object,
const PrePaintTreeWalkContext& context) {
PrePaintTreeWalkContext localContext(context);
+ if (object.isLayoutMultiColumnSpannerPlaceholder()) {
+ // Multi-column spanner should be walked for normal flow descendants from
+ // the placeholder. Set the flag so that the tree builder can specially
+ // handle the out-of-flow positioned descendants.
+ localContext.treeBuilderContext.isUnderMultiColumnSpanner = true;
mstensho (USE GERRIT) 2016/10/05 08:44:09 <div style="columns:3;"> <div id="rel" style="po
Xianzhu 2016/10/05 17:29:40 Yes. Updated comments here and PaintPropertyTreeBu
+ walk(*toLayoutMultiColumnSpannerPlaceholder(object)
+ .layoutObjectInFlowThread(),
+ localContext);
+ return;
+ }
+
m_propertyTreeBuilder.buildTreeNodesForSelf(object,
localContext.treeBuilderContext);
if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled())
@@ -66,17 +77,12 @@ void PrePaintTreeWalk::walk(const LayoutObject& object,
for (const LayoutObject* child = object.slowFirstChild(); child;
child = child->nextSibling()) {
- // Column spanners are walked through their placeholders. See below.
+ // Column spanners are walked through their placeholders. See above.
if (child->isColumnSpanAll())
continue;
walk(*child, localContext);
}
- if (object.isLayoutMultiColumnSpannerPlaceholder())
- walk(*toLayoutMultiColumnSpannerPlaceholder(object)
- .layoutObjectInFlowThread(),
- localContext);
-
if (object.isLayoutPart()) {
const LayoutPart& layoutPart = toLayoutPart(object);
Widget* widget = layoutPart.widget();

Powered by Google App Engine
This is Rietveld 408576698