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

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

Issue 249133002: hitTest should take care if the location is inside rounded border if border-radius is specified (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index fbcc31eb3c1ddbed2c55e49fdf3f75103d6adc04..00db592272f0d6224120b775499de735633d9833 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -2882,7 +2882,8 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
// If we have clipping, then we can't have any spillout.
bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer();
bool useClip = (hasControlClip() || useOverflowClip);
- bool checkChildren = !useClip || (hasControlClip() ? locationInContainer.intersects(controlClipRect(adjustedLocation)) : locationInContainer.intersects(overflowClipRect(adjustedLocation, IncludeOverlayScrollbarSize)));
+ LayoutRect clipRect = overflowClipRect(adjustedLocation, IncludeOverlayScrollbarSize);
+ bool checkChildren = !useClip || (hasControlClip() ? locationInContainer.intersects(controlClipRect(adjustedLocation)) : (!isRenderView() && style()->hasBorderRadius() ? locationInContainer.intersects(style()->getRoundedBorderFor(clipRect)) : locationInContainer.intersects(clipRect)));
ojan 2014/04/30 18:37:47 Why the !isRenderView check? I see that the code b
pals 2014/05/06 06:33:41 Done. I have removed the !isRenderView() checks. T
ojan 2014/05/07 03:11:03 Can you look at the history for why this check was
pals 2014/05/07 06:31:53 The check was first added at http://trac.webkit.or
if (checkChildren) {
// Hit test descendants first.
LayoutSize scrolledOffset(localOffset);

Powered by Google App Engine
This is Rietveld 408576698