Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Unified Diff: lib/html/scripts/databasebuilder.py

Issue 11033024: Get rid of webkit renames. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/html/scripts/databasebuilder.py
diff --git a/lib/html/scripts/databasebuilder.py b/lib/html/scripts/databasebuilder.py
index d5bd85d58f349ca338a5c180198d7492b32cd8e3..9b1dcf3f4f437449ba2c9c28cb30d7576cf3c364 100755
--- a/lib/html/scripts/databasebuilder.py
+++ b/lib/html/scripts/databasebuilder.py
@@ -33,7 +33,6 @@ class DatabaseBuilderOptions(object):
idl_syntax=idlparser.WEBIDL_SYNTAX,
idl_defines=[],
source=None, source_attributes={},
- type_rename_map={},
rename_operation_arguments_on_merge=False,
add_new_interfaces=True,
obsolete_old_declarations=False):
@@ -57,7 +56,6 @@ class DatabaseBuilderOptions(object):
self.source_attributes = source_attributes
self.idl_syntax = idl_syntax
self.idl_defines = idl_defines
- self.type_rename_map = type_rename_map
self.rename_operation_arguments_on_merge = \
rename_operation_arguments_on_merge
self.add_new_interfaces = add_new_interfaces
@@ -117,12 +115,7 @@ class DatabaseBuilder(object):
"""Rename interface and type names with names provided in the
options. Also clears scopes from scoped names"""
- def rename(name):
- name_parts = name.split('::')
- name = name_parts[-1]
- if name in import_options.type_rename_map:
- name = import_options.type_rename_map[name]
- return name
+ rename = lambda name: name.split('::')[-1]
Anton Muhin 2012/10/04 14:39:23 I don't think it's rename now, it's just fetches i
podivilov 2012/10/04 16:15:46 Done.
def rename_node(idl_node):
idl_node.reset_id(rename(idl_node.id))
@@ -570,7 +563,7 @@ class DatabaseBuilder(object):
map(normalize, interface.operations)
def fetch_constructor_data(self, options):
- window_interface = self._database.GetInterface('Window')
+ window_interface = self._database.GetInterface('DOMWindow')
for attr in window_interface.attributes:
type = attr.type.id
if not type.endswith('Constructor'):
@@ -579,7 +572,7 @@ class DatabaseBuilder(object):
# TODO(antonm): Ideally we'd like to have pristine copy of WebKit IDLs and fetch
# this information directly from it. Unfortunately right now database is massaged
# a lot so it's difficult to maintain necessary information on DOMWindow itself.
- interface = self._database.GetInterface(options.type_rename_map.get(type, type))
+ interface = self._database.GetInterface(type)
if 'V8EnabledPerContext' in attr.ext_attrs:
interface.ext_attrs['synthesizedV8EnabledPerContext'] = \
attr.ext_attrs['V8EnabledPerContext']

Powered by Google App Engine
This is Rietveld 408576698