Chromium Code Reviews| Index: lib/dom/scripts/databasebuilder.py |
| diff --git a/lib/dom/scripts/databasebuilder.py b/lib/dom/scripts/databasebuilder.py |
| index d5e799688c2d49f0ba275a9dd77c9f0e3cd84fef..f5c20513e4430a1499e10b9348426ef7275dd983 100755 |
| --- a/lib/dom/scripts/databasebuilder.py |
| +++ b/lib/dom/scripts/databasebuilder.py |
| @@ -561,3 +561,25 @@ class DatabaseBuilder(object): |
| map(normalize, interface.constants) |
| map(normalize, interface.attributes) |
| map(normalize, interface.operations) |
| + |
| + def fetch_constructor_data(self, options): |
|
podivilov
2012/06/25 14:06:42
Could you please move this logic to generation pha
|
| + window_interface = self._database.GetInterface('Window') |
| + for attr in window_interface.attributes: |
| + if not attr.is_fc_getter: |
| + continue |
| + type = attr.type.id |
| + if not type.endswith('Constructor'): |
| + continue |
| + type = type[:-len('Constructor')] |
| + # TODO: typos in WebKit IDL: HTMLImageElementConstructorConstructor... |
| + if type in [ |
| + 'HTMLAudioElementConstructor', |
| + 'HTMLImageElementConstructor', |
| + 'HTMLOptionElementConstructor' ]: |
| + type = type[:-len('Constructor')] |
| + |
| + interface = self._database.GetInterface(options.type_rename_map.get(type, type)) |
| + if 'V8EnabledPerContext' in attr.ext_attrs: |
| + interface.ext_attrs['V8EnabledPerContext'] = attr.ext_attrs['V8EnabledPerContext'] |
| + if 'V8EnabledAtRuntime' in attr.ext_attrs: |
| + interface.ext_attrs['V8EnabledAtRuntime'] = attr.ext_attrs['V8EnabledAtRuntime'] |