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