Misc Inspector backend cleanup
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Nov 2016 19:45:40 +0000 (19:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Nov 2016 19:45:40 +0000 (19:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=164768

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-11-15
Reviewed by Brian Burg.

* inspector/DOMPatchSupport.cpp:
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::frontendLoaded):
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::ClearObjectStoreListener::create): Deleted.
(WebCore::ClearObjectStoreListener::~ClearObjectStoreListener): Deleted.
(WebCore::ClearObjectStoreListener::ClearObjectStoreListener): Deleted.
(WebCore::ClearObjectStore::create): Deleted.
(WebCore::ClearObjectStore::ClearObjectStore): Deleted.
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorNetworkAgent.h:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.cpp:
* inspector/InspectorReplayAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::stopFromConsole):
* inspector/InspectorTimelineAgent.h:
* inspector/PageRuntimeAgent.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208742 268f45cc-cd09-0410-ab3c-d52691b4dbfc

25 files changed:
Source/WebCore/ChangeLog
Source/WebCore/inspector/DOMPatchSupport.cpp
Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp
Source/WebCore/inspector/InspectorApplicationCacheAgent.h
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorCSSAgent.h
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/inspector/InspectorDOMAgent.h
Source/WebCore/inspector/InspectorDOMDebuggerAgent.h
Source/WebCore/inspector/InspectorDOMStorageAgent.cpp
Source/WebCore/inspector/InspectorDOMStorageAgent.h
Source/WebCore/inspector/InspectorDatabaseAgent.cpp
Source/WebCore/inspector/InspectorDatabaseAgent.h
Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
Source/WebCore/inspector/InspectorLayerTreeAgent.h
Source/WebCore/inspector/InspectorNetworkAgent.h
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/InspectorPageAgent.h
Source/WebCore/inspector/InspectorReplayAgent.cpp
Source/WebCore/inspector/InspectorReplayAgent.h
Source/WebCore/inspector/InspectorTimelineAgent.cpp
Source/WebCore/inspector/InspectorTimelineAgent.h
Source/WebCore/inspector/PageRuntimeAgent.h

index 5abc426..807ddde 100644 (file)
@@ -1,3 +1,43 @@
+2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Misc Inspector backend cleanup
+        https://bugs.webkit.org/show_bug.cgi?id=164768
+
+        Reviewed by Brian Burg.
+
+        * inspector/DOMPatchSupport.cpp:
+        * inspector/InspectorApplicationCacheAgent.cpp:
+        * inspector/InspectorApplicationCacheAgent.h:
+        * inspector/InspectorCSSAgent.cpp:
+        * inspector/InspectorCSSAgent.h:
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
+        * inspector/InspectorDOMAgent.h:
+        * inspector/InspectorDOMDebuggerAgent.h:
+        * inspector/InspectorDOMStorageAgent.cpp:
+        * inspector/InspectorDOMStorageAgent.h:
+        * inspector/InspectorDatabaseAgent.cpp:
+        * inspector/InspectorDatabaseAgent.h:
+        * inspector/InspectorFrontendClientLocal.cpp:
+        (WebCore::InspectorFrontendClientLocal::frontendLoaded):
+        * inspector/InspectorIndexedDBAgent.cpp:
+        (WebCore::ClearObjectStoreListener::create): Deleted.
+        (WebCore::ClearObjectStoreListener::~ClearObjectStoreListener): Deleted.
+        (WebCore::ClearObjectStoreListener::ClearObjectStoreListener): Deleted.
+        (WebCore::ClearObjectStore::create): Deleted.
+        (WebCore::ClearObjectStore::ClearObjectStore): Deleted.
+        * inspector/InspectorLayerTreeAgent.cpp:
+        * inspector/InspectorLayerTreeAgent.h:
+        * inspector/InspectorNetworkAgent.h:
+        * inspector/InspectorPageAgent.cpp:
+        * inspector/InspectorPageAgent.h:
+        * inspector/InspectorReplayAgent.cpp:
+        * inspector/InspectorReplayAgent.h:
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::stopFromConsole):
+        * inspector/InspectorTimelineAgent.h:
+        * inspector/PageRuntimeAgent.h:
+
 2016-11-14  Myles C. Maxfield  <mmaxfield@apple.com>
 
         [WebGL] Migrate construction functions from pointers to references
index caba858..a3ae1d0 100644 (file)
@@ -44,7 +44,6 @@
 #include "Node.h"
 #include "XMLDocument.h"
 #include "XMLDocumentParser.h"
-
 #include <wtf/Deque.h>
 #include <wtf/HashTraits.h>
 #include <wtf/RefPtr.h>
index 102c189..612db0a 100644 (file)
@@ -35,8 +35,6 @@
 #include "MainFrame.h"
 #include "NetworkStateNotifier.h"
 #include "Page.h"
-#include "ResourceResponse.h"
-#include <inspector/InspectorFrontendDispatchers.h>
 #include <inspector/InspectorValues.h>
 #include <wtf/text/StringBuilder.h>
 
index e8ba873..d5c579c 100644 (file)
@@ -41,7 +41,6 @@ namespace WebCore {
 class Frame;
 class InspectorPageAgent;
 class Page;
-class ResourceResponse;
 
 typedef String ErrorString;
 
index 9ed7fc2..3d54221 100644 (file)
@@ -39,7 +39,6 @@
 #include "FontCache.h"
 #include "HTMLHeadElement.h"
 #include "HTMLStyleElement.h"
-#include "InspectorDOMAgent.h"
 #include "InspectorHistory.h"
 #include "InspectorPageAgent.h"
 #include "InstrumentingAgents.h"
index 66d6035..8335def 100644 (file)
@@ -94,7 +94,7 @@ public:
     void regionOversetChanged(WebKitNamedFlow*, int documentNodeId);
     void reset();
 
-    // InspectorInstrumentation callbacks.
+    // InspectorInstrumentation
     void documentDetached(Document&);
     void mediaQueryResultChanged();
     void activeStyleSheetsUpdated(Document&);
index a2acdbd..00fc642 100644 (file)
@@ -90,6 +90,7 @@
 #include "StyleSheetList.h"
 #include "Text.h"
 #include "TextNodeTraversal.h"
+#include "Timer.h"
 #include "XPathResult.h"
 #include "htmlediting.h"
 #include "markup.h"
@@ -1676,7 +1677,7 @@ RefPtr<Inspector::Protocol::DOM::AccessibilityProperties> InspectorDOMAgent::bui
                 break;
             }
 
-            disabled = !axObject->isEnabled(); 
+            disabled = !axObject->isEnabled();
             exists = true;
             
             supportsExpanded = axObject->supportsExpanded();
index 1cba4c8..9ba14b9 100644 (file)
 
 #include "EventTarget.h"
 #include "InspectorWebAgentBase.h"
-#include "Timer.h"
 #include <inspector/InspectorBackendDispatchers.h>
 #include <inspector/InspectorFrontendDispatchers.h>
 #include <inspector/InspectorValues.h>
-#include <wtf/Deque.h>
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
 #include <wtf/RefPtr.h>
@@ -54,7 +52,6 @@ class JSValue;
 namespace WebCore {
     
 class AccessibilityObject;
-class ContainerNode;
 class CharacterData;
 class DOMEditor;
 class Document;
@@ -67,8 +64,6 @@ class InspectorHistory;
 class InspectorOverlay;
 class InspectorPageAgent;
 class HitTestResult;
-class HTMLElement;
-class NameNodeMap;
 class Node;
 class PseudoElement;
 class RevalidateStyleAttributeTask;
@@ -158,7 +153,7 @@ public:
     void getEventListeners(Node*, Vector<EventListenerInfo>& listenersArray, bool includeAncestors);
 
 
-    // InspectorInstrumentation callbacks.
+    // InspectorInstrumentation
     void didInsertDOMNode(Node&);
     void didRemoveDOMNode(Node&);
     void willModifyDOMAttr(Element&, const AtomicString& oldValue, const AtomicString& newValue);
@@ -275,10 +270,10 @@ private:
     std::unique_ptr<RevalidateStyleAttributeTask> m_revalidateStyleAttrTask;
     RefPtr<Node> m_nodeToFocus;
     RefPtr<Node> m_mousedOverNode;
-    bool m_searchingForNode { false };
     std::unique_ptr<HighlightConfig> m_inspectModeHighlightConfig;
     std::unique_ptr<InspectorHistory> m_history;
     std::unique_ptr<DOMEditor> m_domEditor;
+    bool m_searchingForNode { false };
     bool m_suppressAttributeModifiedEvent { false };
     bool m_documentRequested { false };
 };
index fef6d48..c109795 100644 (file)
@@ -66,7 +66,7 @@ public:
     void setDOMBreakpoint(ErrorString&, int nodeId, const String& type) override;
     void removeDOMBreakpoint(ErrorString&, int nodeId, const String& type) override;
 
-    // InspectorInstrumentation callbacks.
+    // InspectorInstrumentation
     void willInsertDOMNode(Node& parent);
     void didInvalidateStyleAttr(Node&);
     void didInsertDOMNode(Node&);
index d1fa69f..3c36c45 100644 (file)
@@ -40,7 +40,6 @@
 #include "InspectorPageAgent.h"
 #include "InstrumentingAgents.h"
 #include "Page.h"
-#include "PageGroup.h"
 #include "SecurityOrigin.h"
 #include "SecurityOriginData.h"
 #include "Storage.h"
@@ -49,7 +48,6 @@
 #include "VoidCallback.h"
 #include <inspector/InspectorFrontendDispatchers.h>
 #include <inspector/InspectorValues.h>
-#include <wtf/Vector.h>
 
 using namespace Inspector;
 
index abb3786..7a96bf5 100644 (file)
@@ -36,7 +36,6 @@
 
 namespace Inspector {
 class DOMStorageFrontendDispatcher;
-class InspectorArray;
 }
 
 namespace WebCore {
@@ -69,7 +68,7 @@ public:
     String storageId(Storage*);
     RefPtr<Inspector::Protocol::DOMStorage::StorageId> storageId(SecurityOrigin*, bool isLocalStorage);
 
-    // Called from InspectorInstrumentation
+    // InspectorInstrumentation
     void didDispatchDOMStorageEvent(const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*);
 
 private:
index ee1150f..db4c02e 100644 (file)
@@ -114,7 +114,7 @@ private:
     bool handleEvent(SQLTransaction*, SQLError* error) final
     {
         reportTransactionFailed(m_requestCallback.copyRef(), error);
-        return true;  
+        return true;
     }
 
     Ref<ExecuteSQLCallback> m_requestCallback;
index c9ae414..de3c783 100644 (file)
 #include <wtf/HashMap.h>
 #include <wtf/text/WTFString.h>
 
-namespace Inspector {
-class InspectorArray;
-}
-
 namespace WebCore {
 
 class Database;
index a55c5ee..8a35a17 100644 (file)
@@ -159,7 +159,7 @@ void InspectorFrontendClientLocal::frontendLoaded()
 {
     // Call setDockingUnavailable before bringToFront. If we display the inspector window via bringToFront first it causes
     // the call to canAttachWindow to return the wrong result on Windows.
-    // Calling bringToFront first causes the visibleHeight of the inspected page to always return 0 immediately after. 
+    // Calling bringToFront first causes the visibleHeight of the inspected page to always return 0 immediately after.
     // Thus if we call canAttachWindow first we can avoid this problem. This change does not cause any regressions on Mac.
     setDockingUnavailable(!canAttachWindow());
     bringToFront();
index 8199b53..0df36df 100644 (file)
  */
 
 #include "config.h"
+#include "InspectorIndexedDBAgent.h"
 
 #if ENABLE(INDEXED_DATABASE)
 
-#include "InspectorIndexedDBAgent.h"
-
 #include "DOMStringList.h"
 #include "DOMWindow.h"
 #include "DOMWindowIndexedDatabase.h"
@@ -339,9 +338,7 @@ static RefPtr<IDBKeyRange> idbKeyRangeFromKeyRange(const InspectorObject* keyRan
     return IDBKeyRange::create(WTFMove(idbLower), WTFMove(idbUpper), lowerOpen, upperOpen);
 }
 
-class DataLoader;
-
-class OpenCursorCallback : public EventListener {
+class OpenCursorCallback final : public EventListener {
 public:
     static Ref<OpenCursorCallback> create(InjectedScript injectedScript, Ref<RequestDataCallback>&& requestCallback, int skipCount, unsigned pageSize)
     {
@@ -433,7 +430,7 @@ private:
     unsigned m_pageSize;
 };
 
-class DataLoader : public ExecutableWithDatabase {
+class DataLoader final : public ExecutableWithDatabase {
 public:
     static Ref<DataLoader> create(ScriptExecutionContext* context, Ref<RequestDataCallback>&& requestCallback, const InjectedScript& injectedScript, const String& objectStoreName, const String& indexName, RefPtr<IDBKeyRange>&& idbKeyRange, int skipCount, unsigned pageSize)
     {
@@ -635,7 +632,7 @@ void InspectorIndexedDBAgent::requestData(ErrorString& errorString, const String
     dataLoader->start(idbFactory, document->securityOrigin(), databaseName);
 }
 
-class ClearObjectStoreListener : public EventListener {
+class ClearObjectStoreListener final : public EventListener {
     WTF_MAKE_NONCOPYABLE(ClearObjectStoreListener);
 public:
     static Ref<ClearObjectStoreListener> create(Ref<ClearObjectStoreCallback> requestCallback)
@@ -671,7 +668,7 @@ private:
     Ref<ClearObjectStoreCallback> m_requestCallback;
 };
 
-class ClearObjectStore : public ExecutableWithDatabase {
+class ClearObjectStore final : public ExecutableWithDatabase {
 public:
     static Ref<ClearObjectStore> create(ScriptExecutionContext* context, const String& objectStoreName, Ref<ClearObjectStoreCallback>&& requestCallback)
     {
index cd47ae7..d96e04e 100644 (file)
@@ -32,7 +32,6 @@
 #include "InspectorLayerTreeAgent.h"
 
 #include "InspectorDOMAgent.h"
-#include <inspector/InspectorFrontendDispatchers.h>
 #include "InstrumentingAgents.h"
 #include "IntRect.h"
 #include "PseudoElement.h"
index 838091b..2de7a28 100644 (file)
@@ -54,7 +54,7 @@ public:
     void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
     void reset();
 
-    // InspectorInstrumentation callbacks.
+    // InspectorInstrumentation
     void layerTreeDidChange();
     void renderLayerDestroyed(const RenderLayer&);
     void pseudoElementDestroyed(PseudoElement&);
index 2616908..7b5dad1 100644 (file)
@@ -72,7 +72,7 @@ public:
     void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;
     void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
 
-    // InspectorInstrumentation callbacks.
+    // InspectorInstrumentation
     void willRecalculateStyle();
     void didRecalculateStyle();
     void willSendRequest(unsigned long identifier, DocumentLoader&, ResourceRequest&, const ResourceResponse& redirectResponse);
index 6f3d8ad..b186f1a 100644 (file)
@@ -56,7 +56,6 @@
 #include "InspectorDOMAgent.h"
 #include "InspectorNetworkAgent.h"
 #include "InspectorOverlay.h"
-#include "InspectorTimelineAgent.h"
 #include "InstrumentingAgents.h"
 #include "MIMETypeRegistry.h"
 #include "MainFrame.h"
index 126c9fc..7af9088 100644 (file)
@@ -32,7 +32,6 @@
 #pragma once
 
 #include "InspectorWebAgentBase.h"
-#include "IntSize.h"
 #include "LayoutRect.h"
 #include <inspector/InspectorBackendDispatchers.h>
 #include <inspector/InspectorFrontendDispatchers.h>
@@ -40,7 +39,6 @@
 #include <wtf/text/WTFString.h>
 
 namespace Inspector {
-class InspectorArray;
 class InspectorObject;
 }
 
@@ -50,7 +48,6 @@ class CachedResource;
 class DOMWrapperWorld;
 class DocumentLoader;
 class Frame;
-class Frontend;
 class InspectorClient;
 class InspectorOverlay;
 class MainFrame;
@@ -58,7 +55,6 @@ class URL;
 class Page;
 class RenderObject;
 class SharedBuffer;
-class TextResourceDecoder;
 
 typedef String ErrorString;
 
@@ -84,7 +80,6 @@ public:
     static void resourceContent(ErrorString&, Frame*, const URL&, String* result, bool* base64Encoded);
     static String sourceMapURLForResource(CachedResource*);
 
-    static PassRefPtr<SharedBuffer> resourceData(Frame*, const URL&, String* textEncodingName);
     static CachedResource* cachedResource(Frame*, const URL&);
     static Inspector::Protocol::Page::ResourceType resourceTypeJson(ResourceType);
     static ResourceType cachedResourceType(const CachedResource&);
@@ -116,7 +111,7 @@ public:
     void handleJavaScriptDialog(ErrorString&, bool accept, const String* promptText) override;
     void archive(ErrorString&, String* data) override;
 
-    // InspectorInstrumentation callbacks.
+    // InspectorInstrumentation
     void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld&);
     void domContentEventFired();
     void loadEventFired();
index a4264fd..3aaa52a 100644 (file)
@@ -45,7 +45,7 @@
 #include "ReplaySession.h"
 #include "ReplaySessionSegment.h"
 #include "SerializationMethods.h"
-#include "WebReplayInputs.h" // For EncodingTraits<InputQueue>.
+#include "WebReplayInputs.h"
 #include <inspector/InspectorValues.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
index b435ee6..ff6e587 100644 (file)
@@ -41,7 +41,6 @@ namespace WebCore {
 class DocumentLoader;
 class Event;
 class Frame;
-class InspectorPageAgent;
 class Page;
 class ReplaySession;
 class ReplaySessionSegment;
@@ -66,7 +65,7 @@ public:
     void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;
     void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
 
-    // InspectorInstrumentation callbacks.
+    // InspectorInstrumentation
     void frameNavigated(Frame&);
     void frameDetached(Frame&);
     void willDispatchEvent(const Event&, Frame*);
index 52a01c5..fb40d9d 100644 (file)
@@ -291,7 +291,7 @@ void InspectorTimelineAgent::stopFromConsole(JSC::ExecState*, const String& titl
     if (WebConsoleAgent* consoleAgent = m_instrumentingAgents.webConsoleAgent()) {
         // FIXME: Send an enum to the frontend for localization?
         String warning = title.isEmpty() ? ASCIILiteral("No profiles exist") : makeString("Profile \"", title, "\" does not exist");
-        consoleAgent->addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::ProfileEnd, MessageLevel::Warning, warning));    
+        consoleAgent->addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::ProfileEnd, MessageLevel::Warning, warning));
     }
 }
 
index 42de422..7ced7ff 100644 (file)
@@ -111,7 +111,7 @@ public:
     void startFromConsole(JSC::ExecState*, const String& title);
     void stopFromConsole(JSC::ExecState*, const String& title);
 
-    // InspectorInstrumentation callbacks.
+    // InspectorInstrumentation
     void didInstallTimer(int timerId, std::chrono::milliseconds timeout, bool singleShot, Frame*);
     void didRemoveTimer(int timerId, Frame*);
     void willFireTimer(int timerId, Frame*);
index ce474e3..c6d2ee3 100644 (file)
@@ -39,10 +39,6 @@ namespace JSC {
 class ExecState;
 }
 
-namespace Inspector {
-class InjectedScriptManager;
-}
-
 namespace WebCore {
 
 class InspectorPageAgent;
@@ -62,7 +58,7 @@ public:
     void enable(ErrorString&) override;
     void disable(ErrorString&) override;
 
-    // InspectorInstrumentation callbacks.
+    // InspectorInstrumentation
     void didCreateMainWorldContext(Frame&);
 
 private: