<!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>[207088] releases/WebKitGTK/webkit-2.14/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/207088">207088</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-11 04:36:43 -0700 (Tue, 11 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/206197">r206197</a> - [GTK] Clean up DataObjectGtk handling
https://bugs.webkit.org/show_bug.cgi?id=162267

Reviewed by Michael Catanzaro.

Source/WebCore:

* platform/Pasteboard.h: Use Ref instead of RefPtr for DataObjectGtk member.
* platform/PasteboardStrategy.h: Pass a const reference to DataObjectGtk in write method and return a Ref from read.
* platform/PlatformPasteboard.h: Ditto.
* platform/gtk/DataObjectGtk.h:
(WebCore::DataObjectGtk::image): Use Image instead of GdkPixbuf.
(WebCore::DataObjectGtk::setImage):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::createForDragAndDrop): Use a reference instead of a pointer.
(WebCore::Pasteboard::Pasteboard): Receives a reference, so we can also remove the ASSERT.
(WebCore::Pasteboard::dataObject):
(WebCore::Pasteboard::writeToClipboard): Remove the ShouldIncludeSmartPaste parameter, callers should also update
canSmartPaste property of DataObjectGtk before calling this.
(WebCore::Pasteboard::writePlainText):
(WebCore::Pasteboard::write): Do not convert the image the GdkPixbuf, pass the image to the DataObjectGtk instead.
* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::fillSelectionData): Convert the DataObjectGtk image to GdkPixbuf right before
passing it to gtk_selection_data_set_pixbuf().
(WebCore::ClipboardSetData::ClipboardSetData): Use reference instead of pointer.
(WebCore::getClipboardContentsCallback):
(WebCore::clearClipboardContentsCallback): Never clear the saved DataObjectGtk, that was only needed when we had
a global DataObjectGtk associated to a GtkClipboard.
(WebCore::PasteboardHelper::writeClipboardContents): Use TemporaryChange to set the settingClipboardDataObject global.
* platform/gtk/PlatformPasteboardGtk.cpp:
(WebCore::PlatformPasteboard::writeToClipboard):
(WebCore::PlatformPasteboard::readFromClipboard):

Source/WebKit2:

In some cases the ownership of DataObjectGtk instances is not clear enough, and we have hacks to avoid memory
leaks because of that.

* Shared/gtk/ArgumentCodersGtk.cpp:
(IPC::encodeImage): Use Image instead of GdkPixbuf.
(IPC::decodeImage): Ditto.
(IPC::ArgumentCoder&lt;DataObjectGtk&gt;::encode):
(IPC::ArgumentCoder&lt;DataObjectGtk&gt;::decode):
(IPC::encode): Deleted.
(IPC::decode): Deleted.
(IPC::ArgumentCoder&lt;DragData&gt;::encode): Deleted.
(IPC::ArgumentCoder&lt;DragData&gt;::decode): Deleted.
* Shared/gtk/ArgumentCodersGtk.h:
* Shared/gtk/PasteboardContent.cpp:
(WebKit::PasteboardContent::PasteboardContent): Add empty constructor that creates a new DataObjectGtk, a
constructor that receives a const reference and another one that takes the ownership of the given DataObjectGtk.
(WebKit::PasteboardContent::encode):
(WebKit::PasteboardContent::decode):
* Shared/gtk/PasteboardContent.h: Use Ref instead of RefPtr for the DataObjectGtk member.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::startDrag): Transfer the DataObjectGtk to the DragAndDropHandler, instead of using DragData.
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performDragControllerAction): Instead of sending a DragData object to the web process,
send the DataObjectGtk and DragData members needed as parameters.
(WebKit::WebPageProxy::startDrag): Transfer the received DataObjectGtk to page client, instead of using
DragData. Also notify the web process that drag started.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Update StartDrag message parameters.
* UIProcess/gtk/DragAndDropHandler.cpp:
(WebKit::DragAndDropHandler::DragAndDropHandler): Remove unneeded initialization.
(WebKit::DragAndDropHandler::startDrag): Take ownership of the given DataObjectGtk.
* UIProcess/gtk/DragAndDropHandler.h:
* UIProcess/gtk/WebPasteboardProxyGtk.cpp:
(WebKit::WebPasteboardProxy::writeToClipboard):
(WebKit::WebPasteboardProxy::readFromClipboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::writeToClipboard):
(WebKit::WebPlatformStrategies::readFromClipboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
(WebKit::convertCairoSurfaceToShareableBitmap):
(WebKit::WebDragClient::startDrag): Do not create a DragData and pass the DataObjectGtk directly to the
message. Also notify the WebPage that drag is about to start.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction): Remove explicit DataObjectGtk derefs and simply create a
DragData using the DataObjectGtk pointer as platform data.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Update PerformDragControllerAction message parameters.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreplatformPasteboardh">releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/Pasteboard.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreplatformPasteboardStrategyh">releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/PasteboardStrategy.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreplatformPlatformPasteboardh">releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/PlatformPasteboard.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreplatformgtkDataObjectGtkh">releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/DataObjectGtk.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreplatformgtkPasteboardGtkcpp">releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PasteboardGtk.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreplatformgtkPasteboardHelpercpp">releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PasteboardHelper.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreplatformgtkPlatformPasteboardGtkcpp">releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PlatformPasteboardGtk.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2ChangeLog">releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2SharedgtkArgumentCodersGtkcpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2SharedgtkArgumentCodersGtkh">releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2SharedgtkPasteboardContentcpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/PasteboardContent.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2SharedgtkPasteboardContenth">releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/PasteboardContent.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2UIProcessAPIgtkPageClientImplcpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2UIProcessAPIgtkPageClientImplh">releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2UIProcessPageClienth">releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2UIProcessWebPageProxycpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2UIProcessWebPageProxyh">releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2UIProcessWebPageProxymessagesin">releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2UIProcessgtkDragAndDropHandlercpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2UIProcessgtkDragAndDropHandlerh">releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2UIProcessgtkWebPasteboardProxyGtkcpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/WebPasteboardProxyGtk.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiesh">releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebCoreSupportgtkWebDragClientGtkcpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPageWebPagecpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPageWebPageh">releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPageWebPagemessagesin">releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit214SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2016-09-20  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Clean up DataObjectGtk handling
+        https://bugs.webkit.org/show_bug.cgi?id=162267
+
+        Reviewed by Michael Catanzaro.
+
+        * platform/Pasteboard.h: Use Ref instead of RefPtr for DataObjectGtk member.
+        * platform/PasteboardStrategy.h: Pass a const reference to DataObjectGtk in write method and return a Ref from read.
+        * platform/PlatformPasteboard.h: Ditto.
+        * platform/gtk/DataObjectGtk.h:
+        (WebCore::DataObjectGtk::image): Use Image instead of GdkPixbuf.
+        (WebCore::DataObjectGtk::setImage):
+        * platform/gtk/PasteboardGtk.cpp:
+        (WebCore::Pasteboard::createForDragAndDrop): Use a reference instead of a pointer.
+        (WebCore::Pasteboard::Pasteboard): Receives a reference, so we can also remove the ASSERT.
+        (WebCore::Pasteboard::dataObject):
+        (WebCore::Pasteboard::writeToClipboard): Remove the ShouldIncludeSmartPaste parameter, callers should also update
+        canSmartPaste property of DataObjectGtk before calling this.
+        (WebCore::Pasteboard::writePlainText):
+        (WebCore::Pasteboard::write): Do not convert the image the GdkPixbuf, pass the image to the DataObjectGtk instead.
+        * platform/gtk/PasteboardHelper.cpp:
+        (WebCore::PasteboardHelper::fillSelectionData): Convert the DataObjectGtk image to GdkPixbuf right before
+        passing it to gtk_selection_data_set_pixbuf().
+        (WebCore::ClipboardSetData::ClipboardSetData): Use reference instead of pointer.
+        (WebCore::getClipboardContentsCallback):
+        (WebCore::clearClipboardContentsCallback): Never clear the saved DataObjectGtk, that was only needed when we had
+        a global DataObjectGtk associated to a GtkClipboard.
+        (WebCore::PasteboardHelper::writeClipboardContents): Use TemporaryChange to set the settingClipboardDataObject global.
+        * platform/gtk/PlatformPasteboardGtk.cpp:
+        (WebCore::PlatformPasteboard::writeToClipboard):
+        (WebCore::PlatformPasteboard::readFromClipboard):
+
</ins><span class="cx"> 2016-09-20  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r204552): Athlete search on Strava gives bad rendering.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreplatformPasteboardh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/Pasteboard.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/Pasteboard.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/Pasteboard.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     explicit Pasteboard(const String&amp; name);
</span><del>-    explicit Pasteboard(RefPtr&lt;DataObjectGtk&gt;&amp;&amp;);
</del><ins>+    explicit Pasteboard(DataObjectGtk&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="lines">@@ -220,10 +220,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><del>-    enum class ShouldIncludeSmartPaste { No, Yes };
-    void writeToClipboard(ShouldIncludeSmartPaste = ShouldIncludeSmartPaste::No);
</del><ins>+    void writeToClipboard();
</ins><span class="cx">     void readFromClipboard();
</span><del>-    RefPtr&lt;DataObjectGtk&gt; m_dataObject;
</del><ins>+    Ref&lt;DataObjectGtk&gt; m_dataObject;
</ins><span class="cx">     String m_name;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreplatformPasteboardStrategyh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/PasteboardStrategy.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/PasteboardStrategy.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/PasteboardStrategy.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -73,8 +73,8 @@
</span><span class="cx">     virtual long setStringForType(const String&amp;, const String&amp; pasteboardType, const String&amp; pasteboardName) = 0;
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK)
</span><del>-    virtual void writeToClipboard(const String&amp; pasteboardName, const RefPtr&lt;DataObjectGtk&gt;&amp;) = 0;
-    virtual RefPtr&lt;DataObjectGtk&gt; readFromClipboard(const String&amp; pasteboardName) = 0;
</del><ins>+    virtual void writeToClipboard(const String&amp; pasteboardName, const DataObjectGtk&amp;) = 0;
+    virtual Ref&lt;DataObjectGtk&gt; readFromClipboard(const String&amp; pasteboardName) = 0;
</ins><span class="cx"> #endif // PLATFORM(GTK)
</span><span class="cx"> protected:
</span><span class="cx">     virtual ~PasteboardStrategy()
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreplatformPlatformPasteboardh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/PlatformPasteboard.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/PlatformPasteboard.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/PlatformPasteboard.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -86,8 +86,8 @@
</span><span class="cx">     WEBCORE_EXPORT int count();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><del>-    WEBCORE_EXPORT void writeToClipboard(const RefPtr&lt;DataObjectGtk&gt;&amp;, std::function&lt;void()&gt;&amp;&amp; primarySelectionCleared);
-    WEBCORE_EXPORT RefPtr&lt;DataObjectGtk&gt; readFromClipboard();
</del><ins>+    WEBCORE_EXPORT void writeToClipboard(const DataObjectGtk&amp;, std::function&lt;void()&gt;&amp;&amp; primarySelectionCleared);
+    WEBCORE_EXPORT Ref&lt;DataObjectGtk&gt; readFromClipboard();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreplatformgtkDataObjectGtkh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/DataObjectGtk.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/DataObjectGtk.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/DataObjectGtk.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -18,11 +18,10 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include &quot;FileList.h&quot;
</del><ins>+#include &quot;Image.h&quot;
</ins><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><del>-#include &lt;wtf/glib/GRefPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/text/StringHash.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -37,8 +36,8 @@
</span><span class="cx">     const URL&amp; url() const { return m_url; }
</span><span class="cx">     const String&amp; uriList() const { return m_uriList; }
</span><span class="cx">     const Vector&lt;String&gt;&amp; filenames() const { return m_filenames; }
</span><del>-    GdkPixbuf* image() const { return m_image.get(); }
-    void setImage(GdkPixbuf* newImage) { m_image = newImage; }
</del><ins>+    Image* image() const { return m_image.get(); }
+    void setImage(Image* newImage) { m_image = newImage; }
</ins><span class="cx">     void setURL(const URL&amp;, const String&amp;);
</span><span class="cx">     bool hasUnknownTypeData() const { return !m_unknownTypeData.isEmpty(); }
</span><span class="cx">     bool hasText() const { return !m_text.isEmpty(); }
</span><span class="lines">@@ -74,7 +73,7 @@
</span><span class="cx">     URL m_url;
</span><span class="cx">     String m_uriList;
</span><span class="cx">     Vector&lt;String&gt; m_filenames;
</span><del>-    GRefPtr&lt;GdkPixbuf&gt; m_image;
</del><ins>+    RefPtr&lt;Image&gt; m_image;
</ins><span class="cx">     HashMap&lt;String, String&gt; m_unknownTypeData;
</span><span class="cx">     bool m_canSmartReplace { false };
</span><span class="cx"> };
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreplatformgtkPasteboardGtkcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PasteboardGtk.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PasteboardGtk.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PasteboardGtk.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -62,7 +62,8 @@
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;Pasteboard&gt; Pasteboard::createForDragAndDrop(const DragData&amp; dragData)
</span><span class="cx"> {
</span><del>-    return std::make_unique&lt;Pasteboard&gt;(dragData.platformData());
</del><ins>+    ASSERT(dragData.platformData());
+    return std::make_unique&lt;Pasteboard&gt;(*dragData.platformData());
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -75,10 +76,9 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Pasteboard::Pasteboard(RefPtr&lt;DataObjectGtk&gt;&amp;&amp; dataObject)
-    : m_dataObject(WTFMove(dataObject))
</del><ins>+Pasteboard::Pasteboard(DataObjectGtk&amp; dataObject)
+    : m_dataObject(dataObject)
</ins><span class="cx"> {
</span><del>-    ASSERT(m_dataObject);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Pasteboard::Pasteboard(const String&amp; name)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> 
</span><span class="cx"> const DataObjectGtk&amp; Pasteboard::dataObject() const
</span><span class="cx"> {
</span><del>-    return *m_dataObject;
</del><ins>+    return m_dataObject.get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static ClipboardDataType dataObjectTypeFromHTMLClipboardType(const String&amp; rawType)
</span><span class="lines">@@ -119,11 +119,11 @@
</span><span class="cx">     return ClipboardDataTypeUnknown;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Pasteboard::writeToClipboard(ShouldIncludeSmartPaste shouldIncludeSmartPaste)
</del><ins>+void Pasteboard::writeToClipboard()
</ins><span class="cx"> {
</span><span class="cx">     if (m_name.isNull())
</span><span class="cx">         return;
</span><del>-    m_dataObject-&gt;setCanSmartReplace(shouldIncludeSmartPaste == ShouldIncludeSmartPaste::Yes);
</del><ins>+
</ins><span class="cx">     platformStrategies()-&gt;pasteboardStrategy()-&gt;writeToClipboard(m_name, m_dataObject);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -159,8 +159,9 @@
</span><span class="cx"> {
</span><span class="cx">     m_dataObject-&gt;clearAll();
</span><span class="cx">     m_dataObject-&gt;setText(text);
</span><ins>+    m_dataObject-&gt;setCanSmartReplace(smartReplaceOption == CanSmartReplace);
</ins><span class="cx"> 
</span><del>-    writeToClipboard(smartReplaceOption == CanSmartReplace ? ShouldIncludeSmartPaste::Yes : ShouldIncludeSmartPaste::No);
</del><ins>+    writeToClipboard();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Pasteboard::write(const PasteboardURL&amp; pasteboardURL)
</span><span class="lines">@@ -180,11 +181,8 @@
</span><span class="cx">         m_dataObject-&gt;setURL(pasteboardImage.url.url, pasteboardImage.url.title);
</span><span class="cx">         m_dataObject-&gt;setMarkup(pasteboardImage.url.markup);
</span><span class="cx">     }
</span><ins>+    m_dataObject-&gt;setImage(pasteboardImage.image.get());
</ins><span class="cx"> 
</span><del>-    GRefPtr&lt;GdkPixbuf&gt; pixbuf = adoptGRef(pasteboardImage.image-&gt;getGdkPixbuf());
-    if (pixbuf)
-        m_dataObject-&gt;setImage(pixbuf.get());
-
</del><span class="cx">     writeToClipboard();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -193,8 +191,9 @@
</span><span class="cx">     m_dataObject-&gt;clearAll();
</span><span class="cx">     m_dataObject-&gt;setText(pasteboardContent.text);
</span><span class="cx">     m_dataObject-&gt;setMarkup(pasteboardContent.markup);
</span><ins>+    m_dataObject-&gt;setCanSmartReplace(pasteboardContent.canSmartCopyOrDelete);
</ins><span class="cx"> 
</span><del>-    writeToClipboard(pasteboardContent.canSmartCopyOrDelete ? ShouldIncludeSmartPaste::Yes : ShouldIncludeSmartPaste::No);
</del><ins>+    writeToClipboard();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Pasteboard::writePasteboard(const Pasteboard&amp; sourcePasteboard)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreplatformgtkPasteboardHelpercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PasteboardHelper.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PasteboardHelper.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PasteboardHelper.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -25,9 +25,8 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DataObjectGtk.h&quot;
</span><span class="cx"> #include &quot;GtkVersioning.h&quot;
</span><del>-#include &quot;Pasteboard.h&quot;
-#include &quot;TextResourceDecoder.h&quot;
</del><span class="cx"> #include &lt;gtk/gtk.h&gt;
</span><ins>+#include &lt;wtf/TemporaryChange.h&gt;
</ins><span class="cx"> #include &lt;wtf/glib/GUniquePtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -148,10 +147,11 @@
</span><span class="cx">         gtk_selection_data_set(selectionData, netscapeURLAtom, 8,
</span><span class="cx">             reinterpret_cast&lt;const guchar*&gt;(resultData.get()), strlen(resultData.get()));
</span><span class="cx"> 
</span><del>-    } else if (info == TargetTypeImage)
-        gtk_selection_data_set_pixbuf(selectionData, dataObject.image());
</del><ins>+    } else if (info == TargetTypeImage &amp;&amp; dataObject.hasImage()) {
+        GRefPtr&lt;GdkPixbuf&gt; pixbuf = adoptGRef(dataObject.image()-&gt;getGdkPixbuf());
+        gtk_selection_data_set_pixbuf(selectionData, pixbuf.get());
</ins><span class="cx"> 
</span><del>-    else if (info == TargetTypeSmartPaste)
</del><ins>+    } else if (info == TargetTypeSmartPaste)
</ins><span class="cx">         gtk_selection_data_set_text(selectionData, &quot;&quot;, -1);
</span><span class="cx"> 
</span><span class="cx">     else if (info == TargetTypeUnknown) {
</span><span class="lines">@@ -257,7 +257,7 @@
</span><span class="cx"> static DataObjectGtk* settingClipboardDataObject = 0;
</span><span class="cx"> 
</span><span class="cx"> struct ClipboardSetData {
</span><del>-    ClipboardSetData(DataObjectGtk* dataObject, std::function&lt;void()&gt;&amp;&amp; selectionClearedCallback)
</del><ins>+    ClipboardSetData(DataObjectGtk&amp; dataObject, std::function&lt;void()&gt;&amp;&amp; selectionClearedCallback)
</ins><span class="cx">         : dataObject(dataObject)
</span><span class="cx">         , selectionClearedCallback(WTFMove(selectionClearedCallback))
</span><span class="cx">     {
</span><span class="lines">@@ -267,7 +267,7 @@
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;DataObjectGtk&gt; dataObject;
</del><ins>+    Ref&lt;DataObjectGtk&gt; dataObject;
</ins><span class="cx">     std::function&lt;void()&gt; selectionClearedCallback;
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -274,17 +274,12 @@
</span><span class="cx"> static void getClipboardContentsCallback(GtkClipboard*, GtkSelectionData *selectionData, guint info, gpointer userData)
</span><span class="cx"> {
</span><span class="cx">     auto* data = static_cast&lt;ClipboardSetData*&gt;(userData);
</span><del>-    PasteboardHelper::singleton().fillSelectionData(selectionData, info, *data-&gt;dataObject);
</del><ins>+    PasteboardHelper::singleton().fillSelectionData(selectionData, info, data-&gt;dataObject);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void clearClipboardContentsCallback(GtkClipboard*, gpointer userData)
</span><span class="cx"> {
</span><span class="cx">     std::unique_ptr&lt;ClipboardSetData&gt; data(static_cast&lt;ClipboardSetData*&gt;(userData));
</span><del>-
-    // Only clear the DataObject for this clipboard if we are not currently setting it.
-    if (data-&gt;dataObject.get() != settingClipboardDataObject)
-        data-&gt;dataObject-&gt;clearAll();
-
</del><span class="cx">     if (data-&gt;selectionClearedCallback)
</span><span class="cx">         data-&gt;selectionClearedCallback();
</span><span class="cx"> }
</span><span class="lines">@@ -297,16 +292,13 @@
</span><span class="cx">     GtkTargetEntry* table = gtk_target_table_new_from_list(list.get(), &amp;numberOfTargets);
</span><span class="cx"> 
</span><span class="cx">     if (numberOfTargets &gt; 0 &amp;&amp; table) {
</span><del>-        settingClipboardDataObject = const_cast&lt;DataObjectGtk*&gt;(&amp;dataObject);
-
-        auto data = std::make_unique&lt;ClipboardSetData&gt;(settingClipboardDataObject, WTFMove(primarySelectionCleared));
</del><ins>+        TemporaryChange&lt;DataObjectGtk*&gt; change(settingClipboardDataObject, const_cast&lt;DataObjectGtk*&gt;(&amp;dataObject));
+        auto data = std::make_unique&lt;ClipboardSetData&gt;(*settingClipboardDataObject, WTFMove(primarySelectionCleared));
</ins><span class="cx">         if (gtk_clipboard_set_with_data(clipboard, table, numberOfTargets, getClipboardContentsCallback, clearClipboardContentsCallback, data.get())) {
</span><span class="cx">             gtk_clipboard_set_can_store(clipboard, nullptr, 0);
</span><span class="cx">             // When gtk_clipboard_set_with_data() succeeds clearClipboardContentsCallback takes the ownership of data, so we leak it here.
</span><span class="cx">             data.release();
</span><span class="cx">         }
</span><del>-
-        settingClipboardDataObject = nullptr;
</del><span class="cx">     } else
</span><span class="cx">         gtk_clipboard_clear(clipboard);
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreplatformgtkPlatformPasteboardGtkcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PlatformPasteboardGtk.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PlatformPasteboardGtk.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/PlatformPasteboardGtk.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -34,15 +34,15 @@
</span><span class="cx">     ASSERT(m_clipboard);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void PlatformPasteboard::writeToClipboard(const RefPtr&lt;DataObjectGtk&gt;&amp; dataObject, std::function&lt;void()&gt;&amp;&amp; primarySelectionCleared)
</del><ins>+void PlatformPasteboard::writeToClipboard(const DataObjectGtk&amp; dataObject, std::function&lt;void()&gt;&amp;&amp; primarySelectionCleared)
</ins><span class="cx"> {
</span><del>-    PasteboardHelper::singleton().writeClipboardContents(m_clipboard, *dataObject, gtk_clipboard_get(GDK_SELECTION_PRIMARY) == m_clipboard ? WTFMove(primarySelectionCleared) : nullptr);
</del><ins>+    PasteboardHelper::singleton().writeClipboardContents(m_clipboard, dataObject, gtk_clipboard_get(GDK_SELECTION_PRIMARY) == m_clipboard ? WTFMove(primarySelectionCleared) : nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;DataObjectGtk&gt; PlatformPasteboard::readFromClipboard()
</del><ins>+Ref&lt;DataObjectGtk&gt; PlatformPasteboard::readFromClipboard()
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;DataObjectGtk&gt; dataObject = DataObjectGtk::create();
-    PasteboardHelper::singleton().getClipboardContents(m_clipboard, *dataObject);
</del><ins>+    Ref&lt;DataObjectGtk&gt; dataObject(DataObjectGtk::create());
+    PasteboardHelper::singleton().getClipboardContents(m_clipboard, dataObject.get());
</ins><span class="cx">     return dataObject;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -1,3 +1,61 @@
</span><ins>+2016-09-20  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Clean up DataObjectGtk handling
+        https://bugs.webkit.org/show_bug.cgi?id=162267
+
+        Reviewed by Michael Catanzaro.
+
+        In some cases the ownership of DataObjectGtk instances is not clear enough, and we have hacks to avoid memory
+        leaks because of that.
+
+        * Shared/gtk/ArgumentCodersGtk.cpp:
+        (IPC::encodeImage): Use Image instead of GdkPixbuf.
+        (IPC::decodeImage): Ditto.
+        (IPC::ArgumentCoder&lt;DataObjectGtk&gt;::encode):
+        (IPC::ArgumentCoder&lt;DataObjectGtk&gt;::decode):
+        (IPC::encode): Deleted.
+        (IPC::decode): Deleted.
+        (IPC::ArgumentCoder&lt;DragData&gt;::encode): Deleted.
+        (IPC::ArgumentCoder&lt;DragData&gt;::decode): Deleted.
+        * Shared/gtk/ArgumentCodersGtk.h:
+        * Shared/gtk/PasteboardContent.cpp:
+        (WebKit::PasteboardContent::PasteboardContent): Add empty constructor that creates a new DataObjectGtk, a
+        constructor that receives a const reference and another one that takes the ownership of the given DataObjectGtk.
+        (WebKit::PasteboardContent::encode):
+        (WebKit::PasteboardContent::decode):
+        * Shared/gtk/PasteboardContent.h: Use Ref instead of RefPtr for the DataObjectGtk member.
+        * UIProcess/API/gtk/PageClientImpl.cpp:
+        (WebKit::PageClientImpl::startDrag): Transfer the DataObjectGtk to the DragAndDropHandler, instead of using DragData.
+        * UIProcess/API/gtk/PageClientImpl.h:
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::performDragControllerAction): Instead of sending a DragData object to the web process,
+        send the DataObjectGtk and DragData members needed as parameters.
+        (WebKit::WebPageProxy::startDrag): Transfer the received DataObjectGtk to page client, instead of using
+        DragData. Also notify the web process that drag started.
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in: Update StartDrag message parameters.
+        * UIProcess/gtk/DragAndDropHandler.cpp:
+        (WebKit::DragAndDropHandler::DragAndDropHandler): Remove unneeded initialization.
+        (WebKit::DragAndDropHandler::startDrag): Take ownership of the given DataObjectGtk.
+        * UIProcess/gtk/DragAndDropHandler.h:
+        * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
+        (WebKit::WebPasteboardProxy::writeToClipboard):
+        (WebKit::WebPasteboardProxy::readFromClipboard):
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebKit::WebPlatformStrategies::writeToClipboard):
+        (WebKit::WebPlatformStrategies::readFromClipboard):
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
+        * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
+        (WebKit::convertCairoSurfaceToShareableBitmap):
+        (WebKit::WebDragClient::startDrag): Do not create a DragData and pass the DataObjectGtk directly to the
+        message. Also notify the WebPage that drag is about to start.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::performDragControllerAction): Remove explicit DataObjectGtk derefs and simply create a
+        DragData using the DataObjectGtk pointer as platform data.
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in: Update PerformDragControllerAction message parameters.
+
</ins><span class="cx"> 2016-09-07  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Remove stale WebSoupRequestManager headers
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2SharedgtkArgumentCodersGtkcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -30,10 +30,9 @@
</span><span class="cx"> #include &quot;ShareableBitmap.h&quot;
</span><span class="cx"> #include &quot;WebCoreArgumentCoders.h&quot;
</span><span class="cx"> #include &lt;WebCore/DataObjectGtk.h&gt;
</span><del>-#include &lt;WebCore/DragData.h&gt;
</del><span class="cx"> #include &lt;WebCore/GraphicsContext.h&gt;
</span><del>-#include &lt;WebCore/GtkVersioning.h&gt;
-#include &lt;WebCore/PlatformContextCairo.h&gt;
</del><ins>+#include &lt;WebCore/Image.h&gt;
+#include &lt;gtk/gtk.h&gt;
</ins><span class="cx"> #include &lt;wtf/glib/GUniquePtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -41,16 +40,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace IPC {
</span><span class="cx"> 
</span><del>-static void encodeImage(Encoder&amp; encoder, const GdkPixbuf* pixbuf)
</del><ins>+static void encodeImage(Encoder&amp; encoder, Image&amp; image)
</ins><span class="cx"> {
</span><del>-    IntSize imageSize(gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf));
-    RefPtr&lt;ShareableBitmap&gt; bitmap = ShareableBitmap::createShareable(imageSize, ShareableBitmap::SupportsAlpha);
-    auto graphicsContext = bitmap-&gt;createGraphicsContext();
</del><ins>+    RefPtr&lt;ShareableBitmap&gt; bitmap = ShareableBitmap::createShareable(IntSize(image.size()), ShareableBitmap::SupportsAlpha);
+    bitmap-&gt;createGraphicsContext()-&gt;drawImage(image, IntPoint());
</ins><span class="cx"> 
</span><del>-    cairo_t* cr = graphicsContext-&gt;platformContext()-&gt;cr();
-    gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0);
-    cairo_paint(cr);
-
</del><span class="cx">     ShareableBitmap::Handle handle;
</span><span class="cx">     bitmap-&gt;createHandle(handle);
</span><span class="cx"> 
</span><span class="lines">@@ -57,7 +51,7 @@
</span><span class="cx">     encoder &lt;&lt; handle;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool decodeImage(Decoder&amp; decoder, GRefPtr&lt;GdkPixbuf&gt;&amp; pixbuf)
</del><ins>+static bool decodeImage(Decoder&amp; decoder, RefPtr&lt;Image&gt;&amp; image)
</ins><span class="cx"> {
</span><span class="cx">     ShareableBitmap::Handle handle;
</span><span class="cx">     if (!decoder.decode(handle))
</span><span class="lines">@@ -66,61 +60,51 @@
</span><span class="cx">     RefPtr&lt;ShareableBitmap&gt; bitmap = ShareableBitmap::create(handle);
</span><span class="cx">     if (!bitmap)
</span><span class="cx">         return false;
</span><del>-
-    RefPtr&lt;Image&gt; image = bitmap-&gt;createImage();
</del><ins>+    image = bitmap-&gt;createImage();
</ins><span class="cx">     if (!image)
</span><span class="cx">         return false;
</span><del>-
-    RefPtr&lt;cairo_surface_t&gt; surface = image-&gt;nativeImageForCurrentFrame();
-    if (!surface)
-        return false;
-
-    pixbuf = adoptGRef(gdk_pixbuf_get_from_surface(surface.get(), 0, 0, cairo_image_surface_get_width(surface.get()), cairo_image_surface_get_height(surface.get())));
-    if (!pixbuf)
-        return false;
-
</del><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void encode(Encoder&amp; encoder, const DataObjectGtk* dataObject)
</del><ins>+void ArgumentCoder&lt;DataObjectGtk&gt;::encode(Encoder&amp; encoder, const DataObjectGtk&amp; dataObject)
</ins><span class="cx"> {
</span><del>-    bool hasText = dataObject-&gt;hasText();
</del><ins>+    bool hasText = dataObject.hasText();
</ins><span class="cx">     encoder &lt;&lt; hasText;
</span><span class="cx">     if (hasText)
</span><del>-        encoder &lt;&lt; dataObject-&gt;text();
</del><ins>+        encoder &lt;&lt; dataObject.text();
</ins><span class="cx"> 
</span><del>-    bool hasMarkup = dataObject-&gt;hasMarkup();
</del><ins>+    bool hasMarkup = dataObject.hasMarkup();
</ins><span class="cx">     encoder &lt;&lt; hasMarkup;
</span><span class="cx">     if (hasMarkup)
</span><del>-        encoder &lt;&lt; dataObject-&gt;markup();
</del><ins>+        encoder &lt;&lt; dataObject.markup();
</ins><span class="cx"> 
</span><del>-    bool hasURL = dataObject-&gt;hasURL();
</del><ins>+    bool hasURL = dataObject.hasURL();
</ins><span class="cx">     encoder &lt;&lt; hasURL;
</span><span class="cx">     if (hasURL)
</span><del>-        encoder &lt;&lt; dataObject-&gt;url().string();
</del><ins>+        encoder &lt;&lt; dataObject.url().string();
</ins><span class="cx"> 
</span><del>-    bool hasURIList = dataObject-&gt;hasURIList();
</del><ins>+    bool hasURIList = dataObject.hasURIList();
</ins><span class="cx">     encoder &lt;&lt; hasURIList;
</span><span class="cx">     if (hasURIList)
</span><del>-        encoder &lt;&lt; dataObject-&gt;uriList();
</del><ins>+        encoder &lt;&lt; dataObject.uriList();
</ins><span class="cx"> 
</span><del>-    bool hasImage = dataObject-&gt;hasImage();
</del><ins>+    bool hasImage = dataObject.hasImage();
</ins><span class="cx">     encoder &lt;&lt; hasImage;
</span><span class="cx">     if (hasImage)
</span><del>-        encodeImage(encoder, dataObject-&gt;image());
</del><ins>+        encodeImage(encoder, *dataObject.image());
</ins><span class="cx"> 
</span><del>-    bool hasUnknownTypeData = dataObject-&gt;hasUnknownTypeData();
</del><ins>+    bool hasUnknownTypeData = dataObject.hasUnknownTypeData();
</ins><span class="cx">     encoder &lt;&lt; hasUnknownTypeData;
</span><span class="cx">     if (hasUnknownTypeData)
</span><del>-        encoder &lt;&lt; dataObject-&gt;unknownTypes();
</del><ins>+        encoder &lt;&lt; dataObject.unknownTypes();
</ins><span class="cx"> 
</span><del>-    bool canSmartReplace = dataObject-&gt;canSmartReplace();
</del><ins>+    bool canSmartReplace = dataObject.canSmartReplace();
</ins><span class="cx">     encoder &lt;&lt; canSmartReplace;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool decode(Decoder&amp; decoder, RefPtr&lt;DataObjectGtk&gt;&amp; dataObject)
</del><ins>+bool ArgumentCoder&lt;DataObjectGtk&gt;::decode(Decoder&amp; decoder, DataObjectGtk&amp; dataObject)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;DataObjectGtk&gt; data = DataObjectGtk::create();
</del><ins>+    dataObject.clearAll();
</ins><span class="cx"> 
</span><span class="cx">     bool hasText;
</span><span class="cx">     if (!decoder.decode(hasText))
</span><span class="lines">@@ -129,7 +113,7 @@
</span><span class="cx">         String text;
</span><span class="cx">         if (!decoder.decode(text))
</span><span class="cx">             return false;
</span><del>-        data-&gt;setText(text);
</del><ins>+        dataObject.setText(text);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool hasMarkup;
</span><span class="lines">@@ -139,7 +123,7 @@
</span><span class="cx">         String markup;
</span><span class="cx">         if (!decoder.decode(markup))
</span><span class="cx">             return false;
</span><del>-        data-&gt;setMarkup(markup);
</del><ins>+        dataObject.setMarkup(markup);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool hasURL;
</span><span class="lines">@@ -149,7 +133,7 @@
</span><span class="cx">         String url;
</span><span class="cx">         if (!decoder.decode(url))
</span><span class="cx">             return false;
</span><del>-        data-&gt;setURL(URL(URL(), url), String());
</del><ins>+        dataObject.setURL(URL(URL(), url), String());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool hasURIList;
</span><span class="lines">@@ -159,7 +143,7 @@
</span><span class="cx">         String uriList;
</span><span class="cx">         if (!decoder.decode(uriList))
</span><span class="cx">             return false;
</span><del>-        data-&gt;setURIList(uriList);
</del><ins>+        dataObject.setURIList(uriList);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool hasImage;
</span><span class="lines">@@ -166,10 +150,10 @@
</span><span class="cx">     if (!decoder.decode(hasImage))
</span><span class="cx">         return false;
</span><span class="cx">     if (hasImage) {
</span><del>-        GRefPtr&lt;GdkPixbuf&gt; image;
</del><ins>+        RefPtr&lt;Image&gt; image;
</ins><span class="cx">         if (!decodeImage(decoder, image))
</span><span class="cx">             return false;
</span><del>-        data-&gt;setImage(image.get());
</del><ins>+        dataObject.setImage(image.get());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool hasUnknownTypeData;
</span><span class="lines">@@ -182,68 +166,17 @@
</span><span class="cx"> 
</span><span class="cx">         auto end = unknownTypes.end();
</span><span class="cx">         for (auto it = unknownTypes.begin(); it != end; ++it)
</span><del>-            data-&gt;setUnknownTypeData(it-&gt;key, it-&gt;value);
</del><ins>+            dataObject.setUnknownTypeData(it-&gt;key, it-&gt;value);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool canSmartReplace;
</span><span class="cx">     if (!decoder.decode(canSmartReplace))
</span><span class="cx">         return false;
</span><del>-    data-&gt;setCanSmartReplace(canSmartReplace);
</del><ins>+    dataObject.setCanSmartReplace(canSmartReplace);
</ins><span class="cx"> 
</span><del>-    dataObject = data;
-
</del><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if ENABLE(DRAG_SUPPORT)
-void ArgumentCoder&lt;DragData&gt;::encode(Encoder&amp; encoder, const DragData&amp; dragData)
-{
-    encoder &lt;&lt; dragData.clientPosition();
-    encoder &lt;&lt; dragData.globalPosition();
-    encoder &lt;&lt; static_cast&lt;uint64_t&gt;(dragData.draggingSourceOperationMask());
-    encoder &lt;&lt; static_cast&lt;uint64_t&gt;(dragData.flags());
-
-    DataObjectGtk* platformData = dragData.platformData();
-    encoder &lt;&lt; static_cast&lt;bool&gt;(platformData);
-    if (platformData)
-        IPC::encode(encoder, platformData);
-}
-
-bool ArgumentCoder&lt;DragData&gt;::decode(Decoder&amp; decoder, DragData&amp; dragData)
-{
-    IntPoint clientPosition;
-    if (!decoder.decode(clientPosition))
-        return false;
-
-    IntPoint globalPosition;
-    if (!decoder.decode(globalPosition))
-        return false;
-
-    uint64_t sourceOperationMask;
-    if (!decoder.decode(sourceOperationMask))
-        return false;
-
-    uint64_t flags;
-    if (!decoder.decode(flags))
-        return false;
-
-    bool hasPlatformData;
-    if (!decoder.decode(hasPlatformData))
-        return false;
-
-    RefPtr&lt;DataObjectGtk&gt; platformData;
-    if (hasPlatformData) {
-        if (!IPC::decode(decoder, platformData))
-            return false;
-    }
-
-    dragData = DragData(platformData.leakRef(), clientPosition, globalPosition, static_cast&lt;DragOperation&gt;(sourceOperationMask),
-                        static_cast&lt;DragApplicationFlags&gt;(flags));
-
-    return true;
-}
-#endif // ENABLE(DRAG_SUPPORT)
-
</del><span class="cx"> static void encodeGKeyFile(Encoder&amp; encoder, GKeyFile* keyFile)
</span><span class="cx"> {
</span><span class="cx">     gsize dataSize;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2SharedgtkArgumentCodersGtkh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -34,18 +34,10 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class DataObjectGtk;
</span><del>-class DragData;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> namespace IPC {
</span><span class="cx"> 
</span><del>-#if ENABLE(DRAG_SUPPORT)
-template&lt;&gt; struct ArgumentCoder&lt;WebCore::DragData&gt; {
-    static void encode(Encoder&amp;, const WebCore::DragData&amp;);
-    static bool decode(Decoder&amp;, WebCore::DragData&amp;);
-};
-#endif
-
</del><span class="cx"> void encode(Encoder&amp;, GtkPrintSettings*);
</span><span class="cx"> bool decode(Decoder&amp;, GRefPtr&lt;GtkPrintSettings&gt;&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -52,8 +44,10 @@
</span><span class="cx"> void encode(Encoder&amp;, GtkPageSetup*);
</span><span class="cx"> bool decode(Decoder&amp;, GRefPtr&lt;GtkPageSetup&gt;&amp;);
</span><span class="cx"> 
</span><del>-void encode(Encoder&amp;, const WebCore::DataObjectGtk*);
-bool decode(Decoder&amp;, RefPtr&lt;WebCore::DataObjectGtk&gt;&amp;);
</del><ins>+template&lt;&gt; struct ArgumentCoder&lt;WebCore::DataObjectGtk&gt; {
+    static void encode(Encoder&amp;, const WebCore::DataObjectGtk&amp;);
+    static bool decode(Decoder&amp;, WebCore::DataObjectGtk&amp;);
+};
</ins><span class="cx"> 
</span><span class="cx"> } // namespace IPC
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2SharedgtkPasteboardContentcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/PasteboardContent.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/PasteboardContent.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/PasteboardContent.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -27,20 +27,29 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-PasteboardContent::PasteboardContent(const RefPtr&lt;WebCore::DataObjectGtk&gt;&amp; data)
-    : dataObject(data)
</del><ins>+PasteboardContent::PasteboardContent()
+    : dataObject(WebCore::DataObjectGtk::create())
</ins><span class="cx"> {
</span><del>-    ASSERT(dataObject);
</del><span class="cx"> }
</span><span class="cx"> 
</span><ins>+PasteboardContent::PasteboardContent(const WebCore::DataObjectGtk&amp; data)
+    : dataObject(const_cast&lt;WebCore::DataObjectGtk&amp;&gt;(data))
+{
+}
+
+PasteboardContent::PasteboardContent(Ref&lt;WebCore::DataObjectGtk&gt;&amp;&amp; data)
+    : dataObject(WTFMove(data))
+{
+}
+
</ins><span class="cx"> void PasteboardContent::encode(IPC::Encoder&amp; encoder) const
</span><span class="cx"> {
</span><del>-    IPC::encode(encoder, dataObject.get());
</del><ins>+    encoder &lt;&lt; dataObject.get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool PasteboardContent::decode(IPC::Decoder&amp; decoder, PasteboardContent&amp; pasteboardContent)
</span><span class="cx"> {
</span><del>-    return IPC::decode(decoder, pasteboardContent.dataObject);
</del><ins>+    return decoder.decode(pasteboardContent.dataObject.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2SharedgtkPasteboardContenth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/PasteboardContent.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/PasteboardContent.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/gtk/PasteboardContent.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -29,10 +29,11 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> struct PasteboardContent {
</span><del>-    PasteboardContent() = default;
-    explicit PasteboardContent(const RefPtr&lt;WebCore::DataObjectGtk&gt;&amp;);
</del><ins>+    PasteboardContent();
+    explicit PasteboardContent(const WebCore::DataObjectGtk&amp;);
+    explicit PasteboardContent(Ref&lt;WebCore::DataObjectGtk&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><del>-    RefPtr&lt;WebCore::DataObjectGtk&gt; dataObject;
</del><ins>+    Ref&lt;WebCore::DataObjectGtk&gt; dataObject;
</ins><span class="cx"> 
</span><span class="cx">     void encode(IPC::Encoder&amp;) const;
</span><span class="cx">     static bool decode(IPC::Decoder&amp;, PasteboardContent&amp;);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2UIProcessAPIgtkPageClientImplcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -254,10 +254,10 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><del>-void PageClientImpl::startDrag(const WebCore::DragData&amp; dragData, PassRefPtr&lt;ShareableBitmap&gt; dragImage)
</del><ins>+void PageClientImpl::startDrag(Ref&lt;DataObjectGtk&gt;&amp;&amp; selection, DragOperation dragOperation, RefPtr&lt;ShareableBitmap&gt;&amp;&amp; dragImage)
</ins><span class="cx"> {
</span><span class="cx">     WebKitWebViewBase* webView = WEBKIT_WEB_VIEW_BASE(m_viewWidget);
</span><del>-    webkitWebViewBaseDragAndDropHandler(webView).startDrag(dragData, dragImage);
</del><ins>+    webkitWebViewBaseDragAndDropHandler(webView).startDrag(WTFMove(selection), dragOperation, WTFMove(dragImage));
</ins><span class="cx"> 
</span><span class="cx">     // A drag starting should prevent a double-click from happening. This might
</span><span class="cx">     // happen if a drag is followed very quickly by another click (like in the WTR).
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2UIProcessAPIgtkPageClientImplh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     void selectionDidChange() override;
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><del>-    void startDrag(const WebCore::DragData&amp;, PassRefPtr&lt;ShareableBitmap&gt; dragImage) override;
</del><ins>+    void startDrag(Ref&lt;WebCore::DataObjectGtk&gt;&amp;&amp;, WebCore::DragOperation, RefPtr&lt;ShareableBitmap&gt;&amp;&amp; dragImage) override;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void enterAcceleratedCompositingMode(const LayerTreeContext&amp;) override;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/PageClient.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/PageClient.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/PageClient.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx">     virtual void didChangeContentSize(const WebCore::IntSize&amp;) = 0;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK) &amp;&amp; ENABLE(DRAG_SUPPORT)
</span><del>-    virtual void startDrag(const WebCore::DragData&amp;, PassRefPtr&lt;ShareableBitmap&gt; dragImage) = 0;
</del><ins>+    virtual void startDrag(Ref&lt;WebCore::DataObjectGtk&gt;&amp;&amp;, WebCore::DragOperation, RefPtr&lt;ShareableBitmap&gt;&amp;&amp; dragImage) = 0;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     virtual void setCursor(const WebCore::Cursor&amp;) = 0;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -155,6 +155,10 @@
</span><span class="cx"> #include &lt;WebCore/TextIndicatorWindow.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(GTK)
+#include &quot;PasteboardContent.h&quot;
+#endif
+
</ins><span class="cx"> #if USE(CAIRO)
</span><span class="cx"> #include &lt;WebCore/CairoUtilities.h&gt;
</span><span class="cx"> #endif
</span><span class="lines">@@ -1768,7 +1772,10 @@
</span><span class="cx">     String url = dragData.asURL();
</span><span class="cx">     if (!url.isEmpty())
</span><span class="cx">         m_process-&gt;assumeReadAccessToBaseURL(url);
</span><del>-    m_process-&gt;send(Messages::WebPage::PerformDragControllerAction(action, dragData), m_pageID);
</del><ins>+
+    ASSERT(dragData.platformData());
+    PasteboardContent selection(*dragData.platformData());
+    m_process-&gt;send(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), selection, dragData.flags()), m_pageID);
</ins><span class="cx"> #else
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), dragStorageName, dragData.flags(), sandboxExtensionHandle, sandboxExtensionsForUpload), m_pageID);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1784,16 +1791,12 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><del>-void WebPageProxy::startDrag(const DragData&amp; dragData, const ShareableBitmap::Handle&amp; dragImageHandle)
</del><ins>+void WebPageProxy::startDrag(PasteboardContent&amp;&amp; selection, uint64_t dragOperation, const ShareableBitmap::Handle&amp; dragImageHandle)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;ShareableBitmap&gt; dragImage = 0;
-    if (!dragImageHandle.isNull()) {
-        dragImage = ShareableBitmap::create(dragImageHandle);
-        if (!dragImage)
-            return;
-    }
</del><ins>+    RefPtr&lt;ShareableBitmap&gt; dragImage = !dragImageHandle.isNull() ? ShareableBitmap::create(dragImageHandle) : nullptr;
+    m_pageClient.startDrag(WTFMove(selection.dataObject), static_cast&lt;WebCore::DragOperation&gt;(dragOperation), WTFMove(dragImage));
</ins><span class="cx"> 
</span><del>-    m_pageClient.startDrag(dragData, dragImage.release());
</del><ins>+    m_process-&gt;send(Messages::WebPage::DidStartDrag(), m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -807,7 +807,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK)
</span><del>-    void startDrag(const WebCore::DragData&amp;, const ShareableBitmap::Handle&amp; dragImage);
</del><ins>+    void startDrag(PasteboardContent&amp;&amp;, uint64_t dragOperation, const ShareableBitmap::Handle&amp; dragImage);
</ins><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.messages.in (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK) &amp;&amp; ENABLE(DRAG_SUPPORT)
</span><del>-    StartDrag(WebCore::DragData dragData, WebKit::ShareableBitmap::Handle dragImage)
</del><ins>+    StartDrag(struct WebKit::PasteboardContent selection, uint64_t dragOperation, WebKit::ShareableBitmap::Handle dragImage)
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2UIProcessgtkDragAndDropHandlercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -44,9 +44,6 @@
</span><span class="cx"> 
</span><span class="cx"> DragAndDropHandler::DragAndDropHandler(WebPageProxy&amp; page)
</span><span class="cx">     : m_page(page)
</span><del>-#if GTK_CHECK_VERSION(3, 16, 0)
-    , m_dragContext(nullptr)
-#endif
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -111,18 +108,18 @@
</span><span class="cx">     return static_cast&lt;DragOperation&gt;(action);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DragAndDropHandler::startDrag(const DragData&amp; dragData, PassRefPtr&lt;ShareableBitmap&gt; dragImage)
</del><ins>+void DragAndDropHandler::startDrag(Ref&lt;DataObjectGtk&gt;&amp;&amp; selection, DragOperation dragOperation, RefPtr&lt;ShareableBitmap&gt;&amp;&amp; dragImage)
</ins><span class="cx"> {
</span><span class="cx"> #if GTK_CHECK_VERSION(3, 16, 0)
</span><del>-    m_draggingDataObject = adoptRef(dragData.platformData());
</del><ins>+    m_draggingDataObject = WTFMove(selection);
</ins><span class="cx">     GRefPtr&lt;GtkTargetList&gt; targetList = PasteboardHelper::singleton().targetListForDataObject(*m_draggingDataObject);
</span><span class="cx"> #else
</span><del>-    RefPtr&lt;DataObjectGtk&gt; dataObject = adoptRef(dragData.platformData());
</del><ins>+    RefPtr&lt;DataObjectGtk&gt; dataObject = WTFMove(selection);
</ins><span class="cx">     GRefPtr&lt;GtkTargetList&gt; targetList = PasteboardHelper::singleton().targetListForDataObject(*dataObject);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     GUniquePtr&lt;GdkEvent&gt; currentEvent(gtk_get_current_event());
</span><del>-    GdkDragContext* context = gtk_drag_begin(m_page.viewWidget(), targetList.get(), dragOperationToGdkDragActions(dragData.draggingSourceOperationMask()),
</del><ins>+    GdkDragContext* context = gtk_drag_begin(m_page.viewWidget(), targetList.get(), dragOperationToGdkDragActions(dragOperation),
</ins><span class="cx">         GDK_BUTTON_PRIMARY, currentEvent.get());
</span><span class="cx"> 
</span><span class="cx"> #if GTK_CHECK_VERSION(3, 16, 0)
</span><span class="lines">@@ -135,7 +132,7 @@
</span><span class="cx"> #else
</span><span class="cx">     // We don't have gtk_drag_cancel() in GTK+ &lt; 3.16, so we use the old code.
</span><span class="cx">     // See https://bugs.webkit.org/show_bug.cgi?id=138468
</span><del>-    m_draggingDataObjects.set(context, dataObject.get());
</del><ins>+    m_draggingDataObjects.set(context, WTFMove(dataObject));
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     if (dragImage) {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2UIProcessgtkDragAndDropHandlerh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/DragAndDropHandler.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -23,16 +23,17 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef DragAndDropHandler_h
-#define DragAndDropHandler_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx"> 
</span><span class="cx"> #include &lt;WebCore/DataObjectGtk.h&gt;
</span><ins>+#include &lt;WebCore/DragActions.h&gt;
</ins><span class="cx"> #include &lt;WebCore/IntPoint.h&gt;
</span><span class="cx"> #include &lt;gtk/gtk.h&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><ins>+#include &lt;wtf/glib/GRefPtr.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> typedef struct _GdkDragContext GdkDragContext;
</span><span class="cx"> typedef struct _GtkSelectionData GtkSelectionData;
</span><span class="lines">@@ -51,7 +52,7 @@
</span><span class="cx"> public:
</span><span class="cx">     DragAndDropHandler(WebPageProxy&amp;);
</span><span class="cx"> 
</span><del>-    void startDrag(const WebCore::DragData&amp;, PassRefPtr&lt;ShareableBitmap&gt; dragImage);
</del><ins>+    void startDrag(Ref&lt;WebCore::DataObjectGtk&gt;&amp;&amp;, WebCore::DragOperation, RefPtr&lt;ShareableBitmap&gt;&amp;&amp; dragImage);
</ins><span class="cx">     void fillDragData(GdkDragContext*, GtkSelectionData*, unsigned info);
</span><span class="cx">     void finishDrag(GdkDragContext*);
</span><span class="cx"> 
</span><span class="lines">@@ -90,5 +91,3 @@
</span><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(DRAG_SUPPORT)
</span><del>-
-#endif // DragAndDropHandler_h
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2UIProcessgtkWebPasteboardProxyGtkcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/WebPasteboardProxyGtk.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/WebPasteboardProxyGtk.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/WebPasteboardProxyGtk.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> void WebPasteboardProxy::writeToClipboard(const String&amp; pasteboardName, const PasteboardContent&amp; pasteboardContent)
</span><span class="cx"> {
</span><span class="cx">     TemporaryChange&lt;WebFrameProxy*&gt; frameWritingToClipboard(m_frameWritingToClipboard, m_primarySelectionOwner);
</span><del>-    PlatformPasteboard(pasteboardName).writeToClipboard(pasteboardContent.dataObject, [this] {
</del><ins>+    PlatformPasteboard(pasteboardName).writeToClipboard(pasteboardContent.dataObject.get(), [this] {
</ins><span class="cx">         if (m_frameWritingToClipboard == m_primarySelectionOwner)
</span><span class="cx">             return;
</span><span class="cx">         setPrimarySelectionOwner(nullptr);
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPasteboardProxy::readFromClipboard(const String&amp; pasteboardName, PasteboardContent&amp; pasteboardContent)
</span><span class="cx"> {
</span><del>-    pasteboardContent = PasteboardContent(PlatformPasteboard(pasteboardName).readFromClipboard().get());
</del><ins>+    pasteboardContent = PasteboardContent(PlatformPasteboard(pasteboardName).readFromClipboard());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPasteboardProxy::setPrimarySelectionOwner(WebFrameProxy* frame)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -346,17 +346,17 @@
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> // PasteboardStrategy
</span><span class="cx"> 
</span><del>-void WebPlatformStrategies::writeToClipboard(const String&amp; pasteboardName, const RefPtr&lt;WebCore::DataObjectGtk&gt;&amp; dataObject)
</del><ins>+void WebPlatformStrategies::writeToClipboard(const String&amp; pasteboardName, const DataObjectGtk&amp; dataObject)
</ins><span class="cx"> {
</span><del>-    PasteboardContent pasteboardContent = PasteboardContent(dataObject.get());
</del><ins>+    PasteboardContent pasteboardContent(dataObject);
</ins><span class="cx">     WebProcess::singleton().parentProcessConnection()-&gt;send(Messages::WebPasteboardProxy::WriteToClipboard(pasteboardName, pasteboardContent), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;WebCore::DataObjectGtk&gt; WebPlatformStrategies::readFromClipboard(const String&amp; pasteboardName)
</del><ins>+Ref&lt;DataObjectGtk&gt; WebPlatformStrategies::readFromClipboard(const String&amp; pasteboardName)
</ins><span class="cx"> {
</span><span class="cx">     PasteboardContent pasteboardContent;
</span><span class="cx">     WebProcess::singleton().parentProcessConnection()-&gt;sendSync(Messages::WebPasteboardProxy::ReadFromClipboard(pasteboardName), Messages::WebPasteboardProxy::ReadFromClipboard::Reply(pasteboardContent), 0);
</span><del>-    return pasteboardContent.dataObject;
</del><ins>+    return WTFMove(pasteboardContent.dataObject);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(GTK)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiesh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -87,8 +87,8 @@
</span><span class="cx">     long setStringForType(const String&amp;, const String&amp; pasteboardType, const String&amp; pasteboardName) override;
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK)
</span><del>-    void writeToClipboard(const String&amp; pasteboardName, const RefPtr&lt;WebCore::DataObjectGtk&gt;&amp;) override;
-    RefPtr&lt;WebCore::DataObjectGtk&gt; readFromClipboard(const String&amp; pasteboardName) override;
</del><ins>+    void writeToClipboard(const String&amp; pasteboardName, const WebCore::DataObjectGtk&amp;) override;
+    Ref&lt;WebCore::DataObjectGtk&gt; readFromClipboard(const String&amp; pasteboardName) override;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebCoreSupportgtkWebDragClientGtkcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ArgumentCodersGtk.h&quot;
</span><ins>+#include &quot;PasteboardContent.h&quot;
</ins><span class="cx"> #include &quot;ShareableBitmap.h&quot;
</span><span class="cx"> #include &quot;WebPage.h&quot;
</span><span class="cx"> #include &quot;WebPageProxyMessages.h&quot;
</span><span class="lines">@@ -43,10 +44,10 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;ShareableBitmap&gt; convertCairoSurfaceToShareableBitmap(cairo_surface_t* surface)
</del><ins>+static RefPtr&lt;ShareableBitmap&gt; convertCairoSurfaceToShareableBitmap(cairo_surface_t* surface)
</ins><span class="cx"> {
</span><span class="cx">     if (!surface)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     IntSize imageSize(cairo_image_surface_get_width(surface), cairo_image_surface_get_height(surface));
</span><span class="cx">     RefPtr&lt;ShareableBitmap&gt; bitmap = ShareableBitmap::createShareable(imageSize, ShareableBitmap::SupportsAlpha);
</span><span class="lines">@@ -53,7 +54,7 @@
</span><span class="cx">     auto graphicsContext = bitmap-&gt;createGraphicsContext();
</span><span class="cx"> 
</span><span class="cx">     graphicsContext-&gt;platformContext()-&gt;drawSurfaceToContext(surface, IntRect(IntPoint(), imageSize), IntRect(IntPoint(), imageSize), *graphicsContext);
</span><del>-    return bitmap.release();
</del><ins>+    return bitmap;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, DataTransfer&amp; dataTransfer, Frame&amp;, bool)
</span><span class="lines">@@ -65,9 +66,10 @@
</span><span class="cx">     if (bitmap &amp;&amp; !bitmap-&gt;createHandle(handle))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    const auto&amp; dataObject = dataTransfer.pasteboard().dataObject();
-    DragData dragData(const_cast&lt;DataObjectGtk*&gt;(&amp;dataObject), clientPosition, globalPosition, dataTransfer.sourceOperation());
-    m_page-&gt;send(Messages::WebPageProxy::StartDrag(dragData, handle));
</del><ins>+    m_page-&gt;willStartDrag();
+
+    PasteboardContent selection(dataTransfer.pasteboard().dataObject());
+    m_page-&gt;send(Messages::WebPageProxy::StartDrag(selection, dataTransfer.sourceOperation(), handle));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }; // namespace WebKit.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -214,9 +214,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><ins>+#include &quot;PasteboardContent.h&quot;
+#include &quot;WebPrintOperationGtk.h&quot;
+#include &lt;WebCore/DataObjectGtk.h&gt;
</ins><span class="cx"> #include &lt;gtk/gtk.h&gt;
</span><del>-#include &quot;DataObjectGtk.h&quot;
-#include &quot;WebPrintOperationGtk.h&quot;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -3360,15 +3361,14 @@
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><del>-void WebPage::performDragControllerAction(uint64_t action, WebCore::DragData dragData)
</del><ins>+void WebPage::performDragControllerAction(uint64_t action, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, uint64_t draggingSourceOperationMask, PasteboardContent&amp;&amp; selection, uint32_t flags)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_page) {
</span><span class="cx">         send(Messages::WebPageProxy::DidPerformDragControllerAction(DragOperationNone, false, 0));
</span><del>-        DataObjectGtk* data = const_cast&lt;DataObjectGtk*&gt;(dragData.platformData());
-        data-&gt;deref();
</del><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    DragData dragData(selection.dataObject.ptr(), clientPosition, globalPosition, static_cast&lt;DragOperation&gt;(draggingSourceOperationMask), static_cast&lt;DragApplicationFlags&gt;(flags));
</ins><span class="cx">     switch (action) {
</span><span class="cx">     case DragControllerActionEntered: {
</span><span class="cx">         DragOperation resolvedDragOperation = m_page-&gt;dragController().dragEntered(dragData);
</span><span class="lines">@@ -3392,11 +3392,7 @@
</span><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">     }
</span><del>-    // DragData does not delete its platformData so we need to do that here.
-    DataObjectGtk* data = const_cast&lt;DataObjectGtk*&gt;(dragData.platformData());
-    data-&gt;deref();
</del><span class="cx"> }
</span><del>-
</del><span class="cx"> #else
</span><span class="cx"> void WebPage::performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const String&amp; dragStorageName, uint32_t flags, const SandboxExtension::Handle&amp; sandboxExtensionHandle, const SandboxExtension::HandleArray&amp; sandboxExtensionsHandleArray)
</span><span class="cx"> {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.h (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -203,6 +203,10 @@
</span><span class="cx"> class RemoteLayerTreeTransaction;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(GTK)
+struct PasteboardContent;
+#endif
+
</ins><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx"> class WebTouchEvent;
</span><span class="cx"> #endif
</span><span class="lines">@@ -726,7 +730,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DRAG_SUPPORT)
</span><span class="cx"> #if PLATFORM(GTK)
</span><del>-    void performDragControllerAction(uint64_t action, WebCore::DragData);
</del><ins>+    void performDragControllerAction(uint64_t action, const WebCore::IntPoint&amp; clientPosition, const WebCore::IntPoint&amp; globalPosition, uint64_t draggingSourceOperationMask, PasteboardContent&amp;&amp;, uint32_t flags);
</ins><span class="cx"> #else
</span><span class="cx">     void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WTF::String&amp; dragStorageName, uint32_t flags, const SandboxExtension::Handle&amp;, const SandboxExtension::HandleArray&amp;);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (207087 => 207088)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2016-10-11 11:09:55 UTC (rev 207087)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2016-10-11 11:36:43 UTC (rev 207088)
</span><span class="lines">@@ -236,7 +236,7 @@
</span><span class="cx"> 
</span><span class="cx">     # Drag and drop.
</span><span class="cx"> #if PLATFORM(GTK) &amp;&amp; ENABLE(DRAG_SUPPORT)
</span><del>-    PerformDragControllerAction(uint64_t action, WebCore::DragData dragData)
</del><ins>+    PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, struct WebKit::PasteboardContent selection, uint32_t flags)
</ins><span class="cx"> #endif
</span><span class="cx"> #if !PLATFORM(GTK) &amp;&amp; ENABLE(DRAG_SUPPORT)
</span><span class="cx">     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, String dragStorageName, uint32_t flags, WebKit::SandboxExtension::Handle sandboxExtensionHandle, WebKit::SandboxExtension::HandleArray sandboxExtensionsForUpload)
</span></span></pre>
</div>
</div>

</body>
</html>