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

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

Issue 14367012: Move to new dart:typeddata types for dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert generated files for html lib Created 7 years, 8 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 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):

Powered by Google App Engine
This is Rietveld 408576698