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 01:41:15 +0000 (01:41 +0000)
committermegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2018 01:41:15 +0000 (01:41 +0000)
commiteee697b8f4bfbe97b0f9edfca7a497877fa6b712
tree033981ddf29318e3ff5940927646e64cbe88523c
parentc11ef8b42a07ebeae74d55811a06d101022e27c9
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@238653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 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/ios/WebPageIOS.mm
Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm