| Index: lib/dom/scripts/fremontcutbuilder.py
|
| diff --git a/lib/dom/scripts/fremontcutbuilder.py b/lib/dom/scripts/fremontcutbuilder.py
|
| index f351466b4d4abe9f75261ac31ac6d0143129077f..c2bb51cf38a02967110ee0e2623ea1f647ee68da 100755
|
| --- a/lib/dom/scripts/fremontcutbuilder.py
|
| +++ b/lib/dom/scripts/fremontcutbuilder.py
|
| @@ -11,7 +11,80 @@ import os.path
|
| import tempfile
|
| import sys
|
|
|
| -def build_database(idl_list_file_name, database_dir):
|
| +# TODO(antonm): most probably should go away or be autogenerated on IDLs roll.
|
| +DEFAULT_FEATURE_DEFINES = [
|
| + # Enabled Chrome WebKit build.
|
| + 'ENABLE_3D_PLUGIN',
|
| + 'ENABLE_3D_RENDERING',
|
| + 'ENABLE_ACCELERATED_2D_CANVAS',
|
| + 'ENABLE_BATTERY_STATUS',
|
| + 'ENABLE_BLOB',
|
| + 'ENABLE_BLOB_SLICE',
|
| + 'ENABLE_CALENDAR_PICKER',
|
| + 'ENABLE_CHANNEL_MESSAGING',
|
| + 'ENABLE_CSS_FILTERS',
|
| + 'ENABLE_CSS_SHADERS',
|
| + 'ENABLE_DATA_TRANSFER_ITEMS',
|
| + 'ENABLE_DETAILS',
|
| + 'ENABLE_DEVICE_ORIENTATION',
|
| + 'ENABLE_DIRECTORY_UPLOAD',
|
| + 'ENABLE_DOWNLOAD_ATTRIBUTE',
|
| + 'ENABLE_FILE_SYSTEM',
|
| + 'ENABLE_FILTERS',
|
| + 'ENABLE_FULLSCREEN_API',
|
| + 'ENABLE_GAMEPAD',
|
| + 'ENABLE_GEOLOCATION',
|
| + 'ENABLE_GESTURE_EVENTS',
|
| + 'ENABLE_INDEXED_DATABASE',
|
| + 'ENABLE_INPUT_SPEECH',
|
| + 'ENABLE_INPUT_TYPE_COLOR',
|
| + 'ENABLE_JAVASCRIPT_DEBUGGER',
|
| + 'ENABLE_JAVASCRIPT_I18N_API',
|
| + 'ENABLE_LEGACY_NOTIFICATIONS',
|
| + 'ENABLE_LINK_PREFETCH',
|
| + 'ENABLE_MEDIA_SOURCE',
|
| + 'ENABLE_MEDIA_STATISTICS',
|
| + 'ENABLE_MEDIA_STREAM',
|
| + 'ENABLE_METER_TAG',
|
| + 'ENABLE_MHTML',
|
| + 'ENABLE_MUTATION_OBSERVERS',
|
| + 'ENABLE_NOTIFICATIONS',
|
| + 'ENABLE_OVERFLOW_SCROLLING',
|
| + 'ENABLE_PAGE_POPUP',
|
| + 'ENABLE_PAGE_VISIBILITY_API',
|
| + 'ENABLE_POINTER_LOCK',
|
| + 'ENABLE_PROGRESS_TAG',
|
| + 'ENABLE_QUOTA',
|
| + 'ENABLE_REGISTER_PROTOCOL_HANDLER',
|
| + 'ENABLE_REQUEST_ANIMATION_FRAME',
|
| + 'ENABLE_RUBY',
|
| + 'ENABLE_SANDBOX',
|
| + 'ENABLE_SCRIPTED_SPEECH',
|
| + 'ENABLE_SHADOW_DOM',
|
| + 'ENABLE_SHARED_WORKERS',
|
| + 'ENABLE_SMOOTH_SCROLLING',
|
| + 'ENABLE_SQL_DATABASE',
|
| + 'ENABLE_STYLE_SCOPED',
|
| + 'ENABLE_SVG',
|
| + 'ENABLE_SVG_FONTS',
|
| + 'ENABLE_TOUCH_EVENTS',
|
| + 'ENABLE_V8_SCRIPT_DEBUG_SERVER',
|
| + 'ENABLE_VIDEO',
|
| + 'ENABLE_VIDEO_TRACK',
|
| + 'ENABLE_WEBGL',
|
| + 'ENABLE_WEB_AUDIO',
|
| + 'ENABLE_WEB_INTENTS',
|
| + 'ENABLE_WEB_SOCKETS',
|
| + 'ENABLE_WEB_TIMING',
|
| + 'ENABLE_WORKERS',
|
| + 'ENABLE_XHR_RESPONSE_BLOB',
|
| + 'ENABLE_XSLT',
|
| +]
|
| +
|
| +# TODO(antonm): Remove this filter.
|
| +UNSUPPORTED_FEATURES = [ 'ENABLE_WEB_INTENTS' ]
|
| +
|
| +def build_database(idl_list_file_name, database_dir, feature_defines = None):
|
| """This code reconstructs the FremontCut IDL database from W3C,
|
| WebKit and Dart IDL files."""
|
| current_dir = os.path.dirname(__file__)
|
| @@ -30,75 +103,14 @@ def build_database(idl_list_file_name, database_dir):
|
|
|
| # TODO(vsm): Reconcile what is exposed here and inside WebKit code
|
| # generation. We need to recheck this periodically for now.
|
| - webkit_defines = [
|
| - 'LANGUAGE_DART',
|
| - 'LANGUAGE_JAVASCRIPT',
|
| -
|
| - # Enabled Chrome WebKit build.
|
| - 'ENABLE_3D_PLUGIN',
|
| - 'ENABLE_3D_RENDERING',
|
| - 'ENABLE_ACCELERATED_2D_CANVAS',
|
| - 'ENABLE_BATTERY_STATUS',
|
| - 'ENABLE_BLOB',
|
| - 'ENABLE_BLOB_SLICE',
|
| - 'ENABLE_CHANNEL_MESSAGING',
|
| - 'ENABLE_CLIENT_BASED_GEOLOCATION',
|
| - 'ENABLE_DATA_TRANSFER_ITEMS',
|
| - 'ENABLE_DETAILS',
|
| - 'ENABLE_DEVICE_ORIENTATION',
|
| - 'ENABLE_DIRECTORY_UPLOAD',
|
| - 'ENABLE_DOWNLOAD_ATTRIBUTE',
|
| - 'ENABLE_FILE_SYSTEM',
|
| - 'ENABLE_FILTERS',
|
| - 'ENABLE_FULLSCREEN_API',
|
| - 'ENABLE_GAMEPAD',
|
| - 'ENABLE_GEOLOCATION',
|
| - 'ENABLE_GESTURE_EVENTS',
|
| - 'ENABLE_GESTURE_RECOGNIZER',
|
| - 'ENABLE_INDEXED_DATABASE',
|
| - 'ENABLE_INPUT_SPEECH',
|
| - 'ENABLE_JAVASCRIPT_DEBUGGER',
|
| - 'ENABLE_JAVASCRIPT_I18N_API',
|
| - 'ENABLE_LINK_PREFETCH',
|
| - 'ENABLE_MEDIA_SOURCE',
|
| - 'ENABLE_MEDIA_STATISTICS',
|
| - 'ENABLE_MEDIA_STREAM',
|
| - 'ENABLE_METER_TAG',
|
| - 'ENABLE_MHTML',
|
| - 'ENABLE_MOUSE_LOCK_API',
|
| - 'ENABLE_MUTATION_OBSERVERS',
|
| - 'ENABLE_NOTIFICATIONS',
|
| - 'ENABLE_PAGE_VISIBILITY_API',
|
| - 'ENABLE_PROGRESS_TAG',
|
| - 'ENABLE_QUOTA',
|
| - 'ENABLE_REGISTER_PROTOCOL_HANDLER',
|
| - 'ENABLE_REQUEST_ANIMATION_FRAME',
|
| - 'ENABLE_RUBY',
|
| - 'ENABLE_SANDBOX',
|
| - 'ENABLE_SCRIPTED_SPEECH',
|
| - 'ENABLE_SHADOW_DOM',
|
| - 'ENABLE_SHARED_WORKERS',
|
| - 'ENABLE_SMOOTH_SCROLLING',
|
| - 'ENABLE_SPEECH_RECOGNITION',
|
| - 'ENABLE_SQL_DATABASE',
|
| - 'ENABLE_SVG',
|
| - 'ENABLE_SVG_FONTS',
|
| - 'ENABLE_TOUCH_EVENTS',
|
| - 'ENABLE_V8_SCRIPT_DEBUG_SERVER',
|
| - 'ENABLE_VIDEO',
|
| - 'ENABLE_VIDEO_TRACK',
|
| - 'ENABLE_WEBGL',
|
| - 'ENABLE_WEB_AUDIO',
|
| - 'ENABLE_WEB_SOCKETS',
|
| - 'ENABLE_WEB_TIMING',
|
| - 'ENABLE_WORKERS',
|
| - 'ENABLE_XHR_RESPONSE_BLOB',
|
| - 'ENABLE_XSLT',
|
| - ]
|
| + webkit_defines = [ 'LANGUAGE_DART', 'LANGUAGE_JAVASCRIPT' ]
|
| + if feature_defines is None:
|
| + feature_defines = DEFAULT_FEATURE_DEFINES
|
| +
|
| webkit_options = databasebuilder.DatabaseBuilderOptions(
|
| idl_syntax=idlparser.WEBKIT_SYNTAX,
|
| # TODO(vsm): What else should we define as on when processing IDL?
|
| - idl_defines=webkit_defines,
|
| + idl_defines=[define for define in webkit_defines + feature_defines if define not in UNSUPPORTED_FEATURES],
|
| source='WebKit',
|
| source_attributes={'revision': webkit_revision},
|
| type_rename_map={
|
|
|