Index: sdk/lib/html/dartium/html_dartium.dart |
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart |
index bfa81ffa3073099db2c6f2590bdd81c399ce4ae0..076e7d8f0bbca061b0104fd6f3ab5701cf990625 100644 |
--- a/sdk/lib/html/dartium/html_dartium.dart |
+++ b/sdk/lib/html/dartium/html_dartium.dart |
@@ -1410,10 +1410,10 @@ class CanvasRenderingContext2D extends CanvasRenderingContext { |
CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) native "CanvasRenderingContext2D_createLinearGradient_Callback"; |
CanvasPattern createPattern(canvas_OR_image, String repetitionType) { |
- if ((canvas_OR_image is CanvasElement || canvas_OR_image == null) && (repetitionType is String || repetitionType == null)) { |
blois
2013/05/13 21:09:16
This was allowing canvas_OR_image to be null, now
|
+ if (repetitionType is String && canvas_OR_image is CanvasElement && canvas_OR_image != null) { |
return _createPattern_1(canvas_OR_image, repetitionType); |
} |
- if ((canvas_OR_image is ImageElement || canvas_OR_image == null) && (repetitionType is String || repetitionType == null)) { |
+ if (repetitionType is String && canvas_OR_image is ImageElement && canvas_OR_image != null) { |
return _createPattern_2(canvas_OR_image, repetitionType); |
} |
throw new ArgumentError("Incorrect number or type of arguments"); |
@@ -1428,39 +1428,39 @@ class CanvasRenderingContext2D extends CanvasRenderingContext { |
CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1) native "CanvasRenderingContext2D_createRadialGradient_Callback"; |
void $dom_drawImage(canvas_OR_image_OR_video, num sx_OR_x, num sy_OR_y, [num sw_OR_width, num height_OR_sh, num dx, num dy, num dw, num dh]) { |
- if ((canvas_OR_image_OR_video is ImageElement || canvas_OR_image_OR_video == null) && (sx_OR_x is num || sx_OR_x == null) && (sy_OR_y is num || sy_OR_y == null) && !?sw_OR_width && !?height_OR_sh && !?dx && !?dy && !?dw && !?dh) { |
+ if (sy_OR_y is num && sy_OR_y != null && sx_OR_x is num && sx_OR_x != null && canvas_OR_image_OR_video is ImageElement && canvas_OR_image_OR_video != null && !?sw_OR_width && !?height_OR_sh && !?dx && !?dy && !?dw && !?dh) { |
_drawImage_1(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y); |
return; |
} |
- if ((canvas_OR_image_OR_video is ImageElement || canvas_OR_image_OR_video == null) && (sx_OR_x is num || sx_OR_x == null) && (sy_OR_y is num || sy_OR_y == null) && (sw_OR_width is num || sw_OR_width == null) && (height_OR_sh is num || height_OR_sh == null) && !?dx && !?dy && !?dw && !?dh) { |
+ if (height_OR_sh is num && height_OR_sh != null && sw_OR_width is num && sw_OR_width != null && sy_OR_y is num && sy_OR_y != null && sx_OR_x is num && sx_OR_x != null && canvas_OR_image_OR_video is ImageElement && canvas_OR_image_OR_video != null && !?dx && !?dy && !?dw && !?dh) { |
_drawImage_2(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh); |
return; |
} |
- if ((canvas_OR_image_OR_video is ImageElement || canvas_OR_image_OR_video == null) && (sx_OR_x is num || sx_OR_x == null) && (sy_OR_y is num || sy_OR_y == null) && (sw_OR_width is num || sw_OR_width == null) && (height_OR_sh is num || height_OR_sh == null) && (dx is num || dx == null) && (dy is num || dy == null) && (dw is num || dw == null) && (dh is num || dh == null)) { |
+ if (dh is num && dh != null && dw is num && dw != null && dy is num && dy != null && dx is num && dx != null && height_OR_sh is num && height_OR_sh != null && sw_OR_width is num && sw_OR_width != null && sy_OR_y is num && sy_OR_y != null && sx_OR_x is num && sx_OR_x != null && canvas_OR_image_OR_video is ImageElement && canvas_OR_image_OR_video != null) { |
_drawImage_3(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh); |
return; |
} |
- if ((canvas_OR_image_OR_video is CanvasElement || canvas_OR_image_OR_video == null) && (sx_OR_x is num || sx_OR_x == null) && (sy_OR_y is num || sy_OR_y == null) && !?sw_OR_width && !?height_OR_sh && !?dx && !?dy && !?dw && !?dh) { |
+ if (sy_OR_y is num && sy_OR_y != null && sx_OR_x is num && sx_OR_x != null && canvas_OR_image_OR_video is CanvasElement && canvas_OR_image_OR_video != null && !?sw_OR_width && !?height_OR_sh && !?dx && !?dy && !?dw && !?dh) { |
_drawImage_4(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y); |
return; |
} |
- if ((canvas_OR_image_OR_video is CanvasElement || canvas_OR_image_OR_video == null) && (sx_OR_x is num || sx_OR_x == null) && (sy_OR_y is num || sy_OR_y == null) && (sw_OR_width is num || sw_OR_width == null) && (height_OR_sh is num || height_OR_sh == null) && !?dx && !?dy && !?dw && !?dh) { |
+ if (height_OR_sh is num && height_OR_sh != null && sw_OR_width is num && sw_OR_width != null && sy_OR_y is num && sy_OR_y != null && sx_OR_x is num && sx_OR_x != null && canvas_OR_image_OR_video is CanvasElement && canvas_OR_image_OR_video != null && !?dx && !?dy && !?dw && !?dh) { |
_drawImage_5(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh); |
return; |
} |
- if ((canvas_OR_image_OR_video is CanvasElement || canvas_OR_image_OR_video == null) && (sx_OR_x is num || sx_OR_x == null) && (sy_OR_y is num || sy_OR_y == null) && (sw_OR_width is num || sw_OR_width == null) && (height_OR_sh is num || height_OR_sh == null) && (dx is num || dx == null) && (dy is num || dy == null) && (dw is num || dw == null) && (dh is num || dh == null)) { |
+ if (dh is num && dh != null && dw is num && dw != null && dy is num && dy != null && dx is num && dx != null && height_OR_sh is num && height_OR_sh != null && sw_OR_width is num && sw_OR_width != null && sy_OR_y is num && sy_OR_y != null && sx_OR_x is num && sx_OR_x != null && canvas_OR_image_OR_video is CanvasElement && canvas_OR_image_OR_video != null) { |
_drawImage_6(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh); |
return; |
} |
- if ((canvas_OR_image_OR_video is VideoElement || canvas_OR_image_OR_video == null) && (sx_OR_x is num || sx_OR_x == null) && (sy_OR_y is num || sy_OR_y == null) && !?sw_OR_width && !?height_OR_sh && !?dx && !?dy && !?dw && !?dh) { |
+ if (sy_OR_y is num && sy_OR_y != null && sx_OR_x is num && sx_OR_x != null && canvas_OR_image_OR_video is VideoElement && canvas_OR_image_OR_video != null && !?sw_OR_width && !?height_OR_sh && !?dx && !?dy && !?dw && !?dh) { |
_drawImage_7(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y); |
return; |
} |
- if ((canvas_OR_image_OR_video is VideoElement || canvas_OR_image_OR_video == null) && (sx_OR_x is num || sx_OR_x == null) && (sy_OR_y is num || sy_OR_y == null) && (sw_OR_width is num || sw_OR_width == null) && (height_OR_sh is num || height_OR_sh == null) && !?dx && !?dy && !?dw && !?dh) { |
+ if (height_OR_sh is num && height_OR_sh != null && sw_OR_width is num && sw_OR_width != null && sy_OR_y is num && sy_OR_y != null && sx_OR_x is num && sx_OR_x != null && canvas_OR_image_OR_video is VideoElement && canvas_OR_image_OR_video != null && !?dx && !?dy && !?dw && !?dh) { |
_drawImage_8(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh); |
return; |
} |
- if ((canvas_OR_image_OR_video is VideoElement || canvas_OR_image_OR_video == null) && (sx_OR_x is num || sx_OR_x == null) && (sy_OR_y is num || sy_OR_y == null) && (sw_OR_width is num || sw_OR_width == null) && (height_OR_sh is num || height_OR_sh == null) && (dx is num || dx == null) && (dy is num || dy == null) && (dw is num || dw == null) && (dh is num || dh == null)) { |
+ if (dh is num && dh != null && dw is num && dw != null && dy is num && dy != null && dx is num && dx != null && height_OR_sh is num && height_OR_sh != null && sw_OR_width is num && sw_OR_width != null && sy_OR_y is num && sy_OR_y != null && sx_OR_x is num && sx_OR_x != null && canvas_OR_image_OR_video is VideoElement && canvas_OR_image_OR_video != null) { |
_drawImage_9(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh); |
return; |
} |
@@ -1551,11 +1551,11 @@ class CanvasRenderingContext2D extends CanvasRenderingContext { |
void moveTo(num x, num y) native "CanvasRenderingContext2D_moveTo_Callback"; |
void putImageData(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) { |
- if ((imagedata is ImageData || imagedata == null) && (dx is num || dx == null) && (dy is num || dy == null) && !?dirtyX && !?dirtyY && !?dirtyWidth && !?dirtyHeight) { |
+ if (dy is num && dx is num && imagedata is ImageData && !?dirtyX && !?dirtyY && !?dirtyWidth && !?dirtyHeight) { |
_putImageData_1(imagedata, dx, dy); |
return; |
} |
- if ((imagedata is ImageData || imagedata == null) && (dx is num || dx == null) && (dy is num || dy == null) && (dirtyX is num || dirtyX == null) && (dirtyY is num || dirtyY == null) && (dirtyWidth is num || dirtyWidth == null) && (dirtyHeight is num || dirtyHeight == null)) { |
+ if (dirtyHeight is num && dirtyHeight != null && dirtyWidth is num && dirtyWidth != null && dirtyY is num && dirtyY != null && dirtyX is num && dirtyX != null && dy is num && dx is num && imagedata is ImageData) { |
_putImageData_2(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight); |
return; |
} |
@@ -1644,11 +1644,11 @@ class CanvasRenderingContext2D extends CanvasRenderingContext { |
ImageData getImageDataHD(num sx, num sy, num sw, num sh) native "CanvasRenderingContext2D_webkitGetImageDataHD_Callback"; |
void putImageDataHD(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) { |
- if ((imagedata is ImageData || imagedata == null) && (dx is num || dx == null) && (dy is num || dy == null) && !?dirtyX && !?dirtyY && !?dirtyWidth && !?dirtyHeight) { |
+ if (dy is num && dx is num && imagedata is ImageData && !?dirtyX && !?dirtyY && !?dirtyWidth && !?dirtyHeight) { |
_webkitPutImageDataHD_1(imagedata, dx, dy); |
return; |
} |
- if ((imagedata is ImageData || imagedata == null) && (dx is num || dx == null) && (dy is num || dy == null) && (dirtyX is num || dirtyX == null) && (dirtyY is num || dirtyY == null) && (dirtyWidth is num || dirtyWidth == null) && (dirtyHeight is num || dirtyHeight == null)) { |
+ if (dirtyHeight is num && dirtyHeight != null && dirtyWidth is num && dirtyWidth != null && dirtyY is num && dirtyY != null && dirtyX is num && dirtyX != null && dy is num && dx is num && imagedata is ImageData) { |
_webkitPutImageDataHD_2(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight); |
return; |
} |
@@ -6089,11 +6089,11 @@ class DataTransferItemList extends NativeFieldWrapperClass1 { |
int get length native "DataTransferItemList_length_Getter"; |
void add(data_OR_file, [String type]) { |
- if ((data_OR_file is File || data_OR_file == null) && !?type) { |
+ if (data_OR_file is File && data_OR_file != null && !?type) { |
_add_1(data_OR_file); |
return; |
} |
- if ((data_OR_file is String || data_OR_file == null) && (type is String || type == null)) { |
+ if (type is String && type != null && data_OR_file is String && data_OR_file != null) { |
_add_2(data_OR_file, type); |
return; |
} |
@@ -6654,10 +6654,10 @@ class Document extends Node |
DocumentFragment createDocumentFragment() native "Document_createDocumentFragment_Callback"; |
Element $dom_createElement(String localName_OR_tagName, [String typeExtension]) { |
- if ((localName_OR_tagName is String || localName_OR_tagName == null) && !?typeExtension) { |
+ if (localName_OR_tagName is String && localName_OR_tagName != null && !?typeExtension) { |
return _createElement_1(localName_OR_tagName); |
} |
- if ((localName_OR_tagName is String || localName_OR_tagName == null) && (typeExtension is String || typeExtension == null)) { |
+ if (typeExtension is String && typeExtension != null && localName_OR_tagName is String && localName_OR_tagName != null) { |
return _createElement_2(localName_OR_tagName, typeExtension); |
} |
throw new ArgumentError("Incorrect number or type of arguments"); |
@@ -6668,10 +6668,10 @@ class Document extends Node |
Element _createElement_2(localName_OR_tagName, typeExtension) native "Document__createElement_2_Callback"; |
Element $dom_createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) { |
- if ((namespaceURI is String || namespaceURI == null) && (qualifiedName is String || qualifiedName == null) && !?typeExtension) { |
+ if (qualifiedName is String && qualifiedName != null && namespaceURI is String && namespaceURI != null && !?typeExtension) { |
return _createElementNS_1(namespaceURI, qualifiedName); |
} |
- if ((namespaceURI is String || namespaceURI == null) && (qualifiedName is String || qualifiedName == null) && (typeExtension is String || typeExtension == null)) { |
+ if (typeExtension is String && typeExtension != null && qualifiedName is String && qualifiedName != null && namespaceURI is String && namespaceURI != null) { |
return _createElementNS_2(namespaceURI, qualifiedName, typeExtension); |
} |
throw new ArgumentError("Incorrect number or type of arguments"); |
@@ -12561,11 +12561,11 @@ class InputElement extends _Element_Merged implements |
void setCustomValidity(String error) native "HTMLInputElement_setCustomValidity_Callback"; |
void setRangeText(String replacement, {int start, int end, String selectionMode}) { |
- if ((replacement is String || replacement == null) && !?start && !?end && !?selectionMode) { |
+ if (replacement is String && !?start && !?end && !?selectionMode) { |
_setRangeText_1(replacement); |
return; |
} |
- if ((replacement is String || replacement == null) && (start is int || start == null) && (end is int || end == null) && (selectionMode is String || selectionMode == null)) { |
+ if (selectionMode is String && selectionMode != null && end is int && end != null && start is int && start != null && replacement is String) { |
_setRangeText_2(replacement, start, end, selectionMode); |
return; |
} |
@@ -14586,10 +14586,10 @@ class MediaStream extends EventTarget { |
if (!?stream_OR_tracks) { |
return MediaStream._create_1(); |
} |
- if ((stream_OR_tracks is MediaStream || stream_OR_tracks == null)) { |
+ if (stream_OR_tracks is MediaStream && stream_OR_tracks != null) { |
return MediaStream._create_2(stream_OR_tracks); |
} |
- if ((stream_OR_tracks is List<MediaStreamTrack> || stream_OR_tracks == null)) { |
+ if (stream_OR_tracks is List<MediaStreamTrack> && stream_OR_tracks != null) { |
return MediaStream._create_3(stream_OR_tracks); |
} |
throw new ArgumentError("Incorrect number or type of arguments"); |
@@ -17109,10 +17109,10 @@ class Path extends NativeFieldWrapperClass1 { |
if (!?path_OR_text) { |
return Path._create_1(); |
} |
- if ((path_OR_text is Path || path_OR_text == null)) { |
+ if (path_OR_text is Path && path_OR_text != null) { |
return Path._create_2(path_OR_text); |
} |
- if ((path_OR_text is String || path_OR_text == null)) { |
+ if (path_OR_text is String && path_OR_text != null) { |
return Path._create_3(path_OR_text); |
} |
throw new ArgumentError("Incorrect number or type of arguments"); |
@@ -18175,19 +18175,19 @@ class RtcDataChannel extends EventTarget { |
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "RTCDataChannel_removeEventListener_Callback"; |
void send(data) { |
- if ((data is TypedData || data == null)) { |
+ if (data is TypedData && data != null) { |
_send_1(data); |
return; |
} |
- if ((data is ByteBuffer || data == null)) { |
+ if (data is ByteBuffer && data != null) { |
_send_2(data); |
return; |
} |
- if ((data is Blob || data == null)) { |
+ if (data is Blob && data != null) { |
_send_3(data); |
return; |
} |
- if ((data is String || data == null)) { |
+ if (data is String && data != null) { |
_send_4(data); |
return; |
} |
@@ -21046,11 +21046,11 @@ class TextAreaElement extends _Element_Merged { |
void setCustomValidity(String error) native "HTMLTextAreaElement_setCustomValidity_Callback"; |
void setRangeText(String replacement, [int start, int end, String selectionMode]) { |
- if ((replacement is String || replacement == null) && !?start && !?end && !?selectionMode) { |
+ if (replacement is String && !?start && !?end && !?selectionMode) { |
_setRangeText_1(replacement); |
return; |
} |
- if ((replacement is String || replacement == null) && (start is int || start == null) && (end is int || end == null) && (selectionMode is String || selectionMode == null)) { |
+ if (selectionMode is String && selectionMode != null && end is int && end != null && start is int && start != null && replacement is String) { |
_setRangeText_2(replacement, start, end, selectionMode); |
return; |
} |
@@ -22090,13 +22090,13 @@ class Url extends NativeFieldWrapperClass1 { |
Url.internal(); |
static String createObjectUrl(blob_OR_source_OR_stream) { |
- if ((blob_OR_source_OR_stream is MediaSource || blob_OR_source_OR_stream == null)) { |
+ if (blob_OR_source_OR_stream is MediaSource && blob_OR_source_OR_stream != null) { |
return _createObjectURL_1(blob_OR_source_OR_stream); |
} |
- if ((blob_OR_source_OR_stream is MediaStream || blob_OR_source_OR_stream == null)) { |
+ if (blob_OR_source_OR_stream is MediaStream && blob_OR_source_OR_stream != null) { |
return _createObjectURL_2(blob_OR_source_OR_stream); |
} |
- if ((blob_OR_source_OR_stream is Blob || blob_OR_source_OR_stream == null)) { |
+ if (blob_OR_source_OR_stream is Blob && blob_OR_source_OR_stream != null) { |
return _createObjectURL_3(blob_OR_source_OR_stream); |
} |
throw new ArgumentError("Incorrect number or type of arguments"); |
@@ -22345,13 +22345,13 @@ class WebSocket extends EventTarget { |
@DomName('WebSocket.WebSocket') |
@DocsEditable |
factory WebSocket(String url, [protocol_OR_protocols]) { |
- if ((url is String || url == null) && !?protocol_OR_protocols) { |
+ if (url is String && !?protocol_OR_protocols) { |
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) { |
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) { |
return WebSocket._create_3(url, protocol_OR_protocols); |
} |
throw new ArgumentError("Incorrect number or type of arguments"); |