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

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

Issue 10636027: Support proper propagation of enabled per context and at runtime attributes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | lib/dom/scripts/fremontcutbuilder.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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']
« no previous file with comments | « no previous file | lib/dom/scripts/fremontcutbuilder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698