| 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 d53d66c84708f456fccdea1f0f00f311ac1e8ad3..9998fc48b5f4414e6f93e6acbe71b5fcd472675a 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -442,7 +442,7 @@ class AudioElement extends MediaElement native "HTMLAudioElement" {
|
| @DomName('HTMLAudioElement.HTMLAudioElement')
|
| @DocsEditable
|
| factory AudioElement([String src]) {
|
| - if (?src) {
|
| + if (src != null) {
|
| return AudioElement._create_1(src);
|
| }
|
| return AudioElement._create_2();
|
| @@ -817,7 +817,7 @@ class CanvasElement extends Element implements CanvasImageSource native "HTMLCan
|
| @DomName('HTMLCanvasElement.getContext')
|
| @DocsEditable
|
| CanvasRenderingContext getContext(String contextId, [Map attrs]) {
|
| - if (?attrs) {
|
| + if (attrs != null) {
|
| var attrs_1 = convertDartToNative_Dictionary(attrs);
|
| return _getContext_1(contextId, attrs_1);
|
| }
|
| @@ -1228,12 +1228,12 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
|
| @DomName('CanvasRenderingContext2D.putImageData')
|
| @DocsEditable
|
| void putImageData(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) {
|
| - if (!?dirtyX && !?dirtyY && !?dirtyWidth && !?dirtyHeight) {
|
| + if (dirtyX == null && dirtyY == null && dirtyWidth == null && dirtyHeight == null) {
|
| var imagedata_1 = _convertDartToNative_ImageData(imagedata);
|
| _putImageData_1(imagedata_1, dx, dy);
|
| return;
|
| }
|
| - if (?dirtyX && ?dirtyY && ?dirtyWidth && ?dirtyHeight) {
|
| + if (dirtyHeight != null && dirtyWidth != null && dirtyY != null && dirtyX != null) {
|
| var imagedata_2 = _convertDartToNative_ImageData(imagedata);
|
| _putImageData_2(imagedata_2, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
|
| return;
|
| @@ -1325,12 +1325,12 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
|
| @SupportedBrowser(SupportedBrowser.SAFARI)
|
| @Experimental
|
| void putImageDataHD(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) {
|
| - if (!?dirtyX && !?dirtyY && !?dirtyWidth && !?dirtyHeight) {
|
| + if (dirtyX == null && dirtyY == null && dirtyWidth == null && dirtyHeight == null) {
|
| var imagedata_1 = _convertDartToNative_ImageData(imagedata);
|
| _putImageDataHD_1(imagedata_1, dx, dy);
|
| return;
|
| }
|
| - if (?dirtyX && ?dirtyY && ?dirtyWidth && ?dirtyHeight) {
|
| + if (dirtyHeight != null && dirtyWidth != null && dirtyY != null && dirtyX != null) {
|
| var imagedata_2 = _convertDartToNative_ImageData(imagedata);
|
| _putImageDataHD_2(imagedata_2, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
|
| return;
|
| @@ -6006,17 +6006,17 @@ class DirectoryEntry extends Entry native "DirectoryEntry" {
|
| @DomName('DirectoryEntry.getDirectory')
|
| @DocsEditable
|
| void __getDirectory(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
|
| - if (?errorCallback) {
|
| + if (errorCallback != null) {
|
| var options_1 = convertDartToNative_Dictionary(options);
|
| ___getDirectory_1(path, options_1, successCallback, errorCallback);
|
| return;
|
| }
|
| - if (?successCallback) {
|
| + if (successCallback != null) {
|
| var options_2 = convertDartToNative_Dictionary(options);
|
| ___getDirectory_2(path, options_2, successCallback);
|
| return;
|
| }
|
| - if (?options) {
|
| + if (options != null) {
|
| var options_3 = convertDartToNative_Dictionary(options);
|
| ___getDirectory_3(path, options_3);
|
| return;
|
| @@ -6055,17 +6055,17 @@ class DirectoryEntry extends Entry native "DirectoryEntry" {
|
| @DomName('DirectoryEntry.getFile')
|
| @DocsEditable
|
| void __getFile(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
|
| - if (?errorCallback) {
|
| + if (errorCallback != null) {
|
| var options_1 = convertDartToNative_Dictionary(options);
|
| ___getFile_1(path, options_1, successCallback, errorCallback);
|
| return;
|
| }
|
| - if (?successCallback) {
|
| + if (successCallback != null) {
|
| var options_2 = convertDartToNative_Dictionary(options);
|
| ___getFile_2(path, options_2, successCallback);
|
| return;
|
| }
|
| - if (?options) {
|
| + if (options != null) {
|
| var options_3 = convertDartToNative_Dictionary(options);
|
| ___getFile_3(path, options_3);
|
| return;
|
| @@ -6598,7 +6598,7 @@ class Document extends Node native "Document"
|
| @Experimental
|
| // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-document-register
|
| CustomElementConstructor register(String name, [Map options]) {
|
| - if (?options) {
|
| + if (options != null) {
|
| var options_1 = convertDartToNative_Dictionary(options);
|
| return _register_1(name, options_1);
|
| }
|
| @@ -9542,7 +9542,7 @@ class EventSource extends EventTarget native "EventSource" {
|
| @DomName('EventSource.EventSource')
|
| @DocsEditable
|
| static EventSource _factoryEventSource(String url, [Map eventSourceInit]) {
|
| - if (?eventSourceInit) {
|
| + if (eventSourceInit != null) {
|
| return EventSource._create_1(url, eventSourceInit);
|
| }
|
| return EventSource._create_2(url);
|
| @@ -10431,7 +10431,7 @@ class FormData native "FormData" {
|
| @DomName('FormData.DOMFormData')
|
| @DocsEditable
|
| factory FormData([FormElement form]) {
|
| - if (?form) {
|
| + if (form != null) {
|
| return FormData._create_1(form);
|
| }
|
| return FormData._create_2();
|
| @@ -14173,7 +14173,7 @@ class MediaStream extends EventTarget native "MediaStream" {
|
| @DomName('MediaStream.MediaStream')
|
| @DocsEditable
|
| factory MediaStream([stream_OR_tracks]) {
|
| - if (!?stream_OR_tracks) {
|
| + if (stream_OR_tracks == null) {
|
| return MediaStream._create_1();
|
| }
|
| if ((stream_OR_tracks is MediaStream || stream_OR_tracks == null)) {
|
| @@ -14535,7 +14535,7 @@ class MessagePort extends EventTarget native "MessagePort" {
|
| @DomName('MessagePort.postMessage')
|
| @DocsEditable
|
| void postMessage(/*any*/ message, [List messagePorts]) {
|
| - if (?messagePorts) {
|
| + if (messagePorts != null) {
|
| var message_1 = convertDartToNative_SerializedScriptValue(message);
|
| _postMessage_1(message_1, messagePorts);
|
| return;
|
| @@ -16279,7 +16279,7 @@ class Notification extends EventTarget native "Notification" {
|
| @DomName('Notification.Notification')
|
| @DocsEditable
|
| static Notification _factoryNotification(String title, [Map options]) {
|
| - if (?options) {
|
| + if (options != null) {
|
| return Notification._create_1(title, options);
|
| }
|
| return Notification._create_2(title);
|
| @@ -16559,16 +16559,16 @@ class OptionElement extends Element native "HTMLOptionElement" {
|
| @DomName('HTMLOptionElement.HTMLOptionElement')
|
| @DocsEditable
|
| factory OptionElement([String data, String value, bool defaultSelected, bool selected]) {
|
| - if (?selected) {
|
| + if (selected != null) {
|
| return OptionElement._create_1(data, value, defaultSelected, selected);
|
| }
|
| - if (?defaultSelected) {
|
| + if (defaultSelected != null) {
|
| return OptionElement._create_2(data, value, defaultSelected);
|
| }
|
| - if (?value) {
|
| + if (value != null) {
|
| return OptionElement._create_3(data, value);
|
| }
|
| - if (?data) {
|
| + if (data != null) {
|
| return OptionElement._create_4(data);
|
| }
|
| return OptionElement._create_5();
|
| @@ -16775,7 +16775,7 @@ class Path native "Path" {
|
| @DomName('Path.DOMPath')
|
| @DocsEditable
|
| factory Path([path_OR_text]) {
|
| - if (!?path_OR_text) {
|
| + if (path_OR_text == null) {
|
| return Path._create_1();
|
| }
|
| if ((path_OR_text is Path || path_OR_text == null)) {
|
| @@ -18012,7 +18012,7 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection" {
|
| @DomName('RTCPeerConnection.addStream')
|
| @DocsEditable
|
| void addStream(MediaStream stream, [Map mediaConstraints]) {
|
| - if (?mediaConstraints) {
|
| + if (mediaConstraints != null) {
|
| var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints);
|
| _addStream_1(stream, mediaConstraints_1);
|
| return;
|
| @@ -18036,7 +18036,7 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection" {
|
| @DomName('RTCPeerConnection.createAnswer')
|
| @DocsEditable
|
| void _createAnswer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map mediaConstraints]) {
|
| - if (?mediaConstraints) {
|
| + if (mediaConstraints != null) {
|
| var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints);
|
| __createAnswer_1(successCallback, failureCallback, mediaConstraints_1);
|
| return;
|
| @@ -18061,7 +18061,7 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection" {
|
| @DomName('RTCPeerConnection.createDataChannel')
|
| @DocsEditable
|
| RtcDataChannel createDataChannel(String label, [Map options]) {
|
| - if (?options) {
|
| + if (options != null) {
|
| var options_1 = convertDartToNative_Dictionary(options);
|
| return _createDataChannel_1(label, options_1);
|
| }
|
| @@ -18079,7 +18079,7 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection" {
|
| @DomName('RTCPeerConnection.createOffer')
|
| @DocsEditable
|
| void _createOffer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map mediaConstraints]) {
|
| - if (?mediaConstraints) {
|
| + if (mediaConstraints != null) {
|
| var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints);
|
| __createOffer_1(successCallback, failureCallback, mediaConstraints_1);
|
| return;
|
| @@ -18160,13 +18160,13 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection" {
|
| @DomName('RTCPeerConnection.updateIce')
|
| @DocsEditable
|
| void updateIce([Map configuration, Map mediaConstraints]) {
|
| - if (?mediaConstraints) {
|
| + if (mediaConstraints != null) {
|
| var configuration_1 = convertDartToNative_Dictionary(configuration);
|
| var mediaConstraints_2 = convertDartToNative_Dictionary(mediaConstraints);
|
| _updateIce_1(configuration_1, mediaConstraints_2);
|
| return;
|
| }
|
| - if (?configuration) {
|
| + if (configuration != null) {
|
| var configuration_3 = convertDartToNative_Dictionary(configuration);
|
| _updateIce_2(configuration_3);
|
| return;
|
| @@ -19579,7 +19579,7 @@ class SpeechSynthesisUtterance extends EventTarget native "SpeechSynthesisUttera
|
| @DomName('SpeechSynthesisUtterance.SpeechSynthesisUtterance')
|
| @DocsEditable
|
| factory SpeechSynthesisUtterance([String text]) {
|
| - if (?text) {
|
| + if (text != null) {
|
| return SpeechSynthesisUtterance._create_1(text);
|
| }
|
| return SpeechSynthesisUtterance._create_2();
|
| @@ -21862,13 +21862,13 @@ class WebSocket extends EventTarget native "WebSocket" {
|
| @DomName('WebSocket.WebSocket')
|
| @DocsEditable
|
| factory WebSocket(String url, [protocol_OR_protocols]) {
|
| - if ((url is String || url == null) && !?protocol_OR_protocols) {
|
| + if ((url is String || url == null) && protocol_OR_protocols == null) {
|
| return WebSocket._create_1(url);
|
| }
|
| - if ((url is String || url == null) && (protocol_OR_protocols is List<String> || protocol_OR_protocols == null)) {
|
| + if ((protocol_OR_protocols is List<String> || protocol_OR_protocols == null) && (url is String || url == null)) {
|
| return WebSocket._create_2(url, protocol_OR_protocols);
|
| }
|
| - if ((url is String || url == null) && (protocol_OR_protocols is String || protocol_OR_protocols == null)) {
|
| + if ((protocol_OR_protocols is String || protocol_OR_protocols == null) && (url is String || url == null)) {
|
| return WebSocket._create_3(url, protocol_OR_protocols);
|
| }
|
| throw new ArgumentError("Incorrect number or type of arguments");
|
| @@ -22864,7 +22864,7 @@ class Window extends EventTarget implements WindowBase native "Window,DOMWindow"
|
| @DomName('Window.postMessage')
|
| @DocsEditable
|
| void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) {
|
| - if (?messagePorts) {
|
| + if (messagePorts != null) {
|
| var message_1 = convertDartToNative_SerializedScriptValue(message);
|
| _postMessage_1(message_1, targetOrigin, messagePorts);
|
| return;
|
| @@ -24503,7 +24503,7 @@ abstract class _SharedWorker extends AbstractWorker native "SharedWorker" {
|
| @DomName('SharedWorker.SharedWorker')
|
| @DocsEditable
|
| factory _SharedWorker(String scriptURL, [String name]) {
|
| - if (?name) {
|
| + if (name != null) {
|
| return _SharedWorker._create_1(scriptURL, name);
|
| }
|
| return _SharedWorker._create_2(scriptURL);
|
| @@ -24737,7 +24737,7 @@ abstract class _WebKitCSSMatrix native "WebKitCSSMatrix" {
|
| @DomName('WebKitCSSMatrix.WebKitCSSMatrix')
|
| @DocsEditable
|
| factory _WebKitCSSMatrix([String cssValue]) {
|
| - if (?cssValue) {
|
| + if (cssValue != null) {
|
| return _WebKitCSSMatrix._create_1(cssValue);
|
| }
|
| return _WebKitCSSMatrix._create_2();
|
|
|