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

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

Issue 54913005: Fixing the BeforeUnloadEvent (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
Index: tools/dom/scripts/htmlrenamer.py
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py
index 0db0feea3acf0167a71bc3c5c74fc561e536f187..f524c6a065401ec01648c969718afaa928ace807 100644
--- a/tools/dom/scripts/htmlrenamer.py
+++ b/tools/dom/scripts/htmlrenamer.py
@@ -594,7 +594,7 @@ removed_html_members = monitored.Set('htmlrenamer.removed_html_members', [
'Element.webkitCreateShadowRoot',
'Element.webkitPseudo',
'Element.webkitShadowRoot',
- 'Event.returnValue',
+ '!Event.returnValue',
Emily Fortuna 2013/10/31 22:03:42 accidental?
blois 2013/10/31 22:09:21 Nope- need to suppress returnValue on Event, but n
vsm 2013/10/31 22:15:41 Maybe '=Event' - I think the JS magic function has
blois 2013/10/31 22:36:09 Done.
'Event.srcElement',
'EventSource.URL',
'FontFaceSet.load',
@@ -845,17 +845,27 @@ class HtmlRenamer(object):
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:

Powered by Google App Engine
This is Rietveld 408576698