| Differences between
and this patch
- a/Source/WebKit2/ChangeLog +89 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2014-03-04  Zan Dobersek  <zdobersek@igalia.com>
2
3
        Move cross-port WebKit2 code to std::unique_ptr
4
        https://bugs.webkit.org/show_bug.cgi?id=129670
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Replace uses of OwnPtr, PassOwnPtr in cross-port WebKit2 code with std::unique_ptr.
9
10
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
11
        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
12
        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
13
        * NetworkProcess/NetworkProcess.h:
14
        (WebKit::NetworkProcess::addSupplement):
15
        * NetworkProcess/SynchronousNetworkLoaderClient.cpp:
16
        (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
17
        * NetworkProcess/SynchronousNetworkLoaderClient.h:
18
        * Platform/IPC/Connection.cpp:
19
        (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
20
        * Platform/IPC/Connection.h:
21
        * Platform/IPC/MessageReceiver.h:
22
        * Platform/Module.h:
23
        * Platform/WorkQueue.h:
24
        * Platform/efl/ModuleEfl.cpp:
25
        (WebKit::Module::load):
26
        * Platform/mac/LayerHostingContext.mm:
27
        * Shared/APIURL.h:
28
        * Shared/Network/CustomProtocols/CustomProtocolManager.h:
29
        * Shared/Plugins/NPRemoteObjectMap.cpp:
30
        * Shared/ShareableBitmap.h:
31
        * UIProcess/DrawingAreaProxyImpl.h:
32
        * UIProcess/InspectorServer/WebSocketServer.cpp:
33
        (WebKit::WebSocketServer::didAcceptConnection):
34
        (WebKit::WebSocketServer::didCloseWebSocketServerConnection):
35
        * UIProcess/InspectorServer/WebSocketServer.h:
36
        * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
37
        (WebKit::connectionCallback):
38
        * UIProcess/Network/NetworkProcessProxy.cpp:
39
        (WebKit::NetworkProcessProxy::createDownloadProxy):
40
        * UIProcess/Network/NetworkProcessProxy.h:
41
        * UIProcess/Notifications/WebNotificationManagerProxy.h:
42
        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
43
        (WebKit::WebPluginSiteDataManager::getSitesWithData):
44
        (WebKit::WebPluginSiteDataManager::clearSiteData):
45
        (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins):
46
        (WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins):
47
        * UIProcess/Plugins/WebPluginSiteDataManager.h:
48
        * UIProcess/Storage/StorageManager.cpp:
49
        (WebKit::callCallbackFunction):
50
        (WebKit::StorageManager::getOriginsInternal):
51
        * UIProcess/WebPageProxy.cpp:
52
        (WebKit::ExceededDatabaseQuotaRecords::areBeingProcessed):
53
        (WebKit::ExceededDatabaseQuotaRecords::createRecord):
54
        (WebKit::ExceededDatabaseQuotaRecords::add):
55
        (WebKit::ExceededDatabaseQuotaRecords::next):
56
        (WebKit::WebPageProxy::handleMouseEvent):
57
        (WebKit::WebPageProxy::handleWheelEvent):
58
        (WebKit::WebPageProxy::processNextQueuedWheelEvent):
59
        (WebKit::WebPageProxy::internalShowContextMenu):
60
        * UIProcess/WebPageProxy.h:
61
        * UIProcess/WebProcessProxy.cpp:
62
        (WebKit::WebProcessProxy::createDownloadProxy):
63
        * UIProcess/WebProcessProxy.h:
64
        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
65
        (WebKit::PluginDestructionProtector::PluginDestructionProtector):
66
        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
67
        (WebKit::NetscapePluginStream::deliverData):
68
        * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
69
        * WebProcess/Plugins/PluginProcessConnectionManager.h:
70
        * WebProcess/Plugins/PluginProxy.cpp:
71
        (WebKit::PluginProxy::initialize):
72
        (WebKit::PluginProxy::didCreatePluginInternal):
73
        (WebKit::PluginProxy::didFailToCreatePluginInternal):
74
        * WebProcess/Plugins/PluginProxy.h:
75
        * WebProcess/Plugins/PluginView.cpp:
76
        (WebKit::PluginView::createWebEvent):
77
        (WebKit::PluginView::handleEvent):
78
        * WebProcess/Plugins/PluginView.h:
79
        * WebProcess/WebCoreSupport/WebPopupMenu.h:
80
        * WebProcess/WebPage/EventDispatcher.cpp:
81
        (WebKit::EventDispatcher::EventDispatcher):
82
        * WebProcess/WebPage/EventDispatcher.h:
83
        * WebProcess/WebPage/WebPage.cpp:
84
        (WebKit::WebPage::WebPage):
85
        (WebKit::WebPage::beginPrinting):
86
        * WebProcess/WebPage/WebPage.h:
87
        * WebProcess/WebProcess.h:
88
        (WebKit::WebProcess::addSupplement):
89
1
2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
90
2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
2
91
3
        [iOS][WK2] WebPage::updateVisibleContentRects can set the position directly instead of using programmatic scrolling
92
        [iOS][WK2] WebPage::updateVisibleContentRects can set the position directly instead of using programmatic scrolling
- a/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp -3 / +3 lines
Lines 631-637 bool UniqueIDBDatabaseBackingStoreSQLite::createIndex(const IDBIdentifier& trans a/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp_sec1
631
631
632
    m_cursors.set(cursor->identifier(), cursor);
632
    m_cursors.set(cursor->identifier(), cursor);
633
633
634
    OwnPtr<APIEntryShim> shim;
634
    std::unique_ptr<APIEntryShim> shim;
635
    while (!cursor->currentKey().isNull) {
635
    while (!cursor->currentKey().isNull) {
636
        const IDBKeyData& key = cursor->currentKey();
636
        const IDBKeyData& key = cursor->currentKey();
637
        const Vector<uint8_t>& valueBuffer = cursor->currentValueBuffer();
637
        const Vector<uint8_t>& valueBuffer = cursor->currentValueBuffer();
Lines 639-650 bool UniqueIDBDatabaseBackingStoreSQLite::createIndex(const IDBIdentifier& trans a/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp_sec2
639
        if (!m_globalObject) {
639
        if (!m_globalObject) {
640
            ASSERT(!m_vm);
640
            ASSERT(!m_vm);
641
            m_vm = VM::create();
641
            m_vm = VM::create();
642
            shim = adoptPtr(new APIEntryShim(m_vm.get()));
642
            shim = std::make_unique<APIEntryShim>(m_vm.get());
643
            m_globalObject.set(*m_vm, JSGlobalObject::create(*m_vm, JSGlobalObject::createStructure(*m_vm, jsNull())));
643
            m_globalObject.set(*m_vm, JSGlobalObject::create(*m_vm, JSGlobalObject::createStructure(*m_vm, jsNull())));
644
        }
644
        }
645
645
646
        if (!shim)
646
        if (!shim)
647
            shim = adoptPtr(new APIEntryShim(m_vm.get()));
647
            shim = std::make_unique<APIEntryShim>(m_vm.get());
648
648
649
        Deprecated::ScriptValue value = deserializeIDBValueBuffer(m_globalObject->globalExec(), valueBuffer, true);
649
        Deprecated::ScriptValue value = deserializeIDBValueBuffer(m_globalObject->globalExec(), valueBuffer, true);
650
        Vector<IDBKeyData> indexKeys;
650
        Vector<IDBKeyData> indexKeys;
- a/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h -1 lines
Lines 31-37 a/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h_sec1
31
#include "UniqueIDBDatabase.h" 
31
#include "UniqueIDBDatabase.h" 
32
#include "UniqueIDBDatabaseBackingStore.h"
32
#include "UniqueIDBDatabaseBackingStore.h"
33
#include <JavaScriptCore/Strong.h>
33
#include <JavaScriptCore/Strong.h>
34
#include <wtf/OwnPtr.h>
35
#include <wtf/PassRefPtr.h>
34
#include <wtf/PassRefPtr.h>
36
#include <wtf/text/WTFString.h>
35
#include <wtf/text/WTFString.h>
37
36
- a/Source/WebKit2/NetworkProcess/NetworkProcess.h -2 / +3 lines
Lines 34-39 a/Source/WebKit2/NetworkProcess/NetworkProcess.h_sec1
34
#include "MessageReceiverMap.h"
34
#include "MessageReceiverMap.h"
35
#include "NetworkResourceLoadScheduler.h"
35
#include "NetworkResourceLoadScheduler.h"
36
#include <WebCore/SessionID.h>
36
#include <WebCore/SessionID.h>
37
#include <memory>
37
#include <wtf/Forward.h>
38
#include <wtf/Forward.h>
38
#include <wtf/NeverDestroyed.h>
39
#include <wtf/NeverDestroyed.h>
39
40
Lines 63-69 public: a/Source/WebKit2/NetworkProcess/NetworkProcess.h_sec2
63
    template <typename T>
64
    template <typename T>
64
    void addSupplement()
65
    void addSupplement()
65
    {
66
    {
66
        m_supplements.add(T::supplementName(), adoptPtr<NetworkProcessSupplement>(new T(this)));
67
        m_supplements.add(T::supplementName(), std::make_unique<T>(this));
67
    }
68
    }
68
69
69
    void removeNetworkConnectionToWebProcess(NetworkConnectionToWebProcess*);
70
    void removeNetworkConnectionToWebProcess(NetworkConnectionToWebProcess*);
Lines 131-137 private: a/Source/WebKit2/NetworkProcess/NetworkProcess.h_sec3
131
    bool m_hasSetCacheModel;
132
    bool m_hasSetCacheModel;
132
    CacheModel m_cacheModel;
133
    CacheModel m_cacheModel;
133
134
134
    typedef HashMap<const char*, OwnPtr<NetworkProcessSupplement>, PtrHash<const char*>> NetworkProcessSupplementMap;
135
    typedef HashMap<const char*, std::unique_ptr<NetworkProcessSupplement>, PtrHash<const char*>> NetworkProcessSupplementMap;
135
    NetworkProcessSupplementMap m_supplements;
136
    NetworkProcessSupplementMap m_supplements;
136
137
137
#if PLATFORM(COCOA)
138
#if PLATFORM(COCOA)
- a/Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.cpp -1 / +1 lines
Lines 88-94 void SynchronousNetworkLoaderClient::didReceiveBuffer(NetworkResourceLoader*, Sh a/Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.cpp_sec1
88
    // It's unclear if the potential complexities of that approach are worth it.
88
    // It's unclear if the potential complexities of that approach are worth it.
89
    
89
    
90
    if (!m_responseData)
90
    if (!m_responseData)
91
        m_responseData = adoptPtr(new Vector<char>);
91
        m_responseData = std::make_unique<Vector<char>>();
92
92
93
    m_responseData->append(buffer->data(), buffer->size());
93
    m_responseData->append(buffer->data(), buffer->size());
94
}
94
}
- a/Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.h -1 / +2 lines
Lines 31-36 a/Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.h_sec1
31
#include <WebCore/ResourceError.h>
31
#include <WebCore/ResourceError.h>
32
#include <WebCore/ResourceRequest.h>
32
#include <WebCore/ResourceRequest.h>
33
#include <WebCore/ResourceResponse.h>
33
#include <WebCore/ResourceResponse.h>
34
#include <memory>
34
#include <wtf/RefCounted.h>
35
#include <wtf/RefCounted.h>
35
36
36
#if ENABLE(NETWORK_PROCESS)
37
#if ENABLE(NETWORK_PROCESS)
Lines 66-72 private: a/Source/WebKit2/NetworkProcess/SynchronousNetworkLoaderClient.h_sec2
66
    RefPtr<Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply> m_delayedReply;
67
    RefPtr<Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply> m_delayedReply;
67
    WebCore::ResourceResponse m_response;
68
    WebCore::ResourceResponse m_response;
68
    WebCore::ResourceError m_error;
69
    WebCore::ResourceError m_error;
69
    OwnPtr<Vector<char>> m_responseData;
70
    std::unique_ptr<Vector<char>> m_responseData;
70
};
71
};
71
72
72
} // namespace WebKit
73
} // namespace WebKit
- a/Source/WebKit2/Platform/IPC/Connection.cpp -1 / +2 lines
Lines 26-31 a/Source/WebKit2/Platform/IPC/Connection.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "Connection.h"
27
#include "Connection.h"
28
28
29
#include <memory>
29
#include <wtf/CurrentTime.h>
30
#include <wtf/CurrentTime.h>
30
#include <wtf/HashSet.h>
31
#include <wtf/HashSet.h>
31
#include <wtf/NeverDestroyed.h>
32
#include <wtf/NeverDestroyed.h>
Lines 283-289 void Connection::removeWorkQueueMessageReceiverOnConnectionWorkQueue(StringRefer a/Source/WebKit2/Platform/IPC/Connection.cpp_sec2
283
284
284
void Connection::dispatchWorkQueueMessageReceiverMessage(WorkQueueMessageReceiver* workQueueMessageReceiver, MessageDecoder* incomingMessageDecoder)
285
void Connection::dispatchWorkQueueMessageReceiverMessage(WorkQueueMessageReceiver* workQueueMessageReceiver, MessageDecoder* incomingMessageDecoder)
285
{
286
{
286
    OwnPtr<MessageDecoder> decoder = adoptPtr(incomingMessageDecoder);
287
    std::unique_ptr<MessageDecoder> decoder(incomingMessageDecoder);
287
288
288
    if (!decoder->isSyncMessage()) {
289
    if (!decoder->isSyncMessage()) {
289
        workQueueMessageReceiver->didReceiveMessage(this, *decoder);
290
        workQueueMessageReceiver->didReceiveMessage(this, *decoder);
- a/Source/WebKit2/Platform/IPC/Connection.h -1 lines
Lines 38-44 a/Source/WebKit2/Platform/IPC/Connection.h_sec1
38
#include <wtf/Deque.h>
38
#include <wtf/Deque.h>
39
#include <wtf/Forward.h>
39
#include <wtf/Forward.h>
40
#include <wtf/PassRefPtr.h>
40
#include <wtf/PassRefPtr.h>
41
#include <wtf/OwnPtr.h>
42
#include <wtf/text/CString.h>
41
#include <wtf/text/CString.h>
43
42
44
#if OS(DARWIN)
43
#if OS(DARWIN)
- a/Source/WebKit2/Platform/IPC/MessageReceiver.h -1 lines
Lines 27-33 a/Source/WebKit2/Platform/IPC/MessageReceiver.h_sec1
27
#define MessageReceiver_h
27
#define MessageReceiver_h
28
28
29
#include <wtf/Assertions.h>
29
#include <wtf/Assertions.h>
30
#include <wtf/OwnPtr.h>
31
30
32
namespace IPC {
31
namespace IPC {
33
32
- a/Source/WebKit2/Platform/Module.h -1 / +2 lines
Lines 39-44 typedef struct _GModule GModule; a/Source/WebKit2/Platform/Module.h_sec1
39
39
40
#if PLATFORM(EFL)
40
#if PLATFORM(EFL)
41
#include <Eina.h>
41
#include <Eina.h>
42
#include <memory>
42
#endif
43
#endif
43
44
44
namespace WebKit {
45
namespace WebKit {
Lines 76-82 private: a/Source/WebKit2/Platform/Module.h_sec2
76
#elif PLATFORM(GTK)
77
#elif PLATFORM(GTK)
77
    GModule* m_handle;
78
    GModule* m_handle;
78
#elif PLATFORM(EFL)
79
#elif PLATFORM(EFL)
79
    OwnPtr<Eina_Module> m_module;
80
    std::unique_ptr<Eina_Module> m_module;
80
#endif
81
#endif
81
};
82
};
82
83
- a/Source/WebKit2/Platform/WorkQueue.h -1 lines
Lines 36-42 a/Source/WebKit2/Platform/WorkQueue.h_sec1
36
#include <wtf/Forward.h>
36
#include <wtf/Forward.h>
37
#include <wtf/Functional.h>
37
#include <wtf/Functional.h>
38
#include <wtf/HashMap.h>
38
#include <wtf/HashMap.h>
39
#include <wtf/PassOwnPtr.h>
40
#include <wtf/RefCounted.h>
39
#include <wtf/RefCounted.h>
41
#include <wtf/Threading.h>
40
#include <wtf/Threading.h>
42
#include <wtf/Vector.h>
41
#include <wtf/Vector.h>
- a/Source/WebKit2/Platform/efl/ModuleEfl.cpp -3 / +1 lines
Lines 20-34 a/Source/WebKit2/Platform/efl/ModuleEfl.cpp_sec1
20
#include "config.h"
20
#include "config.h"
21
#include "Module.h"
21
#include "Module.h"
22
22
23
#include <wtf/OwnPtr.h>
24
#include <wtf/PassOwnPtr.h>
25
#include <wtf/text/CString.h>
23
#include <wtf/text/CString.h>
26
24
27
namespace WebKit {
25
namespace WebKit {
28
26
29
bool Module::load()
27
bool Module::load()
30
{
28
{
31
    m_module = adoptPtr(eina_module_new(m_path.utf8().data()));
29
    m_module = std::unique_ptr<Eina_Module>(eina_module_new(m_path.utf8().data()));
32
    if (!m_module || !eina_module_load(m_module.get())) {
30
    if (!m_module || !eina_module_load(m_module.get())) {
33
        m_module = nullptr;
31
        m_module = nullptr;
34
        return false;
32
        return false;
- a/Source/WebKit2/Platform/mac/LayerHostingContext.mm -1 lines
Lines 26-32 a/Source/WebKit2/Platform/mac/LayerHostingContext.mm_sec1
26
#import "config.h"
26
#import "config.h"
27
#import "LayerHostingContext.h"
27
#import "LayerHostingContext.h"
28
28
29
#import <wtf/OwnPtr.h>
30
#import <WebKitSystemInterface.h>
29
#import <WebKitSystemInterface.h>
31
30
32
#if __has_include(<QuartzCore/QuartzCorePrivate.h>)
31
#if __has_include(<QuartzCore/QuartzCorePrivate.h>)
- a/Source/WebKit2/Shared/APIURL.h -2 lines
Lines 29-36 a/Source/WebKit2/Shared/APIURL.h_sec1
29
#include "APIObject.h"
29
#include "APIObject.h"
30
#include "WebCoreArgumentCoders.h"
30
#include "WebCoreArgumentCoders.h"
31
#include <WebCore/URL.h>
31
#include <WebCore/URL.h>
32
#include <wtf/OwnPtr.h>
33
#include <wtf/PassOwnPtr.h>
34
#include <wtf/PassRefPtr.h>
32
#include <wtf/PassRefPtr.h>
35
#include <wtf/text/WTFString.h>
33
#include <wtf/text/WTFString.h>
36
34
- a/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h -1 / +2 lines
Lines 40-45 a/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h_sec1
40
#include <wtf/RetainPtr.h>
40
#include <wtf/RetainPtr.h>
41
#include <wtf/Threading.h>
41
#include <wtf/Threading.h>
42
OBJC_CLASS WKCustomProtocol;
42
OBJC_CLASS WKCustomProtocol;
43
#else
44
#include "CustomProtocolManagerImpl.h"
43
#endif
45
#endif
44
46
45
47
Lines 55-61 class ResourceResponse; a/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h_sec2
55
namespace WebKit {
57
namespace WebKit {
56
58
57
class ChildProcess;
59
class ChildProcess;
58
class CustomProtocolManagerImpl;
59
struct NetworkProcessCreationParameters;
60
struct NetworkProcessCreationParameters;
60
61
61
class CustomProtocolManager : public WebProcessSupplement, public NetworkProcessSupplement, public IPC::Connection::WorkQueueMessageReceiver {
62
class CustomProtocolManager : public WebProcessSupplement, public NetworkProcessSupplement, public IPC::Connection::WorkQueueMessageReceiver {
- a/Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.cpp -1 lines
Lines 32-38 a/Source/WebKit2/Shared/Plugins/NPRemoteObjectMap.cpp_sec1
32
#include "NPObjectProxy.h"
32
#include "NPObjectProxy.h"
33
#include "NPRuntimeUtilities.h"
33
#include "NPRuntimeUtilities.h"
34
#include "NPVariantData.h"
34
#include "NPVariantData.h"
35
#include <wtf/OwnPtr.h>
36
35
37
namespace WebKit {
36
namespace WebKit {
38
37
- a/Source/WebKit2/Shared/ShareableBitmap.h -1 lines
Lines 28-34 a/Source/WebKit2/Shared/ShareableBitmap.h_sec1
28
28
29
#include "SharedMemory.h"
29
#include "SharedMemory.h"
30
#include <WebCore/IntRect.h>
30
#include <WebCore/IntRect.h>
31
#include <wtf/PassOwnPtr.h>
32
#include <wtf/PassRefPtr.h>
31
#include <wtf/PassRefPtr.h>
33
#include <wtf/RefCounted.h>
32
#include <wtf/RefCounted.h>
34
#include <wtf/RefPtr.h>
33
#include <wtf/RefPtr.h>
- a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h -1 lines
Lines 29-35 a/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h_sec1
29
#include "BackingStore.h"
29
#include "BackingStore.h"
30
#include "DrawingAreaProxy.h"
30
#include "DrawingAreaProxy.h"
31
#include "LayerTreeContext.h"
31
#include "LayerTreeContext.h"
32
#include <wtf/OwnPtr.h>
33
#include <wtf/RunLoop.h>
32
#include <wtf/RunLoop.h>
34
33
35
namespace WebCore {
34
namespace WebCore {
- a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.cpp -5 / +4 lines
Lines 32-38 a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.cpp_sec1
32
32
33
#include "WebSocketServerConnection.h"
33
#include "WebSocketServerConnection.h"
34
#include <WebCore/SocketStreamHandle.h>
34
#include <WebCore/SocketStreamHandle.h>
35
#include <wtf/PassOwnPtr.h>
36
35
37
using namespace WebCore;
36
using namespace WebCore;
38
37
Lines 78-97 void WebSocketServer::close() a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.cpp_sec2
78
    m_bindAddress = String();
77
    m_bindAddress = String();
79
}
78
}
80
79
81
void WebSocketServer::didAcceptConnection(PassOwnPtr<WebSocketServerConnection> connection)
80
void WebSocketServer::didAcceptConnection(std::unique_ptr<WebSocketServerConnection> connection)
82
{
81
{
83
    m_connections.append(connection);
82
    m_connections.append(std::move(connection));
84
}
83
}
85
84
86
void WebSocketServer::didCloseWebSocketServerConnection(WebSocketServerConnection* connection)
85
void WebSocketServer::didCloseWebSocketServerConnection(WebSocketServerConnection* connection)
87
{
86
{
88
    Deque<OwnPtr<WebSocketServerConnection> >::iterator end = m_connections.end();
87
    for (auto it = m_connections.begin(), end = m_connections.end(); it != end; ++it) {
89
    for (Deque<OwnPtr<WebSocketServerConnection> >::iterator it = m_connections.begin(); it != end; ++it) {
90
        if (it->get() == connection) {
88
        if (it->get() == connection) {
91
            m_connections.remove(it);
89
            m_connections.remove(it);
92
            return;
90
            return;
93
        }
91
        }
94
    }
92
    }
93
95
    ASSERT_NOT_REACHED();
94
    ASSERT_NOT_REACHED();
96
}
95
}
97
96
- a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h -3 / +3 lines
Lines 29-36 a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h_sec1
29
29
30
#if ENABLE(INSPECTOR_SERVER)
30
#if ENABLE(INSPECTOR_SERVER)
31
31
32
#include <memory>
32
#include <wtf/Deque.h>
33
#include <wtf/Deque.h>
33
#include <wtf/OwnPtr.h>
34
#include <wtf/text/WTFString.h>
34
#include <wtf/text/WTFString.h>
35
35
36
#if USE(SOUP)
36
#if USE(SOUP)
Lines 61-67 public: a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h_sec2
61
    void close();
61
    void close();
62
62
63
    WebSocketServerClient* client() const { return m_client; }
63
    WebSocketServerClient* client() const { return m_client; }
64
    void didAcceptConnection(PassOwnPtr<WebSocketServerConnection>);
64
    void didAcceptConnection(std::unique_ptr<WebSocketServerConnection>);
65
65
66
private:
66
private:
67
    void didCloseWebSocketServerConnection(WebSocketServerConnection*);
67
    void didCloseWebSocketServerConnection(WebSocketServerConnection*);
Lines 71-77 private: a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h_sec3
71
    void platformClose();
71
    void platformClose();
72
72
73
    ServerState m_state;
73
    ServerState m_state;
74
    Deque<OwnPtr<WebSocketServerConnection> > m_connections;
74
    Deque<std::unique_ptr<WebSocketServerConnection>> m_connections;
75
    WebSocketServerClient* m_client;
75
    WebSocketServerClient* m_client;
76
    String m_bindAddress;
76
    String m_bindAddress;
77
    unsigned short m_port;
77
    unsigned short m_port;
- a/Source/WebKit2/UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp -3 / +2 lines
Lines 31-37 a/Source/WebKit2/UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp_sec1
31
#include <WebCore/SocketStreamHandle.h>
31
#include <WebCore/SocketStreamHandle.h>
32
#include <gio/gio.h>
32
#include <gio/gio.h>
33
#include <glib.h>
33
#include <glib.h>
34
#include <wtf/PassOwnPtr.h>
35
#include <wtf/gobject/GUniquePtr.h>
34
#include <wtf/gobject/GUniquePtr.h>
36
#include <wtf/text/CString.h>
35
#include <wtf/text/CString.h>
37
36
Lines 47-55 static gboolean connectionCallback(GSocketService* /*service*/, GSocketConnectio a/Source/WebKit2/UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp_sec2
47
    LOG(InspectorServer, "New Connection from %s:%d.", addressString.get(), g_inet_socket_address_get_port(G_INET_SOCKET_ADDRESS(socketAddress.get())));
46
    LOG(InspectorServer, "New Connection from %s:%d.", addressString.get(), g_inet_socket_address_get_port(G_INET_SOCKET_ADDRESS(socketAddress.get())));
48
#endif
47
#endif
49
48
50
    OwnPtr<WebSocketServerConnection> webSocketConnection = adoptPtr(new WebSocketServerConnection(server->client(), server));
49
    auto webSocketConnection = std::make_unique<WebSocketServerConnection>(server->client(), server);
51
    webSocketConnection->setSocketHandle(SocketStreamHandle::create(connection, webSocketConnection.get()));
50
    webSocketConnection->setSocketHandle(SocketStreamHandle::create(connection, webSocketConnection.get()));
52
    server->didAcceptConnection(webSocketConnection.release());
51
    server->didAcceptConnection(std::move(webSocketConnection));
53
52
54
    return TRUE;
53
    return TRUE;
55
}
54
}
- a/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp -1 / +1 lines
Lines 98-104 void NetworkProcessProxy::getNetworkProcessConnection(PassRefPtr<Messages::WebPr a/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp_sec1
98
DownloadProxy* NetworkProcessProxy::createDownloadProxy()
98
DownloadProxy* NetworkProcessProxy::createDownloadProxy()
99
{
99
{
100
    if (!m_downloadProxyMap)
100
    if (!m_downloadProxyMap)
101
        m_downloadProxyMap = adoptPtr(new DownloadProxyMap(this));
101
        m_downloadProxyMap = std::make_unique<DownloadProxyMap>(this);
102
102
103
    return m_downloadProxyMap->createDownloadProxy(m_webContext);
103
    return m_downloadProxyMap->createDownloadProxy(m_webContext);
104
}
104
}
- a/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h -1 / +2 lines
Lines 31-36 a/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h_sec1
31
#include "ChildProcessProxy.h"
31
#include "ChildProcessProxy.h"
32
#include "ProcessLauncher.h"
32
#include "ProcessLauncher.h"
33
#include "WebProcessProxyMessages.h"
33
#include "WebProcessProxyMessages.h"
34
#include <memory>
34
#include <wtf/Deque.h>
35
#include <wtf/Deque.h>
35
36
36
#if ENABLE(CUSTOM_PROTOCOLS)
37
#if ENABLE(CUSTOM_PROTOCOLS)
Lines 91-97 private: a/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h_sec2
91
    unsigned m_numPendingConnectionRequests;
92
    unsigned m_numPendingConnectionRequests;
92
    Deque<RefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>> m_pendingConnectionReplies;
93
    Deque<RefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>> m_pendingConnectionReplies;
93
94
94
    OwnPtr<DownloadProxyMap> m_downloadProxyMap;
95
    std::unique_ptr<DownloadProxyMap> m_downloadProxyMap;
95
96
96
#if ENABLE(CUSTOM_PROTOCOLS)
97
#if ENABLE(CUSTOM_PROTOCOLS)
97
    CustomProtocolManagerProxy m_customProtocolManagerProxy;
98
    CustomProtocolManagerProxy m_customProtocolManagerProxy;
- a/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h -1 lines
Lines 32-38 a/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h_sec1
32
#include "WebNotificationProvider.h"
32
#include "WebNotificationProvider.h"
33
#include <WebCore/NotificationClient.h>
33
#include <WebCore/NotificationClient.h>
34
#include <wtf/HashMap.h>
34
#include <wtf/HashMap.h>
35
#include <wtf/OwnPtr.h>
36
#include <wtf/PassRefPtr.h>
35
#include <wtf/PassRefPtr.h>
37
#include <wtf/text/StringHash.h>
36
#include <wtf/text/StringHash.h>
38
37
- a/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp -4 / +4 lines
Lines 153-159 void WebPluginSiteDataManager::getSitesWithData(PassRefPtr<ArrayCallback> prpCal a/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp_sec1
153
    ASSERT(!m_pendingGetSitesWithData.contains(callbackID));
153
    ASSERT(!m_pendingGetSitesWithData.contains(callbackID));
154
154
155
    GetSitesWithDataState* state = new GetSitesWithDataState(this, callbackID);
155
    GetSitesWithDataState* state = new GetSitesWithDataState(this, callbackID);
156
    m_pendingGetSitesWithData.set(callbackID, adoptPtr(state));
156
    m_pendingGetSitesWithData.set(callbackID, std::unique_ptr<GetSitesWithDataState>(state));
157
    state->getSitesWithDataForNextPlugin();
157
    state->getSitesWithDataForNextPlugin();
158
}
158
}
159
159
Lines 197-203 void WebPluginSiteDataManager::clearSiteData(API::Array* sites, uint64_t flags, a/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp_sec2
197
    ASSERT(!m_pendingClearSiteData.contains(callbackID));
197
    ASSERT(!m_pendingClearSiteData.contains(callbackID));
198
198
199
    ClearSiteDataState* state = new ClearSiteDataState(this, sitesVector, flags, maxAgeInSeconds, callbackID);
199
    ClearSiteDataState* state = new ClearSiteDataState(this, sitesVector, flags, maxAgeInSeconds, callbackID);
200
    m_pendingClearSiteData.set(callbackID, adoptPtr(state));
200
    m_pendingClearSiteData.set(callbackID, std::unique_ptr<ClearSiteDataState>(state));
201
    state->clearSiteDataForNextPlugin();
201
    state->clearSiteDataForNextPlugin();
202
}
202
}
203
203
Lines 222-228 void WebPluginSiteDataManager::didGetSitesWithDataForSinglePlugin(const Vector<S a/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp_sec3
222
222
223
void WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins(const Vector<String>& sites, uint64_t callbackID)
223
void WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins(const Vector<String>& sites, uint64_t callbackID)
224
{
224
{
225
    OwnPtr<GetSitesWithDataState> state = m_pendingGetSitesWithData.take(callbackID);
225
    std::unique_ptr<GetSitesWithDataState> state = m_pendingGetSitesWithData.take(callbackID);
226
    ASSERT(state);
226
    ASSERT(state);
227
227
228
    didGetSitesWithData(sites, callbackID);
228
    didGetSitesWithData(sites, callbackID);
Lines 238-244 void WebPluginSiteDataManager::didClearSiteDataForSinglePlugin(uint64_t callback a/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp_sec4
238
238
239
void WebPluginSiteDataManager::didClearSiteDataForAllPlugins(uint64_t callbackID)
239
void WebPluginSiteDataManager::didClearSiteDataForAllPlugins(uint64_t callbackID)
240
{
240
{
241
    OwnPtr<ClearSiteDataState> state = m_pendingClearSiteData.take(callbackID);
241
    std::unique_ptr<ClearSiteDataState> state = m_pendingClearSiteData.take(callbackID);
242
    ASSERT(state);
242
    ASSERT(state);
243
243
244
    didClearSiteData(callbackID);
244
    didClearSiteData(callbackID);
- a/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.h -2 / +3 lines
Lines 31-36 a/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.h_sec1
31
#include "APIObject.h"
31
#include "APIObject.h"
32
#include "Arguments.h"
32
#include "Arguments.h"
33
#include "GenericCallback.h"
33
#include "GenericCallback.h"
34
#include <memory>
34
#include <wtf/HashMap.h>
35
#include <wtf/HashMap.h>
35
#include <wtf/PassRefPtr.h>
36
#include <wtf/PassRefPtr.h>
36
37
Lines 69-78 private: a/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.h_sec2
69
    void didClearSiteDataForAllPlugins(uint64_t callbackID);
70
    void didClearSiteDataForAllPlugins(uint64_t callbackID);
70
71
71
    class GetSitesWithDataState;
72
    class GetSitesWithDataState;
72
    HashMap<uint64_t, OwnPtr<GetSitesWithDataState>> m_pendingGetSitesWithData;
73
    HashMap<uint64_t, std::unique_ptr<GetSitesWithDataState>> m_pendingGetSitesWithData;
73
74
74
    class ClearSiteDataState;
75
    class ClearSiteDataState;
75
    HashMap<uint64_t, OwnPtr<ClearSiteDataState>> m_pendingClearSiteData;
76
    HashMap<uint64_t, std::unique_ptr<ClearSiteDataState>> m_pendingClearSiteData;
76
};
77
};
77
78
78
} // namespace WebKit
79
} // namespace WebKit
- a/Source/WebKit2/UIProcess/Storage/StorageManager.cpp -3 / +4 lines
Lines 37-42 a/Source/WebKit2/UIProcess/Storage/StorageManager.cpp_sec1
37
#include <WebCore/SecurityOriginHash.h>
37
#include <WebCore/SecurityOriginHash.h>
38
#include <WebCore/StorageMap.h>
38
#include <WebCore/StorageMap.h>
39
#include <WebCore/TextEncoding.h>
39
#include <WebCore/TextEncoding.h>
40
#include <memory>
40
41
41
using namespace WebCore;
42
using namespace WebCore;
42
43
Lines 631-644 StorageManager::LocalStorageNamespace* StorageManager::getOrCreateLocalStorageNa a/Source/WebKit2/UIProcess/Storage/StorageManager.cpp_sec2
631
632
632
static void callCallbackFunction(void* context, void (*callbackFunction)(const Vector<RefPtr<WebCore::SecurityOrigin>>& securityOrigins, void* context), Vector<RefPtr<WebCore::SecurityOrigin>>* securityOriginsPtr)
633
static void callCallbackFunction(void* context, void (*callbackFunction)(const Vector<RefPtr<WebCore::SecurityOrigin>>& securityOrigins, void* context), Vector<RefPtr<WebCore::SecurityOrigin>>* securityOriginsPtr)
633
{
634
{
634
    OwnPtr<Vector<RefPtr<WebCore::SecurityOrigin>>> securityOrigins = adoptPtr(securityOriginsPtr);
635
    std::unique_ptr<Vector<RefPtr<WebCore::SecurityOrigin>>> securityOrigins(securityOriginsPtr);
635
    callbackFunction(*securityOrigins, context);
636
    callbackFunction(*securityOrigins, context);
636
}
637
}
637
638
638
void StorageManager::getOriginsInternal(FunctionDispatcher* dispatcher, void* context, void (*callbackFunction)(const Vector<RefPtr<WebCore::SecurityOrigin>>& securityOrigins, void* context))
639
void StorageManager::getOriginsInternal(FunctionDispatcher* dispatcher, void* context, void (*callbackFunction)(const Vector<RefPtr<WebCore::SecurityOrigin>>& securityOrigins, void* context))
639
{
640
{
640
    OwnPtr<Vector<RefPtr<WebCore::SecurityOrigin>>> securityOrigins = adoptPtr(new Vector<RefPtr<WebCore::SecurityOrigin>>(m_localStorageDatabaseTracker->origins()));
641
    auto securityOrigins = std::make_unique<Vector<RefPtr<WebCore::SecurityOrigin>>>(m_localStorageDatabaseTracker->origins());
641
    dispatcher->dispatch(bind(callCallbackFunction, context, callbackFunction, securityOrigins.leakPtr()));
642
    dispatcher->dispatch(bind(callCallbackFunction, context, callbackFunction, securityOrigins.release()));
642
}
643
}
643
644
644
void StorageManager::getStorageDetailsByOriginInternal(FunctionDispatcher* dispatcher, void* context, void (*callbackFunction)(const Vector<LocalStorageDetails>& storageDetails, void* context))
645
void StorageManager::getStorageDetailsByOriginInternal(FunctionDispatcher* dispatcher, void* context, void (*callbackFunction)(const Vector<LocalStorageDetails>& storageDetails, void* context))
- a/Source/WebKit2/UIProcess/WebPageProxy.cpp -20 / +20 lines
Lines 170-190 public: a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec1
170
170
171
    static ExceededDatabaseQuotaRecords& shared();
171
    static ExceededDatabaseQuotaRecords& shared();
172
172
173
    PassOwnPtr<Record> createRecord(uint64_t frameID, String originIdentifier,
173
    std::unique_ptr<Record> createRecord(uint64_t frameID, String originIdentifier,
174
        String databaseName, String displayName, uint64_t currentQuota,
174
        String databaseName, String displayName, uint64_t currentQuota,
175
        uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, 
175
        uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, 
176
        PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply>);
176
        PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply>);
177
177
178
    void add(PassOwnPtr<Record>);
178
    void add(std::unique_ptr<Record>);
179
    bool areBeingProcessed() const { return m_currentRecord; }
179
    bool areBeingProcessed() const { return !!m_currentRecord; }
180
    Record* next();
180
    Record* next();
181
181
182
private:
182
private:
183
    ExceededDatabaseQuotaRecords() { }
183
    ExceededDatabaseQuotaRecords() { }
184
    ~ExceededDatabaseQuotaRecords() { }
184
    ~ExceededDatabaseQuotaRecords() { }
185
185
186
    Deque<OwnPtr<Record>> m_records;
186
    Deque<std::unique_ptr<Record>> m_records;
187
    OwnPtr<Record> m_currentRecord;
187
    std::unique_ptr<Record> m_currentRecord;
188
};
188
};
189
189
190
ExceededDatabaseQuotaRecords& ExceededDatabaseQuotaRecords::shared()
190
ExceededDatabaseQuotaRecords& ExceededDatabaseQuotaRecords::shared()
Lines 193-204 ExceededDatabaseQuotaRecords& ExceededDatabaseQuotaRecords::shared() a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec2
193
    return records;
193
    return records;
194
}
194
}
195
195
196
PassOwnPtr<ExceededDatabaseQuotaRecords::Record> ExceededDatabaseQuotaRecords::createRecord(
196
std::unique_ptr<ExceededDatabaseQuotaRecords::Record> ExceededDatabaseQuotaRecords::createRecord(
197
    uint64_t frameID, String originIdentifier, String databaseName, String displayName,
197
    uint64_t frameID, String originIdentifier, String databaseName, String displayName,
198
    uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage,
198
    uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage,
199
    uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply)
199
    uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply)
200
{
200
{
201
    OwnPtr<Record> record = adoptPtr(new Record);
201
    auto record = std::make_unique<Record>();
202
    record->frameID = frameID;
202
    record->frameID = frameID;
203
    record->originIdentifier = originIdentifier;
203
    record->originIdentifier = originIdentifier;
204
    record->databaseName = databaseName;
204
    record->databaseName = databaseName;
Lines 208-224 PassOwnPtr<ExceededDatabaseQuotaRecords::Record> ExceededDatabaseQuotaRecords::c a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec3
208
    record->currentDatabaseUsage = currentDatabaseUsage;
208
    record->currentDatabaseUsage = currentDatabaseUsage;
209
    record->expectedUsage = expectedUsage;
209
    record->expectedUsage = expectedUsage;
210
    record->reply = reply;
210
    record->reply = reply;
211
    return record.release();
211
    return std::move(record);
212
}
212
}
213
213
214
void ExceededDatabaseQuotaRecords::add(PassOwnPtr<ExceededDatabaseQuotaRecords::Record> record)
214
void ExceededDatabaseQuotaRecords::add(std::unique_ptr<ExceededDatabaseQuotaRecords::Record> record)
215
{
215
{
216
    m_records.append(record);
216
    m_records.append(std::move(record));
217
}
217
}
218
218
219
ExceededDatabaseQuotaRecords::Record* ExceededDatabaseQuotaRecords::next()
219
ExceededDatabaseQuotaRecords::Record* ExceededDatabaseQuotaRecords::next()
220
{
220
{
221
    m_currentRecord.clear();
221
    m_currentRecord = nullptr;
222
    if (!m_records.isEmpty())
222
    if (!m_records.isEmpty())
223
        m_currentRecord = m_records.takeFirst();
223
        m_currentRecord = m_records.takeFirst();
224
    return m_currentRecord.get();
224
    return m_currentRecord.get();
Lines 1181-1187 void WebPageProxy::handleMouseEvent(const NativeWebMouseEvent& event) a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec4
1181
        m_process->responsivenessTimer()->start();
1181
        m_process->responsivenessTimer()->start();
1182
    else {
1182
    else {
1183
        if (m_processingMouseMoveEvent) {
1183
        if (m_processingMouseMoveEvent) {
1184
            m_nextMouseMoveEvent = adoptPtr(new NativeWebMouseEvent(event));
1184
            m_nextMouseMoveEvent = std::make_unique<NativeWebMouseEvent>(event);
1185
            return;
1185
            return;
1186
        }
1186
        }
1187
1187
Lines 1193-1199 void WebPageProxy::handleMouseEvent(const NativeWebMouseEvent& event) a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec5
1193
    // we fake a mouse up event by using this stored down event. This event gets cleared
1193
    // we fake a mouse up event by using this stored down event. This event gets cleared
1194
    // when the mouse up message is received from WebProcess.
1194
    // when the mouse up message is received from WebProcess.
1195
    if (event.type() == WebEvent::MouseDown)
1195
    if (event.type() == WebEvent::MouseDown)
1196
        m_currentlyProcessedMouseDownEvent = adoptPtr(new NativeWebMouseEvent(event));
1196
        m_currentlyProcessedMouseDownEvent = std::make_unique<NativeWebMouseEvent>(event);
1197
1197
1198
    if (m_shouldSendEventsSynchronously) {
1198
    if (m_shouldSendEventsSynchronously) {
1199
        bool handled = false;
1199
        bool handled = false;
Lines 1289-1305 void WebPageProxy::handleWheelEvent(const NativeWebWheelEvent& event) a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec6
1289
        return;
1289
        return;
1290
    }
1290
    }
1291
1291
1292
    OwnPtr<Vector<NativeWebWheelEvent>> coalescedWheelEvent = adoptPtr(new Vector<NativeWebWheelEvent>);
1292
    auto coalescedWheelEvent = std::make_unique<Vector<NativeWebWheelEvent>>();
1293
    coalescedWheelEvent->append(event);
1293
    coalescedWheelEvent->append(event);
1294
    m_currentlyProcessedWheelEvents.append(coalescedWheelEvent.release());
1294
    m_currentlyProcessedWheelEvents.append(std::move(coalescedWheelEvent));
1295
    sendWheelEvent(event);
1295
    sendWheelEvent(event);
1296
}
1296
}
1297
1297
1298
void WebPageProxy::processNextQueuedWheelEvent()
1298
void WebPageProxy::processNextQueuedWheelEvent()
1299
{
1299
{
1300
    OwnPtr<Vector<NativeWebWheelEvent>> nextCoalescedEvent = adoptPtr(new Vector<NativeWebWheelEvent>);
1300
    auto nextCoalescedEvent = std::make_unique<Vector<NativeWebWheelEvent>>();
1301
    WebWheelEvent nextWheelEvent = coalescedWheelEvent(m_wheelEventQueue, *nextCoalescedEvent.get());
1301
    WebWheelEvent nextWheelEvent = coalescedWheelEvent(m_wheelEventQueue, *nextCoalescedEvent.get());
1302
    m_currentlyProcessedWheelEvents.append(nextCoalescedEvent.release());
1302
    m_currentlyProcessedWheelEvents.append(std::move(nextCoalescedEvent));
1303
    sendWheelEvent(nextWheelEvent);
1303
    sendWheelEvent(nextWheelEvent);
1304
}
1304
}
1305
1305
Lines 3600-3606 void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled) a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec7
3600
    case WebEvent::Wheel: {
3600
    case WebEvent::Wheel: {
3601
        ASSERT(!m_currentlyProcessedWheelEvents.isEmpty());
3601
        ASSERT(!m_currentlyProcessedWheelEvents.isEmpty());
3602
3602
3603
        OwnPtr<Vector<NativeWebWheelEvent>> oldestCoalescedEvent = m_currentlyProcessedWheelEvents.takeFirst();
3603
        std::unique_ptr<Vector<NativeWebWheelEvent>> oldestCoalescedEvent = m_currentlyProcessedWheelEvents.takeFirst();
3604
3604
3605
        // FIXME: Dispatch additional events to the didNotHandleWheelEvent client function.
3605
        // FIXME: Dispatch additional events to the didNotHandleWheelEvent client function.
3606
        if (!handled) {
3606
        if (!handled) {
Lines 4052-4061 void WebPageProxy::didReceiveAuthenticationChallengeProxy(uint64_t frameID, Pass a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec8
4052
void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply)
4052
void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, PassRefPtr<Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply> reply)
4053
{
4053
{
4054
    ExceededDatabaseQuotaRecords& records = ExceededDatabaseQuotaRecords::shared();
4054
    ExceededDatabaseQuotaRecords& records = ExceededDatabaseQuotaRecords::shared();
4055
    OwnPtr<ExceededDatabaseQuotaRecords::Record> newRecord =  records.createRecord(frameID,
4055
    std::unique_ptr<ExceededDatabaseQuotaRecords::Record> newRecord = records.createRecord(frameID,
4056
        originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage,
4056
        originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage,
4057
        currentDatabaseUsage, expectedUsage, reply);
4057
        currentDatabaseUsage, expectedUsage, reply);
4058
    records.add(newRecord.release());
4058
    records.add(std::move(newRecord));
4059
4059
4060
    if (records.areBeingProcessed())
4060
    if (records.areBeingProcessed())
4061
        return;
4061
        return;
- a/Source/WebKit2/UIProcess/WebPageProxy.h -5 / +4 lines
Lines 69-78 a/Source/WebKit2/UIProcess/WebPageProxy.h_sec1
69
#include <WebCore/TextChecking.h>
69
#include <WebCore/TextChecking.h>
70
#include <WebCore/TextGranularity.h>
70
#include <WebCore/TextGranularity.h>
71
#include <WebCore/ViewState.h>
71
#include <WebCore/ViewState.h>
72
#include <memory>
72
#include <wtf/HashMap.h>
73
#include <wtf/HashMap.h>
73
#include <wtf/HashSet.h>
74
#include <wtf/HashSet.h>
74
#include <wtf/OwnPtr.h>
75
#include <wtf/PassOwnPtr.h>
76
#include <wtf/PassRefPtr.h>
75
#include <wtf/PassRefPtr.h>
77
#include <wtf/Ref.h>
76
#include <wtf/Ref.h>
78
#include <wtf/RefPtr.h>
77
#include <wtf/RefPtr.h>
Lines 1360-1370 private: a/Source/WebKit2/UIProcess/WebPageProxy.h_sec2
1360
1359
1361
    Deque<NativeWebKeyboardEvent> m_keyEventQueue;
1360
    Deque<NativeWebKeyboardEvent> m_keyEventQueue;
1362
    Deque<NativeWebWheelEvent> m_wheelEventQueue;
1361
    Deque<NativeWebWheelEvent> m_wheelEventQueue;
1363
    Deque<OwnPtr<Vector<NativeWebWheelEvent>>> m_currentlyProcessedWheelEvents;
1362
    Deque<std::unique_ptr<Vector<NativeWebWheelEvent>>> m_currentlyProcessedWheelEvents;
1364
1363
1365
    bool m_processingMouseMoveEvent;
1364
    bool m_processingMouseMoveEvent;
1366
    OwnPtr<NativeWebMouseEvent> m_nextMouseMoveEvent;
1365
    std::unique_ptr<NativeWebMouseEvent> m_nextMouseMoveEvent;
1367
    OwnPtr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
1366
    std::unique_ptr<NativeWebMouseEvent> m_currentlyProcessedMouseDownEvent;
1368
1367
1369
#if ENABLE(TOUCH_EVENTS)
1368
#if ENABLE(TOUCH_EVENTS)
1370
    bool m_isTrackingTouchEvents;
1369
    bool m_isTrackingTouchEvents;
- a/Source/WebKit2/UIProcess/WebProcessProxy.cpp -1 / +1 lines
Lines 533-539 DownloadProxy* WebProcessProxy::createDownloadProxy() a/Source/WebKit2/UIProcess/WebProcessProxy.cpp_sec1
533
#endif
533
#endif
534
534
535
    if (!m_downloadProxyMap)
535
    if (!m_downloadProxyMap)
536
        m_downloadProxyMap = adoptPtr(new DownloadProxyMap(this));
536
        m_downloadProxyMap = std::make_unique<DownloadProxyMap>(this);
537
537
538
    return m_downloadProxyMap->createDownloadProxy(m_context.get());
538
    return m_downloadProxyMap->createDownloadProxy(m_context.get());
539
}
539
}
- a/Source/WebKit2/UIProcess/WebProcessProxy.h -1 / +2 lines
Lines 37-42 a/Source/WebKit2/UIProcess/WebProcessProxy.h_sec1
37
#include "WebPageProxy.h"
37
#include "WebPageProxy.h"
38
#include "WebProcessProxyMessages.h"
38
#include "WebProcessProxyMessages.h"
39
#include <WebCore/LinkHash.h>
39
#include <WebCore/LinkHash.h>
40
#include <memory>
40
#include <wtf/Forward.h>
41
#include <wtf/Forward.h>
41
#include <wtf/HashMap.h>
42
#include <wtf/HashMap.h>
42
#include <wtf/PassRefPtr.h>
43
#include <wtf/PassRefPtr.h>
Lines 203-209 private: a/Source/WebKit2/UIProcess/WebProcessProxy.h_sec2
203
    WebFrameProxyMap m_frameMap;
204
    WebFrameProxyMap m_frameMap;
204
    WebBackForwardListItemMap m_backForwardListItemMap;
205
    WebBackForwardListItemMap m_backForwardListItemMap;
205
206
206
    OwnPtr<DownloadProxyMap> m_downloadProxyMap;
207
    std::unique_ptr<DownloadProxyMap> m_downloadProxyMap;
207
208
208
#if ENABLE(CUSTOM_PROTOCOLS)
209
#if ENABLE(CUSTOM_PROTOCOLS)
209
    CustomProtocolManagerProxy m_customProtocolManagerProxy;
210
    CustomProtocolManagerProxy m_customProtocolManagerProxy;
- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp -2 / +3 lines
Lines 36-41 a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp_sec1
36
#include <WebCore/NotImplemented.h>
36
#include <WebCore/NotImplemented.h>
37
#include <WebCore/ProtectionSpace.h>
37
#include <WebCore/ProtectionSpace.h>
38
#include <WebCore/SharedBuffer.h>
38
#include <WebCore/SharedBuffer.h>
39
#include <memory>
39
#include <utility>
40
#include <utility>
40
#include <wtf/text/StringBuilder.h>
41
#include <wtf/text/StringBuilder.h>
41
42
Lines 49-59 public: a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp_sec2
49
    explicit PluginDestructionProtector(NetscapePlugin* plugin)
50
    explicit PluginDestructionProtector(NetscapePlugin* plugin)
50
    {
51
    {
51
        if (plugin)
52
        if (plugin)
52
            m_protector = adoptPtr(new PluginController::PluginDestructionProtector(static_cast<Plugin*>(plugin)->controller()));
53
            m_protector = std::make_unique<PluginController::PluginDestructionProtector>(static_cast<Plugin*>(plugin)->controller());
53
    }
54
    }
54
    
55
    
55
private:
56
private:
56
    OwnPtr<PluginController::PluginDestructionProtector> m_protector;
57
    std::unique_ptr<PluginController::PluginDestructionProtector> m_protector;
57
};
58
};
58
59
59
static bool startsWithBlankLine(const char* bytes, unsigned length)
60
static bool startsWithBlankLine(const char* bytes, unsigned length)
- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp -2 / +1 lines
Lines 30-36 a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp_sec1
30
30
31
#include "NetscapePlugin.h"
31
#include "NetscapePlugin.h"
32
#include <utility>
32
#include <utility>
33
#include <wtf/PassOwnPtr.h>
34
#include <wtf/Vector.h>
33
#include <wtf/Vector.h>
35
34
36
using namespace WebCore;
35
using namespace WebCore;
Lines 187-193 void NetscapePluginStream::deliverData(const char* bytes, int length) a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp_sec2
187
186
188
    if (m_transferMode != NP_ASFILEONLY) {
187
    if (m_transferMode != NP_ASFILEONLY) {
189
        if (!m_deliveryData)
188
        if (!m_deliveryData)
190
            m_deliveryData = adoptPtr(new Vector<uint8_t>);
189
            m_deliveryData = std::make_unique<Vector<uint8_t>>();
191
190
192
        m_deliveryData->reserveCapacity(m_deliveryData->size() + length);
191
        m_deliveryData->reserveCapacity(m_deliveryData->size() + length);
193
        m_deliveryData->append(bytes, length);
192
        m_deliveryData->append(bytes, length);
- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h -1 / +2 lines
Lines 30-35 a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h_sec1
30
30
31
#include <WebCore/FileSystem.h>
31
#include <WebCore/FileSystem.h>
32
#include <WebCore/npruntime_internal.h>
32
#include <WebCore/npruntime_internal.h>
33
#include <memory>
33
#include <wtf/Forward.h>
34
#include <wtf/Forward.h>
34
#include <wtf/PassRefPtr.h>
35
#include <wtf/PassRefPtr.h>
35
#include <wtf/RefCounted.h>
36
#include <wtf/RefCounted.h>
Lines 106-112 private: a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h_sec2
106
    CString m_headers;
107
    CString m_headers;
107
108
108
    RunLoop::Timer<NetscapePluginStream> m_deliveryDataTimer;
109
    RunLoop::Timer<NetscapePluginStream> m_deliveryDataTimer;
109
    OwnPtr< Vector<uint8_t>> m_deliveryData;
110
    std::unique_ptr<Vector<uint8_t>> m_deliveryData;
110
    bool m_stopStreamWhenDoneDelivering;
111
    bool m_stopStreamWhenDoneDelivering;
111
};
112
};
112
113
- a/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.h -2 lines
Lines 52-59 public: a/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.h_sec1
52
    PluginProcessConnection* getPluginProcessConnection(uint64_t pluginProcessToken);
52
    PluginProcessConnection* getPluginProcessConnection(uint64_t pluginProcessToken);
53
    void removePluginProcessConnection(PluginProcessConnection*);
53
    void removePluginProcessConnection(PluginProcessConnection*);
54
54
55
    void didReceivePluginProcessConnectionManagerMessageOnConnectionWorkQueue(IPC::Connection*, OwnPtr<IPC::MessageDecoder>&);
56
57
private:
55
private:
58
    PluginProcessConnectionManager();
56
    PluginProcessConnectionManager();
59
57
- a/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp -3 / +3 lines
Lines 96-102 bool PluginProxy::initialize(const Parameters& parameters) a/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp_sec1
96
    m_connection->addPluginProxy(this);
96
    m_connection->addPluginProxy(this);
97
97
98
    // Ask the plug-in process to create a plug-in.
98
    // Ask the plug-in process to create a plug-in.
99
    m_pendingPluginCreationParameters = adoptPtr(new PluginCreationParameters);
99
    m_pendingPluginCreationParameters = std::make_unique<PluginCreationParameters>();
100
100
101
    m_pendingPluginCreationParameters->pluginInstanceID = m_pluginInstanceID;
101
    m_pendingPluginCreationParameters->pluginInstanceID = m_pluginInstanceID;
102
    m_pendingPluginCreationParameters->windowNPObjectID = windowNPObjectID();
102
    m_pendingPluginCreationParameters->windowNPObjectID = windowNPObjectID();
Lines 170-176 void PluginProxy::didCreatePluginInternal(bool wantsWheelEvents, uint32_t remote a/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp_sec2
170
170
171
    // Whether synchronously or asynchronously, this plug-in was created and we shouldn't need to remember
171
    // Whether synchronously or asynchronously, this plug-in was created and we shouldn't need to remember
172
    // anything about how.
172
    // anything about how.
173
    m_pendingPluginCreationParameters.clear();
173
    m_pendingPluginCreationParameters = nullptr;
174
    m_waitingOnAsynchronousInitialization = false;
174
    m_waitingOnAsynchronousInitialization = false;
175
}
175
}
176
176
Lines 184-190 void PluginProxy::didFailToCreatePluginInternal() a/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp_sec3
184
184
185
    // Whether synchronously or asynchronously, this plug-in failed to create and we shouldn't need to remember
185
    // Whether synchronously or asynchronously, this plug-in failed to create and we shouldn't need to remember
186
    // anything about how.
186
    // anything about how.
187
    m_pendingPluginCreationParameters.clear();
187
    m_pendingPluginCreationParameters = nullptr;
188
    m_waitingOnAsynchronousInitialization = false;
188
    m_waitingOnAsynchronousInitialization = false;
189
}
189
}
190
190
- a/Source/WebKit2/WebProcess/Plugins/PluginProxy.h -1 / +2 lines
Lines 35-40 a/Source/WebKit2/WebProcess/Plugins/PluginProxy.h_sec1
35
#include <WebCore/FindOptions.h>
35
#include <WebCore/FindOptions.h>
36
#include <WebCore/IntRect.h>
36
#include <WebCore/IntRect.h>
37
#include <WebCore/SecurityOrigin.h>
37
#include <WebCore/SecurityOrigin.h>
38
#include <memory>
38
39
39
#if PLATFORM(COCOA)
40
#if PLATFORM(COCOA)
40
#include <wtf/RetainPtr.h>
41
#include <wtf/RetainPtr.h>
Lines 211-217 private: a/Source/WebKit2/WebProcess/Plugins/PluginProxy.h_sec2
211
    // The client ID for the CA layer in the plug-in process. Will be 0 if the plug-in is not a CA plug-in.
212
    // The client ID for the CA layer in the plug-in process. Will be 0 if the plug-in is not a CA plug-in.
212
    uint32_t m_remoteLayerClientID;
213
    uint32_t m_remoteLayerClientID;
213
    
214
    
214
    OwnPtr<PluginCreationParameters> m_pendingPluginCreationParameters;
215
    std::unique_ptr<PluginCreationParameters> m_pendingPluginCreationParameters;
215
    bool m_waitingOnAsynchronousInitialization;
216
    bool m_waitingOnAsynchronousInitialization;
216
217
217
#if PLATFORM(COCOA)
218
#if PLATFORM(COCOA)
- a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp -3 / +3 lines
Lines 822-828 String PluginView::getSelectionString() const a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp_sec1
822
    return m_plugin->getSelectionString();
822
    return m_plugin->getSelectionString();
823
}
823
}
824
824
825
OwnPtr<WebEvent> PluginView::createWebEvent(MouseEvent* event) const
825
std::unique_ptr<WebEvent> PluginView::createWebEvent(MouseEvent* event) const
826
{
826
{
827
    WebEvent::Type type = WebEvent::NoType;
827
    WebEvent::Type type = WebEvent::NoType;
828
    unsigned clickCount = 1;
828
    unsigned clickCount = 1;
Lines 864-870 OwnPtr<WebEvent> PluginView::createWebEvent(MouseEvent* event) const a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp_sec2
864
    if (event->metaKey())
864
    if (event->metaKey())
865
        modifiers |= WebEvent::MetaKey;
865
        modifiers |= WebEvent::MetaKey;
866
866
867
    return adoptPtr(new WebMouseEvent(type, button, m_plugin->convertToRootView(IntPoint(event->offsetX(), event->offsetY())), event->screenLocation(), 0, 0, 0, clickCount, static_cast<WebEvent::Modifiers>(modifiers), 0));
867
    return std::make_unique<WebMouseEvent>(type, button, m_plugin->convertToRootView(IntPoint(event->offsetX(), event->offsetY())), event->screenLocation(), 0, 0, 0, clickCount, static_cast<WebEvent::Modifiers>(modifiers), 0);
868
}
868
}
869
869
870
void PluginView::handleEvent(Event* event)
870
void PluginView::handleEvent(Event* event)
Lines 873-879 void PluginView::handleEvent(Event* event) a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp_sec3
873
        return;
873
        return;
874
874
875
    const WebEvent* currentEvent = WebPage::currentEvent();
875
    const WebEvent* currentEvent = WebPage::currentEvent();
876
    OwnPtr<WebEvent> simulatedWebEvent;
876
    std::unique_ptr<WebEvent> simulatedWebEvent;
877
    if (event->isMouseEvent() && toMouseEvent(event)->isSimulated()) {
877
    if (event->isMouseEvent() && toMouseEvent(event)->isSimulated()) {
878
        simulatedWebEvent = createWebEvent(toMouseEvent(event));
878
        simulatedWebEvent = createWebEvent(toMouseEvent(event));
879
        currentEvent = simulatedWebEvent.get();
879
        currentEvent = simulatedWebEvent.get();
- a/Source/WebKit2/WebProcess/Plugins/PluginView.h -1 / +2 lines
Lines 39-44 a/Source/WebKit2/WebProcess/Plugins/PluginView.h_sec1
39
#include <WebCore/ResourceResponse.h>
39
#include <WebCore/ResourceResponse.h>
40
#include <WebCore/Timer.h>
40
#include <WebCore/Timer.h>
41
#include <WebCore/ViewState.h>
41
#include <WebCore/ViewState.h>
42
#include <memory>
42
#include <wtf/Deque.h>
43
#include <wtf/Deque.h>
43
#include <wtf/RunLoop.h>
44
#include <wtf/RunLoop.h>
44
45
Lines 222-228 private: a/Source/WebKit2/WebProcess/Plugins/PluginView.h_sec2
222
    virtual void didFinishLoad(WebFrame*);
223
    virtual void didFinishLoad(WebFrame*);
223
    virtual void didFailLoad(WebFrame*, bool wasCancelled);
224
    virtual void didFailLoad(WebFrame*, bool wasCancelled);
224
225
225
    OwnPtr<WebEvent> createWebEvent(WebCore::MouseEvent*) const;
226
    std::unique_ptr<WebEvent> createWebEvent(WebCore::MouseEvent*) const;
226
227
227
    RefPtr<WebCore::HTMLPlugInElement> m_pluginElement;
228
    RefPtr<WebCore::HTMLPlugInElement> m_pluginElement;
228
    RefPtr<Plugin> m_plugin;
229
    RefPtr<Plugin> m_plugin;
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebPopupMenu.h -1 lines
Lines 25-31 a/Source/WebKit2/WebProcess/WebCoreSupport/WebPopupMenu.h_sec1
25
#include "WebPopupItem.h"
25
#include "WebPopupItem.h"
26
#include <WebCore/PopupMenu.h>
26
#include <WebCore/PopupMenu.h>
27
#include <wtf/Forward.h>
27
#include <wtf/Forward.h>
28
#include <wtf/OwnPtr.h>
29
#include <wtf/Vector.h>
28
#include <wtf/Vector.h>
30
29
31
namespace WebCore {
30
namespace WebCore {
- a/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp -1 / +1 lines
Lines 53-59 PassRefPtr<EventDispatcher> EventDispatcher::create() a/Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp_sec1
53
53
54
EventDispatcher::EventDispatcher()
54
EventDispatcher::EventDispatcher()
55
    : m_queue(WorkQueue::create("com.apple.WebKit.EventDispatcher"))
55
    : m_queue(WorkQueue::create("com.apple.WebKit.EventDispatcher"))
56
    , m_recentWheelEventDeltaTracker(adoptPtr(new WheelEventDeltaTracker))
56
    , m_recentWheelEventDeltaTracker(std::make_unique<WheelEventDeltaTracker>())
57
{
57
{
58
}
58
}
59
59
- a/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h -1 / +2 lines
Lines 29-34 a/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h_sec1
29
#include "Connection.h"
29
#include "Connection.h"
30
30
31
#include <WebCore/WheelEventDeltaTracker.h>
31
#include <WebCore/WheelEventDeltaTracker.h>
32
#include <memory>
32
#include <wtf/HashMap.h>
33
#include <wtf/HashMap.h>
33
#include <wtf/Noncopyable.h>
34
#include <wtf/Noncopyable.h>
34
#include <wtf/RefPtr.h>
35
#include <wtf/RefPtr.h>
Lines 78-84 private: a/Source/WebKit2/WebProcess/WebPage/EventDispatcher.h_sec2
78
    Mutex m_scrollingTreesMutex;
79
    Mutex m_scrollingTreesMutex;
79
    HashMap<uint64_t, RefPtr<WebCore::ThreadedScrollingTree>> m_scrollingTrees;
80
    HashMap<uint64_t, RefPtr<WebCore::ThreadedScrollingTree>> m_scrollingTrees;
80
#endif
81
#endif
81
    OwnPtr<WebCore::WheelEventDeltaTracker> m_recentWheelEventDeltaTracker;
82
    std::unique_ptr<WebCore::WheelEventDeltaTracker> m_recentWheelEventDeltaTracker;
82
};
83
};
83
84
84
} // namespace WebKit
85
} // namespace WebKit
- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp -2 / +2 lines
Lines 325-331 WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters) a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec1
325
325
326
    pageClients.visitedLinkStore = VisitedLinkTableController::getOrCreate(parameters.visitedLinkTableID);
326
    pageClients.visitedLinkStore = VisitedLinkTableController::getOrCreate(parameters.visitedLinkTableID);
327
327
328
    m_page = adoptPtr(new Page(pageClients));
328
    m_page = std::make_unique<Page>(pageClients);
329
329
330
    m_drawingArea = DrawingArea::create(this, parameters);
330
    m_drawingArea = DrawingArea::create(this, parameters);
331
    m_drawingArea->setPaintingEnabled(false);
331
    m_drawingArea->setPaintingEnabled(false);
Lines 3437-3443 void WebPage::beginPrinting(uint64_t frameID, const PrintInfo& printInfo) a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec2
3437
#endif // PLATFORM(MAC)
3437
#endif // PLATFORM(MAC)
3438
3438
3439
    if (!m_printContext)
3439
    if (!m_printContext)
3440
        m_printContext = adoptPtr(new PrintContext(coreFrame));
3440
        m_printContext = std::make_unique<PrintContext>(coreFrame);
3441
3441
3442
    drawingArea()->setLayerTreeStateIsFrozen(true);
3442
    drawingArea()->setLayerTreeStateIsFrozen(true);
3443
    m_printContext->begin(printInfo.availablePaperWidth, printInfo.availablePaperHeight);
3443
    m_printContext->begin(printInfo.availablePaperWidth, printInfo.availablePaperHeight);
- a/Source/WebKit2/WebProcess/WebPage/WebPage.h -3 / +3 lines
Lines 60-67 a/Source/WebKit2/WebProcess/WebPage/WebPage.h_sec1
60
#include <WebCore/ViewState.h>
60
#include <WebCore/ViewState.h>
61
#include <WebCore/ViewportConfiguration.h>
61
#include <WebCore/ViewportConfiguration.h>
62
#include <WebCore/WebCoreKeyboardUIMode.h>
62
#include <WebCore/WebCoreKeyboardUIMode.h>
63
#include <memory>
63
#include <wtf/HashMap.h>
64
#include <wtf/HashMap.h>
64
#include <wtf/OwnPtr.h>
65
#include <wtf/PassRefPtr.h>
65
#include <wtf/PassRefPtr.h>
66
#include <wtf/RefPtr.h>
66
#include <wtf/RefPtr.h>
67
#include <wtf/text/WTFString.h>
67
#include <wtf/text/WTFString.h>
Lines 927-933 private: a/Source/WebKit2/WebProcess/WebPage/WebPage.h_sec2
927
927
928
    uint64_t m_pageID;
928
    uint64_t m_pageID;
929
929
930
    OwnPtr<WebCore::Page> m_page;
930
    std::unique_ptr<WebCore::Page> m_page;
931
    RefPtr<WebFrame> m_mainFrame;
931
    RefPtr<WebFrame> m_mainFrame;
932
    RefPtr<InjectedBundleBackForwardList> m_backForwardList;
932
    RefPtr<InjectedBundleBackForwardList> m_backForwardList;
933
933
Lines 1061-1067 private: a/Source/WebKit2/WebProcess/WebPage/WebPage.h_sec3
1061
    GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
1061
    GeolocationPermissionRequestManager m_geolocationPermissionRequestManager;
1062
#endif
1062
#endif
1063
1063
1064
    OwnPtr<WebCore::PrintContext> m_printContext;
1064
    std::unique_ptr<WebCore::PrintContext> m_printContext;
1065
#if PLATFORM(GTK)
1065
#if PLATFORM(GTK)
1066
    RefPtr<WebPrintOperationGtk> m_printOperation;
1066
    RefPtr<WebPrintOperationGtk> m_printOperation;
1067
#endif
1067
#endif
- a/Source/WebKit2/WebProcess/WebProcess.h -2 / +2 lines
Lines 100-106 public: a/Source/WebKit2/WebProcess/WebProcess.h_sec1
100
    template <typename T>
100
    template <typename T>
101
    void addSupplement()
101
    void addSupplement()
102
    {
102
    {
103
        m_supplements.add(T::supplementName(), adoptPtr<WebProcessSupplement>(new T(this)));
103
        m_supplements.add(T::supplementName(), std::make_unique<T>(this));
104
    }
104
    }
105
105
106
    WebConnectionToUIProcess* webConnectionToUIProcess() const { return m_webConnection.get(); }
106
    WebConnectionToUIProcess* webConnectionToUIProcess() const { return m_webConnection.get(); }
Lines 308-314 private: a/Source/WebKit2/WebProcess/WebProcess.h_sec2
308
308
309
    HashMap<uint64_t, WebFrame*> m_frameMap;
309
    HashMap<uint64_t, WebFrame*> m_frameMap;
310
310
311
    typedef HashMap<const char*, OwnPtr<WebProcessSupplement>, PtrHash<const char*>> WebProcessSupplementMap;
311
    typedef HashMap<const char*, std::unique_ptr<WebProcessSupplement>, PtrHash<const char*>> WebProcessSupplementMap;
312
    WebProcessSupplementMap m_supplements;
312
    WebProcessSupplementMap m_supplements;
313
313
314
    TextCheckerState m_textCheckerState;
314
    TextCheckerState m_textCheckerState;

Return to Bug 129670