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

Side by Side Diff: sdk/lib/html/html_common/conversions.dart

Issue 1399063002: Remove dependence on internal native_typed_data and malformed type as a result (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | sdk/lib/html/html_common/html_common.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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);
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/html_common/html_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698