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

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

Issue 11340013: Do not add secondary interfaces implemented by parents. (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
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/scripts/systemhtml.py
diff --git a/lib/html/scripts/systemhtml.py b/lib/html/scripts/systemhtml.py
index ab52d3c2be96f732d50d2893a6945c2f71281ce8..66656b83273ec11fb98872408d9f3b145d4e7c3b 100644
--- a/lib/html/scripts/systemhtml.py
+++ b/lib/html/scripts/systemhtml.py
@@ -555,22 +555,31 @@ class HtmlDartInterfaceGenerator(object):
def walk(parents):
for parent in parents:
if IsDartCollectionType(parent.type.id):
- result.append(parent.type.id)
+ result.add(parent.type.id)
continue
if self._database.HasInterface(parent.type.id):
parent_interface = self._database.GetInterface(parent.type.id)
- result.append(parent_interface)
+ result.add(parent_interface)
walk(parent_interface.parents)
- result = []
+ result = set()
if interface.parents:
parent = interface.parents[0]
if IsPureInterface(parent.type.id):
walk(interface.parents)
else:
walk(interface.parents[1:])
+ while self._database.HasInterface(parent.type.id):
podivilov 2012/10/30 13:43:49 EventTarget is an extended attribute in idls, not
Anton Muhin 2012/10/30 13:45:09 I am not sure it's a hack. And even though curren
podivilov 2012/10/30 13:55:42 It's a hack because we agreed that IDL AST should
Anton Muhin 2012/10/30 14:05:01 WebKit IDLs has many peculiarities, for example, a
podivilov 2012/10/30 14:12:15 I think the rule of thumb is we shouldn't be more
+ parent_interface = self._database.GetInterface(parent.type.id)
+ result.discard(parent_interface)
+ result -= self._TransitiveSecondaryParents(parent_interface)
+ if not parent_interface.parents:
+ break
+ parent = parent_interface.parents[0]
+
return result
+
def _DartType(self, type_name):
return self._type_registry.DartType(type_name)
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698