Changeset 164245 in webkit


Ignore:
Timestamp:
Feb 17, 2014 12:35:05 PM (10 years ago)
Author:
Sergio Correia
Message:

Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
https://bugs.webkit.org/show_bug.cgi?id=128681

Reviewed by Timothy Hatcher.

Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
WebCore/inspector/*. Besides files in there, a few other files in
JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
and WebCore/testing were touched.

Source/JavaScriptCore:

  • inspector/ContentSearchUtilities.cpp:
  • inspector/ContentSearchUtilities.h:
  • inspector/agents/InspectorConsoleAgent.cpp:
  • inspector/agents/InspectorConsoleAgent.h:

Source/WebCore:

No new tests; no new behavior.

  • WebCore.exp.in:
  • inspector/CommandLineAPIHost.cpp:
  • inspector/CommandLineAPIHost.h:
  • inspector/DOMEditor.cpp:
  • inspector/DOMPatchSupport.cpp:
  • inspector/DOMPatchSupport.h:
  • inspector/InspectorApplicationCacheAgent.h:
  • inspector/InspectorCSSAgent.cpp:
  • inspector/InspectorCSSAgent.h:
  • inspector/InspectorCanvasAgent.h:
  • inspector/InspectorDOMAgent.cpp:
  • inspector/InspectorDOMAgent.h:
  • inspector/InspectorDOMDebuggerAgent.h:
  • inspector/InspectorDOMStorageAgent.h:
  • inspector/InspectorDatabaseAgent.h:
  • inspector/InspectorFrontendClientLocal.cpp:
  • inspector/InspectorFrontendClientLocal.h:
  • inspector/InspectorHeapProfilerAgent.h:
  • inspector/InspectorHistory.cpp:
  • inspector/InspectorHistory.h:
  • inspector/InspectorIndexedDBAgent.h:
  • inspector/InspectorInputAgent.h:
  • inspector/InspectorLayerTreeAgent.h:
  • inspector/InspectorMemoryAgent.cpp:
  • inspector/InspectorMemoryAgent.h:
  • inspector/InspectorOverlay.cpp:
  • inspector/InspectorOverlay.h:
  • inspector/InspectorProfilerAgent.cpp:
  • inspector/InspectorProfilerAgent.h:
  • inspector/InspectorResourceAgent.cpp:
  • inspector/InspectorResourceAgent.h:
  • inspector/InspectorStyleSheet.cpp:
  • inspector/InspectorStyleSheet.h:
  • inspector/InspectorTimelineAgent.h:
  • inspector/InspectorWorkerAgent.cpp:
  • inspector/PageConsoleAgent.cpp:
  • inspector/PageRuntimeAgent.h:
  • inspector/WebConsoleAgent.cpp:
  • inspector/WorkerRuntimeAgent.h:
  • testing/Internals.cpp:

Source/WebKit:

  • WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/cf:

  • WebCoreSupport/WebInspectorClientCF.cpp:

Source/WebKit/efl:

  • WebCoreSupport/InspectorClientEfl.cpp:

Source/WebKit/gtk:

  • WebCoreSupport/InspectorClientGtk.cpp:

Source/WebKit/ios:

  • WebCoreSupport/WebInspectorClientIOS.mm:

Source/WebKit/mac:

  • WebCoreSupport/WebInspectorClient.h:
  • WebCoreSupport/WebInspectorClient.mm:

Source/WebKit/win:

  • WebCoreSupport/WebInspectorClient.cpp:
  • WebCoreSupport/WebInspectorClient.h:

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
Location:
trunk/Source
Files:
64 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r164243 r164245  
     12014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
     2
     3        Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=128681
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
     9        WebCore/inspector/*. Besides files in there, a few other files in
     10        JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
     11        and WebCore/testing were touched.
     12
     13
     14        * inspector/ContentSearchUtilities.cpp:
     15        * inspector/ContentSearchUtilities.h:
     16        * inspector/agents/InspectorConsoleAgent.cpp:
     17        * inspector/agents/InspectorConsoleAgent.h:
     18
    1192014-02-17  Filip Pizlo  <fpizlo@apple.com>
    220
  • trunk/Source/JavaScriptCore/inspector/ContentSearchUtilities.cpp

    r163988 r164245  
    8383        return result;
    8484
    85     OwnPtr<Vector<size_t>> endings(lineEndings(text));
     85    std::unique_ptr<Vector<size_t>> endings(lineEndings(text));
    8686    size_t size = endings->size();
    8787    unsigned start = 0;
     
    101101}
    102102
    103 PassOwnPtr<Vector<size_t>> lineEndings(const String& text)
    104 {
    105     OwnPtr<Vector<size_t>> result(adoptPtr(new Vector<size_t>()));
     103std::unique_ptr<Vector<size_t>> lineEndings(const String& text)
     104{
     105    auto result = std::make_unique<Vector<size_t>>();
    106106
    107107    unsigned start = 0;
     
    116116    result->append(text.length());
    117117
    118     return result.release();
     118    return result;
    119119}
    120120
  • trunk/Source/JavaScriptCore/inspector/ContentSearchUtilities.h

    r162692 r164245  
    4949JS_EXPORT_PRIVATE PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex);
    5050JS_EXPORT_PRIVATE TextPosition textPositionFromOffset(size_t offset, const Vector<size_t>& lineEndings);
    51 JS_EXPORT_PRIVATE PassOwnPtr<Vector<size_t>> lineEndings(const String&);
     51JS_EXPORT_PRIVATE std::unique_ptr<Vector<size_t>> lineEndings(const String&);
    5252
    5353JS_EXPORT_PRIVATE String findScriptSourceURL(const String& content);
  • trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp

    r163568 r164245  
    3737#include "ScriptObject.h"
    3838#include <wtf/CurrentTime.h>
    39 #include <wtf/OwnPtr.h>
    40 #include <wtf/PassOwnPtr.h>
    4139#include <wtf/text/StringBuilder.h>
    4240#include <wtf/text/WTFString.h>
     
    131129    }
    132130
    133     addConsoleMessage(adoptPtr(new ConsoleMessage(!isWorkerAgent(), source, type, level, message, callStack, requestIdentifier)));
     131    addConsoleMessage(std::make_unique<ConsoleMessage>(!isWorkerAgent(), source, type, level, message, callStack, requestIdentifier));
    134132}
    135133
     
    144142    }
    145143
    146     addConsoleMessage(adoptPtr(new ConsoleMessage(!isWorkerAgent(), source, type, level, message, arguments, state, requestIdentifier)));
     144    addConsoleMessage(std::make_unique<ConsoleMessage>(!isWorkerAgent(), source, type, level, message, arguments, state, requestIdentifier));
    147145}
    148146
     
    158156
    159157    bool canGenerateCallStack = !isWorkerAgent() && m_frontendDispatcher;
    160     addConsoleMessage(adoptPtr(new ConsoleMessage(canGenerateCallStack, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier)));
     158    addConsoleMessage(std::make_unique<ConsoleMessage>(canGenerateCallStack, source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier));
    161159}
    162160
     
    230228}
    231229
    232 void InspectorConsoleAgent::addConsoleMessage(PassOwnPtr<ConsoleMessage> consoleMessage)
     230void InspectorConsoleAgent::addConsoleMessage(std::unique_ptr<ConsoleMessage> consoleMessage)
    233231{
    234232    ASSERT(m_injectedScriptManager->inspectorEnvironment().developerExtrasEnabled());
     
    241239    } else {
    242240        m_previousMessage = consoleMessage.get();
    243         m_consoleMessages.append(consoleMessage);
     241        m_consoleMessages.append(std::move(consoleMessage));
    244242        if (m_frontendDispatcher && m_enabled)
    245243            m_previousMessage->addToFrontend(m_frontendDispatcher.get(), m_injectedScriptManager, true);
  • trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h

    r163568 r164245  
    8484
    8585protected:
    86     void addConsoleMessage(PassOwnPtr<ConsoleMessage>);
     86    void addConsoleMessage(std::unique_ptr<ConsoleMessage>);
    8787
    8888    InjectedScriptManager* m_injectedScriptManager;
     
    9090    RefPtr<InspectorConsoleBackendDispatcher> m_backendDispatcher;
    9191    ConsoleMessage* m_previousMessage;
    92     Vector<OwnPtr<ConsoleMessage>> m_consoleMessages;
     92    Vector<std::unique_ptr<ConsoleMessage>> m_consoleMessages;
    9393    int m_expiredConsoleMessageCount;
    9494    HashMap<String, unsigned> m_counts;
  • trunk/Source/WebCore/ChangeLog

    r164242 r164245  
     12014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
     2
     3        Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=128681
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
     9        WebCore/inspector/*. Besides files in there, a few other files in
     10        JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
     11        and WebCore/testing were touched.
     12
     13        No new tests; no new behavior.
     14
     15        * WebCore.exp.in:
     16        * inspector/CommandLineAPIHost.cpp:
     17        * inspector/CommandLineAPIHost.h:
     18        * inspector/DOMEditor.cpp:
     19        * inspector/DOMPatchSupport.cpp:
     20        * inspector/DOMPatchSupport.h:
     21        * inspector/InspectorApplicationCacheAgent.h:
     22        * inspector/InspectorCSSAgent.cpp:
     23        * inspector/InspectorCSSAgent.h:
     24        * inspector/InspectorCanvasAgent.h:
     25        * inspector/InspectorDOMAgent.cpp:
     26        * inspector/InspectorDOMAgent.h:
     27        * inspector/InspectorDOMDebuggerAgent.h:
     28        * inspector/InspectorDOMStorageAgent.h:
     29        * inspector/InspectorDatabaseAgent.h:
     30        * inspector/InspectorFrontendClientLocal.cpp:
     31        * inspector/InspectorFrontendClientLocal.h:
     32        * inspector/InspectorHeapProfilerAgent.h:
     33        * inspector/InspectorHistory.cpp:
     34        * inspector/InspectorHistory.h:
     35        * inspector/InspectorIndexedDBAgent.h:
     36        * inspector/InspectorInputAgent.h:
     37        * inspector/InspectorLayerTreeAgent.h:
     38        * inspector/InspectorMemoryAgent.cpp:
     39        * inspector/InspectorMemoryAgent.h:
     40        * inspector/InspectorOverlay.cpp:
     41        * inspector/InspectorOverlay.h:
     42        * inspector/InspectorProfilerAgent.cpp:
     43        * inspector/InspectorProfilerAgent.h:
     44        * inspector/InspectorResourceAgent.cpp:
     45        * inspector/InspectorResourceAgent.h:
     46        * inspector/InspectorStyleSheet.cpp:
     47        * inspector/InspectorStyleSheet.h:
     48        * inspector/InspectorTimelineAgent.h:
     49        * inspector/InspectorWorkerAgent.cpp:
     50        * inspector/PageConsoleAgent.cpp:
     51        * inspector/PageRuntimeAgent.h:
     52        * inspector/WebConsoleAgent.cpp:
     53        * inspector/WorkerRuntimeAgent.h:
     54        * testing/Internals.cpp:
     55
    1562014-02-17  Antti Koivisto  <antti@apple.com>
    257
  • trunk/Source/WebCore/WebCore.exp.in

    r164181 r164245  
    28342834__ZN7WebCore28InspectorFrontendClientLocal30constrainedAttachedWindowWidthEjj
    28352835__ZN7WebCore28InspectorFrontendClientLocal31constrainedAttachedWindowHeightEjj
    2836 __ZN7WebCore28InspectorFrontendClientLocalC2EPNS_19InspectorControllerEPNS_4PageEN3WTF10PassOwnPtrINS0_8SettingsEEE
     2836__ZN7WebCore28InspectorFrontendClientLocalC2EPNS_19InspectorControllerEPNS_4PageENSt3__110unique_ptrINS0_8SettingsENS5_14default_deleteIS7_EEEE
    28372837__ZN7WebCore28InspectorFrontendClientLocalD2Ev
    28382838__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_9DOMWindowE
  • trunk/Source/WebCore/inspector/CommandLineAPIHost.cpp

    r163568 r164245  
    7575#endif
    7676{
    77     m_defaultInspectableObject = adoptPtr(new InspectableObject);
     77    m_defaultInspectableObject = std::make_unique<InspectableObject>();
    7878}
    7979
     
    125125};
    126126
    127 void CommandLineAPIHost::addInspectedObject(PassOwnPtr<CommandLineAPIHost::InspectableObject> object)
     127void CommandLineAPIHost::addInspectedObject(std::unique_ptr<CommandLineAPIHost::InspectableObject> object)
    128128{
    129     m_inspectedObjects.insert(0, object);
     129    m_inspectedObjects.insert(0, std::move(object));
    130130    while (m_inspectedObjects.size() > 5)
    131131        m_inspectedObjects.removeLast();
  • trunk/Source/WebCore/inspector/CommandLineAPIHost.h

    r163568 r164245  
    9393        virtual ~InspectableObject() { }
    9494    };
    95     void addInspectedObject(PassOwnPtr<InspectableObject>);
     95    void addInspectedObject(std::unique_ptr<InspectableObject>);
    9696    void clearInspectedObjects();
    9797    InspectableObject* inspectedObject(unsigned index);
     
    116116#endif
    117117
    118     Vector<OwnPtr<InspectableObject>> m_inspectedObjects;
    119     OwnPtr<InspectableObject> m_defaultInspectableObject;
     118    Vector<std::unique_ptr<InspectableObject>> m_inspectedObjects;
     119    std::unique_ptr<InspectableObject> m_defaultInspectableObject;
    120120};
    121121
  • trunk/Source/WebCore/inspector/DOMEditor.cpp

    r162374 r164245  
    9393    {
    9494        if (m_node->parentNode()) {
    95             m_removeChildAction = adoptPtr(new RemoveChildAction(m_node->parentNode(), m_node.get()));
     95            m_removeChildAction = std::make_unique<RemoveChildAction>(m_node->parentNode(), m_node.get());
    9696            if (!m_removeChildAction->perform(ec))
    9797                return false;
     
    120120    RefPtr<Node> m_node;
    121121    RefPtr<Node> m_anchorNode;
    122     OwnPtr<RemoveChildAction> m_removeChildAction;
     122    std::unique_ptr<RemoveChildAction> m_removeChildAction;
    123123};
    124124
     
    209209        , m_html(html)
    210210        , m_newNode(nullptr)
    211         , m_history(adoptPtr(new InspectorHistory()))
    212         , m_domEditor(adoptPtr(new DOMEditor(m_history.get())))
     211        , m_history(std::make_unique<InspectorHistory>())
     212        , m_domEditor(std::make_unique<DOMEditor>(m_history.get()))
    213213    {
    214214    }
     
    243243    String m_oldHTML;
    244244    Node* m_newNode;
    245     OwnPtr<InspectorHistory> m_history;
    246     OwnPtr<DOMEditor> m_domEditor;
     245    std::unique_ptr<InspectorHistory> m_history;
     246    std::unique_ptr<DOMEditor> m_domEditor;
    247247};
    248248
     
    353353bool DOMEditor::insertBefore(Node* parentNode, PassRefPtr<Node> node, Node* anchorNode, ExceptionCode& ec)
    354354{
    355     return m_history->perform(adoptPtr(new InsertBeforeAction(parentNode, node, anchorNode)), ec);
     355    return m_history->perform(std::make_unique<InsertBeforeAction>(parentNode, node, anchorNode), ec);
    356356}
    357357
    358358bool DOMEditor::removeChild(Node* parentNode, Node* node, ExceptionCode& ec)
    359359{
    360     return m_history->perform(adoptPtr(new RemoveChildAction(parentNode, node)), ec);
     360    return m_history->perform(std::make_unique<RemoveChildAction>(parentNode, node), ec);
    361361}
    362362
    363363bool DOMEditor::setAttribute(Element* element, const String& name, const String& value, ExceptionCode& ec)
    364364{
    365     return m_history->perform(adoptPtr(new SetAttributeAction(element, name, value)), ec);
     365    return m_history->perform(std::make_unique<SetAttributeAction>(element, name, value), ec);
    366366}
    367367
    368368bool DOMEditor::removeAttribute(Element* element, const String& name, ExceptionCode& ec)
    369369{
    370     return m_history->perform(adoptPtr(new RemoveAttributeAction(element, name)), ec);
     370    return m_history->perform(std::make_unique<RemoveAttributeAction>(element, name), ec);
    371371}
    372372
    373373bool DOMEditor::setOuterHTML(Node& node, const String& html, Node** newNode, ExceptionCode& ec)
    374374{
    375     OwnPtr<SetOuterHTMLAction> action = adoptPtr(new SetOuterHTMLAction(node, html));
     375    auto action = std::make_unique<SetOuterHTMLAction>(node, html);
    376376    SetOuterHTMLAction* rawAction = action.get();
    377     bool result = m_history->perform(action.release(), ec);
     377    bool result = m_history->perform(std::move(action), ec);
    378378    if (result)
    379379        *newNode = rawAction->newNode();
     
    383383bool DOMEditor::replaceWholeText(Text* textNode, const String& text, ExceptionCode& ec)
    384384{
    385     return m_history->perform(adoptPtr(new ReplaceWholeTextAction(textNode, text)), ec);
     385    return m_history->perform(std::make_unique<ReplaceWholeTextAction>(textNode, text), ec);
    386386}
    387387
    388388bool DOMEditor::replaceChild(Node* parentNode, PassRefPtr<Node> newNode, Node* oldNode, ExceptionCode& ec)
    389389{
    390     return m_history->perform(adoptPtr(new ReplaceChildNodeAction(parentNode, newNode, oldNode)), ec);
     390    return m_history->perform(std::make_unique<ReplaceChildNodeAction>(parentNode, newNode, oldNode), ec);
    391391}
    392392
    393393bool DOMEditor::setNodeValue(Node* node, const String& value, ExceptionCode& ec)
    394394{
    395     return m_history->perform(adoptPtr(new SetNodeValueAction(node, value)), ec);
     395    return m_history->perform(std::make_unique<SetNodeValueAction>(node, value), ec);
    396396}
    397397
  • trunk/Source/WebCore/inspector/DOMPatchSupport.cpp

    r163440 r164245  
    6767    String m_attrsSHA1;
    6868    Node* m_node;
    69     Vector<OwnPtr<Digest>> m_children;
     69    Vector<std::unique_ptr<Digest>> m_children;
    7070};
    7171
     
    106106    parser->detach();
    107107
    108     OwnPtr<Digest> oldInfo = createDigest(m_document->documentElement(), nullptr);
    109     OwnPtr<Digest> newInfo = createDigest(newDocument->documentElement(), &m_unusedNodesMap);
     108    std::unique_ptr<Digest> oldInfo = createDigest(m_document->documentElement(), nullptr);
     109    std::unique_ptr<Digest> newInfo = createDigest(newDocument->documentElement(), &m_unusedNodesMap);
    110110
    111111    if (!innerPatchNode(oldInfo.get(), newInfo.get(), IGNORE_EXCEPTION)) {
     
    134134    // Compose the old list.
    135135    ContainerNode* parentNode = node.parentNode();
    136     Vector<OwnPtr<Digest>> oldList;
     136    Vector<std::unique_ptr<Digest>> oldList;
    137137    for (Node* child = parentNode->firstChild(); child; child = child->nextSibling())
    138138        oldList.append(createDigest(child, nullptr));
     
    140140    // Compose the new list.
    141141    String markupCopy = markup.lower();
    142     Vector<OwnPtr<Digest>> newList;
     142    Vector<std::unique_ptr<Digest>> newList;
    143143    for (Node* child = parentNode->firstChild(); child != &node; child = child->nextSibling())
    144144        newList.append(createDigest(child, nullptr));
     
    209209
    210210std::pair<DOMPatchSupport::ResultMap, DOMPatchSupport::ResultMap>
    211 DOMPatchSupport::diff(const Vector<OwnPtr<Digest>>& oldList, const Vector<OwnPtr<Digest>>& newList)
     211DOMPatchSupport::diff(const Vector<std::unique_ptr<Digest>>& oldList, const Vector<std::unique_ptr<Digest>>& newList)
    212212{
    213213    ResultMap newMap(newList.size());
     
    296296}
    297297
    298 bool DOMPatchSupport::innerPatchChildren(ContainerNode* parentNode, const Vector<OwnPtr<Digest>>& oldList, const Vector<OwnPtr<Digest>>& newList, ExceptionCode& ec)
     298bool DOMPatchSupport::innerPatchChildren(ContainerNode* parentNode, const Vector<std::unique_ptr<Digest>>& oldList, const Vector<std::unique_ptr<Digest>>& newList, ExceptionCode& ec)
    299299{
    300300    std::pair<ResultMap, ResultMap> resultMaps = diff(oldList, newList);
     
    408408}
    409409
    410 PassOwnPtr<DOMPatchSupport::Digest> DOMPatchSupport::createDigest(Node* node, UnusedNodesMap* unusedNodesMap)
    411 {
    412     Digest* digest = new Digest(node);
    413 
     410std::unique_ptr<DOMPatchSupport::Digest> DOMPatchSupport::createDigest(Node* node, UnusedNodesMap* unusedNodesMap)
     411{
     412    auto digest = std::make_unique<Digest>(node);
    414413    SHA1 sha1;
    415414
     
    422421        Node* child = node->firstChild();
    423422        while (child) {
    424             OwnPtr<Digest> childInfo = createDigest(child, unusedNodesMap);
     423            std::unique_ptr<Digest> childInfo = createDigest(child, unusedNodesMap);
    425424            addStringToSHA1(sha1, childInfo->m_sha1);
    426425            child = child->nextSibling();
    427             digest->m_children.append(childInfo.release());
     426            digest->m_children.append(std::move(childInfo));
    428427        }
    429428        Element* element = toElement(node);
     
    446445    digest->m_sha1 = base64Encode(hash.data(), 10);
    447446    if (unusedNodesMap)
    448         unusedNodesMap->add(digest->m_sha1, digest);
    449     return adoptPtr(digest);
     447        unusedNodesMap->add(digest->m_sha1, digest.get());
     448
     449    return digest;
    450450}
    451451
  • trunk/Source/WebCore/inspector/DOMPatchSupport.h

    r161309 r164245  
    3535
    3636#include <wtf/HashMap.h>
    37 #include <wtf/OwnPtr.h>
    38 #include <wtf/PassOwnPtr.h>
    3937#include <wtf/Vector.h>
    4038#include <wtf/text/WTFString.h>
     
    6664
    6765    bool innerPatchNode(Digest* oldNode, Digest* newNode, ExceptionCode&);
    68     std::pair<ResultMap, ResultMap> diff(const Vector<OwnPtr<Digest>>& oldChildren, const Vector<OwnPtr<Digest>>& newChildren);
    69     bool innerPatchChildren(ContainerNode*, const Vector<OwnPtr<Digest>>& oldChildren, const Vector<OwnPtr<Digest>>& newChildren, ExceptionCode&);
    70     PassOwnPtr<Digest> createDigest(Node*, UnusedNodesMap*);
     66    std::pair<ResultMap, ResultMap> diff(const Vector<std::unique_ptr<Digest>>& oldChildren, const Vector<std::unique_ptr<Digest>>& newChildren);
     67    bool innerPatchChildren(ContainerNode*, const Vector<std::unique_ptr<Digest>>& oldChildren, const Vector<std::unique_ptr<Digest>>& newChildren, ExceptionCode&);
     68    std::unique_ptr<Digest> createDigest(Node*, UnusedNodesMap*);
    7169    bool insertBeforeAndMarkAsUsed(ContainerNode*, Digest*, Node* anchor, ExceptionCode&);
    7270    bool removeChildAndMoveToNew(Digest*, ExceptionCode&);
  • trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.h

    r162676 r164245  
    3333#include "InspectorWebFrontendDispatchers.h"
    3434#include <wtf/Noncopyable.h>
    35 #include <wtf/PassOwnPtr.h>
    3635
    3736namespace Inspector {
  • trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp

    r163962 r164245  
    166166        m_timer.startOneShot(0);
    167167}
    168    
     168
    169169class ChangeRegionOversetTask {
    170170public:
     
    174174    void reset();
    175175    void timerFired(Timer<ChangeRegionOversetTask>&);
    176    
     176
    177177private:
    178178    InspectorCSSAgent* m_cssAgent;
     
    190190{
    191191    m_namedFlows.add(namedFlow, documentNodeId);
    192    
     192
    193193    if (!m_timer.isActive())
    194194        m_timer.startOneShot(0);
     
    267267    }
    268268
    269     virtual void merge(PassOwnPtr<Action> action) override
     269    virtual void merge(std::unique_ptr<Action> action) override
    270270    {
    271271        ASSERT(action->mergeId() == mergeId());
     
    311311    }
    312312
    313     virtual void merge(PassOwnPtr<Action> action) override
     313    virtual void merge(std::unique_ptr<Action> action) override
    314314    {
    315315        ASSERT(action->mergeId() == mergeId());
     
    370370    }
    371371
    372     virtual void merge(PassOwnPtr<Action> action) override
     372    virtual void merge(std::unique_ptr<Action> action) override
    373373    {
    374374        ASSERT(action->mergeId() == mergeId());
     
    583583    if (m_updateRegionLayoutTask)
    584584        m_updateRegionLayoutTask->unschedule(namedFlow);
    585    
     585
    586586    if (m_changeRegionOversetTask)
    587587        m_changeRegionOversetTask->unschedule(namedFlow);
     
    597597
    598598    if (!m_updateRegionLayoutTask)
    599         m_updateRegionLayoutTask = adoptPtr(new UpdateRegionLayoutTask(this));
     599        m_updateRegionLayoutTask = std::make_unique<UpdateRegionLayoutTask>(this);
    600600    m_updateRegionLayoutTask->scheduleFor(namedFlow, documentNodeId);
    601601}
     
    617617    if (!documentNodeId)
    618618        return;
    619    
     619
    620620    if (!m_changeRegionOversetTask)
    621         m_changeRegionOversetTask = adoptPtr(new ChangeRegionOversetTask(this));
     621        m_changeRegionOversetTask = std::make_unique<ChangeRegionOversetTask>(this);
    622622    m_changeRegionOversetTask->scheduleFor(namedFlow, documentNodeId);
    623623}
     
    627627    if (namedFlow->flowState() == WebKitNamedFlow::FlowStateNull)
    628628        return;
    629    
     629
    630630    ErrorString errorString;
    631631    Ref<WebKitNamedFlow> protect(*namedFlow);
    632    
     632
    633633    m_frontendDispatcher->regionOversetChanged(buildObjectForNamedFlow(&errorString, namedFlow, documentNodeId));
    634634}
     
    804804
    805805    ExceptionCode ec = 0;
    806     m_domAgent->history()->perform(adoptPtr(new SetStyleSheetTextAction(inspectorStyleSheet, text)), ec);
     806    m_domAgent->history()->perform(std::make_unique<SetStyleSheetTextAction>(inspectorStyleSheet, text), ec);
    807807    *errorString = InspectorDOMAgent::toErrorString(ec);
    808808}
     
    818818
    819819    ExceptionCode ec = 0;
    820     bool success = m_domAgent->history()->perform(adoptPtr(new SetStyleTextAction(inspectorStyleSheet, compoundId, text)), ec);
     820    bool success = m_domAgent->history()->perform(std::make_unique<SetStyleTextAction>(inspectorStyleSheet, compoundId, text), ec);
    821821    if (success)
    822822        result = inspectorStyleSheet->buildObjectForStyle(inspectorStyleSheet->styleForId(compoundId));
     
    834834
    835835    ExceptionCode ec = 0;
    836     bool success = m_domAgent->history()->perform(adoptPtr(new SetPropertyTextAction(inspectorStyleSheet, compoundId, propertyIndex, text, overwrite)), ec);
     836    bool success = m_domAgent->history()->perform(std::make_unique<SetPropertyTextAction>(inspectorStyleSheet, compoundId, propertyIndex, text, overwrite), ec);
    837837    if (success)
    838838        result = inspectorStyleSheet->buildObjectForStyle(inspectorStyleSheet->styleForId(compoundId));
     
    850850
    851851    ExceptionCode ec = 0;
    852     bool success = m_domAgent->history()->perform(adoptPtr(new TogglePropertyAction(inspectorStyleSheet, compoundId, propertyIndex, disable)), ec);
     852    bool success = m_domAgent->history()->perform(std::make_unique<TogglePropertyAction>(inspectorStyleSheet, compoundId, propertyIndex, disable), ec);
    853853    if (success)
    854854        result = inspectorStyleSheet->buildObjectForStyle(inspectorStyleSheet->styleForId(compoundId));
     
    866866
    867867    ExceptionCode ec = 0;
    868     bool success = m_domAgent->history()->perform(adoptPtr(new SetRuleSelectorAction(inspectorStyleSheet, compoundId, selector)), ec);
     868    bool success = m_domAgent->history()->perform(std::make_unique<SetRuleSelectorAction>(inspectorStyleSheet, compoundId, selector), ec);
    869869
    870870    if (success)
     
    886886
    887887    ExceptionCode ec = 0;
    888     OwnPtr<AddRuleAction> action = adoptPtr(new AddRuleAction(inspectorStyleSheet, selector));
     888    auto action = std::make_unique<AddRuleAction>(inspectorStyleSheet, selector);
    889889    AddRuleAction* rawAction = action.get();
    890     bool success = m_domAgent->history()->perform(action.release(), ec);
     890    bool success = m_domAgent->history()->perform(std::move(action), ec);
    891891    if (!success) {
    892892        *errorString = InspectorDOMAgent::toErrorString(ec);
  • trunk/Source/WebCore/inspector/InspectorCSSAgent.h

    r162676 r164245  
    182182    NodeIdToForcedPseudoState m_nodeIdToForcedPseudoState;
    183183    HashSet<int> m_namedFlowCollectionsRequested;
    184     OwnPtr<UpdateRegionLayoutTask> m_updateRegionLayoutTask;
    185     OwnPtr<ChangeRegionOversetTask> m_changeRegionOversetTask;
     184    std::unique_ptr<UpdateRegionLayoutTask> m_updateRegionLayoutTask;
     185    std::unique_ptr<ChangeRegionOversetTask> m_changeRegionOversetTask;
    186186
    187187    int m_lastStyleSheetId;
  • trunk/Source/WebCore/inspector/InspectorCanvasAgent.h

    r162676 r164245  
    4040#include "ScriptState.h"
    4141#include <wtf/HashMap.h>
    42 #include <wtf/PassOwnPtr.h>
    4342#include <wtf/PassRefPtr.h>
    4443#include <wtf/text/WTFString.h>
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp

    r164139 r164245  
    9797#include <runtime/JSCInlines.h>
    9898#include <wtf/HashSet.h>
    99 #include <wtf/OwnPtr.h>
    10099#include <wtf/Vector.h>
    101100#include <wtf/text/CString.h>
     
    237236    m_backendDispatcher = InspectorDOMBackendDispatcher::create(backendDispatcher, this);
    238237
    239     m_history = adoptPtr(new InspectorHistory());
    240     m_domEditor = adoptPtr(new DOMEditor(m_history.get()));
     238    m_history = std::make_unique<InspectorHistory>();
     239    m_domEditor = std::make_unique<DOMEditor>(m_history.get());
    241240
    242241    m_instrumentingAgents->setInspectorDOMAgent(this);
     
    252251    m_backendDispatcher.clear();
    253252
    254     m_history.clear();
    255     m_domEditor.clear();
     253    m_history.reset();
     254    m_domEditor.reset();
    256255
    257256    ErrorString error;
     
    585584        if (!parent) {
    586585            // Node being pushed is detached -> push subtree root.
    587             OwnPtr<NodeToIdMap> newMap = adoptPtr(new NodeToIdMap);
     586            auto newMap = std::make_unique<NodeToIdMap>();
    588587            danglingMap = newMap.get();
    589588            m_danglingNodeToIdMaps.append(newMap.release());
     
    10331032}
    10341033
    1035 PassOwnPtr<HighlightConfig> InspectorDOMAgent::highlightConfigFromInspectorObject(ErrorString* errorString, InspectorObject* highlightInspectorObject)
     1034std::unique_ptr<HighlightConfig> InspectorDOMAgent::highlightConfigFromInspectorObject(ErrorString* errorString, InspectorObject* highlightInspectorObject)
    10361035{
    10371036    if (!highlightInspectorObject) {
     
    10401039    }
    10411040
    1042     OwnPtr<HighlightConfig> highlightConfig = adoptPtr(new HighlightConfig());
     1041    auto highlightConfig = std::make_unique<HighlightConfig>();
    10431042    bool showInfo = false; // Default: false (do not show a tooltip).
    10441043    highlightInspectorObject->getBoolean("showInfo", &showInfo);
     
    10521051    highlightConfig->border = parseConfigColor("borderColor", highlightInspectorObject);
    10531052    highlightConfig->margin = parseConfigColor("marginColor", highlightInspectorObject);
    1054     return highlightConfig.release();
     1053    return highlightConfig;
    10551054}
    10561055
     
    10621061void InspectorDOMAgent::highlightRect(ErrorString*, int x, int y, int width, int height, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor, const bool* usePageCoordinates)
    10631062{
    1064     OwnPtr<FloatQuad> quad = adoptPtr(new FloatQuad(FloatRect(x, y, width, height)));
    1065     innerHighlightQuad(quad.release(), color, outlineColor, usePageCoordinates);
     1063    auto quad = std::make_unique<FloatQuad>(FloatRect(x, y, width, height));
     1064    innerHighlightQuad(std::move(quad), color, outlineColor, usePageCoordinates);
    10661065}
    10671066
    10681067void InspectorDOMAgent::highlightQuad(ErrorString* errorString, const RefPtr<InspectorArray>& quadArray, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor, const bool* usePageCoordinates)
    10691068{
    1070     OwnPtr<FloatQuad> quad = adoptPtr(new FloatQuad());
     1069    auto quad = std::make_unique<FloatQuad>();
    10711070    if (!parseQuad(quadArray, quad.get())) {
    10721071        *errorString = "Invalid Quad format";
    10731072        return;
    10741073    }
    1075     innerHighlightQuad(quad.release(), color, outlineColor, usePageCoordinates);
    1076 }
    1077 
    1078 void InspectorDOMAgent::innerHighlightQuad(PassOwnPtr<FloatQuad> quad, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor, const bool* usePageCoordinates)
    1079 {
    1080     OwnPtr<HighlightConfig> highlightConfig = adoptPtr(new HighlightConfig());
     1074    innerHighlightQuad(std::move(quad), color, outlineColor, usePageCoordinates);
     1075}
     1076
     1077void InspectorDOMAgent::innerHighlightQuad(std::unique_ptr<FloatQuad> quad, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor, const bool* usePageCoordinates)
     1078{
     1079    auto highlightConfig = std::make_unique<HighlightConfig>();
    10811080    highlightConfig->content = parseColor(color);
    10821081    highlightConfig->contentOutline = parseColor(outlineColor);
    10831082    highlightConfig->usePageCoordinates = usePageCoordinates ? *usePageCoordinates : false;
    1084     m_overlay->highlightQuad(quad, *highlightConfig);
     1083    m_overlay->highlightQuad(std::move(quad), *highlightConfig);
    10851084}
    10861085
     
    11001099        return;
    11011100
    1102     OwnPtr<HighlightConfig> highlightConfig = highlightConfigFromInspectorObject(errorString, highlightInspectorObject.get());
     1101    std::unique_ptr<HighlightConfig> highlightConfig = highlightConfigFromInspectorObject(errorString, highlightInspectorObject.get());
    11031102    if (!highlightConfig)
    11041103        return;
     
    11151114    Frame* frame = m_pageAgent->frameForId(frameId);
    11161115    if (frame && frame->ownerElement()) {
    1117         OwnPtr<HighlightConfig> highlightConfig = adoptPtr(new HighlightConfig());
     1116        auto highlightConfig = std::make_unique<HighlightConfig>();
    11181117        highlightConfig->showInfo = true; // Always show tooltips for frames.
    11191118        highlightConfig->content = parseColor(color);
     
    16431642
    16441643    if (!m_revalidateStyleAttrTask)
    1645         m_revalidateStyleAttrTask = adoptPtr(new RevalidateStyleAttributeTask(this));
     1644        m_revalidateStyleAttrTask = std::make_unique<RevalidateStyleAttributeTask>(this);
    16461645    m_revalidateStyleAttrTask->scheduleFor(toElement(node));
    16471646}
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.h

    r163891 r164245  
    4242#include <wtf/HashMap.h>
    4343#include <wtf/HashSet.h>
    44 #include <wtf/OwnPtr.h>
    45 #include <wtf/PassOwnPtr.h>
    4644#include <wtf/RefPtr.h>
    4745#include <wtf/Vector.h>
     
    214212private:
    215213    void setSearchingForNode(ErrorString*, bool enabled, Inspector::InspectorObject* highlightConfig);
    216     PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*, Inspector::InspectorObject* highlightInspectorObject);
     214    std::unique_ptr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*, Inspector::InspectorObject* highlightInspectorObject);
    217215
    218216    // Node-related methods.
     
    242240    void discardBindings();
    243241
    244     void innerHighlightQuad(PassOwnPtr<FloatQuad>, const RefPtr<Inspector::InspectorObject>* color, const RefPtr<Inspector::InspectorObject>* outlineColor, const bool* usePageCoordinates);
     242    void innerHighlightQuad(std::unique_ptr<FloatQuad>, const RefPtr<Inspector::InspectorObject>* color, const RefPtr<Inspector::InspectorObject>* outlineColor, const bool* usePageCoordinates);
    245243
    246244    InspectorPageAgent* m_pageAgent;
     
    254252    HashMap<String, NodeToBackendIdMap> m_nodeGroupToBackendIdMap;
    255253    // Owns node mappings for dangling nodes.
    256     Vector<OwnPtr<NodeToIdMap>> m_danglingNodeToIdMaps;
     254    Vector<std::unique_ptr<NodeToIdMap>> m_danglingNodeToIdMaps;
    257255    HashMap<int, Node*> m_idToNode;
    258256    HashMap<int, NodeToIdMap*> m_idToNodesMap;
     
    264262    typedef HashMap<String, Vector<RefPtr<Node>>> SearchResults;
    265263    SearchResults m_searchResults;
    266     OwnPtr<RevalidateStyleAttributeTask> m_revalidateStyleAttrTask;
     264    std::unique_ptr<RevalidateStyleAttributeTask> m_revalidateStyleAttrTask;
    267265    RefPtr<Node> m_nodeToFocus;
    268266    bool m_searchingForNode;
    269     OwnPtr<HighlightConfig> m_inspectModeHighlightConfig;
    270     OwnPtr<InspectorHistory> m_history;
    271     OwnPtr<DOMEditor> m_domEditor;
     267    std::unique_ptr<HighlightConfig> m_inspectModeHighlightConfig;
     268    std::unique_ptr<InspectorHistory> m_history;
     269    std::unique_ptr<DOMEditor> m_domEditor;
    272270    bool m_suppressAttributeModifiedEvent;
    273271    bool m_documentRequested;
  • trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h

    r163024 r164245  
    3838#include <inspector/agents/InspectorDebuggerAgent.h>
    3939#include <wtf/HashMap.h>
    40 #include <wtf/PassOwnPtr.h>
    4140#include <wtf/RefCounted.h>
    4241#include <wtf/text/WTFString.h>
  • trunk/Source/WebCore/inspector/InspectorDOMStorageAgent.h

    r162676 r164245  
    3434#include "StorageArea.h"
    3535#include <wtf/HashMap.h>
    36 #include <wtf/PassOwnPtr.h>
    3736#include <wtf/text/WTFString.h>
    3837
  • trunk/Source/WebCore/inspector/InspectorDatabaseAgent.h

    r162676 r164245  
    3636#include "InspectorWebFrontendDispatchers.h"
    3737#include <wtf/HashMap.h>
    38 #include <wtf/PassOwnPtr.h>
    3938#include <wtf/text/WTFString.h>
    4039
  • trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp

    r162264 r164245  
    117117}
    118118
    119 InspectorFrontendClientLocal::InspectorFrontendClientLocal(InspectorController* inspectorController, Page* frontendPage, PassOwnPtr<Settings> settings)
     119InspectorFrontendClientLocal::InspectorFrontendClientLocal(InspectorController* inspectorController, Page* frontendPage, std::unique_ptr<Settings> settings)
    120120    : m_inspectorController(inspectorController)
    121121    , m_frontendPage(frontendPage)
    122     , m_settings(settings)
     122    , m_settings(std::move(settings))
    123123    , m_frontendLoaded(false)
    124124    , m_dockSide(UNDOCKED)
    125125{
    126126    m_frontendPage->settings().setAllowFileAccessFromFileURLs(true);
    127     m_dispatchTask = adoptPtr(new InspectorBackendDispatchTask(inspectorController));
     127    m_dispatchTask = std::make_unique<InspectorBackendDispatchTask>(inspectorController);
    128128}
    129129
  • trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h

    r163962 r164245  
    5656    };
    5757
    58     InspectorFrontendClientLocal(InspectorController*, Page*, PassOwnPtr<Settings>);
     58    InspectorFrontendClientLocal(InspectorController*, Page*, std::unique_ptr<Settings>);
    5959    virtual ~InspectorFrontendClientLocal();
    60    
     60
    6161    virtual void windowObjectCleared() override;
    6262    virtual void frontendLoaded() override;
     
    9999
    100100    void showMainResourceForFrame(Frame*);
    101    
     101
    102102    void showResources();
    103103
     
    118118    // TODO(yurys): this ref shouldn't be needed.
    119119    RefPtr<InspectorFrontendHost> m_frontendHost;
    120     OwnPtr<InspectorFrontendClientLocal::Settings> m_settings;
     120    std::unique_ptr<InspectorFrontendClientLocal::Settings> m_settings;
    121121    bool m_frontendLoaded;
    122122    DockSide m_dockSide;
    123123    Vector<String> m_evaluateOnLoad;
    124     OwnPtr<InspectorBackendDispatchTask> m_dispatchTask;
     124    std::unique_ptr<InspectorBackendDispatchTask> m_dispatchTask;
    125125};
    126126
  • trunk/Source/WebCore/inspector/InspectorHeapProfilerAgent.h

    r163987 r164245  
    4040#include <wtf/HashMap.h>
    4141#include <wtf/Noncopyable.h>
    42 #include <wtf/PassOwnPtr.h>
    4342#include <wtf/text/WTFString.h>
    4443
  • trunk/Source/WebCore/inspector/InspectorHistory.cpp

    r162369 r164245  
    8080}
    8181
    82 void InspectorHistory::Action::merge(PassOwnPtr<Action>)
     82void InspectorHistory::Action::merge(std::unique_ptr<Action>)
    8383{
    8484}
     
    8888InspectorHistory::~InspectorHistory() { }
    8989
    90 bool InspectorHistory::perform(PassOwnPtr<Action> action, ExceptionCode& ec)
     90bool InspectorHistory::perform(std::unique_ptr<Action> action, ExceptionCode& ec)
    9191{
    9292    if (!action->perform(ec))
     
    9494
    9595    if (!action->mergeId().isEmpty() && m_afterLastActionIndex > 0 && action->mergeId() == m_history[m_afterLastActionIndex - 1]->mergeId())
    96         m_history[m_afterLastActionIndex - 1]->merge(action);
     96        m_history[m_afterLastActionIndex - 1]->merge(std::move(action));
    9797    else {
    9898        m_history.resize(m_afterLastActionIndex);
    99         m_history.append(action);
     99        m_history.append(std::move(action));
    100100        ++m_afterLastActionIndex;
    101101    }
     
    105105void InspectorHistory::markUndoableState()
    106106{
    107     perform(adoptPtr(new UndoableStateMark()), IGNORE_EXCEPTION);
     107    perform(std::make_unique<UndoableStateMark>(), IGNORE_EXCEPTION);
    108108}
    109109
  • trunk/Source/WebCore/inspector/InspectorHistory.h

    r157653 r164245  
    3434#include "ExceptionCode.h"
    3535
    36 #include <wtf/OwnPtr.h>
    3736#include <wtf/Vector.h>
    3837#include <wtf/text/WTFString.h>
     
    5756
    5857        virtual String mergeId();
    59         virtual void merge(PassOwnPtr<Action>);
     58        virtual void merge(std::unique_ptr<Action>);
    6059
    6160        virtual bool perform(ExceptionCode&) = 0;
     
    7271    virtual ~InspectorHistory();
    7372
    74     bool perform(PassOwnPtr<Action>, ExceptionCode&);
     73    bool perform(std::unique_ptr<Action>, ExceptionCode&);
    7574    void markUndoableState();
    7675
     
    8079
    8180private:
    82     Vector<OwnPtr<Action>> m_history;
     81    Vector<std::unique_ptr<Action>> m_history;
    8382    size_t m_afterLastActionIndex;
    8483};
  • trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.h

    r162676 r164245  
    3636#include "InspectorWebAgentBase.h"
    3737#include "InspectorWebBackendDispatchers.h"
    38 #include <wtf/PassOwnPtr.h>
    3938#include <wtf/text/WTFString.h>
    4039
  • trunk/Source/WebCore/inspector/InspectorInputAgent.h

    r162676 r164245  
    3737#include "InspectorWebBackendDispatchers.h"
    3838#include <wtf/Noncopyable.h>
    39 #include <wtf/PassOwnPtr.h>
    4039#include <wtf/text/WTFString.h>
    4140
  • trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.h

    r162676 r164245  
    3737#include "InspectorWebTypeBuilders.h"
    3838#include "RenderLayer.h"
    39 #include <wtf/PassOwnPtr.h>
    4039#include <wtf/PassRefPtr.h>
    4140#include <wtf/Vector.h>
  • trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp

    r162676 r164245  
    5050#include <runtime/ArrayBufferView.h>
    5151#include <wtf/HashSet.h>
    52 #include <wtf/OwnPtr.h>
    53 #include <wtf/PassOwnPtr.h>
    5452#include <wtf/Vector.h>
    5553#include <wtf/text/StringBuilder.h>
  • trunk/Source/WebCore/inspector/InspectorMemoryAgent.h

    r162676 r164245  
    3636#include "InspectorWebAgentBase.h"
    3737#include "InspectorWebBackendDispatchers.h"
    38 #include <wtf/PassOwnPtr.h>
    3938#include <wtf/RefPtr.h>
    4039
  • trunk/Source/WebCore/inspector/InspectorOverlay.cpp

    r163440 r164245  
    281281{
    282282    m_highlightNode.clear();
    283     m_highlightQuad.clear();
     283    m_highlightQuad.reset();
    284284    update();
    285285}
     
    292292}
    293293
    294 void InspectorOverlay::highlightQuad(PassOwnPtr<FloatQuad> quad, const HighlightConfig& highlightConfig)
     294void InspectorOverlay::highlightQuad(std::unique_ptr<FloatQuad> quad, const HighlightConfig& highlightConfig)
    295295{
    296296    if (m_quadHighlightConfig.usePageCoordinates)
     
    298298
    299299    m_quadHighlightConfig = highlightConfig;
    300     m_highlightQuad = quad;
     300    m_highlightQuad = std::move(quad);
    301301    update();
    302302}
     
    749749    Page::PageClients pageClients;
    750750    fillWithEmptyClients(pageClients);
    751     m_overlayPage = adoptPtr(new Page(pageClients));
     751    m_overlayPage = std::make_unique<Page>(pageClients);
    752752
    753753    Settings& settings = m_page.settings();
     
    816816void InspectorOverlay::freePage()
    817817{
    818     m_overlayPage.clear();
     818    m_overlayPage.reset();
    819819}
    820820
  • trunk/Source/WebCore/inspector/InspectorOverlay.h

    r162264 r164245  
    3333#include "FloatQuad.h"
    3434#include "LayoutRect.h"
    35 #include <wtf/OwnPtr.h>
    36 #include <wtf/PassOwnPtr.h>
    3735#include <wtf/RefPtr.h>
    3836#include <wtf/Vector.h>
     
    118116    void hideHighlight();
    119117    void highlightNode(Node*, const HighlightConfig&);
    120     void highlightQuad(PassOwnPtr<FloatQuad>, const HighlightConfig&);
     118    void highlightQuad(std::unique_ptr<FloatQuad>, const HighlightConfig&);
    121119
    122120    Node* highlightedNode() const;
     
    142140    RefPtr<Node> m_highlightNode;
    143141    HighlightConfig m_nodeHighlightConfig;
    144     OwnPtr<FloatQuad> m_highlightQuad;
    145     OwnPtr<Page> m_overlayPage;
     142    std::unique_ptr<FloatQuad> m_highlightQuad;
     143    std::unique_ptr<Page> m_overlayPage;
    146144    HighlightConfig m_quadHighlightConfig;
    147145    IntSize m_size;
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp

    r163987 r164245  
    5151#include <inspector/agents/InspectorConsoleAgent.h>
    5252#include <wtf/CurrentTime.h>
    53 #include <wtf/OwnPtr.h>
    5453#include <wtf/text/StringConcatenate.h>
    5554
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.h

    r163987 r164245  
    3939#include <wtf/HashMap.h>
    4040#include <wtf/Noncopyable.h>
    41 #include <wtf/PassOwnPtr.h>
    4241#include <wtf/text/WTFString.h>
    4342
  • trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp

    r163568 r164245  
    644644    , m_pageAgent(pageAgent)
    645645    , m_client(client)
    646     , m_resourcesData(adoptPtr(new NetworkResourcesData()))
     646    , m_resourcesData(std::make_unique<NetworkResourcesData>())
    647647    , m_enabled(false)
    648648    , m_cacheDisabled(false)
  • trunk/Source/WebCore/inspector/InspectorResourceAgent.h

    r162676 r164245  
    3535#include "InspectorWebBackendDispatchers.h"
    3636#include "InspectorWebFrontendDispatchers.h"
    37 #include <wtf/PassOwnPtr.h>
    3837#include <wtf/RefCounted.h>
    3938#include <wtf/Vector.h>
     
    146145    std::unique_ptr<Inspector::InspectorNetworkFrontendDispatcher> m_frontendDispatcher;
    147146    RefPtr<Inspector::InspectorNetworkBackendDispatcher> m_backendDispatcher;
    148     OwnPtr<NetworkResourcesData> m_resourcesData;
     147    std::unique_ptr<NetworkResourcesData> m_resourcesData;
    149148    bool m_enabled;
    150149    bool m_cacheDisabled;
  • trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp

    r163440 r164245  
    5959#include <inspector/ContentSearchUtilities.h>
    6060#include <inspector/InspectorValues.h>
    61 #include <wtf/OwnPtr.h>
    62 #include <wtf/PassOwnPtr.h>
    6361#include <wtf/Vector.h>
    6462#include <wtf/text/StringBuilder.h>
     
    7876    bool hasText() const { return m_hasText; }
    7977    RuleSourceDataList* sourceData() const { return m_sourceData.get(); }
    80     void setSourceData(PassOwnPtr<RuleSourceDataList>);
    81     bool hasSourceData() const { return m_sourceData; }
     78    void setSourceData(std::unique_ptr<RuleSourceDataList>);
     79    bool hasSourceData() const { return m_sourceData != nullptr; }
    8280    PassRefPtr<WebCore::CSSRuleSourceData> ruleSourceDataAt(unsigned) const;
    8381
     
    8684    String m_text;
    8785    bool m_hasText;
    88     OwnPtr<RuleSourceDataList> m_sourceData;
     86    std::unique_ptr<RuleSourceDataList> m_sourceData;
    8987};
    9088
     
    116114}
    117115
    118 void ParsedStyleSheet::setSourceData(PassOwnPtr<RuleSourceDataList> sourceData)
     116void ParsedStyleSheet::setSourceData(std::unique_ptr<RuleSourceDataList> sourceData)
    119117{
    120118    if (!sourceData) {
    121         m_sourceData.clear();
     119        m_sourceData.reset();
    122120        return;
    123121    }
    124122
    125     m_sourceData = adoptPtr(new RuleSourceDataList());
     123    m_sourceData = std::make_unique<RuleSourceDataList>();
    126124
    127125    // FIXME: This is a temporary solution to retain the original flat sourceData structure
     
    285283}
    286284
    287 static PassOwnPtr<CSSParser> createCSSParser(Document* document)
    288 {
    289     return adoptPtr(new CSSParser(document ? CSSParserContext(*document) : strictCSSParserContext()));
     285static std::unique_ptr<CSSParser> createCSSParser(Document* document)
     286{
     287    return std::make_unique<CSSParser>(document ? CSSParserContext(*document) : strictCSSParserContext());
    290288}
    291289
     
    522520    String previousPriority;
    523521    String previousStatus;
    524     OwnPtr<Vector<size_t>> lineEndings(m_parentStyleSheet ? m_parentStyleSheet->lineEndings() : PassOwnPtr<Vector<size_t>>());
     522    std::unique_ptr<Vector<size_t>> lineEndings(m_parentStyleSheet ? m_parentStyleSheet->lineEndings() : nullptr);
    525523    RefPtr<CSSRuleSourceData> sourceData = extractSourceData();
    526524    unsigned ruleBodyRangeStart = sourceData ? sourceData->ruleBodyRange.start : 0;
     
    12121210}
    12131211
    1214 PassOwnPtr<Vector<size_t>> InspectorStyleSheet::lineEndings() const
     1212std::unique_ptr<Vector<size_t>> InspectorStyleSheet::lineEndings() const
    12151213{
    12161214    if (!m_parsedStyleSheet->hasText())
    1217         return PassOwnPtr<Vector<size_t>>();
     1215        return nullptr;
    12181216    return ContentSearchUtilities::lineEndings(m_parsedStyleSheet->text());
    12191217}
     
    12711269
    12721270    RefPtr<StyleSheetContents> newStyleSheet = StyleSheetContents::create();
    1273     OwnPtr<RuleSourceDataList> ruleSourceDataResult = adoptPtr(new RuleSourceDataList());
     1271    auto ruleSourceDataResult = std::make_unique<RuleSourceDataList>();
    12741272    createCSSParser(m_pageStyleSheet->ownerDocument())->parseSheet(newStyleSheet.get(), m_parsedStyleSheet->text(), 0, ruleSourceDataResult.get());
    1275     m_parsedStyleSheet->setSourceData(ruleSourceDataResult.release());
     1273    m_parsedStyleSheet->setSourceData(std::move(ruleSourceDataResult));
    12761274    return m_parsedStyleSheet->hasSourceData();
    12771275}
     
    14771475}
    14781476
    1479 PassOwnPtr<Vector<size_t>> InspectorStyleSheetForInlineStyle::lineEndings() const
     1477std::unique_ptr<Vector<size_t>> InspectorStyleSheetForInlineStyle::lineEndings() const
    14801478{
    14811479    return ContentSearchUtilities::lineEndings(elementStyleText());
  • trunk/Source/WebCore/inspector/InspectorStyleSheet.h

    r162374 r164245  
    227227    // Also accessed by friend class InspectorStyle.
    228228    virtual bool setStyleText(CSSStyleDeclaration*, const String&, ExceptionCode&);
    229     virtual PassOwnPtr<Vector<size_t>> lineEndings() const;
     229    virtual std::unique_ptr<Vector<size_t>> lineEndings() const;
    230230
    231231private:
     
    279279    // Also accessed by friend class InspectorStyle.
    280280    virtual bool setStyleText(CSSStyleDeclaration*, const String&, ExceptionCode&) override;
    281     virtual PassOwnPtr<Vector<size_t>> lineEndings() const override;
     281    virtual std::unique_ptr<Vector<size_t>> lineEndings() const override;
    282282
    283283private:
  • trunk/Source/WebCore/inspector/InspectorTimelineAgent.h

    r163139 r164245  
    3939#include "LayoutRect.h"
    4040#include <inspector/InspectorValues.h>
    41 #include <wtf/PassOwnPtr.h>
    4241#include <wtf/Vector.h>
    4342#include <wtf/WeakPtr.h>
  • trunk/Source/WebCore/inspector/InspectorWorkerAgent.cpp

    r162676 r164245  
    4141#include "WorkerGlobalScopeProxy.h"
    4242#include <inspector/InspectorValues.h>
    43 #include <wtf/PassOwnPtr.h>
    4443#include <wtf/RefPtr.h>
    4544
  • trunk/Source/WebCore/inspector/PageConsoleAgent.cpp

    r163987 r164245  
    7676
    7777    if (CommandLineAPIHost* commandLineAPIHost = static_cast<WebInjectedScriptManager*>(m_injectedScriptManager)->commandLineAPIHost())
    78         commandLineAPIHost->addInspectedObject(adoptPtr(new InspectableNode(node)));
     78        commandLineAPIHost->addInspectedObject(std::make_unique<InspectableNode>(node));
    7979}
    8080
  • trunk/Source/WebCore/inspector/PageRuntimeAgent.h

    r162767 r164245  
    3636#include <inspector/InspectorJSFrontendDispatchers.h>
    3737#include <inspector/agents/InspectorRuntimeAgent.h>
    38 #include <wtf/PassOwnPtr.h>
    3938
    4039namespace JSC {
  • trunk/Source/WebCore/inspector/WebConsoleAgent.cpp

    r163987 r164245  
    132132{
    133133    if (CommandLineAPIHost* commandLineAPIHost = static_cast<WebInjectedScriptManager*>(m_injectedScriptManager)->commandLineAPIHost())
    134         commandLineAPIHost->addInspectedObject(adoptPtr(new InspectableHeapObject(inspectedHeapObjectId)));
     134        commandLineAPIHost->addInspectedObject(std::make_unique<InspectableHeapObject>(inspectedHeapObjectId));
    135135}
    136136
  • trunk/Source/WebCore/inspector/WorkerRuntimeAgent.h

    r163024 r164245  
    3535
    3636#include <inspector/agents/InspectorRuntimeAgent.h>
    37 #include <wtf/PassOwnPtr.h>
    3837
    3938namespace WebCore {
  • trunk/Source/WebCore/testing/Internals.cpp

    r164131 r164245  
    195195
    196196InspectorFrontendClientDummy::InspectorFrontendClientDummy(InspectorController* controller, Page* page)
    197     : InspectorFrontendClientLocal(controller, page, adoptPtr(new InspectorFrontendClientLocal::Settings()))
     197    : InspectorFrontendClientLocal(controller, page, std::make_unique<InspectorFrontendClientLocal::Settings>())
    198198{
    199199}
  • trunk/Source/WebKit/ChangeLog

    r164187 r164245  
     12014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
     2
     3        Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=128681
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
     9        WebCore/inspector/*. Besides files in there, a few other files in
     10        JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
     11        and WebCore/testing were touched.
     12
     13        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
     14
    1152014-02-15  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in

    r163903 r164245  
    217217        ?s_frontendCounter@InspectorInstrumentation@WebCore@@0HA
    218218        symbolWithPointer(?isUnderTest@InspectorFrontendClientLocal@WebCore@@UAE_NXZ, ?isUnderTest@InspectorFrontendClientLocal@WebCore@@UEAA_NXZ)
    219         symbolWithPointer(??0InspectorFrontendClientLocal@WebCore@@QAE@PAVInspectorController@1@PAVPage@1@V?$PassOwnPtr@VSettings@InspectorFrontendClientLocal@WebCore@@@WTF@@@Z, ??0InspectorFrontendClientLocal@WebCore@@QEAA@PEAVInspectorController@1@PEAVPage@1@V?$PassOwnPtr@VSettings@InspectorFrontendClientLocal@WebCore@@@WTF@@@Z)
     219        symbolWithPointer(??0InspectorFrontendClientLocal@WebCore@@QAE@PAVInspectorController@1@PAVPage@1@V?$unique_ptr@VSettings@InspectorFrontendClientLocal@WebCore@@U?$default_delete@VSettings@InspectorFrontendClientLocal@WebCore@@@std@@@std@@@Z, ??0InspectorFrontendClientLocal@WebCore@@QEAA@PEAVInspectorController@1@PEAVPage@1@V?$unique_ptr@VSettings@InspectorFrontendClientLocal@WebCore@@U?$default_delete@VSettings@InspectorFrontendClientLocal@WebCore@@@std@@@std@@@Z)
    220220        symbolWithPointer(??1InspectorFrontendClientLocal@WebCore@@UAE@XZ, ??1InspectorFrontendClientLocal@WebCore@@UEAA@XZ)
    221221        symbolWithPointer(?changeAttachedWindowHeight@InspectorFrontendClientLocal@WebCore@@UAEXI@Z, ?changeAttachedWindowHeight@InspectorFrontendClientLocal@WebCore@@UEAAXI@Z)
  • trunk/Source/WebKit/cf/ChangeLog

    r160099 r164245  
     12014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
     2
     3        Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=128681
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
     9        WebCore/inspector/*. Besides files in there, a few other files in
     10        JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
     11        and WebCore/testing were touched.
     12
     13        * WebCoreSupport/WebInspectorClientCF.cpp:
     14
    1152013-12-03  Joseph Pecoraro  <pecoraro@apple.com>
    216
  • trunk/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp

    r160099 r164245  
    2626// FIXME: On Windows, we require all WebKit source files to include config.h
    2727// before including any other files. Failing to include config.h will leave
    28 // WTF_USE_CF undefined, causing build failures in this 
    29 // file. But Mac doesn't have a config.h for WebKit, so we can't include the 
     28// WTF_USE_CF undefined, causing build failures in this
     29// file. But Mac doesn't have a config.h for WebKit, so we can't include the
    3030// Windows one here. For now we can just define WTF_USE_CF and
    3131// WTF_USE_CFNETWORK manually, but we need a better long-term solution.
     
    125125}
    126126
    127 PassOwnPtr<WebCore::InspectorFrontendClientLocal::Settings> WebInspectorClient::createFrontendSettings()
     127std::unique_ptr<WebCore::InspectorFrontendClientLocal::Settings> WebInspectorClient::createFrontendSettings()
    128128{
    129129    class InspectorFrontendSettingsCF : public WebCore::InspectorFrontendClientLocal::Settings {
     
    142142        }
    143143    };
    144     return adoptPtr<WebCore::InspectorFrontendClientLocal::Settings>(new InspectorFrontendSettingsCF());
     144    return std::make_unique<InspectorFrontendSettingsCF>();
    145145}
  • trunk/Source/WebKit/efl/ChangeLog

    r164168 r164245  
     12014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
     2
     3        Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=128681
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
     9        WebCore/inspector/*. Besides files in there, a few other files in
     10        JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
     11        and WebCore/testing were touched.
     12
     13        * WebCoreSupport/InspectorClientEfl.cpp:
     14
    1152014-02-15  Ryuan Choi  <ryuan.choi@samsung.com>
    216
  • trunk/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp

    r162676 r164245  
    149149
    150150InspectorFrontendClientEfl::InspectorFrontendClientEfl(Evas_Object* inspectedView, Evas_Object* inspectorView, InspectorClientEfl* inspectorClient)
    151     : InspectorFrontendClientLocal(&EWKPrivate::corePage(inspectedView)->inspectorController(), EWKPrivate::corePage(inspectorView), adoptPtr(new InspectorFrontendSettingsEfl()))
     151    : InspectorFrontendClientLocal(&EWKPrivate::corePage(inspectedView)->inspectorController(), EWKPrivate::corePage(inspectorView), std::make_unique<InspectorFrontendSettingsEfl>())
    152152    , m_inspectedView(inspectedView)
    153153    , m_inspectorView(inspectorView)
  • trunk/Source/WebKit/gtk/ChangeLog

    r164235 r164245  
     12014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
     2
     3        Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=128681
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
     9        WebCore/inspector/*. Besides files in there, a few other files in
     10        JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
     11        and WebCore/testing were touched.
     12
     13        * WebCoreSupport/InspectorClientGtk.cpp:
     14
    1152014-02-17  Anders Carlsson  <andersca@apple.com>
    216
  • trunk/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp

    r162676 r164245  
    158158
    159159InspectorFrontendClient::InspectorFrontendClient(WebKitWebView* inspectedWebView, WebKitWebView* inspectorWebView, WebKitWebInspector* webInspector, Page* inspectorPage, InspectorClient* inspectorClient)
    160     : InspectorFrontendClientLocal(&core(inspectedWebView)->inspectorController(), inspectorPage, adoptPtr(new InspectorFrontendSettingsGtk()))
     160    : InspectorFrontendClientLocal(&core(inspectedWebView)->inspectorController(), inspectorPage, std::make_unique<InspectorFrontendSettingsGtk>())
    161161    , m_inspectorWebView(inspectorWebView)
    162162    , m_inspectedWebView(inspectedWebView)
  • trunk/Source/WebKit/ios/ChangeLog

    r163980 r164245  
     12014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
     2
     3        Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=128681
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
     9        WebCore/inspector/*. Besides files in there, a few other files in
     10        JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
     11        and WebCore/testing were touched.
     12
     13        * WebCoreSupport/WebInspectorClientIOS.mm:
     14
    1152014-02-12  Benjamin Poulain  <bpoulain@apple.com>
    216
  • trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm

    r162011 r164245  
    4040#import <WebCore/Settings.h>
    4141#import <WebCore/WebCoreThread.h>
    42 #import <wtf/PassOwnPtr.h>
    4342
    4443using namespace WebCore;
     
    111110#pragma mark WebInspectorFrontendClient Implementation
    112111
    113 WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage, WTF::PassOwnPtr<Settings> settings)
    114     : InspectorFrontendClientLocal(inspectorController,  frontendPage, settings)
     112WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage, std::unique_ptr<Settings> settings)
     113    : InspectorFrontendClientLocal(inspectorController,  frontendPage, std::move(settings))
    115114{
    116115    // iOS does not have a local inspector, this should not be reached.
  • trunk/Source/WebKit/mac/ChangeLog

    r164187 r164245  
     12014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
     2
     3        Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=128681
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
     9        WebCore/inspector/*. Besides files in there, a few other files in
     10        JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
     11        and WebCore/testing were touched.
     12
     13        * WebCoreSupport/WebInspectorClient.h:
     14        * WebCoreSupport/WebInspectorClient.mm:
     15
    1162014-02-15  Alexey Proskuryakov  <ap@apple.com>
    217
  • trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h

    r162139 r164245  
    77 *
    88 * 1.  Redistributions of source code must retain the above copyright
    9  *     notice, this list of conditions and the following disclaimer. 
     9 *     notice, this list of conditions and the following disclaimer.
    1010 * 2.  Redistributions in binary form must reproduce the above copyright
    1111 *     notice, this list of conditions and the following disclaimer in the
    12  *     documentation and/or other materials provided with the distribution. 
     12 *     documentation and/or other materials provided with the distribution.
    1313 * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    1414 *     its contributors may be used to endorse or promote products derived
    15  *     from this software without specific prior written permission. 
     15 *     from this software without specific prior written permission.
    1616 *
    1717 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
     
    9090
    9191private:
    92     PassOwnPtr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings();
     92    std::unique_ptr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings();
    9393
    9494    WebView *m_webView;
     
    101101class WebInspectorFrontendClient : public WebCore::InspectorFrontendClientLocal {
    102102public:
    103     WebInspectorFrontendClient(WebView*, WebInspectorWindowController*, WebCore::InspectorController*, WebCore::Page*, PassOwnPtr<Settings>);
     103    WebInspectorFrontendClient(WebView*, WebInspectorWindowController*, WebCore::InspectorController*, WebCore::Page*, std::unique_ptr<Settings>);
    104104
    105105    void attachAvailabilityChanged(bool);
  • trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm

    r162676 r164245  
    77 *
    88 * 1.  Redistributions of source code must retain the above copyright
    9  *     notice, this list of conditions and the following disclaimer. 
     9 *     notice, this list of conditions and the following disclaimer.
    1010 * 2.  Redistributions in binary form must reproduce the above copyright
    1111 *     notice, this list of conditions and the following disclaimer in the
    12  *     documentation and/or other materials provided with the distribution. 
     12 *     documentation and/or other materials provided with the distribution.
    1313 * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    1414 *     its contributors may be used to endorse or promote products derived
    15  *     from this software without specific prior written permission. 
     15 *     from this software without specific prior written permission.
    1616 *
    1717 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
     
    5454#import <WebKit/DOMExtensions.h>
    5555#import <WebKitSystemInterface.h>
    56 #import <wtf/PassOwnPtr.h>
    5756#import <wtf/text/Base64.h>
    5857
     
    211210
    212211
    213 WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage, WTF::PassOwnPtr<Settings> settings)
    214     : InspectorFrontendClientLocal(inspectorController,  frontendPage, settings)
     212WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage, std::unique_ptr<Settings> settings)
     213    : InspectorFrontendClientLocal(inspectorController,  frontendPage, std::move(settings))
    215214    , m_inspectedWebView(inspectedWebView)
    216215    , m_windowController(windowController)
     
    234233
    235234    WebFrame *frame = [m_inspectedWebView mainFrame];
    236    
     235
    237236    WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(m_inspectedWebView);
    238237    if (implementations->didClearInspectorWindowObjectForFrameFunc)
     
    320319{
    321320    ASSERT(!suggestedURL.isEmpty());
    322    
     321
    323322    NSURL *platformURL = m_suggestedToActualURLMap.get(suggestedURL).get();
    324323    if (!platformURL) {
     
    327326        forceSaveDialog = true;
    328327    }
    329    
     328
    330329    ASSERT(platformURL);
    331330    if (!platformURL)
     
    338337    auto saveToURL = ^(NSURL *actualURL) {
    339338        ASSERT(actualURL);
    340        
     339
    341340        m_suggestedToActualURLMap.set(suggestedURLCopy, actualURL);
    342341
     
    357356        return;
    358357    }
    359    
     358
    360359    NSSavePanel *panel = [NSSavePanel savePanel];
    361360    panel.nameFieldStringValue = platformURL.lastPathComponent;
     
    373372{
    374373    ASSERT(!suggestedURL.isEmpty());
    375    
     374
    376375    RetainPtr<NSURL> actualURL = m_suggestedToActualURLMap.get(suggestedURL);
    377376    // do not append unless the user has already confirmed this filename in save().
     
    583582
    584583    _visible = YES;
    585    
     584
    586585    _shouldAttach = _inspectorClient->inspectorStartsAttached() && _frontendClient->canAttachWindow() && !_inspectorClient->inspectorAttachDisabled();
    587586
  • trunk/Source/WebKit/win/ChangeLog

    r164141 r164245  
     12014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
     2
     3        Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=128681
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
     9        WebCore/inspector/*. Besides files in there, a few other files in
     10        JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
     11        and WebCore/testing were touched.
     12
     13        * WebCoreSupport/WebInspectorClient.cpp:
     14        * WebCoreSupport/WebInspectorClient.h:
     15
    1162014-02-14  Brent Fulgham  <bfulgham@apple.com>
    217
  • trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp

    r163903 r164245  
    77 *
    88 * 1.  Redistributions of source code must retain the above copyright
    9  *     notice, this list of conditions and the following disclaimer. 
     9 *     notice, this list of conditions and the following disclaimer.
    1010 * 2.  Redistributions in binary form must reproduce the above copyright
    1111 *     notice, this list of conditions and the following disclaimer in the
    12  *     documentation and/or other materials provided with the distribution. 
     12 *     documentation and/or other materials provided with the distribution.
    1313 * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    1414 *     its contributors may be used to endorse or promote products derived
    15  *     from this software without specific prior written permission. 
     15 *     from this software without specific prior written permission.
    1616 *
    1717 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
     
    225225}
    226226
    227 WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, HWND inspectedWebViewHwnd, HWND frontendHwnd, const COMPtr<WebView>& frontendWebView, HWND frontendWebViewHwnd, WebInspectorClient* inspectorClient, PassOwnPtr<Settings> settings)
    228     : InspectorFrontendClientLocal(&inspectedWebView->page()->inspectorController(),  core(frontendWebView.get()), settings)
     227WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, HWND inspectedWebViewHwnd, HWND frontendHwnd, const COMPtr<WebView>& frontendWebView, HWND frontendWebViewHwnd, WebInspectorClient* inspectorClient, std::unique_ptr<Settings> settings)
     228    : InspectorFrontendClientLocal(&inspectedWebView->page()->inspectorController(),  core(frontendWebView.get()), std::move(settings))
    229229    , m_inspectedWebView(inspectedWebView)
    230230    , m_inspectedWebViewHwnd(inspectedWebViewHwnd)
     
    289289    closeWindowWithoutNotifications();
    290290    // We need to set the attached window's height before we actually attach the window.
    291     // Make sure that m_attached is true so that calling setAttachedWindowHeight from restoreAttachedWindowHeight doesn't return early. 
     291    // Make sure that m_attached is true so that calling setAttachedWindowHeight from restoreAttachedWindowHeight doesn't return early.
    292292    m_attached = true;
    293293    // Immediately after calling showWindowWithoutNotifications(), the parent frameview's visibleHeight incorrectly returns 0 always (Windows only).
     
    333333    SetWindowPos(m_inspectedWebViewHwnd, 0, 0, 0, webViewWidth, totalHeight, SWP_NOZORDER);
    334334
    335     RedrawWindow(m_frontendWebViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW); 
     335    RedrawWindow(m_frontendWebViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW);
    336336    RedrawWindow(m_inspectedWebViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW);
    337337}
  • trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h

    r163903 r164245  
    77 *
    88 * 1.  Redistributions of source code must retain the above copyright
    9  *     notice, this list of conditions and the following disclaimer. 
     9 *     notice, this list of conditions and the following disclaimer.
    1010 * 2.  Redistributions in binary form must reproduce the above copyright
    1111 *     notice, this list of conditions and the following disclaimer in the
    12  *     documentation and/or other materials provided with the distribution. 
     12 *     documentation and/or other materials provided with the distribution.
    1313 * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    1414 *     its contributors may be used to endorse or promote products derived
    15  *     from this software without specific prior written permission. 
     15 *     from this software without specific prior written permission.
    1616 *
    1717 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
     
    8282private:
    8383    virtual ~WebInspectorClient();
    84     WTF::PassOwnPtr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings();
     84    std::unique_ptr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings();
    8585
    8686    WebView* m_inspectedWebView;
     
    9595class WebInspectorFrontendClient : public WebCore::InspectorFrontendClientLocal, WebCore::WindowMessageListener {
    9696public:
    97     WebInspectorFrontendClient(WebView* inspectedWebView, HWND inspectedWebViewHwnd, HWND frontendHwnd, const COMPtr<WebView>& frotnendWebView, HWND frontendWebViewHwnd, WebInspectorClient*, WTF::PassOwnPtr<Settings>);
     97    WebInspectorFrontendClient(WebView* inspectedWebView, HWND inspectedWebViewHwnd, HWND frontendHwnd, const COMPtr<WebView>& frotnendWebView, HWND frontendWebViewHwnd, WebInspectorClient*, std::unique_ptr<Settings>);
    9898    virtual ~WebInspectorFrontendClient();
    9999
    100100    virtual void frontendLoaded();
    101    
     101
    102102    virtual WTF::String localizedStringsURL();
    103    
     103
    104104    virtual void bringToFront();
    105105    virtual void closeWindow();
    106    
     106
    107107    virtual void attachWindow(DockSide);
    108108    virtual void detachWindow();
    109    
     109
    110110    virtual void setAttachedWindowHeight(unsigned height);
    111111    virtual void setAttachedWindowWidth(unsigned);
  • trunk/Source/WebKit2/ChangeLog

    r164240 r164245  
     12014-02-17  Sergio Correia  <sergio.correia@openbossa.org>
     2
     3        Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in WebCore/inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=128681
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Another step towards getting rid of PassOwnPtr/OwnPtr, now targeting
     9        WebCore/inspector/*. Besides files in there, a few other files in
     10        JavaScriptCore/inspector, WebKit/, WebKit2/WebProcess/WebCoreSupport/
     11        and WebCore/testing were touched.
     12
     13        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
     14
    1152014-02-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
    216
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp

    r162676 r164245  
    4242
    4343WebInspectorFrontendClient::WebInspectorFrontendClient(WebPage* page, WebPage* inspectorPage)
    44     : InspectorFrontendClientLocal(&page->corePage()->inspectorController(), inspectorPage->corePage(), adoptPtr(new Settings()))
     44    : InspectorFrontendClientLocal(&page->corePage()->inspectorController(), inspectorPage->corePage(), std::make_unique<Settings>())
    4545    , m_page(page)
    4646{
Note: See TracChangeset for help on using the changeset viewer.