Add support for showing the platform data interaction caret
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Mar 2017 23:21:38 +0000 (23:21 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Mar 2017 23:21:38 +0000 (23:21 +0000)
commit6cb69673970ddfa59d4c313043ffba5d02e341e2
tree8475c0abccf2aef60df128c166f2dd208a329451
parent5a063a22c2c22dba966e664b2563aab8dc273bfb
Add support for showing the platform data interaction caret
https://bugs.webkit.org/show_bug.cgi?id=169898
<rdar://problem/31146295>

Reviewed by Beth Dakin.

Source/WebKit/mac:

Plumb the dataInteractionCaretRect through WebView SPI to WebKit1 clients.

* WebView/WebView.mm:
(-[WebView _dataInteractionCaretRect]):
* WebView/WebViewPrivate.h:

Source/WebKit2:

Add support for showing the caret rect when data interacting over an editable target. To do this, we add
boilerplate plumbing to inform the WKContentView whenever the WebPageProxy's current caret rect changes.

* Platform/spi/ios/UIKitSPI.h:

Define IPI to retrieve the default insertion caret color.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::dragEnded):
(WebKit::WebPageProxy::didEndDragging):
(WebKit::WebPageProxy::resetCurrentDragInformation):
(WebKit::WebPageProxy::setDragCaretRect):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didChangeDataInteractionCaretRect):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
(-[WKContentView insertionPointColor]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::dragEnded):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/mac/WebView/WebViewPrivate.h
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/spi/ios/UIKitSPI.h
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/ios/PageClientImplIOS.h
Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp