• joepeck@webkit.org's avatar
    Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain · 8be4912d
    joepeck@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=125595
    
    Reviewed by Timothy Hatcher.
    
    * GNUmakefile.am:
    
    Source/JavaScriptCore:
    
      - Move CodeGeneration scripts from WebCore into JavaScriptCore/inspector/scripts
      - For ports that build WebKit frameworks separately, export the scripts as PrivateHeaders
      - Update CodeGeneratorInspector.py in a few ways:
        - output dynamic filenames, so JavaScriptCore generates InspectorJSFoo.* and WebCore generates InspectorWebFoo.*
        - take in more then one protocol JSON file. The first contains domains to generate, the others are dependencies
          that are generated elsewhere that we can depend on for Types.
      - Add DerivedSources build step to generate the Inspector Interfaces
    
    * CMakeLists.txt:
    * DerivedSources.make:
    * GNUmakefile.am:
    * GNUmakefile.list.am:
    * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
    * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
    * JavaScriptCore.vcxproj/copy-files.cmd:
    * JavaScriptCore.xcodeproj/project.pbxproj:
    Add scripts and code generation.
    
    * inspector/protocol/Runtime.json: Renamed from Source/WebCore/inspector/protocol/Runtime.json.
    Move protocol file into JavaScriptCore so its types will be generated in JavaScriptCore.
    
    * inspector/scripts/CodeGeneratorInspector.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspector.py.
    Updates to the script as listed above.
    
    * inspector/scripts/CodeGeneratorInspectorStrings.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspectorStrings.py.
    * inspector/scripts/generate-combined-inspector-json.py: Renamed from Source/WebCore/inspector/Scripts/generate-combined-inspector-json.py.
    Moved from WebCore into JavaScriptCore for code generation.
    
    Source/WebCore:
    
      - CodeGeneration changed to output Frontend and Backend dispatchers
        in namespace Inspector. So update all the agent's appropriately.
      - Update Derived Sources code generation to use the Scripts that had
        moved to JavaScriptCore. Some ports just use JSC/inspector/scripts
        directly, but others have to use the Scripts exported by JSC
        in JavaScriptCore's PrivateHeaders.
      - Add ForwardingHeaders for the files generated in JavaScriptCore.
      - Update the names of Inspector DerivedSources files, since they
        were renamed to InspectorWeb*.
    
    No new tests, this only moves code around. There are no functional changes.
    
    * CMakeLists.txt:
    * DerivedSources.make:
    * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Added.
    * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Added.
    * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Added.
    * GNUmakefile.am:
    * GNUmakefile.list.am:
    * WebCore.vcxproj/WebCore.vcxproj:
    * WebCore.vcxproj/WebCore.vcxproj.filters:
    * WebCore.vcxproj/build-generated-files.sh:
    * WebCore.xcodeproj/project.pbxproj:
    Remove files, rename files, update code generation.
    
    * make-generated-sources.sh:
    Update this standalone developer script to fill in the new InspectorScripts variable.
    
    * inspector/ConsoleMessage.h:
    * inspector/InjectedScriptHost.cpp:
    * inspector/InspectorAgent.cpp:
    * inspector/InspectorAgent.h:
    * inspector/InspectorApplicationCacheAgent.cpp:
    * inspector/InspectorApplicationCacheAgent.h:
    * inspector/InspectorCSSAgent.h:
    * inspector/InspectorCanvasAgent.cpp:
    * inspector/InspectorCanvasAgent.h:
    * inspector/InspectorConsoleAgent.cpp:
    * inspector/InspectorConsoleAgent.h:
    * inspector/InspectorController.cpp:
    * inspector/InspectorDOMAgent.cpp:
    * 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/InspectorDebuggerAgent.cpp:
    * inspector/InspectorDebuggerAgent.h:
    * inspector/InspectorFrontendClientLocal.cpp:
    * inspector/InspectorHeapProfilerAgent.h:
    * inspector/InspectorIndexedDBAgent.cpp:
    * inspector/InspectorIndexedDBAgent.h:
    * inspector/InspectorInputAgent.h:
    * inspector/InspectorLayerTreeAgent.cpp:
    * inspector/InspectorLayerTreeAgent.h:
    * inspector/InspectorMemoryAgent.cpp:
    * inspector/InspectorMemoryAgent.h:
    * inspector/InspectorPageAgent.cpp:
    * inspector/InspectorPageAgent.h:
    * inspector/InspectorProfilerAgent.cpp:
    * inspector/InspectorProfilerAgent.h:
    * inspector/InspectorResourceAgent.cpp:
    * inspector/InspectorResourceAgent.h:
    * inspector/InspectorRuntimeAgent.h:
    * inspector/InspectorTimelineAgent.cpp:
    * inspector/InspectorTimelineAgent.h:
    * inspector/InspectorWorkerAgent.cpp:
    * inspector/InspectorWorkerAgent.h:
    * inspector/PageRuntimeAgent.h:
    * inspector/ScriptCallFrame.cpp:
    * inspector/WorkerInspectorController.cpp:
    * inspector/WorkerRuntimeAgent.h:
    Updates header names and class namespace changes.
    
    Source/WebInspectorUI:
    
    * Scripts/copy-user-interface-resources.sh:
    Copy all the different backend commands files.
    
    * Scripts/update-InspectorBackendCommands.rb:
    Update with respect to new script location and new file names.
    
    * WebInspectorUI.xcodeproj/project.pbxproj:
    Remove Inputs and Outputs of build phase, which were wrong.
    Now this build phase always runs, and not by accident.
    
    * UserInterface/InspectorJSBackendCommands.js: Added.
    * UserInterface/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/InspectorBackendCommands.js.
    * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/6.0/InspectorBackendCommands.js.
    * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/7.0/InspectorBackendCommands.js.
    * UserInterface/LoadInspectorBackendCommands.js:
    * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
    * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
    
    LayoutTests:
    
    * http/tests/inspector-protocol/resources/InspectorTest.js:
    (InspectorTest.importInspectorScripts):
    Update for the new backend commands files.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    8be4912d