| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 // Conversions for IDBKey. | 6 // Conversions for IDBKey. |
| 7 // | 7 // |
| 8 // Per http://www.w3.org/TR/IndexedDB/#key-construct | 8 // Per http://www.w3.org/TR/IndexedDB/#key-construct |
| 9 // | 9 // |
| 10 // "A value is said to be a valid key if it is one of the following types: Array | 10 // "A value is said to be a valid key if it is one of the following types: Array |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 JS('var', '#.premultipliedAlpha', nativeContextAttributes), | 297 JS('var', '#.premultipliedAlpha', nativeContextAttributes), |
| 298 JS('var', '#.preserveDrawingBuffer', nativeContextAttributes), | 298 JS('var', '#.preserveDrawingBuffer', nativeContextAttributes), |
| 299 JS('var', '#.stencil', nativeContextAttributes)); | 299 JS('var', '#.stencil', nativeContextAttributes)); |
| 300 } | 300 } |
| 301 | 301 |
| 302 // Conversions for ImageData | 302 // Conversions for ImageData |
| 303 // | 303 // |
| 304 // On Firefox, the returned ImageData is a plain object. | 304 // On Firefox, the returned ImageData is a plain object. |
| 305 | 305 |
| 306 class _TypedImageData implements ImageData { | 306 class _TypedImageData implements ImageData { |
| 307 final NativeUint8ClampedList data; | 307 final Uint8ClampedList data; |
| 308 final int height; | 308 final int height; |
| 309 final int width; | 309 final int width; |
| 310 | 310 |
| 311 _TypedImageData(this.data, this.height, this.width); | 311 _TypedImageData(this.data, this.height, this.width); |
| 312 } | 312 } |
| 313 | 313 |
| 314 ImageData convertNativeToDart_ImageData(nativeImageData) { | 314 ImageData convertNativeToDart_ImageData(nativeImageData) { |
| 315 | 315 |
| 316 // None of the native getters that return ImageData are declared as returning | 316 // None of the native getters that return ImageData are declared as returning |
| 317 // [ImageData] since that is incorrect for FireFox, which returns a plain | 317 // [ImageData] since that is incorrect for FireFox, which returns a plain |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 const String _serializedScriptValue = | 360 const String _serializedScriptValue = |
| 361 'num|String|bool|' | 361 'num|String|bool|' |
| 362 'JSExtendableArray|=Object|' | 362 'JSExtendableArray|=Object|' |
| 363 'Blob|File|NativeByteBuffer|NativeTypedData' | 363 'Blob|File|NativeByteBuffer|NativeTypedData' |
| 364 // TODO(sra): Add Date, RegExp. | 364 // TODO(sra): Add Date, RegExp. |
| 365 ; | 365 ; |
| 366 const annotation_Creates_SerializedScriptValue = | 366 const annotation_Creates_SerializedScriptValue = |
| 367 const Creates(_serializedScriptValue); | 367 const Creates(_serializedScriptValue); |
| 368 const annotation_Returns_SerializedScriptValue = | 368 const annotation_Returns_SerializedScriptValue = |
| 369 const Returns(_serializedScriptValue); | 369 const Returns(_serializedScriptValue); |
| OLD | NEW |