| OLD | NEW |
| 1 dart_library.library('dart/html_common', null, /* Imports */[ | 1 dart_library.library('dart/html_common', null, /* Imports */[ |
| 2 'dart/_runtime', | 2 'dart/_runtime', |
| 3 'dart/_metadata', | 3 'dart/_metadata', |
| 4 'dart/core', | 4 'dart/core', |
| 5 'dart/html', | 5 'dart/html', |
| 6 'dart/typed_data', | 6 'dart/typed_data', |
| 7 'dart/_js_helper', | 7 'dart/_js_helper', |
| 8 'dart/_native_typed_data', | 8 'dart/_native_typed_data', |
| 9 'dart/async', | 9 'dart/async', |
| 10 'dart/collection', | 10 'dart/collection', |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 writeSlot(i, x) { | 292 writeSlot(i, x) { |
| 293 this.copies[dartx.set](i, x); | 293 this.copies[dartx.set](i, x); |
| 294 } | 294 } |
| 295 cleanupSlots() {} | 295 cleanupSlots() {} |
| 296 walk(e) { | 296 walk(e) { |
| 297 if (e == null) return e; | 297 if (e == null) return e; |
| 298 if (typeof e == 'boolean') return e; | 298 if (typeof e == 'boolean') return e; |
| 299 if (typeof e == 'number') return e; | 299 if (typeof e == 'number') return e; |
| 300 if (typeof e == 'string') return e; | 300 if (typeof e == 'string') return e; |
| 301 if (dart.is(e, core.DateTime)) { | 301 if (dart.is(e, core.DateTime)) { |
| 302 return convertDartToNative_DateTime(dart.as(e, core.DateTime)); | 302 return convertDartToNative_DateTime(e); |
| 303 } | 303 } |
| 304 if (dart.is(e, core.RegExp)) { | 304 if (dart.is(e, core.RegExp)) { |
| 305 dart.throw(new core.UnimplementedError('structured clone of RegExp')); | 305 dart.throw(new core.UnimplementedError('structured clone of RegExp')); |
| 306 } | 306 } |
| 307 if (dart.is(e, dart.dynamic)) return e; | 307 if (dart.is(e, dart.dynamic)) return e; |
| 308 if (dart.is(e, dart.dynamic)) return e; | 308 if (dart.is(e, dart.dynamic)) return e; |
| 309 if (dart.is(e, dart.dynamic)) return e; | 309 if (dart.is(e, dart.dynamic)) return e; |
| 310 if (dart.is(e, dart.dynamic)) return e; | 310 if (dart.is(e, dart.dynamic)) return e; |
| 311 if (dart.notNull(this.cloneNotRequired(e))) return e; | 311 if (dart.notNull(this.cloneNotRequired(e))) return e; |
| 312 if (dart.is(e, core.Map)) { | 312 if (dart.is(e, core.Map)) { |
| 313 let slot = this.findSlot(e); | 313 let slot = this.findSlot(e); |
| 314 let copy = this.readSlot(slot); | 314 let copy = this.readSlot(slot); |
| 315 if (copy != null) return copy; | 315 if (copy != null) return copy; |
| 316 copy = this.newJsMap(); | 316 copy = this.newJsMap(); |
| 317 this.writeSlot(slot, copy); | 317 this.writeSlot(slot, copy); |
| 318 dart.dsend(e, 'forEach', dart.fn(((key, value) => { | 318 e.forEach(dart.fn(((key, value) => { |
| 319 this.putIntoMap(copy, key, this.walk(value)); | 319 this.putIntoMap(copy, key, this.walk(value)); |
| 320 }).bind(this))); | 320 }).bind(this), dart.void, [dart.dynamic, dart.dynamic])); |
| 321 return copy; | 321 return copy; |
| 322 } | 322 } |
| 323 if (dart.is(e, core.List)) { | 323 if (dart.is(e, core.List)) { |
| 324 let slot = this.findSlot(e); | 324 let slot = this.findSlot(e); |
| 325 let copy = this.readSlot(slot); | 325 let copy = this.readSlot(slot); |
| 326 if (copy != null) return copy; | 326 if (copy != null) return copy; |
| 327 copy = this.copyList(dart.as(e, core.List), slot); | 327 copy = this.copyList(e, slot); |
| 328 return copy; | 328 return copy; |
| 329 } | 329 } |
| 330 dart.throw(new core.UnimplementedError('structured clone of other type')); | 330 dart.throw(new core.UnimplementedError('structured clone of other type')); |
| 331 } | 331 } |
| 332 copyList(e, slot) { | 332 copyList(e, slot) { |
| 333 let i = 0; | 333 let i = 0; |
| 334 let length = e[dartx.length]; | 334 let length = e[dartx.length]; |
| 335 let copy = this.newJsList(length); | 335 let copy = this.newJsList(length); |
| 336 this.writeSlot(slot, copy); | 336 this.writeSlot(slot, copy); |
| 337 for (; i < dart.notNull(length); i++) { | 337 for (; i < dart.notNull(length); i++) { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 data.BYTES_PER_ELEMENT = 1; | 471 data.BYTES_PER_ELEMENT = 1; |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 return nativeImageData; | 474 return nativeImageData; |
| 475 } | 475 } |
| 476 return new _TypedImageData(dart.as(nativeImageData.data, typed_data.Uint8Cla
mpedList), dart.as(nativeImageData.height, core.int), dart.as(nativeImageData.wi
dth, core.int)); | 476 return new _TypedImageData(dart.as(nativeImageData.data, typed_data.Uint8Cla
mpedList), dart.as(nativeImageData.height, core.int), dart.as(nativeImageData.wi
dth, core.int)); |
| 477 } | 477 } |
| 478 dart.fn(convertNativeToDart_ImageData); | 478 dart.fn(convertNativeToDart_ImageData); |
| 479 function convertDartToNative_ImageData(imageData) { | 479 function convertDartToNative_ImageData(imageData) { |
| 480 if (dart.is(imageData, _TypedImageData)) { | 480 if (dart.is(imageData, _TypedImageData)) { |
| 481 return {data: dart.dload(imageData, 'data'), height: dart.dload(imageData,
'height'), width: dart.dload(imageData, 'width')}; | 481 return {data: imageData.data, height: imageData.height, width: imageData.w
idth}; |
| 482 } | 482 } |
| 483 return imageData; | 483 return imageData; |
| 484 } | 484 } |
| 485 dart.fn(convertDartToNative_ImageData); | 485 dart.fn(convertDartToNative_ImageData); |
| 486 const _serializedScriptValue = 'num|String|bool|' + 'JSExtendableArray|=Object
|' + 'Blob|File|NativeByteBuffer|NativeTypedData'; | 486 const _serializedScriptValue = 'num|String|bool|' + 'JSExtendableArray|=Object
|' + 'Blob|File|NativeByteBuffer|NativeTypedData'; |
| 487 const annotation_Creates_SerializedScriptValue = dart.const(new _js_helper.Cre
ates(_serializedScriptValue)); | 487 const annotation_Creates_SerializedScriptValue = dart.const(new _js_helper.Cre
ates(_serializedScriptValue)); |
| 488 const annotation_Returns_SerializedScriptValue = dart.const(new _js_helper.Ret
urns(_serializedScriptValue)); | 488 const annotation_Returns_SerializedScriptValue = dart.const(new _js_helper.Ret
urns(_serializedScriptValue)); |
| 489 function convertNativeToDart_Dictionary(object) { | 489 function convertNativeToDart_Dictionary(object) { |
| 490 if (object == null) return null; | 490 if (object == null) return null; |
| 491 let dict = dart.map(); | 491 let dict = dart.map(); |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 exports.isJavaScriptArray = isJavaScriptArray; | 921 exports.isJavaScriptArray = isJavaScriptArray; |
| 922 exports.isJavaScriptSimpleObject = isJavaScriptSimpleObject; | 922 exports.isJavaScriptSimpleObject = isJavaScriptSimpleObject; |
| 923 exports.isImmutableJavaScriptArray = isImmutableJavaScriptArray; | 923 exports.isImmutableJavaScriptArray = isImmutableJavaScriptArray; |
| 924 exports.isJavaScriptPromise = isJavaScriptPromise; | 924 exports.isJavaScriptPromise = isJavaScriptPromise; |
| 925 exports.convertNativePromiseToDartFuture = convertNativePromiseToDartFuture; | 925 exports.convertNativePromiseToDartFuture = convertNativePromiseToDartFuture; |
| 926 exports.Device = Device; | 926 exports.Device = Device; |
| 927 exports.FilteredElementList = FilteredElementList; | 927 exports.FilteredElementList = FilteredElementList; |
| 928 exports.Lists = Lists; | 928 exports.Lists = Lists; |
| 929 exports.NodeListWrapper = NodeListWrapper; | 929 exports.NodeListWrapper = NodeListWrapper; |
| 930 }); | 930 }); |
| OLD | NEW |