| Index: Source/core/layout/line/LineBoxList.cpp
|
| diff --git a/Source/core/layout/line/LineBoxList.cpp b/Source/core/layout/line/LineBoxList.cpp
|
| index 4f391d5a96c5bec31fc48c130183cf14b4e0896a..e293a2d9d7890e1eccff47dcad2abebd975c2b47 100644
|
| --- a/Source/core/layout/line/LineBoxList.cpp
|
| +++ b/Source/core/layout/line/LineBoxList.cpp
|
| @@ -209,8 +209,17 @@ bool LineBoxList::hitTest(LayoutBoxModelObject* layoutObject, HitTestResult& res
|
| IntRect(point.x(), point.y() - locationInContainer.topPadding(), 1, locationInContainer.topPadding() + locationInContainer.bottomPadding() + 1) :
|
| IntRect(point.x() - locationInContainer.leftPadding(), point.y(), locationInContainer.rightPadding() + locationInContainer.leftPadding() + 1, 1));
|
|
|
| - if (!anyLineIntersectsRect(layoutObject, rect, accumulatedOffset))
|
| + if (!anyLineIntersectsRect(layoutObject, rect, accumulatedOffset)) {
|
| + InlineFlowBox* first = firstLineBox();
|
| + RootInlineBox& firstRoot = first->root();
|
| + InlineFlowBox* last = lastLineBox();
|
| + RootInlineBox& lastRoot = last->root();
|
| +
|
| + result.shrinkValidityRect(first->visualOverflowRect(firstRoot.lineTop(), firstRoot.lineBottom()));
|
| + if (first != last)
|
| + result.shrinkValidityRect(last->visualOverflowRect(lastRoot.lineTop(), lastRoot.lineBottom()));
|
| return false;
|
| + }
|
|
|
| // See if our root lines contain the point. If so, then we hit test
|
| // them further. Note that boxes can easily overlap, so we can't make any assumptions
|
| @@ -220,9 +229,11 @@ bool LineBoxList::hitTest(LayoutBoxModelObject* layoutObject, HitTestResult& res
|
| if (rangeIntersectsRect(layoutObject, curr->logicalTopVisualOverflow(root.lineTop()), curr->logicalBottomVisualOverflow(root.lineBottom()), rect, accumulatedOffset)) {
|
| bool inside = curr->nodeAtPoint(result, locationInContainer, accumulatedOffset, root.lineTop(), root.lineBottom());
|
| if (inside) {
|
| - layoutObject->updateHitTestResult(result, locationInContainer.point() - toLayoutSize(accumulatedOffset));
|
| + layoutObject->updateHitTestResult(result, locationInContainer.point() - toLayoutSize(accumulatedOffset), curr->visualOverflowRect(root.lineTop(), root.lineBottom()));
|
| return true;
|
| }
|
| + } else {
|
| + result.shrinkValidityRect(curr->visualOverflowRect(root.lineTop(), root.lineBottom()));
|
| }
|
| }
|
|
|
|
|