Index: tools/dom/scripts/htmlrenamer.py |
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py |
index 3d9f5a0573772d3dabf9be3e98fad3c83406536e..833c8e7429b436995c9450958c05ce0b3dff8175 100644 |
--- a/tools/dom/scripts/htmlrenamer.py |
+++ b/tools/dom/scripts/htmlrenamer.py |
@@ -156,15 +156,6 @@ convert_to_future_members = monitored.Set( |
'WorkerGlobalScope.webkitResolveLocalFileSystemURL', |
]) |
-# "Private" members in the form $dom_foo. |
-# TODO(efortuna): Remove this set. This allows us to make the change of removing |
-# $dom in installments instead of all at once, but the intent is to move all of |
-# these either into private_html_members or remove them from this list entirely. |
-dom_private_html_members = monitored.Set('htmlrenamer.private_html_members', [ |
- 'EventTarget.addEventListener', |
- 'EventTarget.removeEventListener', |
-]) |
- |
# Classes where we have customized constructors, but we need to keep the old |
# constructor for dispatch purposes. |
custom_html_constructors = monitored.Set( |
@@ -233,6 +224,8 @@ private_html_members = monitored.Set('htmlrenamer.private_html_members', [ |
'Element.innerHTML', |
'Element.querySelectorAll', |
'Event.initEvent', |
+ 'EventTarget.addEventListener', |
+ 'EventTarget.removeEventListener', |
'Geolocation.clearWatch', |
'Geolocation.getCurrentPosition', |
'Geolocation.watchPosition', |
@@ -767,8 +760,9 @@ _library_ids = monitored.Dict('htmlrenamer._library_names', { |
}) |
class HtmlRenamer(object): |
- def __init__(self, database): |
+ def __init__(self, database, metadata): |
self._database = database |
+ self._metadata = metadata |
def RenameInterface(self, interface): |
if 'Callback' in interface.ext_attrs: |
@@ -816,10 +810,6 @@ class HtmlRenamer(object): |
if self._FindMatch(interface, member, member_prefix, private_html_members): |
if not target_name.startswith('_'): # e.g. _svgClassName |
target_name = '_' + target_name |
- elif self._FindMatch(interface, member, member_prefix, |
- dom_private_html_members): |
- if not target_name.startswith('$dom_'): # e.g. $dom_svgClassName |
- target_name = '$dom_' + target_name |
if not name and target_name.startswith('webkit'): |
target_name = member[len('webkit'):] |
@@ -835,6 +825,11 @@ class HtmlRenamer(object): |
return True |
if interface.id in _removed_html_interfaces: |
return True |
+ metadata_member = member |
+ if member_prefix == 'on:': |
+ metadata_member = 'on' + metadata_member.lower() |
+ if self._metadata.IsDeprecated(interface, metadata_member): |
+ return True |
return False |
def ShouldSuppressInterface(self, interface): |