| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index 10c51ad5b3da4bc4703b8974fcd4f7bcdc8695c5..57a5e7879b0c9e65abe080ddc2617191a864f119 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -1361,7 +1361,7 @@ PassRefPtrWillBeRawPtr<StaticNodeList> Internals::nodesFromRect(Document* docume
|
| float zoomFactor = frame->pageZoomFactor();
|
| LayoutPoint point = roundedLayoutPoint(FloatPoint(centerX * zoomFactor + frameView->scrollX(), centerY * zoomFactor + frameView->scrollY()));
|
|
|
| - HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;
|
| + HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::ListBased;
|
| if (ignoreClipping)
|
| hitType |= HitTestRequest::IgnoreClipping;
|
| if (allowChildFrameContent)
|
| @@ -1374,23 +1374,9 @@ PassRefPtrWillBeRawPtr<StaticNodeList> Internals::nodesFromRect(Document* docume
|
| return nullptr;
|
|
|
| WillBeHeapVector<RefPtrWillBeMember<Node> > matches;
|
| -
|
| - // Need padding to trigger a rect based hit test, but we want to return a NodeList
|
| - // so we special case this.
|
| - if (!topPadding && !rightPadding && !bottomPadding && !leftPadding) {
|
| - HitTestResult result(point);
|
| - renderView->hitTest(request, result);
|
| -
|
| - if (Node* innerNode = result.innerNode()) {
|
| - if (innerNode->isInShadowTree())
|
| - innerNode = innerNode->shadowHost();
|
| - matches.append(innerNode);
|
| - }
|
| - } else {
|
| - HitTestResult result(point, topPadding, rightPadding, bottomPadding, leftPadding);
|
| - renderView->hitTest(request, result);
|
| - copyToVector(result.rectBasedTestResult(), matches);
|
| - }
|
| + HitTestResult result(point, topPadding, rightPadding, bottomPadding, leftPadding);
|
| + renderView->hitTest(request, result);
|
| + copyToVector(result.listBasedTestResult(), matches);
|
|
|
| return StaticNodeList::adopt(matches);
|
| }
|
|
|