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

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

Issue 8894029: Generate EventListener attributes of non-EventTarget classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 9 years 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 | « client/dom/idl/dart/webkit-supplemental.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/dartgenerator.py
diff --git a/client/dom/scripts/dartgenerator.py b/client/dom/scripts/dartgenerator.py
index 556e1dd8f804733b011cecaafaf1b784ae0c858c..e39075cae44c780f5243d27684ba0175abc354f8 100755
--- a/client/dom/scripts/dartgenerator.py
+++ b/client/dom/scripts/dartgenerator.py
@@ -733,7 +733,10 @@ class DartGenerator(object):
generator.AddConstant(const)
for attr in sorted(interface.attributes, AttributeOutputOrder):
- if attr.type.id == 'EventListener': continue
+ if attr.type.id == 'EventListener':
+ # Remove EventListener attributes when addEventListener is available.
+ if 'EventTarget' in self._AllImplementedInterfaces(interface):
+ continue
if attr.is_fc_getter:
for generator in generators:
generator.AddGetter(attr)
@@ -1129,6 +1132,8 @@ class DartGenerator(object):
"""Returns a list of the names of all interfaces implemented by 'interface'.
List includes the name of 'interface'.
"""
+ if not self._inheritance_closure:
+ self._ComputeInheritanceClosure()
return self._inheritance_closure[interface.id]
def _GenerateProtoMap(self):
« no previous file with comments | « client/dom/idl/dart/webkit-supplemental.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698