<!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>[165707] trunk/Source/WebKit2</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/165707">165707</a></dd>
<dt>Author</dt> <dd>zandobersek@gmail.com</dd>
<dt>Date</dt> <dd>2014-03-16 12:47:00 -0700 (Sun, 16 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move GTK WebKit2 code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129672

Reviewed by Anders Carlsson.

Repace uses of OwnPtr and PassOwnPtr in GTK-specific WebKit2 code with std::unique_ptr.

* Shared/Downloads/Download.h:
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::platformInvalidate):
* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkitContextMenuItemCreate):
(webkitContextMenuItemCreateForGtkItem):
(webkit_context_menu_item_new):
(webkit_context_menu_item_new_from_stock_action):
(webkit_context_menu_item_new_from_stock_action_with_label):
(webkit_context_menu_item_new_with_submenu):
(webkit_context_menu_item_new_separator):
* UIProcess/API/gtk/WebKitTextChecker.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::WebPrintOperationGtk::print):
* WebProcess/gtk/WebGtkExtensionManager.cpp:
(WebKit::WebGtkExtensionManager::initialize):
* WebProcess/soup/WebKitSoupRequestInputStream.cpp:
(webkitSoupRequestInputStreamPendingReadAsyncComplete):
(webkitSoupRequestInputStreamReadAsync):
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::send):
* WebProcess/soup/WebSoupRequestManager.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedDownloadsDownloadh">trunk/Source/WebKit2/Shared/Downloads/Download.h</a></li>
<li><a href="#trunkSourceWebKit2SharedDownloadssoupDownloadSoupcpp">trunk/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkPageClientImplcpp">trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkPageClientImplh">trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitContextMenuItemcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitTextCheckerh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitTextChecker.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewBasecpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagegtkWebPrintOperationGtkcpp">trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessgtkWebGtkExtensionManagercpp">trunk/Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcesssoupWebKitSoupRequestInputStreamcpp">trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestInputStream.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcesssoupWebSoupRequestManagercpp">trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcesssoupWebSoupRequestManagerh">trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/ChangeLog        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2014-03-16  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        Move GTK WebKit2 code to std::unique_ptr
+        https://bugs.webkit.org/show_bug.cgi?id=129672
+
+        Reviewed by Anders Carlsson.
+
+        Repace uses of OwnPtr and PassOwnPtr in GTK-specific WebKit2 code with std::unique_ptr.
+
+        * Shared/Downloads/Download.h:
+        * Shared/Downloads/soup/DownloadSoup.cpp:
+        (WebKit::Download::start):
+        (WebKit::Download::startWithHandle):
+        (WebKit::Download::platformInvalidate):
+        * UIProcess/API/gtk/PageClientImpl.cpp:
+        * UIProcess/API/gtk/PageClientImpl.h:
+        * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
+        (webkitContextMenuItemCreate):
+        (webkitContextMenuItemCreateForGtkItem):
+        (webkit_context_menu_item_new):
+        (webkit_context_menu_item_new_from_stock_action):
+        (webkit_context_menu_item_new_from_stock_action_with_label):
+        (webkit_context_menu_item_new_with_submenu):
+        (webkit_context_menu_item_new_separator):
+        * UIProcess/API/gtk/WebKitTextChecker.h:
+        * UIProcess/API/gtk/WebKitWebContext.cpp:
+        (createDefaultWebContext):
+        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+        (webkitWebViewBaseConstructed):
+        * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
+        (WebKit::WebPrintOperationGtk::print):
+        * WebProcess/gtk/WebGtkExtensionManager.cpp:
+        (WebKit::WebGtkExtensionManager::initialize):
+        * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
+        (webkitSoupRequestInputStreamPendingReadAsyncComplete):
+        (webkitSoupRequestInputStreamReadAsync):
+        * WebProcess/soup/WebSoupRequestManager.cpp:
+        (WebKit::WebSoupRequestManager::send):
+        * WebProcess/soup/WebSoupRequestManager.h:
+
</ins><span class="cx"> 2014-03-16  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: vended backend commands file should be generated as part of the build
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedDownloadsDownloadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Downloads/Download.h (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Downloads/Download.h        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/Shared/Downloads/Download.h        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(EFL)
</span><span class="cx"> #include &lt;WebCore/ResourceHandle.h&gt;
</span><span class="cx"> #include &lt;WebCore/ResourceHandleClient.h&gt;
</span><ins>+#include &lt;memory&gt;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(CFNETWORK)
</span><span class="lines">@@ -131,7 +132,7 @@
</span><span class="cx">     RefPtr&lt;DownloadAuthenticationClient&gt; m_authenticationClient;
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(EFL)
</span><del>-    OwnPtr&lt;WebCore::ResourceHandleClient&gt; m_downloadClient;
</del><ins>+    std::unique_ptr&lt;WebCore::ResourceHandleClient&gt; m_downloadClient;
</ins><span class="cx">     RefPtr&lt;WebCore::ResourceHandle&gt; m_resourceHandle;
</span><span class="cx"> #endif
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedDownloadssoupDownloadSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -212,7 +212,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_downloadClient);
</span><span class="cx">     ASSERT(!m_resourceHandle);
</span><del>-    m_downloadClient = adoptPtr(new DownloadClient(this));
</del><ins>+    m_downloadClient = std::make_unique&lt;DownloadClient&gt;(this);
</ins><span class="cx">     m_resourceHandle = ResourceHandle::create(0, m_request, m_downloadClient.get(), false, false);
</span><span class="cx">     didStart();
</span><span class="cx"> }
</span><span class="lines">@@ -221,7 +221,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_downloadClient);
</span><span class="cx">     ASSERT(!m_resourceHandle);
</span><del>-    m_downloadClient = adoptPtr(new DownloadClient(this));
</del><ins>+    m_downloadClient = std::make_unique&lt;DownloadClient&gt;(this);
</ins><span class="cx">     resourceHandle-&gt;setClient(m_downloadClient.get());
</span><span class="cx">     m_resourceHandle = resourceHandle;
</span><span class="cx">     didStart();
</span><span class="lines">@@ -247,7 +247,8 @@
</span><span class="cx">         m_resourceHandle-&gt;cancel();
</span><span class="cx">         m_resourceHandle = 0;
</span><span class="cx">     }
</span><del>-    m_downloadClient.release();
</del><ins>+
+    m_downloadClient = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Download::didDecideDestination(const String&amp; /*destination*/, bool /*allowOverwrite*/)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkPageClientImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -53,10 +53,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PageClientImpl::~PageClientImpl()
-{
-}
-
</del><span class="cx"> void PageClientImpl::getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent&amp; event, const AtomicString&amp; eventType, Vector&lt;WTF::String&gt;&amp; commandList)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(eventType == eventNames().keydownEvent || eventType == eventNames().keypressEvent);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include &quot;WindowsKeyboardCodes.h&quot;
</span><span class="cx"> #include &lt;WebCore/IntSize.h&gt;
</span><span class="cx"> #include &lt;gtk/gtk.h&gt;
</span><ins>+#include &lt;memory&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="lines">@@ -48,10 +49,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx"> public:
</span><del>-    ~PageClientImpl();
-    static PassOwnPtr&lt;PageClientImpl&gt; create(GtkWidget* viewWidget)
</del><ins>+    static std::unique_ptr&lt;PageClientImpl&gt; create(GtkWidget* viewWidget)
</ins><span class="cx">     {
</span><del>-        return adoptPtr(new PageClientImpl(viewWidget));
</del><ins>+        return std::unique_ptr&lt;PageClientImpl&gt;(new PageClientImpl(viewWidget));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     GtkWidget* viewWidget() { return m_viewWidget; }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitContextMenuItemcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -29,8 +29,7 @@
</span><span class="cx"> #include &lt;WebCore/ContextMenu.h&gt;
</span><span class="cx"> #include &lt;WebCore/ContextMenuItem.h&gt;
</span><span class="cx"> #include &lt;gtk/gtk.h&gt;
</span><del>-#include &lt;wtf/OwnPtr.h&gt;
-#include &lt;wtf/PassOwnPtr.h&gt;
</del><ins>+#include &lt;memory&gt;
</ins><span class="cx"> #include &lt;wtf/gobject/GRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/gobject/GUniquePtr.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -57,7 +56,7 @@
</span><span class="cx">             webkitContextMenuSetParentItem(subMenu.get(), 0);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    OwnPtr&lt;ContextMenuItem&gt; menuItem;
</del><ins>+    std::unique_ptr&lt;ContextMenuItem&gt; menuItem;
</ins><span class="cx">     GRefPtr&lt;WebKitContextMenu&gt; subMenu;
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -95,7 +94,7 @@
</span><span class="cx"> {
</span><span class="cx">     WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(g_object_new(WEBKIT_TYPE_CONTEXT_MENU_ITEM, NULL));
</span><span class="cx">     WebContextMenuItemData* itemData = webItem-&gt;data();
</span><del>-    item-&gt;priv-&gt;menuItem = WTF::adoptPtr(new ContextMenuItem(itemData-&gt;type(), itemData-&gt;action(), itemData-&gt;title(), itemData-&gt;enabled(), itemData-&gt;checked()));
</del><ins>+    item-&gt;priv-&gt;menuItem = std::make_unique&lt;ContextMenuItem&gt;(itemData-&gt;type(), itemData-&gt;action(), itemData-&gt;title(), itemData-&gt;enabled(), itemData-&gt;checked());
</ins><span class="cx">     const Vector&lt;WebContextMenuItemData&gt;&amp; subMenu = itemData-&gt;submenu();
</span><span class="cx">     if (!subMenu.size())
</span><span class="cx">         return item;
</span><span class="lines">@@ -112,7 +111,7 @@
</span><span class="cx"> static WebKitContextMenuItem* webkitContextMenuItemCreateForGtkItem(GtkMenuItem* menuItem)
</span><span class="cx"> {
</span><span class="cx">     WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(g_object_new(WEBKIT_TYPE_CONTEXT_MENU_ITEM, NULL));
</span><del>-    item-&gt;priv-&gt;menuItem = WTF::adoptPtr(new ContextMenuItem(menuItem));
</del><ins>+    item-&gt;priv-&gt;menuItem = std::make_unique&lt;ContextMenuItem&gt;(menuItem);
</ins><span class="cx">     webkitContextMenuItemSetSubMenuFromGtkMenu(item, GTK_MENU(gtk_menu_item_get_submenu(menuItem)));
</span><span class="cx"> 
</span><span class="cx">     return item;
</span><span class="lines">@@ -165,7 +164,7 @@
</span><span class="cx">     g_return_val_if_fail(GTK_IS_ACTION(action), 0);
</span><span class="cx"> 
</span><span class="cx">     WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(g_object_new(WEBKIT_TYPE_CONTEXT_MENU_ITEM, NULL));
</span><del>-    item-&gt;priv-&gt;menuItem = WTF::adoptPtr(new ContextMenuItem(GTK_MENU_ITEM(gtk_action_create_menu_item(action))));
</del><ins>+    item-&gt;priv-&gt;menuItem = std::make_unique&lt;ContextMenuItem&gt;(GTK_MENU_ITEM(gtk_action_create_menu_item(action)));
</ins><span class="cx">     item-&gt;priv-&gt;menuItem-&gt;setAction(ContextMenuItemBaseApplicationTag);
</span><span class="cx"> 
</span><span class="cx">     return item;
</span><span class="lines">@@ -193,7 +192,7 @@
</span><span class="cx"> 
</span><span class="cx">     WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(g_object_new(WEBKIT_TYPE_CONTEXT_MENU_ITEM, NULL));
</span><span class="cx">     ContextMenuItemType type = webkitContextMenuActionIsCheckable(action) ? CheckableActionType : ActionType;
</span><del>-    item-&gt;priv-&gt;menuItem = WTF::adoptPtr(new ContextMenuItem(type, webkitContextMenuActionGetActionTag(action), webkitContextMenuActionGetLabel(action)));
</del><ins>+    item-&gt;priv-&gt;menuItem = std::make_unique&lt;ContextMenuItem&gt;(type, webkitContextMenuActionGetActionTag(action), webkitContextMenuActionGetLabel(action));
</ins><span class="cx"> 
</span><span class="cx">     return item;
</span><span class="cx"> }
</span><span class="lines">@@ -215,7 +214,7 @@
</span><span class="cx"> 
</span><span class="cx">     WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(g_object_new(WEBKIT_TYPE_CONTEXT_MENU_ITEM, NULL));
</span><span class="cx">     ContextMenuItemType type = webkitContextMenuActionIsCheckable(action) ? CheckableActionType : ActionType;
</span><del>-    item-&gt;priv-&gt;menuItem = WTF::adoptPtr(new ContextMenuItem(type, webkitContextMenuActionGetActionTag(action), String::fromUTF8(label)));
</del><ins>+    item-&gt;priv-&gt;menuItem = std::make_unique&lt;ContextMenuItem&gt;(type, webkitContextMenuActionGetActionTag(action), String::fromUTF8(label));
</ins><span class="cx"> 
</span><span class="cx">     return item;
</span><span class="cx"> }
</span><span class="lines">@@ -238,7 +237,7 @@
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(g_object_new(WEBKIT_TYPE_CONTEXT_MENU_ITEM, NULL));
</span><del>-    item-&gt;priv-&gt;menuItem = WTF::adoptPtr(new ContextMenuItem(SubmenuType, ContextMenuItemBaseApplicationTag, String::fromUTF8(label)));
</del><ins>+    item-&gt;priv-&gt;menuItem = std::make_unique&lt;ContextMenuItem&gt;(SubmenuType, ContextMenuItemBaseApplicationTag, String::fromUTF8(label));
</ins><span class="cx">     item-&gt;priv-&gt;subMenu = submenu;
</span><span class="cx">     webkitContextMenuSetParentItem(submenu, item);
</span><span class="cx"> 
</span><span class="lines">@@ -255,7 +254,7 @@
</span><span class="cx"> WebKitContextMenuItem* webkit_context_menu_item_new_separator(void)
</span><span class="cx"> {
</span><span class="cx">     WebKitContextMenuItem* item = WEBKIT_CONTEXT_MENU_ITEM(g_object_new(WEBKIT_TYPE_CONTEXT_MENU_ITEM, NULL));
</span><del>-    item-&gt;priv-&gt;menuItem = WTF::adoptPtr(new ContextMenuItem(SeparatorType, ContextMenuItemTagNoAction, String()));
</del><ins>+    item-&gt;priv-&gt;menuItem = std::make_unique&lt;ContextMenuItem&gt;(SeparatorType, ContextMenuItemTagNoAction, String());
</ins><span class="cx"> 
</span><span class="cx">     return item;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitTextCheckerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitTextChecker.h (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitTextChecker.h        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitTextChecker.h        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;WebCore/TextCheckerEnchant.h&gt;
</span><span class="cx"> #include &lt;wtf/FastMalloc.h&gt;
</span><del>-#include &lt;wtf/PassOwnPtr.h&gt;
</del><ins>+#include &lt;wtf/OwnPtr.h&gt;
</ins><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> #include &lt;wtf/gobject/GRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="lines">@@ -33,8 +33,11 @@
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> 
</span><span class="cx"> public:
</span><del>-    static PassOwnPtr&lt;WebKitTextChecker&gt; create() { return adoptPtr(new WebKitTextChecker()); }
-    virtual ~WebKitTextChecker();
</del><ins>+    static std::unique_ptr&lt;WebKitTextChecker&gt; create()
+    {
+        return std::unique_ptr&lt;WebKitTextChecker&gt;(new WebKitTextChecker);
+    }
+    ~WebKitTextChecker();
</ins><span class="cx"> 
</span><span class="cx">     // For implementing TextCheckerClient.
</span><span class="cx">     bool isSpellCheckingEnabled() { return m_spellCheckingEnabled; }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -46,9 +46,9 @@
</span><span class="cx"> #include &lt;WebCore/FileSystem.h&gt;
</span><span class="cx"> #include &lt;WebCore/IconDatabase.h&gt;
</span><span class="cx"> #include &lt;WebCore/Language.h&gt;
</span><ins>+#include &lt;memory&gt;
</ins><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><del>-#include &lt;wtf/OwnPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/gobject/GRefPtr.h&gt;
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">     RefPtr&lt;WebKitBatteryProvider&gt; batteryProvider;
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(SPELLCHECK)
</span><del>-    OwnPtr&lt;WebKitTextChecker&gt; textChecker;
</del><ins>+    std::unique_ptr&lt;WebKitTextChecker&gt; textChecker;
</ins><span class="cx"> #endif
</span><span class="cx">     CString faviconDatabaseDirectory;
</span><span class="cx">     WebKitTLSErrorsPolicy tlsErrorsPolicy;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -65,6 +65,7 @@
</span><span class="cx"> #ifdef GDK_WINDOWING_X11
</span><span class="cx"> #include &lt;gdk/gdkx.h&gt;
</span><span class="cx"> #endif
</span><ins>+#include &lt;memory&gt;
</ins><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/gobject/GRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="lines">@@ -88,7 +89,7 @@
</span><span class="cx"> 
</span><span class="cx"> struct _WebKitWebViewBasePrivate {
</span><span class="cx">     WebKitWebViewChildrenMap children;
</span><del>-    OwnPtr&lt;PageClientImpl&gt; pageClient;
</del><ins>+    std::unique_ptr&lt;PageClientImpl&gt; pageClient;
</ins><span class="cx">     RefPtr&lt;WebPageProxy&gt; pageProxy;
</span><span class="cx">     bool shouldForwardNextKeyEvent;
</span><span class="cx">     GtkClickCounter clickCounter;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagegtkWebPrintOperationGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #include &lt;WebCore/ResourceError.h&gt;
</span><span class="cx"> #include &lt;WebCore/URL.h&gt;
</span><span class="cx"> #include &lt;gtk/gtk.h&gt;
</span><ins>+#include &lt;memory&gt;
</ins><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> #include &lt;wtf/gobject/GUniquePtr.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -713,7 +714,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_printContext);
</span><span class="cx"> 
</span><del>-    OwnPtr&lt;PrintPagesData&gt; data = adoptPtr(new PrintPagesData(this));
</del><ins>+    auto data = std::make_unique&lt;PrintPagesData&gt;(this);
</ins><span class="cx">     if (!data-&gt;isValid) {
</span><span class="cx">         cairo_surface_finish(surface);
</span><span class="cx">         printDone(invalidPageRangeToPrint(frameURL()));
</span><span class="lines">@@ -729,7 +730,7 @@
</span><span class="cx">     // operation has finished. See https://bugs.webkit.org/show_bug.cgi?id=122801.
</span><span class="cx">     unsigned idlePriority = m_printMode == PrintInfo::PrintModeSync ? G_PRIORITY_DEFAULT - 10 : G_PRIORITY_DEFAULT_IDLE + 10;
</span><span class="cx">     GMainLoop* mainLoop = data-&gt;mainLoop.get();
</span><del>-    m_printPagesIdleId = gdk_threads_add_idle_full(idlePriority, printPagesIdle, data.leakPtr(), printPagesIdleDone);
</del><ins>+    m_printPagesIdleId = gdk_threads_add_idle_full(idlePriority, printPagesIdle, data.release(), printPagesIdleDone);
</ins><span class="cx">     if (m_printMode == PrintInfo::PrintModeSync) {
</span><span class="cx">         ASSERT(mainLoop);
</span><span class="cx">         g_main_loop_run(mainLoop);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessgtkWebGtkExtensionManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #include &quot;WKType.h&quot;
</span><span class="cx"> #include &quot;WebKitWebExtensionPrivate.h&quot;
</span><span class="cx"> #include &lt;WebCore/FileSystem.h&gt;
</span><del>-#include &lt;wtf/OwnPtr.h&gt;
</del><ins>+#include &lt;memory&gt;
</ins><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -105,11 +105,11 @@
</span><span class="cx">     scanModules(webExtensionsDirectory, modulePaths);
</span><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i &lt; modulePaths.size(); ++i) {
</span><del>-        OwnPtr&lt;Module&gt; module = adoptPtr(new Module(modulePaths[i]));
</del><ins>+        auto module = std::make_unique&lt;Module&gt;(modulePaths[i]);
</ins><span class="cx">         if (!module-&gt;load())
</span><span class="cx">             continue;
</span><span class="cx">         if (initializeWebExtension(module.get(), userData.get()))
</span><del>-            m_extensionModules.append(module.leakPtr());
</del><ins>+            m_extensionModules.append(module.release());
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesssoupWebKitSoupRequestInputStreamcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestInputStream.cpp (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestInputStream.cpp        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestInputStream.cpp        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -20,8 +20,6 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;WebKitSoupRequestInputStream.h&quot;
</span><span class="cx"> 
</span><del>-#include &lt;wtf/OwnPtr.h&gt;
-#include &lt;wtf/PassOwnPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/Threading.h&gt;
</span><span class="cx"> #include &lt;wtf/gobject/GRefPtr.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -46,7 +44,7 @@
</span><span class="cx">     uint64_t bytesRead;
</span><span class="cx"> 
</span><span class="cx">     Mutex readLock;
</span><del>-    OwnPtr&lt;AsyncReadData&gt; pendingAsyncRead;
</del><ins>+    std::unique_ptr&lt;AsyncReadData&gt; pendingAsyncRead;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> G_DEFINE_TYPE(WebKitSoupRequestInputStream, webkit_soup_request_input_stream, G_TYPE_MEMORY_INPUT_STREAM)
</span><span class="lines">@@ -70,7 +68,7 @@
</span><span class="cx"> 
</span><span class="cx">     AsyncReadData* data = stream-&gt;priv-&gt;pendingAsyncRead.get();
</span><span class="cx">     webkitSoupRequestInputStreamReadAsyncResultComplete(stream, data-&gt;result.get(), data-&gt;buffer, data-&gt;count, data-&gt;cancellable.get());
</span><del>-    stream-&gt;priv-&gt;pendingAsyncRead.clear();
</del><ins>+    stream-&gt;priv-&gt;pendingAsyncRead = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool webkitSoupRequestInputStreamHasDataToRead(WebKitSoupRequestInputStream* stream)
</span><span class="lines">@@ -101,7 +99,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    stream-&gt;priv-&gt;pendingAsyncRead = adoptPtr(new AsyncReadData(result.get(), buffer, count, cancellable));
</del><ins>+    stream-&gt;priv-&gt;pendingAsyncRead = std::make_unique&lt;AsyncReadData&gt;(result.get(), buffer, count, cancellable);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static gssize webkitSoupRequestInputStreamReadFinish(GInputStream*, GAsyncResult* result, GError**)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesssoupWebSoupRequestManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx">     GUniquePtr&lt;char&gt; uriString(soup_uri_to_string(soup_request_get_uri(soupRequest), FALSE));
</span><span class="cx"> 
</span><span class="cx">     uint64_t requestID = generateSoupRequestID();
</span><del>-    m_requestMap.set(requestID, adoptPtr(new WebSoupRequestAsyncData(task, request)));
</del><ins>+    m_requestMap.set(requestID, std::make_unique&lt;WebSoupRequestAsyncData&gt;(task, request));
</ins><span class="cx"> 
</span><span class="cx">     uint64_t initiatingPageID = WebCore::ResourceRequest(soupRequest).initiatingPageID();
</span><span class="cx">     m_process-&gt;parentProcessConnection()-&gt;send(Messages::WebPageProxy::DidReceiveURIRequest(String::fromUTF8(uriString.get()), requestID), initiatingPageID);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesssoupWebSoupRequestManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.h (165706 => 165707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.h        2014-03-16 19:25:57 UTC (rev 165706)
+++ trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.h        2014-03-16 19:47:00 UTC (rev 165707)
</span><span class="lines">@@ -24,9 +24,9 @@
</span><span class="cx"> #include &quot;MessageReceiver.h&quot;
</span><span class="cx"> #include &quot;WebProcessSupplement.h&quot;
</span><span class="cx"> #include &lt;WebCore/ResourceError.h&gt;
</span><ins>+#include &lt;memory&gt;
</ins><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><del>-#include &lt;wtf/OwnPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/gobject/GRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> 
</span><span class="cx">     WebProcess* m_process;
</span><span class="cx">     GRefPtr&lt;GPtrArray&gt; m_schemes;
</span><del>-    HashMap&lt;uint64_t, OwnPtr&lt;WebSoupRequestAsyncData&gt; &gt; m_requestMap;
</del><ins>+    HashMap&lt;uint64_t, std::unique_ptr&lt;WebSoupRequestAsyncData&gt; &gt; m_requestMap;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>

</body>
</html>