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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11359142: Fixing an issue where optional parameters were having their types dropped. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/scripts/generator.py » ('j') | sdk/lib/html/scripts/systemhtml.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2dc91885e5a89d163b00b775d7f3d1e6e61abf32..40b354e4c50d1e4fd7e3c193a984829c9c7702bb 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -4528,14 +4528,12 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen
void closePath() native;
/** @domName CanvasRenderingContext2D.createImageData */
- ImageData createImageData(imagedata_OR_sw, [sh]) {
- if ((imagedata_OR_sw is ImageData || imagedata_OR_sw == null) &&
- !?sh) {
+ ImageData createImageData(imagedata_OR_sw, [num sh]) {
+ if ((?imagedata_OR_sw && imagedata_OR_sw is ImageData) && !?sh) {
var imagedata_1 = _convertDartToNative_ImageData(imagedata_OR_sw);
return _convertNativeToDart_ImageData(_createImageData_1(imagedata_1));
}
- if ((imagedata_OR_sw is num || imagedata_OR_sw == null) &&
- (sh is num || sh == null)) {
+ if ((?imagedata_OR_sw && imagedata_OR_sw is num)) {
return _convertNativeToDart_ImageData(_createImageData_2(imagedata_OR_sw, sh));
}
throw const Exception("Incorrect number or type of arguments");
@@ -4571,7 +4569,7 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen
ImageData getImageData(num sx, num sy, num sw, num sh) {
return _convertNativeToDart_ImageData(_getImageData_1(sx, sy, sw, sh));
}
- _getImageData_1(sx, sy, sw, sh) native "getImageData";
+ _getImageData_1(num sx, num sy, num sw, num sh) native "getImageData";
/** @domName CanvasRenderingContext2D.getLineDash */
List<num> getLineDash() native;
@@ -4589,27 +4587,19 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen
void moveTo(num x, num y) native;
/** @domName CanvasRenderingContext2D.putImageData */
- void putImageData(ImageData imagedata, num dx, num dy, [dirtyX, dirtyY, dirtyWidth, dirtyHeight]) {
- if (!?dirtyX &&
- !?dirtyY &&
- !?dirtyWidth &&
- !?dirtyHeight) {
+ void putImageData(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) {
+ if (!?dirtyX && !?dirtyY && !?dirtyWidth && !?dirtyHeight) {
var imagedata_1 = _convertDartToNative_ImageData(imagedata);
_putImageData_1(imagedata_1, dx, dy);
return;
}
- if ((dirtyX is num || dirtyX == null) &&
- (dirtyY is num || dirtyY == null) &&
- (dirtyWidth is num || dirtyWidth == null) &&
- (dirtyHeight is num || dirtyHeight == null)) {
- var imagedata_2 = _convertDartToNative_ImageData(imagedata);
- _putImageData_2(imagedata_2, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
- return;
- }
+ var imagedata_2 = _convertDartToNative_ImageData(imagedata);
+ _putImageData_2(imagedata_2, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
+ return;
throw const Exception("Incorrect number or type of arguments");
}
- void _putImageData_1(imagedata, dx, dy) native "putImageData";
- void _putImageData_2(imagedata, dx, dy, num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight) native "putImageData";
+ void _putImageData_1(imagedata, num dx, num dy) native "putImageData";
+ void _putImageData_2(imagedata, num dx, num dy, num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight) native "putImageData";
/** @domName CanvasRenderingContext2D.quadraticCurveTo */
void quadraticCurveTo(num cpx, num cpy, num x, num y) native;
@@ -4675,30 +4665,22 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen
ImageData webkitGetImageDataHD(num sx, num sy, num sw, num sh) {
return _convertNativeToDart_ImageData(_webkitGetImageDataHD_1(sx, sy, sw, sh));
}
- _webkitGetImageDataHD_1(sx, sy, sw, sh) native "webkitGetImageDataHD";
+ _webkitGetImageDataHD_1(num sx, num sy, num sw, num sh) native "webkitGetImageDataHD";
/** @domName CanvasRenderingContext2D.webkitPutImageDataHD */
- void webkitPutImageDataHD(ImageData imagedata, num dx, num dy, [dirtyX, dirtyY, dirtyWidth, dirtyHeight]) {
- if (!?dirtyX &&
- !?dirtyY &&
- !?dirtyWidth &&
- !?dirtyHeight) {
+ void webkitPutImageDataHD(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) {
+ if (!?dirtyX && !?dirtyY && !?dirtyWidth && !?dirtyHeight) {
var imagedata_1 = _convertDartToNative_ImageData(imagedata);
_webkitPutImageDataHD_1(imagedata_1, dx, dy);
return;
}
- if ((dirtyX is num || dirtyX == null) &&
- (dirtyY is num || dirtyY == null) &&
- (dirtyWidth is num || dirtyWidth == null) &&
- (dirtyHeight is num || dirtyHeight == null)) {
- var imagedata_2 = _convertDartToNative_ImageData(imagedata);
- _webkitPutImageDataHD_2(imagedata_2, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
- return;
- }
+ var imagedata_2 = _convertDartToNative_ImageData(imagedata);
+ _webkitPutImageDataHD_2(imagedata_2, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
+ return;
throw const Exception("Incorrect number or type of arguments");
}
- void _webkitPutImageDataHD_1(imagedata, dx, dy) native "webkitPutImageDataHD";
- void _webkitPutImageDataHD_2(imagedata, dx, dy, num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight) native "webkitPutImageDataHD";
+ void _webkitPutImageDataHD_1(imagedata, num dx, num dy) native "webkitPutImageDataHD";
+ void _webkitPutImageDataHD_2(imagedata, num dx, num dy, num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight) native "webkitPutImageDataHD";
/**
@@ -5857,7 +5839,7 @@ class DedicatedWorkerContext extends WorkerContext native "*DedicatedWorkerConte
new DedicatedWorkerContextEvents(this);
/** @domName DedicatedWorkerContext.postMessage */
- void postMessage(/*any*/ message, [messagePorts]) {
+ void postMessage(/*any*/ message, [List messagePorts]) {
if (?messagePorts) {
var message_1 = _convertDartToNative_SerializedScriptValue(message);
_postMessage_1(message_1, messagePorts);
@@ -5957,7 +5939,7 @@ class DirectoryEntry extends Entry native "*DirectoryEntry" {
DirectoryReader createReader() native;
/** @domName DirectoryEntry.getDirectory */
- void getDirectory(String path, {options, successCallback, errorCallback}) {
+ void getDirectory(String path, {Map options, EntryCallback successCallback, ErrorCallback errorCallback}) {
if (?errorCallback) {
var options_1 = _convertDartToNative_Dictionary(options);
_getDirectory_1(path, options_1, successCallback, errorCallback);
@@ -5976,13 +5958,13 @@ class DirectoryEntry extends Entry native "*DirectoryEntry" {
_getDirectory_4(path);
return;
}
- void _getDirectory_1(path, options, EntryCallback successCallback, ErrorCallback errorCallback) native "getDirectory";
- void _getDirectory_2(path, options, EntryCallback successCallback) native "getDirectory";
- void _getDirectory_3(path, options) native "getDirectory";
- void _getDirectory_4(path) native "getDirectory";
+ void _getDirectory_1(String path, options, EntryCallback successCallback, ErrorCallback errorCallback) native "getDirectory";
+ void _getDirectory_2(String path, options, EntryCallback successCallback) native "getDirectory";
+ void _getDirectory_3(String path, options) native "getDirectory";
+ void _getDirectory_4(String path) native "getDirectory";
/** @domName DirectoryEntry.getFile */
- void getFile(String path, {options, successCallback, errorCallback}) {
+ void getFile(String path, {Map options, EntryCallback successCallback, ErrorCallback errorCallback}) {
if (?errorCallback) {
var options_1 = _convertDartToNative_Dictionary(options);
_getFile_1(path, options_1, successCallback, errorCallback);
@@ -6001,10 +5983,10 @@ class DirectoryEntry extends Entry native "*DirectoryEntry" {
_getFile_4(path);
return;
}
- void _getFile_1(path, options, EntryCallback successCallback, ErrorCallback errorCallback) native "getFile";
- void _getFile_2(path, options, EntryCallback successCallback) native "getFile";
- void _getFile_3(path, options) native "getFile";
- void _getFile_4(path) native "getFile";
+ void _getFile_1(String path, options, EntryCallback successCallback, ErrorCallback errorCallback) native "getFile";
+ void _getFile_2(String path, options, EntryCallback successCallback) native "getFile";
+ void _getFile_3(String path, options) native "getFile";
+ void _getFile_4(String path) native "getFile";
/** @domName DirectoryEntry.removeRecursively */
void removeRecursively(VoidCallback successCallback, [ErrorCallback errorCallback]) native;
@@ -6025,14 +6007,14 @@ class DirectoryEntrySync extends EntrySync native "*DirectoryEntrySync" {
var flags_1 = _convertDartToNative_Dictionary(flags);
return _getDirectory_1(path, flags_1);
}
- DirectoryEntrySync _getDirectory_1(path, flags) native "getDirectory";
+ DirectoryEntrySync _getDirectory_1(String path, flags) native "getDirectory";
/** @domName DirectoryEntrySync.getFile */
FileEntrySync getFile(String path, Map flags) {
var flags_1 = _convertDartToNative_Dictionary(flags);
return _getFile_1(path, flags_1);
}
- FileEntrySync _getFile_1(path, flags) native "getFile";
+ FileEntrySync _getFile_1(String path, flags) native "getFile";
/** @domName DirectoryEntrySync.removeRecursively */
void removeRecursively() native;
@@ -6190,7 +6172,7 @@ class Document extends Node
var target_1 = _convertDartToNative_EventTarget(target);
return _createTouch_1(window, target_1, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce);
}
- Touch _createTouch_1(LocalWindow window, target, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) native "createTouch";
+ Touch _createTouch_1(LocalWindow window, target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce) native "createTouch";
/** @domName Document.createTouchList */
TouchList $dom_createTouchList() native "createTouchList";
@@ -9806,7 +9788,7 @@ class IDBCursor native "*IDBCursor" {
void advance(int count) native;
/** @domName IDBCursor.continueFunction */
- void continueFunction([key]) {
+ void continueFunction([/*IDBKey*/ key]) {
if (?key) {
var key_1 = _convertDartToNative_IDBKey(key);
_continueFunction_1(key_1);
@@ -9910,15 +9892,15 @@ class IDBDatabase extends EventTarget native "*IDBDatabase" {
void close() native;
/** @domName IDBDatabase.createObjectStore */
- IDBObjectStore createObjectStore(String name, [options]) {
+ IDBObjectStore createObjectStore(String name, [Map options]) {
if (?options) {
var options_1 = _convertDartToNative_Dictionary(options);
return _createObjectStore_1(name, options_1);
}
return _createObjectStore_2(name);
}
- IDBObjectStore _createObjectStore_1(name, options) native "createObjectStore";
- IDBObjectStore _createObjectStore_2(name) native "createObjectStore";
+ IDBObjectStore _createObjectStore_1(String name, options) native "createObjectStore";
+ IDBObjectStore _createObjectStore_2(String name) native "createObjectStore";
/** @domName IDBDatabase.deleteObjectStore */
void deleteObjectStore(String name) native;
@@ -10045,7 +10027,7 @@ class IDBIndex native "*IDBIndex" {
if (!?key_OR_range) {
return _count_1();
}
- if ((key_OR_range is IDBKeyRange || key_OR_range == null)) {
+ if ((?key_OR_range && key_OR_range is IDBKeyRange)) {
return _count_2(key_OR_range);
}
if (?key_OR_range) {
@@ -10060,7 +10042,7 @@ class IDBIndex native "*IDBIndex" {
/** @domName IDBIndex.get */
IDBRequest get(key) {
- if ((key is IDBKeyRange || key == null)) {
+ if ((?key && key is IDBKeyRange)) {
return _get_1(key);
}
if (?key) {
@@ -10074,7 +10056,7 @@ class IDBIndex native "*IDBIndex" {
/** @domName IDBIndex.getKey */
IDBRequest getKey(key) {
- if ((key is IDBKeyRange || key == null)) {
+ if ((?key && key is IDBKeyRange)) {
return _getKey_1(key);
}
if (?key) {
@@ -10087,26 +10069,21 @@ class IDBIndex native "*IDBIndex" {
IDBRequest _getKey_2(key) native "getKey";
/** @domName IDBIndex.openCursor */
- IDBRequest openCursor([key_OR_range, direction]) {
- if (!?key_OR_range &&
- !?direction) {
+ IDBRequest openCursor([key_OR_range, String direction]) {
+ if (!?key_OR_range && !?direction) {
return _openCursor_1();
}
- if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
- !?direction) {
+ if ((?key_OR_range && key_OR_range is IDBKeyRange) && !?direction) {
return _openCursor_2(key_OR_range);
}
- if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
- (direction is String || direction == null)) {
+ if ((?key_OR_range && key_OR_range is IDBKeyRange)) {
return _openCursor_3(key_OR_range, direction);
}
- if (?key_OR_range &&
- !?direction) {
+ if (?key_OR_range && !?direction) {
var key_1 = _convertDartToNative_IDBKey(key_OR_range);
return _openCursor_4(key_1);
}
- if (?key_OR_range &&
- (direction is String || direction == null)) {
+ if (?key_OR_range) {
var key_2 = _convertDartToNative_IDBKey(key_OR_range);
return _openCursor_5(key_2, direction);
}
@@ -10119,26 +10096,21 @@ class IDBIndex native "*IDBIndex" {
IDBRequest _openCursor_5(key, String direction) native "openCursor";
/** @domName IDBIndex.openKeyCursor */
- IDBRequest openKeyCursor([key_OR_range, direction]) {
- if (!?key_OR_range &&
- !?direction) {
+ IDBRequest openKeyCursor([key_OR_range, String direction]) {
+ if (!?key_OR_range && !?direction) {
return _openKeyCursor_1();
}
- if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
- !?direction) {
+ if ((?key_OR_range && key_OR_range is IDBKeyRange) && !?direction) {
return _openKeyCursor_2(key_OR_range);
}
- if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
- (direction is String || direction == null)) {
+ if ((?key_OR_range && key_OR_range is IDBKeyRange)) {
return _openKeyCursor_3(key_OR_range, direction);
}
- if (?key_OR_range &&
- !?direction) {
+ if (?key_OR_range && !?direction) {
var key_1 = _convertDartToNative_IDBKey(key_OR_range);
return _openKeyCursor_4(key_1);
}
- if (?key_OR_range &&
- (direction is String || direction == null)) {
+ if (?key_OR_range) {
var key_2 = _convertDartToNative_IDBKey(key_OR_range);
return _openKeyCursor_5(key_2, direction);
}
@@ -10206,7 +10178,7 @@ class IDBKeyRange native "*IDBKeyRange" {
final bool upperOpen;
/** @domName IDBKeyRange.bound_ */
- static IDBKeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [lowerOpen, upperOpen]) {
+ static IDBKeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]) {
if (?upperOpen) {
var lower_1 = _convertDartToNative_IDBKey(lower);
var upper_2 = _convertDartToNative_IDBKey(upper);
@@ -10226,7 +10198,7 @@ class IDBKeyRange native "*IDBKeyRange" {
IDBKeyRange _bound__3(lower, upper) native "bound";
/** @domName IDBKeyRange.lowerBound_ */
- static IDBKeyRange lowerBound_(/*IDBKey*/ bound, [open]) {
+ static IDBKeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) {
if (?open) {
var bound_1 = _convertDartToNative_IDBKey(bound);
return _lowerBound__1(bound_1, open);
@@ -10245,7 +10217,7 @@ class IDBKeyRange native "*IDBKeyRange" {
IDBKeyRange _only__1(value) native "only";
/** @domName IDBKeyRange.upperBound_ */
- static IDBKeyRange upperBound_(/*IDBKey*/ bound, [open]) {
+ static IDBKeyRange upperBound_(/*IDBKey*/ bound, [bool open]) {
if (?open) {
var bound_1 = _convertDartToNative_IDBKey(bound);
return _upperBound__1(bound_1, open);
@@ -10281,7 +10253,7 @@ class IDBObjectStore native "*IDBObjectStore" {
final IDBTransaction transaction;
/** @domName IDBObjectStore.add */
- IDBRequest add(/*any*/ value, [key]) {
+ IDBRequest add(/*any*/ value, [/*IDBKey*/ key]) {
if (?key) {
var value_1 = _convertDartToNative_SerializedScriptValue(value);
var key_2 = _convertDartToNative_IDBKey(key);
@@ -10301,7 +10273,7 @@ class IDBObjectStore native "*IDBObjectStore" {
if (!?key_OR_range) {
return _count_1();
}
- if ((key_OR_range is IDBKeyRange || key_OR_range == null)) {
+ if ((?key_OR_range && key_OR_range is IDBKeyRange)) {
return _count_2(key_OR_range);
}
if (?key_OR_range) {
@@ -10315,37 +10287,33 @@ class IDBObjectStore native "*IDBObjectStore" {
IDBRequest _count_3(key) native "count";
/** @domName IDBObjectStore.createIndex */
- IDBIndex createIndex(String name, keyPath, [options]) {
- if ((keyPath is List<String> || keyPath == null) &&
- !?options) {
+ IDBIndex createIndex(String name, keyPath, [Map options]) {
+ if ((?keyPath && keyPath is List<String>) && !?options) {
List keyPath_1 = _convertDartToNative_StringArray(keyPath);
return _createIndex_1(name, keyPath_1);
}
- if ((keyPath is List<String> || keyPath == null) &&
- (options is Map || options == null)) {
+ if ((?keyPath && keyPath is List<String>)) {
List keyPath_2 = _convertDartToNative_StringArray(keyPath);
var options_3 = _convertDartToNative_Dictionary(options);
return _createIndex_2(name, keyPath_2, options_3);
}
- if ((keyPath is String || keyPath == null) &&
- !?options) {
+ if ((?keyPath && keyPath is String) && !?options) {
return _createIndex_3(name, keyPath);
}
- if ((keyPath is String || keyPath == null) &&
- (options is Map || options == null)) {
+ if ((?keyPath && keyPath is String)) {
var options_4 = _convertDartToNative_Dictionary(options);
return _createIndex_4(name, keyPath, options_4);
}
throw const Exception("Incorrect number or type of arguments");
}
- IDBIndex _createIndex_1(name, List keyPath) native "createIndex";
- IDBIndex _createIndex_2(name, List keyPath, options) native "createIndex";
- IDBIndex _createIndex_3(name, String keyPath) native "createIndex";
- IDBIndex _createIndex_4(name, String keyPath, options) native "createIndex";
+ IDBIndex _createIndex_1(String name, List keyPath) native "createIndex";
+ IDBIndex _createIndex_2(String name, List keyPath, options) native "createIndex";
+ IDBIndex _createIndex_3(String name, String keyPath) native "createIndex";
+ IDBIndex _createIndex_4(String name, String keyPath, options) native "createIndex";
/** @domName IDBObjectStore.delete */
IDBRequest delete(key_OR_keyRange) {
- if ((key_OR_keyRange is IDBKeyRange || key_OR_keyRange == null)) {
+ if ((?key_OR_keyRange && key_OR_keyRange is IDBKeyRange)) {
return _delete_1(key_OR_keyRange);
}
if (?key_OR_keyRange) {
@@ -10362,7 +10330,7 @@ class IDBObjectStore native "*IDBObjectStore" {
/** @domName IDBObjectStore.getObject */
IDBRequest getObject(key) {
- if ((key is IDBKeyRange || key == null)) {
+ if ((?key && key is IDBKeyRange)) {
return _getObject_1(key);
}
if (?key) {
@@ -10378,26 +10346,21 @@ class IDBObjectStore native "*IDBObjectStore" {
IDBIndex index(String name) native;
/** @domName IDBObjectStore.openCursor */
- IDBRequest openCursor([key_OR_range, direction]) {
- if (!?key_OR_range &&
- !?direction) {
+ IDBRequest openCursor([key_OR_range, String direction]) {
+ if (!?key_OR_range && !?direction) {
return _openCursor_1();
}
- if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
- !?direction) {
+ if ((?key_OR_range && key_OR_range is IDBKeyRange) && !?direction) {
return _openCursor_2(key_OR_range);
}
- if ((key_OR_range is IDBKeyRange || key_OR_range == null) &&
- (direction is String || direction == null)) {
+ if ((?key_OR_range && key_OR_range is IDBKeyRange)) {
return _openCursor_3(key_OR_range, direction);
}
- if (?key_OR_range &&
- !?direction) {
+ if (?key_OR_range && !?direction) {
var key_1 = _convertDartToNative_IDBKey(key_OR_range);
return _openCursor_4(key_1);
}
- if (?key_OR_range &&
- (direction is String || direction == null)) {
+ if (?key_OR_range) {
var key_2 = _convertDartToNative_IDBKey(key_OR_range);
return _openCursor_5(key_2, direction);
}
@@ -10410,7 +10373,7 @@ class IDBObjectStore native "*IDBObjectStore" {
IDBRequest _openCursor_5(key, String direction) native "openCursor";
/** @domName IDBObjectStore.put */
- IDBRequest put(/*any*/ value, [key]) {
+ IDBRequest put(/*any*/ value, [/*IDBKey*/ key]) {
if (?key) {
var value_1 = _convertDartToNative_SerializedScriptValue(value);
var key_2 = _convertDartToNative_IDBKey(key);
@@ -11967,23 +11930,21 @@ class LocalWindow extends EventTarget implements Window native "@*DOMWindow" {
Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native;
/** @domName Window.postMessage */
- void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [messagePorts]) {
- if (?message &&
- !?messagePorts) {
+ void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) {
+ if (?message && !?messagePorts) {
var message_1 = _convertDartToNative_SerializedScriptValue(message);
_postMessage_1(message_1, targetOrigin);
return;
}
- if (?message &&
- (messagePorts is List || messagePorts == null)) {
+ if (?message) {
var message_2 = _convertDartToNative_SerializedScriptValue(message);
_postMessage_2(message_2, targetOrigin, messagePorts);
return;
}
throw const Exception("Incorrect number or type of arguments");
}
- void _postMessage_1(message, targetOrigin) native "postMessage";
- void _postMessage_2(message, targetOrigin, List messagePorts) native "postMessage";
+ void _postMessage_1(message, String targetOrigin) native "postMessage";
+ void _postMessage_2(message, String targetOrigin, List messagePorts) native "postMessage";
/** @domName Window.print */
void print() native;
@@ -12964,7 +12925,7 @@ class MessagePort extends EventTarget native "*MessagePort" {
bool $dom_dispatchEvent(Event evt) native "dispatchEvent";
/** @domName MessagePort.postMessage */
- void postMessage(/*any*/ message, [messagePorts]) {
+ void postMessage(/*any*/ message, [List messagePorts]) {
if (?messagePorts) {
var message_1 = _convertDartToNative_SerializedScriptValue(message);
_postMessage_1(message_1, messagePorts);
@@ -13151,7 +13112,7 @@ class MouseEvent extends UIEvent native "*MouseEvent" {
_$dom_initMouseEvent_1(type, canBubble, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget_1);
return;
}
- void _$dom_initMouseEvent_1(type, canBubble, cancelable, LocalWindow view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget) native "initMouseEvent";
+ void _$dom_initMouseEvent_1(String type, bool canBubble, bool cancelable, LocalWindow view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, relatedTarget) native "initMouseEvent";
int get offsetX {
@@ -13522,7 +13483,7 @@ class Navigator native "*Navigator" {
List<Gamepad> webkitGetGamepads() native;
/** @domName Navigator.webkitGetUserMedia */
- void webkitGetUserMedia(Map options, NavigatorUserMediaSuccessCallback successCallback, [errorCallback]) {
+ void webkitGetUserMedia(Map options, NavigatorUserMediaSuccessCallback successCallback, [NavigatorUserMediaErrorCallback errorCallback]) {
if (?errorCallback) {
var options_1 = _convertDartToNative_Dictionary(options);
_webkitGetUserMedia_1(options_1, successCallback, errorCallback);
@@ -14710,7 +14671,7 @@ class PeerConnection00 extends EventTarget native "*PeerConnection00" {
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "addEventListener";
/** @domName PeerConnection00.addStream */
- void addStream(MediaStream stream, [mediaStreamHints]) {
+ void addStream(MediaStream stream, [Map mediaStreamHints]) {
if (?mediaStreamHints) {
var mediaStreamHints_1 = _convertDartToNative_Dictionary(mediaStreamHints);
_addStream_1(stream, mediaStreamHints_1);
@@ -14726,18 +14687,18 @@ class PeerConnection00 extends EventTarget native "*PeerConnection00" {
void close() native;
/** @domName PeerConnection00.createAnswer */
- SessionDescription createAnswer(String offer, [mediaHints]) {
+ SessionDescription createAnswer(String offer, [Map mediaHints]) {
if (?mediaHints) {
var mediaHints_1 = _convertDartToNative_Dictionary(mediaHints);
return _createAnswer_1(offer, mediaHints_1);
}
return _createAnswer_2(offer);
}
- SessionDescription _createAnswer_1(offer, mediaHints) native "createAnswer";
- SessionDescription _createAnswer_2(offer) native "createAnswer";
+ SessionDescription _createAnswer_1(String offer, mediaHints) native "createAnswer";
+ SessionDescription _createAnswer_2(String offer) native "createAnswer";
/** @domName PeerConnection00.createOffer */
- SessionDescription createOffer([mediaHints]) {
+ SessionDescription createOffer([Map mediaHints]) {
if (?mediaHints) {
var mediaHints_1 = _convertDartToNative_Dictionary(mediaHints);
return _createOffer_1(mediaHints_1);
@@ -14766,7 +14727,7 @@ class PeerConnection00 extends EventTarget native "*PeerConnection00" {
void setRemoteDescription(int action, SessionDescription desc) native;
/** @domName PeerConnection00.startIce */
- void startIce([iceOptions]) {
+ void startIce([Map iceOptions]) {
if (?iceOptions) {
var iceOptions_1 = _convertDartToNative_Dictionary(iceOptions);
_startIce_1(iceOptions_1);
@@ -15221,7 +15182,7 @@ class RTCPeerConnection extends EventTarget native "*RTCPeerConnection" {
void addIceCandidate(RTCIceCandidate candidate) native;
/** @domName RTCPeerConnection.addStream */
- void addStream(MediaStream stream, [mediaConstraints]) {
+ void addStream(MediaStream stream, [Map mediaConstraints]) {
if (?mediaConstraints) {
var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints);
_addStream_1(stream, mediaConstraints_1);
@@ -15237,7 +15198,7 @@ class RTCPeerConnection extends EventTarget native "*RTCPeerConnection" {
void close() native;
/** @domName RTCPeerConnection.createAnswer */
- void createAnswer(RTCSessionDescriptionCallback successCallback, [failureCallback, mediaConstraints]) {
+ void createAnswer(RTCSessionDescriptionCallback successCallback, [RTCErrorCallback failureCallback, Map mediaConstraints]) {
if (?mediaConstraints) {
var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints);
_createAnswer_1(successCallback, failureCallback, mediaConstraints_1);
@@ -15250,18 +15211,18 @@ class RTCPeerConnection extends EventTarget native "*RTCPeerConnection" {
void _createAnswer_2(RTCSessionDescriptionCallback successCallback, RTCErrorCallback failureCallback) native "createAnswer";
/** @domName RTCPeerConnection.createDataChannel */
- RTCDataChannel createDataChannel(String label, [options]) {
+ RTCDataChannel createDataChannel(String label, [Map options]) {
if (?options) {
var options_1 = _convertDartToNative_Dictionary(options);
return _createDataChannel_1(label, options_1);
}
return _createDataChannel_2(label);
}
- RTCDataChannel _createDataChannel_1(label, options) native "createDataChannel";
- RTCDataChannel _createDataChannel_2(label) native "createDataChannel";
+ RTCDataChannel _createDataChannel_1(String label, options) native "createDataChannel";
+ RTCDataChannel _createDataChannel_2(String label) native "createDataChannel";
/** @domName RTCPeerConnection.createOffer */
- void createOffer(RTCSessionDescriptionCallback successCallback, [failureCallback, mediaConstraints]) {
+ void createOffer(RTCSessionDescriptionCallback successCallback, [RTCErrorCallback failureCallback, Map mediaConstraints]) {
if (?mediaConstraints) {
var mediaConstraints_1 = _convertDartToNative_Dictionary(mediaConstraints);
_createOffer_1(successCallback, failureCallback, mediaConstraints_1);
@@ -15292,7 +15253,7 @@ class RTCPeerConnection extends EventTarget native "*RTCPeerConnection" {
void setRemoteDescription(RTCSessionDescription description, [VoidCallback successCallback, RTCErrorCallback failureCallback]) native;
/** @domName RTCPeerConnection.updateIce */
- void updateIce([configuration, mediaConstraints]) {
+ void updateIce([Map configuration, Map mediaConstraints]) {
if (?mediaConstraints) {
var configuration_1 = _convertDartToNative_Dictionary(configuration);
var mediaConstraints_2 = _convertDartToNative_Dictionary(mediaConstraints);
@@ -15755,7 +15716,7 @@ class SQLResultSetRowList implements JavaScriptIndexingBehavior, List<Map> nativ
Map item(int index) {
return _convertNativeToDart_Dictionary(_item_1(index));
}
- _item_1(index) native "item";
+ _item_1(int index) native "item";
}
// 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
@@ -25359,50 +25320,35 @@ class WebGLRenderingContext extends CanvasRenderingContext native "*WebGLRenderi
void stencilOpSeparate(int face, int fail, int zfail, int zpass) native;
/** @domName WebGLRenderingContext.texImage2D */
- void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [format, type, pixels]) {
- if ((border_OR_canvas_OR_image_OR_pixels_OR_video is int || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
- (format is int || format == null) &&
- (type is int || type == null) &&
- (pixels is ArrayBufferView || pixels == null)) {
+ void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, ArrayBufferView pixels]) {
+ if ((?border_OR_canvas_OR_image_OR_pixels_OR_video && border_OR_canvas_OR_image_OR_pixels_OR_video is int)) {
_texImage2D_1(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
return;
}
- if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
- !?format &&
- !?type &&
- !?pixels) {
+ if ((?border_OR_canvas_OR_image_OR_pixels_OR_video && border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData) && !?format && !?type && !?pixels) {
var pixels_1 = _convertDartToNative_ImageData(border_OR_canvas_OR_image_OR_pixels_OR_video);
_texImage2D_2(target, level, internalformat, format_OR_width, height_OR_type, pixels_1);
return;
}
- if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
- !?format &&
- !?type &&
- !?pixels) {
+ if ((?border_OR_canvas_OR_image_OR_pixels_OR_video && border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement) && !?format && !?type && !?pixels) {
_texImage2D_3(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
return;
}
- if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
- !?format &&
- !?type &&
- !?pixels) {
+ if ((?border_OR_canvas_OR_image_OR_pixels_OR_video && border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement) && !?format && !?type && !?pixels) {
_texImage2D_4(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
return;
}
- if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
- !?format &&
- !?type &&
- !?pixels) {
+ if ((?border_OR_canvas_OR_image_OR_pixels_OR_video && border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement) && !?format && !?type && !?pixels) {
_texImage2D_5(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
return;
}
throw const Exception("Incorrect number or type of arguments");
}
- void _texImage2D_1(target, level, internalformat, width, height, int border, int format, int type, ArrayBufferView pixels) native "texImage2D";
- void _texImage2D_2(target, level, internalformat, format, type, pixels) native "texImage2D";
- void _texImage2D_3(target, level, internalformat, format, type, ImageElement image) native "texImage2D";
- void _texImage2D_4(target, level, internalformat, format, type, CanvasElement canvas) native "texImage2D";
- void _texImage2D_5(target, level, internalformat, format, type, VideoElement video) native "texImage2D";
+ void _texImage2D_1(int target, int level, int internalformat, int width, int height, int border, int format, int type, ArrayBufferView pixels) native "texImage2D";
+ void _texImage2D_2(int target, int level, int internalformat, int format, int type, pixels) native "texImage2D";
+ void _texImage2D_3(int target, int level, int internalformat, int format, int type, ImageElement image) native "texImage2D";
+ void _texImage2D_4(int target, int level, int internalformat, int format, int type, CanvasElement canvas) native "texImage2D";
+ void _texImage2D_5(int target, int level, int internalformat, int format, int type, VideoElement video) native "texImage2D";
/** @domName WebGLRenderingContext.texParameterf */
void texParameterf(int target, int pname, num param) native;
@@ -25411,45 +25357,35 @@ class WebGLRenderingContext extends CanvasRenderingContext native "*WebGLRenderi
void texParameteri(int target, int pname, int param) native;
/** @domName WebGLRenderingContext.texSubImage2D */
- void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [type, pixels]) {
- if ((canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
- (type is int || type == null) &&
- (pixels is ArrayBufferView || pixels == null)) {
+ void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, ArrayBufferView pixels]) {
+ if ((?canvas_OR_format_OR_image_OR_pixels_OR_video && canvas_OR_format_OR_image_OR_pixels_OR_video is int)) {
_texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
return;
}
- if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
- !?type &&
- !?pixels) {
+ if ((?canvas_OR_format_OR_image_OR_pixels_OR_video && canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData) && !?type && !?pixels) {
var pixels_1 = _convertDartToNative_ImageData(canvas_OR_format_OR_image_OR_pixels_OR_video);
_texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_OR_type, pixels_1);
return;
}
- if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
- !?type &&
- !?pixels) {
+ if ((?canvas_OR_format_OR_image_OR_pixels_OR_video && canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement) && !?type && !?pixels) {
_texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
return;
}
- if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
- !?type &&
- !?pixels) {
+ if ((?canvas_OR_format_OR_image_OR_pixels_OR_video && canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement) && !?type && !?pixels) {
_texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
return;
}
- if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
- !?type &&
- !?pixels) {
+ if ((?canvas_OR_format_OR_image_OR_pixels_OR_video && canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement) && !?type && !?pixels) {
_texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
return;
}
throw const Exception("Incorrect number or type of arguments");
}
- void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int format, int type, ArrayBufferView pixels) native "texSubImage2D";
- void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) native "texSubImage2D";
- void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElement image) native "texSubImage2D";
- void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasElement canvas) native "texSubImage2D";
- void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElement video) native "texSubImage2D";
+ void _texSubImage2D_1(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ArrayBufferView pixels) native "texSubImage2D";
+ void _texSubImage2D_2(int target, int level, int xoffset, int yoffset, int format, int type, pixels) native "texSubImage2D";
+ void _texSubImage2D_3(int target, int level, int xoffset, int yoffset, int format, int type, ImageElement image) native "texSubImage2D";
+ void _texSubImage2D_4(int target, int level, int xoffset, int yoffset, int format, int type, CanvasElement canvas) native "texSubImage2D";
+ void _texSubImage2D_5(int target, int level, int xoffset, int yoffset, int format, int type, VideoElement video) native "texSubImage2D";
/** @domName WebGLRenderingContext.uniform1f */
void uniform1f(WebGLUniformLocation location, num x) native;
@@ -25840,7 +25776,7 @@ class Worker extends AbstractWorker native "*Worker" {
new WorkerEvents(this);
/** @domName Worker.postMessage */
- void postMessage(/*SerializedScriptValue*/ message, [messagePorts]) {
+ void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]) {
if (?messagePorts) {
var message_1 = _convertDartToNative_SerializedScriptValue(message);
_postMessage_1(message_1, messagePorts);
« no previous file with comments | « no previous file | sdk/lib/html/scripts/generator.py » ('j') | sdk/lib/html/scripts/systemhtml.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698