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

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 240423005: [CSS Shapes] Can't select content within the area of the floating box when clip-path is applied (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Try to make test more stable Created 6 years, 8 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 | « LayoutTests/fast/shapes/shape-outside-floats/shape-outside-clip-path-selection-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index a3bffe2dace36061bf39b6c6254bf378e489526e..3f2548d2d89a3e53fc4a1a0e19bf127f2ad48302 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -2766,6 +2766,21 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
return true;
}
+ if (style()->clipPath()) {
+ switch (style()->clipPath()->type()) {
+ case ClipPathOperation::SHAPE: {
+ ShapeClipPathOperation* clipPath = toShapeClipPathOperation(style()->clipPath());
+ // FIXME: handle marginBox etc.
+ if (!clipPath->path(borderBoxRect()).contains(locationInContainer.point() - localOffset, clipPath->windRule()))
+ return false;
+ break;
+ }
+ case ClipPathOperation::REFERENCE:
+ // FIXME: handle REFERENCE
+ break;
+ }
+ }
+
// If we have clipping, then we can't have any spillout.
bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer();
bool useClip = (hasControlClip() || useOverflowClip);
« no previous file with comments | « LayoutTests/fast/shapes/shape-outside-floats/shape-outside-clip-path-selection-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698