Chromium Code Reviews| 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) |