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

Unified Diff: lib/html/dartium/html_dartium.dart

Issue 9950037: Fix factory dart:html typed array providers for dartium. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: suppress html/TypedArrays tests in ie Created 8 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:
Download patch
« no previous file with comments | « lib/dom/templates/html/frog/html_frog.darttemplate ('k') | lib/html/frog/html_frog.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dartium/html_dartium.dart
diff --git a/lib/html/dartium/html_dartium.dart b/lib/html/dartium/html_dartium.dart
index e5910a30c26c6b78f98d71f80393d3a2c6c8b633..1a8e35d3a5862a7129cdb725a195f49c26964e14 100644
--- a/lib/html/dartium/html_dartium.dart
+++ b/lib/html/dartium/html_dartium.dart
@@ -27700,7 +27700,7 @@ interface Float32Array extends ArrayBufferView, List<num> default _TypedArrayFac
Float32Array.fromList(List<num> list);
- Float32Array.fromBuffer(ArrayBuffer buffer);
+ Float32Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]);
static final int BYTES_PER_ELEMENT = 4;
@@ -27722,7 +27722,7 @@ interface Float64Array extends ArrayBufferView, List<num> default _TypedArrayFac
Float64Array.fromList(List<num> list);
- Float64Array.fromBuffer(ArrayBuffer buffer);
+ Float64Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]);
static final int BYTES_PER_ELEMENT = 8;
@@ -28605,7 +28605,7 @@ interface Int16Array extends ArrayBufferView, List<int> default _TypedArrayFacto
Int16Array.fromList(List<int> list);
- Int16Array.fromBuffer(ArrayBuffer buffer);
+ Int16Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]);
static final int BYTES_PER_ELEMENT = 2;
@@ -28627,7 +28627,7 @@ interface Int32Array extends ArrayBufferView, List<int> default _TypedArrayFacto
Int32Array.fromList(List<int> list);
- Int32Array.fromBuffer(ArrayBuffer buffer);
+ Int32Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]);
static final int BYTES_PER_ELEMENT = 4;
@@ -28649,7 +28649,7 @@ interface Int8Array extends ArrayBufferView, List<int> default _TypedArrayFactor
Int8Array.fromList(List<int> list);
- Int8Array.fromBuffer(ArrayBuffer buffer);
+ Int8Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]);
static final int BYTES_PER_ELEMENT = 1;
@@ -34513,7 +34513,7 @@ interface Uint16Array extends ArrayBufferView, List<int> default _TypedArrayFact
Uint16Array.fromList(List<int> list);
- Uint16Array.fromBuffer(ArrayBuffer buffer);
+ Uint16Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]);
static final int BYTES_PER_ELEMENT = 2;
@@ -34535,7 +34535,7 @@ interface Uint32Array extends ArrayBufferView, List<int> default _TypedArrayFact
Uint32Array.fromList(List<int> list);
- Uint32Array.fromBuffer(ArrayBuffer buffer);
+ Uint32Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]);
static final int BYTES_PER_ELEMENT = 4;
@@ -34557,7 +34557,7 @@ interface Uint8Array extends ArrayBufferView, List<int> default _TypedArrayFacto
Uint8Array.fromList(List<int> list);
- Uint8Array.fromBuffer(ArrayBuffer buffer);
+ Uint8Array.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]);
static final int BYTES_PER_ELEMENT = 1;
@@ -34579,7 +34579,7 @@ interface Uint8ClampedArray extends Uint8Array default _TypedArrayFactoryProvide
Uint8ClampedArray.fromList(List<int> list);
- Uint8ClampedArray.fromBuffer(ArrayBuffer buffer);
+ Uint8ClampedArray.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]);
final int length;
@@ -37361,39 +37361,75 @@ class _TypedArrayFactoryProvider {
factory Float32Array(int length) => _F32(length);
factory Float32Array.fromList(List<num> list) => _F32(ensureNative(list));
- factory Float32Array.fromBuffer(ArrayBuffer buffer) => _F32(buffer);
+ factory Float32Array.fromBuffer(ArrayBuffer buffer,
+ [int byteOffset = 0, int length]) {
+ if (length == null) return _F32_2(buffer, byteOffset);
+ return _F32_3(buffer, byteOffset, length);
+ }
factory Float64Array(int length) => _F64(length);
factory Float64Array.fromList(List<num> list) => _F64(ensureNative(list));
- factory Float64Array.fromBuffer(ArrayBuffer buffer) => _F64(buffer);
+ factory Float64Array.fromBuffer(ArrayBuffer buffer,
+ [int byteOffset = 0, int length]) {
+ if (length == null) return _F64_2(buffer, byteOffset);
+ return _F64_3(buffer, byteOffset, length);
+ }
factory Int8Array(int length) => _I8(length);
factory Int8Array.fromList(List<num> list) => _I8(ensureNative(list));
- factory Int8Array.fromBuffer(ArrayBuffer buffer) => _I8(buffer);
+ factory Int8Array.fromBuffer(ArrayBuffer buffer,
+ [int byteOffset = 0, int length]) {
+ if (length == null) return _I8_2(buffer, byteOffset);
+ return _I8_3(buffer, byteOffset, length);
+ }
factory Int16Array(int length) => _I16(length);
factory Int16Array.fromList(List<num> list) => _I16(ensureNative(list));
- factory Int16Array.fromBuffer(ArrayBuffer buffer) => _I16(buffer);
+ factory Int16Array.fromBuffer(ArrayBuffer buffer,
+ [int byteOffset = 0, int length]) {
+ if (length == null) return _I16_2(buffer, byteOffset);
+ return _I16_3(buffer, byteOffset, length);
+ }
factory Int32Array(int length) => _I32(length);
factory Int32Array.fromList(List<num> list) => _I32(ensureNative(list));
- factory Int32Array.fromBuffer(ArrayBuffer buffer) => _I32(buffer);
+ factory Int32Array.fromBuffer(ArrayBuffer buffer,
+ [int byteOffset = 0, int length]) {
+ if (length == null) return _I32_2(buffer, byteOffset);
+ return _I32_3(buffer, byteOffset, length);
+ }
factory Uint8Array(int length) => _U8(length);
factory Uint8Array.fromList(List<num> list) => _U8(ensureNative(list));
- factory Uint8Array.fromBuffer(ArrayBuffer buffer) => _U8(buffer);
+ factory Uint8Array.fromBuffer(ArrayBuffer buffer,
+ [int byteOffset = 0, int length]) {
+ if (length == null) return _U8_2(buffer, byteOffset);
+ return _U8_3(buffer, byteOffset, length);
+ }
factory Uint16Array(int length) => _U16(length);
factory Uint16Array.fromList(List<num> list) => _U16(ensureNative(list));
- factory Uint16Array.fromBuffer(ArrayBuffer buffer) => _U16(buffer);
+ factory Uint16Array.fromBuffer(ArrayBuffer buffer,
+ [int byteOffset = 0, int length]) {
+ if (length == null) return _U16_2(buffer, byteOffset);
+ return _U16_3(buffer, byteOffset, length);
+ }
factory Uint32Array(int length) => _U32(length);
factory Uint32Array.fromList(List<num> list) => _U32(ensureNative(list));
- factory Uint32Array.fromBuffer(ArrayBuffer buffer) => _U32(buffer);
+ factory Uint32Array.fromBuffer(ArrayBuffer buffer,
+ [int byteOffset = 0, int length]) {
+ if (length == null) return _U32_2(buffer, byteOffset);
+ return _U32_3(buffer, byteOffset, length);
+ }
factory Uint8ClampedArray(int length) => _U8C(length);
factory Uint8ClampedArray.fromList(List<num> list) => _U8C(ensureNative(list));
- factory Uint8ClampedArray.fromBuffer(ArrayBuffer buffer) => _U8C(buffer);
+ factory Uint8ClampedArray.fromBuffer(ArrayBuffer buffer,
+ [int byteOffset = 0, int length]) {
+ if (length == null) return _U8C_2(buffer, byteOffset);
+ return _U8C_3(buffer, byteOffset, length);
+ }
static Float32Array _F32(arg) => _wrap(new dom.Float32Array(arg));
static Float64Array _F64(arg) => _wrap(new dom.Float64Array(arg));
@@ -37405,6 +37441,26 @@ class _TypedArrayFactoryProvider {
static Uint32Array _U32(arg) => _wrap(new dom.Uint32Array(arg));
static Uint8ClampedArray _U8C(arg) => _wrap(new dom.Uint8ClampedArray(arg));
+ static Float32Array _F32_2(arg1, arg2) => _wrap(new dom.Float32Array(arg1, arg2));
+ static Float64Array _F64_2(arg1, arg2) => _wrap(new dom.Float64Array(arg1, arg2));
+ static Int8Array _I8_2(arg1, arg2) => _wrap(new dom.Int8Array(arg1, arg2));
+ static Int16Array _I16_2(arg1, arg2) => _wrap(new dom.Int16Array(arg1, arg2));
+ static Int32Array _I32_2(arg1, arg2) => _wrap(new dom.Int32Array(arg1, arg2));
+ static Uint8Array _U8_2(arg1, arg2) => _wrap(new dom.Uint8Array(arg1, arg2));
+ static Uint16Array _U16_2(arg1, arg2) => _wrap(new dom.Uint16Array(arg1, arg2));
+ static Uint32Array _U32_2(arg1, arg2) => _wrap(new dom.Uint32Array(arg1, arg2));
+ static Uint8ClampedArray _U8C_2(arg1, arg2) => _wrap(new dom.Uint8ClampedArray(arg1, arg2));
+
+ static Float32Array _F32_3(arg1, arg2, arg3) => _wrap(new dom.Float32Array(arg1, arg2, arg3));
+ static Float64Array _F64_3(arg1, arg2, arg3) => _wrap(new dom.Float64Array(arg1, arg2, arg3));
+ static Int8Array _I8_3(arg1, arg2, arg3) => _wrap(new dom.Int8Array(arg1, arg2, arg3));
+ static Int16Array _I16_3(arg1, arg2, arg3) => _wrap(new dom.Int16Array(arg1, arg2, arg3));
+ static Int32Array _I32_3(arg1, arg2, arg3) => _wrap(new dom.Int32Array(arg1, arg2, arg3));
+ static Uint8Array _U8_3(arg1, arg2, arg3) => _wrap(new dom.Uint8Array(arg1, arg2, arg3));
+ static Uint16Array _U16_3(arg1, arg2, arg3) => _wrap(new dom.Uint16Array(arg1, arg2, arg3));
+ static Uint32Array _U32_3(arg1, arg2, arg3) => _wrap(new dom.Uint32Array(arg1, arg2, arg3));
+ static Uint8ClampedArray _U8C_3(arg1, arg2, arg3) => _wrap(new dom.Uint8ClampedArray(arg1, arg2, arg3));
+
static ensureNative(List list) => list; // TODO: make sure.
}
« no previous file with comments | « lib/dom/templates/html/frog/html_frog.darttemplate ('k') | lib/html/frog/html_frog.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698