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

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: Patch for landing 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 1a072b6271391cb9f8b693cfadb928454ad1a5bf..de1d1aaa21c1fd29b1b6fdaca9258b16e03bb40c 100644
--- a/Source/core/layout/line/InlineFlowBox.cpp
+++ b/Source/core/layout/line/InlineFlowBox.cpp
@@ -1012,6 +1012,14 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
culledParent = culledParent->parent();
}
+ if (layoutObject().style()->hasBorderRadius()) {
+ LayoutRect borderRect = logicalFrameRect();
+ borderRect.moveBy(accumulatedOffset);
+ FloatRoundedRect border = layoutObject().style()->getRoundedBorderFor(borderRect, includeLogicalLeftEdge(), includeLogicalRightEdge());
+ if (!locationInContainer.intersects(border))
+ return false;
+ }
+
// Now check ourselves. Pixel snap hit testing.
LayoutRect frameRect(roundedFrameRect());
LayoutUnit minX = frameRect.x();

Powered by Google App Engine
This is Rietveld 408576698