Changeset 87781 in webkit


Ignore:
Timestamp:
Jun 1, 2011 12:46:13 AM (13 years ago)
Author:
mnaganov@chromium.org
Message:

2011-05-31 Mikhail Naganov <mnaganov@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:
Location:
trunk/Source/WebKit/chromium
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r87772 r87781  
     12011-05-31  Mikhail Naganov  <mnaganov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector [Chromium]: Put worker scripts into devtools_frontend.zip.
     6        https://bugs.webkit.org/show_bug.cgi?id=61803
     7
     8        * WebKit.gyp:
     9        * scripts/generate_devtools_zip.py:
     10
    1112011-05-31  Kinuko Yasuda  <kinuko@chromium.org>
    212
  • trunk/Source/WebKit/chromium/WebKit.gyp

    r87454 r87781  
    828828                'script_name': 'scripts/generate_devtools_zip.py',
    829829                'inspector_html': '../../WebCore/inspector/front-end/inspector.html',
     830                'workers_files': [
     831                    '../../WebCore/inspector/front-end/HeapSnapshotWorker.js',
     832                    '../../WebCore/inspector/front-end/JavaScriptFormatter.js',
     833                    '../../WebCore/inspector/front-end/ScriptFormatterWorker.js',
     834                    '<@(webinspector_uglifyjs_files)'
     835                ],
    830836                'inputs': [
    831837                    '<@(_script_name)',
     
    835841                    '<@(webinspector_files)',
    836842                    '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js',
     843                    '<@(_workers_files)',
    837844                    '<@(webinspector_image_files)',
    838845                    '<@(devtools_image_files)',
     
    850857                'action': ['python', '<@(_script_name)', '<@(_inspector_html)',
    851858                                     '--devtools-files', '<@(devtools_files)',
     859                                     '--workers-files', '<@(_workers_files)',
    852860                                     '--search-path', '<@(_search_path)',
    853861                                     '--image-search-path', '<@(_image_search_path)',
  • trunk/Source/WebKit/chromium/scripts/generate_devtools_zip.py

    r85071 r87781  
    4848
    4949class ParsedArgs:
    50     def __init__(self, inspector_html, devtools_files, search_dirs,
    51                  image_search_dirs, output_filename):
     50    def __init__(self, inspector_html, devtools_files, workers_files,
     51                 search_dirs, image_search_dirs, output_filename):
    5252        self.inspector_html = inspector_html
    5353        self.devtools_files = devtools_files
     54        self.workers_files = workers_files
    5455        self.search_dirs = search_dirs
    5556        self.image_search_dirs = image_search_dirs
     
    6162
    6263    devtools_files_position = argv.index('--devtools-files')
     64    workers_files_position = argv.index('--workers-files')
    6365    search_path_position = argv.index('--search-path')
    6466    image_search_path_position = argv.index('--image-search-path')
    6567    output_position = argv.index('--output')
    6668
    67     devtools_files = argv[devtools_files_position + 1:search_path_position]
     69    devtools_files = argv[devtools_files_position + 1:workers_files_position]
     70    workers_files = argv[workers_files_position + 1:search_path_position]
    6871    search_dirs = argv[search_path_position + 1:image_search_path_position]
    6972    image_search_dirs = argv[image_search_path_position + 1:output_position]
    7073
    71     return ParsedArgs(inspector_html, devtools_files, search_dirs,
    72                       image_search_dirs, argv[output_position + 1])
     74    return ParsedArgs(inspector_html, devtools_files, workers_files,
     75                      search_dirs, image_search_dirs, argv[output_position + 1])
    7376
    7477
     
    99102        zip.write(full_path, os.path.basename(full_path))
    100103
     104    front_end_path = 'front-end'
     105    for dirname in parsed_args.search_dirs:
     106        if dirname.find(front_end_path):
     107            front_end_path = dirname
     108            break
     109
     110    for input_file_name in set(parsed_args.workers_files):
     111        # We assume that workers-related files reside in the 'front-end'
     112        # directory
     113        relpath = os.path.relpath(os.path.dirname(input_file_name),
     114                                  front_end_path)
     115        if relpath == '.':
     116            relpath = ''
     117        else:
     118            relpath += '/'
     119        zip.write(input_file_name,
     120                  relpath + os.path.basename(input_file_name))
     121
    101122    for dirname in parsed_args.image_search_dirs:
    102123        for filename in os.listdir(dirname):
Note: See TracChangeset for help on using the changeset viewer.