Title: [198245] trunk/Source/WebKit2
Revision
198245
Author
enr...@apple.com
Date
2016-03-15 17:02:05 -0700 (Tue, 15 Mar 2016)

Log Message

Follow up to r195769.
https://bugs.webkit.org/show_bug.cgi?id=155519
rdar://problem/25146483

Reviewed by Tim Horton.

There are two code paths that lead to calling handleSyntheticClick()
where we need to check if the default action can be performed on the
data detector link.
Only one was covered in r195769 and this patch addresses the missing one.
I've also discovered that the point reported in DidNotHandleTapAsClick was
incorrectly always (0, 0) and I've fixed it.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleTap):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (198244 => 198245)


--- trunk/Source/WebKit2/ChangeLog	2016-03-16 00:00:26 UTC (rev 198244)
+++ trunk/Source/WebKit2/ChangeLog	2016-03-16 00:02:05 UTC (rev 198245)
@@ -1,3 +1,21 @@
+2016-03-15  Enrica Casucci  <enr...@apple.com>
+
+        Follow up to r195769.
+        https://bugs.webkit.org/show_bug.cgi?id=155519
+        rdar://problem/25146483
+
+        Reviewed by Tim Horton.
+
+        There are two code paths that lead to calling handleSyntheticClick()
+        where we need to check if the default action can be performed on the
+        data detector link.
+        Only one was covered in r195769 and this patch addresses the missing one.
+        I've also discovered that the point reported in DidNotHandleTapAsClick was
+        incorrectly always (0, 0) and I've fixed it.
+
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::handleTap):
+
 2016-03-15  Ryan Haddad  <ryanhad...@apple.com>
 
         Unreviewed, rolling out r198230.

Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (198244 => 198245)


--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2016-03-16 00:00:26 UTC (rev 198244)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2016-03-16 00:02:05 UTC (rev 198245)
@@ -595,10 +595,14 @@
     FloatPoint adjustedPoint;
     Node* nodeRespondingToClick = m_page->mainFrame().nodeRespondingToClickEvents(point, adjustedPoint);
     Frame* frameRespondingToClick = nodeRespondingToClick ? nodeRespondingToClick->document().frame() : nullptr;
+    IntPoint adjustedIntPoint = roundedIntPoint(adjustedPoint);
 
     if (!frameRespondingToClick || lastLayerTreeTransactionId < WebFrame::fromCoreFrame(*frameRespondingToClick)->firstLayerTreeTransactionIDAfterDidCommitLoad())
-        send(Messages::WebPageProxy::DidNotHandleTapAsClick(roundedIntPoint(m_potentialTapLocation)));
-    else
+        send(Messages::WebPageProxy::DidNotHandleTapAsClick(adjustedIntPoint));
+    else if (is<Element>(*nodeRespondingToClick) && DataDetection::shouldCancelDefaultAction(&downcast<Element>(*nodeRespondingToClick))) {
+        requestPositionInformation(adjustedIntPoint);
+        send(Messages::WebPageProxy::DidNotHandleTapAsClick(adjustedIntPoint));
+    } else
         handleSyntheticClick(nodeRespondingToClick, adjustedPoint);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to