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

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
« no previous file with comments | « LayoutTests/fast/borders/border-hittest-inlineFlowBox-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/layout/line/InlineFlowBox.cpp
diff --git a/Source/core/layout/line/InlineFlowBox.cpp b/Source/core/layout/line/InlineFlowBox.cpp
index 7b7e327557bc7a448cc40f8e2f65a039fa650e31..855435def38ef470e5c7da7c0ad49a95e51bc5bc 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();
« no previous file with comments | « LayoutTests/fast/borders/border-hittest-inlineFlowBox-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698