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

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

Issue 12929005: dart:typeddata for dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert status change Created 7 years, 9 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 134eceb15eb268c5cee5f175add0f9e86cee8ad4..a8891420ead038e84476bfc4de31395e7c79ed3d 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.
@@ -55,7 +71,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.
@@ -318,6 +334,11 @@ renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', {
'resolveLocalFileSystemSyncUrl',
'WorkerContext.webkitResolveLocalFileSystemURL':
'resolveLocalFileSystemUrl',
+
+ # Typed array renames
+ 'ArrayBuffer.byteLength': 'lengthInBytes',
+ 'ArrayBufferView.byteLength': 'lengthInBytes',
+ 'ArrayBufferView.byteOffset': 'offsetInBytes',
})
for member in convert_to_future_members:
@@ -676,6 +697,8 @@ class HtmlRenamer(object):
# WorkerContext has attributes merged in from many other interfaces.
if interface.id != 'WorkerContext':
return 'web_sql'
+ if interface.id in typed_array_renames:
+ return 'typeddata'
return 'html'

Powered by Google App Engine
This is Rietveld 408576698