Preview on apple.com/contact with all text selected shows a map
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Nov 2015 00:38:32 +0000 (00:38 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Nov 2015 00:38:32 +0000 (00:38 +0000)
commitb194fc151c2bccdac0463bc6d205429741ee2b19
tree481942fbe7fdb9be5e4888df00b2367f9965d979
parentb4ec5de6cdd1f3bd80b6359617ad8a9594f38b0c
Preview on apple.com/contact with all text selected shows a map
https://bugs.webkit.org/show_bug.cgi?id=150963
<rdar://problem/23421750>

Reviewed by Beth Dakin.

* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::DictionaryLookup::rangeForSelection):
If the range that Lookup decides to use doesn't intersect the hit point,
just ignore Lookup.

(WebCore::DictionaryLookup::rangeAtHitTestResult):
If the selection-based Lookup fails to find a usable result, fall back
to looking around the hit point.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForSelection):
In this case, we don't know where we hit, so pass a null VisiblePosition.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/mac/DictionaryLookup.h
Source/WebCore/editing/mac/DictionaryLookup.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm