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/idlnode.py

Issue 10987042: Speed up fremontcut/dartdomgenerator (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 8 years, 3 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/scripts/go.sh ('k') | lib/html/scripts/systembase.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/scripts/idlnode.py
diff --git a/lib/html/scripts/idlnode.py b/lib/html/scripts/idlnode.py
index 238ec8beac1156af2bfc885bc559d535e127938f..78093679e9253b2625755284661ea8d55ba5a4b0 100755
--- a/lib/html/scripts/idlnode.py
+++ b/lib/html/scripts/idlnode.py
@@ -46,6 +46,11 @@ class IDLNode(object):
return 1
return self.__dict__.__cmp__(other.__dict__)
+ def reset_id(self, newId):
+ """Reset the id of the Node. This is typically done during a normalization
+ phase (e.g., "DOMWindow" -> "Window")."""
+ self.id = newId
+
def all(self, type_filter=None):
"""Returns a list containing this node and all it child nodes
(recursive).
@@ -386,6 +391,19 @@ class IDLInterface(IDLNode):
self.is_no_interface_object = 'NoInterfaceObject' in self.ext_attrs
self.is_fc_suppressed = 'Suppressed' in self.ext_attrs
+ def reset_id(self, new_id):
+ """Reset the id of the Interface and corresponding the JS names."""
+ if self.id != new_id:
+ self.id = new_id
+ self.doc_js_name = new_id
+ self.javascript_binding_name = new_id
+ for member in self.operations:
+ member.doc_js_interface_name = new_id
+ for member in self.attributes:
+ member.doc_js_interface_name = new_id
+ for member in self.constants:
+ member.doc_js_interface_name = new_id
+
def has_attribute(self, candidate):
for attribute in self.attributes:
if (attribute.id == candidate.id and
« no previous file with comments | « lib/html/scripts/go.sh ('k') | lib/html/scripts/systembase.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698