<!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>[211199] 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/211199">211199</a></dd>
<dt>Author</dt> <dd>wenson_hsieh@apple.com</dd>
<dt>Date</dt> <dd>2017-01-25 20:22:05 -0800 (Wed, 25 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add infrastructure to support data interaction in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=167443
Reviewed by Simon Fraser.
Source/WebCore:
Adds support in WebCore to determine whether there is interactive data at a given position. No new tests, since
there should be no behavior change yet.
* page/EventHandler.h:
* page/Page.cpp:
(WebCore::Page::hasDataInteractionAtPosition):
* page/Page.h:
Source/WebKit2:
Adds plumbing for two new XPC messages: WebPageProxy::DidPerformDataInteractionControllerOperation and
WebPage::RequestStartDataInteraction. Additionally, adds a new field to InteractionInformationAtPosition that
indicates whether or not there is data to interact with at a given location.
This patch only adds infrastructure, and does not change any behavior.
* Shared/ios/InteractionInformationAtPosition.h:
* Shared/ios/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didPerformDataInteractionControllerOperation):
(WebKit::PageClientImpl::startDataInteractionWithImage):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didPerformDataInteractionControllerOperation):
(WebKit::requestStartDataInteraction):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDataInteractionControllerOperation):
(WebKit::PageClientImpl::startDataInteractionWithImage):
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestStartDataInteraction):
(WebKit::WebPage::getPositionInformation):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlerh">trunk/Source/WebCore/page/EventHandler.h</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharediosInteractionInformationAtPositionh">trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.h</a></li>
<li><a href="#trunkSourceWebKit2SharediosInteractionInformationAtPositionmm">trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</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="#trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplh">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplmm">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebCore/ChangeLog        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2017-01-25 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Add infrastructure to support data interaction in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=167443
+
+ Reviewed by Simon Fraser.
+
+ Adds support in WebCore to determine whether there is interactive data at a given position. No new tests, since
+ there should be no behavior change yet.
+
+ * page/EventHandler.h:
+ * page/Page.cpp:
+ (WebCore::Page::hasDataInteractionAtPosition):
+ * page/Page.h:
+
</ins><span class="cx"> 2017-01-25 Matt Rajca <mrajca@apple.com>
</span><span class="cx">
</span><span class="cx"> Notify clients when the user plays media otherwise prevented from autoplaying
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.h (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.h        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebCore/page/EventHandler.h        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -315,6 +315,10 @@
</span><span class="cx">
</span><span class="cx"> static Widget* widgetForEventTarget(Element* eventTarget);
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ WEBCORE_EXPORT bool tryToBeginDataInteractionAtPoint(const IntPoint& clientPosition, const IntPoint& globalPosition);
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx"> static DragState& dragState();
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebCore/page/Page.cpp        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -127,6 +127,10 @@
</span><span class="cx"> #include "InProcessIDBServer.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+#include "SelectionRect.h"
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> static HashSet<Page*>* allPages;
</span><span class="lines">@@ -2152,4 +2156,26 @@
</span><span class="cx"> LOG(Layout, "hasMediaQueriesAffectedByAccessibilitySettingsChange, enqueueing style recalc");
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+
+bool Page::hasDataInteractionAtPosition(const FloatPoint& position) const
+{
+ auto currentSelection = m_mainFrame->selection().selection();
+ if (!currentSelection.isRange())
+ return false;
+
+ if (auto selectedRange = currentSelection.toNormalizedRange()) {
+ Vector<SelectionRect> selectionRects;
+ selectedRange->collectSelectionRects(selectionRects);
+ for (auto selectionRect : selectionRects) {
+ if (FloatRect(selectionRect.rect()).contains(position))
+ return true;
+ }
+ }
+
+ return false;
+}
+
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebCore/page/Page.h        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -566,6 +566,10 @@
</span><span class="cx"> bool isOnlyNonUtilityPage() const;
</span><span class="cx"> bool isUtilityPage() const { return m_isUtilityPage; }
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ WEBCORE_EXPORT bool hasDataInteractionAtPosition(const FloatPoint&) const;
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx"> WEBCORE_EXPORT void initGroup();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/ChangeLog        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2017-01-25 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Add infrastructure to support data interaction in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=167443
+
+ Reviewed by Simon Fraser.
+
+ Adds plumbing for two new XPC messages: WebPageProxy::DidPerformDataInteractionControllerOperation and
+ WebPage::RequestStartDataInteraction. Additionally, adds a new field to InteractionInformationAtPosition that
+ indicates whether or not there is data to interact with at a given location.
+
+ This patch only adds infrastructure, and does not change any behavior.
+
+ * Shared/ios/InteractionInformationAtPosition.h:
+ * Shared/ios/InteractionInformationAtPosition.mm:
+ (WebKit::InteractionInformationAtPosition::encode):
+ (WebKit::InteractionInformationAtPosition::decode):
+ * UIProcess/PageClient.h:
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/ios/PageClientImplIOS.h:
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::didPerformDataInteractionControllerOperation):
+ (WebKit::PageClientImpl::startDataInteractionWithImage):
+ * UIProcess/ios/WebPageProxyIOS.mm:
+ (WebKit::WebPageProxy::didPerformDataInteractionControllerOperation):
+ (WebKit::requestStartDataInteraction):
+ * UIProcess/mac/PageClientImpl.h:
+ * UIProcess/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::didPerformDataInteractionControllerOperation):
+ (WebKit::PageClientImpl::startDataInteractionWithImage):
+ * WebProcess/WebPage/WebPage.cpp:
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::requestStartDataInteraction):
+ (WebKit::WebPage::getPositionInformation):
+
</ins><span class="cx"> 2017-01-25 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Stop inheriting from UIWebScrollView, just use UIScrollView
</span></span></pre></div>
<a id="trunkSourceWebKit2SharediosInteractionInformationAtPositionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.h (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.h        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.h        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -41,6 +41,9 @@
</span><span class="cx"> InteractionInformationRequest request;
</span><span class="cx">
</span><span class="cx"> bool nodeAtPositionIsAssistedNode { false };
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ bool hasDataInteractionAtPosition { false };
+#endif
</ins><span class="cx"> bool isSelectable { false };
</span><span class="cx"> bool isNearMarkedText { false };
</span><span class="cx"> bool touchCalloutEnabled { true };
</span></span></pre></div>
<a id="trunkSourceWebKit2SharediosInteractionInformationAtPositionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.mm (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.mm        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/Shared/ios/InteractionInformationAtPosition.mm        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -43,6 +43,9 @@
</span><span class="cx"> encoder << request;
</span><span class="cx">
</span><span class="cx"> encoder << nodeAtPositionIsAssistedNode;
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ encoder << hasDataInteractionAtPosition;
+#endif
</ins><span class="cx"> encoder << isSelectable;
</span><span class="cx"> encoder << isNearMarkedText;
</span><span class="cx"> encoder << touchCalloutEnabled;
</span><span class="lines">@@ -87,6 +90,11 @@
</span><span class="cx"> if (!decoder.decode(result.nodeAtPositionIsAssistedNode))
</span><span class="cx"> return false;
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ if (!decoder.decode(result.hasDataInteractionAtPosition))
+ return false;
+#endif
+
</ins><span class="cx"> if (!decoder.decode(result.isSelectable))
</span><span class="cx"> return false;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -380,6 +380,11 @@
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> virtual void requestPasswordForQuickLookDocument(const String& fileName, std::function<void(const String&)>&&) = 0;
</span><span class="cx"> #endif
</span><ins>+
+#if ENABLE(DATA_INTERACTION)
+ virtual void didPerformDataInteractionControllerOperation() = 0;
+ virtual void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, bool isLink) = 0;
+#endif
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -543,7 +543,11 @@
</span><span class="cx"> void handleTwoFingerTapAtPoint(const WebCore::IntPoint&, uint64_t requestID);
</span><span class="cx"> void setForceAlwaysUserScalable(bool);
</span><span class="cx"> void setIsScrollingOrZooming(bool);
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ void didPerformDataInteractionControllerOperation();
+ void requestStartDataInteraction(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
</ins><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx"> #if ENABLE(DATA_DETECTION)
</span><span class="cx"> void setDataDetectionResult(const DataDetectionResult&);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -316,6 +316,10 @@
</span><span class="cx"> StartDrag(struct WebKit::WebSelectionData selection, uint64_t dragOperation, WebKit::ShareableBitmap::Handle dragImage)
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ DidPerformDataInteractionControllerOperation()
+#endif
+
</ins><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> # Dictionary support.
</span><span class="cx"> DidPerformDictionaryLookup(struct WebCore::DictionaryPopupInfo dictionaryPopupInfo)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -199,6 +199,11 @@
</span><span class="cx">
</span><span class="cx"> void requestPasswordForQuickLookDocument(const String& fileName, std::function<void(const String&)>&&) override;
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ void didPerformDataInteractionControllerOperation() override;
+ void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, bool isLink) override;
+#endif
+
</ins><span class="cx"> WKContentView *m_contentView;
</span><span class="cx"> WKWebView *m_webView;
</span><span class="cx"> RetainPtr<WKEditorUndoTargetObjC> m_undoTarget;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -762,6 +762,16 @@
</span><span class="cx"> return ValidationBubble::create(m_contentView, message);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+void PageClientImpl::didPerformDataInteractionControllerOperation()
+{
+}
+
+void PageClientImpl::startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, bool isLink)
+{
+}
+#endif
+
</ins><span class="cx"> void PageClientImpl::handleActiveNowPlayingSessionInfoResponse(bool hasActiveSession, const String& title, double duration, double elapsedTime)
</span><span class="cx"> {
</span><span class="cx"> [m_webView _handleActiveNowPlayingSessionInfoResponse:hasActiveSession title:nsStringFromWebCoreString(title) duration:duration elapsedTime:elapsedTime];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -1081,6 +1081,21 @@
</span><span class="cx"> m_validationBubble->show();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+
+void WebPageProxy::didPerformDataInteractionControllerOperation()
+{
+ m_pageClient.didPerformDataInteractionControllerOperation();
+}
+
+void WebPageProxy::requestStartDataInteraction(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition)
+{
+ if (isValid())
+ m_process->send(Messages::WebPage::RequestStartDataInteraction(clientPosition, globalPosition), m_pageID);
+}
+
+#endif
+
</ins><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame(const String& fileName, const String& uti)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -232,6 +232,11 @@
</span><span class="cx"> _WKRemoteObjectRegistry *remoteObjectRegistry() override;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ void didPerformDataInteractionControllerOperation() override;
+ void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, bool isLink) override;
+#endif
+
</ins><span class="cx"> NSView *m_view;
</span><span class="cx"> WKWebView *m_webView;
</span><span class="cx"> WebViewImpl* m_impl { nullptr };
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -875,6 +875,18 @@
</span><span class="cx"> return m_impl->windowIsFrontWindowUnderMouse(event.nativeEvent());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+void PageClientImpl::didPerformDataInteractionControllerOperation()
+{
+ // FIXME: Implement me.
+}
+
+void PageClientImpl::startDataInteractionWithImage(const IntPoint&, const ShareableBitmap::Handle&, bool)
+{
+ // FIXME: Implement me.
+}
+#endif
+
</ins><span class="cx"> WebCore::UserInterfaceLayoutDirection PageClientImpl::userInterfaceLayoutDirection()
</span><span class="cx"> {
</span><span class="cx"> if (!m_view)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -3527,6 +3527,9 @@
</span><span class="cx"> m_pendingDropSandboxExtension = nullptr;
</span><span class="cx">
</span><span class="cx"> m_pendingDropExtensionsForFileUpload.clear();
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ send(Messages::WebPageProxy::DidPerformDataInteractionControllerOperation());
+#endif
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -1014,7 +1014,10 @@
</span><span class="cx"> PassRefPtr<WebCore::Range> rangeForGranularityAtPoint(const WebCore::Frame&, const WebCore::IntPoint&, uint32_t granularity, bool isInteractingWithAssistedNode);
</span><span class="cx"> bool shouldSwitchToBlockModeForHandle(const WebCore::IntPoint& handlePoint, SelectionHandlePosition);
</span><span class="cx"> RefPtr<WebCore::Range> switchToBlockSelectionAtPoint(const WebCore::IntPoint&, SelectionHandlePosition);
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ void requestStartDataInteraction(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition);
</ins><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> #if !PLATFORM(COCOA)
</span><span class="cx"> static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -246,6 +246,10 @@
</span><span class="cx"> DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ RequestStartDataInteraction(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition)
+#endif
+
</ins><span class="cx"> # Popup menu.
</span><span class="cx"> DidChangeSelectedIndexForActivePopupMenu(int32_t newIndex)
</span><span class="cx"> SetTextForActivePopupMenu(int32_t index)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (211198 => 211199)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2017-01-26 04:19:00 UTC (rev 211198)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2017-01-26 04:22:05 UTC (rev 211199)
</span><span class="lines">@@ -620,6 +620,13 @@
</span><span class="cx"> handleSyntheticClick(nodeRespondingToClick, adjustedPoint);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+void WebPage::requestStartDataInteraction(const IntPoint& clientPosition, const IntPoint& globalPosition)
+{
+ m_page->mainFrame().eventHandler().tryToBeginDataInteractionAtPoint(clientPosition, globalPosition);
+}
+#endif
+
</ins><span class="cx"> void WebPage::sendTapHighlightForNodeIfNecessary(uint64_t requestID, Node* node)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="lines">@@ -2463,6 +2470,10 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+
+#if ENABLE(DATA_INTERACTION)
+ info.hasDataInteractionAtPosition = m_page->hasDataInteractionAtPosition(adjustedPoint);
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPage::requestPositionInformation(const InteractionInformationRequest& request)
</span></span></pre>
</div>
</div>
</body>
</html>