Title: [87781] trunk/Source/WebKit/chromium
Revision
87781
Author
mnaga...@chromium.org
Date
2011-06-01 00:46:13 -0700 (Wed, 01 Jun 2011)

Log Message

2011-05-31  Mikhail Naganov  <mnaga...@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector [Chromium]: Put worker scripts into devtools_frontend.zip.
        https://bugs.webkit.org/show_bug.cgi?id=61803

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

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (87780 => 87781)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-06-01 07:40:41 UTC (rev 87780)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-06-01 07:46:13 UTC (rev 87781)
@@ -1,3 +1,13 @@
+2011-05-31  Mikhail Naganov  <mnaga...@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector [Chromium]: Put worker scripts into devtools_frontend.zip.
+        https://bugs.webkit.org/show_bug.cgi?id=61803
+
+        * WebKit.gyp:
+        * scripts/generate_devtools_zip.py:
+
 2011-05-31  Kinuko Yasuda  <kin...@chromium.org>
 
         Reviewed by Kent Tamura.

Modified: trunk/Source/WebKit/chromium/WebKit.gyp (87780 => 87781)


--- trunk/Source/WebKit/chromium/WebKit.gyp	2011-06-01 07:40:41 UTC (rev 87780)
+++ trunk/Source/WebKit/chromium/WebKit.gyp	2011-06-01 07:46:13 UTC (rev 87781)
@@ -827,6 +827,12 @@
                 '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',
@@ -834,6 +840,7 @@
                     '<@(devtools_files)',
                     '<@(webinspector_files)',
                     '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js',
+                    '<@(_workers_files)',
                     '<@(webinspector_image_files)',
                     '<@(devtools_image_files)',
                 ],
@@ -849,6 +856,7 @@
                 'outputs': ['<(PRODUCT_DIR)/devtools_frontend.zip'],
                 'action': ['python', '<@(_script_name)', '<@(_inspector_html)',
                                      '--devtools-files', '<@(devtools_files)',
+                                     '--workers-files', '<@(_workers_files)',
                                      '--search-path', '<@(_search_path)',
                                      '--image-search-path', '<@(_image_search_path)',
                                      '--output', '<@(_outputs)'],

Modified: trunk/Source/WebKit/chromium/scripts/generate_devtools_zip.py (87780 => 87781)


--- trunk/Source/WebKit/chromium/scripts/generate_devtools_zip.py	2011-06-01 07:40:41 UTC (rev 87780)
+++ trunk/Source/WebKit/chromium/scripts/generate_devtools_zip.py	2011-06-01 07:46:13 UTC (rev 87781)
@@ -47,10 +47,11 @@
 
 
 class ParsedArgs:
-    def __init__(self, inspector_html, devtools_files, search_dirs,
-                 image_search_dirs, output_filename):
+    def __init__(self, inspector_html, devtools_files, workers_files,
+                 search_dirs, image_search_dirs, output_filename):
         self.inspector_html = inspector_html
         self.devtools_files = devtools_files
+        self.workers_files = workers_files
         self.search_dirs = search_dirs
         self.image_search_dirs = image_search_dirs
         self.output_filename = output_filename
@@ -60,16 +61,18 @@
     inspector_html = argv[0]
 
     devtools_files_position = argv.index('--devtools-files')
+    workers_files_position = argv.index('--workers-files')
     search_path_position = argv.index('--search-path')
     image_search_path_position = argv.index('--image-search-path')
     output_position = argv.index('--output')
 
-    devtools_files = argv[devtools_files_position + 1:search_path_position]
+    devtools_files = argv[devtools_files_position + 1:workers_files_position]
+    workers_files = argv[workers_files_position + 1:search_path_position]
     search_dirs = argv[search_path_position + 1:image_search_path_position]
     image_search_dirs = argv[image_search_path_position + 1:output_position]
 
-    return ParsedArgs(inspector_html, devtools_files, search_dirs,
-                      image_search_dirs, argv[output_position + 1])
+    return ParsedArgs(inspector_html, devtools_files, workers_files,
+                      search_dirs, image_search_dirs, argv[output_position + 1])
 
 
 def main(argv):
@@ -98,6 +101,24 @@
                             (input_file_name, 'devtools.html'))
         zip.write(full_path, os.path.basename(full_path))
 
+    front_end_path = 'front-end'
+    for dirname in parsed_args.search_dirs:
+        if dirname.find(front_end_path):
+            front_end_path = dirname
+            break
+
+    for input_file_name in set(parsed_args.workers_files):
+        # We assume that workers-related files reside in the 'front-end'
+        # directory
+        relpath = os.path.relpath(os.path.dirname(input_file_name),
+                                  front_end_path)
+        if relpath == '.':
+            relpath = ''
+        else:
+            relpath += '/'
+        zip.write(input_file_name,
+                  relpath + os.path.basename(input_file_name))
+
     for dirname in parsed_args.image_search_dirs:
         for filename in os.listdir(dirname):
             if not filename.endswith('.png') and not filename.endswith('.gif'):
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to