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

Unified Diff: Source/core/layout/line/InlineFlowBox.cpp

Issue 1034433003: Hittest for RootInlineBox/InlineFlowBox should take care of border-radius. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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/layout/line/InlineFlowBox.cpp
diff --git a/Source/core/layout/line/InlineFlowBox.cpp b/Source/core/layout/line/InlineFlowBox.cpp
index ba754551c4e6e195dbdd2538699d3d728440992d..228cf51f7dd03a9f3a77dc3591a87acf344c07e7 100644
--- a/Source/core/layout/line/InlineFlowBox.cpp
+++ b/Source/core/layout/line/InlineFlowBox.cpp
@@ -975,6 +975,14 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
if (!locationInContainer.intersects(overflowRect))
return false;
+ if (layoutObject().style()->hasBorderRadius()) {
+ LayoutRect borderRect = logicalFrameRect();
+ borderRect.moveBy(accumulatedOffset);
+ FloatRoundedRect border = layoutObject().style()->getRoundedBorderFor(borderRect);
davve 2015/03/24 13:26:03 I don't think this is correct since we'll have a I
Abhijeet Kandalkar Slow 2015/03/24 14:42:44 Above use case is working fine with implementation
davve 2015/03/24 15:49:14 Hm, when I apply your patch to tip-of-tree and run
Abhijeet Kandalkar Slow 2015/03/25 12:43:47 Thanks for inputs. I modified patch to match FF be
+ if (!locationInContainer.intersects(border))
+ return false;
+ }
+
// Check children first.
// We need to account for culled inline parents of the hit-tested nodes, so that they may also get included in area-based hit-tests.
LayoutObject* culledParent = 0;

Powered by Google App Engine
This is Rietveld 408576698