Web Inspector: Generate all Inspector domains together in JavaScriptCore
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Oct 2014 17:59:24 +0000 (17:59 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Oct 2014 17:59:24 +0000 (17:59 +0000)
commitdd1777ca2270a6c9d70a7be20efccd524bf4538d
treee94c8495ffa3d287036b107697365768522fe31b
parent66bcd831143e58f7ff267a719f3470833a600260
Web Inspector: Generate all Inspector domains together in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=137748

Reviewed by Brian Burg.

* Source/PlatformEfl.cmake:

Source/JavaScriptCore:

* inspector/protocol/ApplicationCache.json: Renamed from Source/WebCore/inspector/protocol/ApplicationCache.json.
* inspector/protocol/CSS.json: Renamed from Source/WebCore/inspector/protocol/CSS.json.
* inspector/protocol/DOM.json: Renamed from Source/WebCore/inspector/protocol/DOM.json.
* inspector/protocol/DOMDebugger.json: Renamed from Source/WebCore/inspector/protocol/DOMDebugger.json.
* inspector/protocol/DOMStorage.json: Renamed from Source/WebCore/inspector/protocol/DOMStorage.json.
* inspector/protocol/Database.json: Renamed from Source/WebCore/inspector/protocol/Database.json.
* inspector/protocol/IndexedDB.json: Renamed from Source/WebCore/inspector/protocol/IndexedDB.json.
* inspector/protocol/LayerTree.json: Renamed from Source/WebCore/inspector/protocol/LayerTree.json.
* inspector/protocol/Network.json: Renamed from Source/WebCore/inspector/protocol/Network.json.
* inspector/protocol/Page.json: Renamed from Source/WebCore/inspector/protocol/Page.json.
* inspector/protocol/Replay.json: Renamed from Source/WebCore/inspector/protocol/Replay.json.
* inspector/protocol/Timeline.json: Renamed from Source/WebCore/inspector/protocol/Timeline.json.
* inspector/protocol/Worker.json: Renamed from Source/WebCore/inspector/protocol/Worker.json.
Move all protocol files into this directory.

* inspector/InspectorProtocolTypesBase.h: Renamed from Source/JavaScriptCore/inspector/InspectorProtocolTypes.h.
Renamed the base types file to not clash with the generated types file.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/copy-files.cmd:
* JavaScriptCore.xcodeproj/project.pbxproj:
Update build phases for new JSON files and new filenames.

* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
Updated names of things now that prefixes are no longer needed.

* inspector/ConsoleMessage.h:
* inspector/ContentSearchUtilities.cpp:
* inspector/ContentSearchUtilities.h:
* inspector/InjectedScript.h:
* inspector/InjectedScriptBase.h:
* inspector/ScriptCallFrame.h:
* inspector/ScriptCallStack.h:
* inspector/agents/InspectorAgent.h:
* inspector/agents/InspectorConsoleAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::breakpointActionTypeForString):
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorRuntimeAgent.h:
* runtime/TypeProfiler.cpp:
* runtime/TypeSet.cpp:
Update includes and update a few function names that are generated.

* inspector/scripts/codegen/generate_protocol_types_header.py:
(ProtocolTypesHeaderGenerator.output_filename):
(ProtocolTypesHeaderGenerator.generate_output):
Include an export macro for type string constants defined in the implementation file.

* inspector/scripts/codegen/generate_backend_commands.py:
(BackendCommandsGenerator.output_filename):
* inspector/scripts/codegen/generate_backend_dispatcher_header.py:
(BackendDispatcherHeaderGenerator.output_filename):
(BackendDispatcherHeaderGenerator.generate_output):
* inspector/scripts/codegen/generate_backend_dispatcher_implementation.py:
(BackendDispatcherImplementationGenerator.output_filename):
(BackendDispatcherImplementationGenerator.generate_output):
(BackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain):
(BackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
* inspector/scripts/codegen/generate_frontend_dispatcher_header.py:
(FrontendDispatcherHeaderGenerator.output_filename):
(FrontendDispatcherHeaderGenerator.generate_output):
* inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py:
(FrontendDispatcherImplementationGenerator.output_filename):
(FrontendDispatcherImplementationGenerator.generate_output):
(FrontendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_event):
(_generate_class_for_object_declaration):
(_generate_builder_setter_for_member):
(_generate_unchecked_setter_for_member):
* inspector/scripts/codegen/generate_protocol_types_implementation.py:
(ProtocolTypesImplementationGenerator.output_filename):
(ProtocolTypesImplementationGenerator.generate_output):
(ProtocolTypesImplementationGenerator._generate_enum_mapping):
* inspector/scripts/codegen/models.py:
(Framework.fromString):
(Frameworks):
* inspector/scripts/generate-inspector-protocol-bindings.py:
Simplify generator now that prefixes are no longer needed. This updates
filenames, includes, and the list of supported directories.

Source/WebCore:

After moving the json files into JavaScriptCore update the includes,
and names of functions that were previously prefixed.

* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Removed.
* ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Removed.
* ForwardingHeaders/inspector/InspectorJSProtocolTypes.h: Removed.
* ForwardingHeaders/inspector/InspectorProtocolTypesBase.h: Added.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.xcodeproj/project.pbxproj:
* inspector/CommandLineAPIHost.cpp:
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorController.cpp:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorReplayAgent.cpp:
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorStyleSheet.cpp:
* inspector/InspectorStyleSheet.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.h:
* inspector/TimelineRecordFactory.cpp:
* inspector/WorkerInspectorController.cpp:

Source/WebInspectorUI:

Change the frontend to always load all agents, but only activate a subset
of the agents depending on the type of the backend.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype.activateDomains):
(InspectorBackendClass.prototype.activateAllDomains):
(InspectorBackendClass.prototype._agentForDomain):
(InspectorBackendClass.prototype._dispatchEvent):
(InspectorBackend.Agent):
(InspectorBackend.Agent.prototype.get active):
(InspectorBackend.Agent.prototype.activate):
* UserInterface/Base/Test.js:
Only expose "window.FooAgent" or allow dispatches in the "Foo" domain
when that particular agent is activated. Currently we hardcode the list
of agents to activate for a debuggable type. This should be generated.

* UserInterface/Protocol/LoadInspectorBackendCommands.js:
Now there should always be a single "InspectorBackendCommands.js" file to load.
We may want to change the RWI path to return a single file instead of an array.

* Scripts/update-LegacyInspectorBackendCommands.rb:
* UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/Legacy/6.0/InspectorWebBackendCommands.js.
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorWebBackendCommands.js.
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorWebBackendCommands.js.
* UserInterface/Protocol/Legacy/8.0/InspectorJSBackendCommands.js: Removed.
* Versions/Inspector-iOS-8.0.json: Renamed from Source/WebInspectorUI/Versions/InspectorWeb-iOS-8.0.json.
* Versions/InspectorJS-iOS-8.0.json: Removed.
Update Legacy versions to output a single InspectorBackendCommands.js file.
Do a straightforward merge of the iOS 8 JS/Web inputs to a single json file.

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/WebInspectorUIFramework.xcconfig:
* Scripts/copy-user-interface-resources-dryrun.rb:
* Scripts/copy-user-interface-resources.pl:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
* WebInspectorUI.vcxproj/build-webinspectorui.pl:
We no longer needed WebCore's Private Headers, so simplify build files
and update file names where appropriate.

Source/WebKit2:

* PlatformGTK.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
128 files changed:
ChangeLog
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/DerivedSources.make
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
Source/JavaScriptCore/JavaScriptCore.vcxproj/copy-files.cmd
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/inspector/ConsoleMessage.h
Source/JavaScriptCore/inspector/ContentSearchUtilities.cpp
Source/JavaScriptCore/inspector/ContentSearchUtilities.h
Source/JavaScriptCore/inspector/InjectedScript.h
Source/JavaScriptCore/inspector/InjectedScriptBase.h
Source/JavaScriptCore/inspector/ScriptCallFrame.h
Source/JavaScriptCore/inspector/ScriptCallStack.h
Source/JavaScriptCore/inspector/agents/InspectorAgent.h
Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h
Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp
Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h
Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h
Source/JavaScriptCore/inspector/protocol/ApplicationCache.json [moved from Source/WebCore/inspector/protocol/ApplicationCache.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/CSS.json [moved from Source/WebCore/inspector/protocol/CSS.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/DOM.json [moved from Source/WebCore/inspector/protocol/DOM.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/DOMDebugger.json [moved from Source/WebCore/inspector/protocol/DOMDebugger.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/DOMStorage.json [moved from Source/WebCore/inspector/protocol/DOMStorage.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/Database.json [moved from Source/WebCore/inspector/protocol/Database.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/IndexedDB.json [moved from Source/WebCore/inspector/protocol/IndexedDB.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/LayerTree.json [moved from Source/WebCore/inspector/protocol/LayerTree.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/Network.json [moved from Source/WebCore/inspector/protocol/Network.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/Page.json [moved from Source/WebCore/inspector/protocol/Page.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/Replay.json [moved from Source/WebCore/inspector/protocol/Replay.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/Timeline.json [moved from Source/WebCore/inspector/protocol/Timeline.json with 100% similarity]
Source/JavaScriptCore/inspector/protocol/Worker.json [moved from Source/WebCore/inspector/protocol/Worker.json with 100% similarity]
Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_commands.py [changed mode: 0644->0755]
Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_dispatcher_header.py
Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_dispatcher_implementation.py
Source/JavaScriptCore/inspector/scripts/codegen/generate_frontend_dispatcher_header.py
Source/JavaScriptCore/inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py
Source/JavaScriptCore/inspector/scripts/codegen/generate_protocol_types_header.py
Source/JavaScriptCore/inspector/scripts/codegen/generate_protocol_types_implementation.py
Source/JavaScriptCore/inspector/scripts/codegen/models.py
Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-async-attribute.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/events-with-optional-parameters.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/same-type-id-different-domain.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-array-type.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-enum-type.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/type-declaration-object-type.json-result
Source/JavaScriptCore/inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result
Source/JavaScriptCore/runtime/TypeProfiler.cpp
Source/JavaScriptCore/runtime/TypeSet.cpp
Source/PlatformEfl.cmake
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/ForwardingHeaders/inspector/InspectorBackendDispatchers.h [new file with mode: 0644]
Source/WebCore/ForwardingHeaders/inspector/InspectorFrontendDispatchers.h [new file with mode: 0644]
Source/WebCore/ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h [deleted file]
Source/WebCore/ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h [deleted file]
Source/WebCore/ForwardingHeaders/inspector/InspectorJSProtocolTypes.h [deleted file]
Source/WebCore/ForwardingHeaders/inspector/InspectorProtocolObjects.h [new file with mode: 0644]
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.vcxproj/copyForwardingHeaders.cmd
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/inspector/CommandLineAPIHost.cpp
Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp
Source/WebCore/inspector/InspectorApplicationCacheAgent.h
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorCSSAgent.h
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/inspector/InspectorDOMAgent.h
Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp
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/InspectorDatabaseResource.cpp
Source/WebCore/inspector/InspectorDatabaseResource.h
Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
Source/WebCore/inspector/InspectorIndexedDBAgent.h
Source/WebCore/inspector/InspectorLayerTreeAgent.cpp
Source/WebCore/inspector/InspectorLayerTreeAgent.h
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/InspectorPageAgent.h
Source/WebCore/inspector/InspectorReplayAgent.cpp
Source/WebCore/inspector/InspectorReplayAgent.h
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.h
Source/WebCore/inspector/InspectorStyleSheet.cpp
Source/WebCore/inspector/InspectorStyleSheet.h
Source/WebCore/inspector/InspectorTimelineAgent.cpp
Source/WebCore/inspector/InspectorTimelineAgent.h
Source/WebCore/inspector/InspectorWorkerAgent.cpp
Source/WebCore/inspector/InspectorWorkerAgent.h
Source/WebCore/inspector/PageRuntimeAgent.h
Source/WebCore/inspector/TimelineRecordFactory.cpp
Source/WebCore/inspector/WorkerInspectorController.cpp
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Configurations/Base.xcconfig
Source/WebInspectorUI/Configurations/DebugRelease.xcconfig
Source/WebInspectorUI/Configurations/WebInspectorUIFramework.xcconfig
Source/WebInspectorUI/Scripts/copy-user-interface-resources-dryrun.rb
Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl
Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Base/Test.js
Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js
Source/WebInspectorUI/UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js [moved from Source/WebInspectorUI/UserInterface/Protocol/Legacy/6.0/InspectorWebBackendCommands.js with 100% similarity]
Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js [moved from Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorWebBackendCommands.js with 100% similarity]
Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js [moved from Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorWebBackendCommands.js with 74% similarity]
Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorJSBackendCommands.js [deleted file]
Source/WebInspectorUI/UserInterface/Protocol/LoadInspectorBackendCommands.js
Source/WebInspectorUI/Versions/Inspector-iOS-8.0.json [moved from Source/WebInspectorUI/Versions/InspectorWeb-iOS-8.0.json with 74% similarity]
Source/WebInspectorUI/Versions/InspectorJS-iOS-8.0.json [deleted file]
Source/WebInspectorUI/WebInspectorUI.vcxproj/WebInspectorUI.vcxproj
Source/WebInspectorUI/WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters
Source/WebInspectorUI/WebInspectorUI.vcxproj/build-webinspectorui.pl
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformGTK.cmake