Index: tools/dom/scripts/htmlrenamer.py |
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py |
index 998cbeddb4a974eca0e19f28f32302ff8884cdc9..bb1149b7f69e235dbb5b3a9f764427c93ed514ee 100644 |
--- a/tools/dom/scripts/htmlrenamer.py |
+++ b/tools/dom/scripts/htmlrenamer.py |
@@ -6,7 +6,23 @@ import logging |
import monitored |
import re |
-html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', { |
+typed_array_renames = { |
+ 'ArrayBuffer': 'ByteBuffer', |
+ 'ArrayBufferView': 'TypedData', |
+ 'DataView': 'ByteData', |
+ 'Float32Array': 'Float32List', |
+ 'Float64Array': 'Float64List', |
+ 'Int8Array': 'Int8List', |
+ 'Int16Array': 'Int16List', |
+ 'Int32Array': 'Int32List', |
+ 'Uint8Array': 'Uint8List', |
+ 'Uint8ClampedArray': 'Uint8ClampedList', |
+ 'Uint16Array': 'Uint16List', |
+ 'Uint32Array': 'Uint32List', |
+} |
+ |
+html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', |
+ dict({ |
'CDATASection': 'CDataSection', |
'Clipboard': 'DataTransfer', |
'Database': 'SqlDatabase', # Avoid conflict with Index DB's Database. |
@@ -50,7 +66,7 @@ html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', { |
'XMLHttpRequestException': 'HttpRequestException', |
'XMLHttpRequestProgressEvent': 'HttpRequestProgressEvent', |
'XMLHttpRequestUpload': 'HttpRequestUpload', |
-}) |
+}, **typed_array_renames)) |
# Interfaces that are suppressed, but need to still exist for Dartium and to |
# properly wrap DOM objects if/when encountered. |
@@ -60,6 +76,7 @@ _removed_html_interfaces = [ |
'Counter', |
'DOMFileSystemSync', # Workers |
'DatabaseSync', # Workers |
+ 'DataView', # Typed arrays |
'DedicatedWorkerContext', # Workers |
'DirectoryEntrySync', # Workers |
'DirectoryReaderSync', # Workers |
@@ -326,8 +343,8 @@ renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', { |
'StorageInfo.queryUsageAndQuota': '_queryUsageAndQuota', |
'SVGElement.className': '$dom_svgClassName', |
'SVGStopElement.offset': 'gradientOffset', |
- #'WorkerContext.webkitRequestFileSystem': '_requestFileSystem', # Workers |
- #'WorkerContext.webkitRequestFileSystemSync': '_requestFileSystemSync', # Workers |
+ #'WorkerContext.webkitRequestFileSystem': '_requestFileSystem', |
+ #'WorkerContext.webkitRequestFileSystemSync': '_requestFileSystemSync', |
}) |
for member in convert_to_future_members: |
@@ -720,6 +737,9 @@ class HtmlRenamer(object): |
if 'WEBGL' in interface.ext_attrs['Conditional']: |
return 'web_gl' |
+ if interface.id in typed_array_renames: |
+ return 'typeddata' |
+ |
return 'html' |
def DartifyTypeName(self, type_name): |