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

Unified Diff: lib/html/frog/html_frog.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 10539170: Fix DataView constructor and byte accessors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
Index: lib/html/frog/html_frog.dart
diff --git a/lib/html/frog/html_frog.dart b/lib/html/frog/html_frog.dart
index b0eeefe621af0d4a5ddd9458977c7d2c023208db..b357e38ee8cea2d7b9b694ebcb2f6527cc0f99d3 100644
--- a/lib/html/frog/html_frog.dart
+++ b/lib/html/frog/html_frog.dart
@@ -4537,13 +4537,13 @@ class _DataViewImpl extends _ArrayBufferViewImpl implements DataView native "*Da
int getInt32(int byteOffset, [bool littleEndian = null]) native;
- Object getInt8() native;
+ int getInt8(int byteOffset) native;
int getUint16(int byteOffset, [bool littleEndian = null]) native;
int getUint32(int byteOffset, [bool littleEndian = null]) native;
- Object getUint8() native;
+ int getUint8(int byteOffset) native;
void setFloat32(int byteOffset, num value, [bool littleEndian = null]) native;
@@ -4553,13 +4553,13 @@ class _DataViewImpl extends _ArrayBufferViewImpl implements DataView native "*Da
void setInt32(int byteOffset, int value, [bool littleEndian = null]) native;
- void setInt8() native;
+ void setInt8(int byteOffset, int value) native;
void setUint16(int byteOffset, int value, [bool littleEndian = null]) native;
void setUint32(int byteOffset, int value, [bool littleEndian = null]) native;
- void setUint8() native;
+ void setUint8(int byteOffset, int value) native;
}
class _DatabaseImpl implements Database native "*Database" {
@@ -17140,6 +17140,19 @@ class _DOMURLFactoryProvider {
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+class _DataViewFactoryProvider {
+ factory DataView(ArrayBuffer buffer,
+ [int byteOffset = null, int byteLength = null])
+ native '''
+ if (byteOffset == null) return new DataView(buffer);
+ if (byteLength == null) return new DataView(buffer, byteOffset);
+ return new DataView(buffer, byteOffset, byteLength);
+ ''';
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
class _DeprecatedPeerConnectionFactoryProvider {
factory DeprecatedPeerConnection(String serverConfiguration, SignalingCallback signalingCallback) native
'''return new DeprecatedPeerConnection(serverConfiguration, signalingCallback);''';
@@ -22212,7 +22225,9 @@ interface DataTransferItemList {
// WARNING: Do not edit - generated code.
/// @domName DataView
-interface DataView extends ArrayBufferView {
+interface DataView extends ArrayBufferView default _DataViewFactoryProvider {
+
+ DataView(ArrayBuffer buffer, [int byteOffset, int byteLength]);
/** @domName DataView.getFloat32 */
num getFloat32(int byteOffset, [bool littleEndian]);
@@ -22227,7 +22242,7 @@ interface DataView extends ArrayBufferView {
int getInt32(int byteOffset, [bool littleEndian]);
/** @domName DataView.getInt8 */
- Object getInt8();
+ int getInt8(int byteOffset);
/** @domName DataView.getUint16 */
int getUint16(int byteOffset, [bool littleEndian]);
@@ -22236,7 +22251,7 @@ interface DataView extends ArrayBufferView {
int getUint32(int byteOffset, [bool littleEndian]);
/** @domName DataView.getUint8 */
- Object getUint8();
+ int getUint8(int byteOffset);
/** @domName DataView.setFloat32 */
void setFloat32(int byteOffset, num value, [bool littleEndian]);
@@ -22251,7 +22266,7 @@ interface DataView extends ArrayBufferView {
void setInt32(int byteOffset, int value, [bool littleEndian]);
/** @domName DataView.setInt8 */
- void setInt8();
+ void setInt8(int byteOffset, int value);
/** @domName DataView.setUint16 */
void setUint16(int byteOffset, int value, [bool littleEndian]);
@@ -22260,7 +22275,7 @@ interface DataView extends ArrayBufferView {
void setUint32(int byteOffset, int value, [bool littleEndian]);
/** @domName DataView.setUint8 */
- void setUint8();
+ void setUint8(int byteOffset, int value);
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a

Powered by Google App Engine
This is Rietveld 408576698