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

Unified Diff: tools/dom/scripts/idlnode.py

Issue 204033002: Fixes for Chrome 34 merge (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | « tools/dom/scripts/htmlrenamer.py ('k') | tools/dom/scripts/idlparser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/idlnode.py
diff --git a/tools/dom/scripts/idlnode.py b/tools/dom/scripts/idlnode.py
index 9957b359c198e98c6a25c3ed5b7e5bc321dbe3cd..8684071c1dfd8f1e1eab54cfeda6f531da70823a 100755
--- a/tools/dom/scripts/idlnode.py
+++ b/tools/dom/scripts/idlnode.py
@@ -7,6 +7,12 @@ import os
import sys
+_operation_suffix_map = {
+ '__getter__': "Getter",
+ '__setter__': "Setter",
+ '__delete__': "Deleter",
+}
+
class IDLNode(object):
"""Base class for all IDL elements.
IDLNode may contain various child nodes, and have properties. Examples
@@ -493,6 +499,11 @@ class IDLOperation(IDLMember):
else:
raise Exception('Cannot handle %s: operation has no id' % ast)
+ if len(self.arguments) >= 1 and (self.id in _operation_suffix_map) and not self.ext_attrs.get('ImplementedAs'):
+ arg = self.arguments[0]
+ operation_category = 'Named' if arg.type.id == 'DOMString' else 'Indexed'
+ self.ext_attrs.setdefault('ImplementedAs', 'anonymous%s%s' % (operation_category, _operation_suffix_map[self.id]))
+
def _extra_repr(self):
return [self.arguments]
« no previous file with comments | « tools/dom/scripts/htmlrenamer.py ('k') | tools/dom/scripts/idlparser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698