Map IDBAny and IDBKey to Dynamic

Specialize printing of Dynamic depending on context.
Interfaces try to print it as /*IDLType*/ in operation signatures.
Generated C++ is unchanged.

Replace the arg_info tuple with a ParamInfo object.
Rename arg_infos to param_infos.

   void postMessage(Dynamic message, [List messagePorts]);
-> void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]);

   String createObjectURL(var blob_OR_stream);
-> String createObjectURL(blob_OR_stream);

   final Dynamic key;
-> final /*IDBKey*/ key;

   Dynamic strokeStyle;
-> var strokeStyle;

Review URL: https://chromiumcodereview.appspot.com//10107010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6665 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
sra@google.com 2012-04-17 23:20:28 +00:00
parent 951c878e49
commit 4a81499920
11 changed files with 473 additions and 412 deletions

View file

@ -107,12 +107,5 @@ html/frog_html_tests: Skip # Issue 1884
[ $runtime == opera ]
*: Skip
[ $checked ]
# IndexedDB tests: type check fails for IDBKey, causing Fail or Timeout. Needs
# to be renamed to Dynamic.
dom/IndexedDB1Test: Skip
dom/IndexedDB2Test: Skip
dom/IndexedDB3Test: Skip
[ ($compiler == frog || $compiler == frogsh) && $runtime == none ]
*: Skip

View file

@ -357,7 +357,7 @@ interface AudioContext extends EventTarget default _AudioContextFactoryProvider
BiquadFilterNode createBiquadFilter();
AudioBuffer createBuffer(var buffer_OR_numberOfChannels, var mixToMono_OR_numberOfFrames, [num sampleRate]);
AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, [num sampleRate]);
AudioBufferSourceNode createBufferSource();
@ -972,7 +972,7 @@ interface CanvasRenderingContext {
interface CanvasRenderingContext2D extends CanvasRenderingContext {
Dynamic fillStyle;
var /*custom*/ fillStyle;
String font;
@ -996,7 +996,7 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
num shadowOffsetY;
Dynamic strokeStyle;
var /*custom*/ strokeStyle;
String textAlign;
@ -1022,15 +1022,15 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void closePath();
ImageData createImageData(var imagedata_OR_sw, [num sh]);
ImageData createImageData(imagedata_OR_sw, [num sh]);
CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1);
CanvasPattern createPattern(var canvas_OR_image, String repetitionType);
CanvasPattern createPattern(canvas_OR_image, String repetitionType);
CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1);
void drawImage(var 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]);
void 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]);
void drawImageFromRect(HTMLImageElement image, [num sx, num sy, num sw, num sh, num dx, num dy, num dw, num dh, String compositeOperation]);
@ -1068,7 +1068,7 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void setCompositeOperation(String compositeOperation);
void setFillColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setFillColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setLineCap(String cap);
@ -1078,9 +1078,9 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void setMiterLimit(num limit);
void setShadow(num width, num height, num blur, [var c_OR_color_OR_grayLevel_OR_r, num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setShadow(num width, num height, num blur, [c_OR_color_OR_grayLevel_OR_r, num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setStrokeColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setStrokeColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setTransform(num m11, num m12, num m21, num m22, num dx, num dy);
@ -1669,7 +1669,7 @@ interface DOMURL default _DOMURLFactoryProvider {
DOMURL();
String createObjectURL(var blob_OR_stream);
String createObjectURL(blob_OR_stream);
void revokeObjectURL(String url);
}
@ -1823,7 +1823,7 @@ interface Window extends EventTarget {
Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]);
void postMessage(Dynamic message, String targetOrigin, [List messagePorts]);
void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]);
void print();
@ -1859,7 +1859,7 @@ interface Window extends EventTarget {
WebKitPoint webkitConvertPointFromPageToNode(Node node, WebKitPoint p);
void webkitPostMessage(Dynamic message, String targetOrigin, [List transferList]);
void webkitPostMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List transferList]);
int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback);
@ -1902,7 +1902,7 @@ interface DataTransferItemList {
final int length;
void add(var data_OR_file, [String type]);
void add(data_OR_file, [String type]);
void clear();
@ -1970,7 +1970,7 @@ interface Database {
// WARNING: Do not edit - generated code.
typedef bool DatabaseCallback(var database);
typedef bool DatabaseCallback(database);
// 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
// BSD-style license that can be found in the LICENSE file.
@ -4556,7 +4556,7 @@ interface HTMLSelectElement extends HTMLElement {
Node namedItem(String name);
void remove(var index_OR_option);
void remove(index_OR_option);
void setCustomValidity(String error);
}
@ -4958,7 +4958,7 @@ interface History {
final int length;
final Dynamic state;
final /*SerializedScriptValue*/ state;
void back();
@ -4996,17 +4996,17 @@ interface IDBCursor {
final int direction;
final IDBKey key;
final /*IDBKey*/ key;
final IDBKey primaryKey;
final /*IDBKey*/ primaryKey;
final IDBAny source;
final /*IDBAny*/ source;
void continueFunction([IDBKey key]);
void continueFunction([/*IDBKey*/ key]);
IDBRequest delete();
IDBRequest update(Dynamic value);
IDBRequest update(/*SerializedScriptValue*/ value);
}
// 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
@ -5016,7 +5016,7 @@ interface IDBCursor {
interface IDBCursorWithValue extends IDBCursor {
final IDBAny value;
final /*IDBAny*/ value;
}
// 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
@ -5046,7 +5046,7 @@ interface IDBDatabase extends EventTarget {
IDBVersionChangeRequest setVersion(String version);
IDBTransaction transaction(var storeName_OR_storeNames, [int mode]);
IDBTransaction transaction(storeName_OR_storeNames, [int mode]);
}
// 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
@ -5098,7 +5098,7 @@ interface IDBDatabaseException {
interface IDBFactory {
int cmp(IDBKey first, IDBKey second);
int cmp(/*IDBKey*/ first, /*IDBKey*/ second);
IDBVersionChangeRequest deleteDatabase(String name);
@ -5124,11 +5124,11 @@ interface IDBIndex {
final bool unique;
IDBRequest count([var key_OR_range]);
IDBRequest count([key_OR_range]);
IDBRequest getObject(IDBKey key);
IDBRequest getObject(/*IDBKey*/ key);
IDBRequest getKey(IDBKey key);
IDBRequest getKey(/*IDBKey*/ key);
IDBRequest openCursor([IDBKeyRange range, int direction]);
@ -5150,21 +5150,21 @@ interface IDBKey {
interface IDBKeyRange {
final IDBKey lower;
final /*IDBKey*/ lower;
final bool lowerOpen;
final IDBKey upper;
final /*IDBKey*/ upper;
final bool upperOpen;
IDBKeyRange bound(IDBKey lower, IDBKey upper, [bool lowerOpen, bool upperOpen]);
IDBKeyRange bound(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]);
IDBKeyRange lowerBound(IDBKey bound, [bool open]);
IDBKeyRange lowerBound(/*IDBKey*/ bound, [bool open]);
IDBKeyRange only(IDBKey value);
IDBKeyRange only(/*IDBKey*/ value);
IDBKeyRange upperBound(IDBKey bound, [bool open]);
IDBKeyRange upperBound(/*IDBKey*/ bound, [bool open]);
}
// 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
@ -5182,25 +5182,25 @@ interface IDBObjectStore {
final IDBTransaction transaction;
IDBRequest add(Dynamic value, [IDBKey key]);
IDBRequest add(/*SerializedScriptValue*/ value, [/*IDBKey*/ key]);
IDBRequest clear();
IDBRequest count([var key_OR_range]);
IDBRequest count([key_OR_range]);
IDBIndex createIndex(String name, String keyPath);
IDBRequest delete(var key_OR_keyRange);
IDBRequest delete(key_OR_keyRange);
void deleteIndex(String name);
IDBRequest getObject(IDBKey key);
IDBRequest getObject(/*IDBKey*/ key);
IDBIndex index(String name);
IDBRequest openCursor([IDBKeyRange range, int direction]);
IDBRequest put(Dynamic value, [IDBKey key]);
IDBRequest put(/*SerializedScriptValue*/ value, [/*IDBKey*/ key]);
}
// 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
@ -5218,9 +5218,9 @@ interface IDBRequest extends EventTarget {
final int readyState;
final IDBAny result;
final /*IDBAny*/ result;
final IDBAny source;
final /*IDBAny*/ source;
final IDBTransaction transaction;
@ -11092,9 +11092,9 @@ interface WebGLRenderingContext extends CanvasRenderingContext {
void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha);
void bufferData(int target, var data_OR_size, int usage);
void bufferData(int target, data_OR_size, int usage);
void bufferSubData(int target, int offset, var data);
void bufferSubData(int target, int offset, data);
int checkFramebufferStatus(int target);
@ -11270,13 +11270,13 @@ interface WebGLRenderingContext extends CanvasRenderingContext {
void stencilOpSeparate(int face, int fail, int zfail, int zpass);
void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, var border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, ArrayBufferView pixels]);
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]);
void texParameterf(int target, int pname, num param);
void texParameteri(int target, int pname, int param);
void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, var canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, ArrayBufferView pixels]);
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]);
void uniform1f(WebGLUniformLocation location, num x);
@ -11462,7 +11462,7 @@ interface WebKitBlobBuilder default _WebKitBlobBuilderFactoryProvider {
WebKitBlobBuilder();
void append(var arrayBuffer_OR_blob_OR_value, [String endings]);
void append(arrayBuffer_OR_blob_OR_value, [String endings]);
Blob getBlob([String contentType]);
}
@ -11810,11 +11810,11 @@ interface Worker extends AbstractWorker default _WorkerFactoryProvider {
Worker(String scriptUrl);
void postMessage(Dynamic message, [List messagePorts]);
void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]);
void terminate();
void webkitPostMessage(Dynamic message, [List messagePorts]);
void webkitPostMessage(/*SerializedScriptValue*/ message, [List messagePorts]);
}
// 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
@ -11973,7 +11973,7 @@ interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvi
void removeEventListener(String type, EventListener listener, [bool useCapture]);
void send([var data]);
void send([data]);
void setRequestHeader(String header, String value);
}

View file

@ -120,7 +120,7 @@ class _AudioContextJs extends _EventTargetJs implements AudioContext native "*Au
_BiquadFilterNodeJs createBiquadFilter() native;
_AudioBufferJs createBuffer(var buffer_OR_numberOfChannels, var mixToMono_OR_numberOfFrames, [num sampleRate = null]) native;
_AudioBufferJs createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, [num sampleRate = null]) native;
_AudioBufferSourceNodeJs createBufferSource() native;
@ -647,7 +647,7 @@ class _CanvasRenderingContextJs extends _DOMTypeJs implements CanvasRenderingCon
class _CanvasRenderingContext2DJs extends _CanvasRenderingContextJs implements CanvasRenderingContext2D native "*CanvasRenderingContext2D" {
Dynamic fillStyle;
var fillStyle;
String font;
@ -671,7 +671,7 @@ class _CanvasRenderingContext2DJs extends _CanvasRenderingContextJs implements C
num shadowOffsetY;
Dynamic strokeStyle;
var strokeStyle;
String textAlign;
@ -697,15 +697,15 @@ class _CanvasRenderingContext2DJs extends _CanvasRenderingContextJs implements C
void closePath() native;
_ImageDataJs createImageData(var imagedata_OR_sw, [num sh = null]) native;
_ImageDataJs createImageData(imagedata_OR_sw, [num sh = null]) native;
_CanvasGradientJs createLinearGradient(num x0, num y0, num x1, num y1) native;
_CanvasPatternJs createPattern(var canvas_OR_image, String repetitionType) native;
_CanvasPatternJs createPattern(canvas_OR_image, String repetitionType) native;
_CanvasGradientJs createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1) native;
void drawImage(var canvas_OR_image_OR_video, num sx_OR_x, num sy_OR_y, [num sw_OR_width = null, num height_OR_sh = null, num dx = null, num dy = null, num dw = null, num dh = null]) native;
void drawImage(canvas_OR_image_OR_video, num sx_OR_x, num sy_OR_y, [num sw_OR_width = null, num height_OR_sh = null, num dx = null, num dy = null, num dw = null, num dh = null]) native;
void drawImageFromRect(_HTMLImageElementJs image, [num sx = null, num sy = null, num sw = null, num sh = null, num dx = null, num dy = null, num dw = null, num dh = null, String compositeOperation = null]) native;
@ -743,7 +743,7 @@ class _CanvasRenderingContext2DJs extends _CanvasRenderingContextJs implements C
void setCompositeOperation(String compositeOperation) native;
void setFillColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setFillColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setLineCap(String cap) native;
@ -753,9 +753,9 @@ class _CanvasRenderingContext2DJs extends _CanvasRenderingContextJs implements C
void setMiterLimit(num limit) native;
void setShadow(num width, num height, num blur, [var c_OR_color_OR_grayLevel_OR_r = null, num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setShadow(num width, num height, num blur, [c_OR_color_OR_grayLevel_OR_r = null, num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setStrokeColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setStrokeColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setTransform(num m11, num m12, num m21, num m22, num dx, num dy) native;
@ -1204,7 +1204,7 @@ class _DOMTokenListJs extends _DOMTypeJs implements DOMTokenList native "*DOMTok
class _DOMURLJs extends _DOMTypeJs implements DOMURL native "*DOMURL" {
String createObjectURL(var blob_OR_stream) native;
String createObjectURL(blob_OR_stream) native;
void revokeObjectURL(String url) native;
}
@ -1356,7 +1356,7 @@ class _DOMWindowJs extends _EventTargetJs implements DOMWindow native "@*DOMWind
_DatabaseJs openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback = null]) native;
void postMessage(Dynamic message, String targetOrigin, [List messagePorts = null]) native;
void postMessage(message, String targetOrigin, [List messagePorts = null]) native;
void print() native;
@ -1392,7 +1392,7 @@ class _DOMWindowJs extends _EventTargetJs implements DOMWindow native "@*DOMWind
_WebKitPointJs webkitConvertPointFromPageToNode(_NodeJs node, _WebKitPointJs p) native;
void webkitPostMessage(Dynamic message, String targetOrigin, [List transferList = null]) native;
void webkitPostMessage(message, String targetOrigin, [List transferList = null]) native;
int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback) native;
@ -1424,7 +1424,7 @@ class _DataTransferItemListJs extends _DOMTypeJs implements DataTransferItemList
final int length;
void add(var data_OR_file, [String type = null]) native;
void add(data_OR_file, [String type = null]) native;
void clear() native;
@ -3744,7 +3744,7 @@ class _HTMLSelectElementJs extends _HTMLElementJs implements HTMLSelectElement n
_NodeJs namedItem(String name) native;
void remove(var index_OR_option) native;
void remove(index_OR_option) native;
void setCustomValidity(String error) native;
}
@ -4057,7 +4057,7 @@ class _HistoryJs extends _DOMTypeJs implements History native "*History" {
final int length;
final Dynamic state;
final state;
void back() native;
@ -4085,25 +4085,25 @@ class _IDBCursorJs extends _DOMTypeJs implements IDBCursor native "*IDBCursor" {
final int direction;
final _IDBKeyJs key;
final key;
final _IDBKeyJs primaryKey;
final primaryKey;
final _IDBAnyJs source;
final source;
void continueFunction([_IDBKeyJs key = null]) native '''
void continueFunction([key = null]) native '''
if (key == null) return this['continue']();
return this['continue'](key);
''';
_IDBRequestJs delete() native;
_IDBRequestJs update(Dynamic value) native;
_IDBRequestJs update(value) native;
}
class _IDBCursorWithValueJs extends _IDBCursorJs implements IDBCursorWithValue native "*IDBCursorWithValue" {
final _IDBAnyJs value;
final value;
}
class _IDBDatabaseJs extends _EventTargetJs implements IDBDatabase native "*IDBDatabase" {
@ -4128,7 +4128,7 @@ class _IDBDatabaseJs extends _EventTargetJs implements IDBDatabase native "*IDBD
_IDBVersionChangeRequestJs setVersion(String version) native;
_IDBTransactionJs transaction(var storeName_OR_storeNames, [int mode = null]) native;
_IDBTransactionJs transaction(storeName_OR_storeNames, [int mode = null]) native;
}
class _IDBDatabaseExceptionJs extends _DOMTypeJs implements IDBDatabaseException native "*IDBDatabaseException" {
@ -4170,7 +4170,7 @@ class _IDBDatabaseExceptionJs extends _DOMTypeJs implements IDBDatabaseException
class _IDBFactoryJs extends _DOMTypeJs implements IDBFactory native "*IDBFactory" {
int cmp(_IDBKeyJs first, _IDBKeyJs second) native;
int cmp(first, second) native;
_IDBVersionChangeRequestJs deleteDatabase(String name) native;
@ -4191,11 +4191,11 @@ class _IDBIndexJs extends _DOMTypeJs implements IDBIndex native "*IDBIndex" {
final bool unique;
_IDBRequestJs count([var key_OR_range = null]) native;
_IDBRequestJs count([key_OR_range = null]) native;
_IDBRequestJs getObject(_IDBKeyJs key) native 'get';
_IDBRequestJs getObject(key) native 'get';
_IDBRequestJs getKey(_IDBKeyJs key) native;
_IDBRequestJs getKey(key) native;
_IDBRequestJs openCursor([_IDBKeyRangeJs range = null, int direction = null]) native;
@ -4207,21 +4207,21 @@ class _IDBKeyJs extends _DOMTypeJs implements IDBKey native "*IDBKey" {
class _IDBKeyRangeJs extends _DOMTypeJs implements IDBKeyRange native "*IDBKeyRange" {
final _IDBKeyJs lower;
final lower;
final bool lowerOpen;
final _IDBKeyJs upper;
final upper;
final bool upperOpen;
_IDBKeyRangeJs bound(_IDBKeyJs lower, _IDBKeyJs upper, [bool lowerOpen = null, bool upperOpen = null]) native;
_IDBKeyRangeJs bound(lower, upper, [bool lowerOpen = null, bool upperOpen = null]) native;
_IDBKeyRangeJs lowerBound(_IDBKeyJs bound, [bool open = null]) native;
_IDBKeyRangeJs lowerBound(bound, [bool open = null]) native;
_IDBKeyRangeJs only(_IDBKeyJs value) native;
_IDBKeyRangeJs only(value) native;
_IDBKeyRangeJs upperBound(_IDBKeyJs bound, [bool open = null]) native;
_IDBKeyRangeJs upperBound(bound, [bool open = null]) native;
}
class _IDBObjectStoreJs extends _DOMTypeJs implements IDBObjectStore native "*IDBObjectStore" {
@ -4234,25 +4234,25 @@ class _IDBObjectStoreJs extends _DOMTypeJs implements IDBObjectStore native "*ID
final _IDBTransactionJs transaction;
_IDBRequestJs add(Dynamic value, [_IDBKeyJs key = null]) native;
_IDBRequestJs add(value, [key = null]) native;
_IDBRequestJs clear() native;
_IDBRequestJs count([var key_OR_range = null]) native;
_IDBRequestJs count([key_OR_range = null]) native;
_IDBIndexJs createIndex(String name, String keyPath) native;
_IDBRequestJs delete(var key_OR_keyRange) native;
_IDBRequestJs delete(key_OR_keyRange) native;
void deleteIndex(String name) native;
_IDBRequestJs getObject(_IDBKeyJs key) native 'get';
_IDBRequestJs getObject(key) native 'get';
_IDBIndexJs index(String name) native;
_IDBRequestJs openCursor([_IDBKeyRangeJs range = null, int direction = null]) native;
_IDBRequestJs put(Dynamic value, [_IDBKeyJs key = null]) native;
_IDBRequestJs put(value, [key = null]) native;
}
class _IDBRequestJs extends _EventTargetJs implements IDBRequest native "*IDBRequest" {
@ -4265,9 +4265,9 @@ class _IDBRequestJs extends _EventTargetJs implements IDBRequest native "*IDBReq
final int readyState;
final _IDBAnyJs result;
final result;
final _IDBAnyJs source;
final source;
final _IDBTransactionJs transaction;
@ -10967,9 +10967,9 @@ class _WebGLRenderingContextJs extends _CanvasRenderingContextJs implements WebG
void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) native;
void bufferData(int target, var data_OR_size, int usage) native;
void bufferData(int target, data_OR_size, int usage) native;
void bufferSubData(int target, int offset, var data) native;
void bufferSubData(int target, int offset, data) native;
int checkFramebufferStatus(int target) native;
@ -11145,13 +11145,13 @@ class _WebGLRenderingContextJs extends _CanvasRenderingContextJs implements WebG
void stencilOpSeparate(int face, int fail, int zfail, int zpass) native;
void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, var border_OR_canvas_OR_image_OR_pixels_OR_video, [int format = null, int type = null, _ArrayBufferViewJs pixels = null]) native;
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 = null, int type = null, _ArrayBufferViewJs pixels = null]) native;
void texParameterf(int target, int pname, num param) native;
void texParameteri(int target, int pname, int param) native;
void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, var canvas_OR_format_OR_image_OR_pixels_OR_video, [int type = null, _ArrayBufferViewJs pixels = null]) native;
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 = null, _ArrayBufferViewJs pixels = null]) native;
void uniform1f(_WebGLUniformLocationJs location, num x) native;
@ -11290,7 +11290,7 @@ class _WebKitAnimationListJs extends _DOMTypeJs implements WebKitAnimationList n
class _WebKitBlobBuilderJs extends _DOMTypeJs implements WebKitBlobBuilder native "*WebKitBlobBuilder" {
void append(var arrayBuffer_OR_blob_OR_value, [String endings = null]) native;
void append(arrayBuffer_OR_blob_OR_value, [String endings = null]) native;
_BlobJs getBlob([String contentType = null]) native;
}
@ -11565,11 +11565,11 @@ class _WheelEventJs extends _UIEventJs implements WheelEvent native "*WheelEvent
class _WorkerJs extends _AbstractWorkerJs implements Worker native "*Worker" {
void postMessage(Dynamic message, [List messagePorts = null]) native;
void postMessage(message, [List messagePorts = null]) native;
void terminate() native;
void webkitPostMessage(Dynamic message, [List messagePorts = null]) native;
void webkitPostMessage(message, [List messagePorts = null]) native;
}
class _WorkerContextJs extends _EventTargetJs implements WorkerContext native "*WorkerContext" {
@ -11703,7 +11703,7 @@ class _XMLHttpRequestJs extends _EventTargetJs implements XMLHttpRequest native
void removeEventListener(String type, EventListener listener, [bool useCapture = null]) native;
void send([var data = null]) native;
void send([data = null]) native;
void setRequestHeader(String header, String value) native;
}
@ -12236,7 +12236,7 @@ interface AudioContext extends EventTarget default _AudioContextFactoryProvider
BiquadFilterNode createBiquadFilter();
AudioBuffer createBuffer(var buffer_OR_numberOfChannels, var mixToMono_OR_numberOfFrames, [num sampleRate]);
AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, [num sampleRate]);
AudioBufferSourceNode createBufferSource();
@ -12851,7 +12851,7 @@ interface CanvasRenderingContext {
interface CanvasRenderingContext2D extends CanvasRenderingContext {
Dynamic fillStyle;
var /*custom*/ fillStyle;
String font;
@ -12875,7 +12875,7 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
num shadowOffsetY;
Dynamic strokeStyle;
var /*custom*/ strokeStyle;
String textAlign;
@ -12901,15 +12901,15 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void closePath();
ImageData createImageData(var imagedata_OR_sw, [num sh]);
ImageData createImageData(imagedata_OR_sw, [num sh]);
CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1);
CanvasPattern createPattern(var canvas_OR_image, String repetitionType);
CanvasPattern createPattern(canvas_OR_image, String repetitionType);
CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1);
void drawImage(var 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]);
void 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]);
void drawImageFromRect(HTMLImageElement image, [num sx, num sy, num sw, num sh, num dx, num dy, num dw, num dh, String compositeOperation]);
@ -12947,7 +12947,7 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void setCompositeOperation(String compositeOperation);
void setFillColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setFillColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setLineCap(String cap);
@ -12957,9 +12957,9 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void setMiterLimit(num limit);
void setShadow(num width, num height, num blur, [var c_OR_color_OR_grayLevel_OR_r, num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setShadow(num width, num height, num blur, [c_OR_color_OR_grayLevel_OR_r, num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setStrokeColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setStrokeColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setTransform(num m11, num m12, num m21, num m22, num dx, num dy);
@ -13548,7 +13548,7 @@ interface DOMURL default _DOMURLFactoryProvider {
DOMURL();
String createObjectURL(var blob_OR_stream);
String createObjectURL(blob_OR_stream);
void revokeObjectURL(String url);
}
@ -13702,7 +13702,7 @@ interface Window extends EventTarget {
Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]);
void postMessage(Dynamic message, String targetOrigin, [List messagePorts]);
void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]);
void print();
@ -13738,7 +13738,7 @@ interface Window extends EventTarget {
WebKitPoint webkitConvertPointFromPageToNode(Node node, WebKitPoint p);
void webkitPostMessage(Dynamic message, String targetOrigin, [List transferList]);
void webkitPostMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List transferList]);
int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback);
@ -13781,7 +13781,7 @@ interface DataTransferItemList {
final int length;
void add(var data_OR_file, [String type]);
void add(data_OR_file, [String type]);
void clear();
@ -13849,7 +13849,7 @@ interface Database {
// WARNING: Do not edit - generated code.
typedef bool DatabaseCallback(var database);
typedef bool DatabaseCallback(database);
// 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
// BSD-style license that can be found in the LICENSE file.
@ -16435,7 +16435,7 @@ interface HTMLSelectElement extends HTMLElement {
Node namedItem(String name);
void remove(var index_OR_option);
void remove(index_OR_option);
void setCustomValidity(String error);
}
@ -16837,7 +16837,7 @@ interface History {
final int length;
final Dynamic state;
final /*SerializedScriptValue*/ state;
void back();
@ -16875,17 +16875,17 @@ interface IDBCursor {
final int direction;
final IDBKey key;
final /*IDBKey*/ key;
final IDBKey primaryKey;
final /*IDBKey*/ primaryKey;
final IDBAny source;
final /*IDBAny*/ source;
void continueFunction([IDBKey key]);
void continueFunction([/*IDBKey*/ key]);
IDBRequest delete();
IDBRequest update(Dynamic value);
IDBRequest update(/*SerializedScriptValue*/ value);
}
// 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
@ -16895,7 +16895,7 @@ interface IDBCursor {
interface IDBCursorWithValue extends IDBCursor {
final IDBAny value;
final /*IDBAny*/ value;
}
// 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
@ -16925,7 +16925,7 @@ interface IDBDatabase extends EventTarget {
IDBVersionChangeRequest setVersion(String version);
IDBTransaction transaction(var storeName_OR_storeNames, [int mode]);
IDBTransaction transaction(storeName_OR_storeNames, [int mode]);
}
// 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
@ -16977,7 +16977,7 @@ interface IDBDatabaseException {
interface IDBFactory {
int cmp(IDBKey first, IDBKey second);
int cmp(/*IDBKey*/ first, /*IDBKey*/ second);
IDBVersionChangeRequest deleteDatabase(String name);
@ -17003,11 +17003,11 @@ interface IDBIndex {
final bool unique;
IDBRequest count([var key_OR_range]);
IDBRequest count([key_OR_range]);
IDBRequest getObject(IDBKey key);
IDBRequest getObject(/*IDBKey*/ key);
IDBRequest getKey(IDBKey key);
IDBRequest getKey(/*IDBKey*/ key);
IDBRequest openCursor([IDBKeyRange range, int direction]);
@ -17029,21 +17029,21 @@ interface IDBKey {
interface IDBKeyRange {
final IDBKey lower;
final /*IDBKey*/ lower;
final bool lowerOpen;
final IDBKey upper;
final /*IDBKey*/ upper;
final bool upperOpen;
IDBKeyRange bound(IDBKey lower, IDBKey upper, [bool lowerOpen, bool upperOpen]);
IDBKeyRange bound(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]);
IDBKeyRange lowerBound(IDBKey bound, [bool open]);
IDBKeyRange lowerBound(/*IDBKey*/ bound, [bool open]);
IDBKeyRange only(IDBKey value);
IDBKeyRange only(/*IDBKey*/ value);
IDBKeyRange upperBound(IDBKey bound, [bool open]);
IDBKeyRange upperBound(/*IDBKey*/ bound, [bool open]);
}
// 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
@ -17061,25 +17061,25 @@ interface IDBObjectStore {
final IDBTransaction transaction;
IDBRequest add(Dynamic value, [IDBKey key]);
IDBRequest add(/*SerializedScriptValue*/ value, [/*IDBKey*/ key]);
IDBRequest clear();
IDBRequest count([var key_OR_range]);
IDBRequest count([key_OR_range]);
IDBIndex createIndex(String name, String keyPath);
IDBRequest delete(var key_OR_keyRange);
IDBRequest delete(key_OR_keyRange);
void deleteIndex(String name);
IDBRequest getObject(IDBKey key);
IDBRequest getObject(/*IDBKey*/ key);
IDBIndex index(String name);
IDBRequest openCursor([IDBKeyRange range, int direction]);
IDBRequest put(Dynamic value, [IDBKey key]);
IDBRequest put(/*SerializedScriptValue*/ value, [/*IDBKey*/ key]);
}
// 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
@ -17097,9 +17097,9 @@ interface IDBRequest extends EventTarget {
final int readyState;
final IDBAny result;
final /*IDBAny*/ result;
final IDBAny source;
final /*IDBAny*/ source;
final IDBTransaction transaction;
@ -22971,9 +22971,9 @@ interface WebGLRenderingContext extends CanvasRenderingContext {
void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha);
void bufferData(int target, var data_OR_size, int usage);
void bufferData(int target, data_OR_size, int usage);
void bufferSubData(int target, int offset, var data);
void bufferSubData(int target, int offset, data);
int checkFramebufferStatus(int target);
@ -23149,13 +23149,13 @@ interface WebGLRenderingContext extends CanvasRenderingContext {
void stencilOpSeparate(int face, int fail, int zfail, int zpass);
void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, var border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, ArrayBufferView pixels]);
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]);
void texParameterf(int target, int pname, num param);
void texParameteri(int target, int pname, int param);
void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, var canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, ArrayBufferView pixels]);
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]);
void uniform1f(WebGLUniformLocation location, num x);
@ -23341,7 +23341,7 @@ interface WebKitBlobBuilder default _WebKitBlobBuilderFactoryProvider {
WebKitBlobBuilder();
void append(var arrayBuffer_OR_blob_OR_value, [String endings]);
void append(arrayBuffer_OR_blob_OR_value, [String endings]);
Blob getBlob([String contentType]);
}
@ -23689,11 +23689,11 @@ interface Worker extends AbstractWorker default _WorkerFactoryProvider {
Worker(String scriptUrl);
void postMessage(Dynamic message, [List messagePorts]);
void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]);
void terminate();
void webkitPostMessage(Dynamic message, [List messagePorts]);
void webkitPostMessage(/*SerializedScriptValue*/ message, [List messagePorts]);
}
// 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
@ -23852,7 +23852,7 @@ interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvi
void removeEventListener(String type, EventListener listener, [bool useCapture]);
void send([var data]);
void send([data]);
void setRequestHeader(String header, String value);
}

View file

@ -131,9 +131,27 @@ def MatchSourceFilter(filter, thing):
else:
return any(token in thing.annotations for token in filter)
def DartType(idl_type_name):
return GetIDLTypeInfo(idl_type_name).dart_type()
class ParamInfo(object):
"""Holder for various information about a parameter of a Dart operation.
Attributes:
name: Name of parameter.
type_id: Original type id. None for merged types.
dart_type: DartType of parameter.
default_value: String holding the expression. None for mandatory parameter.
"""
def __init__(self, name, type_id, dart_type, default_value):
self.name = name
self.type_id = type_id
self.dart_type = dart_type
self.default_value = default_value
# Given a list of overloaded arguments, render a dart argument.
def _DartArg(args, interface):
# Given a list of overloaded arguments, choose a suitable name.
@ -142,20 +160,24 @@ def _DartArg(args, interface):
# Given a list of overloaded arguments, choose a suitable type.
def OverloadedType(args):
typeIds = sorted(set(DartType(arg.type.id) for arg in args))
if len(typeIds) == 1:
return typeIds[0]
type_ids = sorted(set(arg.type.id for arg in args))
dart_types = sorted(set(DartType(arg.type.id) for arg in args))
if len(dart_types) == 1:
if len(type_ids) == 1:
return (type_ids[0], dart_types[0])
else:
return (None, dart_types[0])
else:
return TypeName(typeIds, interface)
return (None, TypeName(type_ids, interface))
filtered = filter(None, args)
optional = any(not arg or arg.is_optional for arg in args)
type = OverloadedType(filtered)
(type_id, dart_type) = OverloadedType(filtered)
name = OverloadedName(filtered)
if optional:
return (name, type, 'null')
return ParamInfo(name, type_id, dart_type, 'null')
else:
return (name, type, None)
return ParamInfo(name, type_id, dart_type, None)
def AnalyzeOperation(interface, operations):
@ -175,7 +197,7 @@ def AnalyzeOperation(interface, operations):
info.name = operations[0].ext_attrs.get('DartName', info.declared_name)
info.js_name = info.declared_name
info.type_name = DartType(operations[0].type.id) # TODO: widen.
info.arg_infos = args
info.param_infos = args
return info
@ -213,7 +235,7 @@ def AnalyzeConstructor(interface):
info.name = name
info.js_name = name
info.type_name = interface.id
info.arg_infos = args
info.param_infos = args
return info
@ -257,6 +279,33 @@ def DartDomNameOfAttribute(attr):
name = attr.ext_attrs.get('DartName', None) or name
return name
def TypeOrNothing(dart_type, comment=None):
"""Returns string for declaring something with |dart_type| in a context
where a type may be omitted.
The string is empty or has a trailing space.
"""
if dart_type == 'Dynamic':
if comment:
return '/*%s*/ ' % comment # Just a comment foo(/*T*/ x)
else:
return '' # foo(x) looks nicer than foo(Dynamic x)
else:
return dart_type + ' '
def TypeOrVar(dart_type, comment=None):
"""Returns string for declaring something with |dart_type| in a context
where if a type is omitted, 'var' must be used instead."""
if dart_type == 'Dynamic':
if comment:
return 'var /*%s*/' % comment # e.g. var /*T*/ x;
else:
return 'var' # e.g. var x;
else:
return dart_type
class OperationInfo(object):
"""Holder for various derived information from a set of overloaded operations.
@ -264,13 +313,14 @@ class OperationInfo(object):
overloads: A list of IDL operation overloads with the same name.
name: A string, the simple name of the operation.
type_name: A string, the name of the return type of the operation.
arg_infos: A list of (name, type, default_value) tuples.
default_value is None for mandatory arguments.
param_infos: A list of ParamInfo.
"""
def ParametersInterfaceDeclaration(self):
"""Returns a formatted string declaring the parameters for the interface."""
return self._FormatArgs(self.arg_infos, True)
return self._FormatParams(
self.param_infos, True,
lambda param: TypeOrNothing(param.dart_type, param.type_id))
def ParametersImplementationDeclaration(self, rename_type=None):
"""Returns a formatted string declaring the parameters for the
@ -278,44 +328,54 @@ class OperationInfo(object):
Args:
rename_type: A function that allows the types to be renamed.
The function is applied to the parameter's dart_type.
"""
args = self.arg_infos
if rename_type:
args = [(name, rename_type(type), default)
for (name, type, default) in args]
return self._FormatArgs(args, False)
def renamer(param_info):
return TypeOrNothing(rename_type(param_info.dart_type))
return self._FormatParams(self.param_infos, False, renamer)
else:
def type_fn(param_info):
if param_info.dart_type == 'Dynamic':
if param_info.type_id:
# It is more informative to use a comment IDL type.
return '/*%s*/' % param_info.type_id
else:
return 'var'
else:
return param_info.dart_type
return self._FormatParams(
self.param_infos, False,
lambda param: TypeOrNothing(param.dart_type, param.type_id))
def ParametersAsArgumentList(self):
"""Returns a formatted string declaring the parameters names as an argument
list.
"""Returns a string of the parameter names suitable for passing the
parameters as arguments.
"""
return ', '.join(map(lambda arg_info: arg_info[0], self.arg_infos))
return ', '.join(map(lambda param_info: param_info.name, self.param_infos))
def _FormatArgs(self, args, is_interface):
def FormatArg(arg_info):
"""Returns an argument declaration fragment for an argument info tuple."""
(name, type, default) = arg_info
if default:
return '%s %s = %s' % (type, name, default)
def _FormatParams(self, params, is_interface, type_fn):
def FormatParam(param):
"""Returns a parameter declaration fragment for an ParamInfo."""
type = type_fn(param)
if is_interface or param.default_value is None:
return '%s%s' % (type, param.name)
else:
return '%s %s' % (type, name)
return '%s%s = %s' % (type, param.name, param.default_value)
required = []
optional = []
for (name, type, default) in args:
if default:
if is_interface:
optional.append((name, type, None)) # Default values illegal.
else:
optional.append((name, type, default))
for param_info in params:
if param_info.default_value:
optional.append(param_info)
else:
if optional:
raise Exception('Optional arguments cannot precede required ones: '
raise Exception('Optional parameters cannot precede required ones: '
+ str(args))
required.append((name, type, None))
argtexts = map(FormatArg, required)
required.append(param_info)
argtexts = map(FormatParam, required)
if optional:
argtexts.append('[' + ', '.join(map(FormatArg, optional)) + ']')
argtexts.append('[' + ', '.join(map(FormatParam, optional)) + ']')
return ', '.join(argtexts)
@ -357,14 +417,15 @@ def IndentText(text, indent):
# Given a sorted sequence of type identifiers, return an appropriate type
# name
def TypeName(typeIds, interface):
def TypeName(type_ids, interface):
# Dynamically type this field for now.
return 'var'
return 'Dynamic'
# ------------------------------------------------------------------------------
class IDLTypeInfo(object):
def __init__(self, idl_type, dart_type=None, native_type=None, ref_counted=True,
def __init__(self, idl_type, dart_type=None,
native_type=None, ref_counted=True,
has_dart_wrapper=True, conversion_template=None,
custom_to_dart=False, conversion_includes=[]):
self._idl_type = idl_type
@ -441,12 +502,15 @@ class IDLTypeInfo(object):
def conversion_includes(self):
def NeededDartTypes(type_name):
if re.match(r'Dynamic(\/.*)?$', type_name): return []
match = re.match(r'List<(\w*)>$', type_name)
if match:
return NeededDartTypes(match.group(1))
return [type_name]
return ['"Dart%s.h"' % include for include in NeededDartTypes(self.dart_type()) + self._conversion_includes]
return ['"Dart%s.h"' % include
for include in
NeededDartTypes(self.dart_type()) + self._conversion_includes]
def conversion_cast(self, expression):
if self._conversion_template:
@ -568,7 +632,14 @@ _idl_type_registry = {
'EventListener': IDLTypeInfo('EventListener', has_dart_wrapper=False),
'EventTarget': IDLTypeInfo('EventTarget', has_dart_wrapper=False),
'HTMLElement': IDLTypeInfo('HTMLElement', custom_to_dart=True),
'IDBKey': IDLTypeInfo('IDBKey', has_dart_wrapper=False),
'IDBAny': IDLTypeInfo('IDBAny', dart_type='Dynamic',
native_type='IDBAny',
has_dart_wrapper=False,
conversion_includes=['IDBAny']),
'IDBKey': IDLTypeInfo('IDBKey', dart_type='Dynamic',
native_type='IDBKey',
has_dart_wrapper=False,
conversion_includes=['IDBKey']),
'MediaQueryListListener': IDLTypeInfo('MediaQueryListListener', has_dart_wrapper=False),
'OptionsObject': IDLTypeInfo('OptionsObject', has_dart_wrapper=False),
'StyleSheet': IDLTypeInfo('StyleSheet', conversion_includes=['CSSStyleSheet']),

View file

@ -216,7 +216,8 @@ class FrogInterfaceGenerator(object):
' // Use implementation from $SUPER.\n'
' // final $TYPE $NAME;\n',
SUPER=super_getter_interface.id,
NAME=DartDomNameOfAttribute(getter), TYPE=output_type)
NAME=DartDomNameOfAttribute(getter),
TYPE=output_type)
return
self._members_emitter.Emit('\n // Shadowing definition.')
@ -231,12 +232,14 @@ class FrogInterfaceGenerator(object):
if getter and setter and input_type == output_type:
self._members_emitter.Emit(
'\n $TYPE $NAME;\n',
NAME=DartDomNameOfAttribute(getter), TYPE=output_type)
NAME=DartDomNameOfAttribute(getter),
TYPE=TypeOrVar(output_type))
return
if getter and not setter:
self._members_emitter.Emit(
'\n final $TYPE $NAME;\n',
NAME=DartDomNameOfAttribute(getter), TYPE=output_type)
'\n final $OPT_TYPE$NAME;\n',
NAME=DartDomNameOfAttribute(getter),
OPT_TYPE=TypeOrNothing(output_type))
return
self._AddAttributeUsingProperties(getter, setter)
@ -252,18 +255,19 @@ class FrogInterfaceGenerator(object):
def _AddGetter(self, attr):
# TODO(sra): Remove native body when Issue 829 fixed.
self._members_emitter.Emit(
'\n $TYPE get $NAME() native "return this.$NATIVE_NAME;";\n',
'\n $(OPT_TYPE)get $NAME() native "return this.$NATIVE_NAME;";\n',
NAME=DartDomNameOfAttribute(attr),
NATIVE_NAME=attr.id,
TYPE=self._NarrowOutputType(attr.type.id))
OPT_TYPE=TypeOrNothing(self._NarrowOutputType(attr.type.id)))
def _AddSetter(self, attr):
# TODO(sra): Remove native body when Issue 829 fixed.
self._members_emitter.Emit(
' void set $NAME($TYPE value) native "this.$NATIVE_NAME = value;";\n',
' void set $NAME($(OPT_TYPE)value)'
' native "this.$NATIVE_NAME = value;";\n',
NAME=DartDomNameOfAttribute(attr),
NATIVE_NAME=attr.id,
TYPE=self._NarrowInputType(attr.type.id))
OPT_TYPE=TypeOrNothing(self._NarrowInputType(attr.type.id)))
def _FindShadowedAttribute(self, attr):
"""Returns (attribute, superinterface) or (None, None)."""

View file

@ -1322,17 +1322,16 @@ class HtmlDartiumInterfaceGenerator(object):
PARAMETERS=constructor_info.ParametersImplementationDeclaration(),
NAMED_CONSTRUCTOR=constructor_info.name or interface_name,
ARGUMENTS=self._UnwrappedParameters(constructor_info,
len(constructor_info.arg_infos)))
len(constructor_info.param_infos)))
def _UnwrappedParameters(self, operation_info, length):
"""Returns string for an argument list that unwraps first |length|
parameters."""
def UnwrapArgInfo(arg_info):
(name, type, value) = arg_info
def UnwrapParamInfo(param_info):
# TODO(sra): Type dependent unwrapping.
return '_unwrap(%s)' % name
return '_unwrap(%s)' % param_info.name
return ', '.join(map(UnwrapArgInfo, operation_info.arg_infos[:length]))
return ', '.join(map(UnwrapParamInfo, operation_info.param_infos[:length]))
def _BaseClassName(self, interface):
if not interface.parents:
@ -1614,7 +1613,7 @@ class HtmlDartiumInterfaceGenerator(object):
def TypeCheck(name, type):
return '%s is %s' % (name, type)
if position == len(info.arg_infos):
if position == len(info.param_infos):
if len(overloads) > 1:
raise Exception('Duplicate operations ' + str(overloads))
operation = overloads[0]
@ -1629,7 +1628,7 @@ class HtmlDartiumInterfaceGenerator(object):
positive = []
negative = []
first_overload = overloads[0]
(param_name, param_type, param_default) = info.arg_infos[position]
param = info.param_infos[position]
if position < len(first_overload.arguments):
# FIXME: This will not work if the second overload has a more
@ -1637,12 +1636,12 @@ class HtmlDartiumInterfaceGenerator(object):
# void foo(Node x);
# void foo(Element x);
type = DartType(first_overload.arguments[position].type.id)
test = TypeCheck(param_name, type)
test = TypeCheck(param.name, type)
pred = lambda op: (len(op.arguments) > position and
DartType(op.arguments[position].type.id) == type)
else:
type = None
test = NullCheck(param_name)
test = NullCheck(param.name)
pred = lambda op: position >= len(op.arguments)
for overload in overloads:
@ -1674,7 +1673,7 @@ class HtmlDartiumInterfaceGenerator(object):
# will have done the test already. (It could be null too but we ignore that
# case since all the overload behave the same and we don't know which types
# in the IDL are not nullable.)
if type == param_type:
if type == param.dart_type:
return self.GenerateDispatch(
emitter, info, indent, position + 1, positive)

View file

@ -175,21 +175,24 @@ class DartInterfaceGenerator(object):
self._EmitConstant(self._members_emitter, constant)
def _EmitConstant(self, emitter, constant):
emitter.Emit('\n static final $TYPE $NAME = $VALUE;\n',
emitter.Emit('\n static final $TYPE$NAME = $VALUE;\n',
NAME=constant.id,
TYPE=DartType(constant.type.id),
TYPE=TypeOrNothing(DartType(constant.type.id),
constant.type.id),
VALUE=constant.value)
def AddAttribute(self, getter, setter):
if getter and setter and getter.type.id == setter.type.id:
self._members_emitter.Emit('\n $TYPE $NAME;\n',
NAME=DartDomNameOfAttribute(getter),
TYPE=DartType(getter.type.id));
TYPE=TypeOrVar(DartType(getter.type.id),
getter.type.id))
return
if getter and not setter:
self._members_emitter.Emit('\n final $TYPE $NAME;\n',
self._members_emitter.Emit('\n final $TYPE$NAME;\n',
NAME=DartDomNameOfAttribute(getter),
TYPE=DartType(getter.type.id));
TYPE=TypeOrNothing(DartType(getter.type.id),
getter.type.id))
return
raise Exception('Unexpected getter/setter combination %s %s' %
(getter, setter))

View file

@ -567,7 +567,7 @@ class NativeImplementationGenerator(systemwrapping.WrappingInterfaceGenerator):
if 'Custom' in info.overloads[0].ext_attrs:
parameters = info.ParametersImplementationDeclaration()
dart_declaration = '%s %s(%s)' % (info.type_name, info.name, parameters)
argument_count = 1 + len(info.arg_infos)
argument_count = 1 + len(info.param_infos)
self._GenerateNativeBinding(info.name, argument_count, dart_declaration,
'Callback', True)
return
@ -604,7 +604,7 @@ class NativeImplementationGenerator(systemwrapping.WrappingInterfaceGenerator):
native_name = info.name
if self._native_version > 1:
native_name = '%s_%s' % (native_name, self._native_version)
argument_list = ', '.join([info.arg_infos[i][0]
argument_list = ', '.join([info.param_infos[i].name
for (i, arg) in enumerate(operation.arguments)])
# Generate dispatcher.

View file

@ -391,11 +391,11 @@ class WrappingInterfaceGenerator(object):
# TODO: Type specific unwrapping.
return '__dom_unwrap(%s)' % (name)
def ArgNameAndUnwrapper(arg_info, overload_arg):
(name, type, value) = arg_info
return (name, UnwrapArgExpression(name, type))
def ArgNameAndUnwrapper(param_info, overload_arg):
return (param_info.name,
UnwrapArgExpression(param_info.name, param_info.dart_type))
names_and_unwrappers = [ArgNameAndUnwrapper(info.arg_infos[i], arg)
names_and_unwrappers = [ArgNameAndUnwrapper(info.param_infos[i], arg)
for (i, arg) in enumerate(operation.arguments)]
unwrap_args = [unwrap_arg for (_, unwrap_arg) in names_and_unwrappers]
arg_names = [name for (name, _) in names_and_unwrappers]
@ -445,7 +445,7 @@ class WrappingInterfaceGenerator(object):
return '%s is %s' % (name, type)
def ShouldGenerateSingleOperation():
if position == len(info.arg_infos):
if position == len(info.param_infos):
if len(overloads) > 1:
raise Exception('Duplicate operations ' + str(overloads))
return True
@ -480,7 +480,7 @@ class WrappingInterfaceGenerator(object):
positive = []
negative = []
first_overload = overloads[0]
(param_name, param_type, param_default) = info.arg_infos[position]
param = info.param_infos[position]
if position < len(first_overload.arguments):
# FIXME: This will not work if the second overload has a more
@ -488,11 +488,11 @@ class WrappingInterfaceGenerator(object):
# void foo(Node x);
# void foo(Element x);
type = DartType(first_overload.arguments[position].type.id)
test = TypeCheck(param_name, type)
test = TypeCheck(param.name, type)
pred = lambda op: len(op.arguments) > position and DartType(op.arguments[position].type.id) == type
else:
type = None
test = NullCheck(param_name)
test = NullCheck(param.name)
pred = lambda op: position >= len(op.arguments)
for overload in overloads:
@ -524,11 +524,11 @@ class WrappingInterfaceGenerator(object):
# will have done the test already. (It could be null too but we ignore that
# case since all the overload behave the same and we don't know which types
# in the IDL are not nullable.)
if type == param_type:
if type == param.dart_type:
return self.GenerateDispatch(
emitter, info, indent, position + 1, positive)
# Otherwise the overloads have the same type but the type is a substype of
# Otherwise the overloads have the same type but the type is a subtype of
# the method's synthesized formal parameter. e.g we have overloads f(X) and
# f(Y), implemented by the synthesized method f(Z) where X<Z and Y<Z. The
# dispatch has removed f(X), leaving only f(Y), but there is no guarantee

View file

@ -990,7 +990,7 @@ class _AudioContextImpl extends _EventTargetImpl implements AudioContext {
return _wrap(_ptr.createBiquadFilter());
}
AudioBuffer createBuffer(var buffer_OR_numberOfChannels, var mixToMono_OR_numberOfFrames, [num sampleRate = null]) {
AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, [num sampleRate = null]) {
if (buffer_OR_numberOfChannels is ArrayBuffer) {
if (mixToMono_OR_numberOfFrames is bool) {
if (sampleRate === null) {
@ -1368,7 +1368,7 @@ class _BlobImpl extends _DOMTypeBase implements Blob {
class _BlobBuilderImpl extends _DOMTypeBase implements BlobBuilder {
_BlobBuilderImpl._wrap(ptr) : super._wrap(ptr);
void append(var arrayBuffer_OR_blob_OR_value, [String endings = null]) {
void append(arrayBuffer_OR_blob_OR_value, [String endings = null]) {
if (arrayBuffer_OR_blob_OR_value is Blob) {
if (endings === null) {
_ptr.append(_unwrap(arrayBuffer_OR_blob_OR_value));
@ -4949,7 +4949,7 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
return;
}
ImageData createImageData(var imagedata_OR_sw, [num sh = null]) {
ImageData createImageData(imagedata_OR_sw, [num sh = null]) {
if (imagedata_OR_sw is ImageData) {
if (sh === null) {
return _wrap(_ptr.createImageData(_unwrap(imagedata_OR_sw)));
@ -4966,7 +4966,7 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
return _wrap(_ptr.createLinearGradient(_unwrap(x0), _unwrap(y0), _unwrap(x1), _unwrap(y1)));
}
CanvasPattern createPattern(var canvas_OR_image, String repetitionType) {
CanvasPattern createPattern(canvas_OR_image, String repetitionType) {
if (canvas_OR_image is CanvasElement) {
return _wrap(_ptr.createPattern(_unwrap(canvas_OR_image), _unwrap(repetitionType)));
} else {
@ -4981,7 +4981,7 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
return _wrap(_ptr.createRadialGradient(_unwrap(x0), _unwrap(y0), _unwrap(r0), _unwrap(x1), _unwrap(y1), _unwrap(r1)));
}
void drawImage(var canvas_OR_image_OR_video, num sx_OR_x, num sy_OR_y, [num sw_OR_width = null, num height_OR_sh = null, num dx = null, num dy = null, num dw = null, num dh = null]) {
void drawImage(canvas_OR_image_OR_video, num sx_OR_x, num sy_OR_y, [num sw_OR_width = null, num height_OR_sh = null, num dx = null, num dy = null, num dw = null, num dh = null]) {
if (canvas_OR_image_OR_video is ImageElement) {
if (sw_OR_width === null) {
if (height_OR_sh === null) {
@ -5299,7 +5299,7 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
return;
}
void setFillColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) {
void setFillColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) {
if (c_OR_color_OR_grayLevel_OR_r is String) {
if (alpha_OR_g_OR_m === null) {
if (b_OR_y === null) {
@ -5374,7 +5374,7 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
return;
}
void setShadow(num width, num height, num blur, [var c_OR_color_OR_grayLevel_OR_r = null, num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) {
void setShadow(num width, num height, num blur, [c_OR_color_OR_grayLevel_OR_r = null, num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) {
if (c_OR_color_OR_grayLevel_OR_r === null) {
if (alpha_OR_g_OR_m === null) {
if (b_OR_y === null) {
@ -5442,7 +5442,7 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
throw "Incorrect number or type of arguments";
}
void setStrokeColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) {
void setStrokeColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) {
if (c_OR_color_OR_grayLevel_OR_r is String) {
if (alpha_OR_g_OR_m === null) {
if (b_OR_y === null) {
@ -6190,7 +6190,7 @@ class _DOMTokenListImpl extends _DOMTypeBase implements DOMTokenList {
class _DOMURLImpl extends _DOMTypeBase implements DOMURL {
_DOMURLImpl._wrap(ptr) : super._wrap(ptr);
String createObjectURL(var blob_OR_stream) {
String createObjectURL(blob_OR_stream) {
if (blob_OR_stream is MediaStream) {
return _wrap(_ptr.createObjectURL(_unwrap(blob_OR_stream)));
} else {
@ -6244,7 +6244,7 @@ class _DataTransferItemListImpl extends _DOMTypeBase implements DataTransferItem
int get length() => _wrap(_ptr.length);
void add(var data_OR_file, [String type = null]) {
void add(data_OR_file, [String type = null]) {
if (data_OR_file is File) {
if (type === null) {
_ptr.add(_unwrap(data_OR_file));
@ -10041,13 +10041,13 @@ class _IDBCursorImpl extends _DOMTypeBase implements IDBCursor {
int get direction() => _wrap(_ptr.direction);
IDBKey get key() => _wrap(_ptr.key);
Dynamic get key() => _wrap(_ptr.key);
IDBKey get primaryKey() => _wrap(_ptr.primaryKey);
Dynamic get primaryKey() => _wrap(_ptr.primaryKey);
IDBAny get source() => _wrap(_ptr.source);
Dynamic get source() => _wrap(_ptr.source);
void continueFunction([IDBKey key = null]) {
void continueFunction([/*IDBKey*/ key = null]) {
if (key === null) {
_ptr.continueFunction();
return;
@ -10061,7 +10061,7 @@ class _IDBCursorImpl extends _DOMTypeBase implements IDBCursor {
return _wrap(_ptr.delete());
}
IDBRequest update(Dynamic value) {
IDBRequest update(/*SerializedScriptValue*/ value) {
return _wrap(_ptr.update(_unwrap(value)));
}
}
@ -10069,7 +10069,7 @@ class _IDBCursorImpl extends _DOMTypeBase implements IDBCursor {
class _IDBCursorWithValueImpl extends _IDBCursorImpl implements IDBCursorWithValue {
_IDBCursorWithValueImpl._wrap(ptr) : super._wrap(ptr);
IDBAny get value() => _wrap(_ptr.value);
Dynamic get value() => _wrap(_ptr.value);
}
class _IDBDatabaseImpl extends _EventTargetImpl implements IDBDatabase {
@ -10128,7 +10128,7 @@ class _IDBDatabaseImpl extends _EventTargetImpl implements IDBDatabase {
return _wrap(_ptr.setVersion(_unwrap(version)));
}
IDBTransaction transaction(var storeName_OR_storeNames, [int mode = null]) {
IDBTransaction transaction(storeName_OR_storeNames, [int mode = null]) {
if (storeName_OR_storeNames is List<String>) {
if (mode === null) {
return _wrap(_ptr.transaction(_unwrap(storeName_OR_storeNames)));
@ -10175,7 +10175,7 @@ class _IDBDatabaseExceptionImpl extends _DOMTypeBase implements IDBDatabaseExcep
class _IDBFactoryImpl extends _DOMTypeBase implements IDBFactory {
_IDBFactoryImpl._wrap(ptr) : super._wrap(ptr);
int cmp(IDBKey first, IDBKey second) {
int cmp(/*IDBKey*/ first, /*IDBKey*/ second) {
return _wrap(_ptr.cmp(_unwrap(first), _unwrap(second)));
}
@ -10205,26 +10205,23 @@ class _IDBIndexImpl extends _DOMTypeBase implements IDBIndex {
bool get unique() => _wrap(_ptr.unique);
IDBRequest count([var key_OR_range = null]) {
IDBRequest count([key_OR_range = null]) {
if (key_OR_range === null) {
return _wrap(_ptr.count());
} else {
if (key_OR_range is IDBKeyRange) {
return _wrap(_ptr.count(_unwrap(key_OR_range)));
} else {
if (key_OR_range is IDBKey) {
return _wrap(_ptr.count(_unwrap(key_OR_range)));
}
return _wrap(_ptr.count(_unwrap(key_OR_range)));
}
}
throw "Incorrect number or type of arguments";
}
IDBRequest getObject(IDBKey key) {
IDBRequest getObject(/*IDBKey*/ key) {
return _wrap(_ptr.getObject(_unwrap(key)));
}
IDBRequest getKey(IDBKey key) {
IDBRequest getKey(/*IDBKey*/ key) {
return _wrap(_ptr.getKey(_unwrap(key)));
}
@ -10266,15 +10263,15 @@ class _IDBKeyImpl extends _DOMTypeBase implements IDBKey {
class _IDBKeyRangeImpl extends _DOMTypeBase implements IDBKeyRange {
_IDBKeyRangeImpl._wrap(ptr) : super._wrap(ptr);
IDBKey get lower() => _wrap(_ptr.lower);
Dynamic get lower() => _wrap(_ptr.lower);
bool get lowerOpen() => _wrap(_ptr.lowerOpen);
IDBKey get upper() => _wrap(_ptr.upper);
Dynamic get upper() => _wrap(_ptr.upper);
bool get upperOpen() => _wrap(_ptr.upperOpen);
IDBKeyRange bound(IDBKey lower, IDBKey upper, [bool lowerOpen = null, bool upperOpen = null]) {
IDBKeyRange bound(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen = null, bool upperOpen = null]) {
if (lowerOpen === null) {
if (upperOpen === null) {
return _wrap(_ptr.bound(_unwrap(lower), _unwrap(upper)));
@ -10289,7 +10286,7 @@ class _IDBKeyRangeImpl extends _DOMTypeBase implements IDBKeyRange {
throw "Incorrect number or type of arguments";
}
IDBKeyRange lowerBound(IDBKey bound, [bool open = null]) {
IDBKeyRange lowerBound(/*IDBKey*/ bound, [bool open = null]) {
if (open === null) {
return _wrap(_ptr.lowerBound(_unwrap(bound)));
} else {
@ -10297,11 +10294,11 @@ class _IDBKeyRangeImpl extends _DOMTypeBase implements IDBKeyRange {
}
}
IDBKeyRange only(IDBKey value) {
IDBKeyRange only(/*IDBKey*/ value) {
return _wrap(_ptr.only(_unwrap(value)));
}
IDBKeyRange upperBound(IDBKey bound, [bool open = null]) {
IDBKeyRange upperBound(/*IDBKey*/ bound, [bool open = null]) {
if (open === null) {
return _wrap(_ptr.upperBound(_unwrap(bound)));
} else {
@ -10321,7 +10318,7 @@ class _IDBObjectStoreImpl extends _DOMTypeBase implements IDBObjectStore {
IDBTransaction get transaction() => _wrap(_ptr.transaction);
IDBRequest add(Dynamic value, [IDBKey key = null]) {
IDBRequest add(/*SerializedScriptValue*/ value, [/*IDBKey*/ key = null]) {
if (key === null) {
return _wrap(_ptr.add(_unwrap(value)));
} else {
@ -10333,34 +10330,28 @@ class _IDBObjectStoreImpl extends _DOMTypeBase implements IDBObjectStore {
return _wrap(_ptr.clear());
}
IDBRequest count([var key_OR_range = null]) {
IDBRequest count([key_OR_range = null]) {
if (key_OR_range === null) {
return _wrap(_ptr.count());
} else {
if (key_OR_range is IDBKeyRange) {
return _wrap(_ptr.count(_unwrap(key_OR_range)));
} else {
if (key_OR_range is IDBKey) {
return _wrap(_ptr.count(_unwrap(key_OR_range)));
}
return _wrap(_ptr.count(_unwrap(key_OR_range)));
}
}
throw "Incorrect number or type of arguments";
}
IDBIndex createIndex(String name, String keyPath) {
return _wrap(_ptr.createIndex(_unwrap(name), _unwrap(keyPath)));
}
IDBRequest delete(var key_OR_keyRange) {
IDBRequest delete(key_OR_keyRange) {
if (key_OR_keyRange is IDBKeyRange) {
return _wrap(_ptr.delete(_unwrap(key_OR_keyRange)));
} else {
if (key_OR_keyRange is IDBKey) {
return _wrap(_ptr.delete(_unwrap(key_OR_keyRange)));
}
return _wrap(_ptr.delete(_unwrap(key_OR_keyRange)));
}
throw "Incorrect number or type of arguments";
}
void deleteIndex(String name) {
@ -10368,7 +10359,7 @@ class _IDBObjectStoreImpl extends _DOMTypeBase implements IDBObjectStore {
return;
}
IDBRequest getObject(IDBKey key) {
IDBRequest getObject(/*IDBKey*/ key) {
return _wrap(_ptr.getObject(_unwrap(key)));
}
@ -10391,7 +10382,7 @@ class _IDBObjectStoreImpl extends _DOMTypeBase implements IDBObjectStore {
throw "Incorrect number or type of arguments";
}
IDBRequest put(Dynamic value, [IDBKey key = null]) {
IDBRequest put(/*SerializedScriptValue*/ value, [/*IDBKey*/ key = null]) {
if (key === null) {
return _wrap(_ptr.put(_unwrap(value)));
} else {
@ -10412,9 +10403,9 @@ class _IDBRequestImpl extends _EventTargetImpl implements IDBRequest {
int get readyState() => _wrap(_ptr.readyState);
IDBAny get result() => _wrap(_ptr.result);
Dynamic get result() => _wrap(_ptr.result);
IDBAny get source() => _wrap(_ptr.source);
Dynamic get source() => _wrap(_ptr.source);
IDBTransaction get transaction() => _wrap(_ptr.transaction);
@ -20254,7 +20245,7 @@ class _WebGLRenderingContextImpl extends _CanvasRenderingContextImpl implements
return;
}
void bufferData(int target, var data_OR_size, int usage) {
void bufferData(int target, data_OR_size, int usage) {
if (data_OR_size is ArrayBuffer) {
_ptr.bufferData(_unwrap(target), _unwrap(data_OR_size), _unwrap(usage));
return;
@ -20272,7 +20263,7 @@ class _WebGLRenderingContextImpl extends _CanvasRenderingContextImpl implements
throw "Incorrect number or type of arguments";
}
void bufferSubData(int target, int offset, var data) {
void bufferSubData(int target, int offset, data) {
if (data is ArrayBuffer) {
_ptr.bufferSubData(_unwrap(target), _unwrap(offset), _unwrap(data));
return;
@ -20683,7 +20674,7 @@ class _WebGLRenderingContextImpl extends _CanvasRenderingContextImpl implements
return;
}
void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, var border_OR_canvas_OR_image_OR_pixels_OR_video, [int format = null, int type = null, 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 = null, int type = null, ArrayBufferView pixels = null]) {
if (border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData) {
if (format === null) {
if (type === null) {
@ -20745,7 +20736,7 @@ class _WebGLRenderingContextImpl extends _CanvasRenderingContextImpl implements
return;
}
void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, var canvas_OR_format_OR_image_OR_pixels_OR_video, [int type = null, 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 = null, ArrayBufferView pixels = null]) {
if (canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData) {
if (type === null) {
if (pixels === null) {
@ -21363,7 +21354,7 @@ class _WindowImpl extends _EventTargetImpl implements Window {
}
}
void postMessage(Dynamic message, String targetOrigin, [List messagePorts = null]) {
void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts = null]) {
if (messagePorts === null) {
_ptr.postMessage(_unwrap(message), _unwrap(targetOrigin));
return;
@ -21468,7 +21459,7 @@ class _WindowImpl extends _EventTargetImpl implements Window {
return _wrap(_ptr.webkitConvertPointFromPageToNode(_unwrap(node), _unwrap(p)));
}
void webkitPostMessage(Dynamic message, String targetOrigin, [List transferList = null]) {
void webkitPostMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List transferList = null]) {
if (transferList === null) {
_ptr.webkitPostMessage(_unwrap(message), _unwrap(targetOrigin));
return;
@ -21672,7 +21663,7 @@ class _WorkerImpl extends _AbstractWorkerImpl implements Worker {
return _on;
}
void postMessage(Dynamic message, [List messagePorts = null]) {
void postMessage(/*SerializedScriptValue*/ message, [List messagePorts = null]) {
if (messagePorts === null) {
_ptr.postMessage(_unwrap(message));
return;
@ -21687,7 +21678,7 @@ class _WorkerImpl extends _AbstractWorkerImpl implements Worker {
return;
}
void webkitPostMessage(Dynamic message, [List messagePorts = null]) {
void webkitPostMessage(/*SerializedScriptValue*/ message, [List messagePorts = null]) {
if (messagePorts === null) {
_ptr.webkitPostMessage(_unwrap(message));
return;
@ -21984,7 +21975,7 @@ class _XMLHttpRequestImpl extends _EventTargetImpl implements XMLHttpRequest {
}
}
void send([var data = null]) {
void send([data = null]) {
if (data === null) {
_ptr.send();
return;
@ -22917,7 +22908,7 @@ interface AudioContext extends EventTarget {
BiquadFilterNode createBiquadFilter();
/** @domName AudioContext.createBuffer */
AudioBuffer createBuffer(var buffer_OR_numberOfChannels, var mixToMono_OR_numberOfFrames, [num sampleRate]);
AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, [num sampleRate]);
/** @domName AudioContext.createBufferSource */
AudioBufferSourceNode createBufferSource();
@ -23329,7 +23320,7 @@ interface BlobBuilder default _BlobBuilderFactoryProvider {
BlobBuilder();
/** @domName WebKitBlobBuilder.append */
void append(var arrayBuffer_OR_blob_OR_value, [String endings]);
void append(arrayBuffer_OR_blob_OR_value, [String endings]);
/** @domName WebKitBlobBuilder.getBlob */
Blob getBlob([String contentType]);
@ -26017,19 +26008,19 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void closePath();
/** @domName CanvasRenderingContext2D.createImageData */
ImageData createImageData(var imagedata_OR_sw, [num sh]);
ImageData createImageData(imagedata_OR_sw, [num sh]);
/** @domName CanvasRenderingContext2D.createLinearGradient */
CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1);
/** @domName CanvasRenderingContext2D.createPattern */
CanvasPattern createPattern(var canvas_OR_image, String repetitionType);
CanvasPattern createPattern(canvas_OR_image, String repetitionType);
/** @domName CanvasRenderingContext2D.createRadialGradient */
CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1);
/** @domName CanvasRenderingContext2D.drawImage */
void drawImage(var 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]);
void 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]);
/** @domName CanvasRenderingContext2D.drawImageFromRect */
void drawImageFromRect(ImageElement image, [num sx, num sy, num sw, num sh, num dx, num dy, num dw, num dh, String compositeOperation]);
@ -26086,7 +26077,7 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void setCompositeOperation(String compositeOperation);
/** @domName CanvasRenderingContext2D.setFillColor */
void setFillColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setFillColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
/** @domName CanvasRenderingContext2D.setLineCap */
void setLineCap(String cap);
@ -26101,10 +26092,10 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void setMiterLimit(num limit);
/** @domName CanvasRenderingContext2D.setShadow */
void setShadow(num width, num height, num blur, [var c_OR_color_OR_grayLevel_OR_r, num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setShadow(num width, num height, num blur, [c_OR_color_OR_grayLevel_OR_r, num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
/** @domName CanvasRenderingContext2D.setStrokeColor */
void setStrokeColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setStrokeColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
/** @domName CanvasRenderingContext2D.setTransform */
void setTransform(num m11, num m12, num m21, num m22, num dx, num dy);
@ -26905,7 +26896,7 @@ interface DOMURL default _DOMURLFactoryProvider {
DOMURL();
/** @domName DOMURL.createObjectURL */
String createObjectURL(var blob_OR_stream);
String createObjectURL(blob_OR_stream);
/** @domName DOMURL.revokeObjectURL */
void revokeObjectURL(String url);
@ -26947,7 +26938,7 @@ interface DataTransferItemList {
final int length;
/** @domName DataTransferItemList.add */
void add(var data_OR_file, [String type]);
void add(data_OR_file, [String type]);
/** @domName DataTransferItemList.clear */
void clear();
@ -27039,7 +27030,7 @@ interface Database {
// WARNING: Do not edit - generated code.
typedef bool DatabaseCallback(var database);
typedef bool DatabaseCallback(database);
// 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
// BSD-style license that can be found in the LICENSE file.
@ -29321,22 +29312,22 @@ interface IDBCursor {
final int direction;
/** @domName IDBCursor.key */
final IDBKey key;
final Dynamic key;
/** @domName IDBCursor.primaryKey */
final IDBKey primaryKey;
final Dynamic primaryKey;
/** @domName IDBCursor.source */
final IDBAny source;
final Dynamic source;
/** @domName IDBCursor.continueFunction */
void continueFunction([IDBKey key]);
void continueFunction([/*IDBKey*/ key]);
/** @domName IDBCursor.delete */
IDBRequest delete();
/** @domName IDBCursor.update */
IDBRequest update(Dynamic value);
IDBRequest update(/*SerializedScriptValue*/ value);
}
// 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
@ -29348,7 +29339,7 @@ interface IDBCursor {
interface IDBCursorWithValue extends IDBCursor {
/** @domName IDBCursorWithValue.value */
final IDBAny value;
final Dynamic value;
}
// 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
@ -29395,7 +29386,7 @@ interface IDBDatabase extends EventTarget {
IDBVersionChangeRequest setVersion(String version);
/** @domName IDBDatabase.transaction */
IDBTransaction transaction(var storeName_OR_storeNames, [int mode]);
IDBTransaction transaction(storeName_OR_storeNames, [int mode]);
}
interface IDBDatabaseEvents extends Events {
@ -29463,7 +29454,7 @@ interface IDBDatabaseException {
interface IDBFactory {
/** @domName IDBFactory.cmp */
int cmp(IDBKey first, IDBKey second);
int cmp(/*IDBKey*/ first, /*IDBKey*/ second);
/** @domName IDBFactory.deleteDatabase */
IDBVersionChangeRequest deleteDatabase(String name);
@ -29499,13 +29490,13 @@ interface IDBIndex {
final bool unique;
/** @domName IDBIndex.count */
IDBRequest count([var key_OR_range]);
IDBRequest count([key_OR_range]);
/** @domName IDBIndex.getObject */
IDBRequest getObject(IDBKey key);
IDBRequest getObject(/*IDBKey*/ key);
/** @domName IDBIndex.getKey */
IDBRequest getKey(IDBKey key);
IDBRequest getKey(/*IDBKey*/ key);
/** @domName IDBIndex.openCursor */
IDBRequest openCursor([IDBKeyRange range, int direction]);
@ -29532,28 +29523,28 @@ interface IDBKey {
interface IDBKeyRange {
/** @domName IDBKeyRange.lower */
final IDBKey lower;
final Dynamic lower;
/** @domName IDBKeyRange.lowerOpen */
final bool lowerOpen;
/** @domName IDBKeyRange.upper */
final IDBKey upper;
final Dynamic upper;
/** @domName IDBKeyRange.upperOpen */
final bool upperOpen;
/** @domName IDBKeyRange.bound */
IDBKeyRange bound(IDBKey lower, IDBKey upper, [bool lowerOpen, bool upperOpen]);
IDBKeyRange bound(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]);
/** @domName IDBKeyRange.lowerBound */
IDBKeyRange lowerBound(IDBKey bound, [bool open]);
IDBKeyRange lowerBound(/*IDBKey*/ bound, [bool open]);
/** @domName IDBKeyRange.only */
IDBKeyRange only(IDBKey value);
IDBKeyRange only(/*IDBKey*/ value);
/** @domName IDBKeyRange.upperBound */
IDBKeyRange upperBound(IDBKey bound, [bool open]);
IDBKeyRange upperBound(/*IDBKey*/ bound, [bool open]);
}
// 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
@ -29577,25 +29568,25 @@ interface IDBObjectStore {
final IDBTransaction transaction;
/** @domName IDBObjectStore.add */
IDBRequest add(Dynamic value, [IDBKey key]);
IDBRequest add(/*SerializedScriptValue*/ value, [/*IDBKey*/ key]);
/** @domName IDBObjectStore.clear */
IDBRequest clear();
/** @domName IDBObjectStore.count */
IDBRequest count([var key_OR_range]);
IDBRequest count([key_OR_range]);
/** @domName IDBObjectStore.createIndex */
IDBIndex createIndex(String name, String keyPath);
/** @domName IDBObjectStore.delete */
IDBRequest delete(var key_OR_keyRange);
IDBRequest delete(key_OR_keyRange);
/** @domName IDBObjectStore.deleteIndex */
void deleteIndex(String name);
/** @domName IDBObjectStore.getObject */
IDBRequest getObject(IDBKey key);
IDBRequest getObject(/*IDBKey*/ key);
/** @domName IDBObjectStore.index */
IDBIndex index(String name);
@ -29604,7 +29595,7 @@ interface IDBObjectStore {
IDBRequest openCursor([IDBKeyRange range, int direction]);
/** @domName IDBObjectStore.put */
IDBRequest put(Dynamic value, [IDBKey key]);
IDBRequest put(/*SerializedScriptValue*/ value, [/*IDBKey*/ key]);
}
// 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
@ -29631,10 +29622,10 @@ interface IDBRequest extends EventTarget {
final int readyState;
/** @domName IDBRequest.result */
final IDBAny result;
final Dynamic result;
/** @domName IDBRequest.source */
final IDBAny source;
final Dynamic source;
/** @domName IDBRequest.transaction */
final IDBTransaction transaction;
@ -38798,10 +38789,10 @@ interface WebGLRenderingContext extends CanvasRenderingContext {
void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha);
/** @domName WebGLRenderingContext.bufferData */
void bufferData(int target, var data_OR_size, int usage);
void bufferData(int target, data_OR_size, int usage);
/** @domName WebGLRenderingContext.bufferSubData */
void bufferSubData(int target, int offset, var data);
void bufferSubData(int target, int offset, data);
/** @domName WebGLRenderingContext.checkFramebufferStatus */
int checkFramebufferStatus(int target);
@ -39065,7 +39056,7 @@ interface WebGLRenderingContext extends CanvasRenderingContext {
void stencilOpSeparate(int face, int fail, int zfail, int zpass);
/** @domName WebGLRenderingContext.texImage2D */
void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, var border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, ArrayBufferView pixels]);
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]);
/** @domName WebGLRenderingContext.texParameterf */
void texParameterf(int target, int pname, num param);
@ -39074,7 +39065,7 @@ interface WebGLRenderingContext extends CanvasRenderingContext {
void texParameteri(int target, int pname, int param);
/** @domName WebGLRenderingContext.texSubImage2D */
void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, var canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, ArrayBufferView pixels]);
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]);
/** @domName WebGLRenderingContext.uniform1f */
void uniform1f(WebGLUniformLocation location, num x);
@ -39669,7 +39660,7 @@ interface Window extends EventTarget {
Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]);
/** @domName DOMWindow.postMessage */
void postMessage(Dynamic message, String targetOrigin, [List messagePorts]);
void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]);
/** @domName DOMWindow.print */
void print();
@ -39723,7 +39714,7 @@ interface Window extends EventTarget {
Point webkitConvertPointFromPageToNode(Node node, Point p);
/** @domName DOMWindow.webkitPostMessage */
void webkitPostMessage(Dynamic message, String targetOrigin, [List transferList]);
void webkitPostMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List transferList]);
/** @domName DOMWindow.webkitRequestAnimationFrame */
int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback);
@ -39903,13 +39894,13 @@ interface Worker extends AbstractWorker default _WorkerFactoryProvider {
WorkerEvents get on();
/** @domName Worker.postMessage */
void postMessage(Dynamic message, [List messagePorts]);
void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]);
/** @domName Worker.terminate */
void terminate();
/** @domName Worker.webkitPostMessage */
void webkitPostMessage(Dynamic message, [List messagePorts]);
void webkitPostMessage(/*SerializedScriptValue*/ message, [List messagePorts]);
}
interface WorkerEvents extends AbstractWorkerEvents {
@ -40146,7 +40137,7 @@ interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvi
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
/** @domName XMLHttpRequest.send */
void send([var data]);
void send([data]);
/** @domName XMLHttpRequest.setRequestHeader */
void setRequestHeader(String header, String value);

View file

@ -292,7 +292,7 @@ class _AudioContextImpl extends _EventTargetImpl implements AudioContext native
_BiquadFilterNodeImpl createBiquadFilter() native;
_AudioBufferImpl createBuffer(var buffer_OR_numberOfChannels, var mixToMono_OR_numberOfFrames, [num sampleRate = null]) native;
_AudioBufferImpl createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, [num sampleRate = null]) native;
_AudioBufferSourceNodeImpl createBufferSource() native;
@ -522,7 +522,7 @@ class _BlobImpl implements Blob native "*Blob" {
class _BlobBuilderImpl implements BlobBuilder native "*WebKitBlobBuilder" {
void append(var arrayBuffer_OR_blob_OR_value, [String endings = null]) native;
void append(arrayBuffer_OR_blob_OR_value, [String endings = null]) native;
_BlobImpl getBlob([String contentType = null]) native;
}
@ -3917,15 +3917,15 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
void closePath() native;
_ImageDataImpl createImageData(var imagedata_OR_sw, [num sh = null]) native;
_ImageDataImpl createImageData(imagedata_OR_sw, [num sh = null]) native;
_CanvasGradientImpl createLinearGradient(num x0, num y0, num x1, num y1) native;
_CanvasPatternImpl createPattern(var canvas_OR_image, String repetitionType) native;
_CanvasPatternImpl createPattern(canvas_OR_image, String repetitionType) native;
_CanvasGradientImpl createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1) native;
void drawImage(var canvas_OR_image_OR_video, num sx_OR_x, num sy_OR_y, [num sw_OR_width = null, num height_OR_sh = null, num dx = null, num dy = null, num dw = null, num dh = null]) native;
void drawImage(canvas_OR_image_OR_video, num sx_OR_x, num sy_OR_y, [num sw_OR_width = null, num height_OR_sh = null, num dx = null, num dy = null, num dw = null, num dh = null]) native;
void drawImageFromRect(_ImageElementImpl image, [num sx = null, num sy = null, num sw = null, num sh = null, num dx = null, num dy = null, num dw = null, num dh = null, String compositeOperation = null]) native;
@ -3963,7 +3963,7 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
void setCompositeOperation(String compositeOperation) native;
void setFillColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setFillColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setLineCap(String cap) native;
@ -3973,9 +3973,9 @@ class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
void setMiterLimit(num limit) native;
void setShadow(num width, num height, num blur, [var c_OR_color_OR_grayLevel_OR_r = null, num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setShadow(num width, num height, num blur, [c_OR_color_OR_grayLevel_OR_r = null, num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setStrokeColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setStrokeColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, num a = null]) native;
void setTransform(num m11, num m12, num m21, num m22, num dx, num dy) native;
@ -4451,7 +4451,7 @@ class _DOMTokenListImpl implements DOMTokenList native "*DOMTokenList" {
class _DOMURLImpl implements DOMURL native "*DOMURL" {
String createObjectURL(var blob_OR_stream) native;
String createObjectURL(blob_OR_stream) native;
void revokeObjectURL(String url) native;
}
@ -4473,7 +4473,7 @@ class _DataTransferItemListImpl implements DataTransferItemList native "*DataTra
final int length;
void add(var data_OR_file, [String type = null]) native;
void add(data_OR_file, [String type = null]) native;
void clear() native;
@ -7351,22 +7351,22 @@ class _IDBCursorImpl implements IDBCursor native "*IDBCursor" {
final int direction;
final _IDBKeyImpl key;
final Dynamic key;
final _IDBKeyImpl primaryKey;
final Dynamic primaryKey;
final _IDBAnyImpl source;
final Dynamic source;
void continueFunction([_IDBKeyImpl key = null]) native "continue";
void continueFunction([key = null]) native "continue";
_IDBRequestImpl delete() native;
_IDBRequestImpl update(Dynamic value) native;
_IDBRequestImpl update(value) native;
}
class _IDBCursorWithValueImpl extends _IDBCursorImpl implements IDBCursorWithValue native "*IDBCursorWithValue" {
final _IDBAnyImpl value;
final Dynamic value;
}
class _IDBDatabaseImpl extends _EventTargetImpl implements IDBDatabase native "*IDBDatabase" {
@ -7394,7 +7394,7 @@ class _IDBDatabaseImpl extends _EventTargetImpl implements IDBDatabase native "*
_IDBVersionChangeRequestImpl setVersion(String version) native;
_IDBTransactionImpl transaction(var storeName_OR_storeNames, [int mode = null]) native;
_IDBTransactionImpl transaction(storeName_OR_storeNames, [int mode = null]) native;
}
class _IDBDatabaseEventsImpl extends _EventsImpl implements IDBDatabaseEvents {
@ -7446,7 +7446,7 @@ class _IDBDatabaseExceptionImpl implements IDBDatabaseException native "*IDBData
class _IDBFactoryImpl implements IDBFactory native "*IDBFactory" {
int cmp(_IDBKeyImpl first, _IDBKeyImpl second) native;
int cmp(first, second) native;
_IDBVersionChangeRequestImpl deleteDatabase(String name) native;
@ -7467,11 +7467,11 @@ class _IDBIndexImpl implements IDBIndex native "*IDBIndex" {
final bool unique;
_IDBRequestImpl count([var key_OR_range = null]) native;
_IDBRequestImpl count([key_OR_range = null]) native;
_IDBRequestImpl getObject(_IDBKeyImpl key) native "get";
_IDBRequestImpl getObject(key) native "get";
_IDBRequestImpl getKey(_IDBKeyImpl key) native;
_IDBRequestImpl getKey(key) native;
_IDBRequestImpl openCursor([_IDBKeyRangeImpl range = null, int direction = null]) native;
@ -7483,21 +7483,21 @@ class _IDBKeyImpl implements IDBKey native "*IDBKey" {
class _IDBKeyRangeImpl implements IDBKeyRange native "*IDBKeyRange" {
final _IDBKeyImpl lower;
final Dynamic lower;
final bool lowerOpen;
final _IDBKeyImpl upper;
final Dynamic upper;
final bool upperOpen;
_IDBKeyRangeImpl bound(_IDBKeyImpl lower, _IDBKeyImpl upper, [bool lowerOpen = null, bool upperOpen = null]) native;
_IDBKeyRangeImpl bound(lower, upper, [bool lowerOpen = null, bool upperOpen = null]) native;
_IDBKeyRangeImpl lowerBound(_IDBKeyImpl bound, [bool open = null]) native;
_IDBKeyRangeImpl lowerBound(bound, [bool open = null]) native;
_IDBKeyRangeImpl only(_IDBKeyImpl value) native;
_IDBKeyRangeImpl only(value) native;
_IDBKeyRangeImpl upperBound(_IDBKeyImpl bound, [bool open = null]) native;
_IDBKeyRangeImpl upperBound(bound, [bool open = null]) native;
}
class _IDBObjectStoreImpl implements IDBObjectStore native "*IDBObjectStore" {
@ -7510,25 +7510,25 @@ class _IDBObjectStoreImpl implements IDBObjectStore native "*IDBObjectStore" {
final _IDBTransactionImpl transaction;
_IDBRequestImpl add(Dynamic value, [_IDBKeyImpl key = null]) native;
_IDBRequestImpl add(value, [key = null]) native;
_IDBRequestImpl clear() native;
_IDBRequestImpl count([var key_OR_range = null]) native;
_IDBRequestImpl count([key_OR_range = null]) native;
_IDBIndexImpl createIndex(String name, String keyPath) native;
_IDBRequestImpl delete(var key_OR_keyRange) native;
_IDBRequestImpl delete(key_OR_keyRange) native;
void deleteIndex(String name) native;
_IDBRequestImpl getObject(_IDBKeyImpl key) native "get";
_IDBRequestImpl getObject(key) native "get";
_IDBIndexImpl index(String name) native;
_IDBRequestImpl openCursor([_IDBKeyRangeImpl range = null, int direction = null]) native;
_IDBRequestImpl put(Dynamic value, [_IDBKeyImpl key = null]) native;
_IDBRequestImpl put(value, [key = null]) native;
}
class _IDBRequestImpl extends _EventTargetImpl implements IDBRequest native "*IDBRequest" {
@ -7544,9 +7544,9 @@ class _IDBRequestImpl extends _EventTargetImpl implements IDBRequest native "*ID
final int readyState;
final _IDBAnyImpl result;
final Dynamic result;
final _IDBAnyImpl source;
final Dynamic source;
final _IDBTransactionImpl transaction;
@ -15737,9 +15737,9 @@ class _WebGLRenderingContextImpl extends _CanvasRenderingContextImpl implements
void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) native;
void bufferData(int target, var data_OR_size, int usage) native;
void bufferData(int target, data_OR_size, int usage) native;
void bufferSubData(int target, int offset, var data) native;
void bufferSubData(int target, int offset, data) native;
int checkFramebufferStatus(int target) native;
@ -15915,13 +15915,13 @@ class _WebGLRenderingContextImpl extends _CanvasRenderingContextImpl implements
void stencilOpSeparate(int face, int fail, int zfail, int zpass) native;
void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, var border_OR_canvas_OR_image_OR_pixels_OR_video, [int format = null, int type = null, _ArrayBufferViewImpl pixels = null]) native;
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 = null, int type = null, _ArrayBufferViewImpl pixels = null]) native;
void texParameterf(int target, int pname, num param) native;
void texParameteri(int target, int pname, int param) native;
void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, var canvas_OR_format_OR_image_OR_pixels_OR_video, [int type = null, _ArrayBufferViewImpl pixels = null]) native;
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 = null, _ArrayBufferViewImpl pixels = null]) native;
void uniform1f(_WebGLUniformLocationImpl location, num x) native;
@ -16301,7 +16301,7 @@ class _WindowImpl extends _EventTargetImpl implements Window native "@*DOMWindow
_DatabaseImpl openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback = null]) native;
void postMessage(Dynamic message, String targetOrigin, [List messagePorts = null]) native;
void postMessage(message, String targetOrigin, [List messagePorts = null]) native;
void print() native;
@ -16337,7 +16337,7 @@ class _WindowImpl extends _EventTargetImpl implements Window native "@*DOMWindow
_PointImpl webkitConvertPointFromPageToNode(_NodeImpl node, _PointImpl p) native;
void webkitPostMessage(Dynamic message, String targetOrigin, [List transferList = null]) native;
void webkitPostMessage(message, String targetOrigin, [List transferList = null]) native;
int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback) native;
@ -16504,11 +16504,11 @@ class _WorkerImpl extends _AbstractWorkerImpl implements Worker native "*Worker"
_WorkerEventsImpl get on() =>
new _WorkerEventsImpl(this);
void postMessage(Dynamic message, [List messagePorts = null]) native;
void postMessage(message, [List messagePorts = null]) native;
void terminate() native;
void webkitPostMessage(Dynamic message, [List messagePorts = null]) native;
void webkitPostMessage(message, [List messagePorts = null]) native;
}
class _WorkerEventsImpl extends _AbstractWorkerEventsImpl implements WorkerEvents {
@ -16660,7 +16660,7 @@ class _XMLHttpRequestImpl extends _EventTargetImpl implements XMLHttpRequest nat
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture = null]) native "removeEventListener";
void send([var data = null]) native;
void send([data = null]) native;
void setRequestHeader(String header, String value) native;
}
@ -17533,7 +17533,7 @@ interface AudioContext extends EventTarget {
BiquadFilterNode createBiquadFilter();
/** @domName AudioContext.createBuffer */
AudioBuffer createBuffer(var buffer_OR_numberOfChannels, var mixToMono_OR_numberOfFrames, [num sampleRate]);
AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, [num sampleRate]);
/** @domName AudioContext.createBufferSource */
AudioBufferSourceNode createBufferSource();
@ -17945,7 +17945,7 @@ interface BlobBuilder default _BlobBuilderFactoryProvider {
BlobBuilder();
/** @domName WebKitBlobBuilder.append */
void append(var arrayBuffer_OR_blob_OR_value, [String endings]);
void append(arrayBuffer_OR_blob_OR_value, [String endings]);
/** @domName WebKitBlobBuilder.getBlob */
Blob getBlob([String contentType]);
@ -20633,19 +20633,19 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void closePath();
/** @domName CanvasRenderingContext2D.createImageData */
ImageData createImageData(var imagedata_OR_sw, [num sh]);
ImageData createImageData(imagedata_OR_sw, [num sh]);
/** @domName CanvasRenderingContext2D.createLinearGradient */
CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1);
/** @domName CanvasRenderingContext2D.createPattern */
CanvasPattern createPattern(var canvas_OR_image, String repetitionType);
CanvasPattern createPattern(canvas_OR_image, String repetitionType);
/** @domName CanvasRenderingContext2D.createRadialGradient */
CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1);
/** @domName CanvasRenderingContext2D.drawImage */
void drawImage(var 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]);
void 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]);
/** @domName CanvasRenderingContext2D.drawImageFromRect */
void drawImageFromRect(ImageElement image, [num sx, num sy, num sw, num sh, num dx, num dy, num dw, num dh, String compositeOperation]);
@ -20702,7 +20702,7 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void setCompositeOperation(String compositeOperation);
/** @domName CanvasRenderingContext2D.setFillColor */
void setFillColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setFillColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
/** @domName CanvasRenderingContext2D.setLineCap */
void setLineCap(String cap);
@ -20717,10 +20717,10 @@ interface CanvasRenderingContext2D extends CanvasRenderingContext {
void setMiterLimit(num limit);
/** @domName CanvasRenderingContext2D.setShadow */
void setShadow(num width, num height, num blur, [var c_OR_color_OR_grayLevel_OR_r, num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setShadow(num width, num height, num blur, [c_OR_color_OR_grayLevel_OR_r, num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
/** @domName CanvasRenderingContext2D.setStrokeColor */
void setStrokeColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
void setStrokeColor(c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m, num b_OR_y, num a_OR_k, num a]);
/** @domName CanvasRenderingContext2D.setTransform */
void setTransform(num m11, num m12, num m21, num m22, num dx, num dy);
@ -21521,7 +21521,7 @@ interface DOMURL default _DOMURLFactoryProvider {
DOMURL();
/** @domName DOMURL.createObjectURL */
String createObjectURL(var blob_OR_stream);
String createObjectURL(blob_OR_stream);
/** @domName DOMURL.revokeObjectURL */
void revokeObjectURL(String url);
@ -21563,7 +21563,7 @@ interface DataTransferItemList {
final int length;
/** @domName DataTransferItemList.add */
void add(var data_OR_file, [String type]);
void add(data_OR_file, [String type]);
/** @domName DataTransferItemList.clear */
void clear();
@ -21655,7 +21655,7 @@ interface Database {
// WARNING: Do not edit - generated code.
typedef bool DatabaseCallback(var database);
typedef bool DatabaseCallback(database);
// 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
// BSD-style license that can be found in the LICENSE file.
@ -23937,22 +23937,22 @@ interface IDBCursor {
final int direction;
/** @domName IDBCursor.key */
final IDBKey key;
final Dynamic key;
/** @domName IDBCursor.primaryKey */
final IDBKey primaryKey;
final Dynamic primaryKey;
/** @domName IDBCursor.source */
final IDBAny source;
final Dynamic source;
/** @domName IDBCursor.continueFunction */
void continueFunction([IDBKey key]);
void continueFunction([/*IDBKey*/ key]);
/** @domName IDBCursor.delete */
IDBRequest delete();
/** @domName IDBCursor.update */
IDBRequest update(Dynamic value);
IDBRequest update(/*SerializedScriptValue*/ value);
}
// 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
@ -23964,7 +23964,7 @@ interface IDBCursor {
interface IDBCursorWithValue extends IDBCursor {
/** @domName IDBCursorWithValue.value */
final IDBAny value;
final Dynamic value;
}
// 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
@ -24011,7 +24011,7 @@ interface IDBDatabase extends EventTarget {
IDBVersionChangeRequest setVersion(String version);
/** @domName IDBDatabase.transaction */
IDBTransaction transaction(var storeName_OR_storeNames, [int mode]);
IDBTransaction transaction(storeName_OR_storeNames, [int mode]);
}
interface IDBDatabaseEvents extends Events {
@ -24079,7 +24079,7 @@ interface IDBDatabaseException {
interface IDBFactory {
/** @domName IDBFactory.cmp */
int cmp(IDBKey first, IDBKey second);
int cmp(/*IDBKey*/ first, /*IDBKey*/ second);
/** @domName IDBFactory.deleteDatabase */
IDBVersionChangeRequest deleteDatabase(String name);
@ -24115,13 +24115,13 @@ interface IDBIndex {
final bool unique;
/** @domName IDBIndex.count */
IDBRequest count([var key_OR_range]);
IDBRequest count([key_OR_range]);
/** @domName IDBIndex.getObject */
IDBRequest getObject(IDBKey key);
IDBRequest getObject(/*IDBKey*/ key);
/** @domName IDBIndex.getKey */
IDBRequest getKey(IDBKey key);
IDBRequest getKey(/*IDBKey*/ key);
/** @domName IDBIndex.openCursor */
IDBRequest openCursor([IDBKeyRange range, int direction]);
@ -24148,28 +24148,28 @@ interface IDBKey {
interface IDBKeyRange {
/** @domName IDBKeyRange.lower */
final IDBKey lower;
final Dynamic lower;
/** @domName IDBKeyRange.lowerOpen */
final bool lowerOpen;
/** @domName IDBKeyRange.upper */
final IDBKey upper;
final Dynamic upper;
/** @domName IDBKeyRange.upperOpen */
final bool upperOpen;
/** @domName IDBKeyRange.bound */
IDBKeyRange bound(IDBKey lower, IDBKey upper, [bool lowerOpen, bool upperOpen]);
IDBKeyRange bound(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]);
/** @domName IDBKeyRange.lowerBound */
IDBKeyRange lowerBound(IDBKey bound, [bool open]);
IDBKeyRange lowerBound(/*IDBKey*/ bound, [bool open]);
/** @domName IDBKeyRange.only */
IDBKeyRange only(IDBKey value);
IDBKeyRange only(/*IDBKey*/ value);
/** @domName IDBKeyRange.upperBound */
IDBKeyRange upperBound(IDBKey bound, [bool open]);
IDBKeyRange upperBound(/*IDBKey*/ bound, [bool open]);
}
// 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
@ -24193,25 +24193,25 @@ interface IDBObjectStore {
final IDBTransaction transaction;
/** @domName IDBObjectStore.add */
IDBRequest add(Dynamic value, [IDBKey key]);
IDBRequest add(/*SerializedScriptValue*/ value, [/*IDBKey*/ key]);
/** @domName IDBObjectStore.clear */
IDBRequest clear();
/** @domName IDBObjectStore.count */
IDBRequest count([var key_OR_range]);
IDBRequest count([key_OR_range]);
/** @domName IDBObjectStore.createIndex */
IDBIndex createIndex(String name, String keyPath);
/** @domName IDBObjectStore.delete */
IDBRequest delete(var key_OR_keyRange);
IDBRequest delete(key_OR_keyRange);
/** @domName IDBObjectStore.deleteIndex */
void deleteIndex(String name);
/** @domName IDBObjectStore.getObject */
IDBRequest getObject(IDBKey key);
IDBRequest getObject(/*IDBKey*/ key);
/** @domName IDBObjectStore.index */
IDBIndex index(String name);
@ -24220,7 +24220,7 @@ interface IDBObjectStore {
IDBRequest openCursor([IDBKeyRange range, int direction]);
/** @domName IDBObjectStore.put */
IDBRequest put(Dynamic value, [IDBKey key]);
IDBRequest put(/*SerializedScriptValue*/ value, [/*IDBKey*/ key]);
}
// 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
@ -24247,10 +24247,10 @@ interface IDBRequest extends EventTarget {
final int readyState;
/** @domName IDBRequest.result */
final IDBAny result;
final Dynamic result;
/** @domName IDBRequest.source */
final IDBAny source;
final Dynamic source;
/** @domName IDBRequest.transaction */
final IDBTransaction transaction;
@ -33414,10 +33414,10 @@ interface WebGLRenderingContext extends CanvasRenderingContext {
void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha);
/** @domName WebGLRenderingContext.bufferData */
void bufferData(int target, var data_OR_size, int usage);
void bufferData(int target, data_OR_size, int usage);
/** @domName WebGLRenderingContext.bufferSubData */
void bufferSubData(int target, int offset, var data);
void bufferSubData(int target, int offset, data);
/** @domName WebGLRenderingContext.checkFramebufferStatus */
int checkFramebufferStatus(int target);
@ -33681,7 +33681,7 @@ interface WebGLRenderingContext extends CanvasRenderingContext {
void stencilOpSeparate(int face, int fail, int zfail, int zpass);
/** @domName WebGLRenderingContext.texImage2D */
void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, var border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, ArrayBufferView pixels]);
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]);
/** @domName WebGLRenderingContext.texParameterf */
void texParameterf(int target, int pname, num param);
@ -33690,7 +33690,7 @@ interface WebGLRenderingContext extends CanvasRenderingContext {
void texParameteri(int target, int pname, int param);
/** @domName WebGLRenderingContext.texSubImage2D */
void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, var canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, ArrayBufferView pixels]);
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]);
/** @domName WebGLRenderingContext.uniform1f */
void uniform1f(WebGLUniformLocation location, num x);
@ -34285,7 +34285,7 @@ interface Window extends EventTarget {
Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]);
/** @domName DOMWindow.postMessage */
void postMessage(Dynamic message, String targetOrigin, [List messagePorts]);
void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]);
/** @domName DOMWindow.print */
void print();
@ -34339,7 +34339,7 @@ interface Window extends EventTarget {
Point webkitConvertPointFromPageToNode(Node node, Point p);
/** @domName DOMWindow.webkitPostMessage */
void webkitPostMessage(Dynamic message, String targetOrigin, [List transferList]);
void webkitPostMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List transferList]);
/** @domName DOMWindow.webkitRequestAnimationFrame */
int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback);
@ -34519,13 +34519,13 @@ interface Worker extends AbstractWorker default _WorkerFactoryProvider {
WorkerEvents get on();
/** @domName Worker.postMessage */
void postMessage(Dynamic message, [List messagePorts]);
void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]);
/** @domName Worker.terminate */
void terminate();
/** @domName Worker.webkitPostMessage */
void webkitPostMessage(Dynamic message, [List messagePorts]);
void webkitPostMessage(/*SerializedScriptValue*/ message, [List messagePorts]);
}
interface WorkerEvents extends AbstractWorkerEvents {
@ -34762,7 +34762,7 @@ interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvi
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
/** @domName XMLHttpRequest.send */
void send([var data]);
void send([data]);
/** @domName XMLHttpRequest.setRequestHeader */
void setRequestHeader(String header, String value);