summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xwebkit/build/generate_devtools_html.py37
-rw-r--r--webkit/glue/devtools/js/devtools.html143
-rw-r--r--webkit/webkit.gyp65
3 files changed, 83 insertions, 162 deletions
diff --git a/webkit/build/generate_devtools_html.py b/webkit/build/generate_devtools_html.py
new file mode 100755
index 0000000..5160fc2
--- /dev/null
+++ b/webkit/build/generate_devtools_html.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os.path
+import sys
+
+def GenerateIncludeTag(resource_path):
+ (dir_name, file_name) = os.path.split(resource_path)
+ if (file_name.endswith('.js')):
+ return ' <script type="text/javascript" src="%s"></script>\n' % file_name
+ elif (file_name.endswith('.css')):
+ return ' <link rel="stylesheet" type="text/css" href="%s">\n' % file_name
+ else:
+ assert false
+
+
+def main(argv):
+
+ if len(argv) < 4:
+ print 'usage: %s inspector_html devtools_html css_and_js_files_list' % argv[0]
+ return 1
+
+ inspector_html = open(argv[1], 'r')
+ devtools_html = open(argv[2], 'w')
+
+ for line in inspector_html:
+ if '</head>' in line:
+ devtools_html.write('\n <!-- The following lines are added to include DevTools resources -->\n')
+ for resource in argv[3:]:
+ devtools_html.write(GenerateIncludeTag(resource))
+ devtools_html.write(' <!-- End of auto-added files list -->\n')
+ devtools_html.write(line)
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
diff --git a/webkit/glue/devtools/js/devtools.html b/webkit/glue/devtools/js/devtools.html
deleted file mode 100644
index 90bc5bf..0000000
--- a/webkit/glue/devtools/js/devtools.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<!--
-Copyright (c) 2009 The Chromium Authors. All rights reserved.
-
-This is the Chromium version of the WebInspector. This html file serves
-as a deployment descriptor and specifies which js libraries to include into the
-app. Once the "main" frontend method that is building WebInspector
-from the js building blocks is extracted, we will be able have different
-implementations of it for Chromium and WebKit. That would allow us for
-example not to create WebKit Database tab and remove corresponding js files
-from here. Longer term we would like to employ closure + basic js compilation.
-That way js libraries would know their dependencies and js compiler would be
-able to compile them into a single file. After that this HTML file will
-include single <script src='fe-compiled.js'> and will become upstreamable.
-
-Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- its contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <link rel="stylesheet" type="text/css" href="inspector.css">
- <link rel="stylesheet" type="text/css" href="devtools.css">
- <script type="text/javascript" src="base.js"></script>
- <script type="text/javascript" src="utilities.js"></script>
- <script type="text/javascript" src="treeoutline.js"></script>
- <script type="text/javascript" src="devtools_callback.js"></script>
- <script type="text/javascript" src="debugger_agent.js"></script>
- <script type="text/javascript" src="inspector_controller.js"></script>
- <script type="text/javascript" src="inspector.js"></script>
- <script type="text/javascript" src="codemap.js"></script>
- <script type="text/javascript" src="consarray.js"></script>
- <script type="text/javascript" src="csvparser.js"></script>
- <script type="text/javascript" src="logreader.js"></script>
- <script type="text/javascript" src="profile.js"></script>
- <script type="text/javascript" src="profile_view.js"></script>
- <script type="text/javascript" src="profiler_processor.js"></script>
- <script type="text/javascript" src="splaytree.js"></script>
- <script type="text/javascript" src="Object.js"></script>
- <script type="text/javascript" src="KeyboardShortcut.js"></script>
- <script type="text/javascript" src="TextPrompt.js"></script>
- <script type="text/javascript" src="Placard.js"></script>
- <script type="text/javascript" src="View.js"></script>
- <script type="text/javascript" src="ChangesView.js"></script>
- <script type="text/javascript" src="ConsoleView.js"></script>
- <script type="text/javascript" src="Drawer.js"></script>
- <script type="text/javascript" src="Resource.js"></script>
- <script type="text/javascript" src="ResourceCategory.js"></script>
- <script type="text/javascript" src="Database.js"></script>
- <script type="text/javascript" src="Callback.js"></script>
- <script type="text/javascript" src="DOMAgent.js"></script>
- <script type="text/javascript" src="TimelineAgent.js"></script>
- <script type="text/javascript" src="InjectedScriptAccess.js"></script>
- <script type="text/javascript" src="inspector_controller_impl.js"></script>
- <script type="text/javascript" src="DOMStorage.js"></script>
- <script type="text/javascript" src="DOMStorageItemsView.js"></script>
- <script type="text/javascript" src="DataGrid.js"></script>
- <script type="text/javascript" src="DOMStorageDataGrid.js"></script>
- <script type="text/javascript" src="Script.js"></script>
- <script type="text/javascript" src="Breakpoint.js"></script>
- <script type="text/javascript" src="SidebarPane.js"></script>
- <script type="text/javascript" src="ElementsTreeOutline.js"></script>
- <script type="text/javascript" src="SidebarTreeElement.js"></script>
- <script type="text/javascript" src="PropertiesSection.js"></script>
- <script type="text/javascript" src="ObjectPropertiesSection.js"></script>
- <script type="text/javascript" src="ObjectProxy.js"></script>
- <script type="text/javascript" src="BreakpointsSidebarPane.js"></script>
- <script type="text/javascript" src="CallStackSidebarPane.js"></script>
- <script type="text/javascript" src="ScopeChainSidebarPane.js"></script>
- <script type="text/javascript" src="WatchExpressionsSidebarPane.js"></script>
- <script type="text/javascript" src="MetricsSidebarPane.js"></script>
- <script type="text/javascript" src="PropertiesSidebarPane.js"></script>
- <script type="text/javascript" src="EventListenersSidebarPane.js"></script>
- <script type="text/javascript" src="Color.js"></script>
- <script type="text/javascript" src="StylesSidebarPane.js"></script>
- <script type="text/javascript" src="Panel.js"></script>
- <script type="text/javascript" src="PanelEnablerView.js"></script>
- <script type="text/javascript" src="StatusBarButton.js"></script>
- <script type="text/javascript" src="SummaryBar.js"></script>
- <script type="text/javascript" src="ElementsPanel.js"></script>
- <script type="text/javascript" src="ResourcesPanel.js"></script>
- <script type="text/javascript" src="ScriptsPanel.js"></script>
- <script type="text/javascript" src="DatabasesPanel.js"></script>
- <script type="text/javascript" src="ProfilesPanel.js"></script>
- <script type="text/javascript" src="ResourceView.js"></script>
- <script type="text/javascript" src="Popup.js"></script>
- <script type="text/javascript" src="SourceFrame.js"></script>
- <script type="text/javascript" src="SourceView.js"></script>
- <script type="text/javascript" src="FontView.js"></script>
- <script type="text/javascript" src="ImageView.js"></script>
- <script type="text/javascript" src="DatabaseTableView.js"></script>
- <script type="text/javascript" src="DatabaseQueryView.js"></script>
- <script type="text/javascript" src="ScriptView.js"></script>
- <script type="text/javascript" src="ProfileView.js"></script>
- <script type="text/javascript" src="ProfileDataGridTree.js"></script>
- <script type="text/javascript" src="BottomUpProfileDataGridTree.js"></script>
- <script type="text/javascript" src="TopDownProfileDataGridTree.js"></script>
- <script type="text/javascript" src="heap_profiler_panel.js"></script>
- <script type="text/javascript" src="devtools.js"></script>
- <script type="text/javascript" src="devtools_host_stub.js"></script>
- <script type="text/javascript" src="tests.js"></script>
-</head>
-<body class="detached">
- <div id="toolbar">
- <div class="toolbar-item hidden"></div>
- <div class="toolbar-item flexable-space"></div>
- <div class="toolbar-item hidden" id="search-results-matches"></div>
- <div class="toolbar-item"><input id="search" type="search" incremental results="0"><div id="search-toolbar-label" class="toolbar-label"></div></div>
- <div class="toolbar-item close"><button id="close-button"></button></div>
- </div>
- <div id="main">
- <div id="main-panels" tabindex="0" spellcheck="false"></div>
- <div id="main-status-bar" class="status-bar"><div id="anchored-status-bar-items"><button id="dock-status-bar-item" class="status-bar-item toggled"><div class="glyph"></div><div class="glyph shadow"></div></button><button id="console-status-bar-item" class="status-bar-item"><div class="glyph"></div><div class="glyph shadow"></div></button><button id="changes-status-bar-item" class="status-bar-item hidden"></button><div id="count-items"><div id="changes-count" class="hidden"></div><div id="error-warning-count" class="hidden"></div></div></div></div>
- </div>
- <div id="drawer">
- <div id="console-view"><div id="console-messages"><div id="console-prompt" spellcheck="false"><br></div></div></div>
- <div id="drawer-status-bar" class="status-bar"><div id="other-drawer-status-bar-items"><button id="clear-console-status-bar-item" class="status-bar-item"><div class="glyph"></div><div class="glyph shadow"></div></button><div id="console-filter" class="status-bar-item"></div></div></div>
- </div>
-</body>
-</html>
diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp
index fda736f..efc5176 100644
--- a/webkit/webkit.gyp
+++ b/webkit/webkit.gyp
@@ -18,6 +18,29 @@
'chromium_code': 1,
}],
],
+
+ # List of DevTools source files, ordered by dependencies. It is used both
+ # for copying them to resource dir, and for generating 'devtools.html' file.
+ 'devtools_files': [
+ 'glue/devtools/js/devtools.css',
+ 'glue/devtools/js/base.js',
+ 'glue/devtools/js/devtools_callback.js',
+ 'glue/devtools/js/inspector_controller.js',
+ 'glue/devtools/js/inspector_controller_impl.js',
+ 'glue/devtools/js/debugger_agent.js',
+ '../v8/tools/codemap.js',
+ '../v8/tools/consarray.js',
+ '../v8/tools/csvparser.js',
+ '../v8/tools/logreader.js',
+ '../v8/tools/profile.js',
+ '../v8/tools/profile_view.js',
+ '../v8/tools/splaytree.js',
+ 'glue/devtools/js/profiler_processor.js',
+ 'glue/devtools/js/heap_profiler_panel.js',
+ 'glue/devtools/js/devtools.js',
+ 'glue/devtools/js/devtools_host_stub.js',
+ 'glue/devtools/js/tests.js',
+ ],
},
'targets': [
{
@@ -695,32 +718,18 @@
'target_name': 'inspector_resources',
'type': 'none',
'msvs_guid': '5330F8EE-00F5-D65C-166E-E3150171055D',
+ 'dependencies': [
+ 'devtools_html',
+ ],
'copies': [
{
'destination': '<(PRODUCT_DIR)/resources/inspector',
'files': [
- 'glue/devtools/js/base.js',
- 'glue/devtools/js/debugger_agent.js',
- 'glue/devtools/js/devtools.css',
- 'glue/devtools/js/devtools.html',
- 'glue/devtools/js/devtools.js',
- 'glue/devtools/js/devtools_callback.js',
- 'glue/devtools/js/devtools_host_stub.js',
- 'glue/devtools/js/heap_profiler_panel.js',
- 'glue/devtools/js/inspector_controller.js',
- 'glue/devtools/js/inspector_controller_impl.js',
- 'glue/devtools/js/profiler_processor.js',
- 'glue/devtools/js/tests.js',
+
+ '<@(devtools_files)',
'<@(webinspector_files)',
- '../v8/tools/codemap.js',
- '../v8/tools/consarray.js',
- '../v8/tools/csvparser.js',
- '../v8/tools/logreader.js',
- '../v8/tools/profile.js',
- '../v8/tools/profile_view.js',
- '../v8/tools/splaytree.js',
],
},
{
@@ -733,5 +742,23 @@
},
],
},
+ {
+ 'target_name': 'devtools_html',
+ 'type': 'none',
+ 'msvs_guid': '9BE5D4D5-E800-44F9-B6C0-27DF15A9D817',
+ 'actions': [
+ {
+ 'action_name': 'devtools_html',
+ 'inputs': [
+ 'build/generate_devtools_html.py',
+ '../third_party/WebKit/WebCore/inspector/front-end/inspector.html',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/resources/inspector/devtools.html',
+ ],
+ 'action': ['python', '<@(_inputs)', '<@(_outputs)', '<@(devtools_files)'],
+ },
+ ],
+ }
], # targets
}