Title: [129880] trunk/Source/WebKit/chromium
Revision
129880
Author
[email protected]
Date
2012-09-28 05:48:25 -0700 (Fri, 28 Sep 2012)

Log Message

Web Inspector: [chromium] remove devtools_frontend.zip
https://bugs.webkit.org/show_bug.cgi?id=97650

Reviewed by Yury Semikhatsky.

This change removes the devtools_frontend zip generation and migrates to proper resource bundle for debug mode creation.

* WebKit.gyp:
* scripts/generate_devtools_zip.py: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (129879 => 129880)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-09-28 12:37:00 UTC (rev 129879)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-09-28 12:48:25 UTC (rev 129880)
@@ -1,3 +1,15 @@
+2012-09-28  Pavel Feldman  <[email protected]>
+
+        Web Inspector: [chromium] remove devtools_frontend.zip
+        https://bugs.webkit.org/show_bug.cgi?id=97650
+
+        Reviewed by Yury Semikhatsky.
+
+        This change removes the devtools_frontend zip generation and migrates to proper resource bundle for debug mode creation.
+
+        * WebKit.gyp:
+        * scripts/generate_devtools_zip.py: Removed.
+
 2012-09-28  Yury Semikhatsky  <[email protected]>
 
         Web Inspector: make HashSet memory instrumentation non-intrusive

Modified: trunk/Source/WebKit/chromium/WebKit.gyp (129879 => 129880)


--- trunk/Source/WebKit/chromium/WebKit.gyp	2012-09-28 12:37:00 UTC (rev 129879)
+++ trunk/Source/WebKit/chromium/WebKit.gyp	2012-09-28 12:48:25 UTC (rev 129880)
@@ -917,7 +917,7 @@
                         '<@(webinspector_image_files)',
                         '<@(devtools_image_files)',
                     ],
-               },
+                },
             ],
         },
         {
@@ -972,96 +972,76 @@
                                      'concatenated_heap_snapshot_worker_js',
                                      'concatenated_script_formatter_worker_js',
                                      'concatenated_devtools_css'],
-                },{
+                    'actions': [{
+                        'action_name': 'generate_devtools_grd',
+                        'script_name': 'scripts/generate_devtools_grd.py',
+                        'input_pages': [
+                            '<(PRODUCT_DIR)/resources/inspector/devtools.html',
+                            '<(PRODUCT_DIR)/resources/inspector/DevTools.js',
+                            '<(PRODUCT_DIR)/resources/inspector/ElementsPanel.js',
+                            '<(PRODUCT_DIR)/resources/inspector/ResourcesPanel.js',
+                            '<(PRODUCT_DIR)/resources/inspector/NetworkPanel.js',
+                            '<(PRODUCT_DIR)/resources/inspector/ScriptsPanel.js',
+                            '<(PRODUCT_DIR)/resources/inspector/TimelinePanel.js',
+                            '<(PRODUCT_DIR)/resources/inspector/ProfilesPanel.js',
+                            '<(PRODUCT_DIR)/resources/inspector/AuditsPanel.js',
+                            '<(PRODUCT_DIR)/resources/inspector/CodeMirrorTextEditor.js',
+                            '<(PRODUCT_DIR)/resources/inspector/HeapSnapshotWorker.js',
+                            '<(PRODUCT_DIR)/resources/inspector/ScriptFormatterWorker.js',
+                            '<(PRODUCT_DIR)/resources/inspector/devTools.css',
+                            '<(PRODUCT_DIR)/resources/inspector/devtools_extension_api.js',
+                            '<@(webinspector_standalone_css_files)',
+                        ],
+                        'images': [
+                            '<@(webinspector_image_files)',
+                            '<@(devtools_image_files)',
+                        ],
+                        'inputs': [
+                            '<@(_script_name)',
+                            '<@(_input_pages)',
+                            '<@(_images)',
+                        ],
+                        'search_path': [
+                            '../../WebCore/inspector/front-end/Images',
+                            'src/js/Images',
+                        ],
+                        'outputs': ['<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd'],
+                        'action': ['python', '<@(_script_name)', '<@(_input_pages)', '--images', '<@(_search_path)', '--output', '<@(_outputs)'],
+                    }],
+                },
+                {
                     # If we're not concatenating devtools files, we want to
                     # run after the original files have been copied to
                     # <(PRODUCT_DIR)/resources/inspector.
                     'dependencies': ['inspector_resources'],
+                    'actions': [{
+                        'action_name': 'generate_devtools_grd',
+                        'script_name': 'scripts/generate_devtools_grd.py',
+                        'input_pages': [
+                            '<@(webinspector_files)',
+                            '<@(devtools_files)',
+                            '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendCommands.js',
+                            '<(PRODUCT_DIR)/resources/inspector/devtools.html',
+                        ],
+                        'images': [
+                            '<@(webinspector_image_files)',
+                            '<@(devtools_image_files)',
+                        ],
+                        'inputs': [
+                            '<@(_script_name)',
+                            '<@(_input_pages)',
+                            '<@(_images)',
+                        ],
+                        'search_path': [
+                            '../../WebCore/inspector/front-end/Images',
+                            'src/js/Images',
+                        ],
+                        'outputs': ['<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd'],
+                        'action': ['python', '<@(_script_name)', '<@(_input_pages)', '--images', '<@(_search_path)', '--output', '<@(_outputs)'],
+                    }],
                 }],
             ],
-            'actions': [{
-                'action_name': 'generate_devtools_grd',
-                'script_name': 'scripts/generate_devtools_grd.py',
-                'input_pages': [
-                    '<(PRODUCT_DIR)/resources/inspector/devtools.html',
-                    '<(PRODUCT_DIR)/resources/inspector/DevTools.js',
-                    '<(PRODUCT_DIR)/resources/inspector/ElementsPanel.js',
-                    '<(PRODUCT_DIR)/resources/inspector/ResourcesPanel.js',
-                    '<(PRODUCT_DIR)/resources/inspector/NetworkPanel.js',
-                    '<(PRODUCT_DIR)/resources/inspector/ScriptsPanel.js',
-                    '<(PRODUCT_DIR)/resources/inspector/TimelinePanel.js',
-                    '<(PRODUCT_DIR)/resources/inspector/ProfilesPanel.js',
-                    '<(PRODUCT_DIR)/resources/inspector/AuditsPanel.js',
-                    '<(PRODUCT_DIR)/resources/inspector/CodeMirrorTextEditor.js',
-                    '<(PRODUCT_DIR)/resources/inspector/HeapSnapshotWorker.js',
-                    '<(PRODUCT_DIR)/resources/inspector/ScriptFormatterWorker.js',
-                    '<(PRODUCT_DIR)/resources/inspector/devTools.css',
-                    '<(PRODUCT_DIR)/resources/inspector/devtools_extension_api.js',
-                    '<@(webinspector_standalone_css_files)',
-                ],
-                'images': [
-                    '<@(webinspector_image_files)',
-                    '<@(devtools_image_files)',
-                ],
-                'inputs': [
-                    '<@(_script_name)',
-                    '<@(_input_pages)',
-                    '<@(_images)',
-                ],
-                'search_path': [
-                    '../../WebCore/inspector/front-end/Images',
-                    'src/js/Images',
-                ],
-                'outputs': ['<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd'],
-                'action': ['python', '<@(_script_name)', '<@(_input_pages)', '--images', '<@(_search_path)', '--output', '<@(_outputs)'],
-            }],
         },
-        {
-            'target_name': 'generate_devtools_zip',
-            'type': 'none',
-            'dependencies': [
-                '../../WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources',
-            ],
-            'actions': [{
-                'action_name': 'generate_devtools_zip',
-                'script_name': 'scripts/generate_devtools_zip.py',
-                'inspector_html': '../../WebCore/inspector/front-end/inspector.html',
-                'workers_files': [
-                    '../../WebCore/inspector/front-end/HeapSnapshotWorker.js',
-                    '../../WebCore/inspector/front-end/_javascript_Formatter.js',
-                    '../../WebCore/inspector/front-end/ScriptFormatterWorker.js',
-                    '<@(webinspector_uglifyjs_files)'
-                ],
-                'inputs': [
-                    '<@(_script_name)',
-                    'scripts/generate_devtools_html.py',
-                    'scripts/generate_devtools_extension_api.py',
-                    '<@(_inspector_html)',
-                    '<@(devtools_files)',
-                    '<@(webinspector_files)',
-                    '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendCommands.js',
-                    '<@(_workers_files)',
-                    '<@(webinspector_image_files)',
-                    '<@(devtools_image_files)',
-                    '<@(devtools_extension_api_files)',
-                ],
-                'search_path': [
-                    '../../WebCore/inspector/front-end',
-                    'src/js',
-                ],
-                'js_search_path': [
-                    '<(SHARED_INTERMEDIATE_DIR)/webcore',
-                ],
-                'outputs': ['<(PRODUCT_DIR)/devtools_frontend.zip'],
-                'action': ['python', '<@(_script_name)', '<@(_inspector_html)',
-                                     '--devtools-files', '<@(devtools_files)',
-                                     '--workers-files', '<@(_workers_files)',
-                                     '--extension-api-files', '<@(devtools_extension_api_files)',
-                                     '--search-path', '<@(_search_path)',
-                                     '--js-search-path', '<@(_js_search_path)',
-                                     '--output', '<@(_outputs)'],
-            }],
-        },
     ], # targets
     'conditions': [
         ['os_posix==1 and OS!="mac" and gcc_version>=46', {

Deleted: trunk/Source/WebKit/chromium/scripts/generate_devtools_zip.py (129879 => 129880)


--- trunk/Source/WebKit/chromium/scripts/generate_devtools_zip.py	2012-09-28 12:37:00 UTC (rev 129879)
+++ trunk/Source/WebKit/chromium/scripts/generate_devtools_zip.py	2012-09-28 12:48:25 UTC (rev 129880)
@@ -1,140 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2011 Google 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:
-#
-#         * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#         * 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.
-#         * Neither the name of Google Inc. 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 THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
-# OWNER OR 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.
-
-"""Creates a zip file containing the web inspector files for debugging.
-
-The zip file contains all the .html, .js, .css and image files used by the
-web inspector.  The js files and css files are not concatenated and are not
-minified."""
-
-from __future__ import with_statement
-
-import os
-import StringIO
-import sys
-import zipfile
-
-import concatenate_js_files
-import generate_devtools_html
-import generate_devtools_extension_api
-
-
-class ParsedArgs:
-    def __init__(self, inspector_html, devtools_files, workers_files, extension_api_files,
-                 search_dirs, js_search_dirs, output_filename):
-        self.inspector_html = inspector_html
-        self.devtools_files = devtools_files
-        self.workers_files = workers_files
-        self.extension_api_files = extension_api_files
-        self.search_dirs = search_dirs
-        self.js_search_dirs = js_search_dirs
-        self.output_filename = output_filename
-
-
-def parse_args(argv):
-    inspector_html = argv[0]
-
-    devtools_files_position = argv.index('--devtools-files')
-    workers_files_position = argv.index('--workers-files')
-    extension_api_files_position = argv.index('--extension-api-files')
-    search_path_position = argv.index('--search-path')
-    js_search_path_position = argv.index('--js-search-path')
-    output_position = argv.index('--output')
-
-    devtools_files = argv[devtools_files_position + 1:workers_files_position]
-    workers_files = argv[workers_files_position + 1:extension_api_files_position]
-    extension_api_files = argv[extension_api_files_position + 1:search_path_position]
-    search_dirs = argv[search_path_position + 1:js_search_path_position]
-    js_search_dirs = argv[js_search_path_position + 1:output_position]
-
-    return ParsedArgs(inspector_html, devtools_files, workers_files, extension_api_files,
-                      search_dirs, js_search_dirs, argv[output_position + 1])
-
-
-def main(argv):
-    parsed_args = parse_args(argv[1:])
-
-    devtools_html = StringIO.StringIO()
-    with open(parsed_args.inspector_html, 'r') as inspector_file:
-        generate_devtools_html.write_devtools_html(
-            inspector_file, devtools_html, True, parsed_args.devtools_files)
-
-    zip = zipfile.ZipFile(parsed_args.output_filename, 'w', zipfile.ZIP_DEFLATED)
-    zip.writestr("devtools.html", devtools_html.getvalue())
-
-    devtools_extension_api = StringIO.StringIO()
-    generate_devtools_extension_api.write_devtools_extension_api(
-        devtools_extension_api, parsed_args.extension_api_files)
-    zip.writestr("devtools_extension_api.js", devtools_extension_api.getvalue())
-
-    js_extractor = concatenate_js_files.OrderedJSFilesExtractor(
-        devtools_html.getvalue())
-
-    js_dirs = parsed_args.search_dirs + parsed_args.js_search_dirs
-    expander = concatenate_js_files.PathExpander(js_dirs)
-    files = js_extractor.ordered_js_files
-    for input_file_name in set(files):
-        full_path = expander.expand(input_file_name)
-        if full_path is None:
-            raise Exception('File %s referenced in %s not found on any source paths, '
-                            'check source tree for consistency' %
-                            (input_file_name, 'devtools.html'))
-        zip.write(full_path, os.path.basename(full_path))
-
-    front_end_path = os.path.dirname(os.path.abspath(parsed_args.inspector_html))
-
-    for input_file_name in set(parsed_args.workers_files):
-        script_path = os.path.dirname(os.path.abspath(input_file_name))
-        if script_path.startswith(front_end_path):
-            script_path = script_path.replace(front_end_path, "")
-            if len(script_path) > 0:
-                script_path += '/'
-            zip.write(input_file_name,
-                      script_path + os.path.basename(input_file_name))
-        else:
-            raise Exception('Worker script %s is not from Inspector front-end dir' % (input_file_name))
-
-    for dirname in parsed_args.search_dirs:
-        for filename in os.listdir(dirname):
-            if filename.endswith('.css'):
-                zip.write(os.path.join(dirname, filename), filename)
-        dirname = os.path.join(dirname, 'Images')
-        for filename in os.listdir(dirname):
-            if filename.endswith('.png') or filename.endswith('.gif'):
-                zip.write(os.path.join(dirname, filename),
-                          os.path.join('Images', filename))
-
-    # It would be nice to use the with statement to scope closing the archive,
-    # but that wasn't added until python 2.7.
-    zip.close()
-
-
-if '__main__' == __name__:
-    sys.exit(main(sys.argv))
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to