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

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

Issue 9106002: Revert "Revert "Refresh dart:dom"" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix dartc issues Created 8 years, 12 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: client/dom/scripts/databasebuilder.py
diff --git a/client/dom/scripts/databasebuilder.py b/client/dom/scripts/databasebuilder.py
index 5132ecbf5dcab9df65655b1be67f68abff8042c1..8da31476ecd9f5ba1d0c65351a97aaab7e7dcfc9 100755
--- a/client/dom/scripts/databasebuilder.py
+++ b/client/dom/scripts/databasebuilder.py
@@ -430,21 +430,25 @@ class DatabaseBuilder(object):
# Step 2: Add all new interfaces and merge overlapping ones
for interface, module_name, import_options in self._imported_interfaces:
- if not self._database.HasInterface(interface.id):
- if import_options.add_new_interfaces:
- self._database.AddInterface(interface)
- elif not interface.is_supplemental:
- old_interface = self._database.GetInterface(interface.id)
- self._merge_interfaces(old_interface, interface,
- import_options)
+ if not interface.is_supplemental:
+ if self._database.HasInterface(interface.id):
+ old_interface = self._database.GetInterface(interface.id)
+ self._merge_interfaces(old_interface, interface, import_options)
+ else:
+ if import_options.add_new_interfaces:
+ self._database.AddInterface(interface)
# Step 3: Merge in supplemental interfaces
for interface, module_name, import_options in self._imported_interfaces:
- if (interface.is_supplemental
- and self._database.HasInterface(interface.id)):
- old_interface = self._database.GetInterface(interface.id)
- self._merge_interfaces(old_interface, interface,
- import_options)
+ if interface.is_supplemental:
+ # For now, ignore WebKit [Supplemental=BaseInterface] attributes.
+ target = interface.ext_attrs['Supplemental']
+ if target:
+ continue
+ target = interface.id
+ if self._database.HasInterface(target):
+ old_interface = self._database.GetInterface(target)
+ self._merge_interfaces(old_interface, interface, import_options)
# Step 4: Resolve 'implements' statements
for impl_stmt, import_options in self._impl_stmts:
« no previous file with comments | « client/dom/scripts/dartgenerator.py ('k') | client/dom/scripts/template_interface_AudioContext.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698