Clicking on a data detected item inside a form control always pops up a map 
on force touch trackpad
https://bugs.webkit.org/show_bug.cgi?id=149559
-and corresponding-
rdar://problem/22826796

Reviewed by Tim Horton.

Source/WebCore:

The real bug here appears to be a bug in Lookup, but we can work around it. 
For normal text, we call directly into Data Detectors for map results, and 
that works fine. For text within form controls, we did not properly extract 
the text for DD, so we sent it to Lookup instead, and Lookup has this bug 
where they will pop open the map right away. If we properly extract the text 
for form controls, then we can work around this bug.

* editing/mac/DataDetection.mm:
(WebCore::detectItemAtPositionWithRange):
(WebCore::DataDetection::detectItemAroundHitTestResult):

Source/WebKit2:

Look for Data Detected text for text nodes and HitTestResults that are over 
text inside form controls.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performImmediateActionHitTestAtLocation):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@190252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4 files changed