<!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 <zdobersek@igalia.com>
+
+ 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 <bburg@apple.com>
</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 <WebCore/ResourceHandle.h>
</span><span class="cx"> #include <WebCore/ResourceHandleClient.h>
</span><ins>+#include <memory>
</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<DownloadAuthenticationClient> m_authenticationClient;
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK) || PLATFORM(EFL)
</span><del>- OwnPtr<WebCore::ResourceHandleClient> m_downloadClient;
</del><ins>+ std::unique_ptr<WebCore::ResourceHandleClient> m_downloadClient;
</ins><span class="cx"> RefPtr<WebCore::ResourceHandle> 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<DownloadClient>(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<DownloadClient>(this);
</ins><span class="cx"> resourceHandle->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->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& /*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& event, const AtomicString& eventType, Vector<WTF::String>& 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 "WindowsKeyboardCodes.h"
</span><span class="cx"> #include <WebCore/IntSize.h>
</span><span class="cx"> #include <gtk/gtk.h>
</span><ins>+#include <memory>
</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<PageClientImpl> create(GtkWidget* viewWidget)
</del><ins>+ static std::unique_ptr<PageClientImpl> create(GtkWidget* viewWidget)
</ins><span class="cx"> {
</span><del>- return adoptPtr(new PageClientImpl(viewWidget));
</del><ins>+ return std::unique_ptr<PageClientImpl>(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 <WebCore/ContextMenu.h>
</span><span class="cx"> #include <WebCore/ContextMenuItem.h>
</span><span class="cx"> #include <gtk/gtk.h>
</span><del>-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
</del><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/gobject/GRefPtr.h>
</span><span class="cx"> #include <wtf/gobject/GUniquePtr.h>
</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<ContextMenuItem> menuItem;
</del><ins>+ std::unique_ptr<ContextMenuItem> menuItem;
</ins><span class="cx"> GRefPtr<WebKitContextMenu> 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->data();
</span><del>- item->priv->menuItem = WTF::adoptPtr(new ContextMenuItem(itemData->type(), itemData->action(), itemData->title(), itemData->enabled(), itemData->checked()));
</del><ins>+ item->priv->menuItem = std::make_unique<ContextMenuItem>(itemData->type(), itemData->action(), itemData->title(), itemData->enabled(), itemData->checked());
</ins><span class="cx"> const Vector<WebContextMenuItemData>& subMenu = itemData->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->priv->menuItem = WTF::adoptPtr(new ContextMenuItem(menuItem));
</del><ins>+ item->priv->menuItem = std::make_unique<ContextMenuItem>(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->priv->menuItem = WTF::adoptPtr(new ContextMenuItem(GTK_MENU_ITEM(gtk_action_create_menu_item(action))));
</del><ins>+ item->priv->menuItem = std::make_unique<ContextMenuItem>(GTK_MENU_ITEM(gtk_action_create_menu_item(action)));
</ins><span class="cx"> item->priv->menuItem->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->priv->menuItem = WTF::adoptPtr(new ContextMenuItem(type, webkitContextMenuActionGetActionTag(action), webkitContextMenuActionGetLabel(action)));
</del><ins>+ item->priv->menuItem = std::make_unique<ContextMenuItem>(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->priv->menuItem = WTF::adoptPtr(new ContextMenuItem(type, webkitContextMenuActionGetActionTag(action), String::fromUTF8(label)));
</del><ins>+ item->priv->menuItem = std::make_unique<ContextMenuItem>(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->priv->menuItem = WTF::adoptPtr(new ContextMenuItem(SubmenuType, ContextMenuItemBaseApplicationTag, String::fromUTF8(label)));
</del><ins>+ item->priv->menuItem = std::make_unique<ContextMenuItem>(SubmenuType, ContextMenuItemBaseApplicationTag, String::fromUTF8(label));
</ins><span class="cx"> item->priv->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->priv->menuItem = WTF::adoptPtr(new ContextMenuItem(SeparatorType, ContextMenuItemTagNoAction, String()));
</del><ins>+ item->priv->menuItem = std::make_unique<ContextMenuItem>(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 <WebCore/TextCheckerEnchant.h>
</span><span class="cx"> #include <wtf/FastMalloc.h>
</span><del>-#include <wtf/PassOwnPtr.h>
</del><ins>+#include <wtf/OwnPtr.h>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/gobject/GRefPtr.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</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<WebKitTextChecker> create() { return adoptPtr(new WebKitTextChecker()); }
- virtual ~WebKitTextChecker();
</del><ins>+ static std::unique_ptr<WebKitTextChecker> create()
+ {
+ return std::unique_ptr<WebKitTextChecker>(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 <WebCore/FileSystem.h>
</span><span class="cx"> #include <WebCore/IconDatabase.h>
</span><span class="cx"> #include <WebCore/Language.h>
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><del>-#include <wtf/OwnPtr.h>
</del><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/gobject/GRefPtr.h>
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx"> RefPtr<WebKitBatteryProvider> batteryProvider;
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(SPELLCHECK)
</span><del>- OwnPtr<WebKitTextChecker> textChecker;
</del><ins>+ std::unique_ptr<WebKitTextChecker> 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 <gdk/gdkx.h>
</span><span class="cx"> #endif
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/gobject/GRefPtr.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</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<PageClientImpl> pageClient;
</del><ins>+ std::unique_ptr<PageClientImpl> pageClient;
</ins><span class="cx"> RefPtr<WebPageProxy> 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 <WebCore/ResourceError.h>
</span><span class="cx"> #include <WebCore/URL.h>
</span><span class="cx"> #include <gtk/gtk.h>
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/gobject/GUniquePtr.h>
</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<PrintPagesData> data = adoptPtr(new PrintPagesData(this));
</del><ins>+ auto data = std::make_unique<PrintPagesData>(this);
</ins><span class="cx"> if (!data->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->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 "WKType.h"
</span><span class="cx"> #include "WebKitWebExtensionPrivate.h"
</span><span class="cx"> #include <WebCore/FileSystem.h>
</span><del>-#include <wtf/OwnPtr.h>
</del><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/text/CString.h>
</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 < modulePaths.size(); ++i) {
</span><del>- OwnPtr<Module> module = adoptPtr(new Module(modulePaths[i]));
</del><ins>+ auto module = std::make_unique<Module>(modulePaths[i]);
</ins><span class="cx"> if (!module->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 "config.h"
</span><span class="cx"> #include "WebKitSoupRequestInputStream.h"
</span><span class="cx">
</span><del>-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
</del><span class="cx"> #include <wtf/Threading.h>
</span><span class="cx"> #include <wtf/gobject/GRefPtr.h>
</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<AsyncReadData> pendingAsyncRead;
</del><ins>+ std::unique_ptr<AsyncReadData> 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->priv->pendingAsyncRead.get();
</span><span class="cx"> webkitSoupRequestInputStreamReadAsyncResultComplete(stream, data->result.get(), data->buffer, data->count, data->cancellable.get());
</span><del>- stream->priv->pendingAsyncRead.clear();
</del><ins>+ stream->priv->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->priv->pendingAsyncRead = adoptPtr(new AsyncReadData(result.get(), buffer, count, cancellable));
</del><ins>+ stream->priv->pendingAsyncRead = std::make_unique<AsyncReadData>(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<char> 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<WebSoupRequestAsyncData>(task, request));
</ins><span class="cx">
</span><span class="cx"> uint64_t initiatingPageID = WebCore::ResourceRequest(soupRequest).initiatingPageID();
</span><span class="cx"> m_process->parentProcessConnection()->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 "MessageReceiver.h"
</span><span class="cx"> #include "WebProcessSupplement.h"
</span><span class="cx"> #include <WebCore/ResourceError.h>
</span><ins>+#include <memory>
</ins><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><del>-#include <wtf/OwnPtr.h>
</del><span class="cx"> #include <wtf/gobject/GRefPtr.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</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<GPtrArray> m_schemes;
</span><del>- HashMap<uint64_t, OwnPtr<WebSoupRequestAsyncData> > m_requestMap;
</del><ins>+ HashMap<uint64_t, std::unique_ptr<WebSoupRequestAsyncData> > m_requestMap;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>
</body>
</html>