Index: Source/core/testing/Internals.cpp |
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp |
index d7660f7e23f465dbdfd615f0d8232b9421c083bd..b47cf12803d256a748b4b5965cb1806555788032 100644 |
--- a/Source/core/testing/Internals.cpp |
+++ b/Source/core/testing/Internals.cpp |
@@ -980,7 +980,7 @@ DOMPoint* Internals::touchPositionAdjustedToBestClickableNode(long x, long y, lo |
EventHandler& eventHandler = document->frame()->eventHandler(); |
IntPoint hitTestPoint = document->frame()->view()->windowToContents(point); |
- HitTestResult result = eventHandler.hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active, LayoutSize(radius)); |
+ HitTestResult result = eventHandler.hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::ListBased, LayoutSize(radius)); |
Node* targetNode = 0; |
IntPoint adjustedPoint; |
@@ -1007,7 +1007,7 @@ Node* Internals::touchNodeAdjustedToBestClickableNode(long x, long y, long width |
EventHandler& eventHandler = document->frame()->eventHandler(); |
IntPoint hitTestPoint = document->frame()->view()->windowToContents(point); |
- HitTestResult result = eventHandler.hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active, LayoutSize(radius)); |
+ HitTestResult result = eventHandler.hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::ListBased, LayoutSize(radius)); |
Node* targetNode = 0; |
IntPoint adjustedPoint; |
@@ -1030,7 +1030,7 @@ DOMPoint* Internals::touchPositionAdjustedToBestContextMenuNode(long x, long y, |
EventHandler& eventHandler = document->frame()->eventHandler(); |
IntPoint hitTestPoint = document->frame()->view()->windowToContents(point); |
- HitTestResult result = eventHandler.hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active, LayoutSize(radius)); |
+ HitTestResult result = eventHandler.hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::ListBased, LayoutSize(radius)); |
Node* targetNode = 0; |
IntPoint adjustedPoint; |
@@ -1057,7 +1057,7 @@ Node* Internals::touchNodeAdjustedToBestContextMenuNode(long x, long y, long wid |
EventHandler& eventHandler = document->frame()->eventHandler(); |
IntPoint hitTestPoint = document->frame()->view()->windowToContents(point); |
- HitTestResult result = eventHandler.hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active, LayoutSize(radius)); |
+ HitTestResult result = eventHandler.hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::ListBased, LayoutSize(radius)); |
Node* targetNode = 0; |
IntPoint adjustedPoint; |
@@ -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); |
} |