Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 import database | 6 import database |
| 7 import databasebuilder | 7 import databasebuilder |
| 8 import idlparser | 8 import idlparser |
| 9 import logging.config | 9 import logging.config |
| 10 import os.path | 10 import os.path |
| 11 import sys | 11 import sys |
| 12 | 12 |
| 13 _logger = logging.getLogger('fremontcutbuilder') | 13 _logger = logging.getLogger('fremontcutbuilder') |
| 14 | 14 |
| 15 FEATURE_DISABLED = [ | 15 FEATURE_DISABLED = [ |
| 16 'ENABLE_BATTERY_STATUS', | 16 'ENABLE_BATTERY_STATUS', |
| 17 'ENABLE_CSS3_CONDITIONAL_RULES', | 17 'ENABLE_CANVAS_USES_MAILBOX', |
|
Anton Muhin
2013/05/17 18:21:03
it is surprisingly too many flags coming into disa
vsm
2013/05/17 18:32:51
These are ENABLE_* flags that appear in features.g
Anton Muhin
2013/05/20 12:23:50
I think we should only use defines which are used
vsm
2013/05/20 14:52:52
I see no warnings from those lines ... but there s
| |
| 18 'ENABLE_CSS3_TEXT', | |
| 19 'ENABLE_CSS_COMPOSITING', | |
| 18 'ENABLE_CSS_DEVICE_ADAPTATION', | 20 'ENABLE_CSS_DEVICE_ADAPTATION', |
| 19 'ENABLE_CUSTOM_SCHEME_HANDLER', | 21 'ENABLE_CUSTOM_SCHEME_HANDLER', |
| 20 'ENABLE_ENCRYPTED_MEDIA_V2', | 22 'ENABLE_ENCRYPTED_MEDIA_V2', |
| 21 'ENABLE_MEDIA_CAPTURE', # Only enabled on Android. | 23 'ENABLE_MEDIA_CAPTURE', # Only enabled on Android. |
| 22 'ENABLE_ORIENTATION_EVENTS', # Only enabled on Android. | 24 'ENABLE_ORIENTATION_EVENTS', # Only enabled on Android. |
| 23 'ENABLE_SPEECH_SYNTHESIS', | 25 'ENABLE_RESOLUTION_MEDIA_QUERY', |
| 26 'ENABLE_TOUCH_ICON_LOADING', # Only enabled on Android | |
| 24 'ENABLE_WEBVTT_REGIONS', | 27 'ENABLE_WEBVTT_REGIONS', |
| 25 'ENABLE_XHR_TIMEOUT', | 28 'ENABLE_XHR_TIMEOUT', |
| 26 ] | 29 ] |
| 27 | 30 |
| 28 FEATURE_DEFINES = [ | 31 FEATURE_DEFINES = [ |
| 29 'ENABLE_CALENDAR_PICKER', | 32 'ENABLE_3D_PLUGIN', |
| 30 'ENABLE_CANVAS_PROXY', | 33 'ENABLE_CALENDAR_PICKER', # Not on Android |
| 34 'ENABLE_CHANNEL_MESSAGING', | |
| 35 'ENABLE_CSS_EXCLUSIONS', | |
| 36 'ENABLE_CSS_IMAGE_SET', | |
| 31 'ENABLE_CSS_REGIONS', | 37 'ENABLE_CSS_REGIONS', |
| 32 'ENABLE_CUSTOM_ELEMENTS', | 38 'ENABLE_DATALIST_ELEMENT', # Not on Android |
| 33 'ENABLE_DATALIST_ELEMENT', | |
| 34 'ENABLE_DIALOG_ELEMENT', | |
| 35 'ENABLE_ENCRYPTED_MEDIA', | 39 'ENABLE_ENCRYPTED_MEDIA', |
| 36 'ENABLE_FONT_LOAD_EVENTS', | 40 'ENABLE_INPUT_SPEECH', # Not on Android |
| 37 'ENABLE_GAMEPAD', | 41 'ENABLE_INPUT_TYPE_COLOR', # Not on Android |
| 38 'ENABLE_INPUT_SPEECH', | 42 'ENABLE_INPUT_MULTIPLE_FIELDS_UI', # Not on Android |
| 39 'ENABLE_LEGACY_NOTIFICATIONS', | 43 'ENABLE_LEGACY_NOTIFICATIONS', # Not on Android |
| 40 'ENABLE_MEDIA_STREAM', | 44 'ENABLE_MEDIA_STREAM', |
| 41 'ENABLE_NAVIGATOR_CONTENT_UTILS', | 45 'ENABLE_NAVIGATOR_CONTENT_UTILS', # Not on Android |
| 42 'ENABLE_NOTIFICATIONS', | 46 'ENABLE_NOTIFICATIONS', # Not on Android |
| 43 'ENABLE_PAGE_POPUP', | 47 'ENABLE_PAGE_POPUP', # Not on Android |
| 44 'ENABLE_SHARED_WORKERS', | 48 'ENABLE_PRINTING', # Not on Android |
| 49 'ENABLE_RUBY', | |
| 50 'ENABLE_SANDBOX', | |
| 45 'ENABLE_SVG', | 51 'ENABLE_SVG', |
| 46 'ENABLE_SVG_FONTS', | 52 'ENABLE_SVG_FONTS', |
| 47 'ENABLE_VIDEO', | 53 'ENABLE_WEB_AUDIO', # Not on Android |
| 48 'ENABLE_WEB_AUDIO', | |
| 49 'ENABLE_WEBGL', | 54 'ENABLE_WEBGL', |
| 50 ] | 55 ] |
| 51 | 56 |
| 52 def build_database(idl_files, database_dir, feature_defines=None, parallel=False ): | 57 def build_database(idl_files, database_dir, feature_defines=None, parallel=False ): |
| 53 """This code reconstructs the FremontCut IDL database from W3C, | 58 """This code reconstructs the FremontCut IDL database from W3C, |
| 54 WebKit and Dart IDL files.""" | 59 WebKit and Dart IDL files.""" |
| 55 current_dir = os.path.dirname(__file__) | 60 current_dir = os.path.dirname(__file__) |
| 56 logging.config.fileConfig(os.path.join(current_dir, "logging.conf")) | 61 logging.config.fileConfig(os.path.join(current_dir, "logging.conf")) |
| 57 | 62 |
| 58 db = database.Database(database_dir) | 63 db = database.Database(database_dir) |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 if ext == '.idl': | 151 if ext == '.idl': |
| 147 idl_files.append(file_name) | 152 idl_files.append(file_name) |
| 148 | 153 |
| 149 os.path.walk(webcore_dir, visitor, webcore_dir) | 154 os.path.walk(webcore_dir, visitor, webcore_dir) |
| 150 | 155 |
| 151 database_dir = os.path.join(current_dir, '..', 'database') | 156 database_dir = os.path.join(current_dir, '..', 'database') |
| 152 return build_database(idl_files, database_dir, parallel=parallel) | 157 return build_database(idl_files, database_dir, parallel=parallel) |
| 153 | 158 |
| 154 if __name__ == '__main__': | 159 if __name__ == '__main__': |
| 155 sys.exit(main()) | 160 sys.exit(main()) |
| OLD | NEW |