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

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

Issue 2300383002: Compute better reference/visual boxes for clip-path in columns (Closed)
Patch Set: performed Created 4 years, 3 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 | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
index 7cd8c1ffc74a79b448471d79ba77b9736bc8a7ff..7f61d9b1baadc659030c4925fcd1398abedd5592 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -268,9 +268,14 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
paintingInfo.ancestorHasClipPathClipping = true;
LayoutRect referenceBox(m_paintLayer.boxForClipPath());
- referenceBox.moveBy(offsetFromRoot);
+ // Note that this isn't going to work correctly if crossing a column boundary. The reference box should be
+ // determined per-fragment, and hence this ought to be performed after fragmentation.
+ if (m_paintLayer.enclosingPaginationLayer())
+ m_paintLayer.convertFromFlowThreadToVisualBoundingBoxInAncestor(paintingInfo.rootLayer, referenceBox);
+ else
+ referenceBox.moveBy(offsetFromRoot);
clipPathClipper.emplace(
- context, *m_paintLayer.layoutObject(), FloatRect(referenceBox), FloatPoint(offsetFromRoot));
+ context, *m_paintLayer.layoutObject(), FloatRect(referenceBox), FloatPoint(referenceBox.location()));
}
Optional<CompositingRecorder> compositingRecorder;
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698