<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[214284] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/214284">214284</a></dd>
<dt>Author</dt> <dd>wenson_hsieh@apple.com</dd>
<dt>Date</dt> <dd>2017-03-22 16:21:38 -0700 (Wed, 22 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add support for showing the platform data interaction caret
https://bugs.webkit.org/show_bug.cgi?id=169898
&lt;rdar://problem/31146295&gt;

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):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewPrivateh">trunk/Source/WebKit/mac/WebView/WebViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformspiiosUIKitSPIh">trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSh">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSmm">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionh">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit/mac/ChangeLog        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2017-03-21  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Add support for showing the platform data interaction caret
+        https://bugs.webkit.org/show_bug.cgi?id=169898
+        &lt;rdar://problem/31146295&gt;
+
+        Reviewed by Beth Dakin.
+
+        Plumb the dataInteractionCaretRect through WebView SPI to WebKit1 clients.
+
+        * WebView/WebView.mm:
+        (-[WebView _dataInteractionCaretRect]):
+        * WebView/WebViewPrivate.h:
+
</ins><span class="cx"> 2017-03-22  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] downloadableBinaryFontsEnabled is set to false in -initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -1819,6 +1819,14 @@
</span><span class="cx">         _private-&gt;textIndicatorData = [[[WebUITextIndicatorData alloc] initWithImage:image scale:_private-&gt;page-&gt;deviceScaleFactor()] retain];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (CGRect)_dataInteractionCaretRect
+{
+    if (auto* page = _private-&gt;page)
+        return page-&gt;dragCaretController().caretPosition().absoluteCaretBounds();
+
+    return { };
+}
+
</ins><span class="cx"> - (WebUITextIndicatorData *)_dataOperationTextIndicator
</span><span class="cx"> {
</span><span class="cx">     return _private-&gt;dataOperationTextIndicator.get();
</span><span class="lines">@@ -1920,6 +1928,11 @@
</span><span class="cx"> {
</span><span class="cx">     return nil;
</span><span class="cx"> }
</span><ins>+
+- (CGRect)_dataInteractionCaretRect
+{
+    return CGRectNull;
+}
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(DATA_INTERACTION) &amp;&amp; defined(__cplusplus)
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebViewPrivate.h (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebViewPrivate.h        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit/mac/WebView/WebViewPrivate.h        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -478,6 +478,7 @@
</span><span class="cx"> - (void)_endedDataInteraction:(CGPoint)clientPosition global:(CGPoint)clientPosition;
</span><span class="cx"> 
</span><span class="cx"> #if TARGET_OS_IPHONE
</span><ins>+@property (nonatomic, readonly, getter=_dataInteractionCaretRect) CGRect dataInteractionCaretRect;
</ins><span class="cx"> - (UIImage *)_createImageWithPlatterForImage:(UIImage *)image boundingRect:(CGRect)boundingRect contentScaleFactor:(CGFloat)contentScaleFactor clippingRects:(NSArray&lt;NSValue *&gt; *)clippingRects;
</span><span class="cx"> // Deprecated. Use -[WebDataSource _quickLookContent] instead.
</span><span class="cx"> - (NSDictionary *)quickLookContentForURL:(NSURL *)url;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit2/ChangeLog        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2017-03-21  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Add support for showing the platform data interaction caret
+        https://bugs.webkit.org/show_bug.cgi?id=169898
+        &lt;rdar://problem/31146295&gt;
+
+        Reviewed by Beth Dakin.
+
+        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):
+
</ins><span class="cx"> 2017-03-22  John Wilander  &lt;wilander@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Resource Load Statistics: Fix partitioning bug for client-side cookie access
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformspiiosUIKitSPIh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -865,6 +865,10 @@
</span><span class="cx"> 
</span><span class="cx"> #endif // USE(APPLE_INTERNAL_SDK)
</span><span class="cx"> 
</span><ins>+@interface UIColor (IPI)
++ (UIColor *)insertionPointColor;
+@end
+
</ins><span class="cx"> @interface UIView (IPI)
</span><span class="cx"> - (UIScrollView *)_scroller;
</span><span class="cx"> - (CGPoint)accessibilityConvertPointFromSceneReferenceCoordinates:(CGPoint)point;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -385,6 +385,7 @@
</span><span class="cx">     virtual void didHandleStartDataInteractionRequest(bool started) = 0;
</span><span class="cx">     virtual void startDataInteractionWithImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; image, std::optional&lt;WebCore::TextIndicatorData&gt;, const WebCore::FloatPoint&amp; anchorPoint, uint64_t action) = 0;
</span><span class="cx">     virtual void didConcludeEditDataInteraction(std::optional&lt;WebCore::TextIndicatorData&gt;) = 0;
</span><ins>+    virtual void didChangeDataInteractionCaretRect(const WebCore::IntRect&amp; previousCaretRect, const WebCore::IntRect&amp; caretRect) = 0;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -1808,7 +1808,7 @@
</span><span class="cx">     m_currentDragOperation = static_cast&lt;DragOperation&gt;(dragOperation);
</span><span class="cx">     m_currentDragIsOverFileInput = mouseIsOverFileInput;
</span><span class="cx">     m_currentDragNumberOfFilesToBeAccepted = numberOfItemsToBeAccepted;
</span><del>-    m_currentDragCaretRect = insertionRect;
</del><ins>+    setDragCaretRect(insertionRect);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="lines">@@ -1826,6 +1826,7 @@
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return;
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::DragEnded(clientPosition, globalPosition, operation), m_pageID);
</span><ins>+    setDragCaretRect({ });
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> void WebPageProxy::dragCancelled()
</span><span class="lines">@@ -1834,13 +1835,28 @@
</span><span class="cx">         m_process-&gt;send(Messages::WebPage::DragCancelled(), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPageProxy::didEndDragging()
+{
+    resetCurrentDragInformation();
+}
+
</ins><span class="cx"> void WebPageProxy::resetCurrentDragInformation()
</span><span class="cx"> {
</span><span class="cx">     m_currentDragOperation = WebCore::DragOperationNone;
</span><span class="cx">     m_currentDragIsOverFileInput = false;
</span><span class="cx">     m_currentDragNumberOfFilesToBeAccepted = 0;
</span><del>-    m_currentDragCaretRect = { };
</del><ins>+    setDragCaretRect({ });
</ins><span class="cx"> }
</span><ins>+
+#if !ENABLE(DATA_INTERACTION)
+
+void WebPageProxy::setDragCaretRect(const IntRect&amp; dragCaretRect)
+{
+    m_currentDragCaretRect = dragCaretRect;
+}
+
+#endif
+
</ins><span class="cx"> #endif // ENABLE(DRAG_SUPPORT)
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::handleMouseEvent(const NativeWebMouseEvent&amp; event)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -835,6 +835,7 @@
</span><span class="cx">     void didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, const WebCore::IntRect&amp; insertionRect);
</span><span class="cx">     void dragEnded(const WebCore::IntPoint&amp; clientPosition, const WebCore::IntPoint&amp; globalPosition, uint64_t operation);
</span><span class="cx">     void dragCancelled();
</span><ins>+    void setDragCaretRect(const WebCore::IntRect&amp;);
</ins><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     void setDragImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; dragImageHandle, std::optional&lt;WebCore::TextIndicatorData&gt;, const WebCore::FloatPoint&amp; dragImageAnchor, uint64_t action);
</span><span class="cx">     void setPromisedDataForImage(const String&amp; pasteboardName, const SharedMemory::Handle&amp; imageHandle, uint64_t imageSize, const String&amp; filename, const String&amp; extension,
</span><span class="lines">@@ -890,6 +891,7 @@
</span><span class="cx">     unsigned currentDragNumberOfFilesToBeAccepted() const { return m_currentDragNumberOfFilesToBeAccepted; }
</span><span class="cx">     WebCore::IntRect currentDragCaretRect() const { return m_currentDragCaretRect; }
</span><span class="cx">     void resetCurrentDragInformation();
</span><ins>+    void didEndDragging();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void preferencesDidChange();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -296,6 +296,7 @@
</span><span class="cx">     # Drag and drop messages
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx">     DidPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, WebCore::IntRect insertionRect)
</span><ins>+    DidEndDragging();
</ins><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(COCOA) &amp;&amp; ENABLE(DRAG_SUPPORT)
</span><span class="cx">     SetDragImage(WebCore::IntPoint clientPosition, WebKit::ShareableBitmap::Handle dragImage, std::optional&lt;WebCore::TextIndicatorData&gt; textIndicator, WebCore::FloatPoint dragImageAnchor, uint64_t action)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -207,6 +207,7 @@
</span><span class="cx">     void didHandleStartDataInteractionRequest(bool started) override;
</span><span class="cx">     void startDataInteractionWithImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; image, std::optional&lt;WebCore::TextIndicatorData&gt;, const WebCore::FloatPoint&amp; anchorPoint, uint64_t action) override;
</span><span class="cx">     void didConcludeEditDataInteraction(std::optional&lt;WebCore::TextIndicatorData&gt;) override;
</span><ins>+    void didChangeDataInteractionCaretRect(const WebCore::IntRect&amp; previousCaretRect, const WebCore::IntRect&amp; caretRect) override;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     WKContentView *m_contentView;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -790,6 +790,11 @@
</span><span class="cx"> {
</span><span class="cx">     [m_contentView _didConcludeEditDataInteraction:data];
</span><span class="cx"> }
</span><ins>+
+void PageClientImpl::didChangeDataInteractionCaretRect(const IntRect&amp; previousCaretRect, const IntRect&amp; caretRect)
+{
+    [m_contentView _didChangeDataInteractionCaretRect:previousCaretRect currentRect:caretRect];
+}
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> void PageClientImpl::handleActiveNowPlayingSessionInfoResponse(bool hasActiveSession, const String&amp; title, double duration, double elapsedTime)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -74,6 +74,10 @@
</span><span class="cx"> @class _UIHighlightView;
</span><span class="cx"> @class _UIWebHighlightLongPressGestureRecognizer;
</span><span class="cx"> 
</span><ins>+#if ENABLE(DATA_INTERACTION)
+@class WKDataInteractionCaretView;
+#endif
+
</ins><span class="cx"> typedef void (^UIWKAutocorrectionCompletionHandler)(UIWKAutocorrectionRects *rectsForInput);
</span><span class="cx"> typedef void (^UIWKAutocorrectionContextHandler)(UIWKAutocorrectionContext *autocorrectionContext);
</span><span class="cx"> typedef void (^UIWKDictationContextHandler)(NSString *selectedText, NSString *beforeText, NSString *afterText);
</span><span class="lines">@@ -193,14 +197,13 @@
</span><span class="cx"> #if ENABLE(DATA_INTERACTION)
</span><span class="cx">     WebKit::WKDataInteractionState _dataInteractionState;
</span><span class="cx">     BOOL _isPerformingDataInteractionOperation;
</span><del>-#if HAS_DATA_INTERACTION_SPI
</del><span class="cx">     RetainPtr&lt;WKDataInteraction&gt; _dataInteraction;
</span><span class="cx">     RetainPtr&lt;WKDataOperation&gt; _dataOperation;
</span><del>-#endif
</del><span class="cx">     CGPoint _deferredActionSheetRequestLocation;
</span><span class="cx">     RetainPtr&lt;UIView&gt; _visibleContentViewSnapshot;
</span><span class="cx">     RetainPtr&lt;UIImageView&gt; _dataInteractionUnselectedContentSnapshot;
</span><span class="cx">     BOOL _isRunningConcludeEditDataInteractionAnimation;
</span><ins>+    RetainPtr&lt;WKDataInteractionCaretView&gt; _dataInteractionCaretView;
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -285,6 +288,8 @@
</span><span class="cx"> - (void)_didHandleStartDataInteractionRequest:(BOOL)started;
</span><span class="cx"> - (void)_startDataInteractionWithImage:(RetainPtr&lt;CGImageRef&gt;)image withIndicatorData:(std::optional&lt;WebCore::TextIndicatorData&gt;)indicatorData atClientPosition:(CGPoint)clientPosition anchorPoint:(CGPoint)anchorPoint action:(uint64_t)action;
</span><span class="cx"> - (void)_didConcludeEditDataInteraction:(std::optional&lt;WebCore::TextIndicatorData&gt;)data;
</span><ins>+- (void)_didChangeDataInteractionCaretRect:(CGRect)previousRect currentRect:(CGRect)rect;
+
</ins><span class="cx"> - (void)_simulateDataInteractionEntered:(id)info;
</span><span class="cx"> - (void)_simulateDataInteractionUpdated:(id)info;
</span><span class="cx"> - (void)_simulateDataInteractionPerformOperation:(id)info;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -108,6 +108,19 @@
</span><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span><ins>+#if ENABLE(DATA_INTERACTION)
+
+@interface WKDataInteractionCaretView : UIView
+
+- (instancetype)initWithTextInputView:(UIView&lt;UITextInput&gt; *)textInputView;
+- (void)insertAtPosition:(UITextPosition *)position;
+- (void)updateToPosition:(UITextPosition *)position;
+- (void)remove;
+
+@end
+
+#endif
+
</ins><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><span class="lines">@@ -641,6 +654,8 @@
</span><span class="cx"> #if ENABLE(DATA_INTERACTION)
</span><span class="cx">     [self teardownDataInteractionDelegates];
</span><span class="cx">     _isPerformingDataInteractionOperation = NO;
</span><ins>+    [_dataInteractionCaretView remove];
+    _dataInteractionCaretView = nil;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     _inspectorNodeSearchEnabled = NO;
</span><span class="lines">@@ -1964,6 +1979,11 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (UIColor *)insertionPointColor
+{
+    return [UIColor insertionPointColor];
+}
+
</ins><span class="cx"> - (BOOL)canPerformAction:(SEL)action withSender:(id)sender
</span><span class="cx"> {
</span><span class="cx">     return NO;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (214283 => 214284)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2017-03-22 23:18:54 UTC (rev 214283)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2017-03-22 23:21:38 UTC (rev 214284)
</span><span class="lines">@@ -3593,6 +3593,8 @@
</span><span class="cx">     // FIXME: These are fake modifier keys here, but they should be real ones instead.
</span><span class="cx">     PlatformMouseEvent event(adjustedClientPosition, adjustedGlobalPosition, LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), 0, WebCore::NoTap);
</span><span class="cx">     m_page-&gt;mainFrame().eventHandler().dragSourceEndedAt(event, (DragOperation)operation);
</span><ins>+
+    send(Messages::WebPageProxy::DidEndDragging());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::willPerformLoadDragDestinationAction()
</span></span></pre>
</div>
</div>

</body>
</html>