Changeset 164245 in webkit
- Timestamp:
- Feb 17, 2014 12:35:05 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 64 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r164243 r164245 1 2014-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 1 19 2014-02-17 Filip Pizlo <fpizlo@apple.com> 2 20 -
trunk/Source/JavaScriptCore/inspector/ContentSearchUtilities.cpp
r163988 r164245 83 83 return result; 84 84 85 OwnPtr<Vector<size_t>> endings(lineEndings(text));85 std::unique_ptr<Vector<size_t>> endings(lineEndings(text)); 86 86 size_t size = endings->size(); 87 87 unsigned start = 0; … … 101 101 } 102 102 103 PassOwnPtr<Vector<size_t>> lineEndings(const String& text)104 { 105 OwnPtr<Vector<size_t>> result(adoptPtr(new Vector<size_t>()));103 std::unique_ptr<Vector<size_t>> lineEndings(const String& text) 104 { 105 auto result = std::make_unique<Vector<size_t>>(); 106 106 107 107 unsigned start = 0; … … 116 116 result->append(text.length()); 117 117 118 return result .release();118 return result; 119 119 } 120 120 -
trunk/Source/JavaScriptCore/inspector/ContentSearchUtilities.h
r162692 r164245 49 49 JS_EXPORT_PRIVATE PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>> searchInTextByLines(const String& text, const String& query, const bool caseSensitive, const bool isRegex); 50 50 JS_EXPORT_PRIVATE TextPosition textPositionFromOffset(size_t offset, const Vector<size_t>& lineEndings); 51 JS_EXPORT_PRIVATE PassOwnPtr<Vector<size_t>> lineEndings(const String&);51 JS_EXPORT_PRIVATE std::unique_ptr<Vector<size_t>> lineEndings(const String&); 52 52 53 53 JS_EXPORT_PRIVATE String findScriptSourceURL(const String& content); -
trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp
r163568 r164245 37 37 #include "ScriptObject.h" 38 38 #include <wtf/CurrentTime.h> 39 #include <wtf/OwnPtr.h>40 #include <wtf/PassOwnPtr.h>41 39 #include <wtf/text/StringBuilder.h> 42 40 #include <wtf/text/WTFString.h> … … 131 129 } 132 130 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)); 134 132 } 135 133 … … 144 142 } 145 143 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)); 147 145 } 148 146 … … 158 156 159 157 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)); 161 159 } 162 160 … … 230 228 } 231 229 232 void InspectorConsoleAgent::addConsoleMessage( PassOwnPtr<ConsoleMessage> consoleMessage)230 void InspectorConsoleAgent::addConsoleMessage(std::unique_ptr<ConsoleMessage> consoleMessage) 233 231 { 234 232 ASSERT(m_injectedScriptManager->inspectorEnvironment().developerExtrasEnabled()); … … 241 239 } else { 242 240 m_previousMessage = consoleMessage.get(); 243 m_consoleMessages.append( consoleMessage);241 m_consoleMessages.append(std::move(consoleMessage)); 244 242 if (m_frontendDispatcher && m_enabled) 245 243 m_previousMessage->addToFrontend(m_frontendDispatcher.get(), m_injectedScriptManager, true); -
trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h
r163568 r164245 84 84 85 85 protected: 86 void addConsoleMessage( PassOwnPtr<ConsoleMessage>);86 void addConsoleMessage(std::unique_ptr<ConsoleMessage>); 87 87 88 88 InjectedScriptManager* m_injectedScriptManager; … … 90 90 RefPtr<InspectorConsoleBackendDispatcher> m_backendDispatcher; 91 91 ConsoleMessage* m_previousMessage; 92 Vector< OwnPtr<ConsoleMessage>> m_consoleMessages;92 Vector<std::unique_ptr<ConsoleMessage>> m_consoleMessages; 93 93 int m_expiredConsoleMessageCount; 94 94 HashMap<String, unsigned> m_counts; -
trunk/Source/WebCore/ChangeLog
r164242 r164245 1 2014-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 1 56 2014-02-17 Antti Koivisto <antti@apple.com> 2 57 -
trunk/Source/WebCore/WebCore.exp.in
r164181 r164245 2834 2834 __ZN7WebCore28InspectorFrontendClientLocal30constrainedAttachedWindowWidthEjj 2835 2835 __ZN7WebCore28InspectorFrontendClientLocal31constrainedAttachedWindowHeightEjj 2836 __ZN7WebCore28InspectorFrontendClientLocalC2EPNS_19InspectorControllerEPNS_4PageEN 3WTF10PassOwnPtrINS0_8SettingsEEE2836 __ZN7WebCore28InspectorFrontendClientLocalC2EPNS_19InspectorControllerEPNS_4PageENSt3__110unique_ptrINS0_8SettingsENS5_14default_deleteIS7_EEEE 2837 2837 __ZN7WebCore28InspectorFrontendClientLocalD2Ev 2838 2838 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_9DOMWindowE -
trunk/Source/WebCore/inspector/CommandLineAPIHost.cpp
r163568 r164245 75 75 #endif 76 76 { 77 m_defaultInspectableObject = adoptPtr(new InspectableObject);77 m_defaultInspectableObject = std::make_unique<InspectableObject>(); 78 78 } 79 79 … … 125 125 }; 126 126 127 void CommandLineAPIHost::addInspectedObject( PassOwnPtr<CommandLineAPIHost::InspectableObject> object)127 void CommandLineAPIHost::addInspectedObject(std::unique_ptr<CommandLineAPIHost::InspectableObject> object) 128 128 { 129 m_inspectedObjects.insert(0, object);129 m_inspectedObjects.insert(0, std::move(object)); 130 130 while (m_inspectedObjects.size() > 5) 131 131 m_inspectedObjects.removeLast(); -
trunk/Source/WebCore/inspector/CommandLineAPIHost.h
r163568 r164245 93 93 virtual ~InspectableObject() { } 94 94 }; 95 void addInspectedObject( PassOwnPtr<InspectableObject>);95 void addInspectedObject(std::unique_ptr<InspectableObject>); 96 96 void clearInspectedObjects(); 97 97 InspectableObject* inspectedObject(unsigned index); … … 116 116 #endif 117 117 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; 120 120 }; 121 121 -
trunk/Source/WebCore/inspector/DOMEditor.cpp
r162374 r164245 93 93 { 94 94 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()); 96 96 if (!m_removeChildAction->perform(ec)) 97 97 return false; … … 120 120 RefPtr<Node> m_node; 121 121 RefPtr<Node> m_anchorNode; 122 OwnPtr<RemoveChildAction> m_removeChildAction;122 std::unique_ptr<RemoveChildAction> m_removeChildAction; 123 123 }; 124 124 … … 209 209 , m_html(html) 210 210 , 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())) 213 213 { 214 214 } … … 243 243 String m_oldHTML; 244 244 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; 247 247 }; 248 248 … … 353 353 bool DOMEditor::insertBefore(Node* parentNode, PassRefPtr<Node> node, Node* anchorNode, ExceptionCode& ec) 354 354 { 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); 356 356 } 357 357 358 358 bool DOMEditor::removeChild(Node* parentNode, Node* node, ExceptionCode& ec) 359 359 { 360 return m_history->perform( adoptPtr(new RemoveChildAction(parentNode, node)), ec);360 return m_history->perform(std::make_unique<RemoveChildAction>(parentNode, node), ec); 361 361 } 362 362 363 363 bool DOMEditor::setAttribute(Element* element, const String& name, const String& value, ExceptionCode& ec) 364 364 { 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); 366 366 } 367 367 368 368 bool DOMEditor::removeAttribute(Element* element, const String& name, ExceptionCode& ec) 369 369 { 370 return m_history->perform( adoptPtr(new RemoveAttributeAction(element, name)), ec);370 return m_history->perform(std::make_unique<RemoveAttributeAction>(element, name), ec); 371 371 } 372 372 373 373 bool DOMEditor::setOuterHTML(Node& node, const String& html, Node** newNode, ExceptionCode& ec) 374 374 { 375 OwnPtr<SetOuterHTMLAction> action = adoptPtr(new SetOuterHTMLAction(node, html));375 auto action = std::make_unique<SetOuterHTMLAction>(node, html); 376 376 SetOuterHTMLAction* rawAction = action.get(); 377 bool result = m_history->perform( action.release(), ec);377 bool result = m_history->perform(std::move(action), ec); 378 378 if (result) 379 379 *newNode = rawAction->newNode(); … … 383 383 bool DOMEditor::replaceWholeText(Text* textNode, const String& text, ExceptionCode& ec) 384 384 { 385 return m_history->perform( adoptPtr(new ReplaceWholeTextAction(textNode, text)), ec);385 return m_history->perform(std::make_unique<ReplaceWholeTextAction>(textNode, text), ec); 386 386 } 387 387 388 388 bool DOMEditor::replaceChild(Node* parentNode, PassRefPtr<Node> newNode, Node* oldNode, ExceptionCode& ec) 389 389 { 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); 391 391 } 392 392 393 393 bool DOMEditor::setNodeValue(Node* node, const String& value, ExceptionCode& ec) 394 394 { 395 return m_history->perform( adoptPtr(new SetNodeValueAction(node, value)), ec);395 return m_history->perform(std::make_unique<SetNodeValueAction>(node, value), ec); 396 396 } 397 397 -
trunk/Source/WebCore/inspector/DOMPatchSupport.cpp
r163440 r164245 67 67 String m_attrsSHA1; 68 68 Node* m_node; 69 Vector< OwnPtr<Digest>> m_children;69 Vector<std::unique_ptr<Digest>> m_children; 70 70 }; 71 71 … … 106 106 parser->detach(); 107 107 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); 110 110 111 111 if (!innerPatchNode(oldInfo.get(), newInfo.get(), IGNORE_EXCEPTION)) { … … 134 134 // Compose the old list. 135 135 ContainerNode* parentNode = node.parentNode(); 136 Vector< OwnPtr<Digest>> oldList;136 Vector<std::unique_ptr<Digest>> oldList; 137 137 for (Node* child = parentNode->firstChild(); child; child = child->nextSibling()) 138 138 oldList.append(createDigest(child, nullptr)); … … 140 140 // Compose the new list. 141 141 String markupCopy = markup.lower(); 142 Vector< OwnPtr<Digest>> newList;142 Vector<std::unique_ptr<Digest>> newList; 143 143 for (Node* child = parentNode->firstChild(); child != &node; child = child->nextSibling()) 144 144 newList.append(createDigest(child, nullptr)); … … 209 209 210 210 std::pair<DOMPatchSupport::ResultMap, DOMPatchSupport::ResultMap> 211 DOMPatchSupport::diff(const Vector< OwnPtr<Digest>>& oldList, const Vector<OwnPtr<Digest>>& newList)211 DOMPatchSupport::diff(const Vector<std::unique_ptr<Digest>>& oldList, const Vector<std::unique_ptr<Digest>>& newList) 212 212 { 213 213 ResultMap newMap(newList.size()); … … 296 296 } 297 297 298 bool DOMPatchSupport::innerPatchChildren(ContainerNode* parentNode, const Vector< OwnPtr<Digest>>& oldList, const Vector<OwnPtr<Digest>>& newList, ExceptionCode& ec)298 bool DOMPatchSupport::innerPatchChildren(ContainerNode* parentNode, const Vector<std::unique_ptr<Digest>>& oldList, const Vector<std::unique_ptr<Digest>>& newList, ExceptionCode& ec) 299 299 { 300 300 std::pair<ResultMap, ResultMap> resultMaps = diff(oldList, newList); … … 408 408 } 409 409 410 PassOwnPtr<DOMPatchSupport::Digest> DOMPatchSupport::createDigest(Node* node, UnusedNodesMap* unusedNodesMap) 411 { 412 Digest* digest = new Digest(node); 413 410 std::unique_ptr<DOMPatchSupport::Digest> DOMPatchSupport::createDigest(Node* node, UnusedNodesMap* unusedNodesMap) 411 { 412 auto digest = std::make_unique<Digest>(node); 414 413 SHA1 sha1; 415 414 … … 422 421 Node* child = node->firstChild(); 423 422 while (child) { 424 OwnPtr<Digest> childInfo = createDigest(child, unusedNodesMap);423 std::unique_ptr<Digest> childInfo = createDigest(child, unusedNodesMap); 425 424 addStringToSHA1(sha1, childInfo->m_sha1); 426 425 child = child->nextSibling(); 427 digest->m_children.append( childInfo.release());426 digest->m_children.append(std::move(childInfo)); 428 427 } 429 428 Element* element = toElement(node); … … 446 445 digest->m_sha1 = base64Encode(hash.data(), 10); 447 446 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; 450 450 } 451 451 -
trunk/Source/WebCore/inspector/DOMPatchSupport.h
r161309 r164245 35 35 36 36 #include <wtf/HashMap.h> 37 #include <wtf/OwnPtr.h>38 #include <wtf/PassOwnPtr.h>39 37 #include <wtf/Vector.h> 40 38 #include <wtf/text/WTFString.h> … … 66 64 67 65 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*); 71 69 bool insertBeforeAndMarkAsUsed(ContainerNode*, Digest*, Node* anchor, ExceptionCode&); 72 70 bool removeChildAndMoveToNew(Digest*, ExceptionCode&); -
trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.h
r162676 r164245 33 33 #include "InspectorWebFrontendDispatchers.h" 34 34 #include <wtf/Noncopyable.h> 35 #include <wtf/PassOwnPtr.h>36 35 37 36 namespace Inspector { -
trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp
r163962 r164245 166 166 m_timer.startOneShot(0); 167 167 } 168 168 169 169 class ChangeRegionOversetTask { 170 170 public: … … 174 174 void reset(); 175 175 void timerFired(Timer<ChangeRegionOversetTask>&); 176 176 177 177 private: 178 178 InspectorCSSAgent* m_cssAgent; … … 190 190 { 191 191 m_namedFlows.add(namedFlow, documentNodeId); 192 192 193 193 if (!m_timer.isActive()) 194 194 m_timer.startOneShot(0); … … 267 267 } 268 268 269 virtual void merge( PassOwnPtr<Action> action) override269 virtual void merge(std::unique_ptr<Action> action) override 270 270 { 271 271 ASSERT(action->mergeId() == mergeId()); … … 311 311 } 312 312 313 virtual void merge( PassOwnPtr<Action> action) override313 virtual void merge(std::unique_ptr<Action> action) override 314 314 { 315 315 ASSERT(action->mergeId() == mergeId()); … … 370 370 } 371 371 372 virtual void merge( PassOwnPtr<Action> action) override372 virtual void merge(std::unique_ptr<Action> action) override 373 373 { 374 374 ASSERT(action->mergeId() == mergeId()); … … 583 583 if (m_updateRegionLayoutTask) 584 584 m_updateRegionLayoutTask->unschedule(namedFlow); 585 585 586 586 if (m_changeRegionOversetTask) 587 587 m_changeRegionOversetTask->unschedule(namedFlow); … … 597 597 598 598 if (!m_updateRegionLayoutTask) 599 m_updateRegionLayoutTask = adoptPtr(new UpdateRegionLayoutTask(this));599 m_updateRegionLayoutTask = std::make_unique<UpdateRegionLayoutTask>(this); 600 600 m_updateRegionLayoutTask->scheduleFor(namedFlow, documentNodeId); 601 601 } … … 617 617 if (!documentNodeId) 618 618 return; 619 619 620 620 if (!m_changeRegionOversetTask) 621 m_changeRegionOversetTask = adoptPtr(new ChangeRegionOversetTask(this));621 m_changeRegionOversetTask = std::make_unique<ChangeRegionOversetTask>(this); 622 622 m_changeRegionOversetTask->scheduleFor(namedFlow, documentNodeId); 623 623 } … … 627 627 if (namedFlow->flowState() == WebKitNamedFlow::FlowStateNull) 628 628 return; 629 629 630 630 ErrorString errorString; 631 631 Ref<WebKitNamedFlow> protect(*namedFlow); 632 632 633 633 m_frontendDispatcher->regionOversetChanged(buildObjectForNamedFlow(&errorString, namedFlow, documentNodeId)); 634 634 } … … 804 804 805 805 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); 807 807 *errorString = InspectorDOMAgent::toErrorString(ec); 808 808 } … … 818 818 819 819 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); 821 821 if (success) 822 822 result = inspectorStyleSheet->buildObjectForStyle(inspectorStyleSheet->styleForId(compoundId)); … … 834 834 835 835 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); 837 837 if (success) 838 838 result = inspectorStyleSheet->buildObjectForStyle(inspectorStyleSheet->styleForId(compoundId)); … … 850 850 851 851 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); 853 853 if (success) 854 854 result = inspectorStyleSheet->buildObjectForStyle(inspectorStyleSheet->styleForId(compoundId)); … … 866 866 867 867 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); 869 869 870 870 if (success) … … 886 886 887 887 ExceptionCode ec = 0; 888 OwnPtr<AddRuleAction> action = adoptPtr(new AddRuleAction(inspectorStyleSheet, selector));888 auto action = std::make_unique<AddRuleAction>(inspectorStyleSheet, selector); 889 889 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); 891 891 if (!success) { 892 892 *errorString = InspectorDOMAgent::toErrorString(ec); -
trunk/Source/WebCore/inspector/InspectorCSSAgent.h
r162676 r164245 182 182 NodeIdToForcedPseudoState m_nodeIdToForcedPseudoState; 183 183 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; 186 186 187 187 int m_lastStyleSheetId; -
trunk/Source/WebCore/inspector/InspectorCanvasAgent.h
r162676 r164245 40 40 #include "ScriptState.h" 41 41 #include <wtf/HashMap.h> 42 #include <wtf/PassOwnPtr.h>43 42 #include <wtf/PassRefPtr.h> 44 43 #include <wtf/text/WTFString.h> -
trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp
r164139 r164245 97 97 #include <runtime/JSCInlines.h> 98 98 #include <wtf/HashSet.h> 99 #include <wtf/OwnPtr.h>100 99 #include <wtf/Vector.h> 101 100 #include <wtf/text/CString.h> … … 237 236 m_backendDispatcher = InspectorDOMBackendDispatcher::create(backendDispatcher, this); 238 237 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()); 241 240 242 241 m_instrumentingAgents->setInspectorDOMAgent(this); … … 252 251 m_backendDispatcher.clear(); 253 252 254 m_history. clear();255 m_domEditor. clear();253 m_history.reset(); 254 m_domEditor.reset(); 256 255 257 256 ErrorString error; … … 585 584 if (!parent) { 586 585 // Node being pushed is detached -> push subtree root. 587 OwnPtr<NodeToIdMap> newMap = adoptPtr(new NodeToIdMap);586 auto newMap = std::make_unique<NodeToIdMap>(); 588 587 danglingMap = newMap.get(); 589 588 m_danglingNodeToIdMaps.append(newMap.release()); … … 1033 1032 } 1034 1033 1035 PassOwnPtr<HighlightConfig> InspectorDOMAgent::highlightConfigFromInspectorObject(ErrorString* errorString, InspectorObject* highlightInspectorObject)1034 std::unique_ptr<HighlightConfig> InspectorDOMAgent::highlightConfigFromInspectorObject(ErrorString* errorString, InspectorObject* highlightInspectorObject) 1036 1035 { 1037 1036 if (!highlightInspectorObject) { … … 1040 1039 } 1041 1040 1042 OwnPtr<HighlightConfig> highlightConfig = adoptPtr(new HighlightConfig());1041 auto highlightConfig = std::make_unique<HighlightConfig>(); 1043 1042 bool showInfo = false; // Default: false (do not show a tooltip). 1044 1043 highlightInspectorObject->getBoolean("showInfo", &showInfo); … … 1052 1051 highlightConfig->border = parseConfigColor("borderColor", highlightInspectorObject); 1053 1052 highlightConfig->margin = parseConfigColor("marginColor", highlightInspectorObject); 1054 return highlightConfig .release();1053 return highlightConfig; 1055 1054 } 1056 1055 … … 1062 1061 void InspectorDOMAgent::highlightRect(ErrorString*, int x, int y, int width, int height, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor, const bool* usePageCoordinates) 1063 1062 { 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); 1066 1065 } 1067 1066 1068 1067 void InspectorDOMAgent::highlightQuad(ErrorString* errorString, const RefPtr<InspectorArray>& quadArray, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor, const bool* usePageCoordinates) 1069 1068 { 1070 OwnPtr<FloatQuad> quad = adoptPtr(new FloatQuad());1069 auto quad = std::make_unique<FloatQuad>(); 1071 1070 if (!parseQuad(quadArray, quad.get())) { 1072 1071 *errorString = "Invalid Quad format"; 1073 1072 return; 1074 1073 } 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 1077 void 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>(); 1081 1080 highlightConfig->content = parseColor(color); 1082 1081 highlightConfig->contentOutline = parseColor(outlineColor); 1083 1082 highlightConfig->usePageCoordinates = usePageCoordinates ? *usePageCoordinates : false; 1084 m_overlay->highlightQuad( quad, *highlightConfig);1083 m_overlay->highlightQuad(std::move(quad), *highlightConfig); 1085 1084 } 1086 1085 … … 1100 1099 return; 1101 1100 1102 OwnPtr<HighlightConfig> highlightConfig = highlightConfigFromInspectorObject(errorString, highlightInspectorObject.get());1101 std::unique_ptr<HighlightConfig> highlightConfig = highlightConfigFromInspectorObject(errorString, highlightInspectorObject.get()); 1103 1102 if (!highlightConfig) 1104 1103 return; … … 1115 1114 Frame* frame = m_pageAgent->frameForId(frameId); 1116 1115 if (frame && frame->ownerElement()) { 1117 OwnPtr<HighlightConfig> highlightConfig = adoptPtr(new HighlightConfig());1116 auto highlightConfig = std::make_unique<HighlightConfig>(); 1118 1117 highlightConfig->showInfo = true; // Always show tooltips for frames. 1119 1118 highlightConfig->content = parseColor(color); … … 1643 1642 1644 1643 if (!m_revalidateStyleAttrTask) 1645 m_revalidateStyleAttrTask = adoptPtr(new RevalidateStyleAttributeTask(this));1644 m_revalidateStyleAttrTask = std::make_unique<RevalidateStyleAttributeTask>(this); 1646 1645 m_revalidateStyleAttrTask->scheduleFor(toElement(node)); 1647 1646 } -
trunk/Source/WebCore/inspector/InspectorDOMAgent.h
r163891 r164245 42 42 #include <wtf/HashMap.h> 43 43 #include <wtf/HashSet.h> 44 #include <wtf/OwnPtr.h>45 #include <wtf/PassOwnPtr.h>46 44 #include <wtf/RefPtr.h> 47 45 #include <wtf/Vector.h> … … 214 212 private: 215 213 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); 217 215 218 216 // Node-related methods. … … 242 240 void discardBindings(); 243 241 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); 245 243 246 244 InspectorPageAgent* m_pageAgent; … … 254 252 HashMap<String, NodeToBackendIdMap> m_nodeGroupToBackendIdMap; 255 253 // Owns node mappings for dangling nodes. 256 Vector< OwnPtr<NodeToIdMap>> m_danglingNodeToIdMaps;254 Vector<std::unique_ptr<NodeToIdMap>> m_danglingNodeToIdMaps; 257 255 HashMap<int, Node*> m_idToNode; 258 256 HashMap<int, NodeToIdMap*> m_idToNodesMap; … … 264 262 typedef HashMap<String, Vector<RefPtr<Node>>> SearchResults; 265 263 SearchResults m_searchResults; 266 OwnPtr<RevalidateStyleAttributeTask> m_revalidateStyleAttrTask;264 std::unique_ptr<RevalidateStyleAttributeTask> m_revalidateStyleAttrTask; 267 265 RefPtr<Node> m_nodeToFocus; 268 266 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; 272 270 bool m_suppressAttributeModifiedEvent; 273 271 bool m_documentRequested; -
trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.h
r163024 r164245 38 38 #include <inspector/agents/InspectorDebuggerAgent.h> 39 39 #include <wtf/HashMap.h> 40 #include <wtf/PassOwnPtr.h>41 40 #include <wtf/RefCounted.h> 42 41 #include <wtf/text/WTFString.h> -
trunk/Source/WebCore/inspector/InspectorDOMStorageAgent.h
r162676 r164245 34 34 #include "StorageArea.h" 35 35 #include <wtf/HashMap.h> 36 #include <wtf/PassOwnPtr.h>37 36 #include <wtf/text/WTFString.h> 38 37 -
trunk/Source/WebCore/inspector/InspectorDatabaseAgent.h
r162676 r164245 36 36 #include "InspectorWebFrontendDispatchers.h" 37 37 #include <wtf/HashMap.h> 38 #include <wtf/PassOwnPtr.h>39 38 #include <wtf/text/WTFString.h> 40 39 -
trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
r162264 r164245 117 117 } 118 118 119 InspectorFrontendClientLocal::InspectorFrontendClientLocal(InspectorController* inspectorController, Page* frontendPage, PassOwnPtr<Settings> settings)119 InspectorFrontendClientLocal::InspectorFrontendClientLocal(InspectorController* inspectorController, Page* frontendPage, std::unique_ptr<Settings> settings) 120 120 : m_inspectorController(inspectorController) 121 121 , m_frontendPage(frontendPage) 122 , m_settings(s ettings)122 , m_settings(std::move(settings)) 123 123 , m_frontendLoaded(false) 124 124 , m_dockSide(UNDOCKED) 125 125 { 126 126 m_frontendPage->settings().setAllowFileAccessFromFileURLs(true); 127 m_dispatchTask = adoptPtr(new InspectorBackendDispatchTask(inspectorController));127 m_dispatchTask = std::make_unique<InspectorBackendDispatchTask>(inspectorController); 128 128 } 129 129 -
trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h
r163962 r164245 56 56 }; 57 57 58 InspectorFrontendClientLocal(InspectorController*, Page*, PassOwnPtr<Settings>);58 InspectorFrontendClientLocal(InspectorController*, Page*, std::unique_ptr<Settings>); 59 59 virtual ~InspectorFrontendClientLocal(); 60 60 61 61 virtual void windowObjectCleared() override; 62 62 virtual void frontendLoaded() override; … … 99 99 100 100 void showMainResourceForFrame(Frame*); 101 101 102 102 void showResources(); 103 103 … … 118 118 // TODO(yurys): this ref shouldn't be needed. 119 119 RefPtr<InspectorFrontendHost> m_frontendHost; 120 OwnPtr<InspectorFrontendClientLocal::Settings> m_settings;120 std::unique_ptr<InspectorFrontendClientLocal::Settings> m_settings; 121 121 bool m_frontendLoaded; 122 122 DockSide m_dockSide; 123 123 Vector<String> m_evaluateOnLoad; 124 OwnPtr<InspectorBackendDispatchTask> m_dispatchTask;124 std::unique_ptr<InspectorBackendDispatchTask> m_dispatchTask; 125 125 }; 126 126 -
trunk/Source/WebCore/inspector/InspectorHeapProfilerAgent.h
r163987 r164245 40 40 #include <wtf/HashMap.h> 41 41 #include <wtf/Noncopyable.h> 42 #include <wtf/PassOwnPtr.h>43 42 #include <wtf/text/WTFString.h> 44 43 -
trunk/Source/WebCore/inspector/InspectorHistory.cpp
r162369 r164245 80 80 } 81 81 82 void InspectorHistory::Action::merge( PassOwnPtr<Action>)82 void InspectorHistory::Action::merge(std::unique_ptr<Action>) 83 83 { 84 84 } … … 88 88 InspectorHistory::~InspectorHistory() { } 89 89 90 bool InspectorHistory::perform( PassOwnPtr<Action> action, ExceptionCode& ec)90 bool InspectorHistory::perform(std::unique_ptr<Action> action, ExceptionCode& ec) 91 91 { 92 92 if (!action->perform(ec)) … … 94 94 95 95 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)); 97 97 else { 98 98 m_history.resize(m_afterLastActionIndex); 99 m_history.append( action);99 m_history.append(std::move(action)); 100 100 ++m_afterLastActionIndex; 101 101 } … … 105 105 void InspectorHistory::markUndoableState() 106 106 { 107 perform( adoptPtr(new UndoableStateMark()), IGNORE_EXCEPTION);107 perform(std::make_unique<UndoableStateMark>(), IGNORE_EXCEPTION); 108 108 } 109 109 -
trunk/Source/WebCore/inspector/InspectorHistory.h
r157653 r164245 34 34 #include "ExceptionCode.h" 35 35 36 #include <wtf/OwnPtr.h>37 36 #include <wtf/Vector.h> 38 37 #include <wtf/text/WTFString.h> … … 57 56 58 57 virtual String mergeId(); 59 virtual void merge( PassOwnPtr<Action>);58 virtual void merge(std::unique_ptr<Action>); 60 59 61 60 virtual bool perform(ExceptionCode&) = 0; … … 72 71 virtual ~InspectorHistory(); 73 72 74 bool perform( PassOwnPtr<Action>, ExceptionCode&);73 bool perform(std::unique_ptr<Action>, ExceptionCode&); 75 74 void markUndoableState(); 76 75 … … 80 79 81 80 private: 82 Vector< OwnPtr<Action>> m_history;81 Vector<std::unique_ptr<Action>> m_history; 83 82 size_t m_afterLastActionIndex; 84 83 }; -
trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.h
r162676 r164245 36 36 #include "InspectorWebAgentBase.h" 37 37 #include "InspectorWebBackendDispatchers.h" 38 #include <wtf/PassOwnPtr.h>39 38 #include <wtf/text/WTFString.h> 40 39 -
trunk/Source/WebCore/inspector/InspectorInputAgent.h
r162676 r164245 37 37 #include "InspectorWebBackendDispatchers.h" 38 38 #include <wtf/Noncopyable.h> 39 #include <wtf/PassOwnPtr.h>40 39 #include <wtf/text/WTFString.h> 41 40 -
trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.h
r162676 r164245 37 37 #include "InspectorWebTypeBuilders.h" 38 38 #include "RenderLayer.h" 39 #include <wtf/PassOwnPtr.h>40 39 #include <wtf/PassRefPtr.h> 41 40 #include <wtf/Vector.h> -
trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp
r162676 r164245 50 50 #include <runtime/ArrayBufferView.h> 51 51 #include <wtf/HashSet.h> 52 #include <wtf/OwnPtr.h>53 #include <wtf/PassOwnPtr.h>54 52 #include <wtf/Vector.h> 55 53 #include <wtf/text/StringBuilder.h> -
trunk/Source/WebCore/inspector/InspectorMemoryAgent.h
r162676 r164245 36 36 #include "InspectorWebAgentBase.h" 37 37 #include "InspectorWebBackendDispatchers.h" 38 #include <wtf/PassOwnPtr.h>39 38 #include <wtf/RefPtr.h> 40 39 -
trunk/Source/WebCore/inspector/InspectorOverlay.cpp
r163440 r164245 281 281 { 282 282 m_highlightNode.clear(); 283 m_highlightQuad. clear();283 m_highlightQuad.reset(); 284 284 update(); 285 285 } … … 292 292 } 293 293 294 void InspectorOverlay::highlightQuad( PassOwnPtr<FloatQuad> quad, const HighlightConfig& highlightConfig)294 void InspectorOverlay::highlightQuad(std::unique_ptr<FloatQuad> quad, const HighlightConfig& highlightConfig) 295 295 { 296 296 if (m_quadHighlightConfig.usePageCoordinates) … … 298 298 299 299 m_quadHighlightConfig = highlightConfig; 300 m_highlightQuad = quad;300 m_highlightQuad = std::move(quad); 301 301 update(); 302 302 } … … 749 749 Page::PageClients pageClients; 750 750 fillWithEmptyClients(pageClients); 751 m_overlayPage = adoptPtr(new Page(pageClients));751 m_overlayPage = std::make_unique<Page>(pageClients); 752 752 753 753 Settings& settings = m_page.settings(); … … 816 816 void InspectorOverlay::freePage() 817 817 { 818 m_overlayPage. clear();818 m_overlayPage.reset(); 819 819 } 820 820 -
trunk/Source/WebCore/inspector/InspectorOverlay.h
r162264 r164245 33 33 #include "FloatQuad.h" 34 34 #include "LayoutRect.h" 35 #include <wtf/OwnPtr.h>36 #include <wtf/PassOwnPtr.h>37 35 #include <wtf/RefPtr.h> 38 36 #include <wtf/Vector.h> … … 118 116 void hideHighlight(); 119 117 void highlightNode(Node*, const HighlightConfig&); 120 void highlightQuad( PassOwnPtr<FloatQuad>, const HighlightConfig&);118 void highlightQuad(std::unique_ptr<FloatQuad>, const HighlightConfig&); 121 119 122 120 Node* highlightedNode() const; … … 142 140 RefPtr<Node> m_highlightNode; 143 141 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; 146 144 HighlightConfig m_quadHighlightConfig; 147 145 IntSize m_size; -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp
r163987 r164245 51 51 #include <inspector/agents/InspectorConsoleAgent.h> 52 52 #include <wtf/CurrentTime.h> 53 #include <wtf/OwnPtr.h>54 53 #include <wtf/text/StringConcatenate.h> 55 54 -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.h
r163987 r164245 39 39 #include <wtf/HashMap.h> 40 40 #include <wtf/Noncopyable.h> 41 #include <wtf/PassOwnPtr.h>42 41 #include <wtf/text/WTFString.h> 43 42 -
trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp
r163568 r164245 644 644 , m_pageAgent(pageAgent) 645 645 , m_client(client) 646 , m_resourcesData( adoptPtr(new NetworkResourcesData()))646 , m_resourcesData(std::make_unique<NetworkResourcesData>()) 647 647 , m_enabled(false) 648 648 , m_cacheDisabled(false) -
trunk/Source/WebCore/inspector/InspectorResourceAgent.h
r162676 r164245 35 35 #include "InspectorWebBackendDispatchers.h" 36 36 #include "InspectorWebFrontendDispatchers.h" 37 #include <wtf/PassOwnPtr.h>38 37 #include <wtf/RefCounted.h> 39 38 #include <wtf/Vector.h> … … 146 145 std::unique_ptr<Inspector::InspectorNetworkFrontendDispatcher> m_frontendDispatcher; 147 146 RefPtr<Inspector::InspectorNetworkBackendDispatcher> m_backendDispatcher; 148 OwnPtr<NetworkResourcesData> m_resourcesData;147 std::unique_ptr<NetworkResourcesData> m_resourcesData; 149 148 bool m_enabled; 150 149 bool m_cacheDisabled; -
trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp
r163440 r164245 59 59 #include <inspector/ContentSearchUtilities.h> 60 60 #include <inspector/InspectorValues.h> 61 #include <wtf/OwnPtr.h>62 #include <wtf/PassOwnPtr.h>63 61 #include <wtf/Vector.h> 64 62 #include <wtf/text/StringBuilder.h> … … 78 76 bool hasText() const { return m_hasText; } 79 77 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; } 82 80 PassRefPtr<WebCore::CSSRuleSourceData> ruleSourceDataAt(unsigned) const; 83 81 … … 86 84 String m_text; 87 85 bool m_hasText; 88 OwnPtr<RuleSourceDataList> m_sourceData;86 std::unique_ptr<RuleSourceDataList> m_sourceData; 89 87 }; 90 88 … … 116 114 } 117 115 118 void ParsedStyleSheet::setSourceData( PassOwnPtr<RuleSourceDataList> sourceData)116 void ParsedStyleSheet::setSourceData(std::unique_ptr<RuleSourceDataList> sourceData) 119 117 { 120 118 if (!sourceData) { 121 m_sourceData. clear();119 m_sourceData.reset(); 122 120 return; 123 121 } 124 122 125 m_sourceData = adoptPtr(new RuleSourceDataList());123 m_sourceData = std::make_unique<RuleSourceDataList>(); 126 124 127 125 // FIXME: This is a temporary solution to retain the original flat sourceData structure … … 285 283 } 286 284 287 static PassOwnPtr<CSSParser> createCSSParser(Document* document)288 { 289 return adoptPtr(new CSSParser(document ? CSSParserContext(*document) : strictCSSParserContext()));285 static std::unique_ptr<CSSParser> createCSSParser(Document* document) 286 { 287 return std::make_unique<CSSParser>(document ? CSSParserContext(*document) : strictCSSParserContext()); 290 288 } 291 289 … … 522 520 String previousPriority; 523 521 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); 525 523 RefPtr<CSSRuleSourceData> sourceData = extractSourceData(); 526 524 unsigned ruleBodyRangeStart = sourceData ? sourceData->ruleBodyRange.start : 0; … … 1212 1210 } 1213 1211 1214 PassOwnPtr<Vector<size_t>> InspectorStyleSheet::lineEndings() const1212 std::unique_ptr<Vector<size_t>> InspectorStyleSheet::lineEndings() const 1215 1213 { 1216 1214 if (!m_parsedStyleSheet->hasText()) 1217 return PassOwnPtr<Vector<size_t>>();1215 return nullptr; 1218 1216 return ContentSearchUtilities::lineEndings(m_parsedStyleSheet->text()); 1219 1217 } … … 1271 1269 1272 1270 RefPtr<StyleSheetContents> newStyleSheet = StyleSheetContents::create(); 1273 OwnPtr<RuleSourceDataList> ruleSourceDataResult = adoptPtr(new RuleSourceDataList());1271 auto ruleSourceDataResult = std::make_unique<RuleSourceDataList>(); 1274 1272 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)); 1276 1274 return m_parsedStyleSheet->hasSourceData(); 1277 1275 } … … 1477 1475 } 1478 1476 1479 PassOwnPtr<Vector<size_t>> InspectorStyleSheetForInlineStyle::lineEndings() const1477 std::unique_ptr<Vector<size_t>> InspectorStyleSheetForInlineStyle::lineEndings() const 1480 1478 { 1481 1479 return ContentSearchUtilities::lineEndings(elementStyleText()); -
trunk/Source/WebCore/inspector/InspectorStyleSheet.h
r162374 r164245 227 227 // Also accessed by friend class InspectorStyle. 228 228 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; 230 230 231 231 private: … … 279 279 // Also accessed by friend class InspectorStyle. 280 280 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; 282 282 283 283 private: -
trunk/Source/WebCore/inspector/InspectorTimelineAgent.h
r163139 r164245 39 39 #include "LayoutRect.h" 40 40 #include <inspector/InspectorValues.h> 41 #include <wtf/PassOwnPtr.h>42 41 #include <wtf/Vector.h> 43 42 #include <wtf/WeakPtr.h> -
trunk/Source/WebCore/inspector/InspectorWorkerAgent.cpp
r162676 r164245 41 41 #include "WorkerGlobalScopeProxy.h" 42 42 #include <inspector/InspectorValues.h> 43 #include <wtf/PassOwnPtr.h>44 43 #include <wtf/RefPtr.h> 45 44 -
trunk/Source/WebCore/inspector/PageConsoleAgent.cpp
r163987 r164245 76 76 77 77 if (CommandLineAPIHost* commandLineAPIHost = static_cast<WebInjectedScriptManager*>(m_injectedScriptManager)->commandLineAPIHost()) 78 commandLineAPIHost->addInspectedObject( adoptPtr(new InspectableNode(node)));78 commandLineAPIHost->addInspectedObject(std::make_unique<InspectableNode>(node)); 79 79 } 80 80 -
trunk/Source/WebCore/inspector/PageRuntimeAgent.h
r162767 r164245 36 36 #include <inspector/InspectorJSFrontendDispatchers.h> 37 37 #include <inspector/agents/InspectorRuntimeAgent.h> 38 #include <wtf/PassOwnPtr.h>39 38 40 39 namespace JSC { -
trunk/Source/WebCore/inspector/WebConsoleAgent.cpp
r163987 r164245 132 132 { 133 133 if (CommandLineAPIHost* commandLineAPIHost = static_cast<WebInjectedScriptManager*>(m_injectedScriptManager)->commandLineAPIHost()) 134 commandLineAPIHost->addInspectedObject( adoptPtr(new InspectableHeapObject(inspectedHeapObjectId)));134 commandLineAPIHost->addInspectedObject(std::make_unique<InspectableHeapObject>(inspectedHeapObjectId)); 135 135 } 136 136 -
trunk/Source/WebCore/inspector/WorkerRuntimeAgent.h
r163024 r164245 35 35 36 36 #include <inspector/agents/InspectorRuntimeAgent.h> 37 #include <wtf/PassOwnPtr.h>38 37 39 38 namespace WebCore { -
trunk/Source/WebCore/testing/Internals.cpp
r164131 r164245 195 195 196 196 InspectorFrontendClientDummy::InspectorFrontendClientDummy(InspectorController* controller, Page* page) 197 : InspectorFrontendClientLocal(controller, page, adoptPtr(new InspectorFrontendClientLocal::Settings()))197 : InspectorFrontendClientLocal(controller, page, std::make_unique<InspectorFrontendClientLocal::Settings>()) 198 198 { 199 199 } -
trunk/Source/WebKit/ChangeLog
r164187 r164245 1 2014-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 1 15 2014-02-15 Alexey Proskuryakov <ap@apple.com> 2 16 -
trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in
r163903 r164245 217 217 ?s_frontendCounter@InspectorInstrumentation@WebCore@@0HA 218 218 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) 220 220 symbolWithPointer(??1InspectorFrontendClientLocal@WebCore@@UAE@XZ, ??1InspectorFrontendClientLocal@WebCore@@UEAA@XZ) 221 221 symbolWithPointer(?changeAttachedWindowHeight@InspectorFrontendClientLocal@WebCore@@UAEXI@Z, ?changeAttachedWindowHeight@InspectorFrontendClientLocal@WebCore@@UEAAXI@Z) -
trunk/Source/WebKit/cf/ChangeLog
r160099 r164245 1 2014-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 1 15 2013-12-03 Joseph Pecoraro <pecoraro@apple.com> 2 16 -
trunk/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
r160099 r164245 26 26 // FIXME: On Windows, we require all WebKit source files to include config.h 27 27 // 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 30 30 // Windows one here. For now we can just define WTF_USE_CF and 31 31 // WTF_USE_CFNETWORK manually, but we need a better long-term solution. … … 125 125 } 126 126 127 PassOwnPtr<WebCore::InspectorFrontendClientLocal::Settings> WebInspectorClient::createFrontendSettings()127 std::unique_ptr<WebCore::InspectorFrontendClientLocal::Settings> WebInspectorClient::createFrontendSettings() 128 128 { 129 129 class InspectorFrontendSettingsCF : public WebCore::InspectorFrontendClientLocal::Settings { … … 142 142 } 143 143 }; 144 return adoptPtr<WebCore::InspectorFrontendClientLocal::Settings>(new InspectorFrontendSettingsCF());144 return std::make_unique<InspectorFrontendSettingsCF>(); 145 145 } -
trunk/Source/WebKit/efl/ChangeLog
r164168 r164245 1 2014-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 1 15 2014-02-15 Ryuan Choi <ryuan.choi@samsung.com> 2 16 -
trunk/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp
r162676 r164245 149 149 150 150 InspectorFrontendClientEfl::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>()) 152 152 , m_inspectedView(inspectedView) 153 153 , m_inspectorView(inspectorView) -
trunk/Source/WebKit/gtk/ChangeLog
r164235 r164245 1 2014-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 1 15 2014-02-17 Anders Carlsson <andersca@apple.com> 2 16 -
trunk/Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
r162676 r164245 158 158 159 159 InspectorFrontendClient::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>()) 161 161 , m_inspectorWebView(inspectorWebView) 162 162 , m_inspectedWebView(inspectedWebView) -
trunk/Source/WebKit/ios/ChangeLog
r163980 r164245 1 2014-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 1 15 2014-02-12 Benjamin Poulain <bpoulain@apple.com> 2 16 -
trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm
r162011 r164245 40 40 #import <WebCore/Settings.h> 41 41 #import <WebCore/WebCoreThread.h> 42 #import <wtf/PassOwnPtr.h>43 42 44 43 using namespace WebCore; … … 111 110 #pragma mark WebInspectorFrontendClient Implementation 112 111 113 WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage, WTF::PassOwnPtr<Settings> settings)114 : InspectorFrontendClientLocal(inspectorController, frontendPage, s ettings)112 WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage, std::unique_ptr<Settings> settings) 113 : InspectorFrontendClientLocal(inspectorController, frontendPage, std::move(settings)) 115 114 { 116 115 // iOS does not have a local inspector, this should not be reached. -
trunk/Source/WebKit/mac/ChangeLog
r164187 r164245 1 2014-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 1 16 2014-02-15 Alexey Proskuryakov <ap@apple.com> 2 17 -
trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h
r162139 r164245 7 7 * 8 8 * 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. 10 10 * 2. Redistributions in binary form must reproduce the above copyright 11 11 * 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. 13 13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 14 14 * 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. 16 16 * 17 17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY … … 90 90 91 91 private: 92 PassOwnPtr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings();92 std::unique_ptr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings(); 93 93 94 94 WebView *m_webView; … … 101 101 class WebInspectorFrontendClient : public WebCore::InspectorFrontendClientLocal { 102 102 public: 103 WebInspectorFrontendClient(WebView*, WebInspectorWindowController*, WebCore::InspectorController*, WebCore::Page*, PassOwnPtr<Settings>);103 WebInspectorFrontendClient(WebView*, WebInspectorWindowController*, WebCore::InspectorController*, WebCore::Page*, std::unique_ptr<Settings>); 104 104 105 105 void attachAvailabilityChanged(bool); -
trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
r162676 r164245 7 7 * 8 8 * 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. 10 10 * 2. Redistributions in binary form must reproduce the above copyright 11 11 * 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. 13 13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 14 14 * 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. 16 16 * 17 17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY … … 54 54 #import <WebKit/DOMExtensions.h> 55 55 #import <WebKitSystemInterface.h> 56 #import <wtf/PassOwnPtr.h>57 56 #import <wtf/text/Base64.h> 58 57 … … 211 210 212 211 213 WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage, WTF::PassOwnPtr<Settings> settings)214 : InspectorFrontendClientLocal(inspectorController, frontendPage, s ettings)212 WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, WebInspectorWindowController* windowController, InspectorController* inspectorController, Page* frontendPage, std::unique_ptr<Settings> settings) 213 : InspectorFrontendClientLocal(inspectorController, frontendPage, std::move(settings)) 215 214 , m_inspectedWebView(inspectedWebView) 216 215 , m_windowController(windowController) … … 234 233 235 234 WebFrame *frame = [m_inspectedWebView mainFrame]; 236 235 237 236 WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(m_inspectedWebView); 238 237 if (implementations->didClearInspectorWindowObjectForFrameFunc) … … 320 319 { 321 320 ASSERT(!suggestedURL.isEmpty()); 322 321 323 322 NSURL *platformURL = m_suggestedToActualURLMap.get(suggestedURL).get(); 324 323 if (!platformURL) { … … 327 326 forceSaveDialog = true; 328 327 } 329 328 330 329 ASSERT(platformURL); 331 330 if (!platformURL) … … 338 337 auto saveToURL = ^(NSURL *actualURL) { 339 338 ASSERT(actualURL); 340 339 341 340 m_suggestedToActualURLMap.set(suggestedURLCopy, actualURL); 342 341 … … 357 356 return; 358 357 } 359 358 360 359 NSSavePanel *panel = [NSSavePanel savePanel]; 361 360 panel.nameFieldStringValue = platformURL.lastPathComponent; … … 373 372 { 374 373 ASSERT(!suggestedURL.isEmpty()); 375 374 376 375 RetainPtr<NSURL> actualURL = m_suggestedToActualURLMap.get(suggestedURL); 377 376 // do not append unless the user has already confirmed this filename in save(). … … 583 582 584 583 _visible = YES; 585 584 586 585 _shouldAttach = _inspectorClient->inspectorStartsAttached() && _frontendClient->canAttachWindow() && !_inspectorClient->inspectorAttachDisabled(); 587 586 -
trunk/Source/WebKit/win/ChangeLog
r164141 r164245 1 2014-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 1 16 2014-02-14 Brent Fulgham <bfulgham@apple.com> 2 17 -
trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
r163903 r164245 7 7 * 8 8 * 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. 10 10 * 2. Redistributions in binary form must reproduce the above copyright 11 11 * 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. 13 13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 14 14 * 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. 16 16 * 17 17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY … … 225 225 } 226 226 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()), s ettings)227 WebInspectorFrontendClient::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)) 229 229 , m_inspectedWebView(inspectedWebView) 230 230 , m_inspectedWebViewHwnd(inspectedWebViewHwnd) … … 289 289 closeWindowWithoutNotifications(); 290 290 // 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. 292 292 m_attached = true; 293 293 // Immediately after calling showWindowWithoutNotifications(), the parent frameview's visibleHeight incorrectly returns 0 always (Windows only). … … 333 333 SetWindowPos(m_inspectedWebViewHwnd, 0, 0, 0, webViewWidth, totalHeight, SWP_NOZORDER); 334 334 335 RedrawWindow(m_frontendWebViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW); 335 RedrawWindow(m_frontendWebViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW); 336 336 RedrawWindow(m_inspectedWebViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW); 337 337 } -
trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h
r163903 r164245 7 7 * 8 8 * 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. 10 10 * 2. Redistributions in binary form must reproduce the above copyright 11 11 * 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. 13 13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 14 14 * 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. 16 16 * 17 17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY … … 82 82 private: 83 83 virtual ~WebInspectorClient(); 84 WTF::PassOwnPtr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings();84 std::unique_ptr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings(); 85 85 86 86 WebView* m_inspectedWebView; … … 95 95 class WebInspectorFrontendClient : public WebCore::InspectorFrontendClientLocal, WebCore::WindowMessageListener { 96 96 public: 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>); 98 98 virtual ~WebInspectorFrontendClient(); 99 99 100 100 virtual void frontendLoaded(); 101 101 102 102 virtual WTF::String localizedStringsURL(); 103 103 104 104 virtual void bringToFront(); 105 105 virtual void closeWindow(); 106 106 107 107 virtual void attachWindow(DockSide); 108 108 virtual void detachWindow(); 109 109 110 110 virtual void setAttachedWindowHeight(unsigned height); 111 111 virtual void setAttachedWindowWidth(unsigned); -
trunk/Source/WebKit2/ChangeLog
r164240 r164245 1 2014-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 1 15 2014-02-17 Michał Pakuła vel Rutka <m.pakula@samsung.com> 2 16 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp
r162676 r164245 42 42 43 43 WebInspectorFrontendClient::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>()) 45 45 , m_page(page) 46 46 {
Note: See TracChangeset
for help on using the changeset viewer.