| Index: Source/core/layout/line/InlineFlowBox.cpp
|
| diff --git a/Source/core/layout/line/InlineFlowBox.cpp b/Source/core/layout/line/InlineFlowBox.cpp
|
| index f81ae36630fef868145a7073fa9c1be0f8911085..0ecf2ea9f78baca86e67855bdc86d1c6b8079aea 100644
|
| --- a/Source/core/layout/line/InlineFlowBox.cpp
|
| +++ b/Source/core/layout/line/InlineFlowBox.cpp
|
| @@ -975,8 +975,10 @@ bool InlineFlowBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& lo
|
| LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom));
|
| flipForWritingMode(overflowRect);
|
| overflowRect.moveBy(accumulatedOffset);
|
| - if (!locationInContainer.intersects(overflowRect))
|
| + if (!locationInContainer.intersects(overflowRect)) {
|
| + result.shrinkValidityRect(overflowRect);
|
| return false;
|
| + }
|
|
|
| // We need to hit test both our inline children (InlineBoxes) and culled inlines
|
| // (LayoutObjects). We check our inlines in the same order as line layout but
|
| @@ -992,7 +994,8 @@ bool InlineFlowBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& lo
|
| continue;
|
|
|
| if (curr->nodeAtPoint(result, locationInContainer, accumulatedOffset, lineTop, lineBottom)) {
|
| - layoutObject().updateHitTestResult(result, locationInContainer.point() - toLayoutSize(accumulatedOffset));
|
| + // TODO(dtapuska): Calculate pos based on lineTop/lineBottom
|
| + layoutObject().updateHitTestResult(result, locationInContainer.point() - toLayoutSize(accumulatedOffset), result.validityRect());
|
| return true;
|
| }
|
|
|
| @@ -1019,8 +1022,10 @@ bool InlineFlowBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& lo
|
| LayoutRect borderRect = logicalFrameRect();
|
| borderRect.moveBy(accumulatedOffset);
|
| FloatRoundedRect border = layoutObject().style()->getRoundedBorderFor(borderRect, includeLogicalLeftEdge(), includeLogicalRightEdge());
|
| - if (!locationInContainer.intersects(border))
|
| + if (!locationInContainer.intersects(border)) {
|
| + result.shrinkValidityRect(borderRect);
|
| return false;
|
| + }
|
| }
|
|
|
| // Now check ourselves. Pixel snap hit testing.
|
| @@ -1047,10 +1052,11 @@ bool InlineFlowBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& lo
|
| rect.moveBy(accumulatedOffset);
|
|
|
| if (visibleToHitTestRequest(result.hitTestRequest()) && locationInContainer.intersects(rect)) {
|
| - layoutObject().updateHitTestResult(result, flipForWritingMode(locationInContainer.point() - toLayoutSize(accumulatedOffset))); // Don't add in m_x or m_y here, we want coords in the containing block's space.
|
| + layoutObject().updateHitTestResult(result, flipForWritingMode(locationInContainer.point() - toLayoutSize(accumulatedOffset)), rect); // Don't add in m_x or m_y here, we want coords in the containing block's space.
|
| if (!result.addNodeToListBasedTestResult(layoutObject().node(), locationInContainer, rect))
|
| return true;
|
| }
|
| + result.shrinkValidityRect(rect);
|
|
|
| return false;
|
| }
|
|
|