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

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: 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 c54063a419d1dd7696bc27caf6e66a2f34bb4f68..fb04f00fb7eda09f5d235ec6bf7698e9f6c6b2cb 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2076,10 +2076,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());
@@ -2100,7 +2101,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