| OLD | NEW |
| (Empty) |
| 1 | |
| 2 // This file introduces / supplements and forces Dart declarations. | |
| 3 | |
| 4 module default { | |
| 5 FileList implements sequence<File>; | |
| 6 HTMLCollection implements sequence<Node>; | |
| 7 MediaList implements sequence<DOMString>; | |
| 8 NamedNodeMap implements sequence<Node>; | |
| 9 NodeList implements sequence<Node>; | |
| 10 StyleSheetList implements sequence<StyleSheet>; | |
| 11 TouchList implements sequence<Touch>; | |
| 12 | |
| 13 Float32Array implements sequence<double>; | |
| 14 Float64Array implements sequence<double>; | |
| 15 Int8Array implements sequence<int>; | |
| 16 Int16Array implements sequence<int>; | |
| 17 Int32Array implements sequence<int>; | |
| 18 Uint8Array implements sequence<int>; | |
| 19 Uint16Array implements sequence<int>; | |
| 20 Uint32Array implements sequence<int>; | |
| 21 | |
| 22 // Is List<int> because inherits from Uint8Array: | |
| 23 // Uint8ClampedArray implements sequence<int>; | |
| 24 } | |
| 25 | |
| 26 module core { | |
| 27 [Supplemental] | |
| 28 interface Document { | |
| 29 [Suppressed] DOMObject getCSSCanvasContext(in DOMString contextId, in DOMStr
ing name, in long width, in long height); | |
| 30 CanvasRenderingContext getCSSCanvasContext(in DOMString contextId, in DOMStr
ing name, in long width, in long height); | |
| 31 }; | |
| 32 | |
| 33 DOMStringList implements sequence<DOMString>; | |
| 34 }; | |
| 35 | |
| 36 module dom { | |
| 37 // Force ElementTraversal. WebKit defines these directly. | |
| 38 interface ElementTraversal { | |
| 39 readonly attribute unsigned long childElementCount; | |
| 40 readonly attribute Element firstElementChild; | |
| 41 readonly attribute Element lastElementChild; | |
| 42 readonly attribute Element nextElementSibling; | |
| 43 readonly attribute Element previousElementSibling; | |
| 44 }; | |
| 45 Element implements ElementTraversal; | |
| 46 | |
| 47 [Callback] | |
| 48 interface TimeoutHandler { | |
| 49 void handleEvent(); | |
| 50 }; | |
| 51 }; | |
| 52 | |
| 53 module html { | |
| 54 [Supplemental] | |
| 55 interface Console { | |
| 56 [Suppressed] void assert(in boolean condition); | |
| 57 [CallWith=ScriptArguments|CallStack] void assertCondition(boolean condition)
; | |
| 58 }; | |
| 59 | |
| 60 interface HTMLCanvasElement { | |
| 61 [Suppressed] DOMString toDataURL([TreatNullAs=NullString, TreatUndefinedAs=N
ullString,Optional=DefaultIsUndefined] in DOMString type) raises(DOMException); | |
| 62 [Custom] DOMString toDataURL([TreatNullAs=NullString, TreatUndefinedAs=NullS
tring,Optional=DefaultIsUndefined] in DOMString type, [Optional] in float qualit
y) raises(DOMException); | |
| 63 | |
| 64 }; | |
| 65 | |
| 66 [Supplemental] | |
| 67 interface HTMLOptionsCollection { | |
| 68 [Suppressed] void add([Optional] in HTMLOptionElement element, [Optional] in
long before); | |
| 69 }; | |
| 70 | |
| 71 [Supplemental] | |
| 72 interface HTMLSelectElement { | |
| 73 [Suppressed] void add([Optional=DefaultIsUndefined] in HTMLElement element,
[Optional=DefaultIsUndefined] in HTMLElement before); | |
| 74 }; | |
| 75 | |
| 76 [Supplemental] | |
| 77 interface ImageData { | |
| 78 readonly attribute Uint8ClampedArray data; | |
| 79 }; | |
| 80 | |
| 81 [Supplemental] | |
| 82 interface HTMLMediaElement { | |
| 83 // Adding media events. | |
| 84 attribute EventListener oncanplay; | |
| 85 attribute EventListener oncanplaythrough; | |
| 86 attribute EventListener ondurationchange; | |
| 87 attribute EventListener onemptied; | |
| 88 attribute EventListener onended; | |
| 89 attribute EventListener onloadeddata; | |
| 90 attribute EventListener onloadedmetadata; | |
| 91 attribute EventListener onloadstart; | |
| 92 attribute EventListener onpause; | |
| 93 attribute EventListener onplay; | |
| 94 attribute EventListener onplaying; | |
| 95 attribute EventListener onprogress; | |
| 96 attribute EventListener onratechange; | |
| 97 attribute EventListener onseeked; | |
| 98 attribute EventListener onseeking; | |
| 99 attribute EventListener onshow; | |
| 100 attribute EventListener onstalled; | |
| 101 attribute EventListener onsuspend; | |
| 102 attribute EventListener ontimeupdate; | |
| 103 attribute EventListener onvolumechange; | |
| 104 attribute EventListener onwaiting; | |
| 105 }; | |
| 106 | |
| 107 [Supplemental] | |
| 108 interface WebGLContextEvent { | |
| 109 [Suppressed] void initEvent([Optional] in DOMString eventTypeArg, | |
| 110 [Optional] in boolean canBubbleArg, | |
| 111 [Optional] in boolean cancelableArg, | |
| 112 [Optional] in DOMString statusMessageArg); | |
| 113 }; | |
| 114 }; | |
| 115 | |
| 116 module html { | |
| 117 [Supplemental] | |
| 118 interface WebGLRenderingContext { | |
| 119 | |
| 120 //void compressedTexImage2D(in unsigned long target, in long level,
in unsigned long internalformat, in unsigned long width, in unsigned long height
, in long border, in unsigned long imageSize, const void* data); | |
| 121 //void compressedTexSubImage2D(in unsigned long target, in long leve
l, in long xoffset, in long yoffset, in unsigned long width, in unsigned long he
ight, in unsigned long format, in unsigned long imageSize, const void* data); | |
| 122 | |
| 123 any getBufferParameter(in unsigned long target, in unsigned long pname) rais
es(DOMException); | |
| 124 [Suppressed, StrictTypeChecking, Custom] void getBufferParameter(); | |
| 125 | |
| 126 any getFramebufferAttachmentParameter(in unsigned long target, in unsigned l
ong attachment, in unsigned long pname) raises(DOMException); | |
| 127 [Suppressed, StrictTypeChecking, Custom] void getFramebufferAttachmentParame
ter(); | |
| 128 | |
| 129 any getParameter(in unsigned long pname) raises(DOMException); | |
| 130 [Suppressed, StrictTypeChecking, Custom] void getParameter(); | |
| 131 | |
| 132 any getProgramParameter(in WebGLProgram program, in unsigned long pname) rai
ses(DOMException); | |
| 133 [Suppressed, StrictTypeChecking, Custom] void getProgramParameter(); | |
| 134 | |
| 135 any getRenderbufferParameter(in unsigned long target, in unsigned long pname
) raises(DOMException); | |
| 136 [Suppressed, StrictTypeChecking, Custom] void getRenderbufferParameter(); | |
| 137 | |
| 138 any getShaderParameter(in WebGLShader shader, in unsigned long pname) raises
(DOMException); | |
| 139 [Suppressed, StrictTypeChecking, Custom] void getShaderParameter() raises(DO
MException); | |
| 140 | |
| 141 // TBD | |
| 142 // void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype,
GLint* range, GLint* precision); | |
| 143 | |
| 144 DOMString[] getSupportedExtensions(); | |
| 145 [Suppressed, StrictTypeChecking, Custom] void getSupportedExtensions(); | |
| 146 | |
| 147 any getTexParameter(in unsigned long target, in unsigned long pname) raises(
DOMException); | |
| 148 [Suppressed, StrictTypeChecking, Custom] void getTexParameter(); | |
| 149 | |
| 150 any getUniform(in WebGLProgram program, in WebGLUniformLocation location) ra
ises(DOMException); | |
| 151 [Suppressed, StrictTypeChecking, Custom] void getUniform(); | |
| 152 | |
| 153 any getVertexAttrib(in unsigned long index, in unsigned long pname) raises(D
OMException); | |
| 154 [Suppressed, StrictTypeChecking, Custom] void getVertexAttrib(); | |
| 155 }; | |
| 156 } | |
| 157 | |
| 158 module css { | |
| 159 interface CSSStyleDeclaration { | |
| 160 void setProperty(in DOMString propertyName, in DOMString value, [Optional] i
n DOMString priority); | |
| 161 }; | |
| 162 }; | |
| 163 | |
| 164 module canvas { | |
| 165 [Supplemental, | |
| 166 Constructor(in long length)] // Add constructor signature. | |
| 167 interface ArrayBuffer { | |
| 168 }; | |
| 169 [Supplemental] | |
| 170 interface Float32Array { | |
| 171 [Suppressed] void set(); | |
| 172 [DartName=setElements, Custom] void set(in any array, [Optional] in unsigned
long offset); | |
| 173 }; | |
| 174 [Supplemental] | |
| 175 interface Float64Array { | |
| 176 [Suppressed] void set(); | |
| 177 [DartName=setElements, Custom] void set(in any array, [Optional] in unsigned
long offset); | |
| 178 }; | |
| 179 [Supplemental] | |
| 180 interface Int16Array { | |
| 181 [Suppressed] void set(); | |
| 182 [DartName=setElements, Custom] void set(in any array, [Optional] in unsigned
long offset); | |
| 183 }; | |
| 184 [Supplemental] | |
| 185 interface Int32Array { | |
| 186 [Suppressed] void set(); | |
| 187 [DartName=setElements, Custom] void set(in any array, [Optional] in unsigned
long offset); | |
| 188 }; | |
| 189 [Supplemental] | |
| 190 interface Int8Array { | |
| 191 [Suppressed] void set(); | |
| 192 [DartName=setElements, Custom] void set(in any array, [Optional] in unsigned
long offset); | |
| 193 }; | |
| 194 [Supplemental] | |
| 195 interface Uint16Array { | |
| 196 [Suppressed] void set(); | |
| 197 [DartName=setElements, Custom] void set(in any array, [Optional] in unsigned
long offset); | |
| 198 }; | |
| 199 [Supplemental] | |
| 200 interface Uint32Array { | |
| 201 [Suppressed] void set(); | |
| 202 [DartName=setElements, Custom] void set(in any array, [Optional] in unsigned
long offset); | |
| 203 }; | |
| 204 [Supplemental] | |
| 205 interface Uint8Array { | |
| 206 [Suppressed] void set(); | |
| 207 [DartName=setElements, Custom] void set(in any array, [Optional] in unsigned
long offset); | |
| 208 }; | |
| 209 | |
| 210 [Supplemental] | |
| 211 interface Uint8ClampedArray { | |
| 212 // Avoid 'overriding static member BYTES_PER_ELEMENT'. | |
| 213 [Suppressed] const long BYTES_PER_ELEMENT = 1; | |
| 214 | |
| 215 [Suppressed] void set(); | |
| 216 [DartName=setElements, Custom] void set(in any array, [Optional] in unsigned
long offset); | |
| 217 }; | |
| 218 | |
| 219 [Supplemental, | |
| 220 Constructor(in ArrayBuffer buffer, | |
| 221 [Optional] in unsigned long byteOffset, | |
| 222 [Optional] in unsigned long byteLength) | |
| 223 ] | |
| 224 interface DataView { | |
| 225 // Undo this: | |
| 226 // We have to use custom code because our code generator does not support in
t8_t type. | |
| 227 // int8_t getInt8(in unsigned long byteOffset); | |
| 228 // uint8_t getUint8(in unsigned long byteOffset); | |
| 229 [Suppressed] DOMObject getInt8(); | |
| 230 [Suppressed] DOMObject getUint8(); | |
| 231 byte getInt8(in unsigned long byteOffset) | |
| 232 raises (DOMException); | |
| 233 octet getUint8(in unsigned long byteOffset) | |
| 234 raises (DOMException); | |
| 235 | |
| 236 // We have to use custom code because our code generator does not support ui
nt8_t type. | |
| 237 // void setInt8(in unsigned long byteOffset, in int8_t value); | |
| 238 // void setUint8(in unsigned long byteOffset, in uint8_t value); | |
| 239 [Suppressed] void setInt8(); | |
| 240 [Suppressed] void setUint8(); | |
| 241 void setInt8(in unsigned long byteOffset, in byte value) | |
| 242 raises (DOMException); | |
| 243 void setUint8(in unsigned long byteOffset, in octet value) | |
| 244 raises (DOMException); | |
| 245 }; | |
| 246 }; | |
| 247 | |
| 248 module storage { | |
| 249 // TODO(vsm): Define new names for these (see b/4436830). | |
| 250 [Supplemental] | |
| 251 interface IDBCursor { | |
| 252 [DartName=continueFunction] void continue([Optional] in IDBKey key); | |
| 253 }; | |
| 254 [Supplemental] | |
| 255 interface IDBDatabase { | |
| 256 // These variants are slated for removal from WebKit. Suppress to bring our | |
| 257 // API in line with the most recent spec. | |
| 258 [Suppressed, CallWith=ScriptExecutionContext] IDBTransaction transaction(in
DOMStringList storeNames, in unsigned short mode) | |
| 259 raises (IDBDatabaseException); | |
| 260 [Suppressed, CallWith=ScriptExecutionContext] IDBTransaction transaction(in
DOMString[] storeNames, in unsigned short mode) | |
| 261 raises (IDBDatabaseException); | |
| 262 [Suppressed, CallWith=ScriptExecutionContext] IDBTransaction transaction(in
DOMString storeName, in unsigned short mode) | |
| 263 raises (IDBDatabaseException); | |
| 264 }; | |
| 265 [Supplemental] | |
| 266 interface IDBIndex { | |
| 267 [DartName=getObject] IDBRequest get(in IDBKey key); | |
| 268 }; | |
| 269 [Supplemental] | |
| 270 interface IDBObjectStore { | |
| 271 [DartName=getObject] IDBRequest get(in IDBKey key); | |
| 272 [DartName=getObject] IDBRequest get(in IDBKeyRange key); | |
| 273 }; | |
| 274 | |
| 275 interface EntrySync { | |
| 276 // Native implementation is declared to return EntrySync. | |
| 277 [Suppressed] DirectoryEntrySync getParent(); | |
| 278 EntrySync getParent(); | |
| 279 }; | |
| 280 }; | |
| 281 | |
| 282 | |
| 283 module html { | |
| 284 [Supplemental, | |
| 285 CustomConstructor, | |
| 286 Constructor(in Array blobParts, | |
| 287 [Optional] in DOMString type, [Optional] in DOMString endings) | |
| 288 ] | |
| 289 interface Blob { | |
| 290 }; | |
| 291 }; | |
| 292 | |
| 293 module html { | |
| 294 [Supplemental, Callback] // Add missing Callback attribute. | |
| 295 interface VoidCallback { | |
| 296 }; | |
| 297 }; | |
| 298 | |
| 299 module svg { | |
| 300 interface SVGNumber { | |
| 301 [StrictTypeChecking, Custom] attribute float value; | |
| 302 }; | |
| 303 } | |
| 304 | |
| 305 module core { | |
| 306 [Supplemental, | |
| 307 CustomConstructor, | |
| 308 // Provide missing constructor signature. | |
| 309 Constructor(MutationCallback callback)] | |
| 310 interface MutationObserver { | |
| 311 // Rename 'observe' so we can define a new 'observe' API that calls the | |
| 312 // original. | |
| 313 [DartName=_observe] void observe(in Node target, in Dictionary options) | |
| 314 raises(DOMException); | |
| 315 }; | |
| 316 } | |
| 317 | |
| 318 module html { | |
| 319 [Supplemental, | |
| 320 CustomConstructor, | |
| 321 // Provide missing constructor signature. | |
| 322 Constructor([Optional] in FormElement form)] | |
| 323 interface FormData { | |
| 324 }; | |
| 325 } | |
| 326 | |
| 327 module storage { | |
| 328 [Supplemental] | |
| 329 interface SQLResultSetRowList { | |
| 330 // Change the return type to Dictionary so that rows are exposed in the Dart | |
| 331 // API as a Maps, with the appropriate conversion in JavaScript. | |
| 332 [Suppressed] DOMObject item(in unsigned long index); | |
| 333 [Custom] Dictionary item(in unsigned long index); | |
| 334 }; | |
| 335 } | |
| 336 | |
| 337 module websockets { | |
| 338 [Supplemental] | |
| 339 interface WebSocket { | |
| 340 // Suppress the default since it has non-standard return type and add | |
| 341 // overrides. | |
| 342 [Suppressed] boolean send(in DOMString data) raises(DOMException); | |
| 343 [Custom] void send(DOMString data) raises(DOMException); | |
| 344 [Custom] void send(Blob data) raises(DOMException); | |
| 345 [Custom] void send(ArrayBuffer data) raises(DOMException); | |
| 346 [Custom] void send(ArrayBufferView data) raises(DOMException); | |
| 347 }; | |
| 348 } | |
| 349 | |
| OLD | NEW |