<!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>[211597] 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/211597">211597</a></dd>
<dt>Author</dt> <dd>wenson_hsieh@apple.com</dd>
<dt>Date</dt> <dd>2017-02-02 15:03:38 -0800 (Thu, 02 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Drag images should be anchored to the mouse location
https://bugs.webkit.org/show_bug.cgi?id=167690
&lt;rdar://problem/30295261&gt;

Reviewed by Enrica Casucci.

Source/WebCore:

Adds logic to compute the mouse anchor point. This is a point in the unit square indicating where the drag
origin is relative to the bounds of the drag image. There is no behavior change, since this anchor point is not
used by any client yet; this patch only computes and vends this information from WebCore.

* loader/EmptyClients.cpp:
* page/DragClient.h:
* page/DragController.cpp:
(WebCore::DragController::startDrag):
(WebCore::DragController::doImageDrag):
(WebCore::DragController::doSystemDrag):
* page/DragController.h:
* platform/DragImage.h:

Source/WebKit/mac:

Adds some plumbing for the anchor point in the WK1 client layer.

* WebCoreSupport/WebDragClient.h:
* WebCoreSupport/WebDragClient.mm:
(WebDragClient::startDrag):

Source/WebKit/win:

Adds some plumbing for the anchor point in the WK1 client layer.

* WebCoreSupport/WebDragClient.cpp:
(WebDragClient::startDrag):
* WebCoreSupport/WebDragClient.h:

Source/WebKit2:

Adds some plumbing for the mouse anchor point in the UI process. Additionally, refactors some unrelated code
for handling data interaction.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::startDataInteractionWithImage):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::startDataInteractionWithImage):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setDragImage):
* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::startDrag):
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::startDrag):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientscpp">trunk/Source/WebCore/loader/EmptyClients.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDragClienth">trunk/Source/WebCore/page/DragClient.h</a></li>
<li><a href="#trunkSourceWebCorepageDragControllercpp">trunk/Source/WebCore/page/DragController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDragControllerh">trunk/Source/WebCore/page/DragController.h</a></li>
<li><a href="#trunkSourceWebCoreplatformDragImageh">trunk/Source/WebCore/platform/DragImage.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebDragClienth">trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebDragClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebDragClientcpp">trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebDragClienth">trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</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="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionh">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h</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="#trunkSourceWebKit2UIProcessmacWebPageProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebDragClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebDragClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportgtkWebDragClientGtkcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportmacWebDragClientMacmm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebCore/ChangeLog        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2017-02-02  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Drag images should be anchored to the mouse location
+        https://bugs.webkit.org/show_bug.cgi?id=167690
+        &lt;rdar://problem/30295261&gt;
+
+        Reviewed by Enrica Casucci.
+
+        Adds logic to compute the mouse anchor point. This is a point in the unit square indicating where the drag
+        origin is relative to the bounds of the drag image. There is no behavior change, since this anchor point is not
+        used by any client yet; this patch only computes and vends this information from WebCore.
+
+        * loader/EmptyClients.cpp:
+        * page/DragClient.h:
+        * page/DragController.cpp:
+        (WebCore::DragController::startDrag):
+        (WebCore::DragController::doImageDrag):
+        (WebCore::DragController::doSystemDrag):
+        * page/DragController.h:
+        * platform/DragImage.h:
+
</ins><span class="cx"> 2017-02-02  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Mac] Add classes to manage audio samples
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.cpp        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">     void willPerformDragSourceAction(DragSourceAction, const IntPoint&amp;, DataTransfer&amp;) final { }
</span><span class="cx">     DragDestinationAction actionMaskForDrag(const DragData&amp;) final { return DragDestinationActionNone; }
</span><span class="cx">     DragSourceAction dragSourceActionMaskForPoint(const IntPoint&amp;) final { return DragSourceActionNone; }
</span><del>-    void startDrag(DragImageRef, const IntPoint&amp;, const IntPoint&amp;, DataTransfer&amp;, Frame&amp;, bool) final { }
</del><ins>+    void startDrag(DragImageRef, const IntPoint&amp;, const IntPoint&amp;, const FloatPoint&amp;, DataTransfer&amp;, Frame&amp;, bool) final { }
</ins><span class="cx">     void dragControllerDestroyed() final { }
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DragClient.h (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragClient.h        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebCore/page/DragClient.h        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DragActions.h&quot;
</span><span class="cx"> #include &quot;DragImage.h&quot;
</span><ins>+#include &quot;FloatPoint.h&quot;
</ins><span class="cx"> #include &quot;IntPoint.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -46,7 +47,7 @@
</span><span class="cx">     virtual DragDestinationAction actionMaskForDrag(const DragData&amp;) = 0;
</span><span class="cx">     virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint&amp; rootViewPoint) = 0;
</span><span class="cx">     
</span><del>-    virtual void startDrag(DragImageRef, const IntPoint&amp; dragImageOrigin, const IntPoint&amp; eventPos, DataTransfer&amp;, Frame&amp;, bool linkDrag = false) = 0;
</del><ins>+    virtual void startDrag(DragImageRef, const IntPoint&amp; dragImageOrigin, const IntPoint&amp; eventPos, const FloatPoint&amp; dragImageAnchor, DataTransfer&amp;, Frame&amp;, bool linkDrag = false) = 0;
</ins><span class="cx">     virtual void dragEnded() { }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DragController.cpp (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragController.cpp        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebCore/page/DragController.cpp        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx"> #include &quot;CachedImage.h&quot;
</span><span class="cx"> #include &quot;CachedResourceLoader.h&quot;
</span><ins>+#include &quot;ClientRect.h&quot;
</ins><span class="cx"> #include &quot;DataTransfer.h&quot;
</span><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;DocumentFragment.h&quot;
</span><span class="lines">@@ -76,6 +77,11 @@
</span><span class="cx"> #include &quot;TextEvent.h&quot;
</span><span class="cx"> #include &quot;htmlediting.h&quot;
</span><span class="cx"> #include &quot;markup.h&quot;
</span><ins>+
+#if ENABLE(DATA_INTERACTION)
+#include &quot;SelectionRect.h&quot;
+#endif
+
</ins><span class="cx"> #include &lt;wtf/CurrentTime.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> #endif
</span><span class="lines">@@ -810,6 +816,7 @@
</span><span class="cx">     ASSERT(state.source);
</span><span class="cx">     Element&amp; element = *state.source;
</span><span class="cx"> 
</span><ins>+    IntRect dragImageBounds;
</ins><span class="cx">     Image* image = getImage(element);
</span><span class="cx">     if (state.type == DragSourceActionSelection) {
</span><span class="cx">         if (!dataTransfer.pasteboard().hasData()) {
</span><span class="lines">@@ -818,6 +825,14 @@
</span><span class="cx">             RefPtr&lt;Range&gt; selectionRange = src.selection().toNormalizedRange();
</span><span class="cx">             ASSERT(selectionRange);
</span><span class="cx"> 
</span><ins>+#if ENABLE(DATA_INTERACTION)
+            Vector&lt;SelectionRect&gt; selectionRects;
+            selectionRange-&gt;collectSelectionRects(selectionRects);
+            for (auto selectionRect : selectionRects)
+                dragImageBounds.unite(selectionRect.rect());
+            dragImageBounds.inflate(SelectionDragImagePadding);
+#endif
+
</ins><span class="cx">             src.editor().willWriteSelectionToPasteboard(selectionRange.get());
</span><span class="cx"> 
</span><span class="cx">             if (enclosingTextFormControl(src.selection().selection().start()))
</span><span class="lines">@@ -843,7 +858,7 @@
</span><span class="cx">         if (!dragImage)
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
</del><ins>+        doSystemDrag(dragImage, dragLoc, dragOrigin, dragImageBounds, dataTransfer, src, false);
</ins><span class="cx">     } else if (!src.document()-&gt;securityOrigin().canDisplay(linkURL)) {
</span><span class="cx">         src.document()-&gt;addConsoleMessage(MessageSource::Security, MessageLevel::Error, &quot;Not allowed to drag local resource: &quot; + linkURL.stringCenterEllipsizedToLength());
</span><span class="cx">         startedDrag = false;
</span><span class="lines">@@ -866,7 +881,7 @@
</span><span class="cx">             doImageDrag(element, dragOrigin, hitTestResult.imageRect(), dataTransfer, src, m_dragOffset);
</span><span class="cx">         } else {
</span><span class="cx">             // DHTML defined drag image
</span><del>-            doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
</del><ins>+            doSystemDrag(dragImage, dragLoc, dragOrigin, { }, dataTransfer, src, false);
</ins><span class="cx">         }
</span><span class="cx">     } else if (!linkURL.isEmpty() &amp;&amp; (m_dragSourceAction &amp; DragSourceActionLink)) {
</span><span class="cx">         if (!dataTransfer.pasteboard().hasData()) {
</span><span class="lines">@@ -902,7 +917,7 @@
</span><span class="cx">             // Later code expects the drag image to be scaled by device's scale factor.
</span><span class="cx">             dragImage = scaleDragImage(dragImage, FloatSize(m_page.deviceScaleFactor(), m_page.deviceScaleFactor()));
</span><span class="cx">         }
</span><del>-        doSystemDrag(dragImage, dragLoc, mouseDraggedPoint, dataTransfer, src, true);
</del><ins>+        doSystemDrag(dragImage, dragLoc, mouseDraggedPoint, { }, dataTransfer, src, true);
</ins><span class="cx"> #if ENABLE(ATTACHMENT_ELEMENT)
</span><span class="cx">     } else if (!attachmentURL.isEmpty() &amp;&amp; (m_dragSourceAction &amp; DragSourceActionAttachment)) {
</span><span class="cx">         if (!dataTransfer.pasteboard().hasData()) {
</span><span class="lines">@@ -918,13 +933,13 @@
</span><span class="cx">             dragLoc = dragLocForSelectionDrag(src);
</span><span class="cx">             m_dragOffset = IntPoint(dragOrigin.x() - dragLoc.x(), dragOrigin.y() - dragLoc.y());
</span><span class="cx">         }
</span><del>-        doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
</del><ins>+        doSystemDrag(dragImage, dragLoc, dragOrigin, { }, dataTransfer, src, false);
</ins><span class="cx"> #endif
</span><span class="cx">     } else if (state.type == DragSourceActionDHTML) {
</span><span class="cx">         if (dragImage) {
</span><span class="cx">             ASSERT(m_dragSourceAction &amp; DragSourceActionDHTML);
</span><span class="cx">             m_client.willPerformDragSourceAction(DragSourceActionDHTML, dragOrigin, dataTransfer);
</span><del>-            doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
</del><ins>+            doSystemDrag(dragImage, dragLoc, dragOrigin, { }, dataTransfer, src, false);
</ins><span class="cx">         } else
</span><span class="cx">             startedDrag = false;
</span><span class="cx">     } else {
</span><span class="lines">@@ -981,20 +996,25 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     dragImageOffset = mouseDownPoint + scaledOrigin;
</span><del>-    doSystemDrag(dragImage, dragImageOffset, dragOrigin, dataTransfer, frame, false);
</del><ins>+    doSystemDrag(dragImage, dragImageOffset, dragOrigin, element.boundsInRootViewSpace(), dataTransfer, frame, false);
</ins><span class="cx"> 
</span><span class="cx">     deleteDragImage(dragImage);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DragController::doSystemDrag(DragImageRef image, const IntPoint&amp; dragLoc, const IntPoint&amp; eventPos, DataTransfer&amp; dataTransfer, Frame&amp; frame, bool forLink)
</del><ins>+void DragController::doSystemDrag(DragImageRef image, const IntPoint&amp; dragLoc, const IntPoint&amp; eventPos, const IntRect&amp; dragImageBounds, DataTransfer&amp; dataTransfer, Frame&amp; frame, bool forLink)
</ins><span class="cx"> {
</span><ins>+    FloatPoint dragImageAnchor = { 0.5, 0.5 };
+    if (!dragImageBounds.isEmpty()) {
+        dragImageAnchor.setX((eventPos.x() - dragImageBounds.x()) / (float)dragImageBounds.width());
+        dragImageAnchor.setY((eventPos.y() - dragImageBounds.y()) / (float)dragImageBounds.height());
+    }
+
</ins><span class="cx">     m_didInitiateDrag = true;
</span><span class="cx">     m_dragInitiator = frame.document();
</span><span class="cx">     // Protect this frame and view, as a load may occur mid drag and attempt to unload this frame
</span><span class="cx">     Ref&lt;MainFrame&gt; frameProtector(m_page.mainFrame());
</span><span class="cx">     RefPtr&lt;FrameView&gt; viewProtector = frameProtector-&gt;view();
</span><del>-    m_client.startDrag(image, viewProtector-&gt;rootViewToContents(frame.view()-&gt;contentsToRootView(dragLoc)),
-        viewProtector-&gt;rootViewToContents(frame.view()-&gt;contentsToRootView(eventPos)), dataTransfer, frameProtector.get(), forLink);
</del><ins>+    m_client.startDrag(image, viewProtector-&gt;rootViewToContents(frame.view()-&gt;contentsToRootView(dragLoc)), viewProtector-&gt;rootViewToContents(frame.view()-&gt;contentsToRootView(eventPos)), dragImageAnchor, dataTransfer, frameProtector.get(), forLink);
</ins><span class="cx">     // DragClient::startDrag can cause our Page to dispear, deallocating |this|.
</span><span class="cx">     if (!frameProtector-&gt;page())
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DragController.h (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragController.h        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebCore/page/DragController.h        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;DragActions.h&quot;
</span><span class="cx"> #include &quot;DragImage.h&quot;
</span><span class="cx"> #include &quot;IntPoint.h&quot;
</span><ins>+#include &quot;IntRect.h&quot;
</ins><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -111,7 +112,7 @@
</span><span class="cx">         void mouseMovedIntoDocument(Document*);
</span><span class="cx"> 
</span><span class="cx">         void doImageDrag(Element&amp;, const IntPoint&amp;, const IntRect&amp;, DataTransfer&amp;, Frame&amp;, IntPoint&amp;);
</span><del>-        void doSystemDrag(DragImageRef, const IntPoint&amp;, const IntPoint&amp;, DataTransfer&amp;, Frame&amp;, bool forLink);
</del><ins>+        void doSystemDrag(DragImageRef, const IntPoint&amp;, const IntPoint&amp;, const IntRect&amp; dragImageBounds, DataTransfer&amp;, Frame&amp;, bool forLink);
</ins><span class="cx">         void cleanupAfterSystemDrag();
</span><span class="cx">         void declareAndWriteDragImage(DataTransfer&amp;, Element&amp;, const URL&amp;, const String&amp; label);
</span><span class="cx"> #if ENABLE(ATTACHMENT_ELEMENT)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformDragImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/DragImage.h (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/DragImage.h        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebCore/platform/DragImage.h        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -67,6 +67,10 @@
</span><span class="cx"> typedef void* DragImageRef;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(COCOA)
+static const float SelectionDragImagePadding = 15;
+#endif
+
</ins><span class="cx"> IntSize dragImageSize(DragImageRef);
</span><span class="cx"> 
</span><span class="cx"> // These functions should be memory neutral, eg. if they return a newly allocated image,
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit/mac/ChangeLog        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2017-02-02  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Drag images should be anchored to the mouse location
+        https://bugs.webkit.org/show_bug.cgi?id=167690
+        &lt;rdar://problem/30295261&gt;
+
+        Reviewed by Enrica Casucci.
+
+        Adds some plumbing for the anchor point in the WK1 client layer.
+
+        * WebCoreSupport/WebDragClient.h:
+        * WebCoreSupport/WebDragClient.mm:
+        (WebDragClient::startDrag):
+
</ins><span class="cx"> 2017-02-02  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rename Node::inDocument() to isConnected()
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebDragClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">     WebCore::DragDestinationAction actionMaskForDrag(const WebCore::DragData&amp;) override;
</span><span class="cx">     void dragControllerDestroyed() override;
</span><span class="cx">     WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&amp; windowPoint) override;
</span><del>-    void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&amp; dragPos, const WebCore::IntPoint&amp; eventPos, WebCore::DataTransfer&amp;, WebCore::Frame&amp;, bool linkDrag) override;
</del><ins>+    void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&amp; dragPos, const WebCore::IntPoint&amp; eventPos, const WebCore::FloatPoint&amp;, WebCore::DataTransfer&amp;, WebCore::Frame&amp;, bool linkDrag) override;
</ins><span class="cx">     void declareAndWriteDragImage(const String&amp; pasteboardName, WebCore::Element&amp;, const WebCore::URL&amp;, const String&amp;, WebCore::Frame*) override;
</span><span class="cx"> #if ENABLE(ATTACHMENT_ELEMENT)
</span><span class="cx">     void declareAndWriteAttachment(const String&amp; pasteboardName, WebCore::Element&amp;, const WebCore::URL&amp;, const String&amp; path, WebCore::Frame*) override;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebDragClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">     [[m_webView _UIDelegateForwarder] webView:m_webView willPerformDragSourceAction:(WebDragSourceAction)action fromPoint:mouseDownPoint withPasteboard:[NSPasteboard pasteboardWithName:dataTransfer.pasteboard().name()]];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint&amp; at, const IntPoint&amp; eventPos, DataTransfer&amp; dataTransfer, Frame&amp; frame, bool linkDrag)
</del><ins>+void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint&amp; at, const IntPoint&amp; eventPos, const FloatPoint&amp;, DataTransfer&amp; dataTransfer, Frame&amp; frame, bool linkDrag)
</ins><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;WebHTMLView&gt; htmlView = (WebHTMLView*)[[kit(&amp;frame) frameView] documentView];
</span><span class="cx">     if (![htmlView.get() isKindOfClass:[WebHTMLView class]])
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebDragClient::startDrag(DragImageRef, const IntPoint&amp;, const IntPoint&amp;, DataTransfer&amp;, Frame&amp;, bool)
</del><ins>+void WebDragClient::startDrag(DragImageRef, const IntPoint&amp;, const IntPoint&amp;, const FloatPoint&amp;, DataTransfer&amp;, Frame&amp;, bool)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit/win/ChangeLog        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2017-02-02  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Drag images should be anchored to the mouse location
+        https://bugs.webkit.org/show_bug.cgi?id=167690
+        &lt;rdar://problem/30295261&gt;
+
+        Reviewed by Enrica Casucci.
+
+        Adds some plumbing for the anchor point in the WK1 client layer.
+
+        * WebCoreSupport/WebDragClient.cpp:
+        (WebDragClient::startDrag):
+        * WebCoreSupport/WebDragClient.h:
+
</ins><span class="cx"> 2017-02-02  Per Arne Vollan  &lt;pvollan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win][HiDPI] Scale factor is applied twice in accelerated compositing mode.
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebDragClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">         const_cast&lt;Pasteboard&amp;&gt;(dataTransfer.pasteboard()).setExternalDataObject(newDataObject.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebDragClient::startDrag(DragImageRef image, const IntPoint&amp; imageOrigin, const IntPoint&amp; dragPoint, DataTransfer&amp; dataTransfer, Frame&amp; frame, bool isLink)
</del><ins>+void WebDragClient::startDrag(DragImageRef image, const IntPoint&amp; imageOrigin, const IntPoint&amp; dragPoint, const FloatPoint&amp;, DataTransfer&amp; dataTransfer, Frame&amp; frame, bool isLink)
</ins><span class="cx"> {
</span><span class="cx">     //FIXME: Allow UIDelegate to override behaviour &lt;rdar://problem/5015953&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebDragClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">     virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&amp;);
</span><span class="cx">     virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&amp;);
</span><span class="cx">     virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&amp;, WebCore::DataTransfer&amp;);
</span><del>-    virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&amp;, const WebCore::IntPoint&amp;, WebCore::DataTransfer&amp;, WebCore::Frame&amp;, bool);
</del><ins>+    virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&amp;, const WebCore::IntPoint&amp;, const WebCore::FloatPoint&amp;, WebCore::DataTransfer&amp;, WebCore::Frame&amp;, bool);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     WebView* m_webView;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/ChangeLog        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2017-02-02  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Drag images should be anchored to the mouse location
+        https://bugs.webkit.org/show_bug.cgi?id=167690
+        &lt;rdar://problem/30295261&gt;
+
+        Reviewed by Enrica Casucci.
+
+        Adds some plumbing for the mouse anchor point in the UI process. Additionally, refactors some unrelated code
+        for handling data interaction.
+
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * UIProcess/ios/PageClientImplIOS.h:
+        * UIProcess/ios/PageClientImplIOS.mm:
+        (WebKit::PageClientImpl::startDataInteractionWithImage):
+        * UIProcess/ios/WKContentViewInteraction.h:
+        * UIProcess/mac/PageClientImpl.h:
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::startDataInteractionWithImage):
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::setDragImage):
+        * WebProcess/WebCoreSupport/WebDragClient.cpp:
+        (WebKit::WebDragClient::startDrag):
+        * WebProcess/WebCoreSupport/WebDragClient.h:
+        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
+        (WebKit::WebDragClient::startDrag):
+
</ins><span class="cx"> 2017-02-02  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r211571 and r211582.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -383,7 +383,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATA_INTERACTION)
</span><span class="cx">     virtual void didPerformDataInteractionControllerOperation() = 0;
</span><del>-    virtual void startDataInteractionWithImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; image, bool isLink) = 0;
</del><ins>+    virtual void startDataInteractionWithImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; image, const WebCore::FloatPoint&amp; anchorPoint, bool isLink) = 0;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -835,7 +835,7 @@
</span><span class="cx">     void didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted);
</span><span class="cx">     void dragEnded(const WebCore::IntPoint&amp; clientPosition, const WebCore::IntPoint&amp; globalPosition, uint64_t operation);
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    void setDragImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; dragImageHandle, bool isLinkDrag);
</del><ins>+    void setDragImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; dragImageHandle, const WebCore::FloatPoint&amp; dragImageAnchor, bool isLinkDrag);
</ins><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="cx">                          const String&amp; title, const String&amp; url, const String&amp; visibleURL, const SharedMemory::Handle&amp; archiveHandle, uint64_t archiveSize);
</span><span class="cx"> #if ENABLE(ATTACHMENT_ELEMENT)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -307,7 +307,7 @@
</span><span class="cx">     DidPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted)
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(COCOA) &amp;&amp; ENABLE(DRAG_SUPPORT)
</span><del>-    SetDragImage(WebCore::IntPoint clientPosition, WebKit::ShareableBitmap::Handle dragImage, bool linkDrag)
</del><ins>+    SetDragImage(WebCore::IntPoint clientPosition, WebKit::ShareableBitmap::Handle dragImage, WebCore::FloatPoint dragImageAnchor, bool linkDrag)
</ins><span class="cx">     SetPromisedDataForImage(String pasteboardName, WebKit::SharedMemory::Handle imageHandle, uint64_t imageSize, String filename, String extension, String title, String url, String visibleURL, WebKit::SharedMemory::Handle archiveHandle, uint64_t archiveSize)
</span><span class="cx"> #if ENABLE(ATTACHMENT_ELEMENT)
</span><span class="cx">     SetPromisedDataForAttachment(String pasteboardName, String filename, String extension, String title, String url, String visibleURL)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATA_INTERACTION)
</span><span class="cx">     void didPerformDataInteractionControllerOperation() override;
</span><del>-    void startDataInteractionWithImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; image, bool isLink) override;
</del><ins>+    void startDataInteractionWithImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; image, const WebCore::FloatPoint&amp; anchorPoint, bool isLink) 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 (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -768,9 +768,9 @@
</span><span class="cx">     [m_contentView _didPerformDataInteractionControllerOperation];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void PageClientImpl::startDataInteractionWithImage(const IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; image, bool isLink)
</del><ins>+void PageClientImpl::startDataInteractionWithImage(const IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; image, const FloatPoint&amp; anchorPoint, bool isLink)
</ins><span class="cx"> {
</span><del>-    [m_contentView _startDataInteractionWithImage:ShareableBitmap::create(image)-&gt;makeCGImageCopy() atClientPosition:CGPointMake(clientPosition.x(), clientPosition.y()) isLink:isLink];
</del><ins>+    [m_contentView _startDataInteractionWithImage:ShareableBitmap::create(image)-&gt;makeCGImageCopy() atClientPosition:CGPointMake(clientPosition.x(), clientPosition.y()) anchorPoint:anchorPoint isLink:isLink];
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATA_INTERACTION)
</span><span class="cx"> - (void)_didPerformDataInteractionControllerOperation;
</span><del>-- (void)_startDataInteractionWithImage:(RetainPtr&lt;CGImageRef&gt;)image atClientPosition:(CGPoint)clientPosition isLink:(BOOL)isLink;
</del><ins>+- (void)_startDataInteractionWithImage:(RetainPtr&lt;CGImageRef&gt;)image atClientPosition:(CGPoint)clientPosition anchorPoint:(CGPoint)anchorPoint isLink:(BOOL)isLink;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -234,7 +234,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATA_INTERACTION)
</span><span class="cx">     void didPerformDataInteractionControllerOperation() override;
</span><del>-    void startDataInteractionWithImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; image, bool isLink) override;
</del><ins>+    void startDataInteractionWithImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; image, const WebCore::FloatPoint&amp; anchorPoint, bool isLink) override;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     NSView *m_view;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -881,7 +881,7 @@
</span><span class="cx">     // FIXME: Implement me.
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void PageClientImpl::startDataInteractionWithImage(const IntPoint&amp;, const ShareableBitmap::Handle&amp;, bool)
</del><ins>+void PageClientImpl::startDataInteractionWithImage(const IntPoint&amp;, const ShareableBitmap::Handle&amp;, const FloatPoint&amp;, bool)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Implement me.
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><del>-void WebPageProxy::setDragImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; dragImageHandle, bool isLinkDrag)
</del><ins>+void WebPageProxy::setDragImage(const WebCore::IntPoint&amp; clientPosition, const ShareableBitmap::Handle&amp; dragImageHandle, const FloatPoint&amp;, bool isLinkDrag)
</ins><span class="cx"> {
</span><span class="cx">     if (auto dragImage = ShareableBitmap::create(dragImageHandle))
</span><span class="cx">         m_pageClient.setDragImage(clientPosition, WTFMove(dragImage), isLinkDrag);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebDragClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(COCOA) &amp;&amp; !PLATFORM(GTK)
</span><del>-void WebDragClient::startDrag(DragImageRef, const IntPoint&amp;, const IntPoint&amp;, DataTransfer&amp;, Frame&amp;, bool)
</del><ins>+void WebDragClient::startDrag(DragImageRef, const IntPoint&amp;, const IntPoint&amp;, const FloatPoint&amp;, DataTransfer&amp;, Frame&amp;, bool)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebDragClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     WebCore::DragDestinationAction actionMaskForDrag(const WebCore::DragData&amp;) override;
</span><span class="cx">     WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&amp; windowPoint) override;
</span><span class="cx"> 
</span><del>-    void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&amp; dragImageOrigin, const WebCore::IntPoint&amp; eventPos, WebCore::DataTransfer&amp;, WebCore::Frame&amp;, bool linkDrag = false) override;
</del><ins>+    void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&amp; dragImageOrigin, const WebCore::IntPoint&amp; eventPos, const WebCore::FloatPoint&amp; dragImageAnchor, WebCore::DataTransfer&amp;, WebCore::Frame&amp;, bool linkDrag = false) override;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     void declareAndWriteDragImage(const String&amp; pasteboardName, WebCore::Element&amp;, const WebCore::URL&amp;, const String&amp;, WebCore::Frame*) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportgtkWebDragClientGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">     return bitmap;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, DataTransfer&amp; dataTransfer, Frame&amp;, bool)
</del><ins>+void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, const FloatPoint&amp;, DataTransfer&amp; dataTransfer, Frame&amp;, bool)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;ShareableBitmap&gt; bitmap = convertCairoSurfaceToShareableBitmap(dragImage);
</span><span class="cx">     ShareableBitmap::Handle handle;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportmacWebDragClientMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm (211596 => 211597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm        2017-02-02 23:01:54 UTC (rev 211596)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm        2017-02-02 23:03:38 UTC (rev 211597)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">     return WTFMove(bitmap);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebDragClient::startDrag(RetainPtr&lt;NSImage&gt; image, const IntPoint&amp; point, const IntPoint&amp;, DataTransfer&amp;, Frame&amp; frame, bool linkDrag)
</del><ins>+void WebDragClient::startDrag(RetainPtr&lt;NSImage&gt; image, const IntPoint&amp; point, const IntPoint&amp;, const FloatPoint&amp;, DataTransfer&amp;, Frame&amp; frame, bool linkDrag)
</ins><span class="cx"> {
</span><span class="cx">     IntSize bitmapSize([image size]);
</span><span class="cx">     RefPtr&lt;ShareableBitmap&gt; bitmap = convertImageToBitmap(image.get(), bitmapSize, frame);
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx">     m_page-&gt;willStartDrag();
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Seems this message should be named StartDrag, not SetDragImage.
</span><del>-    m_page-&gt;send(Messages::WebPageProxy::SetDragImage(frame.view()-&gt;contentsToWindow(point), handle, linkDrag));
</del><ins>+    m_page-&gt;send(Messages::WebPageProxy::SetDragImage(frame.view()-&gt;contentsToWindow(point), handle, { }, linkDrag));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static WebCore::CachedImage* cachedImage(Element&amp; element)
</span></span></pre>
</div>
</div>

</body>
</html>