| Index: tools/dom/scripts/fremontcutbuilder.py
|
| diff --git a/tools/dom/scripts/fremontcutbuilder.py b/tools/dom/scripts/fremontcutbuilder.py
|
| index bb82b2674b6ca21f1ff11dec8201de50d2837e2b..8985a76f19cfb137f95634b0f4a134e324fb71b9 100755
|
| --- a/tools/dom/scripts/fremontcutbuilder.py
|
| +++ b/tools/dom/scripts/fremontcutbuilder.py
|
| @@ -10,24 +10,39 @@ import logging.config
|
| import os.path
|
| import sys
|
|
|
| -# 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',
|
| +FEATURE_DISABLED = [
|
| 'ENABLE_BATTERY_STATUS',
|
| + # Triage.
|
| + 'ENABLE_CANVAS_PATH',
|
| + 'ENABLE_CANVAS_PROXY',
|
| + 'ENABLE_CSS3_CONDITIONAL_RULES',
|
| + 'ENABLE_CSS_DEVICE_ADAPTATION',
|
| + 'ENABLE_CSS_REGIONS',
|
| + 'ENABLE_CUSTOM_ELEMENTS',
|
| + 'ENABLE_DIALOG_ELEMENT',
|
| + 'ENABLE_ENCRYPTED_MEDIA_V2',
|
| + 'ENABLE_FONT_LOAD_EVENTS',
|
| + 'ENABLE_INSPECTOR',
|
| + 'ENABLE_MEDIA_CAPTURE',
|
| + 'ENABLE_MICRODATA',
|
| + 'ENABLE_NAVIGATOR_CONTENT_UTILS',
|
| + 'ENABLE_ORIENTATION_EVENTS',
|
| + 'ENABLE_PERFORMANCE_TIMELINE',
|
| + 'ENABLE_PROXIMITY_EVENTS',
|
| + 'ENABLE_REQUEST_AUTOCOMPLETE',
|
| + 'ENABLE_RESOURCE_TIMING',
|
| + 'ENABLE_SPEECH_SYNTHESIS',
|
| + 'ENABLE_USER_TIMING',
|
| + 'ENABLE_VIDEO_TRACK ',
|
| + 'ENABLE_XHR_TIMEOUT'
|
| +]
|
| +
|
| +FEATURE_DEFINES = [
|
| 'ENABLE_BLOB',
|
| - 'ENABLE_BLOB_SLICE',
|
| 'ENABLE_CALENDAR_PICKER',
|
| - 'ENABLE_CHANNEL_MESSAGING',
|
| 'ENABLE_CSS_FILTERS',
|
| - 'ENABLE_CSS_IMAGE_SET',
|
| 'ENABLE_CSS_SHADERS',
|
| - 'ENABLE_DART',
|
| - 'ENABLE_DATA_TRANSFER_ITEMS',
|
| 'ENABLE_DATALIST_ELEMENT',
|
| - 'ENABLE_DETAILS',
|
| 'ENABLE_DETAILS_ELEMENT',
|
| 'ENABLE_DEVICE_ORIENTATION',
|
| 'ENABLE_DIRECTORY_UPLOAD',
|
| @@ -35,61 +50,39 @@ DEFAULT_FEATURE_DEFINES = [
|
| 'ENABLE_ENCRYPTED_MEDIA',
|
| '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_INPUT_TYPE_DATE',
|
| 'ENABLE_JAVASCRIPT_DEBUGGER',
|
| - 'ENABLE_JAVASCRIPT_I18N_API',
|
| 'ENABLE_LEGACY_NOTIFICATIONS',
|
| - 'ENABLE_LINK_PREFETCH',
|
| - 'ENABLE_MEDIA_SOURCE',
|
| 'ENABLE_MEDIA_STATISTICS',
|
| 'ENABLE_MEDIA_STREAM',
|
| 'ENABLE_METER_ELEMENT',
|
| - 'ENABLE_METER_TAG',
|
| - 'ENABLE_MHTML',
|
| 'ENABLE_NOTIFICATIONS',
|
| - 'ENABLE_OVERFLOW_SCROLLING',
|
| 'ENABLE_PAGE_POPUP',
|
| - 'ENABLE_PAGE_VISIBILITY_API',
|
| 'ENABLE_POINTER_LOCK',
|
| 'ENABLE_PROGRESS_ELEMENT',
|
| - '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_VIEWPORT',
|
| 'ENABLE_WEBGL',
|
| 'ENABLE_WEB_AUDIO',
|
| - 'ENABLE_WEB_INTENTS',
|
| 'ENABLE_WEB_SOCKETS',
|
| 'ENABLE_WEB_TIMING',
|
| 'ENABLE_WORKERS',
|
| - 'ENABLE_XHR_RESPONSE_BLOB',
|
| 'ENABLE_XSLT',
|
| ]
|
|
|
| -def build_database(idl_files, database_dir, feature_defines=None,
|
| - parallel=False):
|
| +def build_database(idl_files, database_dir, parallel=False):
|
| """This code reconstructs the FremontCut IDL database from W3C,
|
| WebKit and Dart IDL files."""
|
| current_dir = os.path.dirname(__file__)
|
| @@ -109,13 +102,11 @@ def build_database(idl_files, database_dir, feature_defines=None,
|
| # 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' ]
|
| - 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 + feature_defines,
|
| + idl_defines=webkit_defines + FEATURE_DEFINES,
|
| source='WebKit',
|
| source_attributes={'revision': webkit_revision})
|
|
|
| @@ -142,6 +133,20 @@ def build_database(idl_files, database_dir, feature_defines=None,
|
| # Cleanup:
|
| builder.normalize_annotations(['WebKit', 'Dart'])
|
|
|
| + conditionals_met = set(
|
| + 'ENABLE_' + conditional for conditional in builder.conditionals_met)
|
| + known_conditionals = set(FEATURE_DEFINES + FEATURE_DISABLED)
|
| +
|
| + unused_conditionals = known_conditionals - conditionals_met
|
| + if unused_conditionals:
|
| + raise Exception('There are some unused conditionals %s' %
|
| + sorted(unused_conditionals))
|
| +
|
| + unknown_conditionals = conditionals_met - known_conditionals
|
| + if unknown_conditionals:
|
| + raise Exception('There are some unknown conditionals %s' %
|
| + sorted(unknown_conditionals))
|
| +
|
| db.Save()
|
| return db
|
|
|
| @@ -159,8 +164,15 @@ def main(parallel=False):
|
| if not os.path.exists(webcore_dir):
|
| raise RuntimeError('directory not found: %s' % webcore_dir)
|
|
|
| + DIRS_TO_IGNORE = [
|
| + 'bindings', # Various test IDLs
|
| + 'testing', # IDLs to expose testing APIs
|
| + 'networkinfo', # Not yet used in Blink yet
|
| + 'vibration', # Not yet used in Blink yet
|
| + ]
|
| +
|
| def visitor(arg, dir_name, names):
|
| - if os.path.basename(dir_name) in ['bindings', 'testing']:
|
| + if os.path.basename(dir_name) in DIRS_TO_IGNORE:
|
| names[:] = [] # Do not go underneath
|
| for name in names:
|
| file_name = os.path.join(dir_name, name)
|
|
|