Chromium Code Reviews| Index: Source/core/layout/line/InlineFlowBox.cpp |
| diff --git a/Source/core/layout/line/InlineFlowBox.cpp b/Source/core/layout/line/InlineFlowBox.cpp |
| index 7429b636a4abc761a9dcf4066584f2b47fb03950..fe468b352690ebf2daad0bcef7b78ccffa532a0f 100644 |
| --- a/Source/core/layout/line/InlineFlowBox.cpp |
| +++ b/Source/core/layout/line/InlineFlowBox.cpp |
| @@ -975,6 +975,27 @@ 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, includeLogicalLeftEdge(), includeLogicalRightEdge()); |
| + if (!locationInContainer.intersects(border)) { |
| + // For child whose bounding box is flowing ouside it's parent border. |
| + bool hasChildAtPoint = false; |
| + for (InlineBox* curr = lastChild(); curr; curr = curr->prevOnLine()) { |
|
davve
2015/03/27 12:40:20
Instead of having a loop here and a preliminary hi
Abhijeet Kandalkar Slow
2015/03/27 13:08:26
Done.
|
| + LayoutRect absoluteRect = curr->logicalFrameRect(); |
| + absoluteRect.moveBy(accumulatedOffset); |
| + if (locationInContainer.intersects(absoluteRect)) { |
| + hasChildAtPoint = true; |
| + break; |
| + } |
| + } |
| + |
| + if (!hasChildAtPoint) |
| + 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; |