<!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>[211919] branches/safari-604.1.5-branch/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/211919">211919</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2017-02-08 18:05:51 -0800 (Wed, 08 Feb 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/211597">r211597</a>. rdar://problem/30295261</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari60415branchSourceWebCoreChangeLog">branches/safari-604.1.5-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari60415branchSourceWebCoreloaderEmptyClientscpp">branches/safari-604.1.5-branch/Source/WebCore/loader/EmptyClients.cpp</a></li>
<li><a href="#branchessafari60415branchSourceWebCorepageDragClienth">branches/safari-604.1.5-branch/Source/WebCore/page/DragClient.h</a></li>
<li><a href="#branchessafari60415branchSourceWebCorepageDragControllercpp">branches/safari-604.1.5-branch/Source/WebCore/page/DragController.cpp</a></li>
<li><a href="#branchessafari60415branchSourceWebCorepageDragControllerh">branches/safari-604.1.5-branch/Source/WebCore/page/DragController.h</a></li>
<li><a href="#branchessafari60415branchSourceWebCoreplatformDragImageh">branches/safari-604.1.5-branch/Source/WebCore/platform/DragImage.h</a></li>
<li><a href="#branchessafari60415branchSourceWebKitmacChangeLog">branches/safari-604.1.5-branch/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#branchessafari60415branchSourceWebKitmacWebCoreSupportWebDragClienth">branches/safari-604.1.5-branch/Source/WebKit/mac/WebCoreSupport/WebDragClient.h</a></li>
<li><a href="#branchessafari60415branchSourceWebKitmacWebCoreSupportWebDragClientmm">branches/safari-604.1.5-branch/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm</a></li>
<li><a href="#branchessafari60415branchSourceWebKitwinChangeLog">branches/safari-604.1.5-branch/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#branchessafari60415branchSourceWebKitwinWebCoreSupportWebDragClientcpp">branches/safari-604.1.5-branch/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp</a></li>
<li><a href="#branchessafari60415branchSourceWebKitwinWebCoreSupportWebDragClienth">branches/safari-604.1.5-branch/Source/WebKit/win/WebCoreSupport/WebDragClient.h</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2ChangeLog">branches/safari-604.1.5-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2UIProcessPageClienth">branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2UIProcessWebPageProxyh">branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2UIProcessWebPageProxymessagesin">branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2UIProcessiosPageClientImplIOSh">branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2UIProcessiosPageClientImplIOSmm">branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2UIProcessiosWKContentViewInteractionh">branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2UIProcessmacPageClientImplh">branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2UIProcessmacPageClientImplmm">branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2UIProcessmacWebPageProxyMacmm">branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2WebProcessWebCoreSupportWebDragClientcpp">branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2WebProcessWebCoreSupportWebDragClienth">branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2WebProcessWebCoreSupportgtkWebDragClientGtkcpp">branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp</a></li>
<li><a href="#branchessafari60415branchSourceWebKit2WebProcessWebCoreSupportmacWebDragClientMacmm">branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari60415branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebCore/ChangeLog (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebCore/ChangeLog        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebCore/ChangeLog        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -1,5 +1,30 @@
</span><span class="cx"> 2017-02-08 Matthew Hanson <matt_hanson@apple.com>
</span><span class="cx">
</span><ins>+ Merge r211597. rdar://problem/30295261
+
+ 2017-02-02 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Drag images should be anchored to the mouse location
+ https://bugs.webkit.org/show_bug.cgi?id=167690
+ <rdar://problem/30295261>
+
+ 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:
+
+2017-02-08 Matthew Hanson <matt_hanson@apple.com>
+
</ins><span class="cx"> Merge r211453. rdar://problem/30294240
</span><span class="cx">
</span><span class="cx"> 2017-01-31 Wenson Hsieh <wenson_hsieh@apple.com>
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebCoreloaderEmptyClientscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebCore/loader/EmptyClients.cpp (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebCore/loader/EmptyClients.cpp        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebCore/loader/EmptyClients.cpp        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx"> void willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer&) final { }
</span><span class="cx"> DragDestinationAction actionMaskForDrag(const DragData&) final { return DragDestinationActionNone; }
</span><span class="cx"> DragSourceAction dragSourceActionMaskForPoint(const IntPoint&) final { return DragSourceActionNone; }
</span><del>- void startDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool) final { }
</del><ins>+ void startDrag(DragImageRef, const IntPoint&, const IntPoint&, const FloatPoint&, DataTransfer&, Frame&, bool) final { }
</ins><span class="cx"> void dragControllerDestroyed() final { }
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebCorepageDragClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebCore/page/DragClient.h (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebCore/page/DragClient.h        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebCore/page/DragClient.h        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx">
</span><span class="cx"> #include "DragActions.h"
</span><span class="cx"> #include "DragImage.h"
</span><ins>+#include "FloatPoint.h"
</ins><span class="cx"> #include "IntPoint.h"
</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&) = 0;
</span><span class="cx"> virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint& rootViewPoint) = 0;
</span><span class="cx">
</span><del>- virtual void startDrag(DragImageRef, const IntPoint& dragImageOrigin, const IntPoint& eventPos, DataTransfer&, Frame&, bool linkDrag = false) = 0;
</del><ins>+ virtual void startDrag(DragImageRef, const IntPoint& dragImageOrigin, const IntPoint& eventPos, const FloatPoint& dragImageAnchor, DataTransfer&, Frame&, 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="branchessafari60415branchSourceWebCorepageDragControllercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebCore/page/DragController.cpp (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebCore/page/DragController.cpp        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebCore/page/DragController.cpp        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx"> #include "CachedImage.h"
</span><span class="cx"> #include "CachedResourceLoader.h"
</span><ins>+#include "ClientRect.h"
</ins><span class="cx"> #include "DataTransfer.h"
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "DocumentFragment.h"
</span><span class="lines">@@ -76,6 +77,11 @@
</span><span class="cx"> #include "TextEvent.h"
</span><span class="cx"> #include "htmlediting.h"
</span><span class="cx"> #include "markup.h"
</span><ins>+
+#if ENABLE(DATA_INTERACTION)
+#include "SelectionRect.h"
+#endif
+
</ins><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</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& 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<Range> selectionRange = src.selection().toNormalizedRange();
</span><span class="cx"> ASSERT(selectionRange);
</span><span class="cx">
</span><ins>+#if ENABLE(DATA_INTERACTION)
+ Vector<SelectionRect> selectionRects;
+ selectionRange->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()->securityOrigin().canDisplay(linkURL)) {
</span><span class="cx"> src.document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Not allowed to drag local resource: " + 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() && (m_dragSourceAction & 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() && (m_dragSourceAction & 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 & 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& dragLoc, const IntPoint& eventPos, DataTransfer& dataTransfer, Frame& frame, bool forLink)
</del><ins>+void DragController::doSystemDrag(DragImageRef image, const IntPoint& dragLoc, const IntPoint& eventPos, const IntRect& dragImageBounds, DataTransfer& dataTransfer, Frame& 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<MainFrame> frameProtector(m_page.mainFrame());
</span><span class="cx"> RefPtr<FrameView> viewProtector = frameProtector->view();
</span><del>- m_client.startDrag(image, viewProtector->rootViewToContents(frame.view()->contentsToRootView(dragLoc)),
- viewProtector->rootViewToContents(frame.view()->contentsToRootView(eventPos)), dataTransfer, frameProtector.get(), forLink);
</del><ins>+ m_client.startDrag(image, viewProtector->rootViewToContents(frame.view()->contentsToRootView(dragLoc)), viewProtector->rootViewToContents(frame.view()->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->page())
</span><span class="cx"> return;
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebCorepageDragControllerh"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebCore/page/DragController.h (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebCore/page/DragController.h        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebCore/page/DragController.h        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include "DragActions.h"
</span><span class="cx"> #include "DragImage.h"
</span><span class="cx"> #include "IntPoint.h"
</span><ins>+#include "IntRect.h"
</ins><span class="cx"> #include "URL.h"
</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&, const IntPoint&, const IntRect&, DataTransfer&, Frame&, IntPoint&);
</span><del>- void doSystemDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool forLink);
</del><ins>+ void doSystemDrag(DragImageRef, const IntPoint&, const IntPoint&, const IntRect& dragImageBounds, DataTransfer&, Frame&, bool forLink);
</ins><span class="cx"> void cleanupAfterSystemDrag();
</span><span class="cx"> void declareAndWriteDragImage(DataTransfer&, Element&, const URL&, const String& label);
</span><span class="cx"> #if ENABLE(ATTACHMENT_ELEMENT)
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebCoreplatformDragImageh"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebCore/platform/DragImage.h (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebCore/platform/DragImage.h        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebCore/platform/DragImage.h        2017-02-09 02:05:51 UTC (rev 211919)
</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="branchessafari60415branchSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit/mac/ChangeLog (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit/mac/ChangeLog        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit/mac/ChangeLog        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2017-02-08 Matthew Hanson <matt_hanson@apple.com>
+
+ Merge r211597. rdar://problem/30295261
+
+ 2017-02-02 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Drag images should be anchored to the mouse location
+ https://bugs.webkit.org/show_bug.cgi?id=167690
+ <rdar://problem/30295261>
+
+ 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 Matthew Hanson <matt_hanson@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r211438.
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKitmacWebCoreSupportWebDragClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit/mac/WebCoreSupport/WebDragClient.h (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit/mac/WebCoreSupport/WebDragClient.h        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit/mac/WebCoreSupport/WebDragClient.h        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> WebCore::DragDestinationAction actionMaskForDrag(const WebCore::DragData&) override;
</span><span class="cx"> void dragControllerDestroyed() override;
</span><span class="cx"> WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint) override;
</span><del>- void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragPos, const WebCore::IntPoint& eventPos, WebCore::DataTransfer&, WebCore::Frame&, bool linkDrag) override;
</del><ins>+ void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragPos, const WebCore::IntPoint& eventPos, const WebCore::FloatPoint&, WebCore::DataTransfer&, WebCore::Frame&, bool linkDrag) override;
</ins><span class="cx"> void declareAndWriteDragImage(const String& pasteboardName, WebCore::Element&, const WebCore::URL&, const String&, WebCore::Frame*) override;
</span><span class="cx"> #if ENABLE(ATTACHMENT_ELEMENT)
</span><span class="cx"> void declareAndWriteAttachment(const String& pasteboardName, WebCore::Element&, const WebCore::URL&, const String& path, WebCore::Frame*) override;
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKitmacWebCoreSupportWebDragClientmm"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm        2017-02-09 02:05:51 UTC (rev 211919)
</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& at, const IntPoint& eventPos, DataTransfer& dataTransfer, Frame& frame, bool linkDrag)
</del><ins>+void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& at, const IntPoint& eventPos, const FloatPoint&, DataTransfer& dataTransfer, Frame& frame, bool linkDrag)
</ins><span class="cx"> {
</span><span class="cx"> RetainPtr<WebHTMLView> htmlView = (WebHTMLView*)[[kit(&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&, const IntPoint&, DataTransfer&, Frame&, bool)
</del><ins>+void WebDragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, const FloatPoint&, DataTransfer&, Frame&, bool)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit/win/ChangeLog (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit/win/ChangeLog        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit/win/ChangeLog        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2017-02-08 Matthew Hanson <matt_hanson@apple.com>
+
+ Merge r211597. rdar://problem/30295261
+
+ 2017-02-02 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Drag images should be anchored to the mouse location
+ https://bugs.webkit.org/show_bug.cgi?id=167690
+ <rdar://problem/30295261>
+
+ 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-01-26 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Crash when navigating back to a page in PacheCache when one of its frames has been removed
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKitwinWebCoreSupportWebDragClientcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx"> const_cast<Pasteboard&>(dataTransfer.pasteboard()).setExternalDataObject(newDataObject.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebDragClient::startDrag(DragImageRef image, const IntPoint& imageOrigin, const IntPoint& dragPoint, DataTransfer& dataTransfer, Frame& frame, bool isLink)
</del><ins>+void WebDragClient::startDrag(DragImageRef image, const IntPoint& imageOrigin, const IntPoint& dragPoint, const FloatPoint&, DataTransfer& dataTransfer, Frame& frame, bool isLink)
</ins><span class="cx"> {
</span><span class="cx"> //FIXME: Allow UIDelegate to override behaviour <rdar://problem/5015953>
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKitwinWebCoreSupportWebDragClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit/win/WebCoreSupport/WebDragClient.h (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit/win/WebCoreSupport/WebDragClient.h        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit/win/WebCoreSupport/WebDragClient.h        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&);
</span><span class="cx"> virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&);
</span><span class="cx"> virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::DataTransfer&);
</span><del>- virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&, const WebCore::IntPoint&, WebCore::DataTransfer&, WebCore::Frame&, bool);
</del><ins>+ virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&, const WebCore::IntPoint&, const WebCore::FloatPoint&, WebCore::DataTransfer&, WebCore::Frame&, bool);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> WebView* m_webView;
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/ChangeLog (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/ChangeLog        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/ChangeLog        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -1,5 +1,38 @@
</span><span class="cx"> 2017-02-08 Matthew Hanson <matt_hanson@apple.com>
</span><span class="cx">
</span><ins>+ Merge r211597. rdar://problem/30295261
+
+ 2017-02-02 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Drag images should be anchored to the mouse location
+ https://bugs.webkit.org/show_bug.cgi?id=167690
+ <rdar://problem/30295261>
+
+ 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):
+
+2017-02-08 Matthew Hanson <matt_hanson@apple.com>
+
</ins><span class="cx"> Merge r211442. rdar://problem/30272380
</span><span class="cx">
</span><span class="cx"> 2017-01-31 Wenson Hsieh <wenson_hsieh@apple.com>
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/PageClient.h (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/PageClient.h        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/PageClient.h        2017-02-09 02:05:51 UTC (rev 211919)
</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& clientPosition, const ShareableBitmap::Handle& image, bool isLink) = 0;
</del><ins>+ virtual void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, const WebCore::FloatPoint& anchorPoint, bool isLink) = 0;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/WebPageProxy.h (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -829,7 +829,7 @@
</span><span class="cx"> void didPerformDragControllerAction(uint64_t dragOperation, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted);
</span><span class="cx"> void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation);
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>- void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag);
</del><ins>+ void setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, const WebCore::FloatPoint& dragImageAnchor, bool isLinkDrag);
</ins><span class="cx"> void setPromisedDataForImage(const String& pasteboardName, const SharedMemory::Handle& imageHandle, uint64_t imageSize, const String& filename, const String& extension,
</span><span class="cx"> const String& title, const String& url, const String& visibleURL, const SharedMemory::Handle& archiveHandle, uint64_t archiveSize);
</span><span class="cx"> #if ENABLE(ATTACHMENT_ELEMENT)
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -306,7 +306,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) && 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="branchessafari60415branchSourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2017-02-09 02:05:51 UTC (rev 211919)
</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& clientPosition, const ShareableBitmap::Handle& image, bool isLink) override;
</del><ins>+ void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, const WebCore::FloatPoint& 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="branchessafari60415branchSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2017-02-09 02:05:51 UTC (rev 211919)
</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& clientPosition, const ShareableBitmap::Handle& image, bool isLink)
</del><ins>+void PageClientImpl::startDataInteractionWithImage(const IntPoint& clientPosition, const ShareableBitmap::Handle& image, const FloatPoint& anchorPoint, bool isLink)
</ins><span class="cx"> {
</span><del>- [m_contentView _startDataInteractionWithImage:ShareableBitmap::create(image)->makeCGImageCopy() atClientPosition:CGPointMake(clientPosition.x(), clientPosition.y()) isLink:isLink];
</del><ins>+ [m_contentView _startDataInteractionWithImage:ShareableBitmap::create(image)->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="branchessafari60415branchSourceWebKit2UIProcessiosWKContentViewInteractionh"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -250,7 +250,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(DATA_INTERACTION)
</span><span class="cx"> - (void)_didPerformDataInteractionControllerOperation;
</span><del>-- (void)_startDataInteractionWithImage:(RetainPtr<CGImageRef>)image atClientPosition:(CGPoint)clientPosition isLink:(BOOL)isLink;
</del><ins>+- (void)_startDataInteractionWithImage:(RetainPtr<CGImageRef>)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="branchessafari60415branchSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2017-02-09 02:05:51 UTC (rev 211919)
</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& clientPosition, const ShareableBitmap::Handle& image, bool isLink) override;
</del><ins>+ void startDataInteractionWithImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& image, const WebCore::FloatPoint& 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="branchessafari60415branchSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2017-02-09 02:05:51 UTC (rev 211919)
</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&, const ShareableBitmap::Handle&, bool)
</del><ins>+void PageClientImpl::startDataInteractionWithImage(const IntPoint&, const ShareableBitmap::Handle&, const FloatPoint&, bool)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Implement me.
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2017-02-09 02:05:51 UTC (rev 211919)
</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& clientPosition, const ShareableBitmap::Handle& dragImageHandle, bool isLinkDrag)
</del><ins>+void WebPageProxy::setDragImage(const WebCore::IntPoint& clientPosition, const ShareableBitmap::Handle& dragImageHandle, const FloatPoint&, 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="branchessafari60415branchSourceWebKit2WebProcessWebCoreSupportWebDragClientcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(COCOA) && !PLATFORM(GTK)
</span><del>-void WebDragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool)
</del><ins>+void WebDragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, const FloatPoint&, DataTransfer&, Frame&, bool)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKit2WebProcessWebCoreSupportWebDragClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h        2017-02-09 02:05:51 UTC (rev 211919)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> WebCore::DragDestinationAction actionMaskForDrag(const WebCore::DragData&) override;
</span><span class="cx"> WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint) override;
</span><span class="cx">
</span><del>- void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, WebCore::DataTransfer&, WebCore::Frame&, bool linkDrag = false) override;
</del><ins>+ void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, const WebCore::FloatPoint& dragImageAnchor, WebCore::DataTransfer&, WebCore::Frame&, bool linkDrag = false) override;
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> void declareAndWriteDragImage(const String& pasteboardName, WebCore::Element&, const WebCore::URL&, const String&, WebCore::Frame*) override;
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKit2WebProcessWebCoreSupportgtkWebDragClientGtkcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp        2017-02-09 02:05:51 UTC (rev 211919)
</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& clientPosition, const IntPoint& globalPosition, DataTransfer& dataTransfer, Frame&, bool)
</del><ins>+void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& clientPosition, const IntPoint& globalPosition, const FloatPoint&, DataTransfer& dataTransfer, Frame&, bool)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<ShareableBitmap> bitmap = convertCairoSurfaceToShareableBitmap(dragImage);
</span><span class="cx"> ShareableBitmap::Handle handle;
</span></span></pre></div>
<a id="branchessafari60415branchSourceWebKit2WebProcessWebCoreSupportmacWebDragClientMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm (211918 => 211919)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm        2017-02-09 02:05:42 UTC (rev 211918)
+++ branches/safari-604.1.5-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm        2017-02-09 02:05:51 UTC (rev 211919)
</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<NSImage> image, const IntPoint& point, const IntPoint&, DataTransfer&, Frame& frame, bool linkDrag)
</del><ins>+void WebDragClient::startDrag(RetainPtr<NSImage> image, const IntPoint& point, const IntPoint&, const FloatPoint&, DataTransfer&, Frame& frame, bool linkDrag)
</ins><span class="cx"> {
</span><span class="cx"> IntSize bitmapSize([image size]);
</span><span class="cx"> RefPtr<ShareableBitmap> bitmap = convertImageToBitmap(image.get(), bitmapSize, frame);
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> m_page->willStartDrag();
</span><span class="cx">
</span><span class="cx"> // FIXME: Seems this message should be named StartDrag, not SetDragImage.
</span><del>- m_page->send(Messages::WebPageProxy::SetDragImage(frame.view()->contentsToWindow(point), handle, linkDrag));
</del><ins>+ m_page->send(Messages::WebPageProxy::SetDragImage(frame.view()->contentsToWindow(point), handle, { }, linkDrag));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static WebCore::CachedImage* cachedImage(Element& element)
</span></span></pre>
</div>
</div>
</body>
</html>