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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.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
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 334916a09283fb9f982d214bca0a83f75c2e9990..e3f390493df29546797e508ae55086d3987ec451 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2082,10 +2082,11 @@ bool PaintLayer::hitTestClippedOutByClipPath(PaintLayer* rootLayer, const HitTes
DCHECK(isSelfPaintingLayer());
DCHECK(rootLayer);
- LayoutPoint offsetToRootLayer;
- convertToLayerCoords(rootLayer, offsetToRootLayer);
LayoutRect referenceBox(boxForClipPath());
- referenceBox.moveBy(offsetToRootLayer);
+ if (enclosingPaginationLayer())
+ convertFromFlowThreadToVisualBoundingBoxInAncestor(rootLayer, referenceBox);
+ else
+ convertToLayerCoords(rootLayer, referenceBox);
FloatPoint point(hitTestLocation.point());
@@ -2106,7 +2107,7 @@ bool PaintLayer::hitTestClippedOutByClipPath(PaintLayer* rootLayer, const HitTes
// the coordinate system is the top-left of the reference box, so adjust
// the point accordingly.
if (clipper->clipPathUnits() == SVGUnitTypes::kSvgUnitTypeUserspaceonuse)
- point.moveBy(-offsetToRootLayer);
+ point.moveBy(-referenceBox.location());
return !clipper->hitTestClipContent(FloatRect(referenceBox), point);
}

Powered by Google App Engine
This is Rietveld 408576698