| Index: Source/core/layout/LayoutBox.cpp
|
| diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
|
| index 3fe7409b4b57cf3135ad63f77991de306704d548..f5e8ffba67f4a84f2db842693c7adbf9933bfd57 100644
|
| --- a/Source/core/layout/LayoutBox.cpp
|
| +++ b/Source/core/layout/LayoutBox.cpp
|
| @@ -1129,23 +1129,24 @@ bool LayoutBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati
|
| {
|
| LayoutPoint adjustedLocation = accumulatedOffset + location();
|
|
|
| + LayoutRect boundsRect = borderBoxRect();
|
| + boundsRect.moveBy(adjustedLocation);
|
| // Check kids first.
|
| for (LayoutObject* child = slowLastChild(); child; child = child->previousSibling()) {
|
| if ((!child->hasLayer() || !toLayoutBoxModelObject(child)->layer()->isSelfPaintingLayer()) && child->nodeAtPoint(result, locationInContainer, adjustedLocation, action)) {
|
| - updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation));
|
| + updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation), boundsRect);
|
| return true;
|
| }
|
| }
|
|
|
| // Check our bounds next. For this purpose always assume that we can only be hit in the
|
| // foreground phase (which is true for replaced elements like images).
|
| - LayoutRect boundsRect = borderBoxRect();
|
| - boundsRect.moveBy(adjustedLocation);
|
| if (visibleToHitTestRequest(result.hitTestRequest()) && action == HitTestForeground && locationInContainer.intersects(boundsRect)) {
|
| - updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation));
|
| + updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation), boundsRect);
|
| if (!result.addNodeToListBasedTestResult(node(), locationInContainer, boundsRect))
|
| return true;
|
| }
|
| + result.shrinkValidityRect(boundsRect);
|
|
|
| return false;
|
| }
|
|
|