Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index 3edee5b2c31858dee888e5985057244d9036c81d..ef41454e561b70c33b3d5664585f2c4dbd467e32 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -4066,6 +4066,27 @@ HitTestResult WebViewImpl::hitTestResultForWindowPos(const IntPoint& pos) |
return result; |
} |
+WebHitTestResult WebViewImpl::hitTestResultForTap(const WebPoint& tapPointWindowPos, const WebSize& tapArea) |
+{ |
+ if (!m_page->mainFrame()->isLocalFrame()) |
+ return HitTestResult(); |
+ |
+ WebGestureEvent tapEvent; |
+ tapEvent.x = tapPointWindowPos.x; |
+ tapEvent.y = tapPointWindowPos.y; |
+ tapEvent.type = WebInputEvent::GestureTap; |
+ tapEvent.data.tap.tapCount = 1; |
+ tapEvent.data.tap.width = tapArea.width; |
+ tapEvent.data.tap.height = tapArea.height; |
+ |
+ PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), tapEvent); |
+ |
+ HitTestResult result = m_page->deprecatedLocalMainFrame()->eventHandler().hitTestResultForGestureEvent(platformEvent, HitTestRequest::ReadOnly | HitTestRequest::Active).hitTestResult(); |
+ |
+ result.setToShadowHostIfInUserAgentShadowRoot(); |
+ return result; |
+} |
+ |
void WebViewImpl::setTabsToLinks(bool enable) |
{ |
m_tabsToLinks = enable; |