summaryrefslogtreecommitdiffstats
path: root/webkit/build
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-17 13:50:59 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-17 13:50:59 +0000
commit18c27615b5e05d2c9d5cc01769114d7fb79c81dd (patch)
tree87a3444fc59dedc98d6f55c71273e7a11305cbc8 /webkit/build
parent77eafadb14a26c9b1199924f8522510e4aeecce4 (diff)
downloadchromium_src-18c27615b5e05d2c9d5cc01769114d7fb79c81dd.zip
chromium_src-18c27615b5e05d2c9d5cc01769114d7fb79c81dd.tar.gz
chromium_src-18c27615b5e05d2c9d5cc01769114d7fb79c81dd.tar.bz2
DevTools: remove legacy concatenate scripts from downstream.
TBR=mnaganov Review URL: http://codereview.chromium.org/5169002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/build')
-rwxr-xr-xwebkit/build/concatenate_js_files.py84
-rwxr-xr-xwebkit/build/generate_devtools_html.py52
2 files changed, 0 insertions, 136 deletions
diff --git a/webkit/build/concatenate_js_files.py b/webkit/build/concatenate_js_files.py
deleted file mode 100755
index f6c4a8f..0000000
--- a/webkit/build/concatenate_js_files.py
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/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.
-
-# This script concatenates in place JS files in the order specified
-# using <script> tags in a given 'order.html' file.
-
-from HTMLParser import HTMLParser
-from cStringIO import StringIO
-import os.path
-import sys
-
-class OrderedJSFilesExtractor(HTMLParser):
-
- def __init__(self, order_html_name):
- HTMLParser.__init__(self)
- self.ordered_js_files = []
- order_html = open(order_html_name, 'r')
- self.feed(order_html.read())
-
- def handle_starttag(self, tag, attrs):
- if tag == 'script':
- attrs_dict = dict(attrs)
- if ('type' in attrs_dict and attrs_dict['type'] == 'text/javascript' and
- 'src' in attrs_dict):
- self.ordered_js_files.append(attrs_dict['src'])
-
-class PathExpander:
-
- def __init__(self, paths):
- self.paths = paths;
-
- def expand(self, filename):
- last_path = None
- expanded_name = None
- for path in self.paths:
- fname = "%s/%s" % (path, filename)
- if (os.access(fname, os.F_OK)):
- if (last_path != None):
- raise Exception('Ambiguous file %s: found in %s and %s' %
- (filename, last_path, path))
- expanded_name = fname
- last_path = path
- return expanded_name
-
-def main(argv):
-
- if len(argv) < 3:
- print('usage: %s order.html input_source_dir_1 input_source_dir_2 ... '
- 'output_file' % argv[0])
- return 1
-
- output_file_name = argv.pop()
- input_order_file_name = argv[1]
- extractor = OrderedJSFilesExtractor(input_order_file_name)
- expander = PathExpander(argv[2:])
- output = StringIO()
-
- for input_file_name in extractor.ordered_js_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, input_order_file_name))
- output.write('/* %s */\n\n' % input_file_name)
- input_file = open(full_path, 'r')
- output.write(input_file.read())
- output.write('\n')
- input_file.close()
-
- output_file = open(output_file_name, 'w')
- output_file.write(output.getvalue())
- output_file.close()
- output.close()
-
- # Touch output file directory to make sure that Xcode will copy
- # modified resource files.
- if sys.platform == 'darwin':
- output_dir_name = os.path.dirname(output_file_name)
- os.utime(output_dir_name, None)
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))
diff --git a/webkit/build/generate_devtools_html.py b/webkit/build/generate_devtools_html.py
deleted file mode 100755
index 59aeee3..0000000
--- a/webkit/build/generate_devtools_html.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/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 ignored inspector_html devtools_html'
- ' css_and_js_files_list' % argv[0])
- return 1
-
- # The first argument is ignored. We put 'webkit.gyp' in the inputs list
- # for this script, so every time the list of script gets changed, our html
- # file is rebuilt.
- inspector_html_name = argv[2]
- devtools_html_name = argv[3]
- inspector_html = open(inspector_html_name, 'r')
- devtools_html = open(devtools_html_name, '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[4:]:
- devtools_html.write(GenerateIncludeTag(resource))
- devtools_html.write(' <!-- End of auto-added files list -->\n')
- devtools_html.write(line)
-
- devtools_html.close()
- inspector_html.close()
-
- # Touch output file directory to make sure that Xcode will copy
- # modified resource files.
- if sys.platform == 'darwin':
- output_dir_name = os.path.dirname(devtools_html_name)
- os.utime(output_dir_name, None)
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv))