Move Lookup Code for better cross platform usage
authormegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2018 18:54:19 +0000 (18:54 +0000)
committermegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2018 18:54:19 +0000 (18:54 +0000)
commit6ad721174940a4062b3e4860b3b17117b0b82b0c
treec2e58311aeffbf58bf05c19131372262912f9d47
parent4d4c132df9cf2a485b3ff0664f2add1f8323def2
Move Lookup Code for better cross platform usage
https://bugs.webkit.org/show_bug.cgi?id=191732

Reviewed by Alex Christensen.

Source/WebCore:

Not currenlty testable

DictionaryLookup uses Reveal now, which is slated to be cross-platform.
That patch gates the parts of DictionaryLookup that currently do not have
an available implementation on iOS. Once Reveal is ready, this code will be
replaced or expanded upon, as appropriate.

* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::showPopup):
(WebCore::DictionaryLookup::hidePopup):
(WebCore::DictionaryLookup::animationControllerForPopup):

Source/WebCore/PAL:

* pal/spi/mac/LookupSPI.h:
* pal/spi/mac/RevealSPI.h:

Source/WebKit:

Lookup is being replaced by Reveal. This framework should work on all platforms.
The patch moves the code that we expect will be needed for all platforms to the more
general cocoa area. This patch changes no funcationality, and should not change
anything currently. This work will be build on later when Reveal is ready to support
multiple platforms.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation):
(WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _lookupGestureRecognized:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection): Deleted.
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
(WebKit::WebPage::performDictionaryLookupForRange):
(WebKit::WebPage::dictionaryPopupInfoForRange):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
(WebKit::WebPage::performDictionaryLookupForRange): Deleted.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation): Deleted.
(WebKit::WebPage::performDictionaryLookupForSelection): Deleted.
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection): Deleted.
(WebKit::WebPage::dictionaryPopupInfoForRange): Deleted.
(WebKit::WebPage::performDictionaryLookupForRange): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
Source/WebCore/PAL/pal/spi/cocoa/RevealSPI.h [moved from Source/WebCore/PAL/pal/spi/mac/RevealSPI.h with 76% similarity]
Source/WebCore/PAL/pal/spi/mac/LookupSPI.h
Source/WebCore/SourcesCocoa.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/editing/cocoa/DictionaryLookup.mm [moved from Source/WebCore/editing/mac/DictionaryLookup.mm with 90% similarity]
Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm
Source/WebCore/editing/mac/DictionaryLookup.h
Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/UIKitSPI.h
Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm