Index: Source/core/layout/line/InlineBox.cpp |
diff --git a/Source/core/layout/line/InlineBox.cpp b/Source/core/layout/line/InlineBox.cpp |
index b418182aa4138fe85024765ae6b975a0f58c1cc4..02f3a37deaad2b9b33d0e4f4435043be218afff2 100644 |
--- a/Source/core/layout/line/InlineBox.cpp |
+++ b/Source/core/layout/line/InlineBox.cpp |
@@ -20,6 +20,8 @@ |
#include "config.h" |
#include "core/layout/line/InlineBox.h" |
+#include "core/layout/HitTestLocation.h" |
+#include "core/layout/HitTestResult.h" |
#include "core/layout/LayoutBlockFlow.h" |
#include "core/layout/LayoutObject.h" |
#include "core/layout/PaintInfo.h" |
@@ -208,6 +210,15 @@ bool InlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result |
if (parent()->renderer().hasFlippedBlocksWritingMode()) // Faster than calling containingBlock(). |
childPoint = renderer().containingBlock()->flipForWritingModeForChild(&toLayoutBox(renderer()), childPoint); |
+ if (renderer().style()->hasBorderRadius()) { |
+ LayoutRect borderRect = logicalFrameRect(); |
+ LayoutPoint adjustedLocation(accumulatedOffset); |
+ borderRect.moveBy(adjustedLocation); |
+ FloatRoundedRect border = renderer().style()->getRoundedBorderFor(borderRect); |
+ if (!locationInContainer.intersects(border)) |
+ return false; |
+ } |
+ |
return renderer().hitTest(request, result, locationInContainer, childPoint); |
} |