| Index: sdk/lib/html/dart2js/html_dart2js.dart
|
| diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
|
| index 0642db8346675bb0e63a868d6c9598f86b47abc5..b3680150a032260e253d9c64fe6c8534f9349440 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -1176,6 +1176,16 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
|
| @DocsEditable
|
| CanvasPattern createPattern(canvas_OR_image, String repetitionType) native;
|
|
|
| + @JSName('createPattern')
|
| + @DomName('CanvasRenderingContext2D.createPattern')
|
| + @DocsEditable
|
| + CanvasPattern createPatternFromCanvas(CanvasElement canvas, String repetitionType) native;
|
| +
|
| + @JSName('createPattern')
|
| + @DomName('CanvasRenderingContext2D.createPattern')
|
| + @DocsEditable
|
| + CanvasPattern createPatternFromImage(ImageElement image, String repetitionType) native;
|
| +
|
| @DomName('CanvasRenderingContext2D.createRadialGradient')
|
| @DocsEditable
|
| CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1) native;
|
| @@ -1282,10 +1292,82 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
|
| @DocsEditable
|
| void scale(num sx, num sy) native;
|
|
|
| + @JSName('setFillColor')
|
| + @DomName('CanvasRenderingContext2D.setFillColor')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setFillColorCmyk(num c, num m, num y, num k, num a) native;
|
| +
|
| + @JSName('setFillColor')
|
| + @DomName('CanvasRenderingContext2D.setFillColor')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setFillColorGrayLevel(num grayLevel, [num alpha]) native;
|
| +
|
| + @JSName('setFillColor')
|
| + @DomName('CanvasRenderingContext2D.setFillColor')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setFillColorRgb(num r, num g, num b, num a) native;
|
| +
|
| + @JSName('setFillColor')
|
| + @DomName('CanvasRenderingContext2D.setFillColor')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setFillColorString(String color, [num alpha]) native;
|
| +
|
| @DomName('CanvasRenderingContext2D.setLineDash')
|
| @DocsEditable
|
| void setLineDash(List<num> dash) native;
|
|
|
| + @JSName('setShadow')
|
| + @DomName('CanvasRenderingContext2D.setShadow')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setShadowCmyk(num width, num height, num blur, num c, num m, num y, num k, num a) native;
|
| +
|
| + @JSName('setShadow')
|
| + @DomName('CanvasRenderingContext2D.setShadow')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setShadowGrayLevel(num width, num height, num blur, num grayLevel, [num alpha]) native;
|
| +
|
| + @JSName('setShadow')
|
| + @DomName('CanvasRenderingContext2D.setShadow')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setShadowRgb(num width, num height, num blur, num r, num g, num b, num a) native;
|
| +
|
| + @JSName('setShadow')
|
| + @DomName('CanvasRenderingContext2D.setShadow')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setShadowString(num width, num height, num blur, [String color, num alpha]) native;
|
| +
|
| + @JSName('setStrokeColor')
|
| + @DomName('CanvasRenderingContext2D.setStrokeColor')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setStrokeColorCmyk(num c, num m, num y, num k, num a) native;
|
| +
|
| + @JSName('setStrokeColor')
|
| + @DomName('CanvasRenderingContext2D.setStrokeColor')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setStrokeColorGrayLevel(num grayLevel, [num alpha]) native;
|
| +
|
| + @JSName('setStrokeColor')
|
| + @DomName('CanvasRenderingContext2D.setStrokeColor')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setStrokeColorRgb(num r, num g, num b, num a) native;
|
| +
|
| + @JSName('setStrokeColor')
|
| + @DomName('CanvasRenderingContext2D.setStrokeColor')
|
| + @DocsEditable
|
| + @Experimental // non-standard
|
| + void setStrokeColorString(String color, [num alpha]) native;
|
| +
|
| @DomName('CanvasRenderingContext2D.setTransform')
|
| @DocsEditable
|
| void setTransform(num m11, num m12, num m21, num m22, num dx, num dy) native;
|
| @@ -1919,6 +2001,16 @@ class Css native "CSS" {
|
| @DomName('CSS.supports')
|
| @DocsEditable
|
| bool supports(String conditionText_OR_property, [String value]) native;
|
| +
|
| + @JSName('supports')
|
| + @DomName('CSS.supports')
|
| + @DocsEditable
|
| + bool supportsCondition(String conditionText) native;
|
| +
|
| + @JSName('supports')
|
| + @DomName('CSS.supports')
|
| + @DocsEditable
|
| + bool supportsProperty(String property, String value) native;
|
| }
|
| // 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
|
| @@ -6138,6 +6230,16 @@ class DataTransferItemList native "DataTransferItemList" {
|
| @DocsEditable
|
| void add(data_OR_file, [String type]) native;
|
|
|
| + @JSName('add')
|
| + @DomName('DataTransferItemList.add')
|
| + @DocsEditable
|
| + void addData(String data, String type) native;
|
| +
|
| + @JSName('add')
|
| + @DomName('DataTransferItemList.add')
|
| + @DocsEditable
|
| + void addFile(File file) native;
|
| +
|
| @DomName('DataTransferItemList.clear')
|
| @DocsEditable
|
| void clear() native;
|
| @@ -6377,38 +6479,38 @@ class DirectoryEntry extends Entry native "DirectoryEntry" {
|
| void __getDirectory(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
|
| if (errorCallback != null) {
|
| var options_1 = convertDartToNative_Dictionary(options);
|
| - ___getDirectory_1(path, options_1, successCallback, errorCallback);
|
| + __getDirectory_1(path, options_1, successCallback, errorCallback);
|
| return;
|
| }
|
| if (successCallback != null) {
|
| var options_2 = convertDartToNative_Dictionary(options);
|
| - ___getDirectory_2(path, options_2, successCallback);
|
| + __getDirectory_2(path, options_2, successCallback);
|
| return;
|
| }
|
| if (options != null) {
|
| var options_3 = convertDartToNative_Dictionary(options);
|
| - ___getDirectory_3(path, options_3);
|
| + __getDirectory_3(path, options_3);
|
| return;
|
| }
|
| - ___getDirectory_4(path);
|
| + __getDirectory_4(path);
|
| return;
|
| }
|
| @JSName('getDirectory')
|
| @DomName('DirectoryEntry.getDirectory')
|
| @DocsEditable
|
| - void ___getDirectory_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
|
| + void __getDirectory_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
|
| @JSName('getDirectory')
|
| @DomName('DirectoryEntry.getDirectory')
|
| @DocsEditable
|
| - void ___getDirectory_2(path, options, _EntryCallback successCallback) native;
|
| + void __getDirectory_2(path, options, _EntryCallback successCallback) native;
|
| @JSName('getDirectory')
|
| @DomName('DirectoryEntry.getDirectory')
|
| @DocsEditable
|
| - void ___getDirectory_3(path, options) native;
|
| + void __getDirectory_3(path, options) native;
|
| @JSName('getDirectory')
|
| @DomName('DirectoryEntry.getDirectory')
|
| @DocsEditable
|
| - void ___getDirectory_4(path) native;
|
| + void __getDirectory_4(path) native;
|
|
|
| @JSName('getDirectory')
|
| @DomName('DirectoryEntry.getDirectory')
|
| @@ -6426,38 +6528,38 @@ class DirectoryEntry extends Entry native "DirectoryEntry" {
|
| void __getFile(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
|
| if (errorCallback != null) {
|
| var options_1 = convertDartToNative_Dictionary(options);
|
| - ___getFile_1(path, options_1, successCallback, errorCallback);
|
| + __getFile_1(path, options_1, successCallback, errorCallback);
|
| return;
|
| }
|
| if (successCallback != null) {
|
| var options_2 = convertDartToNative_Dictionary(options);
|
| - ___getFile_2(path, options_2, successCallback);
|
| + __getFile_2(path, options_2, successCallback);
|
| return;
|
| }
|
| if (options != null) {
|
| var options_3 = convertDartToNative_Dictionary(options);
|
| - ___getFile_3(path, options_3);
|
| + __getFile_3(path, options_3);
|
| return;
|
| }
|
| - ___getFile_4(path);
|
| + __getFile_4(path);
|
| return;
|
| }
|
| @JSName('getFile')
|
| @DomName('DirectoryEntry.getFile')
|
| @DocsEditable
|
| - void ___getFile_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
|
| + void __getFile_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
|
| @JSName('getFile')
|
| @DomName('DirectoryEntry.getFile')
|
| @DocsEditable
|
| - void ___getFile_2(path, options, _EntryCallback successCallback) native;
|
| + void __getFile_2(path, options, _EntryCallback successCallback) native;
|
| @JSName('getFile')
|
| @DomName('DirectoryEntry.getFile')
|
| @DocsEditable
|
| - void ___getFile_3(path, options) native;
|
| + void __getFile_3(path, options) native;
|
| @JSName('getFile')
|
| @DomName('DirectoryEntry.getFile')
|
| @DocsEditable
|
| - void ___getFile_4(path) native;
|
| + void __getFile_4(path) native;
|
|
|
| @JSName('getFile')
|
| @DomName('DirectoryEntry.getFile')
|
| @@ -10921,6 +11023,16 @@ class FormData native "FormData" {
|
| @DomName('FormData.append')
|
| @DocsEditable
|
| void append(String name, value, [String filename]) native;
|
| +
|
| + @JSName('append')
|
| + @DomName('FormData.append')
|
| + @DocsEditable
|
| + void appendBlob(String name, Blob value, [String filename]) native;
|
| +
|
| + @JSName('append')
|
| + @DomName('FormData.append')
|
| + @DocsEditable
|
| + void appendString(String name, String value) native;
|
| }
|
| // 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
|
| @@ -15859,13 +15971,13 @@ class MutationObserver native "MutationObserver,WebKitMutationObserver" {
|
| @DocsEditable
|
| void _observe(Node target, Map options) {
|
| var options_1 = convertDartToNative_Dictionary(options);
|
| - __observe_1(target, options_1);
|
| + _observe_1(target, options_1);
|
| return;
|
| }
|
| @JSName('observe')
|
| @DomName('MutationObserver.observe')
|
| @DocsEditable
|
| - void __observe_1(Node target, options) native;
|
| + void _observe_1(Node target, options) native;
|
|
|
| @DomName('MutationObserver.takeRecords')
|
| @DocsEditable
|
| @@ -16097,7 +16209,7 @@ class Navigator native "Navigator" {
|
| * window.navigator.getUserMedia(audio: true, video: true).then((stream) {
|
| * var video = new VideoElement()
|
| * ..autoplay = true
|
| - * ..src = Url.createObjectUrl(stream);
|
| + * ..src = Url.createObjectUrlFromStream(stream);
|
| * document.body.append(video);
|
| * });
|
| *
|
| @@ -18514,6 +18626,26 @@ class RtcDataChannel extends EventTarget native "RTCDataChannel,DataChannel" {
|
| @DocsEditable
|
| void send(data) native;
|
|
|
| + @JSName('send')
|
| + @DomName('RTCDataChannel.send')
|
| + @DocsEditable
|
| + void sendBlob(Blob data) native;
|
| +
|
| + @JSName('send')
|
| + @DomName('RTCDataChannel.send')
|
| + @DocsEditable
|
| + void sendByteBuffer(ByteBuffer data) native;
|
| +
|
| + @JSName('send')
|
| + @DomName('RTCDataChannel.send')
|
| + @DocsEditable
|
| + void sendString(String data) native;
|
| +
|
| + @JSName('send')
|
| + @DomName('RTCDataChannel.send')
|
| + @DocsEditable
|
| + void sendTypedData(TypedData data) native;
|
| +
|
| @DomName('RTCDataChannel.onclose')
|
| @DocsEditable
|
| Stream<Event> get onClose => closeEvent.forTarget(this);
|
| @@ -18809,20 +18941,20 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection,mozRTCPeer
|
| void _createAnswer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map mediaConstraints]) {
|
| if (mediaConstraints != null) {
|
| var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints);
|
| - __createAnswer_1(successCallback, failureCallback, mediaConstraints_1);
|
| + _createAnswer_1(successCallback, failureCallback, mediaConstraints_1);
|
| return;
|
| }
|
| - __createAnswer_2(successCallback, failureCallback);
|
| + _createAnswer_2(successCallback, failureCallback);
|
| return;
|
| }
|
| @JSName('createAnswer')
|
| @DomName('RTCPeerConnection.createAnswer')
|
| @DocsEditable
|
| - void __createAnswer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
|
| + void _createAnswer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
|
| @JSName('createAnswer')
|
| @DomName('RTCPeerConnection.createAnswer')
|
| @DocsEditable
|
| - void __createAnswer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
|
| + void _createAnswer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
|
|
|
| @JSName('createDTMFSender')
|
| @DomName('RTCPeerConnection.createDTMFSender')
|
| @@ -18852,20 +18984,20 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection,mozRTCPeer
|
| void _createOffer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map mediaConstraints]) {
|
| if (mediaConstraints != null) {
|
| var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints);
|
| - __createOffer_1(successCallback, failureCallback, mediaConstraints_1);
|
| + _createOffer_1(successCallback, failureCallback, mediaConstraints_1);
|
| return;
|
| }
|
| - __createOffer_2(successCallback, failureCallback);
|
| + _createOffer_2(successCallback, failureCallback);
|
| return;
|
| }
|
| @JSName('createOffer')
|
| @DomName('RTCPeerConnection.createOffer')
|
| @DocsEditable
|
| - void __createOffer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
|
| + void _createOffer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
|
| @JSName('createOffer')
|
| @DomName('RTCPeerConnection.createOffer')
|
| @DocsEditable
|
| - void __createOffer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
|
| + void _createOffer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
|
|
|
| @DomName('RTCPeerConnection.dispatchEvent')
|
| @DocsEditable
|
| @@ -21347,7 +21479,7 @@ class TextAreaElement extends _HTMLElement native "HTMLTextAreaElement" {
|
| @DocsEditable
|
| // http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-textarea/input-setrangetext
|
| @Experimental
|
| - void setRangeText(String replacement, [int start, int end, String selectionMode]) native;
|
| + void setRangeText(String replacement, {int start, int end, String selectionMode}) native;
|
|
|
| @DomName('HTMLTextAreaElement.setSelectionRange')
|
| @DocsEditable
|
| @@ -22313,7 +22445,16 @@ class Url native "URL" {
|
| static String createObjectUrl(blob_OR_source_OR_stream) =>
|
| JS('String',
|
| '(self.URL || self.webkitURL).createObjectURL(#)',
|
| - blob_OR_source_OR_stream);
|
| + blob_OR_source_OR_stream);
|
| +
|
| + static String createObjectUrlFromSource(MediaSource source) =>
|
| + JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', source);
|
| +
|
| + static String createObjectUrlFromStream(MediaStream stream) =>
|
| + JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', stream);
|
| +
|
| + static String createObjectUrlFromBlob(Blob blob) =>
|
| + JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', blob);
|
|
|
| static void revokeObjectUrl(String url) =>
|
| JS('void',
|
| @@ -22640,6 +22781,26 @@ class WebSocket extends EventTarget native "WebSocket" {
|
| @DocsEditable
|
| void send(data) native;
|
|
|
| + @JSName('send')
|
| + @DomName('WebSocket.send')
|
| + @DocsEditable
|
| + void sendBlob(Blob data) native;
|
| +
|
| + @JSName('send')
|
| + @DomName('WebSocket.send')
|
| + @DocsEditable
|
| + void sendByteBuffer(ByteBuffer data) native;
|
| +
|
| + @JSName('send')
|
| + @DomName('WebSocket.send')
|
| + @DocsEditable
|
| + void sendString(String data) native;
|
| +
|
| + @JSName('send')
|
| + @DomName('WebSocket.send')
|
| + @DocsEditable
|
| + void sendTypeData(TypedData data) native;
|
| +
|
| @DomName('WebSocket.onclose')
|
| @DocsEditable
|
| Stream<CloseEvent> get onClose => closeEvent.forTarget(this);
|
| @@ -23471,10 +23632,10 @@ class Window extends EventTarget implements WindowBase native "Window,DOMWindow"
|
| @Returns('Window|=Object')
|
| WindowBase __getter__(index_OR_name) {
|
| if ((index_OR_name is int || index_OR_name == null)) {
|
| - return _convertNativeToDart_Window(___getter___1(index_OR_name));
|
| + return _convertNativeToDart_Window(__getter___1(index_OR_name));
|
| }
|
| if ((index_OR_name is String || index_OR_name == null)) {
|
| - return _convertNativeToDart_Window(___getter___2(index_OR_name));
|
| + return _convertNativeToDart_Window(__getter___2(index_OR_name));
|
| }
|
| throw new ArgumentError("Incorrect number or type of arguments");
|
| }
|
| @@ -23483,13 +23644,13 @@ class Window extends EventTarget implements WindowBase native "Window,DOMWindow"
|
| @DocsEditable
|
| @Creates('Window|=Object')
|
| @Returns('Window|=Object')
|
| - ___getter___1(int index) native;
|
| + __getter___1(int index) native;
|
| @JSName('__getter__')
|
| @DomName('Window.__getter__')
|
| @DocsEditable
|
| @Creates('Window|=Object')
|
| @Returns('Window|=Object')
|
| - ___getter___2(String name) native;
|
| + __getter___2(String name) native;
|
|
|
| @JSName('addEventListener')
|
| @DomName('Window.addEventListener')
|
| @@ -29146,9 +29307,9 @@ class _WrappedList<E> extends ListBase<E> {
|
|
|
| void sort([int compare(E a, E b)]) { _list.sort(compare); }
|
|
|
| - int indexOf(E element, [int start = 0]) => _list.indexOf(element, start);
|
| + int indexOf(Object element, [int start = 0]) => _list.indexOf(element, start);
|
|
|
| - int lastIndexOf(E element, [int start]) => _list.lastIndexOf(element, start);
|
| + int lastIndexOf(Object element, [int start]) => _list.lastIndexOf(element, start);
|
|
|
| void insert(int index, E element) => _list.insert(index, element);
|
|
|
|
|