Add Reveal support in iOSMac
authormegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2019 01:19:19 +0000 (01:19 +0000)
committermegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2019 01:19:19 +0000 (01:19 +0000)
commitf801326702540ffbc531d235911973f35ab488e3
treee69709e6ba64e399351cbdaa0fbe1bed26f05c7b
parent32aaa24b022e68dbcb8d876e31bc853da44dee66
Add Reveal support in iOSMac
https://bugs.webkit.org/show_bug.cgi?id=193408
<rdar://problem/47300699>

Reviewed by Tim Horton.

Source/WebCore:

iOSMac and Reveal are currently not testable.

Add support for the reveal SPI specifically for iOSMac.
Show the controller when called, and implement the delegate to
correctly re-paint the content with the auto-generated highlight from
the reveal framework.

* Configurations/WebCore.xcconfig:
* editing/cocoa/DictionaryLookup.mm:
(-[WebRevealHighlight initWithHighlightRect:view:]):
(-[WebRevealHighlight setImage:]):
(-[WebRevealHighlight highlightRectsForItem:]):
(-[WebRevealHighlight startHighlightingItem:]):
(-[WebRevealHighlight highlightItem:withProgress:]):
(-[WebRevealHighlight completeHighlightingItem:]):
(-[WebRevealHighlight stopHighlightingItem:]):
(-[WebRevealHighlight highlightRangeChangedForItem:]):
(-[WebRevealHighlight highlighting]):
(-[WebRevealHighlight drawHighlightContentForItem:context:]):
(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::showPopup):
* editing/mac/DictionaryLookup.h:

Source/WebCore/PAL:

Add additional needed SPI.

* pal/spi/cocoa/RevealSPI.h:

Source/WebKit:

Add calls to DictionaryLookup from the appropriate places.

* UIProcess/PageClient.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didPerformDictionaryLookup):
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::dictionaryPopupInfoForRange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/cocoa/RevealSPI.h
Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h
Source/WebCore/editing/cocoa/DictionaryLookup.mm
Source/WebCore/editing/mac/DictionaryLookup.h
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/PageClient.h
Source/WebKit/UIProcess/ios/PageClientImplIOS.h
Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm