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

Unified Diff: dart/tools/dom/scripts/htmlrenamer.py

Issue 56933002: Version 0.8.10.1 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | « dart/tools/dom/dom.json ('k') | dart/tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/dom/scripts/htmlrenamer.py
===================================================================
--- dart/tools/dom/scripts/htmlrenamer.py (revision 29785)
+++ dart/tools/dom/scripts/htmlrenamer.py (working copy)
@@ -474,6 +474,8 @@
# Syntax is: ClassName.(get\:|set\:|call\:|on\:)?MemberName
# Using get: and set: is optional and should only be used when a getter needs
# to be suppressed but not the setter, etc.
+# Prepending ClassName with = will only match against direct class, not for
+# subclasses.
# TODO(jacobr): cleanup and augment this list.
removed_html_members = monitored.Set('htmlrenamer.removed_html_members', [
'AudioBufferSourceNode.looping', # TODO(vsm): Use deprecated IDL annotation
@@ -594,7 +596,7 @@
'Element.webkitCreateShadowRoot',
'Element.webkitPseudo',
'Element.webkitShadowRoot',
- 'Event.returnValue',
+ '=Event.returnValue', # Only suppress on Event, allow for BeforeUnloadEvnt.
'Event.srcElement',
'EventSource.URL',
'FontFaceSet.load',
@@ -845,17 +847,27 @@
return True
def _FindMatch(self, interface, member, member_prefix, candidates):
- for interface in self._database.Hierarchy(interface):
- member_name = interface.id + '.' + member
+ def find_match(interface_id):
+ member_name = interface_id + '.' + member
if member_name in candidates:
return member_name
- member_name = interface.id + '.' + member_prefix + member
+ member_name = interface_id + '.' + member_prefix + member
if member_name in candidates:
return member_name
- member_name = interface.id + '.*'
+ member_name = interface_id + '.*'
if member_name in candidates:
return member_name
+ # Check direct matches first
+ match = find_match('=%s' % interface.id)
+ if match:
+ return match
+
+ for interface in self._database.Hierarchy(interface):
+ match = find_match(interface.id)
+ if match:
+ return match
+
def GetLibraryName(self, interface):
# Some types have attributes merged in from many other interfaces.
if interface.id in _library_names:
« no previous file with comments | « dart/tools/dom/dom.json ('k') | dart/tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698