1 : /* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
2 : #include "jsapi.h"
3 : #include "qsWinUndefs.h"
4 : #include "prtypes.h"
5 : #include "nsID.h"
6 : #include "dom_quickstubs.h"
7 : #include "nscore.h"
8 : #include "nsCOMPtr.h"
9 : #include "nsDependentString.h"
10 : #include "xpcprivate.h" // for XPCCallContext
11 : #include "XPCQuickStubs.h"
12 : #include "nsWrapperCacheInlines.h"
13 : #include "nsIDOMWindow.h"
14 : #include "nsISelection.h"
15 : #include "nsIDOMCSSStyleDeclaration.h"
16 : #include "nsIDOMElement.h"
17 : #include "nsIDOMStorage.h"
18 : #include "nsIDOMJSWindow.h"
19 : #include "nsIDOMScreen.h"
20 : #include "nsIDOMClientRect.h"
21 : #include "nsIDOMClientRectList.h"
22 : #include "nsIDOMPaintRequest.h"
23 : #include "nsIDOMPaintRequestList.h"
24 : #include "nsIDOMHTMLCanvasElement.h"
25 : #include "nsIVariant.h"
26 : #include "nsIDOMCanvasRenderingContext2D.h"
27 : #include "nsIDOMHTMLElement.h"
28 : #include "nsIDOMXULElement.h"
29 : #include "nsIDOMCharacterData.h"
30 : #include "nsIDOMDOMImplementation.h"
31 : #include "nsIDOMNodeList.h"
32 : #include "nsIDOMDocumentType.h"
33 : #include "nsIDOMDocumentFragment.h"
34 : #include "nsIDOMNode.h"
35 : #include "nsIDOMText.h"
36 : #include "nsIDOMNodeIterator.h"
37 : #include "nsIDOMNodeFilter.h"
38 : #include "nsIDOMEvent.h"
39 : #include "nsIDOMDocument.h"
40 : #include "nsIDOMNamedNodeMap.h"
41 : #include "nsIDOMUserDataHandler.h"
42 : #include "nsIDOMNodeSelector.h"
43 : #include "nsIDOMDOMStringList.h"
44 : #include "nsIDOMDOMTokenList.h"
45 : #include "nsIDOMDOMSettableTokenList.h"
46 : #include "nsIBoxObject.h"
47 : #include "nsIDOMXULDocument.h"
48 : #include "nsIDOMNSElement.h"
49 : #include "nsIDOMElementCSSInlineStyle.h"
50 : #include "nsIDOMCSS2Properties.h"
51 : #include "nsIDOMCSSPrimitiveValue.h"
52 : #include "nsIDOMRect.h"
53 : #include "nsIDOMCSSValue.h"
54 : #include "nsIDOMCSSRule.h"
55 : #include "nsIDOMEventListener.h"
56 : #include "nsIDOMEventTarget.h"
57 : #include "nsIDOMMouseEvent.h"
58 : #include "nsIDOMKeyEvent.h"
59 : #include "nsIDOMMutationEvent.h"
60 : #include "nsIDOMDataTransfer.h"
61 : #include "nsIDOMDragEvent.h"
62 : #include "nsIDOMScrollAreaEvent.h"
63 : #include "nsIDOMNotifyPaintEvent.h"
64 : #include "nsIDOMMessageEvent.h"
65 : #include "nsIDOMMouseScrollEvent.h"
66 : #include "nsIDOMProgressEvent.h"
67 : #include "nsIDOMNSEvent.h"
68 : #include "nsIDOMUIEvent.h"
69 : #include "nsIDOMTouchEvent.h"
70 : #include "nsIDOMHTMLAnchorElement.h"
71 : #include "nsIDOMHTMLBaseElement.h"
72 : #include "nsIDOMHTMLFormElement.h"
73 : #include "nsIDOMHTMLButtonElement.h"
74 : #include "nsIDOMHTMLCollection.h"
75 : #include "nsIDOMHTMLCommandElement.h"
76 : #include "nsIDOMHTMLHeadElement.h"
77 : #include "nsIDOMHTMLDocument.h"
78 : #include "nsIDOMDOMStringMap.h"
79 : #include "nsIDOMHTMLMenuElement.h"
80 : #include "nsIDOMHTMLFrameElement.h"
81 : #include "nsIDOMHTMLFrameSetElement.h"
82 : #include "nsIDOMHTMLIFrameElement.h"
83 : #include "nsIDOMHTMLImageElement.h"
84 : #include "nsIDOMFileList.h"
85 : #include "nsIDOMHTMLInputElement.h"
86 : #include "nsIDOMHTMLLinkElement.h"
87 : #include "nsIDOMHTMLMenuItemElement.h"
88 : #include "nsIDOMHTMLOptionElement.h"
89 : #include "nsIDOMHTMLOptionsCollection.h"
90 : #include "nsIDOMHTMLProgressElement.h"
91 : #include "nsIDOMHTMLSelectElement.h"
92 : #include "nsIDOMHTMLStyleElement.h"
93 : #include "nsIDOMHTMLTableCellElement.h"
94 : #include "nsIDOMHTMLTableColElement.h"
95 : #include "nsIDOMHTMLTableElement.h"
96 : #include "nsIDOMHTMLTableRowElement.h"
97 : #include "nsIDOMHTMLTableSectionElem.h"
98 : #include "nsIDOMHTMLTextAreaElement.h"
99 : #include "nsIDOMHTMLTitleElement.h"
100 : #include "nsISupports.h"
101 : #include "nsIDOMRange.h"
102 : #include "nsIDOMToString.h"
103 : #include "nsIDOMStorageItem.h"
104 : #include "nsIDOMSVGAnimatedString.h"
105 : #include "nsIDOMSVGStylable.h"
106 : #include "nsIDOMXPathNSResolver.h"
107 : #include "nsIDOMXPathExpression.h"
108 : #include "nsIDOMXPathEvaluator.h"
109 : #include "nsIDOMXPathResult.h"
110 : #include "nsIDOMNSXPathExpression.h"
111 : #include "nsIRDFCompositeDataSource.h"
112 : #include "nsIXULTemplateBuilder.h"
113 : #include "nsIRDFResource.h"
114 : #include "nsIControllers.h"
115 : #include "nsIDOMFile.h"
116 : #include "nsIDOMDOMError.h"
117 : #include "nsIDOMFileReader.h"
118 : #include "nsIXMLHttpRequest.h"
119 : #include "nsIWebSocket.h"
120 : #include "nsIDOMWebGLRenderingContext.h"
121 : #include "nsIDOMNotifyAudioAvailableEvent.h"
122 : #include "nsIDOMHTMLAudioElement.h"
123 : #include "nsIIDBRequest.h"
124 : #include "nsIIDBCursor.h"
125 : #include "nsIIDBCursorWithValue.h"
126 : #include "nsIIDBObjectStore.h"
127 : #include "nsIIDBTransaction.h"
128 : #include "nsIIDBDatabase.h"
129 : #include "nsIIDBDatabaseException.h"
130 : #include "nsIIDBIndex.h"
131 : #include "nsIIDBKeyRange.h"
132 : #include "nsIIDBOpenDBRequest.h"
133 : #include "nsIIDBFactory.h"
134 : #include "nsIIDBVersionChangeEvent.h"
135 : #include "nsIURI.h"
136 : #include "nsIIndexedDatabaseManager.h"
137 : #include "nsINode.h"
138 : #include "nsIContent.h"
139 : #include "nsIDocument.h"
140 : #include "nsINodeList.h"
141 : #include "nsCSSPropertiesQS.h"
142 : #include "nsDocument.h"
143 : #include "nsDOMTokenList.h"
144 : #include "nsGenericDOMDataNode.h"
145 : #include "nsGenericElement.h"
146 : #include "nsGenericHTMLElement.h"
147 : #include "nsSVGStylableElement.h"
148 : #include "nsHTMLDocument.h"
149 : #include "nsDOMQS.h"
150 :
151 :
152 : // === XPCNativeInterface cache
153 :
154 : static XPCNativeInterface* interfaces[68];
155 :
156 14509 : void DOM_MarkInterfaces()
157 : {
158 1001121 : for (PRUint32 i = 0; i < 68; ++i)
159 986612 : if (interfaces[i])
160 3365 : interfaces[i]->Mark();
161 14509 : }
162 2729 : void DOM_ClearInterfaces()
163 : {
164 2729 : memset(interfaces, 0, 68 * sizeof(XPCNativeInterface*));
165 2729 : }
166 :
167 : static const PRUint32 k_nsIDOMNode = 0;
168 : static const PRUint32 k_nsIDOMEvent = 1;
169 : static const PRUint32 k_nsIDOMCanvasGradient = 2;
170 : static const PRUint32 k_nsIControllers = 3;
171 : static const PRUint32 k_nsIDOMXPathExpression = 4;
172 : static const PRUint32 k_nsIDOMDataTransfer = 5;
173 : static const PRUint32 k_nsIRDFResource = 6;
174 : static const PRUint32 k_nsIXULTemplateBuilder = 7;
175 : static const PRUint32 k_nsIDOMCanvasPattern = 8;
176 : static const PRUint32 k_nsIWebGLProgram = 9;
177 : static const PRUint32 k_nsIRDFCompositeDataSource = 10;
178 : static const PRUint32 k_nsIDOMHTMLOptionsCollection = 11;
179 : static const PRUint32 k_nsIDOMDOMImplementation = 12;
180 : static const PRUint32 k_nsIDOMCSSValue = 13;
181 : static const PRUint32 k_nsIWebGLFramebuffer = 14;
182 : static const PRUint32 k_nsIDOMRange = 15;
183 : static const PRUint32 k_nsIWebGLActiveInfo = 16;
184 : static const PRUint32 k_nsIDOMStorage = 17;
185 : static const PRUint32 k_nsIWebGLTexture = 18;
186 : static const PRUint32 k_nsIDOMSVGAnimatedString = 19;
187 : static const PRUint32 k_nsIIDBDatabase = 20;
188 : static const PRUint32 k_nsIDOMCSSRule = 21;
189 : static const PRUint32 k_nsIDOMTouch = 22;
190 : static const PRUint32 k_nsIIDBTransaction = 23;
191 : static const PRUint32 k_nsIDOMDOMStringMap = 24;
192 : static const PRUint32 k_nsISupports = 25;
193 : static const PRUint32 k_nsIDOMTextMetrics = 26;
194 : static const PRUint32 k_nsIDOMNodeList = 27;
195 : static const PRUint32 k_nsIIDBOpenDBRequest = 28;
196 : static const PRUint32 k_nsIWebGLRenderbuffer = 29;
197 : static const PRUint32 k_nsIWebGLShaderPrecisionFormat = 30;
198 : static const PRUint32 k_nsIDOMDOMError = 31;
199 : static const PRUint32 k_nsIDOMCSSStyleDeclaration = 32;
200 : static const PRUint32 k_nsIDOMCSSPrimitiveValue = 33;
201 : static const PRUint32 k_nsIIDBIndex = 34;
202 : static const PRUint32 k_nsIDOMPaintRequest = 35;
203 : static const PRUint32 k_nsIBoxObject = 36;
204 : static const PRUint32 k_nsIWebGLExtension = 37;
205 : static const PRUint32 k_nsIIDBRequest = 38;
206 : static const PRUint32 k_nsIDOMHTMLCanvasElement = 39;
207 : static const PRUint32 k_nsIWebGLShader = 40;
208 : static const PRUint32 k_nsIDOMHTMLMenuElement = 41;
209 : static const PRUint32 k_nsIDOMNodeIterator = 42;
210 : static const PRUint32 k_nsIDOMDocumentType = 43;
211 : static const PRUint32 k_nsIDOMHTMLCollection = 44;
212 : static const PRUint32 k_nsIDOMDocumentFragment = 45;
213 : static const PRUint32 k_nsIDOMEventTarget = 46;
214 : static const PRUint32 k_nsIDOMEventListener = 47;
215 : static const PRUint32 k_nsIDOMHTMLElement = 48;
216 : static const PRUint32 k_nsIDOMPaintRequestList = 49;
217 : static const PRUint32 k_nsISelection = 50;
218 : static const PRUint32 k_nsIDOMDOMStringList = 51;
219 : static const PRUint32 k_nsIDOMNamedNodeMap = 52;
220 : static const PRUint32 k_nsIDOMTouchList = 53;
221 : static const PRUint32 k_nsIDOMClientRect = 54;
222 : static const PRUint32 k_nsIDOMElement = 55;
223 : static const PRUint32 k_nsIWebGLUniformLocation = 56;
224 : static const PRUint32 k_nsIIDBObjectStore = 57;
225 : static const PRUint32 k_nsIDOMHTMLFormElement = 58;
226 : static const PRUint32 k_nsIDOMDocument = 59;
227 : static const PRUint32 k_nsIDOMClientRectList = 60;
228 : static const PRUint32 k_nsIDOMXPathNSResolver = 61;
229 : static const PRUint32 k_nsIDOMDOMTokenList = 62;
230 : static const PRUint32 k_nsIWebGLBuffer = 63;
231 : static const PRUint32 k_nsIDOMWindow = 64;
232 : static const PRUint32 k_nsIDOMHTMLHeadElement = 65;
233 : static const PRUint32 k_nsIDOMText = 66;
234 : static const PRUint32 k_nsIDOMFileList = 67;
235 :
236 :
237 : #include "CustomQS_WebGL.h"
238 : #include "CustomQS_Canvas2D.h"
239 : // === interface nsIDOMWindow
240 :
241 : static JSBool
242 0 : nsIDOMWindow_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
243 : {
244 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
245 : nsIDOMWindow *self;
246 0 : xpc_qsSelfRef selfref;
247 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
248 0 : return JS_FALSE;
249 : nsresult rv;
250 0 : nsString result;
251 0 : rv = self->GetName(result);
252 0 : if (NS_FAILED(rv))
253 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
254 0 : return xpc::StringToJsval(cx, result, vp);
255 : }
256 :
257 : static JSBool
258 0 : nsIDOMWindow_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
259 : {
260 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
261 : nsIDOMWindow *self;
262 0 : xpc_qsSelfRef selfref;
263 0 : JS::AutoValueRooter tvr(cx);
264 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
265 0 : return JS_FALSE;
266 : xpc_qsDOMString arg0(cx, *vp, vp,
267 : xpc_qsDOMString::eDefaultNullBehavior,
268 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
269 0 : if (!arg0.IsValid())
270 0 : return JS_FALSE;
271 : nsresult rv;
272 0 : rv = self->SetName(arg0);
273 0 : if (NS_FAILED(rv))
274 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
275 0 : return JS_TRUE;
276 : }
277 :
278 : static JSBool
279 0 : nsIDOMWindow_GetScriptableParent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
280 : {
281 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
282 0 : JSObject *callee = nsnull;
283 : nsIDOMWindow *self;
284 0 : xpc_qsSelfRef selfref;
285 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
286 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
287 0 : return JS_FALSE;
288 : nsresult rv;
289 0 : nsCOMPtr<nsIDOMWindow> result;
290 0 : rv = self->GetScriptableParent(getter_AddRefs(result));
291 0 : if (NS_FAILED(rv))
292 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
293 0 : if (!result) {
294 0 : *vp = JSVAL_NULL;
295 0 : return JS_TRUE;
296 : }
297 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
298 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
299 0 : return JS_TRUE;
300 : }
301 : // After this point do not use 'result'!
302 0 : qsObjectHelper helper(result, cache);
303 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
304 : }
305 :
306 : static JSBool
307 0 : nsIDOMWindow_GetScriptableTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
308 : {
309 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
310 0 : JSObject *callee = nsnull;
311 : nsIDOMWindow *self;
312 0 : xpc_qsSelfRef selfref;
313 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
314 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
315 0 : return JS_FALSE;
316 : nsresult rv;
317 0 : nsCOMPtr<nsIDOMWindow> result;
318 0 : rv = self->GetScriptableTop(getter_AddRefs(result));
319 0 : if (NS_FAILED(rv))
320 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
321 0 : if (!result) {
322 0 : *vp = JSVAL_NULL;
323 0 : return JS_TRUE;
324 : }
325 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
326 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
327 0 : return JS_TRUE;
328 : }
329 : // After this point do not use 'result'!
330 0 : qsObjectHelper helper(result, cache);
331 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
332 : }
333 :
334 : static JSBool
335 0 : nsIDOMWindow_GetSelf(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
336 : {
337 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
338 0 : JSObject *callee = nsnull;
339 : nsIDOMWindow *self;
340 0 : xpc_qsSelfRef selfref;
341 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
342 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
343 0 : return JS_FALSE;
344 : nsresult rv;
345 0 : nsCOMPtr<nsIDOMWindow> result;
346 0 : rv = self->GetSelf(getter_AddRefs(result));
347 0 : if (NS_FAILED(rv))
348 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
349 0 : if (!result) {
350 0 : *vp = JSVAL_NULL;
351 0 : return JS_TRUE;
352 : }
353 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
354 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
355 0 : return JS_TRUE;
356 : }
357 : // After this point do not use 'result'!
358 0 : qsObjectHelper helper(result, cache);
359 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
360 : }
361 :
362 : static JSBool
363 0 : nsIDOMWindow_GetSelection(JSContext *cx, unsigned argc, jsval *vp)
364 : {
365 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
366 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
367 0 : if (!obj)
368 0 : return JS_FALSE;
369 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
370 : nsIDOMWindow *self;
371 0 : xpc_qsSelfRef selfref;
372 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
373 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
374 0 : return JS_FALSE;
375 : nsresult rv;
376 0 : nsCOMPtr<nsISelection> result;
377 0 : rv = self->GetSelection(getter_AddRefs(result));
378 0 : if (NS_FAILED(rv))
379 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
380 0 : if (!result) {
381 0 : *vp = JSVAL_NULL;
382 0 : return JS_TRUE;
383 : }
384 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
385 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
386 0 : return JS_TRUE;
387 : }
388 : // After this point do not use 'result'!
389 0 : qsObjectHelper helper(result, cache);
390 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISelection), &interfaces[k_nsISelection], vp);
391 : }
392 :
393 : static JSBool
394 0 : nsIDOMWindow_ScrollByLines(JSContext *cx, unsigned argc, jsval *vp)
395 : {
396 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
397 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
398 0 : if (!obj)
399 0 : return JS_FALSE;
400 : nsIDOMWindow *self;
401 0 : xpc_qsSelfRef selfref;
402 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
403 0 : return JS_FALSE;
404 0 : if (argc < 1)
405 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
406 0 : jsval *argv = JS_ARGV(cx, vp);
407 : int32_t arg0;
408 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
409 0 : return JS_FALSE;
410 : nsresult rv;
411 0 : rv = self->ScrollByLines(arg0);
412 0 : if (NS_FAILED(rv))
413 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
414 0 : *vp = JSVAL_VOID;
415 0 : return JS_TRUE;
416 : }
417 :
418 : static JSBool
419 0 : nsIDOMWindow_GetComputedStyle(JSContext *cx, unsigned argc, jsval *vp)
420 : {
421 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
422 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
423 0 : if (!obj)
424 0 : return JS_FALSE;
425 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
426 : nsIDOMWindow *self;
427 0 : xpc_qsSelfRef selfref;
428 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
429 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
430 0 : return JS_FALSE;
431 0 : if (argc < 1)
432 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
433 0 : jsval *argv = JS_ARGV(cx, vp);
434 : nsresult rv;
435 : nsIDOMElement *arg0;
436 0 : xpc_qsSelfRef arg0ref;
437 0 : rv = xpc_qsUnwrapArg<nsIDOMElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
438 0 : if (NS_FAILED(rv)) {
439 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
440 0 : return JS_FALSE;
441 : }
442 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
443 : xpc_qsDOMString::eDefaultNullBehavior,
444 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
445 0 : if (!arg1.IsValid())
446 0 : return JS_FALSE;
447 0 : nsCOMPtr<nsIDOMCSSStyleDeclaration> result;
448 0 : rv = self->GetComputedStyle(arg0, arg1, getter_AddRefs(result));
449 0 : if (NS_FAILED(rv))
450 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
451 0 : if (!result) {
452 0 : *vp = JSVAL_NULL;
453 0 : return JS_TRUE;
454 : }
455 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
456 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
457 0 : return JS_TRUE;
458 : }
459 : // After this point do not use 'result'!
460 0 : qsObjectHelper helper(result, cache);
461 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSStyleDeclaration), &interfaces[k_nsIDOMCSSStyleDeclaration], vp);
462 : }
463 :
464 : static JSBool
465 0 : nsIDOMWindow_GetSessionStorage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
466 : {
467 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
468 0 : JSObject *callee = nsnull;
469 : nsIDOMWindow *self;
470 0 : xpc_qsSelfRef selfref;
471 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
472 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
473 0 : return JS_FALSE;
474 : nsresult rv;
475 0 : nsCOMPtr<nsIDOMStorage> result;
476 0 : rv = self->GetSessionStorage(getter_AddRefs(result));
477 0 : if (NS_FAILED(rv))
478 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
479 0 : if (!result) {
480 0 : *vp = JSVAL_NULL;
481 0 : return JS_TRUE;
482 : }
483 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
484 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
485 0 : return JS_TRUE;
486 : }
487 : // After this point do not use 'result'!
488 0 : qsObjectHelper helper(result, cache);
489 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMStorage), &interfaces[k_nsIDOMStorage], vp);
490 : }
491 :
492 : static JSBool
493 0 : nsIDOMWindow_GetLocalStorage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
494 : {
495 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
496 0 : JSObject *callee = nsnull;
497 : nsIDOMWindow *self;
498 0 : xpc_qsSelfRef selfref;
499 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
500 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
501 0 : return JS_FALSE;
502 : nsresult rv;
503 0 : nsCOMPtr<nsIDOMStorage> result;
504 0 : rv = self->GetLocalStorage(getter_AddRefs(result));
505 0 : if (NS_FAILED(rv))
506 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
507 0 : if (!result) {
508 0 : *vp = JSVAL_NULL;
509 0 : return JS_TRUE;
510 : }
511 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
512 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
513 0 : return JS_TRUE;
514 : }
515 : // After this point do not use 'result'!
516 0 : qsObjectHelper helper(result, cache);
517 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMStorage), &interfaces[k_nsIDOMStorage], vp);
518 : }
519 :
520 : static JSBool
521 0 : nsIDOMWindow_GetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
522 : {
523 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
524 : nsIDOMWindow *self;
525 0 : xpc_qsSelfRef selfref;
526 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
527 0 : return JS_FALSE;
528 0 : if (!self) {
529 0 : *vp = JSVAL_NULL;
530 0 : return JS_TRUE;
531 : }
532 : nsresult rv;
533 0 : rv = self->GetOnmouseenter(cx, vp);
534 0 : if (NS_FAILED(rv))
535 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
536 0 : return JS_TRUE;
537 : }
538 :
539 : static JSBool
540 0 : nsIDOMWindow_SetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
541 : {
542 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
543 : nsIDOMWindow *self;
544 0 : xpc_qsSelfRef selfref;
545 0 : JS::AutoValueRooter tvr(cx);
546 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
547 0 : return JS_FALSE;
548 0 : if (!self) {
549 0 : return JS_TRUE;
550 : }
551 0 : jsval arg0 = *vp;
552 : nsresult rv;
553 0 : rv = self->SetOnmouseenter(cx, arg0);
554 0 : if (NS_FAILED(rv))
555 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
556 0 : return JS_TRUE;
557 : }
558 :
559 : static JSBool
560 0 : nsIDOMWindow_GetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
561 : {
562 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
563 : nsIDOMWindow *self;
564 0 : xpc_qsSelfRef selfref;
565 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
566 0 : return JS_FALSE;
567 0 : if (!self) {
568 0 : *vp = JSVAL_NULL;
569 0 : return JS_TRUE;
570 : }
571 : nsresult rv;
572 0 : rv = self->GetOnmouseleave(cx, vp);
573 0 : if (NS_FAILED(rv))
574 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
575 0 : return JS_TRUE;
576 : }
577 :
578 : static JSBool
579 0 : nsIDOMWindow_SetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
580 : {
581 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
582 : nsIDOMWindow *self;
583 0 : xpc_qsSelfRef selfref;
584 0 : JS::AutoValueRooter tvr(cx);
585 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
586 0 : return JS_FALSE;
587 0 : if (!self) {
588 0 : return JS_TRUE;
589 : }
590 0 : jsval arg0 = *vp;
591 : nsresult rv;
592 0 : rv = self->SetOnmouseleave(cx, arg0);
593 0 : if (NS_FAILED(rv))
594 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
595 0 : return JS_TRUE;
596 : }
597 :
598 : // === interface nsIDOMJSWindow
599 :
600 : static JSBool
601 0 : nsIDOMJSWindow_Dump(JSContext *cx, unsigned argc, jsval *vp)
602 : {
603 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
604 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
605 0 : if (!obj)
606 0 : return JS_FALSE;
607 : nsIDOMJSWindow *self;
608 0 : xpc_qsSelfRef selfref;
609 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
610 0 : return JS_FALSE;
611 0 : if (argc < 1)
612 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
613 0 : jsval *argv = JS_ARGV(cx, vp);
614 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
615 : xpc_qsDOMString::eDefaultNullBehavior,
616 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
617 0 : if (!arg0.IsValid())
618 0 : return JS_FALSE;
619 : nsresult rv;
620 0 : rv = self->Dump(arg0);
621 0 : if (NS_FAILED(rv))
622 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
623 0 : *vp = JSVAL_VOID;
624 0 : return JS_TRUE;
625 : }
626 :
627 : // === interface nsIDOMScreen
628 :
629 : static JSBool
630 0 : nsIDOMScreen_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
631 : {
632 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
633 : nsIDOMScreen *self;
634 0 : xpc_qsSelfRef selfref;
635 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
636 0 : return JS_FALSE;
637 : nsresult rv;
638 : PRInt32 result;
639 0 : rv = self->GetTop(&result);
640 0 : if (NS_FAILED(rv))
641 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
642 0 : *vp = INT_TO_JSVAL(result);
643 0 : return JS_TRUE;
644 : }
645 :
646 : static JSBool
647 0 : nsIDOMScreen_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
648 : {
649 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
650 : nsIDOMScreen *self;
651 0 : xpc_qsSelfRef selfref;
652 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
653 0 : return JS_FALSE;
654 : nsresult rv;
655 : PRInt32 result;
656 0 : rv = self->GetHeight(&result);
657 0 : if (NS_FAILED(rv))
658 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
659 0 : *vp = INT_TO_JSVAL(result);
660 0 : return JS_TRUE;
661 : }
662 :
663 : static JSBool
664 0 : nsIDOMScreen_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
665 : {
666 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
667 : nsIDOMScreen *self;
668 0 : xpc_qsSelfRef selfref;
669 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
670 0 : return JS_FALSE;
671 : nsresult rv;
672 : PRInt32 result;
673 0 : rv = self->GetWidth(&result);
674 0 : if (NS_FAILED(rv))
675 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
676 0 : *vp = INT_TO_JSVAL(result);
677 0 : return JS_TRUE;
678 : }
679 :
680 : static JSBool
681 0 : nsIDOMScreen_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
682 : {
683 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
684 : nsIDOMScreen *self;
685 0 : xpc_qsSelfRef selfref;
686 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
687 0 : return JS_FALSE;
688 : nsresult rv;
689 : PRInt32 result;
690 0 : rv = self->GetLeft(&result);
691 0 : if (NS_FAILED(rv))
692 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
693 0 : *vp = INT_TO_JSVAL(result);
694 0 : return JS_TRUE;
695 : }
696 :
697 : // === interface nsIDOMClientRect
698 :
699 : static JSBool
700 0 : nsIDOMClientRect_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
701 : {
702 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
703 : nsIDOMClientRect *self;
704 0 : xpc_qsSelfRef selfref;
705 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
706 0 : return JS_FALSE;
707 : nsresult rv;
708 : float result;
709 0 : rv = self->GetLeft(&result);
710 0 : if (NS_FAILED(rv))
711 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
712 0 : return JS_NewNumberValue(cx, result, vp);
713 : }
714 :
715 : static JSBool
716 0 : nsIDOMClientRect_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
717 : {
718 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
719 : nsIDOMClientRect *self;
720 0 : xpc_qsSelfRef selfref;
721 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
722 0 : return JS_FALSE;
723 : nsresult rv;
724 : float result;
725 0 : rv = self->GetTop(&result);
726 0 : if (NS_FAILED(rv))
727 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
728 0 : return JS_NewNumberValue(cx, result, vp);
729 : }
730 :
731 : static JSBool
732 0 : nsIDOMClientRect_GetRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
733 : {
734 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
735 : nsIDOMClientRect *self;
736 0 : xpc_qsSelfRef selfref;
737 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
738 0 : return JS_FALSE;
739 : nsresult rv;
740 : float result;
741 0 : rv = self->GetRight(&result);
742 0 : if (NS_FAILED(rv))
743 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
744 0 : return JS_NewNumberValue(cx, result, vp);
745 : }
746 :
747 : static JSBool
748 0 : nsIDOMClientRect_GetBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
749 : {
750 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
751 : nsIDOMClientRect *self;
752 0 : xpc_qsSelfRef selfref;
753 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
754 0 : return JS_FALSE;
755 : nsresult rv;
756 : float result;
757 0 : rv = self->GetBottom(&result);
758 0 : if (NS_FAILED(rv))
759 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
760 0 : return JS_NewNumberValue(cx, result, vp);
761 : }
762 :
763 : static JSBool
764 0 : nsIDOMClientRect_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
765 : {
766 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
767 : nsIDOMClientRect *self;
768 0 : xpc_qsSelfRef selfref;
769 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
770 0 : return JS_FALSE;
771 : nsresult rv;
772 : float result;
773 0 : rv = self->GetWidth(&result);
774 0 : if (NS_FAILED(rv))
775 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
776 0 : return JS_NewNumberValue(cx, result, vp);
777 : }
778 :
779 : static JSBool
780 0 : nsIDOMClientRect_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
781 : {
782 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
783 : nsIDOMClientRect *self;
784 0 : xpc_qsSelfRef selfref;
785 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
786 0 : return JS_FALSE;
787 : nsresult rv;
788 : float result;
789 0 : rv = self->GetHeight(&result);
790 0 : if (NS_FAILED(rv))
791 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
792 0 : return JS_NewNumberValue(cx, result, vp);
793 : }
794 :
795 : // === interface nsIDOMClientRectList
796 :
797 : static JSBool
798 0 : nsIDOMClientRectList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
799 : {
800 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
801 : nsIDOMClientRectList *self;
802 0 : xpc_qsSelfRef selfref;
803 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
804 0 : return JS_FALSE;
805 : nsresult rv;
806 : PRUint32 result;
807 0 : rv = self->GetLength(&result);
808 0 : if (NS_FAILED(rv))
809 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
810 0 : *vp = UINT_TO_JSVAL(result);
811 0 : return JS_TRUE;
812 : }
813 :
814 : static JSBool
815 0 : nsIDOMClientRectList_Item(JSContext *cx, unsigned argc, jsval *vp)
816 : {
817 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
818 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
819 0 : if (!obj)
820 0 : return JS_FALSE;
821 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
822 : nsIDOMClientRectList *self;
823 0 : xpc_qsSelfRef selfref;
824 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
825 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
826 0 : return JS_FALSE;
827 0 : if (argc < 1)
828 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
829 0 : jsval *argv = JS_ARGV(cx, vp);
830 : uint32_t arg0;
831 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
832 0 : return JS_FALSE;
833 : nsresult rv;
834 0 : nsCOMPtr<nsIDOMClientRect> result;
835 0 : rv = self->Item(arg0, getter_AddRefs(result));
836 0 : if (NS_FAILED(rv))
837 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
838 0 : if (!result) {
839 0 : *vp = JSVAL_NULL;
840 0 : return JS_TRUE;
841 : }
842 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
843 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
844 0 : return JS_TRUE;
845 : }
846 : // After this point do not use 'result'!
847 0 : qsObjectHelper helper(result, cache);
848 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
849 : }
850 :
851 : // === interface nsIDOMPaintRequest
852 :
853 : static JSBool
854 0 : nsIDOMPaintRequest_GetClientRect(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
855 : {
856 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
857 0 : JSObject *callee = nsnull;
858 : nsIDOMPaintRequest *self;
859 0 : xpc_qsSelfRef selfref;
860 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
861 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
862 0 : return JS_FALSE;
863 : nsresult rv;
864 0 : nsCOMPtr<nsIDOMClientRect> result;
865 0 : rv = self->GetClientRect(getter_AddRefs(result));
866 0 : if (NS_FAILED(rv))
867 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
868 0 : if (!result) {
869 0 : *vp = JSVAL_NULL;
870 0 : return JS_TRUE;
871 : }
872 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
873 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
874 0 : return JS_TRUE;
875 : }
876 : // After this point do not use 'result'!
877 0 : qsObjectHelper helper(result, cache);
878 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
879 : }
880 :
881 : static JSBool
882 0 : nsIDOMPaintRequest_GetReason(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
883 : {
884 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
885 : nsIDOMPaintRequest *self;
886 0 : xpc_qsSelfRef selfref;
887 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
888 0 : return JS_FALSE;
889 : nsresult rv;
890 0 : nsString result;
891 0 : rv = self->GetReason(result);
892 0 : if (NS_FAILED(rv))
893 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
894 0 : return xpc::StringToJsval(cx, result, vp);
895 : }
896 :
897 : // === interface nsIDOMPaintRequestList
898 :
899 : static JSBool
900 0 : nsIDOMPaintRequestList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
901 : {
902 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
903 : nsIDOMPaintRequestList *self;
904 0 : xpc_qsSelfRef selfref;
905 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
906 0 : return JS_FALSE;
907 : nsresult rv;
908 : PRUint32 result;
909 0 : rv = self->GetLength(&result);
910 0 : if (NS_FAILED(rv))
911 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
912 0 : *vp = UINT_TO_JSVAL(result);
913 0 : return JS_TRUE;
914 : }
915 :
916 : static JSBool
917 0 : nsIDOMPaintRequestList_Item(JSContext *cx, unsigned argc, jsval *vp)
918 : {
919 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
920 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
921 0 : if (!obj)
922 0 : return JS_FALSE;
923 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
924 : nsIDOMPaintRequestList *self;
925 0 : xpc_qsSelfRef selfref;
926 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
927 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
928 0 : return JS_FALSE;
929 0 : if (argc < 1)
930 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
931 0 : jsval *argv = JS_ARGV(cx, vp);
932 : uint32_t arg0;
933 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
934 0 : return JS_FALSE;
935 : nsresult rv;
936 0 : nsCOMPtr<nsIDOMPaintRequest> result;
937 0 : rv = self->Item(arg0, getter_AddRefs(result));
938 0 : if (NS_FAILED(rv))
939 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
940 0 : if (!result) {
941 0 : *vp = JSVAL_NULL;
942 0 : return JS_TRUE;
943 : }
944 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
945 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
946 0 : return JS_TRUE;
947 : }
948 : // After this point do not use 'result'!
949 0 : qsObjectHelper helper(result, cache);
950 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMPaintRequest), &interfaces[k_nsIDOMPaintRequest], vp);
951 : }
952 :
953 : // === interface nsIDOMCanvasRenderingContext2D
954 :
955 : static JSBool
956 0 : nsIDOMCanvasRenderingContext2D_GetCanvas(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
957 : {
958 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
959 0 : JSObject *callee = nsnull;
960 : nsIDOMCanvasRenderingContext2D *self;
961 0 : xpc_qsSelfRef selfref;
962 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
963 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
964 0 : return JS_FALSE;
965 : nsresult rv;
966 0 : nsCOMPtr<nsIDOMHTMLCanvasElement> result;
967 0 : rv = self->GetCanvas(getter_AddRefs(result));
968 0 : if (NS_FAILED(rv))
969 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
970 0 : if (!result) {
971 0 : *vp = JSVAL_NULL;
972 0 : return JS_TRUE;
973 : }
974 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
975 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
976 0 : return JS_TRUE;
977 : }
978 : // After this point do not use 'result'!
979 0 : qsObjectHelper helper(result, cache);
980 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCanvasElement), &interfaces[k_nsIDOMHTMLCanvasElement], vp);
981 : }
982 :
983 : static JSBool
984 0 : nsIDOMCanvasRenderingContext2D_Save(JSContext *cx, unsigned argc, jsval *vp)
985 : {
986 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
987 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
988 0 : if (!obj)
989 0 : return JS_FALSE;
990 : nsIDOMCanvasRenderingContext2D *self;
991 0 : xpc_qsSelfRef selfref;
992 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
993 0 : return JS_FALSE;
994 : nsresult rv;
995 0 : rv = self->Save();
996 0 : if (NS_FAILED(rv))
997 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
998 0 : *vp = JSVAL_VOID;
999 0 : return JS_TRUE;
1000 : }
1001 :
1002 : static JSBool
1003 0 : nsIDOMCanvasRenderingContext2D_Restore(JSContext *cx, unsigned argc, jsval *vp)
1004 : {
1005 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1006 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1007 0 : if (!obj)
1008 0 : return JS_FALSE;
1009 : nsIDOMCanvasRenderingContext2D *self;
1010 0 : xpc_qsSelfRef selfref;
1011 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1012 0 : return JS_FALSE;
1013 : nsresult rv;
1014 0 : rv = self->Restore();
1015 0 : if (NS_FAILED(rv))
1016 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1017 0 : *vp = JSVAL_VOID;
1018 0 : return JS_TRUE;
1019 : }
1020 :
1021 : static JSBool
1022 0 : nsIDOMCanvasRenderingContext2D_Scale(JSContext *cx, unsigned argc, jsval *vp)
1023 : {
1024 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1025 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1026 0 : if (!obj)
1027 0 : return JS_FALSE;
1028 : nsIDOMCanvasRenderingContext2D *self;
1029 0 : xpc_qsSelfRef selfref;
1030 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1031 0 : return JS_FALSE;
1032 0 : if (argc < 2)
1033 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1034 0 : jsval *argv = JS_ARGV(cx, vp);
1035 : double arg0_dbl;
1036 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1037 0 : return JS_FALSE;
1038 0 : float arg0 = (float) arg0_dbl;
1039 : double arg1_dbl;
1040 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1041 0 : return JS_FALSE;
1042 0 : float arg1 = (float) arg1_dbl;
1043 : nsresult rv;
1044 0 : rv = self->Scale(arg0, arg1);
1045 0 : if (NS_FAILED(rv))
1046 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1047 0 : *vp = JSVAL_VOID;
1048 0 : return JS_TRUE;
1049 : }
1050 :
1051 : static JSBool
1052 0 : nsIDOMCanvasRenderingContext2D_Rotate(JSContext *cx, unsigned argc, jsval *vp)
1053 : {
1054 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1055 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1056 0 : if (!obj)
1057 0 : return JS_FALSE;
1058 : nsIDOMCanvasRenderingContext2D *self;
1059 0 : xpc_qsSelfRef selfref;
1060 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1061 0 : return JS_FALSE;
1062 0 : if (argc < 1)
1063 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1064 0 : jsval *argv = JS_ARGV(cx, vp);
1065 : double arg0_dbl;
1066 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1067 0 : return JS_FALSE;
1068 0 : float arg0 = (float) arg0_dbl;
1069 : nsresult rv;
1070 0 : rv = self->Rotate(arg0);
1071 0 : if (NS_FAILED(rv))
1072 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1073 0 : *vp = JSVAL_VOID;
1074 0 : return JS_TRUE;
1075 : }
1076 :
1077 : static JSBool
1078 0 : nsIDOMCanvasRenderingContext2D_Translate(JSContext *cx, unsigned argc, jsval *vp)
1079 : {
1080 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1081 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1082 0 : if (!obj)
1083 0 : return JS_FALSE;
1084 : nsIDOMCanvasRenderingContext2D *self;
1085 0 : xpc_qsSelfRef selfref;
1086 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1087 0 : return JS_FALSE;
1088 0 : if (argc < 2)
1089 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1090 0 : jsval *argv = JS_ARGV(cx, vp);
1091 : double arg0_dbl;
1092 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1093 0 : return JS_FALSE;
1094 0 : float arg0 = (float) arg0_dbl;
1095 : double arg1_dbl;
1096 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1097 0 : return JS_FALSE;
1098 0 : float arg1 = (float) arg1_dbl;
1099 : nsresult rv;
1100 0 : rv = self->Translate(arg0, arg1);
1101 0 : if (NS_FAILED(rv))
1102 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1103 0 : *vp = JSVAL_VOID;
1104 0 : return JS_TRUE;
1105 : }
1106 :
1107 : static JSBool
1108 0 : nsIDOMCanvasRenderingContext2D_Transform(JSContext *cx, unsigned argc, jsval *vp)
1109 : {
1110 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1111 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1112 0 : if (!obj)
1113 0 : return JS_FALSE;
1114 : nsIDOMCanvasRenderingContext2D *self;
1115 0 : xpc_qsSelfRef selfref;
1116 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1117 0 : return JS_FALSE;
1118 0 : if (argc < 6)
1119 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1120 0 : jsval *argv = JS_ARGV(cx, vp);
1121 : double arg0_dbl;
1122 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1123 0 : return JS_FALSE;
1124 0 : float arg0 = (float) arg0_dbl;
1125 : double arg1_dbl;
1126 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1127 0 : return JS_FALSE;
1128 0 : float arg1 = (float) arg1_dbl;
1129 : double arg2_dbl;
1130 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1131 0 : return JS_FALSE;
1132 0 : float arg2 = (float) arg2_dbl;
1133 : double arg3_dbl;
1134 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1135 0 : return JS_FALSE;
1136 0 : float arg3 = (float) arg3_dbl;
1137 : double arg4_dbl;
1138 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
1139 0 : return JS_FALSE;
1140 0 : float arg4 = (float) arg4_dbl;
1141 : double arg5_dbl;
1142 0 : if (!JS_ValueToNumber(cx, argv[5], &arg5_dbl))
1143 0 : return JS_FALSE;
1144 0 : float arg5 = (float) arg5_dbl;
1145 : nsresult rv;
1146 0 : rv = self->Transform(arg0, arg1, arg2, arg3, arg4, arg5);
1147 0 : if (NS_FAILED(rv))
1148 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1149 0 : *vp = JSVAL_VOID;
1150 0 : return JS_TRUE;
1151 : }
1152 :
1153 : static JSBool
1154 0 : nsIDOMCanvasRenderingContext2D_SetTransform(JSContext *cx, unsigned argc, jsval *vp)
1155 : {
1156 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1157 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1158 0 : if (!obj)
1159 0 : return JS_FALSE;
1160 : nsIDOMCanvasRenderingContext2D *self;
1161 0 : xpc_qsSelfRef selfref;
1162 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1163 0 : return JS_FALSE;
1164 0 : if (argc < 6)
1165 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1166 0 : jsval *argv = JS_ARGV(cx, vp);
1167 : double arg0_dbl;
1168 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1169 0 : return JS_FALSE;
1170 0 : float arg0 = (float) arg0_dbl;
1171 : double arg1_dbl;
1172 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1173 0 : return JS_FALSE;
1174 0 : float arg1 = (float) arg1_dbl;
1175 : double arg2_dbl;
1176 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1177 0 : return JS_FALSE;
1178 0 : float arg2 = (float) arg2_dbl;
1179 : double arg3_dbl;
1180 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1181 0 : return JS_FALSE;
1182 0 : float arg3 = (float) arg3_dbl;
1183 : double arg4_dbl;
1184 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
1185 0 : return JS_FALSE;
1186 0 : float arg4 = (float) arg4_dbl;
1187 : double arg5_dbl;
1188 0 : if (!JS_ValueToNumber(cx, argv[5], &arg5_dbl))
1189 0 : return JS_FALSE;
1190 0 : float arg5 = (float) arg5_dbl;
1191 : nsresult rv;
1192 0 : rv = self->SetTransform(arg0, arg1, arg2, arg3, arg4, arg5);
1193 0 : if (NS_FAILED(rv))
1194 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1195 0 : *vp = JSVAL_VOID;
1196 0 : return JS_TRUE;
1197 : }
1198 :
1199 : static JSBool
1200 0 : nsIDOMCanvasRenderingContext2D_GetMozCurrentTransform(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1201 : {
1202 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1203 : nsIDOMCanvasRenderingContext2D *self;
1204 0 : xpc_qsSelfRef selfref;
1205 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1206 0 : return JS_FALSE;
1207 : nsresult rv;
1208 0 : rv = self->GetMozCurrentTransform(cx, vp);
1209 0 : if (NS_FAILED(rv))
1210 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1211 0 : return JS_TRUE;
1212 : }
1213 :
1214 : static JSBool
1215 0 : nsIDOMCanvasRenderingContext2D_SetMozCurrentTransform(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1216 : {
1217 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1218 : nsIDOMCanvasRenderingContext2D *self;
1219 0 : xpc_qsSelfRef selfref;
1220 0 : JS::AutoValueRooter tvr(cx);
1221 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1222 0 : return JS_FALSE;
1223 0 : jsval arg0 = *vp;
1224 : nsresult rv;
1225 0 : rv = self->SetMozCurrentTransform(cx, arg0);
1226 0 : if (NS_FAILED(rv))
1227 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1228 0 : return JS_TRUE;
1229 : }
1230 :
1231 : static JSBool
1232 0 : nsIDOMCanvasRenderingContext2D_GetMozCurrentTransformInverse(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1233 : {
1234 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1235 : nsIDOMCanvasRenderingContext2D *self;
1236 0 : xpc_qsSelfRef selfref;
1237 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1238 0 : return JS_FALSE;
1239 : nsresult rv;
1240 0 : rv = self->GetMozCurrentTransformInverse(cx, vp);
1241 0 : if (NS_FAILED(rv))
1242 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1243 0 : return JS_TRUE;
1244 : }
1245 :
1246 : static JSBool
1247 0 : nsIDOMCanvasRenderingContext2D_SetMozCurrentTransformInverse(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1248 : {
1249 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1250 : nsIDOMCanvasRenderingContext2D *self;
1251 0 : xpc_qsSelfRef selfref;
1252 0 : JS::AutoValueRooter tvr(cx);
1253 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1254 0 : return JS_FALSE;
1255 0 : jsval arg0 = *vp;
1256 : nsresult rv;
1257 0 : rv = self->SetMozCurrentTransformInverse(cx, arg0);
1258 0 : if (NS_FAILED(rv))
1259 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1260 0 : return JS_TRUE;
1261 : }
1262 :
1263 : static JSBool
1264 0 : nsIDOMCanvasRenderingContext2D_GetGlobalAlpha(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1265 : {
1266 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1267 : nsIDOMCanvasRenderingContext2D *self;
1268 0 : xpc_qsSelfRef selfref;
1269 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1270 0 : return JS_FALSE;
1271 : nsresult rv;
1272 : float result;
1273 0 : rv = self->GetGlobalAlpha(&result);
1274 0 : if (NS_FAILED(rv))
1275 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1276 0 : return JS_NewNumberValue(cx, result, vp);
1277 : }
1278 :
1279 : static JSBool
1280 0 : nsIDOMCanvasRenderingContext2D_SetGlobalAlpha(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1281 : {
1282 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1283 : nsIDOMCanvasRenderingContext2D *self;
1284 0 : xpc_qsSelfRef selfref;
1285 0 : JS::AutoValueRooter tvr(cx);
1286 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1287 0 : return JS_FALSE;
1288 : double arg0_dbl;
1289 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1290 0 : return JS_FALSE;
1291 0 : float arg0 = (float) arg0_dbl;
1292 : nsresult rv;
1293 0 : rv = self->SetGlobalAlpha(arg0);
1294 0 : if (NS_FAILED(rv))
1295 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1296 0 : return JS_TRUE;
1297 : }
1298 :
1299 : static JSBool
1300 0 : nsIDOMCanvasRenderingContext2D_GetGlobalCompositeOperation(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1301 : {
1302 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1303 : nsIDOMCanvasRenderingContext2D *self;
1304 0 : xpc_qsSelfRef selfref;
1305 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1306 0 : return JS_FALSE;
1307 : nsresult rv;
1308 0 : nsString result;
1309 0 : rv = self->GetGlobalCompositeOperation(result);
1310 0 : if (NS_FAILED(rv))
1311 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1312 0 : return xpc::StringToJsval(cx, result, vp);
1313 : }
1314 :
1315 : static JSBool
1316 0 : nsIDOMCanvasRenderingContext2D_SetGlobalCompositeOperation(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1317 : {
1318 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1319 : nsIDOMCanvasRenderingContext2D *self;
1320 0 : xpc_qsSelfRef selfref;
1321 0 : JS::AutoValueRooter tvr(cx);
1322 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1323 0 : return JS_FALSE;
1324 : xpc_qsDOMString arg0(cx, *vp, vp,
1325 : xpc_qsDOMString::eDefaultNullBehavior,
1326 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1327 0 : if (!arg0.IsValid())
1328 0 : return JS_FALSE;
1329 : nsresult rv;
1330 0 : rv = self->SetGlobalCompositeOperation(arg0);
1331 0 : if (NS_FAILED(rv))
1332 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1333 0 : return JS_TRUE;
1334 : }
1335 :
1336 : static JSBool
1337 0 : nsIDOMCanvasRenderingContext2D_GetMozFillRule(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1338 : {
1339 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1340 : nsIDOMCanvasRenderingContext2D *self;
1341 0 : xpc_qsSelfRef selfref;
1342 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1343 0 : return JS_FALSE;
1344 : nsresult rv;
1345 0 : nsString result;
1346 0 : rv = self->GetMozFillRule(result);
1347 0 : if (NS_FAILED(rv))
1348 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1349 0 : return xpc::StringToJsval(cx, result, vp);
1350 : }
1351 :
1352 : static JSBool
1353 0 : nsIDOMCanvasRenderingContext2D_SetMozFillRule(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1354 : {
1355 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1356 : nsIDOMCanvasRenderingContext2D *self;
1357 0 : xpc_qsSelfRef selfref;
1358 0 : JS::AutoValueRooter tvr(cx);
1359 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1360 0 : return JS_FALSE;
1361 : xpc_qsDOMString arg0(cx, *vp, vp,
1362 : xpc_qsDOMString::eDefaultNullBehavior,
1363 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1364 0 : if (!arg0.IsValid())
1365 0 : return JS_FALSE;
1366 : nsresult rv;
1367 0 : rv = self->SetMozFillRule(arg0);
1368 0 : if (NS_FAILED(rv))
1369 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1370 0 : return JS_TRUE;
1371 : }
1372 :
1373 : static JSBool
1374 0 : nsIDOMCanvasRenderingContext2D_CreateLinearGradient(JSContext *cx, unsigned argc, jsval *vp)
1375 : {
1376 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1377 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1378 0 : if (!obj)
1379 0 : return JS_FALSE;
1380 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
1381 : nsIDOMCanvasRenderingContext2D *self;
1382 0 : xpc_qsSelfRef selfref;
1383 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
1384 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
1385 0 : return JS_FALSE;
1386 0 : if (argc < 4)
1387 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1388 0 : jsval *argv = JS_ARGV(cx, vp);
1389 : double arg0_dbl;
1390 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1391 0 : return JS_FALSE;
1392 0 : float arg0 = (float) arg0_dbl;
1393 : double arg1_dbl;
1394 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1395 0 : return JS_FALSE;
1396 0 : float arg1 = (float) arg1_dbl;
1397 : double arg2_dbl;
1398 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1399 0 : return JS_FALSE;
1400 0 : float arg2 = (float) arg2_dbl;
1401 : double arg3_dbl;
1402 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1403 0 : return JS_FALSE;
1404 0 : float arg3 = (float) arg3_dbl;
1405 : nsresult rv;
1406 0 : nsCOMPtr<nsIDOMCanvasGradient> result;
1407 0 : rv = self->CreateLinearGradient(arg0, arg1, arg2, arg3, getter_AddRefs(result));
1408 0 : if (NS_FAILED(rv))
1409 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1410 0 : if (!result) {
1411 0 : *vp = JSVAL_NULL;
1412 0 : return JS_TRUE;
1413 : }
1414 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
1415 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
1416 0 : return JS_TRUE;
1417 : }
1418 : // After this point do not use 'result'!
1419 0 : qsObjectHelper helper(result, cache);
1420 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCanvasGradient), &interfaces[k_nsIDOMCanvasGradient], vp);
1421 : }
1422 :
1423 : static JSBool
1424 0 : nsIDOMCanvasRenderingContext2D_CreateRadialGradient(JSContext *cx, unsigned argc, jsval *vp)
1425 : {
1426 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1427 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1428 0 : if (!obj)
1429 0 : return JS_FALSE;
1430 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
1431 : nsIDOMCanvasRenderingContext2D *self;
1432 0 : xpc_qsSelfRef selfref;
1433 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
1434 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
1435 0 : return JS_FALSE;
1436 0 : if (argc < 6)
1437 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1438 0 : jsval *argv = JS_ARGV(cx, vp);
1439 : double arg0_dbl;
1440 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1441 0 : return JS_FALSE;
1442 0 : float arg0 = (float) arg0_dbl;
1443 : double arg1_dbl;
1444 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1445 0 : return JS_FALSE;
1446 0 : float arg1 = (float) arg1_dbl;
1447 : double arg2_dbl;
1448 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1449 0 : return JS_FALSE;
1450 0 : float arg2 = (float) arg2_dbl;
1451 : double arg3_dbl;
1452 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1453 0 : return JS_FALSE;
1454 0 : float arg3 = (float) arg3_dbl;
1455 : double arg4_dbl;
1456 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
1457 0 : return JS_FALSE;
1458 0 : float arg4 = (float) arg4_dbl;
1459 : double arg5_dbl;
1460 0 : if (!JS_ValueToNumber(cx, argv[5], &arg5_dbl))
1461 0 : return JS_FALSE;
1462 0 : float arg5 = (float) arg5_dbl;
1463 : nsresult rv;
1464 0 : nsCOMPtr<nsIDOMCanvasGradient> result;
1465 0 : rv = self->CreateRadialGradient(arg0, arg1, arg2, arg3, arg4, arg5, getter_AddRefs(result));
1466 0 : if (NS_FAILED(rv))
1467 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1468 0 : if (!result) {
1469 0 : *vp = JSVAL_NULL;
1470 0 : return JS_TRUE;
1471 : }
1472 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
1473 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
1474 0 : return JS_TRUE;
1475 : }
1476 : // After this point do not use 'result'!
1477 0 : qsObjectHelper helper(result, cache);
1478 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCanvasGradient), &interfaces[k_nsIDOMCanvasGradient], vp);
1479 : }
1480 :
1481 : static JSBool
1482 0 : nsIDOMCanvasRenderingContext2D_CreatePattern(JSContext *cx, unsigned argc, jsval *vp)
1483 : {
1484 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1485 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1486 0 : if (!obj)
1487 0 : return JS_FALSE;
1488 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
1489 : nsIDOMCanvasRenderingContext2D *self;
1490 0 : xpc_qsSelfRef selfref;
1491 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
1492 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
1493 0 : return JS_FALSE;
1494 0 : if (argc < 2)
1495 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1496 0 : jsval *argv = JS_ARGV(cx, vp);
1497 : nsresult rv;
1498 : nsIDOMHTMLElement *arg0;
1499 0 : xpc_qsSelfRef arg0ref;
1500 0 : rv = xpc_qsUnwrapArg<nsIDOMHTMLElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
1501 0 : if (NS_FAILED(rv)) {
1502 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
1503 0 : return JS_FALSE;
1504 : }
1505 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
1506 : xpc_qsDOMString::eDefaultNullBehavior,
1507 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1508 0 : if (!arg1.IsValid())
1509 0 : return JS_FALSE;
1510 0 : nsCOMPtr<nsIDOMCanvasPattern> result;
1511 0 : rv = self->CreatePattern(arg0, arg1, getter_AddRefs(result));
1512 0 : if (NS_FAILED(rv))
1513 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1514 0 : if (!result) {
1515 0 : *vp = JSVAL_NULL;
1516 0 : return JS_TRUE;
1517 : }
1518 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
1519 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
1520 0 : return JS_TRUE;
1521 : }
1522 : // After this point do not use 'result'!
1523 0 : qsObjectHelper helper(result, cache);
1524 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCanvasPattern), &interfaces[k_nsIDOMCanvasPattern], vp);
1525 : }
1526 :
1527 : static JSBool
1528 0 : nsIDOMCanvasRenderingContext2D_GetLineWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1529 : {
1530 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1531 : nsIDOMCanvasRenderingContext2D *self;
1532 0 : xpc_qsSelfRef selfref;
1533 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1534 0 : return JS_FALSE;
1535 : nsresult rv;
1536 : float result;
1537 0 : rv = self->GetLineWidth(&result);
1538 0 : if (NS_FAILED(rv))
1539 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1540 0 : return JS_NewNumberValue(cx, result, vp);
1541 : }
1542 :
1543 : static JSBool
1544 0 : nsIDOMCanvasRenderingContext2D_SetLineWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1545 : {
1546 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1547 : nsIDOMCanvasRenderingContext2D *self;
1548 0 : xpc_qsSelfRef selfref;
1549 0 : JS::AutoValueRooter tvr(cx);
1550 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1551 0 : return JS_FALSE;
1552 : double arg0_dbl;
1553 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1554 0 : return JS_FALSE;
1555 0 : float arg0 = (float) arg0_dbl;
1556 : nsresult rv;
1557 0 : rv = self->SetLineWidth(arg0);
1558 0 : if (NS_FAILED(rv))
1559 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1560 0 : return JS_TRUE;
1561 : }
1562 :
1563 : static JSBool
1564 0 : nsIDOMCanvasRenderingContext2D_GetLineCap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1565 : {
1566 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1567 : nsIDOMCanvasRenderingContext2D *self;
1568 0 : xpc_qsSelfRef selfref;
1569 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1570 0 : return JS_FALSE;
1571 : nsresult rv;
1572 0 : nsString result;
1573 0 : rv = self->GetLineCap(result);
1574 0 : if (NS_FAILED(rv))
1575 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1576 0 : return xpc::StringToJsval(cx, result, vp);
1577 : }
1578 :
1579 : static JSBool
1580 0 : nsIDOMCanvasRenderingContext2D_SetLineCap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1581 : {
1582 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1583 : nsIDOMCanvasRenderingContext2D *self;
1584 0 : xpc_qsSelfRef selfref;
1585 0 : JS::AutoValueRooter tvr(cx);
1586 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1587 0 : return JS_FALSE;
1588 : xpc_qsDOMString arg0(cx, *vp, vp,
1589 : xpc_qsDOMString::eDefaultNullBehavior,
1590 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1591 0 : if (!arg0.IsValid())
1592 0 : return JS_FALSE;
1593 : nsresult rv;
1594 0 : rv = self->SetLineCap(arg0);
1595 0 : if (NS_FAILED(rv))
1596 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1597 0 : return JS_TRUE;
1598 : }
1599 :
1600 : static JSBool
1601 0 : nsIDOMCanvasRenderingContext2D_GetLineJoin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1602 : {
1603 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1604 : nsIDOMCanvasRenderingContext2D *self;
1605 0 : xpc_qsSelfRef selfref;
1606 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1607 0 : return JS_FALSE;
1608 : nsresult rv;
1609 0 : nsString result;
1610 0 : rv = self->GetLineJoin(result);
1611 0 : if (NS_FAILED(rv))
1612 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1613 0 : return xpc::StringToJsval(cx, result, vp);
1614 : }
1615 :
1616 : static JSBool
1617 0 : nsIDOMCanvasRenderingContext2D_SetLineJoin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1618 : {
1619 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1620 : nsIDOMCanvasRenderingContext2D *self;
1621 0 : xpc_qsSelfRef selfref;
1622 0 : JS::AutoValueRooter tvr(cx);
1623 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1624 0 : return JS_FALSE;
1625 : xpc_qsDOMString arg0(cx, *vp, vp,
1626 : xpc_qsDOMString::eDefaultNullBehavior,
1627 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1628 0 : if (!arg0.IsValid())
1629 0 : return JS_FALSE;
1630 : nsresult rv;
1631 0 : rv = self->SetLineJoin(arg0);
1632 0 : if (NS_FAILED(rv))
1633 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1634 0 : return JS_TRUE;
1635 : }
1636 :
1637 : static JSBool
1638 0 : nsIDOMCanvasRenderingContext2D_GetMiterLimit(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1639 : {
1640 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1641 : nsIDOMCanvasRenderingContext2D *self;
1642 0 : xpc_qsSelfRef selfref;
1643 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1644 0 : return JS_FALSE;
1645 : nsresult rv;
1646 : float result;
1647 0 : rv = self->GetMiterLimit(&result);
1648 0 : if (NS_FAILED(rv))
1649 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1650 0 : return JS_NewNumberValue(cx, result, vp);
1651 : }
1652 :
1653 : static JSBool
1654 0 : nsIDOMCanvasRenderingContext2D_SetMiterLimit(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1655 : {
1656 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1657 : nsIDOMCanvasRenderingContext2D *self;
1658 0 : xpc_qsSelfRef selfref;
1659 0 : JS::AutoValueRooter tvr(cx);
1660 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1661 0 : return JS_FALSE;
1662 : double arg0_dbl;
1663 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1664 0 : return JS_FALSE;
1665 0 : float arg0 = (float) arg0_dbl;
1666 : nsresult rv;
1667 0 : rv = self->SetMiterLimit(arg0);
1668 0 : if (NS_FAILED(rv))
1669 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1670 0 : return JS_TRUE;
1671 : }
1672 :
1673 : static JSBool
1674 0 : nsIDOMCanvasRenderingContext2D_GetMozDash(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1675 : {
1676 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1677 : nsIDOMCanvasRenderingContext2D *self;
1678 0 : xpc_qsSelfRef selfref;
1679 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1680 0 : return JS_FALSE;
1681 : nsresult rv;
1682 0 : rv = self->GetMozDash(cx, vp);
1683 0 : if (NS_FAILED(rv))
1684 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1685 0 : return JS_TRUE;
1686 : }
1687 :
1688 : static JSBool
1689 0 : nsIDOMCanvasRenderingContext2D_SetMozDash(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1690 : {
1691 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1692 : nsIDOMCanvasRenderingContext2D *self;
1693 0 : xpc_qsSelfRef selfref;
1694 0 : JS::AutoValueRooter tvr(cx);
1695 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1696 0 : return JS_FALSE;
1697 0 : jsval arg0 = *vp;
1698 : nsresult rv;
1699 0 : rv = self->SetMozDash(cx, arg0);
1700 0 : if (NS_FAILED(rv))
1701 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1702 0 : return JS_TRUE;
1703 : }
1704 :
1705 : static JSBool
1706 0 : nsIDOMCanvasRenderingContext2D_GetMozDashOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1707 : {
1708 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1709 : nsIDOMCanvasRenderingContext2D *self;
1710 0 : xpc_qsSelfRef selfref;
1711 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1712 0 : return JS_FALSE;
1713 : nsresult rv;
1714 : float result;
1715 0 : rv = self->GetMozDashOffset(&result);
1716 0 : if (NS_FAILED(rv))
1717 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1718 0 : return JS_NewNumberValue(cx, result, vp);
1719 : }
1720 :
1721 : static JSBool
1722 0 : nsIDOMCanvasRenderingContext2D_SetMozDashOffset(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1723 : {
1724 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1725 : nsIDOMCanvasRenderingContext2D *self;
1726 0 : xpc_qsSelfRef selfref;
1727 0 : JS::AutoValueRooter tvr(cx);
1728 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1729 0 : return JS_FALSE;
1730 : double arg0_dbl;
1731 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1732 0 : return JS_FALSE;
1733 0 : float arg0 = (float) arg0_dbl;
1734 : nsresult rv;
1735 0 : rv = self->SetMozDashOffset(arg0);
1736 0 : if (NS_FAILED(rv))
1737 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1738 0 : return JS_TRUE;
1739 : }
1740 :
1741 : static JSBool
1742 0 : nsIDOMCanvasRenderingContext2D_GetShadowOffsetX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1743 : {
1744 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1745 : nsIDOMCanvasRenderingContext2D *self;
1746 0 : xpc_qsSelfRef selfref;
1747 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1748 0 : return JS_FALSE;
1749 : nsresult rv;
1750 : float result;
1751 0 : rv = self->GetShadowOffsetX(&result);
1752 0 : if (NS_FAILED(rv))
1753 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1754 0 : return JS_NewNumberValue(cx, result, vp);
1755 : }
1756 :
1757 : static JSBool
1758 0 : nsIDOMCanvasRenderingContext2D_SetShadowOffsetX(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1759 : {
1760 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1761 : nsIDOMCanvasRenderingContext2D *self;
1762 0 : xpc_qsSelfRef selfref;
1763 0 : JS::AutoValueRooter tvr(cx);
1764 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1765 0 : return JS_FALSE;
1766 : double arg0_dbl;
1767 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1768 0 : return JS_FALSE;
1769 0 : float arg0 = (float) arg0_dbl;
1770 : nsresult rv;
1771 0 : rv = self->SetShadowOffsetX(arg0);
1772 0 : if (NS_FAILED(rv))
1773 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1774 0 : return JS_TRUE;
1775 : }
1776 :
1777 : static JSBool
1778 0 : nsIDOMCanvasRenderingContext2D_GetShadowOffsetY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1779 : {
1780 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1781 : nsIDOMCanvasRenderingContext2D *self;
1782 0 : xpc_qsSelfRef selfref;
1783 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1784 0 : return JS_FALSE;
1785 : nsresult rv;
1786 : float result;
1787 0 : rv = self->GetShadowOffsetY(&result);
1788 0 : if (NS_FAILED(rv))
1789 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1790 0 : return JS_NewNumberValue(cx, result, vp);
1791 : }
1792 :
1793 : static JSBool
1794 0 : nsIDOMCanvasRenderingContext2D_SetShadowOffsetY(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1795 : {
1796 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1797 : nsIDOMCanvasRenderingContext2D *self;
1798 0 : xpc_qsSelfRef selfref;
1799 0 : JS::AutoValueRooter tvr(cx);
1800 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1801 0 : return JS_FALSE;
1802 : double arg0_dbl;
1803 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1804 0 : return JS_FALSE;
1805 0 : float arg0 = (float) arg0_dbl;
1806 : nsresult rv;
1807 0 : rv = self->SetShadowOffsetY(arg0);
1808 0 : if (NS_FAILED(rv))
1809 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1810 0 : return JS_TRUE;
1811 : }
1812 :
1813 : static JSBool
1814 0 : nsIDOMCanvasRenderingContext2D_GetShadowBlur(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1815 : {
1816 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1817 : nsIDOMCanvasRenderingContext2D *self;
1818 0 : xpc_qsSelfRef selfref;
1819 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1820 0 : return JS_FALSE;
1821 : nsresult rv;
1822 : float result;
1823 0 : rv = self->GetShadowBlur(&result);
1824 0 : if (NS_FAILED(rv))
1825 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1826 0 : return JS_NewNumberValue(cx, result, vp);
1827 : }
1828 :
1829 : static JSBool
1830 0 : nsIDOMCanvasRenderingContext2D_SetShadowBlur(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1831 : {
1832 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1833 : nsIDOMCanvasRenderingContext2D *self;
1834 0 : xpc_qsSelfRef selfref;
1835 0 : JS::AutoValueRooter tvr(cx);
1836 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1837 0 : return JS_FALSE;
1838 : double arg0_dbl;
1839 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1840 0 : return JS_FALSE;
1841 0 : float arg0 = (float) arg0_dbl;
1842 : nsresult rv;
1843 0 : rv = self->SetShadowBlur(arg0);
1844 0 : if (NS_FAILED(rv))
1845 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1846 0 : return JS_TRUE;
1847 : }
1848 :
1849 : static JSBool
1850 0 : nsIDOMCanvasRenderingContext2D_GetShadowColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1851 : {
1852 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1853 : nsIDOMCanvasRenderingContext2D *self;
1854 0 : xpc_qsSelfRef selfref;
1855 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1856 0 : return JS_FALSE;
1857 : nsresult rv;
1858 0 : nsString result;
1859 0 : rv = self->GetShadowColor(result);
1860 0 : if (NS_FAILED(rv))
1861 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1862 0 : return xpc::StringToJsval(cx, result, vp);
1863 : }
1864 :
1865 : static JSBool
1866 0 : nsIDOMCanvasRenderingContext2D_SetShadowColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1867 : {
1868 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1869 : nsIDOMCanvasRenderingContext2D *self;
1870 0 : xpc_qsSelfRef selfref;
1871 0 : JS::AutoValueRooter tvr(cx);
1872 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1873 0 : return JS_FALSE;
1874 : xpc_qsDOMString arg0(cx, *vp, vp,
1875 : xpc_qsDOMString::eDefaultNullBehavior,
1876 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1877 0 : if (!arg0.IsValid())
1878 0 : return JS_FALSE;
1879 : nsresult rv;
1880 0 : rv = self->SetShadowColor(arg0);
1881 0 : if (NS_FAILED(rv))
1882 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1883 0 : return JS_TRUE;
1884 : }
1885 :
1886 : static JSBool
1887 0 : nsIDOMCanvasRenderingContext2D_ClearRect(JSContext *cx, unsigned argc, jsval *vp)
1888 : {
1889 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1890 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1891 0 : if (!obj)
1892 0 : return JS_FALSE;
1893 : nsIDOMCanvasRenderingContext2D *self;
1894 0 : xpc_qsSelfRef selfref;
1895 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1896 0 : return JS_FALSE;
1897 0 : if (argc < 4)
1898 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1899 0 : jsval *argv = JS_ARGV(cx, vp);
1900 : double arg0_dbl;
1901 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1902 0 : return JS_FALSE;
1903 0 : float arg0 = (float) arg0_dbl;
1904 : double arg1_dbl;
1905 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1906 0 : return JS_FALSE;
1907 0 : float arg1 = (float) arg1_dbl;
1908 : double arg2_dbl;
1909 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1910 0 : return JS_FALSE;
1911 0 : float arg2 = (float) arg2_dbl;
1912 : double arg3_dbl;
1913 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1914 0 : return JS_FALSE;
1915 0 : float arg3 = (float) arg3_dbl;
1916 : nsresult rv;
1917 0 : rv = self->ClearRect(arg0, arg1, arg2, arg3);
1918 0 : if (NS_FAILED(rv))
1919 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1920 0 : *vp = JSVAL_VOID;
1921 0 : return JS_TRUE;
1922 : }
1923 :
1924 : static JSBool
1925 0 : nsIDOMCanvasRenderingContext2D_FillRect(JSContext *cx, unsigned argc, jsval *vp)
1926 : {
1927 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1928 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1929 0 : if (!obj)
1930 0 : return JS_FALSE;
1931 : nsIDOMCanvasRenderingContext2D *self;
1932 0 : xpc_qsSelfRef selfref;
1933 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1934 0 : return JS_FALSE;
1935 0 : if (argc < 4)
1936 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1937 0 : jsval *argv = JS_ARGV(cx, vp);
1938 : double arg0_dbl;
1939 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1940 0 : return JS_FALSE;
1941 0 : float arg0 = (float) arg0_dbl;
1942 : double arg1_dbl;
1943 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1944 0 : return JS_FALSE;
1945 0 : float arg1 = (float) arg1_dbl;
1946 : double arg2_dbl;
1947 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1948 0 : return JS_FALSE;
1949 0 : float arg2 = (float) arg2_dbl;
1950 : double arg3_dbl;
1951 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1952 0 : return JS_FALSE;
1953 0 : float arg3 = (float) arg3_dbl;
1954 : nsresult rv;
1955 0 : rv = self->FillRect(arg0, arg1, arg2, arg3);
1956 0 : if (NS_FAILED(rv))
1957 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1958 0 : *vp = JSVAL_VOID;
1959 0 : return JS_TRUE;
1960 : }
1961 :
1962 : static JSBool
1963 0 : nsIDOMCanvasRenderingContext2D_StrokeRect(JSContext *cx, unsigned argc, jsval *vp)
1964 : {
1965 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1966 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1967 0 : if (!obj)
1968 0 : return JS_FALSE;
1969 : nsIDOMCanvasRenderingContext2D *self;
1970 0 : xpc_qsSelfRef selfref;
1971 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1972 0 : return JS_FALSE;
1973 0 : if (argc < 4)
1974 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1975 0 : jsval *argv = JS_ARGV(cx, vp);
1976 : double arg0_dbl;
1977 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1978 0 : return JS_FALSE;
1979 0 : float arg0 = (float) arg0_dbl;
1980 : double arg1_dbl;
1981 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1982 0 : return JS_FALSE;
1983 0 : float arg1 = (float) arg1_dbl;
1984 : double arg2_dbl;
1985 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1986 0 : return JS_FALSE;
1987 0 : float arg2 = (float) arg2_dbl;
1988 : double arg3_dbl;
1989 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1990 0 : return JS_FALSE;
1991 0 : float arg3 = (float) arg3_dbl;
1992 : nsresult rv;
1993 0 : rv = self->StrokeRect(arg0, arg1, arg2, arg3);
1994 0 : if (NS_FAILED(rv))
1995 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1996 0 : *vp = JSVAL_VOID;
1997 0 : return JS_TRUE;
1998 : }
1999 :
2000 : static JSBool
2001 0 : nsIDOMCanvasRenderingContext2D_BeginPath(JSContext *cx, unsigned argc, jsval *vp)
2002 : {
2003 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2004 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2005 0 : if (!obj)
2006 0 : return JS_FALSE;
2007 : nsIDOMCanvasRenderingContext2D *self;
2008 0 : xpc_qsSelfRef selfref;
2009 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2010 0 : return JS_FALSE;
2011 : nsresult rv;
2012 0 : rv = self->BeginPath();
2013 0 : if (NS_FAILED(rv))
2014 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2015 0 : *vp = JSVAL_VOID;
2016 0 : return JS_TRUE;
2017 : }
2018 :
2019 : static JSBool
2020 0 : nsIDOMCanvasRenderingContext2D_ClosePath(JSContext *cx, unsigned argc, jsval *vp)
2021 : {
2022 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2023 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2024 0 : if (!obj)
2025 0 : return JS_FALSE;
2026 : nsIDOMCanvasRenderingContext2D *self;
2027 0 : xpc_qsSelfRef selfref;
2028 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2029 0 : return JS_FALSE;
2030 : nsresult rv;
2031 0 : rv = self->ClosePath();
2032 0 : if (NS_FAILED(rv))
2033 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2034 0 : *vp = JSVAL_VOID;
2035 0 : return JS_TRUE;
2036 : }
2037 :
2038 : static JSBool
2039 0 : nsIDOMCanvasRenderingContext2D_MoveTo(JSContext *cx, unsigned argc, jsval *vp)
2040 : {
2041 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2042 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2043 0 : if (!obj)
2044 0 : return JS_FALSE;
2045 : nsIDOMCanvasRenderingContext2D *self;
2046 0 : xpc_qsSelfRef selfref;
2047 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2048 0 : return JS_FALSE;
2049 0 : if (argc < 2)
2050 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2051 0 : jsval *argv = JS_ARGV(cx, vp);
2052 : double arg0_dbl;
2053 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2054 0 : return JS_FALSE;
2055 0 : float arg0 = (float) arg0_dbl;
2056 : double arg1_dbl;
2057 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2058 0 : return JS_FALSE;
2059 0 : float arg1 = (float) arg1_dbl;
2060 : nsresult rv;
2061 0 : rv = self->MoveTo(arg0, arg1);
2062 0 : if (NS_FAILED(rv))
2063 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2064 0 : *vp = JSVAL_VOID;
2065 0 : return JS_TRUE;
2066 : }
2067 :
2068 : static JSBool
2069 0 : nsIDOMCanvasRenderingContext2D_LineTo(JSContext *cx, unsigned argc, jsval *vp)
2070 : {
2071 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2072 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2073 0 : if (!obj)
2074 0 : return JS_FALSE;
2075 : nsIDOMCanvasRenderingContext2D *self;
2076 0 : xpc_qsSelfRef selfref;
2077 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2078 0 : return JS_FALSE;
2079 0 : if (argc < 2)
2080 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2081 0 : jsval *argv = JS_ARGV(cx, vp);
2082 : double arg0_dbl;
2083 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2084 0 : return JS_FALSE;
2085 0 : float arg0 = (float) arg0_dbl;
2086 : double arg1_dbl;
2087 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2088 0 : return JS_FALSE;
2089 0 : float arg1 = (float) arg1_dbl;
2090 : nsresult rv;
2091 0 : rv = self->LineTo(arg0, arg1);
2092 0 : if (NS_FAILED(rv))
2093 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2094 0 : *vp = JSVAL_VOID;
2095 0 : return JS_TRUE;
2096 : }
2097 :
2098 : static JSBool
2099 0 : nsIDOMCanvasRenderingContext2D_QuadraticCurveTo(JSContext *cx, unsigned argc, jsval *vp)
2100 : {
2101 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2102 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2103 0 : if (!obj)
2104 0 : return JS_FALSE;
2105 : nsIDOMCanvasRenderingContext2D *self;
2106 0 : xpc_qsSelfRef selfref;
2107 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2108 0 : return JS_FALSE;
2109 0 : if (argc < 4)
2110 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2111 0 : jsval *argv = JS_ARGV(cx, vp);
2112 : double arg0_dbl;
2113 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2114 0 : return JS_FALSE;
2115 0 : float arg0 = (float) arg0_dbl;
2116 : double arg1_dbl;
2117 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2118 0 : return JS_FALSE;
2119 0 : float arg1 = (float) arg1_dbl;
2120 : double arg2_dbl;
2121 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2122 0 : return JS_FALSE;
2123 0 : float arg2 = (float) arg2_dbl;
2124 : double arg3_dbl;
2125 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2126 0 : return JS_FALSE;
2127 0 : float arg3 = (float) arg3_dbl;
2128 : nsresult rv;
2129 0 : rv = self->QuadraticCurveTo(arg0, arg1, arg2, arg3);
2130 0 : if (NS_FAILED(rv))
2131 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2132 0 : *vp = JSVAL_VOID;
2133 0 : return JS_TRUE;
2134 : }
2135 :
2136 : static JSBool
2137 0 : nsIDOMCanvasRenderingContext2D_BezierCurveTo(JSContext *cx, unsigned argc, jsval *vp)
2138 : {
2139 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2140 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2141 0 : if (!obj)
2142 0 : return JS_FALSE;
2143 : nsIDOMCanvasRenderingContext2D *self;
2144 0 : xpc_qsSelfRef selfref;
2145 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2146 0 : return JS_FALSE;
2147 0 : if (argc < 6)
2148 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2149 0 : jsval *argv = JS_ARGV(cx, vp);
2150 : double arg0_dbl;
2151 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2152 0 : return JS_FALSE;
2153 0 : float arg0 = (float) arg0_dbl;
2154 : double arg1_dbl;
2155 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2156 0 : return JS_FALSE;
2157 0 : float arg1 = (float) arg1_dbl;
2158 : double arg2_dbl;
2159 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2160 0 : return JS_FALSE;
2161 0 : float arg2 = (float) arg2_dbl;
2162 : double arg3_dbl;
2163 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2164 0 : return JS_FALSE;
2165 0 : float arg3 = (float) arg3_dbl;
2166 : double arg4_dbl;
2167 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
2168 0 : return JS_FALSE;
2169 0 : float arg4 = (float) arg4_dbl;
2170 : double arg5_dbl;
2171 0 : if (!JS_ValueToNumber(cx, argv[5], &arg5_dbl))
2172 0 : return JS_FALSE;
2173 0 : float arg5 = (float) arg5_dbl;
2174 : nsresult rv;
2175 0 : rv = self->BezierCurveTo(arg0, arg1, arg2, arg3, arg4, arg5);
2176 0 : if (NS_FAILED(rv))
2177 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2178 0 : *vp = JSVAL_VOID;
2179 0 : return JS_TRUE;
2180 : }
2181 :
2182 : static JSBool
2183 0 : nsIDOMCanvasRenderingContext2D_ArcTo(JSContext *cx, unsigned argc, jsval *vp)
2184 : {
2185 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2186 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2187 0 : if (!obj)
2188 0 : return JS_FALSE;
2189 : nsIDOMCanvasRenderingContext2D *self;
2190 0 : xpc_qsSelfRef selfref;
2191 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2192 0 : return JS_FALSE;
2193 0 : if (argc < 5)
2194 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2195 0 : jsval *argv = JS_ARGV(cx, vp);
2196 : double arg0_dbl;
2197 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2198 0 : return JS_FALSE;
2199 0 : float arg0 = (float) arg0_dbl;
2200 : double arg1_dbl;
2201 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2202 0 : return JS_FALSE;
2203 0 : float arg1 = (float) arg1_dbl;
2204 : double arg2_dbl;
2205 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2206 0 : return JS_FALSE;
2207 0 : float arg2 = (float) arg2_dbl;
2208 : double arg3_dbl;
2209 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2210 0 : return JS_FALSE;
2211 0 : float arg3 = (float) arg3_dbl;
2212 : double arg4_dbl;
2213 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
2214 0 : return JS_FALSE;
2215 0 : float arg4 = (float) arg4_dbl;
2216 : nsresult rv;
2217 0 : rv = self->ArcTo(arg0, arg1, arg2, arg3, arg4);
2218 0 : if (NS_FAILED(rv))
2219 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2220 0 : *vp = JSVAL_VOID;
2221 0 : return JS_TRUE;
2222 : }
2223 :
2224 : static JSBool
2225 0 : nsIDOMCanvasRenderingContext2D_Arc(JSContext *cx, unsigned argc, jsval *vp)
2226 : {
2227 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2228 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2229 0 : if (!obj)
2230 0 : return JS_FALSE;
2231 : nsIDOMCanvasRenderingContext2D *self;
2232 0 : xpc_qsSelfRef selfref;
2233 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2234 0 : return JS_FALSE;
2235 0 : if (argc < 5)
2236 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2237 0 : jsval *argv = JS_ARGV(cx, vp);
2238 : double arg0_dbl;
2239 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2240 0 : return JS_FALSE;
2241 0 : float arg0 = (float) arg0_dbl;
2242 : double arg1_dbl;
2243 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2244 0 : return JS_FALSE;
2245 0 : float arg1 = (float) arg1_dbl;
2246 : double arg2_dbl;
2247 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2248 0 : return JS_FALSE;
2249 0 : float arg2 = (float) arg2_dbl;
2250 : double arg3_dbl;
2251 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2252 0 : return JS_FALSE;
2253 0 : float arg3 = (float) arg3_dbl;
2254 : double arg4_dbl;
2255 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
2256 0 : return JS_FALSE;
2257 0 : float arg4 = (float) arg4_dbl;
2258 : JSBool arg5;
2259 0 : JS_ValueToBoolean(cx, (5 < argc ? argv[5] : JSVAL_NULL), &arg5);
2260 : nsresult rv;
2261 0 : rv = self->Arc(arg0, arg1, arg2, arg3, arg4, arg5);
2262 0 : if (NS_FAILED(rv))
2263 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2264 0 : *vp = JSVAL_VOID;
2265 0 : return JS_TRUE;
2266 : }
2267 :
2268 : static JSBool
2269 0 : nsIDOMCanvasRenderingContext2D_Rect(JSContext *cx, unsigned argc, jsval *vp)
2270 : {
2271 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2272 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2273 0 : if (!obj)
2274 0 : return JS_FALSE;
2275 : nsIDOMCanvasRenderingContext2D *self;
2276 0 : xpc_qsSelfRef selfref;
2277 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2278 0 : return JS_FALSE;
2279 0 : if (argc < 4)
2280 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2281 0 : jsval *argv = JS_ARGV(cx, vp);
2282 : double arg0_dbl;
2283 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2284 0 : return JS_FALSE;
2285 0 : float arg0 = (float) arg0_dbl;
2286 : double arg1_dbl;
2287 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2288 0 : return JS_FALSE;
2289 0 : float arg1 = (float) arg1_dbl;
2290 : double arg2_dbl;
2291 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2292 0 : return JS_FALSE;
2293 0 : float arg2 = (float) arg2_dbl;
2294 : double arg3_dbl;
2295 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2296 0 : return JS_FALSE;
2297 0 : float arg3 = (float) arg3_dbl;
2298 : nsresult rv;
2299 0 : rv = self->Rect(arg0, arg1, arg2, arg3);
2300 0 : if (NS_FAILED(rv))
2301 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2302 0 : *vp = JSVAL_VOID;
2303 0 : return JS_TRUE;
2304 : }
2305 :
2306 : static JSBool
2307 0 : nsIDOMCanvasRenderingContext2D_Fill(JSContext *cx, unsigned argc, jsval *vp)
2308 : {
2309 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2310 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2311 0 : if (!obj)
2312 0 : return JS_FALSE;
2313 : nsIDOMCanvasRenderingContext2D *self;
2314 0 : xpc_qsSelfRef selfref;
2315 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2316 0 : return JS_FALSE;
2317 : nsresult rv;
2318 0 : rv = self->Fill();
2319 0 : if (NS_FAILED(rv))
2320 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2321 0 : *vp = JSVAL_VOID;
2322 0 : return JS_TRUE;
2323 : }
2324 :
2325 : static JSBool
2326 0 : nsIDOMCanvasRenderingContext2D_Stroke(JSContext *cx, unsigned argc, jsval *vp)
2327 : {
2328 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2329 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2330 0 : if (!obj)
2331 0 : return JS_FALSE;
2332 : nsIDOMCanvasRenderingContext2D *self;
2333 0 : xpc_qsSelfRef selfref;
2334 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2335 0 : return JS_FALSE;
2336 : nsresult rv;
2337 0 : rv = self->Stroke();
2338 0 : if (NS_FAILED(rv))
2339 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2340 0 : *vp = JSVAL_VOID;
2341 0 : return JS_TRUE;
2342 : }
2343 :
2344 : static JSBool
2345 0 : nsIDOMCanvasRenderingContext2D_Clip(JSContext *cx, unsigned argc, jsval *vp)
2346 : {
2347 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2348 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2349 0 : if (!obj)
2350 0 : return JS_FALSE;
2351 : nsIDOMCanvasRenderingContext2D *self;
2352 0 : xpc_qsSelfRef selfref;
2353 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2354 0 : return JS_FALSE;
2355 : nsresult rv;
2356 0 : rv = self->Clip();
2357 0 : if (NS_FAILED(rv))
2358 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2359 0 : *vp = JSVAL_VOID;
2360 0 : return JS_TRUE;
2361 : }
2362 :
2363 : static JSBool
2364 0 : nsIDOMCanvasRenderingContext2D_GetFont(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2365 : {
2366 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2367 : nsIDOMCanvasRenderingContext2D *self;
2368 0 : xpc_qsSelfRef selfref;
2369 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2370 0 : return JS_FALSE;
2371 : nsresult rv;
2372 0 : nsString result;
2373 0 : rv = self->GetFont(result);
2374 0 : if (NS_FAILED(rv))
2375 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2376 0 : return xpc::StringToJsval(cx, result, vp);
2377 : }
2378 :
2379 : static JSBool
2380 0 : nsIDOMCanvasRenderingContext2D_SetFont(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2381 : {
2382 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2383 : nsIDOMCanvasRenderingContext2D *self;
2384 0 : xpc_qsSelfRef selfref;
2385 0 : JS::AutoValueRooter tvr(cx);
2386 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2387 0 : return JS_FALSE;
2388 : xpc_qsDOMString arg0(cx, *vp, vp,
2389 : xpc_qsDOMString::eDefaultNullBehavior,
2390 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2391 0 : if (!arg0.IsValid())
2392 0 : return JS_FALSE;
2393 : nsresult rv;
2394 0 : rv = self->SetFont(arg0);
2395 0 : if (NS_FAILED(rv))
2396 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2397 0 : return JS_TRUE;
2398 : }
2399 :
2400 : static JSBool
2401 0 : nsIDOMCanvasRenderingContext2D_GetTextAlign(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2402 : {
2403 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2404 : nsIDOMCanvasRenderingContext2D *self;
2405 0 : xpc_qsSelfRef selfref;
2406 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2407 0 : return JS_FALSE;
2408 : nsresult rv;
2409 0 : nsString result;
2410 0 : rv = self->GetTextAlign(result);
2411 0 : if (NS_FAILED(rv))
2412 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2413 0 : return xpc::StringToJsval(cx, result, vp);
2414 : }
2415 :
2416 : static JSBool
2417 0 : nsIDOMCanvasRenderingContext2D_SetTextAlign(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2418 : {
2419 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2420 : nsIDOMCanvasRenderingContext2D *self;
2421 0 : xpc_qsSelfRef selfref;
2422 0 : JS::AutoValueRooter tvr(cx);
2423 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2424 0 : return JS_FALSE;
2425 : xpc_qsDOMString arg0(cx, *vp, vp,
2426 : xpc_qsDOMString::eDefaultNullBehavior,
2427 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2428 0 : if (!arg0.IsValid())
2429 0 : return JS_FALSE;
2430 : nsresult rv;
2431 0 : rv = self->SetTextAlign(arg0);
2432 0 : if (NS_FAILED(rv))
2433 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2434 0 : return JS_TRUE;
2435 : }
2436 :
2437 : static JSBool
2438 0 : nsIDOMCanvasRenderingContext2D_GetTextBaseline(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2439 : {
2440 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2441 : nsIDOMCanvasRenderingContext2D *self;
2442 0 : xpc_qsSelfRef selfref;
2443 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2444 0 : return JS_FALSE;
2445 : nsresult rv;
2446 0 : nsString result;
2447 0 : rv = self->GetTextBaseline(result);
2448 0 : if (NS_FAILED(rv))
2449 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2450 0 : return xpc::StringToJsval(cx, result, vp);
2451 : }
2452 :
2453 : static JSBool
2454 0 : nsIDOMCanvasRenderingContext2D_SetTextBaseline(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2455 : {
2456 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2457 : nsIDOMCanvasRenderingContext2D *self;
2458 0 : xpc_qsSelfRef selfref;
2459 0 : JS::AutoValueRooter tvr(cx);
2460 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2461 0 : return JS_FALSE;
2462 : xpc_qsDOMString arg0(cx, *vp, vp,
2463 : xpc_qsDOMString::eDefaultNullBehavior,
2464 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2465 0 : if (!arg0.IsValid())
2466 0 : return JS_FALSE;
2467 : nsresult rv;
2468 0 : rv = self->SetTextBaseline(arg0);
2469 0 : if (NS_FAILED(rv))
2470 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2471 0 : return JS_TRUE;
2472 : }
2473 :
2474 : static JSBool
2475 0 : nsIDOMCanvasRenderingContext2D_FillText(JSContext *cx, unsigned argc, jsval *vp)
2476 : {
2477 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2478 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2479 0 : if (!obj)
2480 0 : return JS_FALSE;
2481 : nsIDOMCanvasRenderingContext2D *self;
2482 0 : xpc_qsSelfRef selfref;
2483 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2484 0 : return JS_FALSE;
2485 0 : if (argc < 3)
2486 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2487 0 : jsval *argv = JS_ARGV(cx, vp);
2488 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
2489 : xpc_qsDOMString::eDefaultNullBehavior,
2490 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2491 0 : if (!arg0.IsValid())
2492 0 : return JS_FALSE;
2493 : double arg1_dbl;
2494 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2495 0 : return JS_FALSE;
2496 0 : float arg1 = (float) arg1_dbl;
2497 : double arg2_dbl;
2498 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2499 0 : return JS_FALSE;
2500 0 : float arg2 = (float) arg2_dbl;
2501 : double arg3_dbl;
2502 0 : if (!JS_ValueToNumber(cx, (3 < argc ? argv[3] : JSVAL_NULL), &arg3_dbl))
2503 0 : return JS_FALSE;
2504 0 : float arg3 = (float) arg3_dbl;
2505 : nsresult rv;
2506 0 : rv = self->FillText(arg0, arg1, arg2, arg3);
2507 0 : if (NS_FAILED(rv))
2508 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2509 0 : *vp = JSVAL_VOID;
2510 0 : return JS_TRUE;
2511 : }
2512 :
2513 : static JSBool
2514 0 : nsIDOMCanvasRenderingContext2D_StrokeText(JSContext *cx, unsigned argc, jsval *vp)
2515 : {
2516 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2517 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2518 0 : if (!obj)
2519 0 : return JS_FALSE;
2520 : nsIDOMCanvasRenderingContext2D *self;
2521 0 : xpc_qsSelfRef selfref;
2522 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2523 0 : return JS_FALSE;
2524 0 : if (argc < 3)
2525 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2526 0 : jsval *argv = JS_ARGV(cx, vp);
2527 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
2528 : xpc_qsDOMString::eDefaultNullBehavior,
2529 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2530 0 : if (!arg0.IsValid())
2531 0 : return JS_FALSE;
2532 : double arg1_dbl;
2533 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2534 0 : return JS_FALSE;
2535 0 : float arg1 = (float) arg1_dbl;
2536 : double arg2_dbl;
2537 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2538 0 : return JS_FALSE;
2539 0 : float arg2 = (float) arg2_dbl;
2540 : double arg3_dbl;
2541 0 : if (!JS_ValueToNumber(cx, (3 < argc ? argv[3] : JSVAL_NULL), &arg3_dbl))
2542 0 : return JS_FALSE;
2543 0 : float arg3 = (float) arg3_dbl;
2544 : nsresult rv;
2545 0 : rv = self->StrokeText(arg0, arg1, arg2, arg3);
2546 0 : if (NS_FAILED(rv))
2547 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2548 0 : *vp = JSVAL_VOID;
2549 0 : return JS_TRUE;
2550 : }
2551 :
2552 : static JSBool
2553 0 : nsIDOMCanvasRenderingContext2D_MeasureText(JSContext *cx, unsigned argc, jsval *vp)
2554 : {
2555 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2556 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2557 0 : if (!obj)
2558 0 : return JS_FALSE;
2559 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
2560 : nsIDOMCanvasRenderingContext2D *self;
2561 0 : xpc_qsSelfRef selfref;
2562 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
2563 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
2564 0 : return JS_FALSE;
2565 0 : if (argc < 1)
2566 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2567 0 : jsval *argv = JS_ARGV(cx, vp);
2568 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
2569 : xpc_qsDOMString::eDefaultNullBehavior,
2570 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2571 0 : if (!arg0.IsValid())
2572 0 : return JS_FALSE;
2573 : nsresult rv;
2574 0 : nsCOMPtr<nsIDOMTextMetrics> result;
2575 0 : rv = self->MeasureText(arg0, getter_AddRefs(result));
2576 0 : if (NS_FAILED(rv))
2577 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2578 0 : if (!result) {
2579 0 : *vp = JSVAL_NULL;
2580 0 : return JS_TRUE;
2581 : }
2582 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
2583 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
2584 0 : return JS_TRUE;
2585 : }
2586 : // After this point do not use 'result'!
2587 0 : qsObjectHelper helper(result, cache);
2588 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTextMetrics), &interfaces[k_nsIDOMTextMetrics], vp);
2589 : }
2590 :
2591 : static JSBool
2592 0 : nsIDOMCanvasRenderingContext2D_GetMozTextStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2593 : {
2594 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2595 : nsIDOMCanvasRenderingContext2D *self;
2596 0 : xpc_qsSelfRef selfref;
2597 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2598 0 : return JS_FALSE;
2599 : nsresult rv;
2600 0 : nsString result;
2601 0 : rv = self->GetMozTextStyle(result);
2602 0 : if (NS_FAILED(rv))
2603 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2604 0 : return xpc::StringToJsval(cx, result, vp);
2605 : }
2606 :
2607 : static JSBool
2608 0 : nsIDOMCanvasRenderingContext2D_SetMozTextStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2609 : {
2610 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2611 : nsIDOMCanvasRenderingContext2D *self;
2612 0 : xpc_qsSelfRef selfref;
2613 0 : JS::AutoValueRooter tvr(cx);
2614 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2615 0 : return JS_FALSE;
2616 : xpc_qsDOMString arg0(cx, *vp, vp,
2617 : xpc_qsDOMString::eDefaultNullBehavior,
2618 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2619 0 : if (!arg0.IsValid())
2620 0 : return JS_FALSE;
2621 : nsresult rv;
2622 0 : rv = self->SetMozTextStyle(arg0);
2623 0 : if (NS_FAILED(rv))
2624 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2625 0 : return JS_TRUE;
2626 : }
2627 :
2628 : static JSBool
2629 0 : nsIDOMCanvasRenderingContext2D_DrawImage(JSContext *cx, unsigned argc, jsval *vp)
2630 : {
2631 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2632 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2633 0 : if (!obj)
2634 0 : return JS_FALSE;
2635 : nsIDOMCanvasRenderingContext2D *self;
2636 0 : xpc_qsSelfRef selfref;
2637 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2638 0 : return JS_FALSE;
2639 0 : if (argc < 3)
2640 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2641 0 : jsval *argv = JS_ARGV(cx, vp);
2642 : nsresult rv;
2643 : nsIDOMElement *arg0;
2644 0 : xpc_qsSelfRef arg0ref;
2645 0 : rv = xpc_qsUnwrapArg<nsIDOMElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
2646 0 : if (NS_FAILED(rv)) {
2647 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
2648 0 : return JS_FALSE;
2649 : }
2650 : double arg1_dbl;
2651 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2652 0 : return JS_FALSE;
2653 0 : float arg1 = (float) arg1_dbl;
2654 : double arg2_dbl;
2655 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2656 0 : return JS_FALSE;
2657 0 : float arg2 = (float) arg2_dbl;
2658 : double arg3_dbl;
2659 0 : if (!JS_ValueToNumber(cx, (3 < argc ? argv[3] : JSVAL_NULL), &arg3_dbl))
2660 0 : return JS_FALSE;
2661 0 : float arg3 = (float) arg3_dbl;
2662 : double arg4_dbl;
2663 0 : if (!JS_ValueToNumber(cx, (4 < argc ? argv[4] : JSVAL_NULL), &arg4_dbl))
2664 0 : return JS_FALSE;
2665 0 : float arg4 = (float) arg4_dbl;
2666 : double arg5_dbl;
2667 0 : if (!JS_ValueToNumber(cx, (5 < argc ? argv[5] : JSVAL_NULL), &arg5_dbl))
2668 0 : return JS_FALSE;
2669 0 : float arg5 = (float) arg5_dbl;
2670 : double arg6_dbl;
2671 0 : if (!JS_ValueToNumber(cx, (6 < argc ? argv[6] : JSVAL_NULL), &arg6_dbl))
2672 0 : return JS_FALSE;
2673 0 : float arg6 = (float) arg6_dbl;
2674 : double arg7_dbl;
2675 0 : if (!JS_ValueToNumber(cx, (7 < argc ? argv[7] : JSVAL_NULL), &arg7_dbl))
2676 0 : return JS_FALSE;
2677 0 : float arg7 = (float) arg7_dbl;
2678 : double arg8_dbl;
2679 0 : if (!JS_ValueToNumber(cx, (8 < argc ? argv[8] : JSVAL_NULL), &arg8_dbl))
2680 0 : return JS_FALSE;
2681 0 : float arg8 = (float) arg8_dbl;
2682 0 : rv = self->DrawImage(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, NS_MIN<PRUint32>(argc, 9) - 3);
2683 0 : if (NS_FAILED(rv))
2684 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2685 0 : *vp = JSVAL_VOID;
2686 0 : return JS_TRUE;
2687 : }
2688 :
2689 : static JSBool
2690 0 : nsIDOMCanvasRenderingContext2D_IsPointInPath(JSContext *cx, unsigned argc, jsval *vp)
2691 : {
2692 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2693 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2694 0 : if (!obj)
2695 0 : return JS_FALSE;
2696 : nsIDOMCanvasRenderingContext2D *self;
2697 0 : xpc_qsSelfRef selfref;
2698 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2699 0 : return JS_FALSE;
2700 0 : if (argc < 2)
2701 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2702 0 : jsval *argv = JS_ARGV(cx, vp);
2703 : double arg0_dbl;
2704 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2705 0 : return JS_FALSE;
2706 0 : float arg0 = (float) arg0_dbl;
2707 : double arg1_dbl;
2708 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2709 0 : return JS_FALSE;
2710 0 : float arg1 = (float) arg1_dbl;
2711 : nsresult rv;
2712 : bool result;
2713 0 : rv = self->IsPointInPath(arg0, arg1, &result);
2714 0 : if (NS_FAILED(rv))
2715 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2716 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
2717 0 : return JS_TRUE;
2718 : }
2719 :
2720 : static JSBool
2721 0 : nsIDOMCanvasRenderingContext2D_GetMozImageSmoothingEnabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2722 : {
2723 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2724 : nsIDOMCanvasRenderingContext2D *self;
2725 0 : xpc_qsSelfRef selfref;
2726 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2727 0 : return JS_FALSE;
2728 : nsresult rv;
2729 : bool result;
2730 0 : rv = self->GetMozImageSmoothingEnabled(&result);
2731 0 : if (NS_FAILED(rv))
2732 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2733 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
2734 0 : return JS_TRUE;
2735 : }
2736 :
2737 : static JSBool
2738 0 : nsIDOMCanvasRenderingContext2D_SetMozImageSmoothingEnabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2739 : {
2740 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2741 : nsIDOMCanvasRenderingContext2D *self;
2742 0 : xpc_qsSelfRef selfref;
2743 0 : JS::AutoValueRooter tvr(cx);
2744 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2745 0 : return JS_FALSE;
2746 : JSBool arg0;
2747 0 : JS_ValueToBoolean(cx, *vp, &arg0);
2748 : nsresult rv;
2749 0 : rv = self->SetMozImageSmoothingEnabled(arg0);
2750 0 : if (NS_FAILED(rv))
2751 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2752 0 : return JS_TRUE;
2753 : }
2754 :
2755 : static JSBool
2756 0 : nsIDOMCanvasRenderingContext2D_DrawWindow(JSContext *cx, unsigned argc, jsval *vp)
2757 : {
2758 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2759 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2760 0 : if (!obj)
2761 0 : return JS_FALSE;
2762 : nsIDOMCanvasRenderingContext2D *self;
2763 0 : xpc_qsSelfRef selfref;
2764 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2765 0 : return JS_FALSE;
2766 0 : if (argc < 6)
2767 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2768 0 : jsval *argv = JS_ARGV(cx, vp);
2769 : nsresult rv;
2770 : nsIDOMWindow *arg0;
2771 0 : xpc_qsSelfRef arg0ref;
2772 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
2773 0 : if (NS_FAILED(rv)) {
2774 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
2775 0 : return JS_FALSE;
2776 : }
2777 : double arg1_dbl;
2778 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2779 0 : return JS_FALSE;
2780 0 : float arg1 = (float) arg1_dbl;
2781 : double arg2_dbl;
2782 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2783 0 : return JS_FALSE;
2784 0 : float arg2 = (float) arg2_dbl;
2785 : double arg3_dbl;
2786 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2787 0 : return JS_FALSE;
2788 0 : float arg3 = (float) arg3_dbl;
2789 : double arg4_dbl;
2790 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
2791 0 : return JS_FALSE;
2792 0 : float arg4 = (float) arg4_dbl;
2793 0 : xpc_qsDOMString arg5(cx, argv[5], &argv[5],
2794 : xpc_qsDOMString::eDefaultNullBehavior,
2795 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2796 0 : if (!arg5.IsValid())
2797 0 : return JS_FALSE;
2798 : uint32_t arg6;
2799 0 : if (!JS_ValueToECMAUint32(cx, (6 < argc ? argv[6] : JSVAL_NULL), &arg6))
2800 0 : return JS_FALSE;
2801 0 : rv = self->DrawWindow(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
2802 0 : if (NS_FAILED(rv))
2803 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2804 0 : *vp = JSVAL_VOID;
2805 0 : return JS_TRUE;
2806 : }
2807 :
2808 : static JSBool
2809 0 : nsIDOMCanvasRenderingContext2D_AsyncDrawXULElement(JSContext *cx, unsigned argc, jsval *vp)
2810 : {
2811 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2812 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2813 0 : if (!obj)
2814 0 : return JS_FALSE;
2815 : nsIDOMCanvasRenderingContext2D *self;
2816 0 : xpc_qsSelfRef selfref;
2817 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2818 0 : return JS_FALSE;
2819 0 : if (argc < 6)
2820 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2821 0 : jsval *argv = JS_ARGV(cx, vp);
2822 : nsresult rv;
2823 : nsIDOMXULElement *arg0;
2824 0 : xpc_qsSelfRef arg0ref;
2825 0 : rv = xpc_qsUnwrapArg<nsIDOMXULElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
2826 0 : if (NS_FAILED(rv)) {
2827 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
2828 0 : return JS_FALSE;
2829 : }
2830 : double arg1_dbl;
2831 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2832 0 : return JS_FALSE;
2833 0 : float arg1 = (float) arg1_dbl;
2834 : double arg2_dbl;
2835 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2836 0 : return JS_FALSE;
2837 0 : float arg2 = (float) arg2_dbl;
2838 : double arg3_dbl;
2839 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2840 0 : return JS_FALSE;
2841 0 : float arg3 = (float) arg3_dbl;
2842 : double arg4_dbl;
2843 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
2844 0 : return JS_FALSE;
2845 0 : float arg4 = (float) arg4_dbl;
2846 0 : xpc_qsDOMString arg5(cx, argv[5], &argv[5],
2847 : xpc_qsDOMString::eDefaultNullBehavior,
2848 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2849 0 : if (!arg5.IsValid())
2850 0 : return JS_FALSE;
2851 : uint32_t arg6;
2852 0 : if (!JS_ValueToECMAUint32(cx, (6 < argc ? argv[6] : JSVAL_NULL), &arg6))
2853 0 : return JS_FALSE;
2854 0 : rv = self->AsyncDrawXULElement(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
2855 0 : if (NS_FAILED(rv))
2856 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2857 0 : *vp = JSVAL_VOID;
2858 0 : return JS_TRUE;
2859 : }
2860 :
2861 : // === interface nsIDOMTextMetrics
2862 :
2863 : static JSBool
2864 0 : nsIDOMTextMetrics_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2865 : {
2866 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2867 : nsIDOMTextMetrics *self;
2868 0 : xpc_qsSelfRef selfref;
2869 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2870 0 : return JS_FALSE;
2871 : nsresult rv;
2872 : float result;
2873 0 : rv = self->GetWidth(&result);
2874 0 : if (NS_FAILED(rv))
2875 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2876 0 : return JS_NewNumberValue(cx, result, vp);
2877 : }
2878 :
2879 : // === interface nsIDOMCanvasGradient
2880 :
2881 : static JSBool
2882 0 : nsIDOMCanvasGradient_AddColorStop(JSContext *cx, unsigned argc, jsval *vp)
2883 : {
2884 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2885 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2886 0 : if (!obj)
2887 0 : return JS_FALSE;
2888 : nsIDOMCanvasGradient *self;
2889 0 : xpc_qsSelfRef selfref;
2890 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2891 0 : return JS_FALSE;
2892 0 : if (argc < 2)
2893 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2894 0 : jsval *argv = JS_ARGV(cx, vp);
2895 : double arg0_dbl;
2896 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2897 0 : return JS_FALSE;
2898 0 : float arg0 = (float) arg0_dbl;
2899 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
2900 : xpc_qsDOMString::eDefaultNullBehavior,
2901 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2902 0 : if (!arg1.IsValid())
2903 0 : return JS_FALSE;
2904 : nsresult rv;
2905 0 : rv = self->AddColorStop(arg0, arg1);
2906 0 : if (NS_FAILED(rv))
2907 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2908 0 : *vp = JSVAL_VOID;
2909 0 : return JS_TRUE;
2910 : }
2911 :
2912 : // === interface nsIDOMCanvasPattern
2913 :
2914 : // === interface nsIDOMCharacterData
2915 :
2916 : static JSBool
2917 2 : nsIDOMCharacterData_GetData(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2918 : {
2919 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2920 : nsIDOMCharacterData *self;
2921 4 : xpc_qsSelfRef selfref;
2922 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2923 0 : return JS_FALSE;
2924 : nsresult rv;
2925 4 : nsString result;
2926 2 : rv = self->GetData(result);
2927 2 : if (NS_FAILED(rv))
2928 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2929 2 : return xpc::StringToJsval(cx, result, vp);
2930 : }
2931 :
2932 : static JSBool
2933 0 : nsIDOMCharacterData_SetData(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2934 : {
2935 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2936 : nsIDOMCharacterData *self;
2937 0 : xpc_qsSelfRef selfref;
2938 0 : JS::AutoValueRooter tvr(cx);
2939 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2940 0 : return JS_FALSE;
2941 : xpc_qsDOMString arg0(cx, *vp, vp,
2942 : xpc_qsDOMString::eDefaultNullBehavior,
2943 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2944 0 : if (!arg0.IsValid())
2945 0 : return JS_FALSE;
2946 : nsresult rv;
2947 0 : rv = self->SetData(arg0);
2948 0 : if (NS_FAILED(rv))
2949 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2950 0 : return JS_TRUE;
2951 : }
2952 :
2953 : static JSBool
2954 0 : nsIDOMCharacterData_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2955 : {
2956 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2957 : nsIDOMCharacterData *self;
2958 0 : xpc_qsSelfRef selfref;
2959 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2960 0 : return JS_FALSE;
2961 : nsresult rv;
2962 : PRUint32 result;
2963 0 : rv = self->GetLength(&result);
2964 0 : if (NS_FAILED(rv))
2965 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2966 0 : *vp = UINT_TO_JSVAL(result);
2967 0 : return JS_TRUE;
2968 : }
2969 :
2970 : // === interface nsIDOMDocument
2971 :
2972 : static JSBool
2973 1643 : nsIDOMDocument_GetDocumentElement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2974 : {
2975 1643 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2976 1643 : JSObject *callee = nsnull;
2977 : nsDocument *self;
2978 3286 : xpc_qsSelfRef selfref;
2979 3286 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
2980 1643 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
2981 0 : return JS_FALSE;
2982 : nsresult rv;
2983 3286 : nsCOMPtr<nsIDOMElement> result;
2984 1643 : rv = self->GetDocumentElement(getter_AddRefs(result));
2985 1643 : if (NS_FAILED(rv))
2986 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2987 1643 : if (!result) {
2988 0 : *vp = JSVAL_NULL;
2989 0 : return JS_TRUE;
2990 : }
2991 1643 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
2992 1643 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
2993 0 : return JS_TRUE;
2994 : }
2995 : // After this point do not use 'result'!
2996 3286 : qsObjectHelper helper(result, cache);
2997 1643 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
2998 : }
2999 :
3000 : static JSBool
3001 2 : nsIDOMDocument_GetImplementation(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3002 : {
3003 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3004 2 : JSObject *callee = nsnull;
3005 : nsDocument *self;
3006 4 : xpc_qsSelfRef selfref;
3007 4 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3008 2 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
3009 0 : return JS_FALSE;
3010 : nsresult rv;
3011 4 : nsCOMPtr<nsIDOMDOMImplementation> result;
3012 2 : rv = self->GetImplementation(getter_AddRefs(result));
3013 2 : if (NS_FAILED(rv))
3014 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3015 2 : if (!result) {
3016 0 : *vp = JSVAL_NULL;
3017 0 : return JS_TRUE;
3018 : }
3019 2 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3020 2 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3021 0 : return JS_TRUE;
3022 : }
3023 : // After this point do not use 'result'!
3024 4 : qsObjectHelper helper(result, cache);
3025 2 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMImplementation), &interfaces[k_nsIDOMDOMImplementation], vp);
3026 : }
3027 :
3028 : static JSBool
3029 26 : nsIDOMDocument_GetElementsByTagName(JSContext *cx, unsigned argc, jsval *vp)
3030 : {
3031 26 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3032 26 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3033 26 : if (!obj)
3034 0 : return JS_FALSE;
3035 26 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3036 : nsDocument *self;
3037 52 : xpc_qsSelfRef selfref;
3038 52 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3039 26 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3040 0 : return JS_FALSE;
3041 26 : if (argc < 1)
3042 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3043 26 : jsval *argv = JS_ARGV(cx, vp);
3044 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3045 : xpc_qsDOMString::eDefaultNullBehavior,
3046 52 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3047 26 : if (!arg0.IsValid())
3048 0 : return JS_FALSE;
3049 52 : nsRefPtr<nsContentList> result =self->GetElementsByTagName(arg0);
3050 26 : if (!result) {
3051 0 : *vp = JSVAL_NULL;
3052 0 : return JS_TRUE;
3053 : }
3054 26 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3055 26 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3056 10 : return JS_TRUE;
3057 : }
3058 : // After this point do not use 'result'!
3059 32 : qsObjectHelper helper(result, cache);
3060 16 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
3061 : }
3062 :
3063 : static JSBool
3064 0 : nsIDOMDocument_GetDoctype(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3065 : {
3066 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3067 0 : JSObject *callee = nsnull;
3068 : nsDocument *self;
3069 0 : xpc_qsSelfRef selfref;
3070 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3071 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
3072 0 : return JS_FALSE;
3073 : nsresult rv;
3074 0 : nsCOMPtr<nsIDOMDocumentType> result;
3075 0 : rv = self->GetDoctype(getter_AddRefs(result));
3076 0 : if (NS_FAILED(rv))
3077 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3078 0 : if (!result) {
3079 0 : *vp = JSVAL_NULL;
3080 0 : return JS_TRUE;
3081 : }
3082 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3083 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3084 0 : return JS_TRUE;
3085 : }
3086 : // After this point do not use 'result'!
3087 0 : qsObjectHelper helper(result, cache);
3088 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentType), &interfaces[k_nsIDOMDocumentType], vp);
3089 : }
3090 :
3091 : static JSBool
3092 40 : nsIDOMDocument_GetElementsByTagNameNS(JSContext *cx, unsigned argc, jsval *vp)
3093 : {
3094 40 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3095 40 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3096 40 : if (!obj)
3097 0 : return JS_FALSE;
3098 40 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3099 : nsDocument *self;
3100 80 : xpc_qsSelfRef selfref;
3101 80 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3102 40 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3103 0 : return JS_FALSE;
3104 40 : if (argc < 2)
3105 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3106 40 : jsval *argv = JS_ARGV(cx, vp);
3107 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3108 : xpc_qsDOMString::eDefaultNullBehavior,
3109 80 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3110 40 : if (!arg0.IsValid())
3111 0 : return JS_FALSE;
3112 40 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
3113 : xpc_qsDOMString::eDefaultNullBehavior,
3114 120 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3115 40 : if (!arg1.IsValid())
3116 0 : return JS_FALSE;
3117 80 : nsRefPtr<nsContentList> result =self->GetElementsByTagNameNS(arg0, arg1);
3118 40 : if (!result) {
3119 0 : *vp = JSVAL_NULL;
3120 0 : return JS_TRUE;
3121 : }
3122 40 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3123 40 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3124 21 : return JS_TRUE;
3125 : }
3126 : // After this point do not use 'result'!
3127 38 : qsObjectHelper helper(result, cache);
3128 19 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
3129 : }
3130 :
3131 : static JSBool
3132 78 : nsIDOMDocument_GetElementById(JSContext *cx, unsigned argc, jsval *vp)
3133 : {
3134 78 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3135 78 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3136 78 : if (!obj)
3137 0 : return JS_FALSE;
3138 78 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3139 : nsDocument *self;
3140 156 : xpc_qsSelfRef selfref;
3141 156 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3142 78 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3143 0 : return JS_FALSE;
3144 78 : if (argc < 1)
3145 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3146 78 : jsval *argv = JS_ARGV(cx, vp);
3147 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3148 : xpc_qsDOMString::eDefaultNullBehavior,
3149 156 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3150 78 : if (!arg0.IsValid())
3151 0 : return JS_FALSE;
3152 78 : mozilla::dom::Element *result = self->GetElementById(arg0);
3153 78 : if (!result) {
3154 0 : *vp = JSVAL_NULL;
3155 0 : return JS_TRUE;
3156 : }
3157 78 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3158 78 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3159 53 : return JS_TRUE;
3160 : }
3161 : // After this point do not use 'result'!
3162 50 : qsObjectHelper helper(result, cache);
3163 25 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
3164 : }
3165 :
3166 : static JSBool
3167 57 : nsIDOMDocument_CreateDocumentFragment(JSContext *cx, unsigned argc, jsval *vp)
3168 : {
3169 57 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3170 57 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3171 57 : if (!obj)
3172 0 : return JS_FALSE;
3173 57 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3174 : nsDocument *self;
3175 114 : xpc_qsSelfRef selfref;
3176 114 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3177 57 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3178 0 : return JS_FALSE;
3179 : nsresult rv;
3180 114 : nsCOMPtr<nsIDOMDocumentFragment> result;
3181 57 : rv = self->CreateDocumentFragment(getter_AddRefs(result));
3182 57 : if (NS_FAILED(rv))
3183 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3184 57 : if (!result) {
3185 0 : *vp = JSVAL_NULL;
3186 0 : return JS_TRUE;
3187 : }
3188 57 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3189 57 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3190 0 : return JS_TRUE;
3191 : }
3192 : // After this point do not use 'result'!
3193 114 : qsObjectHelper helper(result, cache);
3194 57 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentFragment), &interfaces[k_nsIDOMDocumentFragment], vp);
3195 : }
3196 :
3197 : static JSBool
3198 8 : nsIDOMDocument_CreateElement(JSContext *cx, unsigned argc, jsval *vp)
3199 : {
3200 8 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3201 8 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3202 8 : if (!obj)
3203 0 : return JS_FALSE;
3204 8 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3205 : nsDocument *self;
3206 16 : xpc_qsSelfRef selfref;
3207 16 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3208 8 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3209 0 : return JS_FALSE;
3210 8 : if (argc < 1)
3211 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3212 8 : jsval *argv = JS_ARGV(cx, vp);
3213 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3214 : xpc_qsDOMString::eDefaultNullBehavior,
3215 16 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3216 8 : if (!arg0.IsValid())
3217 0 : return JS_FALSE;
3218 : nsresult rv;
3219 16 : nsCOMPtr<nsIContent> result;
3220 8 : rv = self->CreateElement(arg0, getter_AddRefs(result));
3221 8 : if (NS_FAILED(rv))
3222 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3223 8 : if (!result) {
3224 0 : *vp = JSVAL_NULL;
3225 0 : return JS_TRUE;
3226 : }
3227 8 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3228 8 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3229 0 : return JS_TRUE;
3230 : }
3231 : // After this point do not use 'result'!
3232 16 : qsObjectHelper helper(result, cache);
3233 8 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
3234 : }
3235 :
3236 : static JSBool
3237 156 : nsIDOMDocument_CreateElementNS(JSContext *cx, unsigned argc, jsval *vp)
3238 : {
3239 156 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3240 156 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3241 156 : if (!obj)
3242 0 : return JS_FALSE;
3243 156 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3244 : nsDocument *self;
3245 312 : xpc_qsSelfRef selfref;
3246 312 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3247 156 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3248 0 : return JS_FALSE;
3249 156 : if (argc < 2)
3250 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3251 156 : jsval *argv = JS_ARGV(cx, vp);
3252 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3253 : xpc_qsDOMString::eDefaultNullBehavior,
3254 312 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3255 156 : if (!arg0.IsValid())
3256 0 : return JS_FALSE;
3257 156 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
3258 : xpc_qsDOMString::eDefaultNullBehavior,
3259 468 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3260 156 : if (!arg1.IsValid())
3261 0 : return JS_FALSE;
3262 : nsresult rv;
3263 312 : nsCOMPtr<nsIContent> result;
3264 156 : rv = self->CreateElementNS(arg0, arg1, getter_AddRefs(result));
3265 156 : if (NS_FAILED(rv))
3266 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3267 156 : if (!result) {
3268 0 : *vp = JSVAL_NULL;
3269 0 : return JS_TRUE;
3270 : }
3271 156 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3272 156 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3273 0 : return JS_TRUE;
3274 : }
3275 : // After this point do not use 'result'!
3276 312 : qsObjectHelper helper(result, cache);
3277 156 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
3278 : }
3279 :
3280 : static JSBool
3281 0 : nsIDOMDocument_ImportNode(JSContext *cx, unsigned argc, jsval *vp)
3282 : {
3283 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3284 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3285 0 : if (!obj)
3286 0 : return JS_FALSE;
3287 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3288 : nsDocument *self;
3289 0 : xpc_qsSelfRef selfref;
3290 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3291 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3292 0 : return JS_FALSE;
3293 0 : if (argc < 1)
3294 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3295 0 : jsval *argv = JS_ARGV(cx, vp);
3296 : nsresult rv;
3297 : nsIDOMNode *arg0;
3298 0 : xpc_qsSelfRef arg0ref;
3299 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
3300 0 : if (NS_FAILED(rv)) {
3301 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
3302 0 : return JS_FALSE;
3303 : }
3304 : JSBool arg1;
3305 0 : JS_ValueToBoolean(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1);
3306 0 : nsCOMPtr<nsIDOMNode> result;
3307 0 : rv = self->ImportNode(arg0, arg1, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
3308 0 : if (NS_FAILED(rv))
3309 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3310 0 : if (!result) {
3311 0 : *vp = JSVAL_NULL;
3312 0 : return JS_TRUE;
3313 : }
3314 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3315 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3316 0 : return JS_TRUE;
3317 : }
3318 : // After this point do not use 'result'!
3319 0 : qsObjectHelper helper(result, cache);
3320 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
3321 : }
3322 :
3323 : static JSBool
3324 34 : nsIDOMDocument_CreateTextNode(JSContext *cx, unsigned argc, jsval *vp)
3325 : {
3326 34 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3327 34 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3328 34 : if (!obj)
3329 0 : return JS_FALSE;
3330 34 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3331 : nsDocument *self;
3332 68 : xpc_qsSelfRef selfref;
3333 68 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3334 34 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3335 0 : return JS_FALSE;
3336 34 : if (argc < 1)
3337 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3338 34 : jsval *argv = JS_ARGV(cx, vp);
3339 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3340 : xpc_qsDOMString::eDefaultNullBehavior,
3341 68 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3342 34 : if (!arg0.IsValid())
3343 0 : return JS_FALSE;
3344 : nsresult rv;
3345 68 : nsCOMPtr<nsIContent> result;
3346 34 : rv = self->CreateTextNode(arg0, getter_AddRefs(result));
3347 34 : if (NS_FAILED(rv))
3348 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3349 34 : if (!result) {
3350 0 : *vp = JSVAL_NULL;
3351 0 : return JS_TRUE;
3352 : }
3353 34 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3354 34 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3355 0 : return JS_TRUE;
3356 : }
3357 : // After this point do not use 'result'!
3358 68 : qsObjectHelper helper(result, cache);
3359 34 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMText), &interfaces[k_nsIDOMText], vp);
3360 : }
3361 :
3362 : static JSBool
3363 0 : nsIDOMDocument_GetDocumentURI(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3364 : {
3365 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3366 : nsDocument *self;
3367 0 : xpc_qsSelfRef selfref;
3368 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
3369 0 : return JS_FALSE;
3370 : nsresult rv;
3371 0 : nsString result;
3372 0 : rv = self->GetDocumentURI(result);
3373 0 : if (NS_FAILED(rv))
3374 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3375 0 : return xpc::StringToJsval(cx, result, vp);
3376 : }
3377 :
3378 : static JSBool
3379 0 : nsIDOMDocument_AdoptNode(JSContext *cx, unsigned argc, jsval *vp)
3380 : {
3381 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3382 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3383 0 : if (!obj)
3384 0 : return JS_FALSE;
3385 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3386 : nsDocument *self;
3387 0 : xpc_qsSelfRef selfref;
3388 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3389 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3390 0 : return JS_FALSE;
3391 0 : if (argc < 1)
3392 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3393 0 : jsval *argv = JS_ARGV(cx, vp);
3394 : nsresult rv;
3395 : nsIDOMNode *arg0;
3396 0 : xpc_qsSelfRef arg0ref;
3397 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
3398 0 : if (NS_FAILED(rv)) {
3399 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
3400 0 : return JS_FALSE;
3401 : }
3402 0 : nsCOMPtr<nsIDOMNode> result;
3403 0 : rv = self->AdoptNode(arg0, getter_AddRefs(result));
3404 0 : if (NS_FAILED(rv))
3405 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3406 0 : if (!result) {
3407 0 : *vp = JSVAL_NULL;
3408 0 : return JS_TRUE;
3409 : }
3410 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3411 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3412 0 : return JS_TRUE;
3413 : }
3414 : // After this point do not use 'result'!
3415 0 : qsObjectHelper helper(result, cache);
3416 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
3417 : }
3418 :
3419 : static JSBool
3420 0 : nsIDOMDocument_GetDefaultView(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3421 : {
3422 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3423 0 : JSObject *callee = nsnull;
3424 : nsDocument *self;
3425 0 : xpc_qsSelfRef selfref;
3426 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3427 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
3428 0 : return JS_FALSE;
3429 : nsresult rv;
3430 0 : nsCOMPtr<nsIDOMWindow> result;
3431 0 : rv = self->GetDefaultView(getter_AddRefs(result));
3432 0 : if (NS_FAILED(rv))
3433 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3434 0 : if (!result) {
3435 0 : *vp = JSVAL_NULL;
3436 0 : return JS_TRUE;
3437 : }
3438 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3439 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3440 0 : return JS_TRUE;
3441 : }
3442 : // After this point do not use 'result'!
3443 0 : qsObjectHelper helper(result, cache);
3444 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
3445 : }
3446 :
3447 : static JSBool
3448 0 : nsIDOMDocument_CreateNodeIterator(JSContext *cx, unsigned argc, jsval *vp)
3449 : {
3450 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3451 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3452 0 : if (!obj)
3453 0 : return JS_FALSE;
3454 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3455 : nsDocument *self;
3456 0 : xpc_qsSelfRef selfref;
3457 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3458 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3459 0 : return JS_FALSE;
3460 0 : if (argc < 1)
3461 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3462 0 : jsval *argv = JS_ARGV(cx, vp);
3463 : nsresult rv;
3464 : nsIDOMNode *arg0;
3465 0 : xpc_qsSelfRef arg0ref;
3466 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
3467 0 : if (NS_FAILED(rv)) {
3468 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
3469 0 : return JS_FALSE;
3470 : }
3471 : uint32_t arg1;
3472 0 : if (!JS_ValueToECMAUint32(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
3473 0 : return JS_FALSE;
3474 : nsIDOMNodeFilter *arg2;
3475 0 : xpc_qsSelfRef arg2ref;
3476 0 : rv = xpc_qsUnwrapArg<nsIDOMNodeFilter>(cx, (2 < argc ? argv[2] : JSVAL_NULL), &arg2, &arg2ref.ptr, (2 < argc ? &argv[2] : NULL));
3477 0 : if (NS_FAILED(rv)) {
3478 0 : xpc_qsThrowBadArg(cx, rv, vp, 2);
3479 0 : return JS_FALSE;
3480 : }
3481 0 : nsCOMPtr<nsIDOMNodeIterator> result;
3482 0 : rv = self->CreateNodeIterator(arg0, arg1, arg2, NS_MIN<PRUint32>(argc, 3) - 1, getter_AddRefs(result));
3483 0 : if (NS_FAILED(rv))
3484 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3485 0 : if (!result) {
3486 0 : *vp = JSVAL_NULL;
3487 0 : return JS_TRUE;
3488 : }
3489 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3490 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3491 0 : return JS_TRUE;
3492 : }
3493 : // After this point do not use 'result'!
3494 0 : qsObjectHelper helper(result, cache);
3495 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeIterator), &interfaces[k_nsIDOMNodeIterator], vp);
3496 : }
3497 :
3498 : static JSBool
3499 2 : nsIDOMDocument_CreateEvent(JSContext *cx, unsigned argc, jsval *vp)
3500 : {
3501 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3502 2 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3503 2 : if (!obj)
3504 0 : return JS_FALSE;
3505 2 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3506 : nsDocument *self;
3507 4 : xpc_qsSelfRef selfref;
3508 4 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3509 2 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3510 0 : return JS_FALSE;
3511 2 : if (argc < 1)
3512 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3513 2 : jsval *argv = JS_ARGV(cx, vp);
3514 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3515 : xpc_qsDOMString::eDefaultNullBehavior,
3516 4 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3517 2 : if (!arg0.IsValid())
3518 0 : return JS_FALSE;
3519 : nsresult rv;
3520 4 : nsCOMPtr<nsIDOMEvent> result;
3521 2 : rv = self->CreateEvent(arg0, getter_AddRefs(result));
3522 2 : if (NS_FAILED(rv))
3523 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3524 2 : if (!result) {
3525 0 : *vp = JSVAL_NULL;
3526 0 : return JS_TRUE;
3527 : }
3528 2 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3529 2 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3530 0 : return JS_TRUE;
3531 : }
3532 : // After this point do not use 'result'!
3533 4 : qsObjectHelper helper(result, cache);
3534 2 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEvent), &interfaces[k_nsIDOMEvent], vp);
3535 : }
3536 :
3537 : static JSBool
3538 0 : nsIDOMDocument_GetElementsByClassName(JSContext *cx, unsigned argc, jsval *vp)
3539 : {
3540 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3541 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3542 0 : if (!obj)
3543 0 : return JS_FALSE;
3544 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3545 : nsDocument *self;
3546 0 : xpc_qsSelfRef selfref;
3547 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3548 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3549 0 : return JS_FALSE;
3550 0 : if (argc < 1)
3551 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3552 0 : jsval *argv = JS_ARGV(cx, vp);
3553 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3554 : xpc_qsDOMString::eDefaultNullBehavior,
3555 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3556 0 : if (!arg0.IsValid())
3557 0 : return JS_FALSE;
3558 : nsresult rv;
3559 0 : nsCOMPtr<nsIDOMNodeList> result;
3560 0 : rv = self->GetElementsByClassName(arg0, getter_AddRefs(result));
3561 0 : if (NS_FAILED(rv))
3562 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3563 0 : if (!result) {
3564 0 : *vp = JSVAL_NULL;
3565 0 : return JS_TRUE;
3566 : }
3567 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3568 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3569 0 : return JS_TRUE;
3570 : }
3571 : // After this point do not use 'result'!
3572 0 : qsObjectHelper helper(result, cache);
3573 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
3574 : }
3575 :
3576 : static JSBool
3577 0 : nsIDOMDocument_GetTitle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3578 : {
3579 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3580 : nsDocument *self;
3581 0 : xpc_qsSelfRef selfref;
3582 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
3583 0 : return JS_FALSE;
3584 : nsresult rv;
3585 0 : nsString result;
3586 0 : rv = self->GetTitle(result);
3587 0 : if (NS_FAILED(rv))
3588 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3589 0 : return xpc::StringToJsval(cx, result, vp);
3590 : }
3591 :
3592 : static JSBool
3593 0 : nsIDOMDocument_SetTitle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
3594 : {
3595 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3596 : nsDocument *self;
3597 0 : xpc_qsSelfRef selfref;
3598 0 : JS::AutoValueRooter tvr(cx);
3599 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
3600 0 : return JS_FALSE;
3601 : xpc_qsDOMString arg0(cx, *vp, vp,
3602 : xpc_qsDOMString::eDefaultNullBehavior,
3603 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3604 0 : if (!arg0.IsValid())
3605 0 : return JS_FALSE;
3606 : nsresult rv;
3607 0 : rv = self->SetTitle(arg0);
3608 0 : if (NS_FAILED(rv))
3609 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
3610 0 : return JS_TRUE;
3611 : }
3612 :
3613 : static JSBool
3614 0 : nsIDOMDocument_GetReferrer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3615 : {
3616 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3617 : nsDocument *self;
3618 0 : xpc_qsSelfRef selfref;
3619 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
3620 0 : return JS_FALSE;
3621 : nsresult rv;
3622 0 : nsString result;
3623 0 : rv = self->GetReferrer(result);
3624 0 : if (NS_FAILED(rv))
3625 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3626 0 : return xpc::StringToJsval(cx, result, vp);
3627 : }
3628 :
3629 : static JSBool
3630 0 : nsIDOMDocument_HasFocus(JSContext *cx, unsigned argc, jsval *vp)
3631 : {
3632 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3633 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3634 0 : if (!obj)
3635 0 : return JS_FALSE;
3636 : nsDocument *self;
3637 0 : xpc_qsSelfRef selfref;
3638 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
3639 0 : return JS_FALSE;
3640 : nsresult rv;
3641 : bool result;
3642 0 : rv = self->HasFocus(&result);
3643 0 : if (NS_FAILED(rv))
3644 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3645 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
3646 0 : return JS_TRUE;
3647 : }
3648 :
3649 : static JSBool
3650 0 : nsIDOMDocument_ElementFromPoint(JSContext *cx, unsigned argc, jsval *vp)
3651 : {
3652 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3653 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3654 0 : if (!obj)
3655 0 : return JS_FALSE;
3656 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3657 : nsDocument *self;
3658 0 : xpc_qsSelfRef selfref;
3659 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3660 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3661 0 : return JS_FALSE;
3662 0 : if (argc < 2)
3663 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3664 0 : jsval *argv = JS_ARGV(cx, vp);
3665 : double arg0_dbl;
3666 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
3667 0 : return JS_FALSE;
3668 0 : float arg0 = (float) arg0_dbl;
3669 : double arg1_dbl;
3670 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
3671 0 : return JS_FALSE;
3672 0 : float arg1 = (float) arg1_dbl;
3673 : nsresult rv;
3674 0 : nsCOMPtr<nsIDOMElement> result;
3675 0 : rv = self->ElementFromPoint(arg0, arg1, getter_AddRefs(result));
3676 0 : if (NS_FAILED(rv))
3677 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3678 0 : if (!result) {
3679 0 : *vp = JSVAL_NULL;
3680 0 : return JS_TRUE;
3681 : }
3682 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3683 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3684 0 : return JS_TRUE;
3685 : }
3686 : // After this point do not use 'result'!
3687 0 : qsObjectHelper helper(result, cache);
3688 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
3689 : }
3690 :
3691 : static JSBool
3692 0 : nsIDOMDocument_GetActiveElement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3693 : {
3694 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3695 0 : JSObject *callee = nsnull;
3696 : nsDocument *self;
3697 0 : xpc_qsSelfRef selfref;
3698 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3699 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
3700 0 : return JS_FALSE;
3701 : nsresult rv;
3702 0 : nsCOMPtr<nsIDOMElement> result;
3703 0 : rv = self->GetActiveElement(getter_AddRefs(result));
3704 0 : if (NS_FAILED(rv))
3705 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3706 0 : if (!result) {
3707 0 : *vp = JSVAL_NULL;
3708 0 : return JS_TRUE;
3709 : }
3710 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3711 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3712 0 : return JS_TRUE;
3713 : }
3714 : // After this point do not use 'result'!
3715 0 : qsObjectHelper helper(result, cache);
3716 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
3717 : }
3718 :
3719 : static JSBool
3720 0 : nsIDOMDocument_GetOnreadystatechange(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3721 : {
3722 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3723 : nsDocument *self;
3724 0 : xpc_qsSelfRef selfref;
3725 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
3726 0 : return JS_FALSE;
3727 0 : if (!self) {
3728 0 : *vp = JSVAL_NULL;
3729 0 : return JS_TRUE;
3730 : }
3731 : nsresult rv;
3732 0 : rv = self->GetOnreadystatechange(cx, vp);
3733 0 : if (NS_FAILED(rv))
3734 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3735 0 : return JS_TRUE;
3736 : }
3737 :
3738 : static JSBool
3739 0 : nsIDOMDocument_SetOnreadystatechange(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
3740 : {
3741 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3742 : nsDocument *self;
3743 0 : xpc_qsSelfRef selfref;
3744 0 : JS::AutoValueRooter tvr(cx);
3745 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
3746 0 : return JS_FALSE;
3747 0 : if (!self) {
3748 0 : return JS_TRUE;
3749 : }
3750 0 : jsval arg0 = *vp;
3751 : nsresult rv;
3752 0 : rv = self->SetOnreadystatechange(cx, arg0);
3753 0 : if (NS_FAILED(rv))
3754 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
3755 0 : return JS_TRUE;
3756 : }
3757 :
3758 : static JSBool
3759 0 : nsIDOMDocument_GetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3760 : {
3761 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3762 : nsDocument *self;
3763 0 : xpc_qsSelfRef selfref;
3764 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
3765 0 : return JS_FALSE;
3766 0 : if (!self) {
3767 0 : *vp = JSVAL_NULL;
3768 0 : return JS_TRUE;
3769 : }
3770 : nsresult rv;
3771 0 : rv = self->GetOnmouseenter(cx, vp);
3772 0 : if (NS_FAILED(rv))
3773 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3774 0 : return JS_TRUE;
3775 : }
3776 :
3777 : static JSBool
3778 0 : nsIDOMDocument_SetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
3779 : {
3780 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3781 : nsDocument *self;
3782 0 : xpc_qsSelfRef selfref;
3783 0 : JS::AutoValueRooter tvr(cx);
3784 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
3785 0 : return JS_FALSE;
3786 0 : if (!self) {
3787 0 : return JS_TRUE;
3788 : }
3789 0 : jsval arg0 = *vp;
3790 : nsresult rv;
3791 0 : rv = self->SetOnmouseenter(cx, arg0);
3792 0 : if (NS_FAILED(rv))
3793 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
3794 0 : return JS_TRUE;
3795 : }
3796 :
3797 : static JSBool
3798 0 : nsIDOMDocument_GetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3799 : {
3800 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3801 : nsDocument *self;
3802 0 : xpc_qsSelfRef selfref;
3803 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
3804 0 : return JS_FALSE;
3805 0 : if (!self) {
3806 0 : *vp = JSVAL_NULL;
3807 0 : return JS_TRUE;
3808 : }
3809 : nsresult rv;
3810 0 : rv = self->GetOnmouseleave(cx, vp);
3811 0 : if (NS_FAILED(rv))
3812 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3813 0 : return JS_TRUE;
3814 : }
3815 :
3816 : static JSBool
3817 0 : nsIDOMDocument_SetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
3818 : {
3819 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3820 : nsDocument *self;
3821 0 : xpc_qsSelfRef selfref;
3822 0 : JS::AutoValueRooter tvr(cx);
3823 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
3824 0 : return JS_FALSE;
3825 0 : if (!self) {
3826 0 : return JS_TRUE;
3827 : }
3828 0 : jsval arg0 = *vp;
3829 : nsresult rv;
3830 0 : rv = self->SetOnmouseleave(cx, arg0);
3831 0 : if (NS_FAILED(rv))
3832 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
3833 0 : return JS_TRUE;
3834 : }
3835 :
3836 : // === interface nsIDOMElement
3837 :
3838 : static JSBool
3839 0 : nsIDOMElement_RemoveAttributeNS(JSContext *cx, unsigned argc, jsval *vp)
3840 : {
3841 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3842 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3843 0 : if (!obj)
3844 0 : return JS_FALSE;
3845 : nsGenericElement *self;
3846 0 : xpc_qsSelfRef selfref;
3847 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
3848 0 : return JS_FALSE;
3849 0 : if (argc < 2)
3850 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3851 0 : jsval *argv = JS_ARGV(cx, vp);
3852 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3853 : xpc_qsDOMString::eDefaultNullBehavior,
3854 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3855 0 : if (!arg0.IsValid())
3856 0 : return JS_FALSE;
3857 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
3858 : xpc_qsDOMString::eDefaultNullBehavior,
3859 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3860 0 : if (!arg1.IsValid())
3861 0 : return JS_FALSE;
3862 : nsresult rv;
3863 0 : rv = self->RemoveAttributeNS(arg0, arg1);
3864 0 : if (NS_FAILED(rv))
3865 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3866 0 : *vp = JSVAL_VOID;
3867 0 : return JS_TRUE;
3868 : }
3869 :
3870 : static JSBool
3871 0 : nsIDOMElement_RemoveAttribute(JSContext *cx, unsigned argc, jsval *vp)
3872 : {
3873 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3874 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3875 0 : if (!obj)
3876 0 : return JS_FALSE;
3877 : nsGenericElement *self;
3878 0 : xpc_qsSelfRef selfref;
3879 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
3880 0 : return JS_FALSE;
3881 0 : if (argc < 1)
3882 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3883 0 : jsval *argv = JS_ARGV(cx, vp);
3884 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3885 : xpc_qsDOMString::eDefaultNullBehavior,
3886 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3887 0 : if (!arg0.IsValid())
3888 0 : return JS_FALSE;
3889 : nsresult rv;
3890 0 : rv = self->RemoveAttribute(arg0);
3891 0 : if (NS_FAILED(rv))
3892 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3893 0 : *vp = JSVAL_VOID;
3894 0 : return JS_TRUE;
3895 : }
3896 :
3897 : static JSBool
3898 3386 : nsIDOMElement_GetAttribute(JSContext *cx, unsigned argc, jsval *vp)
3899 : {
3900 3386 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3901 3386 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3902 3386 : if (!obj)
3903 0 : return JS_FALSE;
3904 : nsGenericElement *self;
3905 6772 : xpc_qsSelfRef selfref;
3906 3386 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
3907 0 : return JS_FALSE;
3908 3386 : if (argc < 1)
3909 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3910 3386 : jsval *argv = JS_ARGV(cx, vp);
3911 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3912 : xpc_qsDOMString::eDefaultNullBehavior,
3913 6772 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3914 3386 : if (!arg0.IsValid())
3915 0 : return JS_FALSE;
3916 : nsresult rv;
3917 6772 : nsString result;
3918 3386 : rv = self->GetAttribute(arg0, result);
3919 3386 : if (NS_FAILED(rv))
3920 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3921 3386 : return xpc::StringToJsval(cx, result, vp);
3922 : }
3923 :
3924 : static JSBool
3925 2485 : nsIDOMElement_GetElementsByTagName(JSContext *cx, unsigned argc, jsval *vp)
3926 : {
3927 2485 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3928 2485 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3929 2485 : if (!obj)
3930 0 : return JS_FALSE;
3931 2485 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3932 : nsGenericElement *self;
3933 4970 : xpc_qsSelfRef selfref;
3934 4970 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3935 2485 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3936 0 : return JS_FALSE;
3937 2485 : if (argc < 1)
3938 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3939 2485 : jsval *argv = JS_ARGV(cx, vp);
3940 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3941 : xpc_qsDOMString::eDefaultNullBehavior,
3942 4970 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3943 2485 : if (!arg0.IsValid())
3944 0 : return JS_FALSE;
3945 : nsresult rv;
3946 4970 : nsCOMPtr<nsIDOMNodeList> result;
3947 2485 : rv = self->GetElementsByTagName(arg0, getter_AddRefs(result));
3948 2485 : if (NS_FAILED(rv))
3949 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3950 2485 : if (!result) {
3951 0 : *vp = JSVAL_NULL;
3952 0 : return JS_TRUE;
3953 : }
3954 2485 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3955 2485 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3956 0 : return JS_TRUE;
3957 : }
3958 : // After this point do not use 'result'!
3959 4970 : qsObjectHelper helper(result, cache);
3960 2485 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
3961 : }
3962 :
3963 : static JSBool
3964 1742 : nsIDOMElement_SetAttribute(JSContext *cx, unsigned argc, jsval *vp)
3965 : {
3966 1742 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3967 1742 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3968 1742 : if (!obj)
3969 0 : return JS_FALSE;
3970 : nsGenericElement *self;
3971 3484 : xpc_qsSelfRef selfref;
3972 1742 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
3973 0 : return JS_FALSE;
3974 1742 : if (argc < 2)
3975 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3976 1742 : jsval *argv = JS_ARGV(cx, vp);
3977 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3978 : xpc_qsDOMString::eDefaultNullBehavior,
3979 3484 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3980 1742 : if (!arg0.IsValid())
3981 0 : return JS_FALSE;
3982 1742 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
3983 : xpc_qsDOMString::eDefaultNullBehavior,
3984 5226 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3985 1742 : if (!arg1.IsValid())
3986 0 : return JS_FALSE;
3987 : nsresult rv;
3988 1742 : rv = self->SetAttribute(arg0, arg1);
3989 1742 : if (NS_FAILED(rv))
3990 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3991 1742 : *vp = JSVAL_VOID;
3992 1742 : return JS_TRUE;
3993 : }
3994 :
3995 : static JSBool
3996 10 : nsIDOMElement_GetElementsByTagNameNS(JSContext *cx, unsigned argc, jsval *vp)
3997 : {
3998 10 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3999 10 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4000 10 : if (!obj)
4001 0 : return JS_FALSE;
4002 10 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4003 : nsGenericElement *self;
4004 20 : xpc_qsSelfRef selfref;
4005 20 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4006 10 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4007 0 : return JS_FALSE;
4008 10 : if (argc < 2)
4009 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4010 10 : jsval *argv = JS_ARGV(cx, vp);
4011 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4012 : xpc_qsDOMString::eDefaultNullBehavior,
4013 20 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4014 10 : if (!arg0.IsValid())
4015 0 : return JS_FALSE;
4016 10 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
4017 : xpc_qsDOMString::eDefaultNullBehavior,
4018 30 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4019 10 : if (!arg1.IsValid())
4020 0 : return JS_FALSE;
4021 : nsresult rv;
4022 20 : nsCOMPtr<nsIDOMNodeList> result;
4023 10 : rv = self->GetElementsByTagNameNS(arg0, arg1, getter_AddRefs(result));
4024 10 : if (NS_FAILED(rv))
4025 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4026 10 : if (!result) {
4027 0 : *vp = JSVAL_NULL;
4028 0 : return JS_TRUE;
4029 : }
4030 10 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4031 10 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4032 0 : return JS_TRUE;
4033 : }
4034 : // After this point do not use 'result'!
4035 20 : qsObjectHelper helper(result, cache);
4036 10 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
4037 : }
4038 :
4039 : static JSBool
4040 0 : nsIDOMElement_HasAttributeNS(JSContext *cx, unsigned argc, jsval *vp)
4041 : {
4042 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4043 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4044 0 : if (!obj)
4045 0 : return JS_FALSE;
4046 : nsGenericElement *self;
4047 0 : xpc_qsSelfRef selfref;
4048 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4049 0 : return JS_FALSE;
4050 0 : if (argc < 2)
4051 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4052 0 : jsval *argv = JS_ARGV(cx, vp);
4053 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4054 : xpc_qsDOMString::eDefaultNullBehavior,
4055 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4056 0 : if (!arg0.IsValid())
4057 0 : return JS_FALSE;
4058 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
4059 : xpc_qsDOMString::eDefaultNullBehavior,
4060 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4061 0 : if (!arg1.IsValid())
4062 0 : return JS_FALSE;
4063 : nsresult rv;
4064 : bool result;
4065 0 : rv = self->HasAttributeNS(arg0, arg1, &result);
4066 0 : if (NS_FAILED(rv))
4067 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4068 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
4069 0 : return JS_TRUE;
4070 : }
4071 :
4072 : static JSBool
4073 433 : nsIDOMElement_GetTagName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4074 : {
4075 433 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4076 : nsGenericElement *self;
4077 866 : xpc_qsSelfRef selfref;
4078 433 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
4079 0 : return JS_FALSE;
4080 866 : nsString result = self->NodeName();
4081 : #ifdef DEBUG
4082 : nsresult debug_rv;
4083 866 : nsCOMPtr<nsIDOMElement> debug_self;
4084 433 : CallQueryInterface(self, getter_AddRefs(debug_self));
4085 866 : nsString debug_result;
4086 433 : debug_rv = debug_self->GetTagName(debug_result);
4087 433 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4088 : "Got the wrong answer from the custom method call!");
4089 : #endif
4090 433 : return xpc::StringToJsval(cx, result, vp);
4091 : }
4092 :
4093 : static JSBool
4094 26 : nsIDOMElement_SetAttributeNS(JSContext *cx, unsigned argc, jsval *vp)
4095 : {
4096 26 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4097 26 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4098 26 : if (!obj)
4099 0 : return JS_FALSE;
4100 : nsGenericElement *self;
4101 52 : xpc_qsSelfRef selfref;
4102 26 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4103 0 : return JS_FALSE;
4104 26 : if (argc < 3)
4105 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4106 26 : jsval *argv = JS_ARGV(cx, vp);
4107 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4108 : xpc_qsDOMString::eDefaultNullBehavior,
4109 52 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4110 26 : if (!arg0.IsValid())
4111 0 : return JS_FALSE;
4112 26 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
4113 : xpc_qsDOMString::eDefaultNullBehavior,
4114 78 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4115 26 : if (!arg1.IsValid())
4116 0 : return JS_FALSE;
4117 26 : xpc_qsDOMString arg2(cx, argv[2], &argv[2],
4118 : xpc_qsDOMString::eDefaultNullBehavior,
4119 78 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4120 26 : if (!arg2.IsValid())
4121 0 : return JS_FALSE;
4122 : nsresult rv;
4123 26 : rv = self->SetAttributeNS(arg0, arg1, arg2);
4124 26 : if (NS_FAILED(rv))
4125 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4126 26 : *vp = JSVAL_VOID;
4127 26 : return JS_TRUE;
4128 : }
4129 :
4130 : static JSBool
4131 2560 : nsIDOMElement_HasAttribute(JSContext *cx, unsigned argc, jsval *vp)
4132 : {
4133 2560 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4134 2560 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4135 2560 : if (!obj)
4136 0 : return JS_FALSE;
4137 : nsGenericElement *self;
4138 5120 : xpc_qsSelfRef selfref;
4139 2560 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4140 0 : return JS_FALSE;
4141 2560 : if (argc < 1)
4142 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4143 2560 : jsval *argv = JS_ARGV(cx, vp);
4144 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4145 : xpc_qsDOMString::eDefaultNullBehavior,
4146 5120 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4147 2560 : if (!arg0.IsValid())
4148 0 : return JS_FALSE;
4149 : nsresult rv;
4150 : bool result;
4151 2560 : rv = self->HasAttribute(arg0, &result);
4152 2560 : if (NS_FAILED(rv))
4153 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4154 2560 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
4155 2560 : return JS_TRUE;
4156 : }
4157 :
4158 : static JSBool
4159 0 : nsIDOMElement_GetAttributeNS(JSContext *cx, unsigned argc, jsval *vp)
4160 : {
4161 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4162 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4163 0 : if (!obj)
4164 0 : return JS_FALSE;
4165 : nsGenericElement *self;
4166 0 : xpc_qsSelfRef selfref;
4167 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4168 0 : return JS_FALSE;
4169 0 : if (argc < 2)
4170 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4171 0 : jsval *argv = JS_ARGV(cx, vp);
4172 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4173 : xpc_qsDOMString::eDefaultNullBehavior,
4174 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4175 0 : if (!arg0.IsValid())
4176 0 : return JS_FALSE;
4177 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
4178 : xpc_qsDOMString::eDefaultNullBehavior,
4179 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4180 0 : if (!arg1.IsValid())
4181 0 : return JS_FALSE;
4182 : nsresult rv;
4183 0 : nsString result;
4184 0 : rv = self->GetAttributeNS(arg0, arg1, result);
4185 0 : if (NS_FAILED(rv))
4186 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4187 0 : return xpc::StringToJsval(cx, result, vp);
4188 : }
4189 :
4190 : static JSBool
4191 0 : nsIDOMElement_GetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4192 : {
4193 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4194 : nsGenericElement *self;
4195 0 : xpc_qsSelfRef selfref;
4196 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
4197 0 : return JS_FALSE;
4198 0 : if (!self) {
4199 0 : *vp = JSVAL_NULL;
4200 0 : return JS_TRUE;
4201 : }
4202 : nsresult rv;
4203 0 : rv = self->GetOnmouseenter(cx, vp);
4204 0 : if (NS_FAILED(rv))
4205 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4206 0 : return JS_TRUE;
4207 : }
4208 :
4209 : static JSBool
4210 0 : nsIDOMElement_SetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
4211 : {
4212 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4213 : nsGenericElement *self;
4214 0 : xpc_qsSelfRef selfref;
4215 0 : JS::AutoValueRooter tvr(cx);
4216 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
4217 0 : return JS_FALSE;
4218 0 : if (!self) {
4219 0 : return JS_TRUE;
4220 : }
4221 0 : jsval arg0 = *vp;
4222 : nsresult rv;
4223 0 : rv = self->SetOnmouseenter(cx, arg0);
4224 0 : if (NS_FAILED(rv))
4225 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
4226 0 : return JS_TRUE;
4227 : }
4228 :
4229 : static JSBool
4230 0 : nsIDOMElement_GetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4231 : {
4232 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4233 : nsGenericElement *self;
4234 0 : xpc_qsSelfRef selfref;
4235 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
4236 0 : return JS_FALSE;
4237 0 : if (!self) {
4238 0 : *vp = JSVAL_NULL;
4239 0 : return JS_TRUE;
4240 : }
4241 : nsresult rv;
4242 0 : rv = self->GetOnmouseleave(cx, vp);
4243 0 : if (NS_FAILED(rv))
4244 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4245 0 : return JS_TRUE;
4246 : }
4247 :
4248 : static JSBool
4249 0 : nsIDOMElement_SetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
4250 : {
4251 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4252 : nsGenericElement *self;
4253 0 : xpc_qsSelfRef selfref;
4254 0 : JS::AutoValueRooter tvr(cx);
4255 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
4256 0 : return JS_FALSE;
4257 0 : if (!self) {
4258 0 : return JS_TRUE;
4259 : }
4260 0 : jsval arg0 = *vp;
4261 : nsresult rv;
4262 0 : rv = self->SetOnmouseleave(cx, arg0);
4263 0 : if (NS_FAILED(rv))
4264 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
4265 0 : return JS_TRUE;
4266 : }
4267 :
4268 : // === interface nsIDOMNamedNodeMap
4269 :
4270 : static JSBool
4271 943 : nsIDOMNamedNodeMap_Item(JSContext *cx, unsigned argc, jsval *vp)
4272 : {
4273 943 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4274 943 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4275 943 : if (!obj)
4276 0 : return JS_FALSE;
4277 943 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4278 : nsIDOMNamedNodeMap *self;
4279 1886 : xpc_qsSelfRef selfref;
4280 1886 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4281 943 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4282 0 : return JS_FALSE;
4283 943 : if (argc < 1)
4284 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4285 943 : jsval *argv = JS_ARGV(cx, vp);
4286 : uint32_t arg0;
4287 943 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
4288 0 : return JS_FALSE;
4289 : nsresult rv;
4290 1886 : nsCOMPtr<nsIDOMNode> result;
4291 943 : rv = self->Item(arg0, getter_AddRefs(result));
4292 943 : if (NS_FAILED(rv))
4293 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4294 943 : if (!result) {
4295 0 : *vp = JSVAL_NULL;
4296 0 : return JS_TRUE;
4297 : }
4298 943 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4299 943 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4300 0 : return JS_TRUE;
4301 : }
4302 : // After this point do not use 'result'!
4303 1886 : qsObjectHelper helper(result, cache);
4304 943 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4305 : }
4306 :
4307 : static JSBool
4308 1171 : nsIDOMNamedNodeMap_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4309 : {
4310 1171 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4311 : nsIDOMNamedNodeMap *self;
4312 2342 : xpc_qsSelfRef selfref;
4313 1171 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
4314 0 : return JS_FALSE;
4315 : nsresult rv;
4316 : PRUint32 result;
4317 1171 : rv = self->GetLength(&result);
4318 1171 : if (NS_FAILED(rv))
4319 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4320 1171 : *vp = UINT_TO_JSVAL(result);
4321 1171 : return JS_TRUE;
4322 : }
4323 :
4324 : // === interface nsIDOMNode
4325 :
4326 : static JSBool
4327 51 : nsIDOMNode_GetNodeName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4328 : {
4329 51 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4330 : nsINode *self;
4331 102 : xpc_qsSelfRef selfref;
4332 51 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
4333 0 : return JS_FALSE;
4334 102 : nsString result = self->NodeName();
4335 : #ifdef DEBUG
4336 : nsresult debug_rv;
4337 102 : nsCOMPtr<nsIDOMNode> debug_self;
4338 51 : CallQueryInterface(self, getter_AddRefs(debug_self));
4339 102 : nsString debug_result;
4340 51 : debug_rv = debug_self->GetNodeName(debug_result);
4341 51 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4342 : "Got the wrong answer from the custom method call!");
4343 : #endif
4344 51 : return xpc::StringToJsval(cx, result, vp);
4345 : }
4346 :
4347 : static JSBool
4348 764 : nsIDOMNode_GetNodeValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4349 : {
4350 764 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4351 : nsIDOMNode *self;
4352 1528 : xpc_qsSelfRef selfref;
4353 764 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
4354 0 : return JS_FALSE;
4355 : nsresult rv;
4356 1528 : nsString result;
4357 764 : rv = self->GetNodeValue(result);
4358 764 : if (NS_FAILED(rv))
4359 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4360 764 : return xpc::StringToJsval(cx, result, vp);
4361 : }
4362 :
4363 : static JSBool
4364 0 : nsIDOMNode_SetNodeValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
4365 : {
4366 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4367 : nsIDOMNode *self;
4368 0 : xpc_qsSelfRef selfref;
4369 0 : JS::AutoValueRooter tvr(cx);
4370 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
4371 0 : return JS_FALSE;
4372 : xpc_qsDOMString arg0(cx, *vp, vp,
4373 : xpc_qsDOMString::eDefaultNullBehavior,
4374 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4375 0 : if (!arg0.IsValid())
4376 0 : return JS_FALSE;
4377 : nsresult rv;
4378 0 : rv = self->SetNodeValue(arg0);
4379 0 : if (NS_FAILED(rv))
4380 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
4381 0 : return JS_TRUE;
4382 : }
4383 :
4384 : static JSBool
4385 368 : nsIDOMNode_GetNodeType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4386 : {
4387 368 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4388 : nsINode *self;
4389 736 : xpc_qsSelfRef selfref;
4390 368 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
4391 0 : return JS_FALSE;
4392 368 : PRUint16 result = self->NodeType();
4393 : #ifdef DEBUG
4394 : nsresult debug_rv;
4395 736 : nsCOMPtr<nsIDOMNode> debug_self;
4396 368 : CallQueryInterface(self, getter_AddRefs(debug_self));
4397 : PRUint16 debug_result;
4398 368 : debug_rv = debug_self->GetNodeType(&debug_result);
4399 368 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4400 : "Got the wrong answer from the custom method call!");
4401 : #endif
4402 368 : *vp = INT_TO_JSVAL((int32_t) result);
4403 368 : return JS_TRUE;
4404 : }
4405 :
4406 : static JSBool
4407 359 : nsIDOMNode_GetParentNode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4408 : {
4409 359 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4410 359 : JSObject *callee = nsnull;
4411 : nsINode *self;
4412 718 : xpc_qsSelfRef selfref;
4413 718 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4414 359 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4415 0 : return JS_FALSE;
4416 359 : nsINode *result = self->GetNodeParent();
4417 : #ifdef DEBUG
4418 : nsresult debug_rv;
4419 718 : nsCOMPtr<nsIDOMNode> debug_self;
4420 359 : CallQueryInterface(self, getter_AddRefs(debug_self));
4421 718 : nsCOMPtr<nsIDOMNode> debug_result;
4422 359 : debug_rv = debug_self->GetParentNode(getter_AddRefs(debug_result));
4423 359 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4424 : "Got the wrong answer from the custom method call!");
4425 : #endif
4426 359 : if (!result) {
4427 0 : *vp = JSVAL_NULL;
4428 0 : return JS_TRUE;
4429 : }
4430 359 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4431 359 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4432 137 : return JS_TRUE;
4433 : }
4434 : // After this point do not use 'result'!
4435 444 : qsObjectHelper helper(result, cache);
4436 222 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4437 : }
4438 :
4439 : static JSBool
4440 0 : nsIDOMNode_GetParentElement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4441 : {
4442 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4443 0 : JSObject *callee = nsnull;
4444 : nsINode *self;
4445 0 : xpc_qsSelfRef selfref;
4446 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4447 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4448 0 : return JS_FALSE;
4449 0 : nsINode *result = self->GetElementParent();
4450 : #ifdef DEBUG
4451 : nsresult debug_rv;
4452 0 : nsCOMPtr<nsIDOMNode> debug_self;
4453 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
4454 0 : nsCOMPtr<nsIDOMElement> debug_result;
4455 0 : debug_rv = debug_self->GetParentElement(getter_AddRefs(debug_result));
4456 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4457 : "Got the wrong answer from the custom method call!");
4458 : #endif
4459 0 : if (!result) {
4460 0 : *vp = JSVAL_NULL;
4461 0 : return JS_TRUE;
4462 : }
4463 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4464 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4465 0 : return JS_TRUE;
4466 : }
4467 : // After this point do not use 'result'!
4468 0 : qsObjectHelper helper(result, cache);
4469 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
4470 : }
4471 :
4472 : static JSBool
4473 4589 : nsIDOMNode_GetChildNodes(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4474 : {
4475 4589 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4476 4589 : JSObject *callee = nsnull;
4477 : nsINode *self;
4478 9178 : xpc_qsSelfRef selfref;
4479 9178 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4480 4589 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4481 0 : return JS_FALSE;
4482 : nsresult rv;
4483 :
4484 4589 : nsChildContentList* result = static_cast<nsChildContentList*>(self->GetChildNodesList());
4485 4589 : rv = result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
4486 :
4487 : #ifdef DEBUG
4488 : nsresult debug_rv;
4489 9178 : nsCOMPtr<nsIDOMNode> debug_self;
4490 4589 : CallQueryInterface(self, getter_AddRefs(debug_self));
4491 9178 : nsCOMPtr<nsIDOMNodeList> debug_result;
4492 4589 : debug_rv = debug_self->GetChildNodes(getter_AddRefs(debug_result));
4493 4589 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) == NS_SUCCEEDED(rv) && xpc_qsSameResult(debug_result, result),
4494 : "Got the wrong answer from the custom method call!");
4495 : #endif
4496 4589 : if (NS_FAILED(rv))
4497 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4498 4589 : if (!result) {
4499 0 : *vp = JSVAL_NULL;
4500 0 : return JS_TRUE;
4501 : }
4502 4589 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4503 4589 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4504 3062 : return JS_TRUE;
4505 : }
4506 : // After this point do not use 'result'!
4507 3054 : qsObjectHelper helper(result, cache);
4508 1527 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
4509 : }
4510 :
4511 : static JSBool
4512 254 : nsIDOMNode_GetFirstChild(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4513 : {
4514 254 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4515 254 : JSObject *callee = nsnull;
4516 : nsINode *self;
4517 508 : xpc_qsSelfRef selfref;
4518 508 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4519 254 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4520 0 : return JS_FALSE;
4521 254 : nsINode *result = self->GetFirstChild();
4522 : #ifdef DEBUG
4523 : nsresult debug_rv;
4524 508 : nsCOMPtr<nsIDOMNode> debug_self;
4525 254 : CallQueryInterface(self, getter_AddRefs(debug_self));
4526 508 : nsCOMPtr<nsIDOMNode> debug_result;
4527 254 : debug_rv = debug_self->GetFirstChild(getter_AddRefs(debug_result));
4528 254 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4529 : "Got the wrong answer from the custom method call!");
4530 : #endif
4531 254 : if (!result) {
4532 0 : *vp = JSVAL_NULL;
4533 0 : return JS_TRUE;
4534 : }
4535 254 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4536 254 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4537 2 : return JS_TRUE;
4538 : }
4539 : // After this point do not use 'result'!
4540 504 : qsObjectHelper helper(result, cache);
4541 252 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4542 : }
4543 :
4544 : static JSBool
4545 0 : nsIDOMNode_GetLastChild(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4546 : {
4547 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4548 0 : JSObject *callee = nsnull;
4549 : nsINode *self;
4550 0 : xpc_qsSelfRef selfref;
4551 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4552 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4553 0 : return JS_FALSE;
4554 0 : nsINode *result = self->GetLastChild();
4555 : #ifdef DEBUG
4556 : nsresult debug_rv;
4557 0 : nsCOMPtr<nsIDOMNode> debug_self;
4558 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
4559 0 : nsCOMPtr<nsIDOMNode> debug_result;
4560 0 : debug_rv = debug_self->GetLastChild(getter_AddRefs(debug_result));
4561 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4562 : "Got the wrong answer from the custom method call!");
4563 : #endif
4564 0 : if (!result) {
4565 0 : *vp = JSVAL_NULL;
4566 0 : return JS_TRUE;
4567 : }
4568 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4569 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4570 0 : return JS_TRUE;
4571 : }
4572 : // After this point do not use 'result'!
4573 0 : qsObjectHelper helper(result, cache);
4574 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4575 : }
4576 :
4577 : static JSBool
4578 0 : nsIDOMNode_GetPreviousSibling(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4579 : {
4580 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4581 0 : JSObject *callee = nsnull;
4582 : nsINode *self;
4583 0 : xpc_qsSelfRef selfref;
4584 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4585 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4586 0 : return JS_FALSE;
4587 0 : nsINode *result = self->GetPreviousSibling();
4588 : #ifdef DEBUG
4589 : nsresult debug_rv;
4590 0 : nsCOMPtr<nsIDOMNode> debug_self;
4591 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
4592 0 : nsCOMPtr<nsIDOMNode> debug_result;
4593 0 : debug_rv = debug_self->GetPreviousSibling(getter_AddRefs(debug_result));
4594 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4595 : "Got the wrong answer from the custom method call!");
4596 : #endif
4597 0 : if (!result) {
4598 0 : *vp = JSVAL_NULL;
4599 0 : return JS_TRUE;
4600 : }
4601 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4602 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4603 0 : return JS_TRUE;
4604 : }
4605 : // After this point do not use 'result'!
4606 0 : qsObjectHelper helper(result, cache);
4607 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4608 : }
4609 :
4610 : static JSBool
4611 5122 : nsIDOMNode_GetNextSibling(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4612 : {
4613 5122 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4614 5122 : JSObject *callee = nsnull;
4615 : nsINode *self;
4616 10244 : xpc_qsSelfRef selfref;
4617 10244 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4618 5122 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4619 0 : return JS_FALSE;
4620 5122 : nsINode *result = self->GetNextSibling();
4621 : #ifdef DEBUG
4622 : nsresult debug_rv;
4623 10244 : nsCOMPtr<nsIDOMNode> debug_self;
4624 5122 : CallQueryInterface(self, getter_AddRefs(debug_self));
4625 10244 : nsCOMPtr<nsIDOMNode> debug_result;
4626 5122 : debug_rv = debug_self->GetNextSibling(getter_AddRefs(debug_result));
4627 5122 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4628 : "Got the wrong answer from the custom method call!");
4629 : #endif
4630 5122 : if (!result) {
4631 238 : *vp = JSVAL_NULL;
4632 238 : return JS_TRUE;
4633 : }
4634 4884 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4635 4884 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4636 391 : return JS_TRUE;
4637 : }
4638 : // After this point do not use 'result'!
4639 8986 : qsObjectHelper helper(result, cache);
4640 4493 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4641 : }
4642 :
4643 : static JSBool
4644 1898 : nsIDOMNode_GetAttributes(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4645 : {
4646 1898 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4647 1898 : JSObject *callee = nsnull;
4648 : nsIDOMNode *self;
4649 3796 : xpc_qsSelfRef selfref;
4650 3796 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4651 1898 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4652 0 : return JS_FALSE;
4653 : nsresult rv;
4654 3796 : nsCOMPtr<nsIDOMNamedNodeMap> result;
4655 1898 : rv = self->GetAttributes(getter_AddRefs(result));
4656 1898 : if (NS_FAILED(rv))
4657 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4658 1898 : if (!result) {
4659 0 : *vp = JSVAL_NULL;
4660 0 : return JS_TRUE;
4661 : }
4662 1898 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4663 1898 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4664 0 : return JS_TRUE;
4665 : }
4666 : // After this point do not use 'result'!
4667 3796 : qsObjectHelper helper(result, cache);
4668 1898 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNamedNodeMap), &interfaces[k_nsIDOMNamedNodeMap], vp);
4669 : }
4670 :
4671 : static JSBool
4672 170 : nsIDOMNode_GetOwnerDocument(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4673 : {
4674 170 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4675 170 : JSObject *callee = nsnull;
4676 : nsINode *self;
4677 340 : xpc_qsSelfRef selfref;
4678 340 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4679 170 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4680 0 : return JS_FALSE;
4681 170 : nsIDocument *result = self->GetOwnerDocument();
4682 : #ifdef DEBUG
4683 : nsresult debug_rv;
4684 340 : nsCOMPtr<nsIDOMNode> debug_self;
4685 170 : CallQueryInterface(self, getter_AddRefs(debug_self));
4686 340 : nsCOMPtr<nsIDOMDocument> debug_result;
4687 170 : debug_rv = debug_self->GetOwnerDocument(getter_AddRefs(debug_result));
4688 170 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4689 : "Got the wrong answer from the custom method call!");
4690 : #endif
4691 170 : if (!result) {
4692 0 : *vp = JSVAL_NULL;
4693 0 : return JS_TRUE;
4694 : }
4695 170 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4696 170 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4697 170 : return JS_TRUE;
4698 : }
4699 : // After this point do not use 'result'!
4700 0 : qsObjectHelper helper(result, cache);
4701 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
4702 : }
4703 :
4704 : static JSBool
4705 4 : nsIDOMNode_InsertBefore(JSContext *cx, unsigned argc, jsval *vp)
4706 : {
4707 4 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4708 4 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4709 4 : if (!obj)
4710 0 : return JS_FALSE;
4711 4 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4712 : nsINode *self;
4713 8 : xpc_qsSelfRef selfref;
4714 8 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4715 4 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4716 0 : return JS_FALSE;
4717 4 : if (argc < 2)
4718 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4719 4 : jsval *argv = JS_ARGV(cx, vp);
4720 : nsresult rv;
4721 : nsINode *arg0;
4722 8 : xpc_qsSelfRef arg0ref;
4723 4 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
4724 4 : if (NS_FAILED(rv)) {
4725 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
4726 0 : return JS_FALSE;
4727 : }
4728 : nsINode *arg1;
4729 8 : xpc_qsSelfRef arg1ref;
4730 4 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
4731 4 : if (NS_FAILED(rv)) {
4732 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
4733 0 : return JS_FALSE;
4734 : }
4735 4 : nsINode *result = self->InsertBefore(arg0, arg1, &rv);
4736 4 : if(NS_FAILED(rv))
4737 0 : result = nsnull;
4738 4 : if (NS_FAILED(rv))
4739 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4740 4 : if (!result) {
4741 0 : *vp = JSVAL_NULL;
4742 0 : return JS_TRUE;
4743 : }
4744 4 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4745 4 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4746 4 : return JS_TRUE;
4747 : }
4748 : // After this point do not use 'result'!
4749 0 : qsObjectHelper helper(result, cache);
4750 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4751 : }
4752 :
4753 : static JSBool
4754 0 : nsIDOMNode_ReplaceChild(JSContext *cx, unsigned argc, jsval *vp)
4755 : {
4756 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4757 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4758 0 : if (!obj)
4759 0 : return JS_FALSE;
4760 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4761 : nsINode *self;
4762 0 : xpc_qsSelfRef selfref;
4763 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4764 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4765 0 : return JS_FALSE;
4766 0 : if (argc < 2)
4767 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4768 0 : jsval *argv = JS_ARGV(cx, vp);
4769 : nsresult rv;
4770 : nsINode *arg0;
4771 0 : xpc_qsSelfRef arg0ref;
4772 0 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
4773 0 : if (NS_FAILED(rv)) {
4774 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
4775 0 : return JS_FALSE;
4776 : }
4777 : nsINode *arg1;
4778 0 : xpc_qsSelfRef arg1ref;
4779 0 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
4780 0 : if (NS_FAILED(rv)) {
4781 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
4782 0 : return JS_FALSE;
4783 : }
4784 0 : nsINode *result = self->ReplaceChild(arg0, arg1, &rv);
4785 0 : if(NS_FAILED(rv))
4786 0 : result = nsnull;
4787 0 : if (NS_FAILED(rv))
4788 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4789 0 : if (!result) {
4790 0 : *vp = JSVAL_NULL;
4791 0 : return JS_TRUE;
4792 : }
4793 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4794 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4795 0 : return JS_TRUE;
4796 : }
4797 : // After this point do not use 'result'!
4798 0 : qsObjectHelper helper(result, cache);
4799 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4800 : }
4801 :
4802 : static JSBool
4803 116 : nsIDOMNode_RemoveChild(JSContext *cx, unsigned argc, jsval *vp)
4804 : {
4805 116 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4806 116 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4807 116 : if (!obj)
4808 0 : return JS_FALSE;
4809 116 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4810 : nsINode *self;
4811 232 : xpc_qsSelfRef selfref;
4812 232 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4813 116 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4814 0 : return JS_FALSE;
4815 116 : if (argc < 1)
4816 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4817 116 : jsval *argv = JS_ARGV(cx, vp);
4818 : nsresult rv;
4819 : nsINode *arg0;
4820 232 : xpc_qsSelfRef arg0ref;
4821 116 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
4822 116 : if (NS_FAILED(rv)) {
4823 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
4824 0 : return JS_FALSE;
4825 : }
4826 116 : rv = self->RemoveChild(arg0);
4827 116 : nsINode *result = NS_SUCCEEDED(rv) ? arg0 : nsnull;
4828 116 : if (NS_FAILED(rv))
4829 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4830 116 : if (!result) {
4831 0 : *vp = JSVAL_NULL;
4832 0 : return JS_TRUE;
4833 : }
4834 116 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4835 116 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4836 116 : return JS_TRUE;
4837 : }
4838 : // After this point do not use 'result'!
4839 0 : qsObjectHelper helper(result, cache);
4840 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4841 : }
4842 :
4843 : static JSBool
4844 388 : nsIDOMNode_AppendChild(JSContext *cx, unsigned argc, jsval *vp)
4845 : {
4846 388 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4847 388 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4848 388 : if (!obj)
4849 0 : return JS_FALSE;
4850 388 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4851 : nsINode *self;
4852 776 : xpc_qsSelfRef selfref;
4853 776 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4854 388 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4855 0 : return JS_FALSE;
4856 388 : if (argc < 1)
4857 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4858 388 : jsval *argv = JS_ARGV(cx, vp);
4859 : nsresult rv;
4860 : nsINode *arg0;
4861 776 : xpc_qsSelfRef arg0ref;
4862 388 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
4863 388 : if (NS_FAILED(rv)) {
4864 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
4865 0 : return JS_FALSE;
4866 : }
4867 388 : nsINode *result = self->AppendChild(arg0, &rv);
4868 388 : if(NS_FAILED(rv))
4869 0 : result = nsnull;
4870 388 : if (NS_FAILED(rv))
4871 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4872 388 : if (!result) {
4873 0 : *vp = JSVAL_NULL;
4874 0 : return JS_TRUE;
4875 : }
4876 388 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4877 388 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4878 388 : return JS_TRUE;
4879 : }
4880 : // After this point do not use 'result'!
4881 0 : qsObjectHelper helper(result, cache);
4882 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4883 : }
4884 :
4885 : static JSBool
4886 11 : nsIDOMNode_HasChildNodes(JSContext *cx, unsigned argc, jsval *vp)
4887 : {
4888 11 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4889 11 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4890 11 : if (!obj)
4891 0 : return JS_FALSE;
4892 : nsIDOMNode *self;
4893 22 : xpc_qsSelfRef selfref;
4894 11 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4895 0 : return JS_FALSE;
4896 : nsresult rv;
4897 : bool result;
4898 11 : rv = self->HasChildNodes(&result);
4899 11 : if (NS_FAILED(rv))
4900 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4901 11 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
4902 11 : return JS_TRUE;
4903 : }
4904 :
4905 : static JSBool
4906 257 : nsIDOMNode_CloneNode(JSContext *cx, unsigned argc, jsval *vp)
4907 : {
4908 257 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4909 257 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4910 257 : if (!obj)
4911 0 : return JS_FALSE;
4912 257 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4913 : nsIDOMNode *self;
4914 514 : xpc_qsSelfRef selfref;
4915 514 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4916 257 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4917 0 : return JS_FALSE;
4918 257 : jsval *argv = JS_ARGV(cx, vp);
4919 : JSBool arg0;
4920 257 : JS_ValueToBoolean(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0);
4921 : nsresult rv;
4922 514 : nsCOMPtr<nsIDOMNode> result;
4923 257 : rv = self->CloneNode(arg0, NS_MIN<PRUint32>(argc, 1) - 0, getter_AddRefs(result));
4924 257 : if (NS_FAILED(rv))
4925 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4926 257 : if (!result) {
4927 0 : *vp = JSVAL_NULL;
4928 0 : return JS_TRUE;
4929 : }
4930 257 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4931 257 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4932 0 : return JS_TRUE;
4933 : }
4934 : // After this point do not use 'result'!
4935 514 : qsObjectHelper helper(result, cache);
4936 257 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4937 : }
4938 :
4939 : static JSBool
4940 21 : nsIDOMNode_Normalize(JSContext *cx, unsigned argc, jsval *vp)
4941 : {
4942 21 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4943 21 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4944 21 : if (!obj)
4945 0 : return JS_FALSE;
4946 : nsINode *self;
4947 42 : xpc_qsSelfRef selfref;
4948 21 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4949 0 : return JS_FALSE;
4950 21 : self->Normalize();
4951 21 : *vp = JSVAL_VOID;
4952 21 : return JS_TRUE;
4953 : }
4954 :
4955 : static JSBool
4956 0 : nsIDOMNode_IsSupported(JSContext *cx, unsigned argc, jsval *vp)
4957 : {
4958 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4959 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4960 0 : if (!obj)
4961 0 : return JS_FALSE;
4962 : nsIDOMNode *self;
4963 0 : xpc_qsSelfRef selfref;
4964 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4965 0 : return JS_FALSE;
4966 0 : if (argc < 2)
4967 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4968 0 : jsval *argv = JS_ARGV(cx, vp);
4969 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4970 : xpc_qsDOMString::eDefaultNullBehavior,
4971 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4972 0 : if (!arg0.IsValid())
4973 0 : return JS_FALSE;
4974 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
4975 : xpc_qsDOMString::eDefaultNullBehavior,
4976 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4977 0 : if (!arg1.IsValid())
4978 0 : return JS_FALSE;
4979 : nsresult rv;
4980 : bool result;
4981 0 : rv = self->IsSupported(arg0, arg1, &result);
4982 0 : if (NS_FAILED(rv))
4983 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4984 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
4985 0 : return JS_TRUE;
4986 : }
4987 :
4988 : static JSBool
4989 1117 : nsIDOMNode_GetNamespaceURI(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4990 : {
4991 1117 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4992 : nsIDOMNode *self;
4993 2234 : xpc_qsSelfRef selfref;
4994 1117 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
4995 0 : return JS_FALSE;
4996 : nsresult rv;
4997 2234 : nsString result;
4998 1117 : rv = self->GetNamespaceURI(result);
4999 1117 : if (NS_FAILED(rv))
5000 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5001 1117 : return xpc::StringToJsval(cx, result, vp);
5002 : }
5003 :
5004 : static JSBool
5005 0 : nsIDOMNode_GetPrefix(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5006 : {
5007 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5008 : nsIDOMNode *self;
5009 0 : xpc_qsSelfRef selfref;
5010 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5011 0 : return JS_FALSE;
5012 : nsresult rv;
5013 0 : nsString result;
5014 0 : rv = self->GetPrefix(result);
5015 0 : if (NS_FAILED(rv))
5016 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5017 0 : return xpc::StringToJsval(cx, result, vp);
5018 : }
5019 :
5020 : static JSBool
5021 4391 : nsIDOMNode_GetLocalName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5022 : {
5023 4391 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5024 : nsINode *self;
5025 8782 : xpc_qsSelfRef selfref;
5026 4391 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5027 0 : return JS_FALSE;
5028 8782 : nsString result = self->LocalName();
5029 : #ifdef DEBUG
5030 : nsresult debug_rv;
5031 8782 : nsCOMPtr<nsIDOMNode> debug_self;
5032 4391 : CallQueryInterface(self, getter_AddRefs(debug_self));
5033 8782 : nsString debug_result;
5034 4391 : debug_rv = debug_self->GetLocalName(debug_result);
5035 4391 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
5036 : "Got the wrong answer from the custom method call!");
5037 : #endif
5038 4391 : return xpc::StringToJsval(cx, result, vp);
5039 : }
5040 :
5041 : static JSBool
5042 0 : nsIDOMNode_HasAttributes(JSContext *cx, unsigned argc, jsval *vp)
5043 : {
5044 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5045 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5046 0 : if (!obj)
5047 0 : return JS_FALSE;
5048 : nsIDOMNode *self;
5049 0 : xpc_qsSelfRef selfref;
5050 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5051 0 : return JS_FALSE;
5052 : nsresult rv;
5053 : bool result;
5054 0 : rv = self->HasAttributes(&result);
5055 0 : if (NS_FAILED(rv))
5056 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5057 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5058 0 : return JS_TRUE;
5059 : }
5060 :
5061 : static JSBool
5062 0 : nsIDOMNode_GetDOMBaseURI(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5063 : {
5064 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5065 : nsIDOMNode *self;
5066 0 : xpc_qsSelfRef selfref;
5067 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5068 0 : return JS_FALSE;
5069 : nsresult rv;
5070 0 : nsString result;
5071 0 : rv = self->GetDOMBaseURI(result);
5072 0 : if (NS_FAILED(rv))
5073 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5074 0 : return xpc::StringToJsval(cx, result, vp);
5075 : }
5076 :
5077 : static JSBool
5078 0 : nsIDOMNode_CompareDocumentPosition(JSContext *cx, unsigned argc, jsval *vp)
5079 : {
5080 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5081 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5082 0 : if (!obj)
5083 0 : return JS_FALSE;
5084 : nsINode *self;
5085 0 : xpc_qsSelfRef selfref;
5086 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5087 0 : return JS_FALSE;
5088 0 : if (argc < 1)
5089 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5090 0 : jsval *argv = JS_ARGV(cx, vp);
5091 : nsresult rv;
5092 : nsINode *arg0;
5093 0 : xpc_qsSelfRef arg0ref;
5094 0 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
5095 0 : if (NS_FAILED(rv)) {
5096 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
5097 0 : return JS_FALSE;
5098 : }
5099 : PRUint16 result;
5100 0 : rv = self->CompareDocPosition(arg0, &result);
5101 0 : if (NS_FAILED(rv))
5102 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5103 0 : *vp = INT_TO_JSVAL((int32_t) result);
5104 0 : return JS_TRUE;
5105 : }
5106 :
5107 : static JSBool
5108 3233 : nsIDOMNode_GetTextContent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5109 : {
5110 3233 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5111 : nsINode *self;
5112 6466 : xpc_qsSelfRef selfref;
5113 3233 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5114 0 : return JS_FALSE;
5115 6466 : nsString result;
5116 3233 : self->GetTextContent(result);
5117 3233 : return xpc::StringToJsval(cx, result, vp);
5118 : }
5119 :
5120 : static JSBool
5121 1 : nsIDOMNode_SetTextContent(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
5122 : {
5123 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5124 : nsIDOMNode *self;
5125 2 : xpc_qsSelfRef selfref;
5126 2 : JS::AutoValueRooter tvr(cx);
5127 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
5128 0 : return JS_FALSE;
5129 : xpc_qsDOMString arg0(cx, *vp, vp,
5130 : xpc_qsDOMString::eDefaultNullBehavior,
5131 2 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5132 1 : if (!arg0.IsValid())
5133 0 : return JS_FALSE;
5134 : nsresult rv;
5135 1 : rv = self->SetTextContent(arg0);
5136 1 : if (NS_FAILED(rv))
5137 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
5138 1 : return JS_TRUE;
5139 : }
5140 :
5141 : static JSBool
5142 0 : nsIDOMNode_LookupPrefix(JSContext *cx, unsigned argc, jsval *vp)
5143 : {
5144 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5145 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5146 0 : if (!obj)
5147 0 : return JS_FALSE;
5148 : nsINode *self;
5149 0 : xpc_qsSelfRef selfref;
5150 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5151 0 : return JS_FALSE;
5152 0 : if (argc < 1)
5153 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5154 0 : jsval *argv = JS_ARGV(cx, vp);
5155 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5156 : xpc_qsDOMString::eDefaultNullBehavior,
5157 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5158 0 : if (!arg0.IsValid())
5159 0 : return JS_FALSE;
5160 0 : nsString result;
5161 0 : self->LookupPrefix(arg0, result);
5162 0 : return xpc::StringToJsval(cx, result, vp);
5163 : }
5164 :
5165 : static JSBool
5166 0 : nsIDOMNode_IsDefaultNamespace(JSContext *cx, unsigned argc, jsval *vp)
5167 : {
5168 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5169 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5170 0 : if (!obj)
5171 0 : return JS_FALSE;
5172 : nsINode *self;
5173 0 : xpc_qsSelfRef selfref;
5174 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5175 0 : return JS_FALSE;
5176 0 : if (argc < 1)
5177 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5178 0 : jsval *argv = JS_ARGV(cx, vp);
5179 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5180 : xpc_qsDOMString::eDefaultNullBehavior,
5181 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5182 0 : if (!arg0.IsValid())
5183 0 : return JS_FALSE;
5184 : bool result;
5185 0 : self->IsDefaultNamespace(arg0, &result);
5186 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5187 0 : return JS_TRUE;
5188 : }
5189 :
5190 : static JSBool
5191 0 : nsIDOMNode_LookupNamespaceURI(JSContext *cx, unsigned argc, jsval *vp)
5192 : {
5193 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5194 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5195 0 : if (!obj)
5196 0 : return JS_FALSE;
5197 : nsINode *self;
5198 0 : xpc_qsSelfRef selfref;
5199 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5200 0 : return JS_FALSE;
5201 0 : if (argc < 1)
5202 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5203 0 : jsval *argv = JS_ARGV(cx, vp);
5204 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5205 : xpc_qsDOMString::eDefaultNullBehavior,
5206 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5207 0 : if (!arg0.IsValid())
5208 0 : return JS_FALSE;
5209 0 : nsString result;
5210 0 : self->LookupNamespaceURI(arg0, result);
5211 0 : return xpc::StringToJsval(cx, result, vp);
5212 : }
5213 :
5214 : static JSBool
5215 999 : nsIDOMNode_IsEqualNode(JSContext *cx, unsigned argc, jsval *vp)
5216 : {
5217 999 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5218 999 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5219 999 : if (!obj)
5220 0 : return JS_FALSE;
5221 : nsINode *self;
5222 1998 : xpc_qsSelfRef selfref;
5223 999 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5224 0 : return JS_FALSE;
5225 999 : if (argc < 1)
5226 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5227 999 : jsval *argv = JS_ARGV(cx, vp);
5228 : nsresult rv;
5229 : nsINode *arg0;
5230 1998 : xpc_qsSelfRef arg0ref;
5231 999 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
5232 999 : if (NS_FAILED(rv)) {
5233 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
5234 0 : return JS_FALSE;
5235 : }
5236 999 : bool result = self->IsEqualTo(arg0);
5237 999 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5238 999 : return JS_TRUE;
5239 : }
5240 :
5241 : static JSBool
5242 0 : nsIDOMNode_SetUserData(JSContext *cx, unsigned argc, jsval *vp)
5243 : {
5244 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5245 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5246 0 : if (!obj)
5247 0 : return JS_FALSE;
5248 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
5249 0 : XPCLazyCallContext lccx(ccx);
5250 : nsIDOMNode *self;
5251 0 : xpc_qsSelfRef selfref;
5252 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
5253 0 : return JS_FALSE;
5254 0 : if (argc < 3)
5255 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5256 0 : jsval *argv = JS_ARGV(cx, vp);
5257 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5258 : xpc_qsDOMString::eDefaultNullBehavior,
5259 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5260 0 : if (!arg0.IsValid())
5261 0 : return JS_FALSE;
5262 0 : nsCOMPtr<nsIVariant> arg1(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, argv[1])));
5263 0 : if (!arg1) {
5264 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 1);
5265 0 : return JS_FALSE;
5266 : } nsresult rv;
5267 : nsIDOMUserDataHandler *arg2;
5268 0 : xpc_qsSelfRef arg2ref;
5269 0 : rv = xpc_qsUnwrapArg<nsIDOMUserDataHandler>(cx, argv[2], &arg2, &arg2ref.ptr, &argv[2]);
5270 0 : if (NS_FAILED(rv)) {
5271 0 : xpc_qsThrowBadArgWithCcx(ccx, rv, 2);
5272 0 : return JS_FALSE;
5273 : }
5274 0 : nsCOMPtr<nsIVariant> result;
5275 0 : rv = self->SetUserData(arg0, arg1, arg2, getter_AddRefs(result));
5276 0 : if (NS_FAILED(rv))
5277 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
5278 0 : return xpc_qsVariantToJsval(lccx, result, vp);
5279 : }
5280 :
5281 : static JSBool
5282 0 : nsIDOMNode_GetUserData(JSContext *cx, unsigned argc, jsval *vp)
5283 : {
5284 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5285 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5286 0 : if (!obj)
5287 0 : return JS_FALSE;
5288 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5289 : nsINode *self;
5290 0 : xpc_qsSelfRef selfref;
5291 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5292 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5293 0 : return JS_FALSE;
5294 0 : if (argc < 1)
5295 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5296 0 : jsval *argv = JS_ARGV(cx, vp);
5297 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5298 : xpc_qsDOMString::eDefaultNullBehavior,
5299 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5300 0 : if (!arg0.IsValid())
5301 0 : return JS_FALSE;
5302 0 : nsCOMPtr<nsIVariant> result;
5303 0 : self->GetUserData(arg0, getter_AddRefs(result));
5304 0 : return xpc_qsVariantToJsval(lccx, result, vp);
5305 : }
5306 :
5307 : static JSBool
5308 0 : nsIDOMNode_Contains(JSContext *cx, unsigned argc, jsval *vp)
5309 : {
5310 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5311 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5312 0 : if (!obj)
5313 0 : return JS_FALSE;
5314 : nsINode *self;
5315 0 : xpc_qsSelfRef selfref;
5316 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5317 0 : return JS_FALSE;
5318 0 : if (argc < 1)
5319 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5320 0 : jsval *argv = JS_ARGV(cx, vp);
5321 : nsresult rv;
5322 : nsINode *arg0;
5323 0 : xpc_qsSelfRef arg0ref;
5324 0 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
5325 0 : if (NS_FAILED(rv)) {
5326 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
5327 0 : return JS_FALSE;
5328 : }
5329 0 : bool result = self->Contains(arg0);
5330 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5331 0 : return JS_TRUE;
5332 : }
5333 :
5334 : // === interface nsIDOMNodeList
5335 :
5336 : static JSBool
5337 0 : nsIDOMNodeList_Item(JSContext *cx, unsigned argc, jsval *vp)
5338 : {
5339 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5340 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5341 0 : if (!obj)
5342 0 : return JS_FALSE;
5343 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5344 : nsINodeList *self;
5345 0 : xpc_qsSelfRef selfref;
5346 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5347 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5348 0 : return JS_FALSE;
5349 0 : if (argc < 1)
5350 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5351 0 : jsval *argv = JS_ARGV(cx, vp);
5352 : uint32_t arg0;
5353 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
5354 0 : return JS_FALSE;
5355 0 : nsINode *result = self->GetNodeAt(arg0);
5356 0 : if (!result) {
5357 0 : *vp = JSVAL_NULL;
5358 0 : return JS_TRUE;
5359 : }
5360 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5361 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5362 0 : return JS_TRUE;
5363 : }
5364 : // After this point do not use 'result'!
5365 0 : qsObjectHelper helper(result, cache);
5366 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
5367 : }
5368 :
5369 : static JSBool
5370 0 : nsIDOMNodeList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5371 : {
5372 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5373 : nsINodeList *self;
5374 0 : xpc_qsSelfRef selfref;
5375 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5376 0 : return JS_FALSE;
5377 : nsresult rv;
5378 : PRUint32 result;
5379 0 : rv = self->GetLength(&result);
5380 0 : if (NS_FAILED(rv))
5381 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5382 0 : *vp = UINT_TO_JSVAL(result);
5383 0 : return JS_TRUE;
5384 : }
5385 :
5386 : // === interface nsIDOMNodeSelector
5387 :
5388 : static JSBool
5389 0 : nsIDOMNodeSelector_QuerySelector(JSContext *cx, unsigned argc, jsval *vp)
5390 : {
5391 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5392 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5393 0 : if (!obj)
5394 0 : return JS_FALSE;
5395 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5396 : nsINode *self;
5397 0 : xpc_qsSelfRef selfref;
5398 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5399 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5400 0 : return JS_FALSE;
5401 0 : if (argc < 1)
5402 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5403 0 : jsval *argv = JS_ARGV(cx, vp);
5404 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5405 : xpc_qsDOMString::eStringify,
5406 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5407 0 : if (!arg0.IsValid())
5408 0 : return JS_FALSE;
5409 : nsresult rv;
5410 0 : nsIContent* result = nsGenericElement::doQuerySelector(self, arg0, &rv);
5411 0 : if (NS_FAILED(rv))
5412 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5413 0 : if (!result) {
5414 0 : *vp = JSVAL_NULL;
5415 0 : return JS_TRUE;
5416 : }
5417 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5418 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5419 0 : return JS_TRUE;
5420 : }
5421 : // After this point do not use 'result'!
5422 0 : qsObjectHelper helper(result, cache);
5423 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
5424 : }
5425 :
5426 : static JSBool
5427 110 : nsIDOMNodeSelector_QuerySelectorAll(JSContext *cx, unsigned argc, jsval *vp)
5428 : {
5429 110 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5430 110 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5431 110 : if (!obj)
5432 0 : return JS_FALSE;
5433 110 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5434 : nsINode *self;
5435 220 : xpc_qsSelfRef selfref;
5436 220 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5437 110 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5438 0 : return JS_FALSE;
5439 110 : if (argc < 1)
5440 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5441 110 : jsval *argv = JS_ARGV(cx, vp);
5442 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5443 : xpc_qsDOMString::eStringify,
5444 220 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5445 110 : if (!arg0.IsValid())
5446 0 : return JS_FALSE;
5447 : nsresult rv;
5448 220 : nsCOMPtr<nsIDOMNodeList> result;
5449 110 : rv = nsGenericElement::doQuerySelectorAll(self, arg0, getter_AddRefs(result));
5450 110 : if (NS_FAILED(rv))
5451 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5452 110 : if (!result) {
5453 0 : *vp = JSVAL_NULL;
5454 0 : return JS_TRUE;
5455 : }
5456 110 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5457 110 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5458 0 : return JS_TRUE;
5459 : }
5460 : // After this point do not use 'result'!
5461 220 : qsObjectHelper helper(result, cache);
5462 110 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
5463 : }
5464 :
5465 : // === interface nsIDOMText
5466 :
5467 : static JSBool
5468 0 : nsIDOMText_SplitText(JSContext *cx, unsigned argc, jsval *vp)
5469 : {
5470 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5471 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5472 0 : if (!obj)
5473 0 : return JS_FALSE;
5474 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5475 : nsIDOMText *self;
5476 0 : xpc_qsSelfRef selfref;
5477 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5478 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5479 0 : return JS_FALSE;
5480 0 : if (argc < 1)
5481 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5482 0 : jsval *argv = JS_ARGV(cx, vp);
5483 : uint32_t arg0;
5484 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
5485 0 : return JS_FALSE;
5486 : nsresult rv;
5487 0 : nsCOMPtr<nsIDOMText> result;
5488 0 : rv = self->SplitText(arg0, getter_AddRefs(result));
5489 0 : if (NS_FAILED(rv))
5490 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5491 0 : if (!result) {
5492 0 : *vp = JSVAL_NULL;
5493 0 : return JS_TRUE;
5494 : }
5495 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5496 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5497 0 : return JS_TRUE;
5498 : }
5499 : // After this point do not use 'result'!
5500 0 : qsObjectHelper helper(result, cache);
5501 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMText), &interfaces[k_nsIDOMText], vp);
5502 : }
5503 :
5504 : // === interface nsIDOMDOMImplementation
5505 :
5506 : static JSBool
5507 0 : nsIDOMDOMImplementation_HasFeature(JSContext *cx, unsigned argc, jsval *vp)
5508 : {
5509 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5510 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5511 0 : if (!obj)
5512 0 : return JS_FALSE;
5513 : nsIDOMDOMImplementation *self;
5514 0 : xpc_qsSelfRef selfref;
5515 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5516 0 : return JS_FALSE;
5517 0 : if (argc < 2)
5518 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5519 0 : jsval *argv = JS_ARGV(cx, vp);
5520 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5521 : xpc_qsDOMString::eDefaultNullBehavior,
5522 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5523 0 : if (!arg0.IsValid())
5524 0 : return JS_FALSE;
5525 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
5526 : xpc_qsDOMString::eDefaultNullBehavior,
5527 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5528 0 : if (!arg1.IsValid())
5529 0 : return JS_FALSE;
5530 : nsresult rv;
5531 : bool result;
5532 0 : rv = self->HasFeature(arg0, arg1, &result);
5533 0 : if (NS_FAILED(rv))
5534 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5535 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5536 0 : return JS_TRUE;
5537 : }
5538 :
5539 : static JSBool
5540 1 : nsIDOMDOMImplementation_CreateDocumentType(JSContext *cx, unsigned argc, jsval *vp)
5541 : {
5542 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5543 1 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5544 1 : if (!obj)
5545 0 : return JS_FALSE;
5546 1 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5547 : nsIDOMDOMImplementation *self;
5548 2 : xpc_qsSelfRef selfref;
5549 2 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5550 1 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5551 0 : return JS_FALSE;
5552 1 : if (argc < 3)
5553 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5554 1 : jsval *argv = JS_ARGV(cx, vp);
5555 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5556 : xpc_qsDOMString::eDefaultNullBehavior,
5557 2 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5558 1 : if (!arg0.IsValid())
5559 0 : return JS_FALSE;
5560 1 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
5561 : xpc_qsDOMString::eDefaultNullBehavior,
5562 3 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5563 1 : if (!arg1.IsValid())
5564 0 : return JS_FALSE;
5565 1 : xpc_qsDOMString arg2(cx, argv[2], &argv[2],
5566 : xpc_qsDOMString::eDefaultNullBehavior,
5567 3 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5568 1 : if (!arg2.IsValid())
5569 0 : return JS_FALSE;
5570 : nsresult rv;
5571 2 : nsCOMPtr<nsIDOMDocumentType> result;
5572 1 : rv = self->CreateDocumentType(arg0, arg1, arg2, getter_AddRefs(result));
5573 1 : if (NS_FAILED(rv))
5574 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5575 1 : if (!result) {
5576 0 : *vp = JSVAL_NULL;
5577 0 : return JS_TRUE;
5578 : }
5579 1 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5580 1 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5581 0 : return JS_TRUE;
5582 : }
5583 : // After this point do not use 'result'!
5584 2 : qsObjectHelper helper(result, cache);
5585 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentType), &interfaces[k_nsIDOMDocumentType], vp);
5586 : }
5587 :
5588 : static JSBool
5589 1 : nsIDOMDOMImplementation_CreateDocument(JSContext *cx, unsigned argc, jsval *vp)
5590 : {
5591 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5592 1 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5593 1 : if (!obj)
5594 0 : return JS_FALSE;
5595 1 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5596 : nsIDOMDOMImplementation *self;
5597 2 : xpc_qsSelfRef selfref;
5598 2 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5599 1 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5600 0 : return JS_FALSE;
5601 1 : if (argc < 3)
5602 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5603 1 : jsval *argv = JS_ARGV(cx, vp);
5604 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5605 : xpc_qsDOMString::eDefaultNullBehavior,
5606 2 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5607 1 : if (!arg0.IsValid())
5608 0 : return JS_FALSE;
5609 1 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
5610 : xpc_qsDOMString::eDefaultNullBehavior,
5611 3 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5612 1 : if (!arg1.IsValid())
5613 0 : return JS_FALSE;
5614 : nsresult rv;
5615 : nsIDOMDocumentType *arg2;
5616 2 : xpc_qsSelfRef arg2ref;
5617 1 : rv = xpc_qsUnwrapArg<nsIDOMDocumentType>(cx, argv[2], &arg2, &arg2ref.ptr, &argv[2]);
5618 1 : if (NS_FAILED(rv)) {
5619 0 : xpc_qsThrowBadArg(cx, rv, vp, 2);
5620 0 : return JS_FALSE;
5621 : }
5622 2 : nsCOMPtr<nsIDOMDocument> result;
5623 1 : rv = self->CreateDocument(arg0, arg1, arg2, getter_AddRefs(result));
5624 1 : if (NS_FAILED(rv))
5625 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5626 1 : if (!result) {
5627 0 : *vp = JSVAL_NULL;
5628 0 : return JS_TRUE;
5629 : }
5630 1 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5631 1 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5632 0 : return JS_TRUE;
5633 : }
5634 : // After this point do not use 'result'!
5635 2 : qsObjectHelper helper(result, cache);
5636 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
5637 : }
5638 :
5639 : static JSBool
5640 0 : nsIDOMDOMImplementation_CreateHTMLDocument(JSContext *cx, unsigned argc, jsval *vp)
5641 : {
5642 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5643 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5644 0 : if (!obj)
5645 0 : return JS_FALSE;
5646 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5647 : nsIDOMDOMImplementation *self;
5648 0 : xpc_qsSelfRef selfref;
5649 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5650 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5651 0 : return JS_FALSE;
5652 0 : if (argc < 1)
5653 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5654 0 : jsval *argv = JS_ARGV(cx, vp);
5655 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5656 : xpc_qsDOMString::eStringify,
5657 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5658 0 : if (!arg0.IsValid())
5659 0 : return JS_FALSE;
5660 : nsresult rv;
5661 0 : nsCOMPtr<nsIDOMDocument> result;
5662 0 : rv = self->CreateHTMLDocument(arg0, getter_AddRefs(result));
5663 0 : if (NS_FAILED(rv))
5664 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5665 0 : if (!result) {
5666 0 : *vp = JSVAL_NULL;
5667 0 : return JS_TRUE;
5668 : }
5669 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5670 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5671 0 : return JS_TRUE;
5672 : }
5673 : // After this point do not use 'result'!
5674 0 : qsObjectHelper helper(result, cache);
5675 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
5676 : }
5677 :
5678 : // === interface nsIDOMDOMStringList
5679 :
5680 : static JSBool
5681 170 : nsIDOMDOMStringList_Item(JSContext *cx, unsigned argc, jsval *vp)
5682 : {
5683 170 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5684 170 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5685 170 : if (!obj)
5686 0 : return JS_FALSE;
5687 : nsIDOMDOMStringList *self;
5688 340 : xpc_qsSelfRef selfref;
5689 170 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5690 0 : return JS_FALSE;
5691 170 : if (argc < 1)
5692 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5693 170 : jsval *argv = JS_ARGV(cx, vp);
5694 : uint32_t arg0;
5695 170 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
5696 0 : return JS_FALSE;
5697 : nsresult rv;
5698 340 : nsString result;
5699 170 : rv = self->Item(arg0, result);
5700 170 : if (NS_FAILED(rv))
5701 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5702 170 : return xpc::StringToJsval(cx, result, vp);
5703 : }
5704 :
5705 : static JSBool
5706 219 : nsIDOMDOMStringList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5707 : {
5708 219 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5709 : nsIDOMDOMStringList *self;
5710 438 : xpc_qsSelfRef selfref;
5711 219 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5712 0 : return JS_FALSE;
5713 : nsresult rv;
5714 : PRUint32 result;
5715 219 : rv = self->GetLength(&result);
5716 219 : if (NS_FAILED(rv))
5717 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5718 219 : *vp = UINT_TO_JSVAL(result);
5719 219 : return JS_TRUE;
5720 : }
5721 :
5722 : static JSBool
5723 120 : nsIDOMDOMStringList_Contains(JSContext *cx, unsigned argc, jsval *vp)
5724 : {
5725 120 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5726 120 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5727 120 : if (!obj)
5728 0 : return JS_FALSE;
5729 : nsIDOMDOMStringList *self;
5730 240 : xpc_qsSelfRef selfref;
5731 120 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5732 0 : return JS_FALSE;
5733 120 : if (argc < 1)
5734 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5735 120 : jsval *argv = JS_ARGV(cx, vp);
5736 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5737 : xpc_qsDOMString::eDefaultNullBehavior,
5738 240 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5739 120 : if (!arg0.IsValid())
5740 0 : return JS_FALSE;
5741 : nsresult rv;
5742 : bool result;
5743 120 : rv = self->Contains(arg0, &result);
5744 120 : if (NS_FAILED(rv))
5745 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5746 120 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5747 120 : return JS_TRUE;
5748 : }
5749 :
5750 : // === interface nsIDOMDOMTokenList
5751 :
5752 : static JSBool
5753 0 : nsIDOMDOMTokenList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5754 : {
5755 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5756 : nsIDOMDOMTokenList *self;
5757 0 : xpc_qsSelfRef selfref;
5758 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5759 0 : return JS_FALSE;
5760 : nsresult rv;
5761 : PRUint32 result;
5762 0 : rv = self->GetLength(&result);
5763 0 : if (NS_FAILED(rv))
5764 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5765 0 : *vp = UINT_TO_JSVAL(result);
5766 0 : return JS_TRUE;
5767 : }
5768 :
5769 : static JSBool
5770 0 : nsIDOMDOMTokenList_Item(JSContext *cx, unsigned argc, jsval *vp)
5771 : {
5772 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5773 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5774 0 : if (!obj)
5775 0 : return JS_FALSE;
5776 : nsIDOMDOMTokenList *self;
5777 0 : xpc_qsSelfRef selfref;
5778 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5779 0 : return JS_FALSE;
5780 0 : if (argc < 1)
5781 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5782 0 : jsval *argv = JS_ARGV(cx, vp);
5783 : uint32_t arg0;
5784 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
5785 0 : return JS_FALSE;
5786 : nsresult rv;
5787 0 : nsString result;
5788 0 : rv = self->Item(arg0, result);
5789 0 : if (NS_FAILED(rv))
5790 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5791 0 : return xpc::StringToJsval(cx, result, vp);
5792 : }
5793 :
5794 : static JSBool
5795 0 : nsIDOMDOMTokenList_Contains(JSContext *cx, unsigned argc, jsval *vp)
5796 : {
5797 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5798 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5799 0 : if (!obj)
5800 0 : return JS_FALSE;
5801 : nsIDOMDOMTokenList *self;
5802 0 : xpc_qsSelfRef selfref;
5803 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5804 0 : return JS_FALSE;
5805 0 : if (argc < 1)
5806 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5807 0 : jsval *argv = JS_ARGV(cx, vp);
5808 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5809 : xpc_qsDOMString::eStringify,
5810 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5811 0 : if (!arg0.IsValid())
5812 0 : return JS_FALSE;
5813 : nsresult rv;
5814 : bool result;
5815 0 : rv = self->Contains(arg0, &result);
5816 0 : if (NS_FAILED(rv))
5817 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5818 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5819 0 : return JS_TRUE;
5820 : }
5821 :
5822 : static JSBool
5823 0 : nsIDOMDOMTokenList_Add(JSContext *cx, unsigned argc, jsval *vp)
5824 : {
5825 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5826 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5827 0 : if (!obj)
5828 0 : return JS_FALSE;
5829 : nsIDOMDOMTokenList *self;
5830 0 : xpc_qsSelfRef selfref;
5831 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5832 0 : return JS_FALSE;
5833 0 : if (argc < 1)
5834 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5835 0 : jsval *argv = JS_ARGV(cx, vp);
5836 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5837 : xpc_qsDOMString::eStringify,
5838 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5839 0 : if (!arg0.IsValid())
5840 0 : return JS_FALSE;
5841 : nsresult rv;
5842 0 : rv = self->Add(arg0);
5843 0 : if (NS_FAILED(rv))
5844 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5845 0 : *vp = JSVAL_VOID;
5846 0 : return JS_TRUE;
5847 : }
5848 :
5849 : static JSBool
5850 0 : nsIDOMDOMTokenList_Remove(JSContext *cx, unsigned argc, jsval *vp)
5851 : {
5852 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5853 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5854 0 : if (!obj)
5855 0 : return JS_FALSE;
5856 : nsIDOMDOMTokenList *self;
5857 0 : xpc_qsSelfRef selfref;
5858 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5859 0 : return JS_FALSE;
5860 0 : if (argc < 1)
5861 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5862 0 : jsval *argv = JS_ARGV(cx, vp);
5863 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5864 : xpc_qsDOMString::eStringify,
5865 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5866 0 : if (!arg0.IsValid())
5867 0 : return JS_FALSE;
5868 : nsresult rv;
5869 0 : rv = self->Remove(arg0);
5870 0 : if (NS_FAILED(rv))
5871 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5872 0 : *vp = JSVAL_VOID;
5873 0 : return JS_TRUE;
5874 : }
5875 :
5876 : static JSBool
5877 0 : nsIDOMDOMTokenList_Toggle(JSContext *cx, unsigned argc, jsval *vp)
5878 : {
5879 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5880 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5881 0 : if (!obj)
5882 0 : return JS_FALSE;
5883 : nsIDOMDOMTokenList *self;
5884 0 : xpc_qsSelfRef selfref;
5885 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5886 0 : return JS_FALSE;
5887 0 : if (argc < 1)
5888 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5889 0 : jsval *argv = JS_ARGV(cx, vp);
5890 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5891 : xpc_qsDOMString::eStringify,
5892 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5893 0 : if (!arg0.IsValid())
5894 0 : return JS_FALSE;
5895 : nsresult rv;
5896 : bool result;
5897 0 : rv = self->Toggle(arg0, &result);
5898 0 : if (NS_FAILED(rv))
5899 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5900 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5901 0 : return JS_TRUE;
5902 : }
5903 :
5904 : static JSBool
5905 0 : nsIDOMDOMTokenList_ToString(JSContext *cx, unsigned argc, jsval *vp)
5906 : {
5907 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5908 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5909 0 : if (!obj)
5910 0 : return JS_FALSE;
5911 : nsIDOMDOMTokenList *self;
5912 0 : xpc_qsSelfRef selfref;
5913 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5914 0 : return JS_FALSE;
5915 : nsresult rv;
5916 0 : nsString result;
5917 0 : rv = self->ToString(result);
5918 0 : if (NS_FAILED(rv))
5919 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5920 0 : return xpc::StringToJsval(cx, result, vp);
5921 : }
5922 :
5923 : // === interface nsIDOMDOMSettableTokenList
5924 :
5925 : static JSBool
5926 0 : nsIDOMDOMSettableTokenList_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5927 : {
5928 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5929 : nsIDOMDOMSettableTokenList *self;
5930 0 : xpc_qsSelfRef selfref;
5931 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5932 0 : return JS_FALSE;
5933 : nsresult rv;
5934 0 : nsString result;
5935 0 : rv = self->GetValue(result);
5936 0 : if (NS_FAILED(rv))
5937 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5938 0 : return xpc::StringToJsval(cx, result, vp);
5939 : }
5940 :
5941 : static JSBool
5942 0 : nsIDOMDOMSettableTokenList_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
5943 : {
5944 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5945 : nsIDOMDOMSettableTokenList *self;
5946 0 : xpc_qsSelfRef selfref;
5947 0 : JS::AutoValueRooter tvr(cx);
5948 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
5949 0 : return JS_FALSE;
5950 : xpc_qsDOMString arg0(cx, *vp, vp,
5951 : xpc_qsDOMString::eDefaultNullBehavior,
5952 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5953 0 : if (!arg0.IsValid())
5954 0 : return JS_FALSE;
5955 : nsresult rv;
5956 0 : rv = self->SetValue(arg0);
5957 0 : if (NS_FAILED(rv))
5958 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
5959 0 : return JS_TRUE;
5960 : }
5961 :
5962 : // === interface nsIDOMXULDocument
5963 :
5964 : static JSBool
5965 0 : nsIDOMXULDocument_GetBoxObjectFor(JSContext *cx, unsigned argc, jsval *vp)
5966 : {
5967 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5968 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5969 0 : if (!obj)
5970 0 : return JS_FALSE;
5971 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5972 : nsIDOMXULDocument *self;
5973 0 : xpc_qsSelfRef selfref;
5974 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5975 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5976 0 : return JS_FALSE;
5977 0 : if (argc < 1)
5978 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5979 0 : jsval *argv = JS_ARGV(cx, vp);
5980 : nsresult rv;
5981 : nsIDOMElement *arg0;
5982 0 : xpc_qsSelfRef arg0ref;
5983 0 : rv = xpc_qsUnwrapArg<nsIDOMElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
5984 0 : if (NS_FAILED(rv)) {
5985 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
5986 0 : return JS_FALSE;
5987 : }
5988 0 : nsCOMPtr<nsIBoxObject> result;
5989 0 : rv = self->GetBoxObjectFor(arg0, getter_AddRefs(result));
5990 0 : if (NS_FAILED(rv))
5991 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5992 0 : if (!result) {
5993 0 : *vp = JSVAL_NULL;
5994 0 : return JS_TRUE;
5995 : }
5996 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5997 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5998 0 : return JS_TRUE;
5999 : }
6000 : // After this point do not use 'result'!
6001 0 : qsObjectHelper helper(result, cache);
6002 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIBoxObject), &interfaces[k_nsIBoxObject], vp);
6003 : }
6004 :
6005 : // === interface nsIDOMNSElement
6006 :
6007 : static JSBool
6008 0 : nsIDOMNSElement_GetElementsByClassName(JSContext *cx, unsigned argc, jsval *vp)
6009 : {
6010 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6011 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6012 0 : if (!obj)
6013 0 : return JS_FALSE;
6014 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
6015 : nsGenericElement *self;
6016 0 : xpc_qsSelfRef selfref;
6017 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6018 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
6019 0 : return JS_FALSE;
6020 0 : if (argc < 1)
6021 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
6022 0 : jsval *argv = JS_ARGV(cx, vp);
6023 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
6024 : xpc_qsDOMString::eDefaultNullBehavior,
6025 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
6026 0 : if (!arg0.IsValid())
6027 0 : return JS_FALSE;
6028 : nsresult rv;
6029 0 : nsCOMPtr<nsIDOMNodeList> result;
6030 0 : rv = self->GetElementsByClassName(arg0, getter_AddRefs(result));
6031 0 : if (NS_FAILED(rv))
6032 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
6033 0 : if (!result) {
6034 0 : *vp = JSVAL_NULL;
6035 0 : return JS_TRUE;
6036 : }
6037 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6038 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6039 0 : return JS_TRUE;
6040 : }
6041 : // After this point do not use 'result'!
6042 0 : qsObjectHelper helper(result, cache);
6043 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
6044 : }
6045 :
6046 : static JSBool
6047 0 : nsIDOMNSElement_GetClientRects(JSContext *cx, unsigned argc, jsval *vp)
6048 : {
6049 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6050 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6051 0 : if (!obj)
6052 0 : return JS_FALSE;
6053 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
6054 : nsGenericElement *self;
6055 0 : xpc_qsSelfRef selfref;
6056 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6057 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
6058 0 : return JS_FALSE;
6059 : nsresult rv;
6060 0 : nsCOMPtr<nsIDOMClientRectList> result;
6061 0 : rv = self->GetClientRects(getter_AddRefs(result));
6062 0 : if (NS_FAILED(rv))
6063 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
6064 0 : if (!result) {
6065 0 : *vp = JSVAL_NULL;
6066 0 : return JS_TRUE;
6067 : }
6068 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6069 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6070 0 : return JS_TRUE;
6071 : }
6072 : // After this point do not use 'result'!
6073 0 : qsObjectHelper helper(result, cache);
6074 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRectList), &interfaces[k_nsIDOMClientRectList], vp);
6075 : }
6076 :
6077 : static JSBool
6078 0 : nsIDOMNSElement_GetBoundingClientRect(JSContext *cx, unsigned argc, jsval *vp)
6079 : {
6080 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6081 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6082 0 : if (!obj)
6083 0 : return JS_FALSE;
6084 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
6085 : nsGenericElement *self;
6086 0 : xpc_qsSelfRef selfref;
6087 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6088 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
6089 0 : return JS_FALSE;
6090 : nsresult rv;
6091 0 : nsCOMPtr<nsIDOMClientRect> result;
6092 0 : rv = self->GetBoundingClientRect(getter_AddRefs(result));
6093 0 : if (NS_FAILED(rv))
6094 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
6095 0 : if (!result) {
6096 0 : *vp = JSVAL_NULL;
6097 0 : return JS_TRUE;
6098 : }
6099 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6100 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6101 0 : return JS_TRUE;
6102 : }
6103 : // After this point do not use 'result'!
6104 0 : qsObjectHelper helper(result, cache);
6105 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
6106 : }
6107 :
6108 : static JSBool
6109 0 : nsIDOMNSElement_GetScrollTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6110 : {
6111 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6112 : nsGenericElement *self;
6113 0 : xpc_qsSelfRef selfref;
6114 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6115 0 : return JS_FALSE;
6116 0 : PRInt32 result = self->GetScrollTop();
6117 : #ifdef DEBUG
6118 : nsresult debug_rv;
6119 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6120 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6121 : PRInt32 debug_result;
6122 0 : debug_rv = debug_self->GetScrollTop(&debug_result);
6123 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6124 : "Got the wrong answer from the custom method call!");
6125 : #endif
6126 0 : *vp = INT_TO_JSVAL(result);
6127 0 : return JS_TRUE;
6128 : }
6129 :
6130 : static JSBool
6131 0 : nsIDOMNSElement_SetScrollTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6132 : {
6133 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6134 : nsGenericElement *self;
6135 0 : xpc_qsSelfRef selfref;
6136 0 : JS::AutoValueRooter tvr(cx);
6137 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
6138 0 : return JS_FALSE;
6139 : int32_t arg0;
6140 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
6141 0 : return JS_FALSE;
6142 0 : self->SetScrollTop(arg0);
6143 0 : return JS_TRUE;
6144 : }
6145 :
6146 : static JSBool
6147 0 : nsIDOMNSElement_GetScrollLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6148 : {
6149 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6150 : nsGenericElement *self;
6151 0 : xpc_qsSelfRef selfref;
6152 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6153 0 : return JS_FALSE;
6154 0 : PRInt32 result = self->GetScrollLeft();
6155 : #ifdef DEBUG
6156 : nsresult debug_rv;
6157 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6158 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6159 : PRInt32 debug_result;
6160 0 : debug_rv = debug_self->GetScrollLeft(&debug_result);
6161 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6162 : "Got the wrong answer from the custom method call!");
6163 : #endif
6164 0 : *vp = INT_TO_JSVAL(result);
6165 0 : return JS_TRUE;
6166 : }
6167 :
6168 : static JSBool
6169 0 : nsIDOMNSElement_SetScrollLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6170 : {
6171 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6172 : nsGenericElement *self;
6173 0 : xpc_qsSelfRef selfref;
6174 0 : JS::AutoValueRooter tvr(cx);
6175 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
6176 0 : return JS_FALSE;
6177 : int32_t arg0;
6178 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
6179 0 : return JS_FALSE;
6180 0 : self->SetScrollLeft(arg0);
6181 0 : return JS_TRUE;
6182 : }
6183 :
6184 : static JSBool
6185 0 : nsIDOMNSElement_GetScrollHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6186 : {
6187 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6188 : nsGenericElement *self;
6189 0 : xpc_qsSelfRef selfref;
6190 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6191 0 : return JS_FALSE;
6192 0 : PRInt32 result = self->GetScrollHeight();
6193 : #ifdef DEBUG
6194 : nsresult debug_rv;
6195 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6196 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6197 : PRInt32 debug_result;
6198 0 : debug_rv = debug_self->GetScrollHeight(&debug_result);
6199 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6200 : "Got the wrong answer from the custom method call!");
6201 : #endif
6202 0 : *vp = INT_TO_JSVAL(result);
6203 0 : return JS_TRUE;
6204 : }
6205 :
6206 : static JSBool
6207 0 : nsIDOMNSElement_GetScrollWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6208 : {
6209 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6210 : nsGenericElement *self;
6211 0 : xpc_qsSelfRef selfref;
6212 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6213 0 : return JS_FALSE;
6214 0 : PRInt32 result = self->GetScrollWidth();
6215 : #ifdef DEBUG
6216 : nsresult debug_rv;
6217 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6218 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6219 : PRInt32 debug_result;
6220 0 : debug_rv = debug_self->GetScrollWidth(&debug_result);
6221 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6222 : "Got the wrong answer from the custom method call!");
6223 : #endif
6224 0 : *vp = INT_TO_JSVAL(result);
6225 0 : return JS_TRUE;
6226 : }
6227 :
6228 : static JSBool
6229 0 : nsIDOMNSElement_GetClientTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6230 : {
6231 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6232 : nsGenericElement *self;
6233 0 : xpc_qsSelfRef selfref;
6234 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6235 0 : return JS_FALSE;
6236 0 : PRInt32 result = self->GetClientTop();
6237 : #ifdef DEBUG
6238 : nsresult debug_rv;
6239 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6240 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6241 : PRInt32 debug_result;
6242 0 : debug_rv = debug_self->GetClientTop(&debug_result);
6243 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6244 : "Got the wrong answer from the custom method call!");
6245 : #endif
6246 0 : *vp = INT_TO_JSVAL(result);
6247 0 : return JS_TRUE;
6248 : }
6249 :
6250 : static JSBool
6251 0 : nsIDOMNSElement_GetClientLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6252 : {
6253 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6254 : nsGenericElement *self;
6255 0 : xpc_qsSelfRef selfref;
6256 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6257 0 : return JS_FALSE;
6258 0 : PRInt32 result = self->GetClientLeft();
6259 : #ifdef DEBUG
6260 : nsresult debug_rv;
6261 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6262 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6263 : PRInt32 debug_result;
6264 0 : debug_rv = debug_self->GetClientLeft(&debug_result);
6265 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6266 : "Got the wrong answer from the custom method call!");
6267 : #endif
6268 0 : *vp = INT_TO_JSVAL(result);
6269 0 : return JS_TRUE;
6270 : }
6271 :
6272 : static JSBool
6273 0 : nsIDOMNSElement_GetClientHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6274 : {
6275 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6276 : nsGenericElement *self;
6277 0 : xpc_qsSelfRef selfref;
6278 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6279 0 : return JS_FALSE;
6280 0 : PRInt32 result = self->GetClientHeight();
6281 : #ifdef DEBUG
6282 : nsresult debug_rv;
6283 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6284 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6285 : PRInt32 debug_result;
6286 0 : debug_rv = debug_self->GetClientHeight(&debug_result);
6287 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6288 : "Got the wrong answer from the custom method call!");
6289 : #endif
6290 0 : *vp = INT_TO_JSVAL(result);
6291 0 : return JS_TRUE;
6292 : }
6293 :
6294 : static JSBool
6295 0 : nsIDOMNSElement_GetClientWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6296 : {
6297 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6298 : nsGenericElement *self;
6299 0 : xpc_qsSelfRef selfref;
6300 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6301 0 : return JS_FALSE;
6302 0 : PRInt32 result = self->GetClientWidth();
6303 : #ifdef DEBUG
6304 : nsresult debug_rv;
6305 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6306 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6307 : PRInt32 debug_result;
6308 0 : debug_rv = debug_self->GetClientWidth(&debug_result);
6309 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6310 : "Got the wrong answer from the custom method call!");
6311 : #endif
6312 0 : *vp = INT_TO_JSVAL(result);
6313 0 : return JS_TRUE;
6314 : }
6315 :
6316 : static JSBool
6317 2 : nsIDOMNSElement_GetFirstElementChild(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6318 : {
6319 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6320 2 : JSObject *callee = nsnull;
6321 : nsGenericElement *self;
6322 4 : xpc_qsSelfRef selfref;
6323 4 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6324 2 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6325 0 : return JS_FALSE;
6326 2 : nsIContent *result = self->GetFirstElementChild();
6327 : #ifdef DEBUG
6328 : nsresult debug_rv;
6329 4 : nsCOMPtr<nsIDOMNSElement> debug_self;
6330 2 : CallQueryInterface(self, getter_AddRefs(debug_self));
6331 4 : nsCOMPtr<nsIDOMElement> debug_result;
6332 2 : debug_rv = debug_self->GetFirstElementChild(getter_AddRefs(debug_result));
6333 2 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6334 : "Got the wrong answer from the custom method call!");
6335 : #endif
6336 2 : if (!result) {
6337 0 : *vp = JSVAL_NULL;
6338 0 : return JS_TRUE;
6339 : }
6340 2 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6341 2 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6342 1 : return JS_TRUE;
6343 : }
6344 : // After this point do not use 'result'!
6345 2 : qsObjectHelper helper(result, cache);
6346 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
6347 : }
6348 :
6349 : static JSBool
6350 0 : nsIDOMNSElement_GetLastElementChild(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6351 : {
6352 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6353 0 : JSObject *callee = nsnull;
6354 : nsGenericElement *self;
6355 0 : xpc_qsSelfRef selfref;
6356 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6357 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6358 0 : return JS_FALSE;
6359 0 : nsIContent *result = self->GetLastElementChild();
6360 : #ifdef DEBUG
6361 : nsresult debug_rv;
6362 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6363 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6364 0 : nsCOMPtr<nsIDOMElement> debug_result;
6365 0 : debug_rv = debug_self->GetLastElementChild(getter_AddRefs(debug_result));
6366 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6367 : "Got the wrong answer from the custom method call!");
6368 : #endif
6369 0 : if (!result) {
6370 0 : *vp = JSVAL_NULL;
6371 0 : return JS_TRUE;
6372 : }
6373 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6374 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6375 0 : return JS_TRUE;
6376 : }
6377 : // After this point do not use 'result'!
6378 0 : qsObjectHelper helper(result, cache);
6379 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
6380 : }
6381 :
6382 : static JSBool
6383 0 : nsIDOMNSElement_GetPreviousElementSibling(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6384 : {
6385 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6386 0 : JSObject *callee = nsnull;
6387 : nsGenericElement *self;
6388 0 : xpc_qsSelfRef selfref;
6389 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6390 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6391 0 : return JS_FALSE;
6392 0 : nsIContent *result = self->GetPreviousElementSibling();
6393 : #ifdef DEBUG
6394 : nsresult debug_rv;
6395 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6396 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6397 0 : nsCOMPtr<nsIDOMElement> debug_result;
6398 0 : debug_rv = debug_self->GetPreviousElementSibling(getter_AddRefs(debug_result));
6399 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6400 : "Got the wrong answer from the custom method call!");
6401 : #endif
6402 0 : if (!result) {
6403 0 : *vp = JSVAL_NULL;
6404 0 : return JS_TRUE;
6405 : }
6406 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6407 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6408 0 : return JS_TRUE;
6409 : }
6410 : // After this point do not use 'result'!
6411 0 : qsObjectHelper helper(result, cache);
6412 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
6413 : }
6414 :
6415 : static JSBool
6416 0 : nsIDOMNSElement_GetNextElementSibling(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6417 : {
6418 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6419 0 : JSObject *callee = nsnull;
6420 : nsGenericElement *self;
6421 0 : xpc_qsSelfRef selfref;
6422 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6423 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6424 0 : return JS_FALSE;
6425 0 : nsIContent *result = self->GetNextElementSibling();
6426 : #ifdef DEBUG
6427 : nsresult debug_rv;
6428 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6429 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6430 0 : nsCOMPtr<nsIDOMElement> debug_result;
6431 0 : debug_rv = debug_self->GetNextElementSibling(getter_AddRefs(debug_result));
6432 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6433 : "Got the wrong answer from the custom method call!");
6434 : #endif
6435 0 : if (!result) {
6436 0 : *vp = JSVAL_NULL;
6437 0 : return JS_TRUE;
6438 : }
6439 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6440 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6441 0 : return JS_TRUE;
6442 : }
6443 : // After this point do not use 'result'!
6444 0 : qsObjectHelper helper(result, cache);
6445 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
6446 : }
6447 :
6448 : static JSBool
6449 0 : nsIDOMNSElement_GetChildElementCount(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6450 : {
6451 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6452 : nsGenericElement *self;
6453 0 : xpc_qsSelfRef selfref;
6454 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6455 0 : return JS_FALSE;
6456 : nsresult rv;
6457 : PRUint32 result;
6458 0 : rv = self->GetChildElementCount(&result);
6459 0 : if (NS_FAILED(rv))
6460 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
6461 0 : *vp = UINT_TO_JSVAL(result);
6462 0 : return JS_TRUE;
6463 : }
6464 :
6465 : static JSBool
6466 167 : nsIDOMNSElement_GetChildren(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6467 : {
6468 167 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6469 167 : JSObject *callee = nsnull;
6470 : nsGenericElement *self;
6471 334 : xpc_qsSelfRef selfref;
6472 334 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6473 167 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6474 0 : return JS_FALSE;
6475 : nsresult rv;
6476 334 : nsCOMPtr<nsIDOMNodeList> result;
6477 167 : rv = self->GetChildren(getter_AddRefs(result));
6478 167 : if (NS_FAILED(rv))
6479 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
6480 167 : if (!result) {
6481 0 : *vp = JSVAL_NULL;
6482 0 : return JS_TRUE;
6483 : }
6484 167 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6485 167 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6486 0 : return JS_TRUE;
6487 : }
6488 : // After this point do not use 'result'!
6489 334 : qsObjectHelper helper(result, cache);
6490 167 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
6491 : }
6492 :
6493 : static JSBool
6494 0 : nsIDOMNSElement_GetClassList(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6495 : {
6496 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6497 0 : JSObject *callee = nsnull;
6498 : nsGenericElement *self;
6499 0 : xpc_qsSelfRef selfref;
6500 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6501 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6502 0 : return JS_FALSE;
6503 : nsresult rv;
6504 0 : nsDOMTokenList *result = self->GetClassList(&rv);
6505 : #ifdef DEBUG
6506 : nsresult debug_rv;
6507 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6508 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6509 0 : nsCOMPtr<nsIDOMDOMTokenList> debug_result;
6510 0 : debug_rv = debug_self->GetClassList(getter_AddRefs(debug_result));
6511 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) == NS_SUCCEEDED(rv) && xpc_qsSameResult(debug_result, result),
6512 : "Got the wrong answer from the custom method call!");
6513 : #endif
6514 0 : if (NS_FAILED(rv))
6515 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
6516 0 : if (!result) {
6517 0 : *vp = JSVAL_NULL;
6518 0 : return JS_TRUE;
6519 : }
6520 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6521 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6522 0 : return JS_TRUE;
6523 : }
6524 : // After this point do not use 'result'!
6525 0 : qsObjectHelper helper(result, cache);
6526 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMTokenList), &interfaces[k_nsIDOMDOMTokenList], vp);
6527 : }
6528 :
6529 : static JSBool
6530 0 : nsIDOMNSElement_SetCapture(JSContext *cx, unsigned argc, jsval *vp)
6531 : {
6532 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6533 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6534 0 : if (!obj)
6535 0 : return JS_FALSE;
6536 : nsGenericElement *self;
6537 0 : xpc_qsSelfRef selfref;
6538 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
6539 0 : return JS_FALSE;
6540 0 : jsval *argv = JS_ARGV(cx, vp);
6541 : JSBool arg0;
6542 0 : JS_ValueToBoolean(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0);
6543 0 : self->SetCapture(arg0);
6544 0 : *vp = JSVAL_VOID;
6545 0 : return JS_TRUE;
6546 : }
6547 :
6548 : static JSBool
6549 0 : nsIDOMNSElement_ReleaseCapture(JSContext *cx, unsigned argc, jsval *vp)
6550 : {
6551 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6552 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6553 0 : if (!obj)
6554 0 : return JS_FALSE;
6555 : nsGenericElement *self;
6556 0 : xpc_qsSelfRef selfref;
6557 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
6558 0 : return JS_FALSE;
6559 0 : self->ReleaseCapture();
6560 0 : *vp = JSVAL_VOID;
6561 0 : return JS_TRUE;
6562 : }
6563 :
6564 : static JSBool
6565 0 : nsIDOMNSElement_MozMatchesSelector(JSContext *cx, unsigned argc, jsval *vp)
6566 : {
6567 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6568 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6569 0 : if (!obj)
6570 0 : return JS_FALSE;
6571 : nsGenericElement *self;
6572 0 : xpc_qsSelfRef selfref;
6573 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
6574 0 : return JS_FALSE;
6575 0 : if (argc < 1)
6576 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
6577 0 : jsval *argv = JS_ARGV(cx, vp);
6578 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
6579 : xpc_qsDOMString::eStringify,
6580 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
6581 0 : if (!arg0.IsValid())
6582 0 : return JS_FALSE;
6583 : nsresult rv;
6584 0 : bool result = self->MozMatchesSelector(arg0, &rv);
6585 0 : if (NS_FAILED(rv))
6586 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
6587 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
6588 0 : return JS_TRUE;
6589 : }
6590 :
6591 : // === interface nsIDOMElementCSSInlineStyle
6592 :
6593 : static JSBool
6594 0 : nsIDOMElementCSSInlineStyle_GetStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6595 : {
6596 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6597 0 : JSObject *callee = nsnull;
6598 : nsStyledElement *self;
6599 0 : xpc_qsSelfRef selfref;
6600 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6601 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6602 0 : return JS_FALSE;
6603 : nsresult rv;
6604 : /* XXXbz MathML elements inherit from nsStyledElement but
6605 : don't actually implement GetStyle. */
6606 0 : if (self->GetNameSpaceID() == kNameSpaceID_MathML)
6607 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_BAD_CONVERT_JS);
6608 0 : nsIDOMCSSStyleDeclaration* result = self->GetStyle(&rv);
6609 : #ifdef DEBUG
6610 : nsresult debug_rv;
6611 0 : nsCOMPtr<nsIDOMElementCSSInlineStyle> debug_self;
6612 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6613 0 : nsCOMPtr<nsIDOMCSSStyleDeclaration> debug_result;
6614 0 : debug_rv = debug_self->GetStyle(getter_AddRefs(debug_result));
6615 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) == NS_SUCCEEDED(rv) && xpc_qsSameResult(debug_result, result),
6616 : "Got the wrong answer from the custom method call!");
6617 : #endif
6618 0 : if (NS_FAILED(rv))
6619 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
6620 0 : if (!result) {
6621 0 : *vp = JSVAL_NULL;
6622 0 : return JS_TRUE;
6623 : }
6624 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6625 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6626 0 : return JS_TRUE;
6627 : }
6628 : // After this point do not use 'result'!
6629 0 : qsObjectHelper helper(result, cache);
6630 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSStyleDeclaration), &interfaces[k_nsIDOMCSSStyleDeclaration], vp);
6631 : }
6632 :
6633 : // === interface nsIDOMCSS2Properties
6634 :
6635 : static JSBool
6636 0 : nsIDOMCSS2Properties_Get(JSContext *cx, JSObject *obj, jsid id, const nsCSSProperty prop, jsval *vp)
6637 : {
6638 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6639 : nsICSSDeclaration *self;
6640 0 : xpc_qsSelfRef selfref;
6641 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6642 0 : return JS_FALSE;
6643 : nsresult rv;
6644 0 : nsString result;
6645 0 : rv = self->GetPropertyValue(prop, result);
6646 0 : if (NS_FAILED(rv))
6647 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
6648 0 : return xpc::StringToJsval(cx, result, vp);
6649 : }
6650 :
6651 : static JSBool
6652 0 : nsIDOMCSS2Properties_GetBackground(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6653 : {
6654 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Background, vp);
6655 : }
6656 :
6657 : static JSBool
6658 0 : nsIDOMCSS2Properties_Set(JSContext *cx, JSObject *obj, jsid id, JSBool strict, const nsCSSProperty prop, jsval *vp)
6659 : {
6660 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6661 : nsICSSDeclaration *self;
6662 0 : xpc_qsSelfRef selfref;
6663 0 : JS::AutoValueRooter tvr(cx);
6664 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
6665 0 : return JS_FALSE;
6666 : xpc_qsDOMString arg0(cx, *vp, vp,
6667 : xpc_qsDOMString::eDefaultNullBehavior,
6668 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
6669 0 : if (!arg0.IsValid())
6670 0 : return JS_FALSE;
6671 : nsresult rv;
6672 0 : rv = self->SetPropertyValue(prop, arg0);
6673 0 : if (NS_FAILED(rv))
6674 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
6675 0 : return JS_TRUE;
6676 : }
6677 :
6678 : static JSBool
6679 0 : nsIDOMCSS2Properties_SetBackground(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6680 : {
6681 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Background, vp);
6682 : }
6683 :
6684 : static JSBool
6685 0 : nsIDOMCSS2Properties_GetBackgroundAttachment(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6686 : {
6687 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundAttachment, vp);
6688 : }
6689 :
6690 : static JSBool
6691 0 : nsIDOMCSS2Properties_SetBackgroundAttachment(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6692 : {
6693 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundAttachment, vp);
6694 : }
6695 :
6696 : static JSBool
6697 0 : nsIDOMCSS2Properties_GetBackgroundColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6698 : {
6699 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundColor, vp);
6700 : }
6701 :
6702 : static JSBool
6703 0 : nsIDOMCSS2Properties_SetBackgroundColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6704 : {
6705 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundColor, vp);
6706 : }
6707 :
6708 : static JSBool
6709 0 : nsIDOMCSS2Properties_GetBackgroundImage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6710 : {
6711 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundImage, vp);
6712 : }
6713 :
6714 : static JSBool
6715 0 : nsIDOMCSS2Properties_SetBackgroundImage(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6716 : {
6717 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundImage, vp);
6718 : }
6719 :
6720 : static JSBool
6721 0 : nsIDOMCSS2Properties_GetBackgroundPosition(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6722 : {
6723 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundPosition, vp);
6724 : }
6725 :
6726 : static JSBool
6727 0 : nsIDOMCSS2Properties_SetBackgroundPosition(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6728 : {
6729 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundPosition, vp);
6730 : }
6731 :
6732 : static JSBool
6733 0 : nsIDOMCSS2Properties_GetBackgroundRepeat(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6734 : {
6735 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundRepeat, vp);
6736 : }
6737 :
6738 : static JSBool
6739 0 : nsIDOMCSS2Properties_SetBackgroundRepeat(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6740 : {
6741 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundRepeat, vp);
6742 : }
6743 :
6744 : static JSBool
6745 0 : nsIDOMCSS2Properties_GetBorder(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6746 : {
6747 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Border, vp);
6748 : }
6749 :
6750 : static JSBool
6751 0 : nsIDOMCSS2Properties_SetBorder(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6752 : {
6753 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Border, vp);
6754 : }
6755 :
6756 : static JSBool
6757 0 : nsIDOMCSS2Properties_GetBorderCollapse(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6758 : {
6759 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderCollapse, vp);
6760 : }
6761 :
6762 : static JSBool
6763 0 : nsIDOMCSS2Properties_SetBorderCollapse(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6764 : {
6765 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderCollapse, vp);
6766 : }
6767 :
6768 : static JSBool
6769 0 : nsIDOMCSS2Properties_GetBorderColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6770 : {
6771 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderColor, vp);
6772 : }
6773 :
6774 : static JSBool
6775 0 : nsIDOMCSS2Properties_SetBorderColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6776 : {
6777 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderColor, vp);
6778 : }
6779 :
6780 : static JSBool
6781 0 : nsIDOMCSS2Properties_GetBorderSpacing(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6782 : {
6783 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderSpacing, vp);
6784 : }
6785 :
6786 : static JSBool
6787 0 : nsIDOMCSS2Properties_SetBorderSpacing(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6788 : {
6789 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderSpacing, vp);
6790 : }
6791 :
6792 : static JSBool
6793 0 : nsIDOMCSS2Properties_GetBorderStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6794 : {
6795 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderStyle, vp);
6796 : }
6797 :
6798 : static JSBool
6799 0 : nsIDOMCSS2Properties_SetBorderStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6800 : {
6801 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderStyle, vp);
6802 : }
6803 :
6804 : static JSBool
6805 0 : nsIDOMCSS2Properties_GetBorderTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6806 : {
6807 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTop, vp);
6808 : }
6809 :
6810 : static JSBool
6811 0 : nsIDOMCSS2Properties_SetBorderTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6812 : {
6813 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTop, vp);
6814 : }
6815 :
6816 : static JSBool
6817 0 : nsIDOMCSS2Properties_GetBorderRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6818 : {
6819 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderRight, vp);
6820 : }
6821 :
6822 : static JSBool
6823 0 : nsIDOMCSS2Properties_SetBorderRight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6824 : {
6825 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderRight, vp);
6826 : }
6827 :
6828 : static JSBool
6829 0 : nsIDOMCSS2Properties_GetBorderBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6830 : {
6831 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottom, vp);
6832 : }
6833 :
6834 : static JSBool
6835 0 : nsIDOMCSS2Properties_SetBorderBottom(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6836 : {
6837 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottom, vp);
6838 : }
6839 :
6840 : static JSBool
6841 0 : nsIDOMCSS2Properties_GetBorderLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6842 : {
6843 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderLeft, vp);
6844 : }
6845 :
6846 : static JSBool
6847 0 : nsIDOMCSS2Properties_SetBorderLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6848 : {
6849 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderLeft, vp);
6850 : }
6851 :
6852 : static JSBool
6853 0 : nsIDOMCSS2Properties_GetBorderTopColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6854 : {
6855 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTopColor, vp);
6856 : }
6857 :
6858 : static JSBool
6859 0 : nsIDOMCSS2Properties_SetBorderTopColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6860 : {
6861 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTopColor, vp);
6862 : }
6863 :
6864 : static JSBool
6865 0 : nsIDOMCSS2Properties_GetBorderRightColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6866 : {
6867 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderRightColor, vp);
6868 : }
6869 :
6870 : static JSBool
6871 0 : nsIDOMCSS2Properties_SetBorderRightColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6872 : {
6873 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderRightColor, vp);
6874 : }
6875 :
6876 : static JSBool
6877 0 : nsIDOMCSS2Properties_GetBorderBottomColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6878 : {
6879 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottomColor, vp);
6880 : }
6881 :
6882 : static JSBool
6883 0 : nsIDOMCSS2Properties_SetBorderBottomColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6884 : {
6885 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottomColor, vp);
6886 : }
6887 :
6888 : static JSBool
6889 0 : nsIDOMCSS2Properties_GetBorderLeftColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6890 : {
6891 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderLeftColor, vp);
6892 : }
6893 :
6894 : static JSBool
6895 0 : nsIDOMCSS2Properties_SetBorderLeftColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6896 : {
6897 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderLeftColor, vp);
6898 : }
6899 :
6900 : static JSBool
6901 0 : nsIDOMCSS2Properties_GetBorderTopStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6902 : {
6903 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTopStyle, vp);
6904 : }
6905 :
6906 : static JSBool
6907 0 : nsIDOMCSS2Properties_SetBorderTopStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6908 : {
6909 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTopStyle, vp);
6910 : }
6911 :
6912 : static JSBool
6913 0 : nsIDOMCSS2Properties_GetBorderRightStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6914 : {
6915 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderRightStyle, vp);
6916 : }
6917 :
6918 : static JSBool
6919 0 : nsIDOMCSS2Properties_SetBorderRightStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6920 : {
6921 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderRightStyle, vp);
6922 : }
6923 :
6924 : static JSBool
6925 0 : nsIDOMCSS2Properties_GetBorderBottomStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6926 : {
6927 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottomStyle, vp);
6928 : }
6929 :
6930 : static JSBool
6931 0 : nsIDOMCSS2Properties_SetBorderBottomStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6932 : {
6933 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottomStyle, vp);
6934 : }
6935 :
6936 : static JSBool
6937 0 : nsIDOMCSS2Properties_GetBorderLeftStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6938 : {
6939 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderLeftStyle, vp);
6940 : }
6941 :
6942 : static JSBool
6943 0 : nsIDOMCSS2Properties_SetBorderLeftStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6944 : {
6945 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderLeftStyle, vp);
6946 : }
6947 :
6948 : static JSBool
6949 0 : nsIDOMCSS2Properties_GetBorderTopWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6950 : {
6951 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTopWidth, vp);
6952 : }
6953 :
6954 : static JSBool
6955 0 : nsIDOMCSS2Properties_SetBorderTopWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6956 : {
6957 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTopWidth, vp);
6958 : }
6959 :
6960 : static JSBool
6961 0 : nsIDOMCSS2Properties_GetBorderRightWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6962 : {
6963 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderRightWidth, vp);
6964 : }
6965 :
6966 : static JSBool
6967 0 : nsIDOMCSS2Properties_SetBorderRightWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6968 : {
6969 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderRightWidth, vp);
6970 : }
6971 :
6972 : static JSBool
6973 0 : nsIDOMCSS2Properties_GetBorderBottomWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6974 : {
6975 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottomWidth, vp);
6976 : }
6977 :
6978 : static JSBool
6979 0 : nsIDOMCSS2Properties_SetBorderBottomWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6980 : {
6981 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottomWidth, vp);
6982 : }
6983 :
6984 : static JSBool
6985 0 : nsIDOMCSS2Properties_GetBorderLeftWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6986 : {
6987 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderLeftWidth, vp);
6988 : }
6989 :
6990 : static JSBool
6991 0 : nsIDOMCSS2Properties_SetBorderLeftWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6992 : {
6993 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderLeftWidth, vp);
6994 : }
6995 :
6996 : static JSBool
6997 0 : nsIDOMCSS2Properties_GetBorderWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6998 : {
6999 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderWidth, vp);
7000 : }
7001 :
7002 : static JSBool
7003 0 : nsIDOMCSS2Properties_SetBorderWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7004 : {
7005 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderWidth, vp);
7006 : }
7007 :
7008 : static JSBool
7009 0 : nsIDOMCSS2Properties_GetBorderRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7010 : {
7011 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderRadius, vp);
7012 : }
7013 :
7014 : static JSBool
7015 0 : nsIDOMCSS2Properties_SetBorderRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7016 : {
7017 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderRadius, vp);
7018 : }
7019 :
7020 : static JSBool
7021 0 : nsIDOMCSS2Properties_GetBorderTopLeftRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7022 : {
7023 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTopLeftRadius, vp);
7024 : }
7025 :
7026 : static JSBool
7027 0 : nsIDOMCSS2Properties_SetBorderTopLeftRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7028 : {
7029 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTopLeftRadius, vp);
7030 : }
7031 :
7032 : static JSBool
7033 0 : nsIDOMCSS2Properties_GetBorderTopRightRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7034 : {
7035 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTopRightRadius, vp);
7036 : }
7037 :
7038 : static JSBool
7039 0 : nsIDOMCSS2Properties_SetBorderTopRightRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7040 : {
7041 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTopRightRadius, vp);
7042 : }
7043 :
7044 : static JSBool
7045 0 : nsIDOMCSS2Properties_GetBorderBottomLeftRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7046 : {
7047 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottomLeftRadius, vp);
7048 : }
7049 :
7050 : static JSBool
7051 0 : nsIDOMCSS2Properties_SetBorderBottomLeftRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7052 : {
7053 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottomLeftRadius, vp);
7054 : }
7055 :
7056 : static JSBool
7057 0 : nsIDOMCSS2Properties_GetBorderBottomRightRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7058 : {
7059 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottomRightRadius, vp);
7060 : }
7061 :
7062 : static JSBool
7063 0 : nsIDOMCSS2Properties_SetBorderBottomRightRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7064 : {
7065 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottomRightRadius, vp);
7066 : }
7067 :
7068 : static JSBool
7069 0 : nsIDOMCSS2Properties_GetBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7070 : {
7071 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Bottom, vp);
7072 : }
7073 :
7074 : static JSBool
7075 0 : nsIDOMCSS2Properties_SetBottom(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7076 : {
7077 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Bottom, vp);
7078 : }
7079 :
7080 : static JSBool
7081 0 : nsIDOMCSS2Properties_GetBoxShadow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7082 : {
7083 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BoxShadow, vp);
7084 : }
7085 :
7086 : static JSBool
7087 0 : nsIDOMCSS2Properties_SetBoxShadow(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7088 : {
7089 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BoxShadow, vp);
7090 : }
7091 :
7092 : static JSBool
7093 0 : nsIDOMCSS2Properties_GetCaptionSide(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7094 : {
7095 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_CaptionSide, vp);
7096 : }
7097 :
7098 : static JSBool
7099 0 : nsIDOMCSS2Properties_SetCaptionSide(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7100 : {
7101 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_CaptionSide, vp);
7102 : }
7103 :
7104 : static JSBool
7105 0 : nsIDOMCSS2Properties_GetClear(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7106 : {
7107 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Clear, vp);
7108 : }
7109 :
7110 : static JSBool
7111 0 : nsIDOMCSS2Properties_SetClear(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7112 : {
7113 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Clear, vp);
7114 : }
7115 :
7116 : static JSBool
7117 0 : nsIDOMCSS2Properties_GetClip(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7118 : {
7119 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Clip, vp);
7120 : }
7121 :
7122 : static JSBool
7123 0 : nsIDOMCSS2Properties_SetClip(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7124 : {
7125 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Clip, vp);
7126 : }
7127 :
7128 : static JSBool
7129 0 : nsIDOMCSS2Properties_GetColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7130 : {
7131 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Color, vp);
7132 : }
7133 :
7134 : static JSBool
7135 0 : nsIDOMCSS2Properties_SetColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7136 : {
7137 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Color, vp);
7138 : }
7139 :
7140 : static JSBool
7141 0 : nsIDOMCSS2Properties_GetContent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7142 : {
7143 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Content, vp);
7144 : }
7145 :
7146 : static JSBool
7147 0 : nsIDOMCSS2Properties_SetContent(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7148 : {
7149 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Content, vp);
7150 : }
7151 :
7152 : static JSBool
7153 0 : nsIDOMCSS2Properties_GetCounterIncrement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7154 : {
7155 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_CounterIncrement, vp);
7156 : }
7157 :
7158 : static JSBool
7159 0 : nsIDOMCSS2Properties_SetCounterIncrement(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7160 : {
7161 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_CounterIncrement, vp);
7162 : }
7163 :
7164 : static JSBool
7165 0 : nsIDOMCSS2Properties_GetCounterReset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7166 : {
7167 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_CounterReset, vp);
7168 : }
7169 :
7170 : static JSBool
7171 0 : nsIDOMCSS2Properties_SetCounterReset(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7172 : {
7173 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_CounterReset, vp);
7174 : }
7175 :
7176 : static JSBool
7177 0 : nsIDOMCSS2Properties_GetCursor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7178 : {
7179 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Cursor, vp);
7180 : }
7181 :
7182 : static JSBool
7183 0 : nsIDOMCSS2Properties_SetCursor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7184 : {
7185 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Cursor, vp);
7186 : }
7187 :
7188 : static JSBool
7189 0 : nsIDOMCSS2Properties_GetDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7190 : {
7191 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Direction, vp);
7192 : }
7193 :
7194 : static JSBool
7195 0 : nsIDOMCSS2Properties_SetDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7196 : {
7197 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Direction, vp);
7198 : }
7199 :
7200 : static JSBool
7201 0 : nsIDOMCSS2Properties_GetDisplay(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7202 : {
7203 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Display, vp);
7204 : }
7205 :
7206 : static JSBool
7207 0 : nsIDOMCSS2Properties_SetDisplay(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7208 : {
7209 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Display, vp);
7210 : }
7211 :
7212 : static JSBool
7213 0 : nsIDOMCSS2Properties_GetEmptyCells(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7214 : {
7215 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_EmptyCells, vp);
7216 : }
7217 :
7218 : static JSBool
7219 0 : nsIDOMCSS2Properties_SetEmptyCells(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7220 : {
7221 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_EmptyCells, vp);
7222 : }
7223 :
7224 : static JSBool
7225 0 : nsIDOMCSS2Properties_GetCssFloat(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7226 : {
7227 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_CssFloat, vp);
7228 : }
7229 :
7230 : static JSBool
7231 0 : nsIDOMCSS2Properties_SetCssFloat(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7232 : {
7233 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_CssFloat, vp);
7234 : }
7235 :
7236 : static JSBool
7237 0 : nsIDOMCSS2Properties_GetFont(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7238 : {
7239 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Font, vp);
7240 : }
7241 :
7242 : static JSBool
7243 0 : nsIDOMCSS2Properties_SetFont(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7244 : {
7245 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Font, vp);
7246 : }
7247 :
7248 : static JSBool
7249 0 : nsIDOMCSS2Properties_GetFontFamily(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7250 : {
7251 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontFamily, vp);
7252 : }
7253 :
7254 : static JSBool
7255 0 : nsIDOMCSS2Properties_SetFontFamily(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7256 : {
7257 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontFamily, vp);
7258 : }
7259 :
7260 : static JSBool
7261 0 : nsIDOMCSS2Properties_GetFontSize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7262 : {
7263 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontSize, vp);
7264 : }
7265 :
7266 : static JSBool
7267 0 : nsIDOMCSS2Properties_SetFontSize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7268 : {
7269 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontSize, vp);
7270 : }
7271 :
7272 : static JSBool
7273 0 : nsIDOMCSS2Properties_GetFontSizeAdjust(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7274 : {
7275 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontSizeAdjust, vp);
7276 : }
7277 :
7278 : static JSBool
7279 0 : nsIDOMCSS2Properties_SetFontSizeAdjust(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7280 : {
7281 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontSizeAdjust, vp);
7282 : }
7283 :
7284 : static JSBool
7285 0 : nsIDOMCSS2Properties_GetFontStretch(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7286 : {
7287 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontStretch, vp);
7288 : }
7289 :
7290 : static JSBool
7291 0 : nsIDOMCSS2Properties_SetFontStretch(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7292 : {
7293 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontStretch, vp);
7294 : }
7295 :
7296 : static JSBool
7297 0 : nsIDOMCSS2Properties_GetFontStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7298 : {
7299 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontStyle, vp);
7300 : }
7301 :
7302 : static JSBool
7303 0 : nsIDOMCSS2Properties_SetFontStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7304 : {
7305 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontStyle, vp);
7306 : }
7307 :
7308 : static JSBool
7309 0 : nsIDOMCSS2Properties_GetFontVariant(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7310 : {
7311 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontVariant, vp);
7312 : }
7313 :
7314 : static JSBool
7315 0 : nsIDOMCSS2Properties_SetFontVariant(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7316 : {
7317 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontVariant, vp);
7318 : }
7319 :
7320 : static JSBool
7321 0 : nsIDOMCSS2Properties_GetFontWeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7322 : {
7323 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontWeight, vp);
7324 : }
7325 :
7326 : static JSBool
7327 0 : nsIDOMCSS2Properties_SetFontWeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7328 : {
7329 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontWeight, vp);
7330 : }
7331 :
7332 : static JSBool
7333 0 : nsIDOMCSS2Properties_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7334 : {
7335 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Height, vp);
7336 : }
7337 :
7338 : static JSBool
7339 0 : nsIDOMCSS2Properties_SetHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7340 : {
7341 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Height, vp);
7342 : }
7343 :
7344 : static JSBool
7345 0 : nsIDOMCSS2Properties_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7346 : {
7347 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Left, vp);
7348 : }
7349 :
7350 : static JSBool
7351 0 : nsIDOMCSS2Properties_SetLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7352 : {
7353 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Left, vp);
7354 : }
7355 :
7356 : static JSBool
7357 0 : nsIDOMCSS2Properties_GetLetterSpacing(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7358 : {
7359 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_LetterSpacing, vp);
7360 : }
7361 :
7362 : static JSBool
7363 0 : nsIDOMCSS2Properties_SetLetterSpacing(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7364 : {
7365 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_LetterSpacing, vp);
7366 : }
7367 :
7368 : static JSBool
7369 0 : nsIDOMCSS2Properties_GetLineHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7370 : {
7371 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_LineHeight, vp);
7372 : }
7373 :
7374 : static JSBool
7375 0 : nsIDOMCSS2Properties_SetLineHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7376 : {
7377 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_LineHeight, vp);
7378 : }
7379 :
7380 : static JSBool
7381 0 : nsIDOMCSS2Properties_GetListStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7382 : {
7383 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ListStyle, vp);
7384 : }
7385 :
7386 : static JSBool
7387 0 : nsIDOMCSS2Properties_SetListStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7388 : {
7389 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ListStyle, vp);
7390 : }
7391 :
7392 : static JSBool
7393 0 : nsIDOMCSS2Properties_GetListStyleImage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7394 : {
7395 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ListStyleImage, vp);
7396 : }
7397 :
7398 : static JSBool
7399 0 : nsIDOMCSS2Properties_SetListStyleImage(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7400 : {
7401 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ListStyleImage, vp);
7402 : }
7403 :
7404 : static JSBool
7405 0 : nsIDOMCSS2Properties_GetListStylePosition(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7406 : {
7407 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ListStylePosition, vp);
7408 : }
7409 :
7410 : static JSBool
7411 0 : nsIDOMCSS2Properties_SetListStylePosition(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7412 : {
7413 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ListStylePosition, vp);
7414 : }
7415 :
7416 : static JSBool
7417 0 : nsIDOMCSS2Properties_GetListStyleType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7418 : {
7419 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ListStyleType, vp);
7420 : }
7421 :
7422 : static JSBool
7423 0 : nsIDOMCSS2Properties_SetListStyleType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7424 : {
7425 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ListStyleType, vp);
7426 : }
7427 :
7428 : static JSBool
7429 0 : nsIDOMCSS2Properties_GetMargin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7430 : {
7431 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Margin, vp);
7432 : }
7433 :
7434 : static JSBool
7435 0 : nsIDOMCSS2Properties_SetMargin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7436 : {
7437 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Margin, vp);
7438 : }
7439 :
7440 : static JSBool
7441 0 : nsIDOMCSS2Properties_GetMarginTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7442 : {
7443 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarginTop, vp);
7444 : }
7445 :
7446 : static JSBool
7447 0 : nsIDOMCSS2Properties_SetMarginTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7448 : {
7449 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarginTop, vp);
7450 : }
7451 :
7452 : static JSBool
7453 0 : nsIDOMCSS2Properties_GetMarginRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7454 : {
7455 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarginRight, vp);
7456 : }
7457 :
7458 : static JSBool
7459 0 : nsIDOMCSS2Properties_SetMarginRight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7460 : {
7461 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarginRight, vp);
7462 : }
7463 :
7464 : static JSBool
7465 0 : nsIDOMCSS2Properties_GetMarginBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7466 : {
7467 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarginBottom, vp);
7468 : }
7469 :
7470 : static JSBool
7471 0 : nsIDOMCSS2Properties_SetMarginBottom(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7472 : {
7473 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarginBottom, vp);
7474 : }
7475 :
7476 : static JSBool
7477 0 : nsIDOMCSS2Properties_GetMarginLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7478 : {
7479 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarginLeft, vp);
7480 : }
7481 :
7482 : static JSBool
7483 0 : nsIDOMCSS2Properties_SetMarginLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7484 : {
7485 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarginLeft, vp);
7486 : }
7487 :
7488 : static JSBool
7489 0 : nsIDOMCSS2Properties_GetMarkerOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7490 : {
7491 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarkerOffset, vp);
7492 : }
7493 :
7494 : static JSBool
7495 0 : nsIDOMCSS2Properties_SetMarkerOffset(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7496 : {
7497 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarkerOffset, vp);
7498 : }
7499 :
7500 : static JSBool
7501 0 : nsIDOMCSS2Properties_GetMarks(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7502 : {
7503 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Marks, vp);
7504 : }
7505 :
7506 : static JSBool
7507 0 : nsIDOMCSS2Properties_SetMarks(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7508 : {
7509 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Marks, vp);
7510 : }
7511 :
7512 : static JSBool
7513 0 : nsIDOMCSS2Properties_GetMaxHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7514 : {
7515 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MaxHeight, vp);
7516 : }
7517 :
7518 : static JSBool
7519 0 : nsIDOMCSS2Properties_SetMaxHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7520 : {
7521 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MaxHeight, vp);
7522 : }
7523 :
7524 : static JSBool
7525 0 : nsIDOMCSS2Properties_GetMaxWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7526 : {
7527 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MaxWidth, vp);
7528 : }
7529 :
7530 : static JSBool
7531 0 : nsIDOMCSS2Properties_SetMaxWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7532 : {
7533 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MaxWidth, vp);
7534 : }
7535 :
7536 : static JSBool
7537 0 : nsIDOMCSS2Properties_GetMinHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7538 : {
7539 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MinHeight, vp);
7540 : }
7541 :
7542 : static JSBool
7543 0 : nsIDOMCSS2Properties_SetMinHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7544 : {
7545 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MinHeight, vp);
7546 : }
7547 :
7548 : static JSBool
7549 0 : nsIDOMCSS2Properties_GetMinWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7550 : {
7551 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MinWidth, vp);
7552 : }
7553 :
7554 : static JSBool
7555 0 : nsIDOMCSS2Properties_SetMinWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7556 : {
7557 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MinWidth, vp);
7558 : }
7559 :
7560 : static JSBool
7561 0 : nsIDOMCSS2Properties_GetOrphans(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7562 : {
7563 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Orphans, vp);
7564 : }
7565 :
7566 : static JSBool
7567 0 : nsIDOMCSS2Properties_SetOrphans(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7568 : {
7569 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Orphans, vp);
7570 : }
7571 :
7572 : static JSBool
7573 0 : nsIDOMCSS2Properties_GetOutline(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7574 : {
7575 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Outline, vp);
7576 : }
7577 :
7578 : static JSBool
7579 0 : nsIDOMCSS2Properties_SetOutline(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7580 : {
7581 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Outline, vp);
7582 : }
7583 :
7584 : static JSBool
7585 0 : nsIDOMCSS2Properties_GetOutlineColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7586 : {
7587 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OutlineColor, vp);
7588 : }
7589 :
7590 : static JSBool
7591 0 : nsIDOMCSS2Properties_SetOutlineColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7592 : {
7593 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OutlineColor, vp);
7594 : }
7595 :
7596 : static JSBool
7597 0 : nsIDOMCSS2Properties_GetOutlineStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7598 : {
7599 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OutlineStyle, vp);
7600 : }
7601 :
7602 : static JSBool
7603 0 : nsIDOMCSS2Properties_SetOutlineStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7604 : {
7605 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OutlineStyle, vp);
7606 : }
7607 :
7608 : static JSBool
7609 0 : nsIDOMCSS2Properties_GetOutlineWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7610 : {
7611 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OutlineWidth, vp);
7612 : }
7613 :
7614 : static JSBool
7615 0 : nsIDOMCSS2Properties_SetOutlineWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7616 : {
7617 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OutlineWidth, vp);
7618 : }
7619 :
7620 : static JSBool
7621 0 : nsIDOMCSS2Properties_GetOverflow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7622 : {
7623 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Overflow, vp);
7624 : }
7625 :
7626 : static JSBool
7627 0 : nsIDOMCSS2Properties_SetOverflow(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7628 : {
7629 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Overflow, vp);
7630 : }
7631 :
7632 : static JSBool
7633 0 : nsIDOMCSS2Properties_GetPadding(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7634 : {
7635 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Padding, vp);
7636 : }
7637 :
7638 : static JSBool
7639 0 : nsIDOMCSS2Properties_SetPadding(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7640 : {
7641 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Padding, vp);
7642 : }
7643 :
7644 : static JSBool
7645 0 : nsIDOMCSS2Properties_GetPaddingTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7646 : {
7647 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PaddingTop, vp);
7648 : }
7649 :
7650 : static JSBool
7651 0 : nsIDOMCSS2Properties_SetPaddingTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7652 : {
7653 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PaddingTop, vp);
7654 : }
7655 :
7656 : static JSBool
7657 0 : nsIDOMCSS2Properties_GetPaddingRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7658 : {
7659 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PaddingRight, vp);
7660 : }
7661 :
7662 : static JSBool
7663 0 : nsIDOMCSS2Properties_SetPaddingRight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7664 : {
7665 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PaddingRight, vp);
7666 : }
7667 :
7668 : static JSBool
7669 0 : nsIDOMCSS2Properties_GetPaddingBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7670 : {
7671 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PaddingBottom, vp);
7672 : }
7673 :
7674 : static JSBool
7675 0 : nsIDOMCSS2Properties_SetPaddingBottom(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7676 : {
7677 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PaddingBottom, vp);
7678 : }
7679 :
7680 : static JSBool
7681 0 : nsIDOMCSS2Properties_GetPaddingLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7682 : {
7683 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PaddingLeft, vp);
7684 : }
7685 :
7686 : static JSBool
7687 0 : nsIDOMCSS2Properties_SetPaddingLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7688 : {
7689 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PaddingLeft, vp);
7690 : }
7691 :
7692 : static JSBool
7693 0 : nsIDOMCSS2Properties_GetPage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7694 : {
7695 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Page, vp);
7696 : }
7697 :
7698 : static JSBool
7699 0 : nsIDOMCSS2Properties_SetPage(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7700 : {
7701 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Page, vp);
7702 : }
7703 :
7704 : static JSBool
7705 0 : nsIDOMCSS2Properties_GetPageBreakAfter(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7706 : {
7707 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PageBreakAfter, vp);
7708 : }
7709 :
7710 : static JSBool
7711 0 : nsIDOMCSS2Properties_SetPageBreakAfter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7712 : {
7713 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PageBreakAfter, vp);
7714 : }
7715 :
7716 : static JSBool
7717 0 : nsIDOMCSS2Properties_GetPageBreakBefore(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7718 : {
7719 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PageBreakBefore, vp);
7720 : }
7721 :
7722 : static JSBool
7723 0 : nsIDOMCSS2Properties_SetPageBreakBefore(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7724 : {
7725 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PageBreakBefore, vp);
7726 : }
7727 :
7728 : static JSBool
7729 0 : nsIDOMCSS2Properties_GetPageBreakInside(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7730 : {
7731 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PageBreakInside, vp);
7732 : }
7733 :
7734 : static JSBool
7735 0 : nsIDOMCSS2Properties_SetPageBreakInside(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7736 : {
7737 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PageBreakInside, vp);
7738 : }
7739 :
7740 : static JSBool
7741 0 : nsIDOMCSS2Properties_GetPosition(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7742 : {
7743 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Position, vp);
7744 : }
7745 :
7746 : static JSBool
7747 0 : nsIDOMCSS2Properties_SetPosition(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7748 : {
7749 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Position, vp);
7750 : }
7751 :
7752 : static JSBool
7753 0 : nsIDOMCSS2Properties_GetQuotes(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7754 : {
7755 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Quotes, vp);
7756 : }
7757 :
7758 : static JSBool
7759 0 : nsIDOMCSS2Properties_SetQuotes(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7760 : {
7761 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Quotes, vp);
7762 : }
7763 :
7764 : static JSBool
7765 0 : nsIDOMCSS2Properties_GetRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7766 : {
7767 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Right, vp);
7768 : }
7769 :
7770 : static JSBool
7771 0 : nsIDOMCSS2Properties_SetRight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7772 : {
7773 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Right, vp);
7774 : }
7775 :
7776 : static JSBool
7777 0 : nsIDOMCSS2Properties_GetSize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7778 : {
7779 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Size, vp);
7780 : }
7781 :
7782 : static JSBool
7783 0 : nsIDOMCSS2Properties_SetSize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7784 : {
7785 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Size, vp);
7786 : }
7787 :
7788 : static JSBool
7789 0 : nsIDOMCSS2Properties_GetTableLayout(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7790 : {
7791 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TableLayout, vp);
7792 : }
7793 :
7794 : static JSBool
7795 0 : nsIDOMCSS2Properties_SetTableLayout(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7796 : {
7797 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TableLayout, vp);
7798 : }
7799 :
7800 : static JSBool
7801 0 : nsIDOMCSS2Properties_GetTextAlign(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7802 : {
7803 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextAlign, vp);
7804 : }
7805 :
7806 : static JSBool
7807 0 : nsIDOMCSS2Properties_SetTextAlign(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7808 : {
7809 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextAlign, vp);
7810 : }
7811 :
7812 : static JSBool
7813 0 : nsIDOMCSS2Properties_GetTextDecoration(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7814 : {
7815 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextDecoration, vp);
7816 : }
7817 :
7818 : static JSBool
7819 0 : nsIDOMCSS2Properties_SetTextDecoration(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7820 : {
7821 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextDecoration, vp);
7822 : }
7823 :
7824 : static JSBool
7825 0 : nsIDOMCSS2Properties_GetTextIndent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7826 : {
7827 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextIndent, vp);
7828 : }
7829 :
7830 : static JSBool
7831 0 : nsIDOMCSS2Properties_SetTextIndent(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7832 : {
7833 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextIndent, vp);
7834 : }
7835 :
7836 : static JSBool
7837 0 : nsIDOMCSS2Properties_GetTextOverflow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7838 : {
7839 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextOverflow, vp);
7840 : }
7841 :
7842 : static JSBool
7843 0 : nsIDOMCSS2Properties_SetTextOverflow(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7844 : {
7845 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextOverflow, vp);
7846 : }
7847 :
7848 : static JSBool
7849 0 : nsIDOMCSS2Properties_GetTextShadow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7850 : {
7851 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextShadow, vp);
7852 : }
7853 :
7854 : static JSBool
7855 0 : nsIDOMCSS2Properties_SetTextShadow(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7856 : {
7857 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextShadow, vp);
7858 : }
7859 :
7860 : static JSBool
7861 0 : nsIDOMCSS2Properties_GetTextTransform(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7862 : {
7863 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextTransform, vp);
7864 : }
7865 :
7866 : static JSBool
7867 0 : nsIDOMCSS2Properties_SetTextTransform(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7868 : {
7869 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextTransform, vp);
7870 : }
7871 :
7872 : static JSBool
7873 0 : nsIDOMCSS2Properties_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7874 : {
7875 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Top, vp);
7876 : }
7877 :
7878 : static JSBool
7879 0 : nsIDOMCSS2Properties_SetTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7880 : {
7881 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Top, vp);
7882 : }
7883 :
7884 : static JSBool
7885 0 : nsIDOMCSS2Properties_GetUnicodeBidi(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7886 : {
7887 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_UnicodeBidi, vp);
7888 : }
7889 :
7890 : static JSBool
7891 0 : nsIDOMCSS2Properties_SetUnicodeBidi(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7892 : {
7893 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_UnicodeBidi, vp);
7894 : }
7895 :
7896 : static JSBool
7897 0 : nsIDOMCSS2Properties_GetVerticalAlign(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7898 : {
7899 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_VerticalAlign, vp);
7900 : }
7901 :
7902 : static JSBool
7903 0 : nsIDOMCSS2Properties_SetVerticalAlign(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7904 : {
7905 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_VerticalAlign, vp);
7906 : }
7907 :
7908 : static JSBool
7909 0 : nsIDOMCSS2Properties_GetVisibility(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7910 : {
7911 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Visibility, vp);
7912 : }
7913 :
7914 : static JSBool
7915 0 : nsIDOMCSS2Properties_SetVisibility(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7916 : {
7917 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Visibility, vp);
7918 : }
7919 :
7920 : static JSBool
7921 0 : nsIDOMCSS2Properties_GetWhiteSpace(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7922 : {
7923 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_WhiteSpace, vp);
7924 : }
7925 :
7926 : static JSBool
7927 0 : nsIDOMCSS2Properties_SetWhiteSpace(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7928 : {
7929 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_WhiteSpace, vp);
7930 : }
7931 :
7932 : static JSBool
7933 0 : nsIDOMCSS2Properties_GetWidows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7934 : {
7935 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Widows, vp);
7936 : }
7937 :
7938 : static JSBool
7939 0 : nsIDOMCSS2Properties_SetWidows(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7940 : {
7941 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Widows, vp);
7942 : }
7943 :
7944 : static JSBool
7945 0 : nsIDOMCSS2Properties_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7946 : {
7947 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Width, vp);
7948 : }
7949 :
7950 : static JSBool
7951 0 : nsIDOMCSS2Properties_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7952 : {
7953 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Width, vp);
7954 : }
7955 :
7956 : static JSBool
7957 0 : nsIDOMCSS2Properties_GetWordSpacing(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7958 : {
7959 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_WordSpacing, vp);
7960 : }
7961 :
7962 : static JSBool
7963 0 : nsIDOMCSS2Properties_SetWordSpacing(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7964 : {
7965 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_WordSpacing, vp);
7966 : }
7967 :
7968 : static JSBool
7969 0 : nsIDOMCSS2Properties_GetZIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7970 : {
7971 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ZIndex, vp);
7972 : }
7973 :
7974 : static JSBool
7975 0 : nsIDOMCSS2Properties_SetZIndex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7976 : {
7977 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ZIndex, vp);
7978 : }
7979 :
7980 : static JSBool
7981 0 : nsIDOMCSS2Properties_GetClipPath(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7982 : {
7983 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ClipPath, vp);
7984 : }
7985 :
7986 : static JSBool
7987 0 : nsIDOMCSS2Properties_SetClipPath(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7988 : {
7989 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ClipPath, vp);
7990 : }
7991 :
7992 : static JSBool
7993 0 : nsIDOMCSS2Properties_GetClipRule(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7994 : {
7995 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ClipRule, vp);
7996 : }
7997 :
7998 : static JSBool
7999 0 : nsIDOMCSS2Properties_SetClipRule(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8000 : {
8001 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ClipRule, vp);
8002 : }
8003 :
8004 : static JSBool
8005 0 : nsIDOMCSS2Properties_GetColorInterpolation(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8006 : {
8007 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ColorInterpolation, vp);
8008 : }
8009 :
8010 : static JSBool
8011 0 : nsIDOMCSS2Properties_SetColorInterpolation(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8012 : {
8013 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ColorInterpolation, vp);
8014 : }
8015 :
8016 : static JSBool
8017 0 : nsIDOMCSS2Properties_GetColorInterpolationFilters(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8018 : {
8019 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ColorInterpolationFilters, vp);
8020 : }
8021 :
8022 : static JSBool
8023 0 : nsIDOMCSS2Properties_SetColorInterpolationFilters(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8024 : {
8025 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ColorInterpolationFilters, vp);
8026 : }
8027 :
8028 : static JSBool
8029 0 : nsIDOMCSS2Properties_GetDominantBaseline(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8030 : {
8031 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_DominantBaseline, vp);
8032 : }
8033 :
8034 : static JSBool
8035 0 : nsIDOMCSS2Properties_SetDominantBaseline(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8036 : {
8037 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_DominantBaseline, vp);
8038 : }
8039 :
8040 : static JSBool
8041 0 : nsIDOMCSS2Properties_GetFill(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8042 : {
8043 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Fill, vp);
8044 : }
8045 :
8046 : static JSBool
8047 0 : nsIDOMCSS2Properties_SetFill(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8048 : {
8049 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Fill, vp);
8050 : }
8051 :
8052 : static JSBool
8053 0 : nsIDOMCSS2Properties_GetFillOpacity(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8054 : {
8055 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FillOpacity, vp);
8056 : }
8057 :
8058 : static JSBool
8059 0 : nsIDOMCSS2Properties_SetFillOpacity(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8060 : {
8061 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FillOpacity, vp);
8062 : }
8063 :
8064 : static JSBool
8065 0 : nsIDOMCSS2Properties_GetFillRule(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8066 : {
8067 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FillRule, vp);
8068 : }
8069 :
8070 : static JSBool
8071 0 : nsIDOMCSS2Properties_SetFillRule(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8072 : {
8073 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FillRule, vp);
8074 : }
8075 :
8076 : static JSBool
8077 0 : nsIDOMCSS2Properties_GetFilter(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8078 : {
8079 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Filter, vp);
8080 : }
8081 :
8082 : static JSBool
8083 0 : nsIDOMCSS2Properties_SetFilter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8084 : {
8085 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Filter, vp);
8086 : }
8087 :
8088 : static JSBool
8089 0 : nsIDOMCSS2Properties_GetFloodColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8090 : {
8091 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FloodColor, vp);
8092 : }
8093 :
8094 : static JSBool
8095 0 : nsIDOMCSS2Properties_SetFloodColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8096 : {
8097 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FloodColor, vp);
8098 : }
8099 :
8100 : static JSBool
8101 0 : nsIDOMCSS2Properties_GetFloodOpacity(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8102 : {
8103 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FloodOpacity, vp);
8104 : }
8105 :
8106 : static JSBool
8107 0 : nsIDOMCSS2Properties_SetFloodOpacity(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8108 : {
8109 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FloodOpacity, vp);
8110 : }
8111 :
8112 : static JSBool
8113 0 : nsIDOMCSS2Properties_GetImageRendering(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8114 : {
8115 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ImageRendering, vp);
8116 : }
8117 :
8118 : static JSBool
8119 0 : nsIDOMCSS2Properties_SetImageRendering(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8120 : {
8121 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ImageRendering, vp);
8122 : }
8123 :
8124 : static JSBool
8125 0 : nsIDOMCSS2Properties_GetLightingColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8126 : {
8127 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_LightingColor, vp);
8128 : }
8129 :
8130 : static JSBool
8131 0 : nsIDOMCSS2Properties_SetLightingColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8132 : {
8133 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_LightingColor, vp);
8134 : }
8135 :
8136 : static JSBool
8137 0 : nsIDOMCSS2Properties_GetMarker(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8138 : {
8139 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Marker, vp);
8140 : }
8141 :
8142 : static JSBool
8143 0 : nsIDOMCSS2Properties_SetMarker(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8144 : {
8145 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Marker, vp);
8146 : }
8147 :
8148 : static JSBool
8149 0 : nsIDOMCSS2Properties_GetMarkerEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8150 : {
8151 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarkerEnd, vp);
8152 : }
8153 :
8154 : static JSBool
8155 0 : nsIDOMCSS2Properties_SetMarkerEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8156 : {
8157 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarkerEnd, vp);
8158 : }
8159 :
8160 : static JSBool
8161 0 : nsIDOMCSS2Properties_GetMarkerMid(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8162 : {
8163 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarkerMid, vp);
8164 : }
8165 :
8166 : static JSBool
8167 0 : nsIDOMCSS2Properties_SetMarkerMid(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8168 : {
8169 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarkerMid, vp);
8170 : }
8171 :
8172 : static JSBool
8173 0 : nsIDOMCSS2Properties_GetMarkerStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8174 : {
8175 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarkerStart, vp);
8176 : }
8177 :
8178 : static JSBool
8179 0 : nsIDOMCSS2Properties_SetMarkerStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8180 : {
8181 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarkerStart, vp);
8182 : }
8183 :
8184 : static JSBool
8185 0 : nsIDOMCSS2Properties_GetMask(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8186 : {
8187 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Mask, vp);
8188 : }
8189 :
8190 : static JSBool
8191 0 : nsIDOMCSS2Properties_SetMask(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8192 : {
8193 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Mask, vp);
8194 : }
8195 :
8196 : static JSBool
8197 0 : nsIDOMCSS2Properties_GetShapeRendering(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8198 : {
8199 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ShapeRendering, vp);
8200 : }
8201 :
8202 : static JSBool
8203 0 : nsIDOMCSS2Properties_SetShapeRendering(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8204 : {
8205 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ShapeRendering, vp);
8206 : }
8207 :
8208 : static JSBool
8209 0 : nsIDOMCSS2Properties_GetStopColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8210 : {
8211 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StopColor, vp);
8212 : }
8213 :
8214 : static JSBool
8215 0 : nsIDOMCSS2Properties_SetStopColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8216 : {
8217 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StopColor, vp);
8218 : }
8219 :
8220 : static JSBool
8221 0 : nsIDOMCSS2Properties_GetStopOpacity(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8222 : {
8223 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StopOpacity, vp);
8224 : }
8225 :
8226 : static JSBool
8227 0 : nsIDOMCSS2Properties_SetStopOpacity(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8228 : {
8229 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StopOpacity, vp);
8230 : }
8231 :
8232 : static JSBool
8233 0 : nsIDOMCSS2Properties_GetStroke(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8234 : {
8235 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Stroke, vp);
8236 : }
8237 :
8238 : static JSBool
8239 0 : nsIDOMCSS2Properties_SetStroke(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8240 : {
8241 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Stroke, vp);
8242 : }
8243 :
8244 : static JSBool
8245 0 : nsIDOMCSS2Properties_GetStrokeDasharray(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8246 : {
8247 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeDasharray, vp);
8248 : }
8249 :
8250 : static JSBool
8251 0 : nsIDOMCSS2Properties_SetStrokeDasharray(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8252 : {
8253 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeDasharray, vp);
8254 : }
8255 :
8256 : static JSBool
8257 0 : nsIDOMCSS2Properties_GetStrokeDashoffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8258 : {
8259 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeDashoffset, vp);
8260 : }
8261 :
8262 : static JSBool
8263 0 : nsIDOMCSS2Properties_SetStrokeDashoffset(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8264 : {
8265 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeDashoffset, vp);
8266 : }
8267 :
8268 : static JSBool
8269 0 : nsIDOMCSS2Properties_GetStrokeLinecap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8270 : {
8271 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeLinecap, vp);
8272 : }
8273 :
8274 : static JSBool
8275 0 : nsIDOMCSS2Properties_SetStrokeLinecap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8276 : {
8277 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeLinecap, vp);
8278 : }
8279 :
8280 : static JSBool
8281 0 : nsIDOMCSS2Properties_GetStrokeLinejoin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8282 : {
8283 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeLinejoin, vp);
8284 : }
8285 :
8286 : static JSBool
8287 0 : nsIDOMCSS2Properties_SetStrokeLinejoin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8288 : {
8289 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeLinejoin, vp);
8290 : }
8291 :
8292 : static JSBool
8293 0 : nsIDOMCSS2Properties_GetStrokeMiterlimit(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8294 : {
8295 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeMiterlimit, vp);
8296 : }
8297 :
8298 : static JSBool
8299 0 : nsIDOMCSS2Properties_SetStrokeMiterlimit(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8300 : {
8301 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeMiterlimit, vp);
8302 : }
8303 :
8304 : static JSBool
8305 0 : nsIDOMCSS2Properties_GetStrokeOpacity(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8306 : {
8307 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeOpacity, vp);
8308 : }
8309 :
8310 : static JSBool
8311 0 : nsIDOMCSS2Properties_SetStrokeOpacity(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8312 : {
8313 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeOpacity, vp);
8314 : }
8315 :
8316 : static JSBool
8317 0 : nsIDOMCSS2Properties_GetStrokeWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8318 : {
8319 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeWidth, vp);
8320 : }
8321 :
8322 : static JSBool
8323 0 : nsIDOMCSS2Properties_SetStrokeWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8324 : {
8325 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeWidth, vp);
8326 : }
8327 :
8328 : static JSBool
8329 0 : nsIDOMCSS2Properties_GetTextAnchor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8330 : {
8331 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextAnchor, vp);
8332 : }
8333 :
8334 : static JSBool
8335 0 : nsIDOMCSS2Properties_SetTextAnchor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8336 : {
8337 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextAnchor, vp);
8338 : }
8339 :
8340 : static JSBool
8341 0 : nsIDOMCSS2Properties_GetTextRendering(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8342 : {
8343 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextRendering, vp);
8344 : }
8345 :
8346 : static JSBool
8347 0 : nsIDOMCSS2Properties_SetTextRendering(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8348 : {
8349 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextRendering, vp);
8350 : }
8351 :
8352 : static JSBool
8353 0 : nsIDOMCSS2Properties_GetMozAppearance(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8354 : {
8355 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAppearance, vp);
8356 : }
8357 :
8358 : static JSBool
8359 0 : nsIDOMCSS2Properties_SetMozAppearance(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8360 : {
8361 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAppearance, vp);
8362 : }
8363 :
8364 : static JSBool
8365 0 : nsIDOMCSS2Properties_GetBackgroundClip(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8366 : {
8367 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundClip, vp);
8368 : }
8369 :
8370 : static JSBool
8371 0 : nsIDOMCSS2Properties_SetBackgroundClip(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8372 : {
8373 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundClip, vp);
8374 : }
8375 :
8376 : static JSBool
8377 0 : nsIDOMCSS2Properties_GetMozBackgroundInlinePolicy(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8378 : {
8379 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBackgroundInlinePolicy, vp);
8380 : }
8381 :
8382 : static JSBool
8383 0 : nsIDOMCSS2Properties_SetMozBackgroundInlinePolicy(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8384 : {
8385 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBackgroundInlinePolicy, vp);
8386 : }
8387 :
8388 : static JSBool
8389 0 : nsIDOMCSS2Properties_GetBackgroundOrigin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8390 : {
8391 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundOrigin, vp);
8392 : }
8393 :
8394 : static JSBool
8395 0 : nsIDOMCSS2Properties_SetBackgroundOrigin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8396 : {
8397 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundOrigin, vp);
8398 : }
8399 :
8400 : static JSBool
8401 0 : nsIDOMCSS2Properties_GetMozBinding(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8402 : {
8403 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBinding, vp);
8404 : }
8405 :
8406 : static JSBool
8407 0 : nsIDOMCSS2Properties_SetMozBinding(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8408 : {
8409 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBinding, vp);
8410 : }
8411 :
8412 : static JSBool
8413 0 : nsIDOMCSS2Properties_GetMozBorderBottomColors(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8414 : {
8415 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderBottomColors, vp);
8416 : }
8417 :
8418 : static JSBool
8419 0 : nsIDOMCSS2Properties_SetMozBorderBottomColors(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8420 : {
8421 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderBottomColors, vp);
8422 : }
8423 :
8424 : static JSBool
8425 0 : nsIDOMCSS2Properties_GetMozBorderLeftColors(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8426 : {
8427 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderLeftColors, vp);
8428 : }
8429 :
8430 : static JSBool
8431 0 : nsIDOMCSS2Properties_SetMozBorderLeftColors(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8432 : {
8433 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderLeftColors, vp);
8434 : }
8435 :
8436 : static JSBool
8437 0 : nsIDOMCSS2Properties_GetMozBorderRightColors(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8438 : {
8439 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderRightColors, vp);
8440 : }
8441 :
8442 : static JSBool
8443 0 : nsIDOMCSS2Properties_SetMozBorderRightColors(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8444 : {
8445 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderRightColors, vp);
8446 : }
8447 :
8448 : static JSBool
8449 0 : nsIDOMCSS2Properties_GetMozBorderTopColors(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8450 : {
8451 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderTopColors, vp);
8452 : }
8453 :
8454 : static JSBool
8455 0 : nsIDOMCSS2Properties_SetMozBorderTopColors(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8456 : {
8457 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderTopColors, vp);
8458 : }
8459 :
8460 : static JSBool
8461 0 : nsIDOMCSS2Properties_GetMozBoxAlign(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8462 : {
8463 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxAlign, vp);
8464 : }
8465 :
8466 : static JSBool
8467 0 : nsIDOMCSS2Properties_SetMozBoxAlign(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8468 : {
8469 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxAlign, vp);
8470 : }
8471 :
8472 : static JSBool
8473 0 : nsIDOMCSS2Properties_GetMozBoxDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8474 : {
8475 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxDirection, vp);
8476 : }
8477 :
8478 : static JSBool
8479 0 : nsIDOMCSS2Properties_SetMozBoxDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8480 : {
8481 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxDirection, vp);
8482 : }
8483 :
8484 : static JSBool
8485 0 : nsIDOMCSS2Properties_GetMozBoxFlex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8486 : {
8487 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxFlex, vp);
8488 : }
8489 :
8490 : static JSBool
8491 0 : nsIDOMCSS2Properties_SetMozBoxFlex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8492 : {
8493 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxFlex, vp);
8494 : }
8495 :
8496 : static JSBool
8497 0 : nsIDOMCSS2Properties_GetMozBoxOrient(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8498 : {
8499 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxOrient, vp);
8500 : }
8501 :
8502 : static JSBool
8503 0 : nsIDOMCSS2Properties_SetMozBoxOrient(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8504 : {
8505 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxOrient, vp);
8506 : }
8507 :
8508 : static JSBool
8509 0 : nsIDOMCSS2Properties_GetMozBoxOrdinalGroup(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8510 : {
8511 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxOrdinalGroup, vp);
8512 : }
8513 :
8514 : static JSBool
8515 0 : nsIDOMCSS2Properties_SetMozBoxOrdinalGroup(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8516 : {
8517 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxOrdinalGroup, vp);
8518 : }
8519 :
8520 : static JSBool
8521 0 : nsIDOMCSS2Properties_GetMozBoxPack(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8522 : {
8523 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxPack, vp);
8524 : }
8525 :
8526 : static JSBool
8527 0 : nsIDOMCSS2Properties_SetMozBoxPack(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8528 : {
8529 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxPack, vp);
8530 : }
8531 :
8532 : static JSBool
8533 0 : nsIDOMCSS2Properties_GetMozBoxSizing(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8534 : {
8535 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxSizing, vp);
8536 : }
8537 :
8538 : static JSBool
8539 0 : nsIDOMCSS2Properties_SetMozBoxSizing(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8540 : {
8541 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxSizing, vp);
8542 : }
8543 :
8544 : static JSBool
8545 0 : nsIDOMCSS2Properties_GetMozColumnCount(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8546 : {
8547 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnCount, vp);
8548 : }
8549 :
8550 : static JSBool
8551 0 : nsIDOMCSS2Properties_SetMozColumnCount(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8552 : {
8553 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnCount, vp);
8554 : }
8555 :
8556 : static JSBool
8557 0 : nsIDOMCSS2Properties_GetMozColumnWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8558 : {
8559 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnWidth, vp);
8560 : }
8561 :
8562 : static JSBool
8563 0 : nsIDOMCSS2Properties_SetMozColumnWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8564 : {
8565 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnWidth, vp);
8566 : }
8567 :
8568 : static JSBool
8569 0 : nsIDOMCSS2Properties_GetMozColumnFill(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8570 : {
8571 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnFill, vp);
8572 : }
8573 :
8574 : static JSBool
8575 0 : nsIDOMCSS2Properties_SetMozColumnFill(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8576 : {
8577 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnFill, vp);
8578 : }
8579 :
8580 : static JSBool
8581 0 : nsIDOMCSS2Properties_GetMozColumnGap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8582 : {
8583 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnGap, vp);
8584 : }
8585 :
8586 : static JSBool
8587 0 : nsIDOMCSS2Properties_SetMozColumnGap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8588 : {
8589 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnGap, vp);
8590 : }
8591 :
8592 : static JSBool
8593 0 : nsIDOMCSS2Properties_GetMozFloatEdge(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8594 : {
8595 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozFloatEdge, vp);
8596 : }
8597 :
8598 : static JSBool
8599 0 : nsIDOMCSS2Properties_SetMozFloatEdge(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8600 : {
8601 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozFloatEdge, vp);
8602 : }
8603 :
8604 : static JSBool
8605 0 : nsIDOMCSS2Properties_GetMozFontFeatureSettings(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8606 : {
8607 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozFontFeatureSettings, vp);
8608 : }
8609 :
8610 : static JSBool
8611 0 : nsIDOMCSS2Properties_SetMozFontFeatureSettings(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8612 : {
8613 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozFontFeatureSettings, vp);
8614 : }
8615 :
8616 : static JSBool
8617 0 : nsIDOMCSS2Properties_GetMozFontLanguageOverride(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8618 : {
8619 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozFontLanguageOverride, vp);
8620 : }
8621 :
8622 : static JSBool
8623 0 : nsIDOMCSS2Properties_SetMozFontLanguageOverride(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8624 : {
8625 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozFontLanguageOverride, vp);
8626 : }
8627 :
8628 : static JSBool
8629 0 : nsIDOMCSS2Properties_GetMozForceBrokenImageIcon(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8630 : {
8631 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozForceBrokenImageIcon, vp);
8632 : }
8633 :
8634 : static JSBool
8635 0 : nsIDOMCSS2Properties_SetMozForceBrokenImageIcon(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8636 : {
8637 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozForceBrokenImageIcon, vp);
8638 : }
8639 :
8640 : static JSBool
8641 0 : nsIDOMCSS2Properties_GetMozImageRegion(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8642 : {
8643 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozImageRegion, vp);
8644 : }
8645 :
8646 : static JSBool
8647 0 : nsIDOMCSS2Properties_SetMozImageRegion(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8648 : {
8649 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozImageRegion, vp);
8650 : }
8651 :
8652 : static JSBool
8653 0 : nsIDOMCSS2Properties_GetMozMarginEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8654 : {
8655 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozMarginEnd, vp);
8656 : }
8657 :
8658 : static JSBool
8659 0 : nsIDOMCSS2Properties_SetMozMarginEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8660 : {
8661 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozMarginEnd, vp);
8662 : }
8663 :
8664 : static JSBool
8665 0 : nsIDOMCSS2Properties_GetMozMarginStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8666 : {
8667 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozMarginStart, vp);
8668 : }
8669 :
8670 : static JSBool
8671 0 : nsIDOMCSS2Properties_SetMozMarginStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8672 : {
8673 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozMarginStart, vp);
8674 : }
8675 :
8676 : static JSBool
8677 0 : nsIDOMCSS2Properties_GetMozOrient(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8678 : {
8679 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOrient, vp);
8680 : }
8681 :
8682 : static JSBool
8683 0 : nsIDOMCSS2Properties_SetMozOrient(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8684 : {
8685 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOrient, vp);
8686 : }
8687 :
8688 : static JSBool
8689 0 : nsIDOMCSS2Properties_GetMozOutlineRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8690 : {
8691 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOutlineRadius, vp);
8692 : }
8693 :
8694 : static JSBool
8695 0 : nsIDOMCSS2Properties_SetMozOutlineRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8696 : {
8697 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOutlineRadius, vp);
8698 : }
8699 :
8700 : static JSBool
8701 0 : nsIDOMCSS2Properties_GetMozOutlineRadiusTopleft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8702 : {
8703 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOutlineRadiusTopleft, vp);
8704 : }
8705 :
8706 : static JSBool
8707 0 : nsIDOMCSS2Properties_SetMozOutlineRadiusTopleft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8708 : {
8709 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOutlineRadiusTopleft, vp);
8710 : }
8711 :
8712 : static JSBool
8713 0 : nsIDOMCSS2Properties_GetMozOutlineRadiusTopright(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8714 : {
8715 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOutlineRadiusTopright, vp);
8716 : }
8717 :
8718 : static JSBool
8719 0 : nsIDOMCSS2Properties_SetMozOutlineRadiusTopright(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8720 : {
8721 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOutlineRadiusTopright, vp);
8722 : }
8723 :
8724 : static JSBool
8725 0 : nsIDOMCSS2Properties_GetMozOutlineRadiusBottomleft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8726 : {
8727 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOutlineRadiusBottomleft, vp);
8728 : }
8729 :
8730 : static JSBool
8731 0 : nsIDOMCSS2Properties_SetMozOutlineRadiusBottomleft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8732 : {
8733 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOutlineRadiusBottomleft, vp);
8734 : }
8735 :
8736 : static JSBool
8737 0 : nsIDOMCSS2Properties_GetMozOutlineRadiusBottomright(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8738 : {
8739 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOutlineRadiusBottomright, vp);
8740 : }
8741 :
8742 : static JSBool
8743 0 : nsIDOMCSS2Properties_SetMozOutlineRadiusBottomright(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8744 : {
8745 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOutlineRadiusBottomright, vp);
8746 : }
8747 :
8748 : static JSBool
8749 0 : nsIDOMCSS2Properties_GetMozPaddingEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8750 : {
8751 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozPaddingEnd, vp);
8752 : }
8753 :
8754 : static JSBool
8755 0 : nsIDOMCSS2Properties_SetMozPaddingEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8756 : {
8757 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozPaddingEnd, vp);
8758 : }
8759 :
8760 : static JSBool
8761 0 : nsIDOMCSS2Properties_GetMozPaddingStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8762 : {
8763 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozPaddingStart, vp);
8764 : }
8765 :
8766 : static JSBool
8767 0 : nsIDOMCSS2Properties_SetMozPaddingStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8768 : {
8769 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozPaddingStart, vp);
8770 : }
8771 :
8772 : static JSBool
8773 0 : nsIDOMCSS2Properties_GetMozUserFocus(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8774 : {
8775 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozUserFocus, vp);
8776 : }
8777 :
8778 : static JSBool
8779 0 : nsIDOMCSS2Properties_SetMozUserFocus(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8780 : {
8781 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozUserFocus, vp);
8782 : }
8783 :
8784 : static JSBool
8785 0 : nsIDOMCSS2Properties_GetMozUserInput(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8786 : {
8787 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozUserInput, vp);
8788 : }
8789 :
8790 : static JSBool
8791 0 : nsIDOMCSS2Properties_SetMozUserInput(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8792 : {
8793 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozUserInput, vp);
8794 : }
8795 :
8796 : static JSBool
8797 0 : nsIDOMCSS2Properties_GetMozUserModify(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8798 : {
8799 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozUserModify, vp);
8800 : }
8801 :
8802 : static JSBool
8803 0 : nsIDOMCSS2Properties_SetMozUserModify(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8804 : {
8805 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozUserModify, vp);
8806 : }
8807 :
8808 : static JSBool
8809 0 : nsIDOMCSS2Properties_GetMozUserSelect(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8810 : {
8811 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozUserSelect, vp);
8812 : }
8813 :
8814 : static JSBool
8815 0 : nsIDOMCSS2Properties_SetMozUserSelect(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8816 : {
8817 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozUserSelect, vp);
8818 : }
8819 :
8820 : static JSBool
8821 0 : nsIDOMCSS2Properties_GetOpacity(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8822 : {
8823 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Opacity, vp);
8824 : }
8825 :
8826 : static JSBool
8827 0 : nsIDOMCSS2Properties_SetOpacity(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8828 : {
8829 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Opacity, vp);
8830 : }
8831 :
8832 : static JSBool
8833 0 : nsIDOMCSS2Properties_GetOutlineOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8834 : {
8835 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OutlineOffset, vp);
8836 : }
8837 :
8838 : static JSBool
8839 0 : nsIDOMCSS2Properties_SetOutlineOffset(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8840 : {
8841 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OutlineOffset, vp);
8842 : }
8843 :
8844 : static JSBool
8845 0 : nsIDOMCSS2Properties_GetMozTextAlignLast(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8846 : {
8847 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextAlignLast, vp);
8848 : }
8849 :
8850 : static JSBool
8851 0 : nsIDOMCSS2Properties_SetMozTextAlignLast(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8852 : {
8853 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextAlignLast, vp);
8854 : }
8855 :
8856 : static JSBool
8857 0 : nsIDOMCSS2Properties_GetOverflowX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8858 : {
8859 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OverflowX, vp);
8860 : }
8861 :
8862 : static JSBool
8863 0 : nsIDOMCSS2Properties_SetOverflowX(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8864 : {
8865 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OverflowX, vp);
8866 : }
8867 :
8868 : static JSBool
8869 0 : nsIDOMCSS2Properties_GetOverflowY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8870 : {
8871 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OverflowY, vp);
8872 : }
8873 :
8874 : static JSBool
8875 0 : nsIDOMCSS2Properties_SetOverflowY(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8876 : {
8877 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OverflowY, vp);
8878 : }
8879 :
8880 : static JSBool
8881 0 : nsIDOMCSS2Properties_GetImeMode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8882 : {
8883 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ImeMode, vp);
8884 : }
8885 :
8886 : static JSBool
8887 0 : nsIDOMCSS2Properties_SetImeMode(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8888 : {
8889 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ImeMode, vp);
8890 : }
8891 :
8892 : static JSBool
8893 0 : nsIDOMCSS2Properties_GetMozBorderEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8894 : {
8895 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderEnd, vp);
8896 : }
8897 :
8898 : static JSBool
8899 0 : nsIDOMCSS2Properties_SetMozBorderEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8900 : {
8901 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderEnd, vp);
8902 : }
8903 :
8904 : static JSBool
8905 0 : nsIDOMCSS2Properties_GetMozBorderEndColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8906 : {
8907 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderEndColor, vp);
8908 : }
8909 :
8910 : static JSBool
8911 0 : nsIDOMCSS2Properties_SetMozBorderEndColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8912 : {
8913 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderEndColor, vp);
8914 : }
8915 :
8916 : static JSBool
8917 0 : nsIDOMCSS2Properties_GetMozBorderEndStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8918 : {
8919 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderEndStyle, vp);
8920 : }
8921 :
8922 : static JSBool
8923 0 : nsIDOMCSS2Properties_SetMozBorderEndStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8924 : {
8925 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderEndStyle, vp);
8926 : }
8927 :
8928 : static JSBool
8929 0 : nsIDOMCSS2Properties_GetMozBorderEndWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8930 : {
8931 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderEndWidth, vp);
8932 : }
8933 :
8934 : static JSBool
8935 0 : nsIDOMCSS2Properties_SetMozBorderEndWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8936 : {
8937 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderEndWidth, vp);
8938 : }
8939 :
8940 : static JSBool
8941 0 : nsIDOMCSS2Properties_GetMozBorderStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8942 : {
8943 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderStart, vp);
8944 : }
8945 :
8946 : static JSBool
8947 0 : nsIDOMCSS2Properties_SetMozBorderStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8948 : {
8949 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderStart, vp);
8950 : }
8951 :
8952 : static JSBool
8953 0 : nsIDOMCSS2Properties_GetMozBorderStartColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8954 : {
8955 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderStartColor, vp);
8956 : }
8957 :
8958 : static JSBool
8959 0 : nsIDOMCSS2Properties_SetMozBorderStartColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8960 : {
8961 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderStartColor, vp);
8962 : }
8963 :
8964 : static JSBool
8965 0 : nsIDOMCSS2Properties_GetMozBorderStartStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8966 : {
8967 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderStartStyle, vp);
8968 : }
8969 :
8970 : static JSBool
8971 0 : nsIDOMCSS2Properties_SetMozBorderStartStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8972 : {
8973 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderStartStyle, vp);
8974 : }
8975 :
8976 : static JSBool
8977 0 : nsIDOMCSS2Properties_GetMozBorderStartWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8978 : {
8979 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderStartWidth, vp);
8980 : }
8981 :
8982 : static JSBool
8983 0 : nsIDOMCSS2Properties_SetMozBorderStartWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8984 : {
8985 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderStartWidth, vp);
8986 : }
8987 :
8988 : static JSBool
8989 0 : nsIDOMCSS2Properties_GetMozStackSizing(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8990 : {
8991 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozStackSizing, vp);
8992 : }
8993 :
8994 : static JSBool
8995 0 : nsIDOMCSS2Properties_SetMozStackSizing(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8996 : {
8997 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozStackSizing, vp);
8998 : }
8999 :
9000 : static JSBool
9001 0 : nsIDOMCSS2Properties_GetMozBorderImage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9002 : {
9003 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderImage, vp);
9004 : }
9005 :
9006 : static JSBool
9007 0 : nsIDOMCSS2Properties_SetMozBorderImage(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9008 : {
9009 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderImage, vp);
9010 : }
9011 :
9012 : static JSBool
9013 0 : nsIDOMCSS2Properties_GetMozColumns(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9014 : {
9015 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumns, vp);
9016 : }
9017 :
9018 : static JSBool
9019 0 : nsIDOMCSS2Properties_SetMozColumns(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9020 : {
9021 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumns, vp);
9022 : }
9023 :
9024 : static JSBool
9025 0 : nsIDOMCSS2Properties_GetMozColumnRule(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9026 : {
9027 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnRule, vp);
9028 : }
9029 :
9030 : static JSBool
9031 0 : nsIDOMCSS2Properties_SetMozColumnRule(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9032 : {
9033 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnRule, vp);
9034 : }
9035 :
9036 : static JSBool
9037 0 : nsIDOMCSS2Properties_GetMozColumnRuleWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9038 : {
9039 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnRuleWidth, vp);
9040 : }
9041 :
9042 : static JSBool
9043 0 : nsIDOMCSS2Properties_SetMozColumnRuleWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9044 : {
9045 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnRuleWidth, vp);
9046 : }
9047 :
9048 : static JSBool
9049 0 : nsIDOMCSS2Properties_GetMozColumnRuleStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9050 : {
9051 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnRuleStyle, vp);
9052 : }
9053 :
9054 : static JSBool
9055 0 : nsIDOMCSS2Properties_SetMozColumnRuleStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9056 : {
9057 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnRuleStyle, vp);
9058 : }
9059 :
9060 : static JSBool
9061 0 : nsIDOMCSS2Properties_GetMozColumnRuleColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9062 : {
9063 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnRuleColor, vp);
9064 : }
9065 :
9066 : static JSBool
9067 0 : nsIDOMCSS2Properties_SetMozColumnRuleColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9068 : {
9069 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnRuleColor, vp);
9070 : }
9071 :
9072 : static JSBool
9073 0 : nsIDOMCSS2Properties_GetWordWrap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9074 : {
9075 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_WordWrap, vp);
9076 : }
9077 :
9078 : static JSBool
9079 0 : nsIDOMCSS2Properties_SetWordWrap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9080 : {
9081 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_WordWrap, vp);
9082 : }
9083 :
9084 : static JSBool
9085 0 : nsIDOMCSS2Properties_GetMozHyphens(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9086 : {
9087 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozHyphens, vp);
9088 : }
9089 :
9090 : static JSBool
9091 0 : nsIDOMCSS2Properties_SetMozHyphens(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9092 : {
9093 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozHyphens, vp);
9094 : }
9095 :
9096 : static JSBool
9097 0 : nsIDOMCSS2Properties_GetMozTransform(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9098 : {
9099 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransform, vp);
9100 : }
9101 :
9102 : static JSBool
9103 0 : nsIDOMCSS2Properties_SetMozTransform(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9104 : {
9105 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransform, vp);
9106 : }
9107 :
9108 : static JSBool
9109 0 : nsIDOMCSS2Properties_GetMozTransformOrigin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9110 : {
9111 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransformOrigin, vp);
9112 : }
9113 :
9114 : static JSBool
9115 0 : nsIDOMCSS2Properties_SetMozTransformOrigin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9116 : {
9117 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransformOrigin, vp);
9118 : }
9119 :
9120 : static JSBool
9121 0 : nsIDOMCSS2Properties_GetMozPerspective(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9122 : {
9123 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozPerspective, vp);
9124 : }
9125 :
9126 : static JSBool
9127 0 : nsIDOMCSS2Properties_SetMozPerspective(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9128 : {
9129 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozPerspective, vp);
9130 : }
9131 :
9132 : static JSBool
9133 0 : nsIDOMCSS2Properties_GetMozPerspectiveOrigin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9134 : {
9135 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozPerspectiveOrigin, vp);
9136 : }
9137 :
9138 : static JSBool
9139 0 : nsIDOMCSS2Properties_SetMozPerspectiveOrigin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9140 : {
9141 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozPerspectiveOrigin, vp);
9142 : }
9143 :
9144 : static JSBool
9145 0 : nsIDOMCSS2Properties_GetMozBackfaceVisibility(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9146 : {
9147 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBackfaceVisibility, vp);
9148 : }
9149 :
9150 : static JSBool
9151 0 : nsIDOMCSS2Properties_SetMozBackfaceVisibility(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9152 : {
9153 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBackfaceVisibility, vp);
9154 : }
9155 :
9156 : static JSBool
9157 0 : nsIDOMCSS2Properties_GetMozTransformStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9158 : {
9159 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransformStyle, vp);
9160 : }
9161 :
9162 : static JSBool
9163 0 : nsIDOMCSS2Properties_SetMozTransformStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9164 : {
9165 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransformStyle, vp);
9166 : }
9167 :
9168 : static JSBool
9169 0 : nsIDOMCSS2Properties_GetMozWindowShadow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9170 : {
9171 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozWindowShadow, vp);
9172 : }
9173 :
9174 : static JSBool
9175 0 : nsIDOMCSS2Properties_SetMozWindowShadow(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9176 : {
9177 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozWindowShadow, vp);
9178 : }
9179 :
9180 : static JSBool
9181 0 : nsIDOMCSS2Properties_GetBackgroundSize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9182 : {
9183 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundSize, vp);
9184 : }
9185 :
9186 : static JSBool
9187 0 : nsIDOMCSS2Properties_SetBackgroundSize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9188 : {
9189 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundSize, vp);
9190 : }
9191 :
9192 : static JSBool
9193 0 : nsIDOMCSS2Properties_GetMozTextBlink(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9194 : {
9195 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextBlink, vp);
9196 : }
9197 :
9198 : static JSBool
9199 0 : nsIDOMCSS2Properties_SetMozTextBlink(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9200 : {
9201 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextBlink, vp);
9202 : }
9203 :
9204 : static JSBool
9205 0 : nsIDOMCSS2Properties_GetMozTextDecorationColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9206 : {
9207 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextDecorationColor, vp);
9208 : }
9209 :
9210 : static JSBool
9211 0 : nsIDOMCSS2Properties_SetMozTextDecorationColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9212 : {
9213 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextDecorationColor, vp);
9214 : }
9215 :
9216 : static JSBool
9217 0 : nsIDOMCSS2Properties_GetMozTextDecorationLine(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9218 : {
9219 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextDecorationLine, vp);
9220 : }
9221 :
9222 : static JSBool
9223 0 : nsIDOMCSS2Properties_SetMozTextDecorationLine(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9224 : {
9225 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextDecorationLine, vp);
9226 : }
9227 :
9228 : static JSBool
9229 0 : nsIDOMCSS2Properties_GetMozTextDecorationStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9230 : {
9231 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextDecorationStyle, vp);
9232 : }
9233 :
9234 : static JSBool
9235 0 : nsIDOMCSS2Properties_SetMozTextDecorationStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9236 : {
9237 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextDecorationStyle, vp);
9238 : }
9239 :
9240 : static JSBool
9241 0 : nsIDOMCSS2Properties_GetMozTransitionProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9242 : {
9243 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransitionProperty, vp);
9244 : }
9245 :
9246 : static JSBool
9247 0 : nsIDOMCSS2Properties_SetMozTransitionProperty(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9248 : {
9249 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransitionProperty, vp);
9250 : }
9251 :
9252 : static JSBool
9253 0 : nsIDOMCSS2Properties_GetMozTransitionDuration(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9254 : {
9255 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransitionDuration, vp);
9256 : }
9257 :
9258 : static JSBool
9259 0 : nsIDOMCSS2Properties_SetMozTransitionDuration(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9260 : {
9261 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransitionDuration, vp);
9262 : }
9263 :
9264 : static JSBool
9265 0 : nsIDOMCSS2Properties_GetMozTransitionDelay(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9266 : {
9267 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransitionDelay, vp);
9268 : }
9269 :
9270 : static JSBool
9271 0 : nsIDOMCSS2Properties_SetMozTransitionDelay(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9272 : {
9273 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransitionDelay, vp);
9274 : }
9275 :
9276 : static JSBool
9277 0 : nsIDOMCSS2Properties_GetMozTransitionTimingFunction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9278 : {
9279 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransitionTimingFunction, vp);
9280 : }
9281 :
9282 : static JSBool
9283 0 : nsIDOMCSS2Properties_SetMozTransitionTimingFunction(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9284 : {
9285 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransitionTimingFunction, vp);
9286 : }
9287 :
9288 : static JSBool
9289 0 : nsIDOMCSS2Properties_GetMozTransition(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9290 : {
9291 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransition, vp);
9292 : }
9293 :
9294 : static JSBool
9295 0 : nsIDOMCSS2Properties_SetMozTransition(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9296 : {
9297 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransition, vp);
9298 : }
9299 :
9300 : static JSBool
9301 0 : nsIDOMCSS2Properties_GetPointerEvents(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9302 : {
9303 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PointerEvents, vp);
9304 : }
9305 :
9306 : static JSBool
9307 0 : nsIDOMCSS2Properties_SetPointerEvents(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9308 : {
9309 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PointerEvents, vp);
9310 : }
9311 :
9312 : static JSBool
9313 0 : nsIDOMCSS2Properties_GetMozTabSize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9314 : {
9315 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTabSize, vp);
9316 : }
9317 :
9318 : static JSBool
9319 0 : nsIDOMCSS2Properties_SetMozTabSize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9320 : {
9321 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTabSize, vp);
9322 : }
9323 :
9324 : static JSBool
9325 0 : nsIDOMCSS2Properties_GetResize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9326 : {
9327 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Resize, vp);
9328 : }
9329 :
9330 : static JSBool
9331 0 : nsIDOMCSS2Properties_SetResize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9332 : {
9333 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Resize, vp);
9334 : }
9335 :
9336 : static JSBool
9337 0 : nsIDOMCSS2Properties_GetMozAnimationName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9338 : {
9339 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationName, vp);
9340 : }
9341 :
9342 : static JSBool
9343 0 : nsIDOMCSS2Properties_SetMozAnimationName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9344 : {
9345 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationName, vp);
9346 : }
9347 :
9348 : static JSBool
9349 0 : nsIDOMCSS2Properties_GetMozAnimationDuration(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9350 : {
9351 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationDuration, vp);
9352 : }
9353 :
9354 : static JSBool
9355 0 : nsIDOMCSS2Properties_SetMozAnimationDuration(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9356 : {
9357 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationDuration, vp);
9358 : }
9359 :
9360 : static JSBool
9361 0 : nsIDOMCSS2Properties_GetMozAnimationDelay(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9362 : {
9363 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationDelay, vp);
9364 : }
9365 :
9366 : static JSBool
9367 0 : nsIDOMCSS2Properties_SetMozAnimationDelay(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9368 : {
9369 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationDelay, vp);
9370 : }
9371 :
9372 : static JSBool
9373 0 : nsIDOMCSS2Properties_GetMozAnimationTimingFunction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9374 : {
9375 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationTimingFunction, vp);
9376 : }
9377 :
9378 : static JSBool
9379 0 : nsIDOMCSS2Properties_SetMozAnimationTimingFunction(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9380 : {
9381 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationTimingFunction, vp);
9382 : }
9383 :
9384 : static JSBool
9385 0 : nsIDOMCSS2Properties_GetMozAnimationDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9386 : {
9387 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationDirection, vp);
9388 : }
9389 :
9390 : static JSBool
9391 0 : nsIDOMCSS2Properties_SetMozAnimationDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9392 : {
9393 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationDirection, vp);
9394 : }
9395 :
9396 : static JSBool
9397 0 : nsIDOMCSS2Properties_GetMozAnimationFillMode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9398 : {
9399 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationFillMode, vp);
9400 : }
9401 :
9402 : static JSBool
9403 0 : nsIDOMCSS2Properties_SetMozAnimationFillMode(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9404 : {
9405 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationFillMode, vp);
9406 : }
9407 :
9408 : static JSBool
9409 0 : nsIDOMCSS2Properties_GetMozAnimationIterationCount(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9410 : {
9411 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationIterationCount, vp);
9412 : }
9413 :
9414 : static JSBool
9415 0 : nsIDOMCSS2Properties_SetMozAnimationIterationCount(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9416 : {
9417 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationIterationCount, vp);
9418 : }
9419 :
9420 : static JSBool
9421 0 : nsIDOMCSS2Properties_GetMozAnimationPlayState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9422 : {
9423 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationPlayState, vp);
9424 : }
9425 :
9426 : static JSBool
9427 0 : nsIDOMCSS2Properties_SetMozAnimationPlayState(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9428 : {
9429 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationPlayState, vp);
9430 : }
9431 :
9432 : static JSBool
9433 0 : nsIDOMCSS2Properties_GetMozAnimation(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9434 : {
9435 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimation, vp);
9436 : }
9437 :
9438 : static JSBool
9439 0 : nsIDOMCSS2Properties_SetMozAnimation(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9440 : {
9441 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimation, vp);
9442 : }
9443 :
9444 : static JSBool
9445 0 : nsIDOMCSS2Properties_GetMozTextSizeAdjust(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9446 : {
9447 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextSizeAdjust, vp);
9448 : }
9449 :
9450 : static JSBool
9451 0 : nsIDOMCSS2Properties_SetMozTextSizeAdjust(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9452 : {
9453 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextSizeAdjust, vp);
9454 : }
9455 :
9456 : static JSBool
9457 0 : nsIDOMCSS2Properties_GetMozBorderImageSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9458 : {
9459 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderImageSource, vp);
9460 : }
9461 :
9462 : static JSBool
9463 0 : nsIDOMCSS2Properties_SetMozBorderImageSource(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9464 : {
9465 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderImageSource, vp);
9466 : }
9467 :
9468 : static JSBool
9469 0 : nsIDOMCSS2Properties_GetMozBorderImageSlice(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9470 : {
9471 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderImageSlice, vp);
9472 : }
9473 :
9474 : static JSBool
9475 0 : nsIDOMCSS2Properties_SetMozBorderImageSlice(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9476 : {
9477 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderImageSlice, vp);
9478 : }
9479 :
9480 : static JSBool
9481 0 : nsIDOMCSS2Properties_GetMozBorderImageWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9482 : {
9483 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderImageWidth, vp);
9484 : }
9485 :
9486 : static JSBool
9487 0 : nsIDOMCSS2Properties_SetMozBorderImageWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9488 : {
9489 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderImageWidth, vp);
9490 : }
9491 :
9492 : static JSBool
9493 0 : nsIDOMCSS2Properties_GetMozBorderImageOutset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9494 : {
9495 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderImageOutset, vp);
9496 : }
9497 :
9498 : static JSBool
9499 0 : nsIDOMCSS2Properties_SetMozBorderImageOutset(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9500 : {
9501 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderImageOutset, vp);
9502 : }
9503 :
9504 : static JSBool
9505 0 : nsIDOMCSS2Properties_GetMozBorderImageRepeat(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9506 : {
9507 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderImageRepeat, vp);
9508 : }
9509 :
9510 : static JSBool
9511 0 : nsIDOMCSS2Properties_SetMozBorderImageRepeat(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9512 : {
9513 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderImageRepeat, vp);
9514 : }
9515 :
9516 : // === interface nsIDOMRect
9517 :
9518 : static JSBool
9519 0 : nsIDOMRect_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9520 : {
9521 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9522 0 : JSObject *callee = nsnull;
9523 : nsIDOMRect *self;
9524 0 : xpc_qsSelfRef selfref;
9525 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9526 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9527 0 : return JS_FALSE;
9528 : nsresult rv;
9529 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9530 0 : rv = self->GetTop(getter_AddRefs(result));
9531 0 : if (NS_FAILED(rv))
9532 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9533 0 : if (!result) {
9534 0 : *vp = JSVAL_NULL;
9535 0 : return JS_TRUE;
9536 : }
9537 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9538 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9539 0 : return JS_TRUE;
9540 : }
9541 : // After this point do not use 'result'!
9542 0 : qsObjectHelper helper(result, cache);
9543 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9544 : }
9545 :
9546 : static JSBool
9547 0 : nsIDOMRect_GetRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9548 : {
9549 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9550 0 : JSObject *callee = nsnull;
9551 : nsIDOMRect *self;
9552 0 : xpc_qsSelfRef selfref;
9553 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9554 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9555 0 : return JS_FALSE;
9556 : nsresult rv;
9557 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9558 0 : rv = self->GetRight(getter_AddRefs(result));
9559 0 : if (NS_FAILED(rv))
9560 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9561 0 : if (!result) {
9562 0 : *vp = JSVAL_NULL;
9563 0 : return JS_TRUE;
9564 : }
9565 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9566 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9567 0 : return JS_TRUE;
9568 : }
9569 : // After this point do not use 'result'!
9570 0 : qsObjectHelper helper(result, cache);
9571 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9572 : }
9573 :
9574 : static JSBool
9575 0 : nsIDOMRect_GetBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9576 : {
9577 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9578 0 : JSObject *callee = nsnull;
9579 : nsIDOMRect *self;
9580 0 : xpc_qsSelfRef selfref;
9581 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9582 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9583 0 : return JS_FALSE;
9584 : nsresult rv;
9585 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9586 0 : rv = self->GetBottom(getter_AddRefs(result));
9587 0 : if (NS_FAILED(rv))
9588 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9589 0 : if (!result) {
9590 0 : *vp = JSVAL_NULL;
9591 0 : return JS_TRUE;
9592 : }
9593 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9594 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9595 0 : return JS_TRUE;
9596 : }
9597 : // After this point do not use 'result'!
9598 0 : qsObjectHelper helper(result, cache);
9599 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9600 : }
9601 :
9602 : static JSBool
9603 0 : nsIDOMRect_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9604 : {
9605 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9606 0 : JSObject *callee = nsnull;
9607 : nsIDOMRect *self;
9608 0 : xpc_qsSelfRef selfref;
9609 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9610 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9611 0 : return JS_FALSE;
9612 : nsresult rv;
9613 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9614 0 : rv = self->GetLeft(getter_AddRefs(result));
9615 0 : if (NS_FAILED(rv))
9616 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9617 0 : if (!result) {
9618 0 : *vp = JSVAL_NULL;
9619 0 : return JS_TRUE;
9620 : }
9621 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9622 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9623 0 : return JS_TRUE;
9624 : }
9625 : // After this point do not use 'result'!
9626 0 : qsObjectHelper helper(result, cache);
9627 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9628 : }
9629 :
9630 : // === interface nsIDOMCSSStyleDeclaration
9631 :
9632 : static JSBool
9633 0 : nsIDOMCSSStyleDeclaration_GetCssText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9634 : {
9635 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9636 : nsIDOMCSSStyleDeclaration *self;
9637 0 : xpc_qsSelfRef selfref;
9638 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
9639 0 : return JS_FALSE;
9640 : nsresult rv;
9641 0 : nsString result;
9642 0 : rv = self->GetCssText(result);
9643 0 : if (NS_FAILED(rv))
9644 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9645 0 : return xpc::StringToJsval(cx, result, vp);
9646 : }
9647 :
9648 : static JSBool
9649 0 : nsIDOMCSSStyleDeclaration_SetCssText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9650 : {
9651 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9652 : nsIDOMCSSStyleDeclaration *self;
9653 0 : xpc_qsSelfRef selfref;
9654 0 : JS::AutoValueRooter tvr(cx);
9655 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
9656 0 : return JS_FALSE;
9657 : xpc_qsDOMString arg0(cx, *vp, vp,
9658 : xpc_qsDOMString::eDefaultNullBehavior,
9659 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9660 0 : if (!arg0.IsValid())
9661 0 : return JS_FALSE;
9662 : nsresult rv;
9663 0 : rv = self->SetCssText(arg0);
9664 0 : if (NS_FAILED(rv))
9665 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
9666 0 : return JS_TRUE;
9667 : }
9668 :
9669 : static JSBool
9670 0 : nsIDOMCSSStyleDeclaration_GetPropertyValue(JSContext *cx, unsigned argc, jsval *vp)
9671 : {
9672 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9673 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9674 0 : if (!obj)
9675 0 : return JS_FALSE;
9676 : nsIDOMCSSStyleDeclaration *self;
9677 0 : xpc_qsSelfRef selfref;
9678 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9679 0 : return JS_FALSE;
9680 0 : if (argc < 1)
9681 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9682 0 : jsval *argv = JS_ARGV(cx, vp);
9683 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9684 : xpc_qsDOMString::eDefaultNullBehavior,
9685 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9686 0 : if (!arg0.IsValid())
9687 0 : return JS_FALSE;
9688 : nsresult rv;
9689 0 : nsString result;
9690 0 : rv = self->GetPropertyValue(arg0, result);
9691 0 : if (NS_FAILED(rv))
9692 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9693 0 : return xpc::StringToJsval(cx, result, vp);
9694 : }
9695 :
9696 : static JSBool
9697 0 : nsIDOMCSSStyleDeclaration_GetPropertyCSSValue(JSContext *cx, unsigned argc, jsval *vp)
9698 : {
9699 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9700 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9701 0 : if (!obj)
9702 0 : return JS_FALSE;
9703 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
9704 : nsIDOMCSSStyleDeclaration *self;
9705 0 : xpc_qsSelfRef selfref;
9706 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9707 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
9708 0 : return JS_FALSE;
9709 0 : if (argc < 1)
9710 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9711 0 : jsval *argv = JS_ARGV(cx, vp);
9712 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9713 : xpc_qsDOMString::eDefaultNullBehavior,
9714 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9715 0 : if (!arg0.IsValid())
9716 0 : return JS_FALSE;
9717 : nsresult rv;
9718 0 : nsCOMPtr<nsIDOMCSSValue> result;
9719 0 : rv = self->GetPropertyCSSValue(arg0, getter_AddRefs(result));
9720 0 : if (NS_FAILED(rv))
9721 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9722 0 : if (!result) {
9723 0 : *vp = JSVAL_NULL;
9724 0 : return JS_TRUE;
9725 : }
9726 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9727 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9728 0 : return JS_TRUE;
9729 : }
9730 : // After this point do not use 'result'!
9731 0 : qsObjectHelper helper(result, cache);
9732 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSValue), &interfaces[k_nsIDOMCSSValue], vp);
9733 : }
9734 :
9735 : static JSBool
9736 0 : nsIDOMCSSStyleDeclaration_RemoveProperty(JSContext *cx, unsigned argc, jsval *vp)
9737 : {
9738 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9739 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9740 0 : if (!obj)
9741 0 : return JS_FALSE;
9742 : nsIDOMCSSStyleDeclaration *self;
9743 0 : xpc_qsSelfRef selfref;
9744 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9745 0 : return JS_FALSE;
9746 0 : if (argc < 1)
9747 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9748 0 : jsval *argv = JS_ARGV(cx, vp);
9749 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9750 : xpc_qsDOMString::eDefaultNullBehavior,
9751 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9752 0 : if (!arg0.IsValid())
9753 0 : return JS_FALSE;
9754 : nsresult rv;
9755 0 : nsString result;
9756 0 : rv = self->RemoveProperty(arg0, result);
9757 0 : if (NS_FAILED(rv))
9758 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9759 0 : return xpc::StringToJsval(cx, result, vp);
9760 : }
9761 :
9762 : static JSBool
9763 0 : nsIDOMCSSStyleDeclaration_GetPropertyPriority(JSContext *cx, unsigned argc, jsval *vp)
9764 : {
9765 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9766 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9767 0 : if (!obj)
9768 0 : return JS_FALSE;
9769 : nsIDOMCSSStyleDeclaration *self;
9770 0 : xpc_qsSelfRef selfref;
9771 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9772 0 : return JS_FALSE;
9773 0 : if (argc < 1)
9774 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9775 0 : jsval *argv = JS_ARGV(cx, vp);
9776 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9777 : xpc_qsDOMString::eDefaultNullBehavior,
9778 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9779 0 : if (!arg0.IsValid())
9780 0 : return JS_FALSE;
9781 : nsresult rv;
9782 0 : nsString result;
9783 0 : rv = self->GetPropertyPriority(arg0, result);
9784 0 : if (NS_FAILED(rv))
9785 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9786 0 : return xpc::StringToJsval(cx, result, vp);
9787 : }
9788 :
9789 : static JSBool
9790 0 : nsIDOMCSSStyleDeclaration_SetProperty(JSContext *cx, unsigned argc, jsval *vp)
9791 : {
9792 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9793 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9794 0 : if (!obj)
9795 0 : return JS_FALSE;
9796 : nsIDOMCSSStyleDeclaration *self;
9797 0 : xpc_qsSelfRef selfref;
9798 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9799 0 : return JS_FALSE;
9800 0 : if (argc < 2)
9801 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9802 0 : jsval *argv = JS_ARGV(cx, vp);
9803 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9804 : xpc_qsDOMString::eDefaultNullBehavior,
9805 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9806 0 : if (!arg0.IsValid())
9807 0 : return JS_FALSE;
9808 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
9809 : xpc_qsDOMString::eDefaultNullBehavior,
9810 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9811 0 : if (!arg1.IsValid())
9812 0 : return JS_FALSE;
9813 : xpc_qsDOMString arg2(cx, (2 < argc ? argv[2] : JSVAL_NULL), (2 < argc ? &argv[2] : NULL),
9814 : xpc_qsDOMString::eDefaultNullBehavior,
9815 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9816 0 : if (!arg2.IsValid())
9817 0 : return JS_FALSE;
9818 : nsresult rv;
9819 0 : rv = self->SetProperty(arg0, arg1, arg2);
9820 0 : if (NS_FAILED(rv))
9821 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9822 0 : *vp = JSVAL_VOID;
9823 0 : return JS_TRUE;
9824 : }
9825 :
9826 : static JSBool
9827 0 : nsIDOMCSSStyleDeclaration_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9828 : {
9829 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9830 : nsIDOMCSSStyleDeclaration *self;
9831 0 : xpc_qsSelfRef selfref;
9832 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
9833 0 : return JS_FALSE;
9834 : nsresult rv;
9835 : PRUint32 result;
9836 0 : rv = self->GetLength(&result);
9837 0 : if (NS_FAILED(rv))
9838 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9839 0 : *vp = UINT_TO_JSVAL(result);
9840 0 : return JS_TRUE;
9841 : }
9842 :
9843 : static JSBool
9844 0 : nsIDOMCSSStyleDeclaration_Item(JSContext *cx, unsigned argc, jsval *vp)
9845 : {
9846 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9847 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9848 0 : if (!obj)
9849 0 : return JS_FALSE;
9850 : nsIDOMCSSStyleDeclaration *self;
9851 0 : xpc_qsSelfRef selfref;
9852 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9853 0 : return JS_FALSE;
9854 0 : if (argc < 1)
9855 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9856 0 : jsval *argv = JS_ARGV(cx, vp);
9857 : uint32_t arg0;
9858 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
9859 0 : return JS_FALSE;
9860 : nsresult rv;
9861 0 : nsString result;
9862 0 : rv = self->Item(arg0, result);
9863 0 : if (NS_FAILED(rv))
9864 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9865 0 : return xpc::StringToJsval(cx, result, vp);
9866 : }
9867 :
9868 : static JSBool
9869 0 : nsIDOMCSSStyleDeclaration_GetParentRule(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9870 : {
9871 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9872 0 : JSObject *callee = nsnull;
9873 : nsIDOMCSSStyleDeclaration *self;
9874 0 : xpc_qsSelfRef selfref;
9875 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9876 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9877 0 : return JS_FALSE;
9878 : nsresult rv;
9879 0 : nsCOMPtr<nsIDOMCSSRule> result;
9880 0 : rv = self->GetParentRule(getter_AddRefs(result));
9881 0 : if (NS_FAILED(rv))
9882 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9883 0 : if (!result) {
9884 0 : *vp = JSVAL_NULL;
9885 0 : return JS_TRUE;
9886 : }
9887 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9888 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9889 0 : return JS_TRUE;
9890 : }
9891 : // After this point do not use 'result'!
9892 0 : qsObjectHelper helper(result, cache);
9893 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSRule), &interfaces[k_nsIDOMCSSRule], vp);
9894 : }
9895 :
9896 : // === interface nsIDOMEventTarget
9897 :
9898 : static JSBool
9899 1077 : nsIDOMEventTarget_AddEventListener(JSContext *cx, unsigned argc, jsval *vp)
9900 : {
9901 1077 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9902 1077 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9903 1077 : if (!obj)
9904 0 : return JS_FALSE;
9905 : nsIDOMEventTarget *self;
9906 2154 : xpc_qsSelfRef selfref;
9907 1077 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9908 0 : return JS_FALSE;
9909 1077 : if (argc < 2)
9910 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9911 1077 : jsval *argv = JS_ARGV(cx, vp);
9912 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9913 : xpc_qsDOMString::eDefaultNullBehavior,
9914 2154 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9915 1077 : if (!arg0.IsValid())
9916 0 : return JS_FALSE;
9917 : nsresult rv;
9918 : nsIDOMEventListener *arg1;
9919 2154 : xpc_qsSelfRef arg1ref;
9920 1077 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
9921 1077 : if (NS_FAILED(rv)) {
9922 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
9923 0 : return JS_FALSE;
9924 : }
9925 : JSBool arg2;
9926 1077 : JS_ValueToBoolean(cx, (2 < argc ? argv[2] : JSVAL_NULL), &arg2);
9927 : JSBool arg3;
9928 1077 : JS_ValueToBoolean(cx, (3 < argc ? argv[3] : JSVAL_NULL), &arg3);
9929 1077 : rv = self->AddEventListener(arg0, arg1, arg2, arg3, NS_MIN<PRUint32>(argc, 4) - 2);
9930 1077 : if (NS_FAILED(rv))
9931 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9932 1077 : *vp = JSVAL_VOID;
9933 1077 : return JS_TRUE;
9934 : }
9935 :
9936 : static JSBool
9937 2 : nsIDOMEventTarget_RemoveEventListener(JSContext *cx, unsigned argc, jsval *vp)
9938 : {
9939 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9940 2 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9941 2 : if (!obj)
9942 0 : return JS_FALSE;
9943 : nsIDOMEventTarget *self;
9944 4 : xpc_qsSelfRef selfref;
9945 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9946 0 : return JS_FALSE;
9947 2 : if (argc < 2)
9948 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9949 2 : jsval *argv = JS_ARGV(cx, vp);
9950 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9951 : xpc_qsDOMString::eDefaultNullBehavior,
9952 4 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9953 2 : if (!arg0.IsValid())
9954 0 : return JS_FALSE;
9955 : nsresult rv;
9956 : nsIDOMEventListener *arg1;
9957 4 : xpc_qsSelfRef arg1ref;
9958 2 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
9959 2 : if (NS_FAILED(rv)) {
9960 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
9961 0 : return JS_FALSE;
9962 : }
9963 : JSBool arg2;
9964 2 : JS_ValueToBoolean(cx, (2 < argc ? argv[2] : JSVAL_NULL), &arg2);
9965 2 : rv = self->RemoveEventListener(arg0, arg1, arg2);
9966 2 : if (NS_FAILED(rv))
9967 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9968 2 : *vp = JSVAL_VOID;
9969 2 : return JS_TRUE;
9970 : }
9971 :
9972 : static JSBool
9973 0 : nsIDOMEventTarget_DispatchEvent(JSContext *cx, unsigned argc, jsval *vp)
9974 : {
9975 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9976 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9977 0 : if (!obj)
9978 0 : return JS_FALSE;
9979 : nsIDOMEventTarget *self;
9980 0 : xpc_qsSelfRef selfref;
9981 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9982 0 : return JS_FALSE;
9983 0 : if (argc < 1)
9984 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9985 0 : jsval *argv = JS_ARGV(cx, vp);
9986 : nsresult rv;
9987 : nsIDOMEvent *arg0;
9988 0 : xpc_qsSelfRef arg0ref;
9989 0 : rv = xpc_qsUnwrapArg<nsIDOMEvent>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
9990 0 : if (NS_FAILED(rv)) {
9991 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
9992 0 : return JS_FALSE;
9993 : }
9994 : bool result;
9995 0 : rv = self->DispatchEvent(arg0, &result);
9996 0 : if (NS_FAILED(rv))
9997 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9998 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
9999 0 : return JS_TRUE;
10000 : }
10001 :
10002 : // === interface nsIDOMEvent
10003 :
10004 : static JSBool
10005 148 : nsIDOMEvent_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10006 : {
10007 148 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10008 : nsIDOMEvent *self;
10009 296 : xpc_qsSelfRef selfref;
10010 148 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10011 0 : return JS_FALSE;
10012 : nsresult rv;
10013 296 : nsString result;
10014 148 : rv = self->GetType(result);
10015 148 : if (NS_FAILED(rv))
10016 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10017 148 : return xpc::StringToJsval(cx, result, vp);
10018 : }
10019 :
10020 : static JSBool
10021 3717 : nsIDOMEvent_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10022 : {
10023 3717 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10024 3717 : JSObject *callee = nsnull;
10025 : nsIDOMEvent *self;
10026 7434 : xpc_qsSelfRef selfref;
10027 7434 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10028 3717 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10029 0 : return JS_FALSE;
10030 : nsresult rv;
10031 7434 : nsCOMPtr<nsIDOMEventTarget> result;
10032 3717 : rv = self->GetTarget(getter_AddRefs(result));
10033 3717 : if (NS_FAILED(rv))
10034 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10035 3717 : if (!result) {
10036 0 : *vp = JSVAL_NULL;
10037 0 : return JS_TRUE;
10038 : }
10039 3717 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10040 3717 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10041 0 : return JS_TRUE;
10042 : }
10043 : // After this point do not use 'result'!
10044 7434 : qsObjectHelper helper(result, cache);
10045 3717 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
10046 : }
10047 :
10048 : static JSBool
10049 0 : nsIDOMEvent_GetCurrentTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10050 : {
10051 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10052 0 : JSObject *callee = nsnull;
10053 : nsIDOMEvent *self;
10054 0 : xpc_qsSelfRef selfref;
10055 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10056 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10057 0 : return JS_FALSE;
10058 : nsresult rv;
10059 0 : nsCOMPtr<nsIDOMEventTarget> result;
10060 0 : rv = self->GetCurrentTarget(getter_AddRefs(result));
10061 0 : if (NS_FAILED(rv))
10062 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10063 0 : if (!result) {
10064 0 : *vp = JSVAL_NULL;
10065 0 : return JS_TRUE;
10066 : }
10067 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10068 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10069 0 : return JS_TRUE;
10070 : }
10071 : // After this point do not use 'result'!
10072 0 : qsObjectHelper helper(result, cache);
10073 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
10074 : }
10075 :
10076 : static JSBool
10077 0 : nsIDOMEvent_GetEventPhase(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10078 : {
10079 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10080 : nsIDOMEvent *self;
10081 0 : xpc_qsSelfRef selfref;
10082 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10083 0 : return JS_FALSE;
10084 : nsresult rv;
10085 : PRUint16 result;
10086 0 : rv = self->GetEventPhase(&result);
10087 0 : if (NS_FAILED(rv))
10088 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10089 0 : *vp = INT_TO_JSVAL((int32_t) result);
10090 0 : return JS_TRUE;
10091 : }
10092 :
10093 : static JSBool
10094 0 : nsIDOMEvent_GetBubbles(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10095 : {
10096 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10097 : nsIDOMEvent *self;
10098 0 : xpc_qsSelfRef selfref;
10099 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10100 0 : return JS_FALSE;
10101 : nsresult rv;
10102 : bool result;
10103 0 : rv = self->GetBubbles(&result);
10104 0 : if (NS_FAILED(rv))
10105 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10106 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10107 0 : return JS_TRUE;
10108 : }
10109 :
10110 : static JSBool
10111 0 : nsIDOMEvent_GetCancelable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10112 : {
10113 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10114 : nsIDOMEvent *self;
10115 0 : xpc_qsSelfRef selfref;
10116 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10117 0 : return JS_FALSE;
10118 : nsresult rv;
10119 : bool result;
10120 0 : rv = self->GetCancelable(&result);
10121 0 : if (NS_FAILED(rv))
10122 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10123 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10124 0 : return JS_TRUE;
10125 : }
10126 :
10127 : static JSBool
10128 0 : nsIDOMEvent_GetTimeStamp(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10129 : {
10130 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10131 : nsIDOMEvent *self;
10132 0 : xpc_qsSelfRef selfref;
10133 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10134 0 : return JS_FALSE;
10135 : nsresult rv;
10136 : DOMTimeStamp result;
10137 0 : rv = self->GetTimeStamp(&result);
10138 0 : if (NS_FAILED(rv))
10139 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10140 0 : return xpc_qsUint64ToJsval(cx, result, vp);
10141 : }
10142 :
10143 : static JSBool
10144 10 : nsIDOMEvent_StopPropagation(JSContext *cx, unsigned argc, jsval *vp)
10145 : {
10146 10 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10147 10 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10148 10 : if (!obj)
10149 0 : return JS_FALSE;
10150 : nsIDOMEvent *self;
10151 20 : xpc_qsSelfRef selfref;
10152 10 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10153 0 : return JS_FALSE;
10154 : nsresult rv;
10155 10 : rv = self->StopPropagation();
10156 10 : if (NS_FAILED(rv))
10157 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10158 10 : *vp = JSVAL_VOID;
10159 10 : return JS_TRUE;
10160 : }
10161 :
10162 : static JSBool
10163 32 : nsIDOMEvent_PreventDefault(JSContext *cx, unsigned argc, jsval *vp)
10164 : {
10165 32 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10166 32 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10167 32 : if (!obj)
10168 0 : return JS_FALSE;
10169 : nsIDOMEvent *self;
10170 64 : xpc_qsSelfRef selfref;
10171 32 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10172 0 : return JS_FALSE;
10173 : nsresult rv;
10174 32 : rv = self->PreventDefault();
10175 32 : if (NS_FAILED(rv))
10176 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10177 32 : *vp = JSVAL_VOID;
10178 32 : return JS_TRUE;
10179 : }
10180 :
10181 : static JSBool
10182 0 : nsIDOMEvent_InitEvent(JSContext *cx, unsigned argc, jsval *vp)
10183 : {
10184 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10185 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10186 0 : if (!obj)
10187 0 : return JS_FALSE;
10188 : nsIDOMEvent *self;
10189 0 : xpc_qsSelfRef selfref;
10190 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10191 0 : return JS_FALSE;
10192 0 : if (argc < 3)
10193 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10194 0 : jsval *argv = JS_ARGV(cx, vp);
10195 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10196 : xpc_qsDOMString::eDefaultNullBehavior,
10197 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10198 0 : if (!arg0.IsValid())
10199 0 : return JS_FALSE;
10200 : JSBool arg1;
10201 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10202 : JSBool arg2;
10203 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10204 : nsresult rv;
10205 0 : rv = self->InitEvent(arg0, arg1, arg2);
10206 0 : if (NS_FAILED(rv))
10207 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10208 0 : *vp = JSVAL_VOID;
10209 0 : return JS_TRUE;
10210 : }
10211 :
10212 : static JSBool
10213 0 : nsIDOMEvent_GetDefaultPrevented(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10214 : {
10215 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10216 : nsIDOMEvent *self;
10217 0 : xpc_qsSelfRef selfref;
10218 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10219 0 : return JS_FALSE;
10220 : nsresult rv;
10221 : bool result;
10222 0 : rv = self->GetDefaultPrevented(&result);
10223 0 : if (NS_FAILED(rv))
10224 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10225 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10226 0 : return JS_TRUE;
10227 : }
10228 :
10229 : static JSBool
10230 0 : nsIDOMEvent_StopImmediatePropagation(JSContext *cx, unsigned argc, jsval *vp)
10231 : {
10232 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10233 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10234 0 : if (!obj)
10235 0 : return JS_FALSE;
10236 : nsIDOMEvent *self;
10237 0 : xpc_qsSelfRef selfref;
10238 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10239 0 : return JS_FALSE;
10240 : nsresult rv;
10241 0 : rv = self->StopImmediatePropagation();
10242 0 : if (NS_FAILED(rv))
10243 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10244 0 : *vp = JSVAL_VOID;
10245 0 : return JS_TRUE;
10246 : }
10247 :
10248 : // === interface nsIDOMMouseEvent
10249 :
10250 : static JSBool
10251 0 : nsIDOMMouseEvent_GetScreenX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10252 : {
10253 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10254 : nsIDOMMouseEvent *self;
10255 0 : xpc_qsSelfRef selfref;
10256 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10257 0 : return JS_FALSE;
10258 : nsresult rv;
10259 : PRInt32 result;
10260 0 : rv = self->GetScreenX(&result);
10261 0 : if (NS_FAILED(rv))
10262 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10263 0 : *vp = INT_TO_JSVAL(result);
10264 0 : return JS_TRUE;
10265 : }
10266 :
10267 : static JSBool
10268 0 : nsIDOMMouseEvent_GetScreenY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10269 : {
10270 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10271 : nsIDOMMouseEvent *self;
10272 0 : xpc_qsSelfRef selfref;
10273 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10274 0 : return JS_FALSE;
10275 : nsresult rv;
10276 : PRInt32 result;
10277 0 : rv = self->GetScreenY(&result);
10278 0 : if (NS_FAILED(rv))
10279 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10280 0 : *vp = INT_TO_JSVAL(result);
10281 0 : return JS_TRUE;
10282 : }
10283 :
10284 : static JSBool
10285 0 : nsIDOMMouseEvent_GetClientX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10286 : {
10287 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10288 : nsIDOMMouseEvent *self;
10289 0 : xpc_qsSelfRef selfref;
10290 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10291 0 : return JS_FALSE;
10292 : nsresult rv;
10293 : PRInt32 result;
10294 0 : rv = self->GetClientX(&result);
10295 0 : if (NS_FAILED(rv))
10296 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10297 0 : *vp = INT_TO_JSVAL(result);
10298 0 : return JS_TRUE;
10299 : }
10300 :
10301 : static JSBool
10302 0 : nsIDOMMouseEvent_GetClientY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10303 : {
10304 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10305 : nsIDOMMouseEvent *self;
10306 0 : xpc_qsSelfRef selfref;
10307 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10308 0 : return JS_FALSE;
10309 : nsresult rv;
10310 : PRInt32 result;
10311 0 : rv = self->GetClientY(&result);
10312 0 : if (NS_FAILED(rv))
10313 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10314 0 : *vp = INT_TO_JSVAL(result);
10315 0 : return JS_TRUE;
10316 : }
10317 :
10318 : static JSBool
10319 0 : nsIDOMMouseEvent_GetCtrlKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10320 : {
10321 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10322 : nsIDOMMouseEvent *self;
10323 0 : xpc_qsSelfRef selfref;
10324 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10325 0 : return JS_FALSE;
10326 : nsresult rv;
10327 : bool result;
10328 0 : rv = self->GetCtrlKey(&result);
10329 0 : if (NS_FAILED(rv))
10330 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10331 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10332 0 : return JS_TRUE;
10333 : }
10334 :
10335 : static JSBool
10336 0 : nsIDOMMouseEvent_GetShiftKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10337 : {
10338 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10339 : nsIDOMMouseEvent *self;
10340 0 : xpc_qsSelfRef selfref;
10341 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10342 0 : return JS_FALSE;
10343 : nsresult rv;
10344 : bool result;
10345 0 : rv = self->GetShiftKey(&result);
10346 0 : if (NS_FAILED(rv))
10347 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10348 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10349 0 : return JS_TRUE;
10350 : }
10351 :
10352 : static JSBool
10353 0 : nsIDOMMouseEvent_GetAltKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10354 : {
10355 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10356 : nsIDOMMouseEvent *self;
10357 0 : xpc_qsSelfRef selfref;
10358 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10359 0 : return JS_FALSE;
10360 : nsresult rv;
10361 : bool result;
10362 0 : rv = self->GetAltKey(&result);
10363 0 : if (NS_FAILED(rv))
10364 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10365 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10366 0 : return JS_TRUE;
10367 : }
10368 :
10369 : static JSBool
10370 0 : nsIDOMMouseEvent_GetMetaKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10371 : {
10372 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10373 : nsIDOMMouseEvent *self;
10374 0 : xpc_qsSelfRef selfref;
10375 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10376 0 : return JS_FALSE;
10377 : nsresult rv;
10378 : bool result;
10379 0 : rv = self->GetMetaKey(&result);
10380 0 : if (NS_FAILED(rv))
10381 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10382 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10383 0 : return JS_TRUE;
10384 : }
10385 :
10386 : static JSBool
10387 0 : nsIDOMMouseEvent_GetButton(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10388 : {
10389 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10390 : nsIDOMMouseEvent *self;
10391 0 : xpc_qsSelfRef selfref;
10392 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10393 0 : return JS_FALSE;
10394 : nsresult rv;
10395 : PRUint16 result;
10396 0 : rv = self->GetButton(&result);
10397 0 : if (NS_FAILED(rv))
10398 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10399 0 : *vp = INT_TO_JSVAL((int32_t) result);
10400 0 : return JS_TRUE;
10401 : }
10402 :
10403 : static JSBool
10404 0 : nsIDOMMouseEvent_GetRelatedTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10405 : {
10406 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10407 0 : JSObject *callee = nsnull;
10408 : nsIDOMMouseEvent *self;
10409 0 : xpc_qsSelfRef selfref;
10410 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10411 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10412 0 : return JS_FALSE;
10413 : nsresult rv;
10414 0 : nsCOMPtr<nsIDOMEventTarget> result;
10415 0 : rv = self->GetRelatedTarget(getter_AddRefs(result));
10416 0 : if (NS_FAILED(rv))
10417 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10418 0 : if (!result) {
10419 0 : *vp = JSVAL_NULL;
10420 0 : return JS_TRUE;
10421 : }
10422 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10423 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10424 0 : return JS_TRUE;
10425 : }
10426 : // After this point do not use 'result'!
10427 0 : qsObjectHelper helper(result, cache);
10428 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
10429 : }
10430 :
10431 : static JSBool
10432 0 : nsIDOMMouseEvent_InitMouseEvent(JSContext *cx, unsigned argc, jsval *vp)
10433 : {
10434 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10435 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10436 0 : if (!obj)
10437 0 : return JS_FALSE;
10438 : nsIDOMMouseEvent *self;
10439 0 : xpc_qsSelfRef selfref;
10440 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10441 0 : return JS_FALSE;
10442 0 : if (argc < 15)
10443 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10444 0 : jsval *argv = JS_ARGV(cx, vp);
10445 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10446 : xpc_qsDOMString::eDefaultNullBehavior,
10447 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10448 0 : if (!arg0.IsValid())
10449 0 : return JS_FALSE;
10450 : JSBool arg1;
10451 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10452 : JSBool arg2;
10453 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10454 : nsresult rv;
10455 : nsIDOMWindow *arg3;
10456 0 : xpc_qsSelfRef arg3ref;
10457 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10458 0 : if (NS_FAILED(rv)) {
10459 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10460 0 : return JS_FALSE;
10461 : }
10462 : int32_t arg4;
10463 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
10464 0 : return JS_FALSE;
10465 : int32_t arg5;
10466 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
10467 0 : return JS_FALSE;
10468 : int32_t arg6;
10469 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
10470 0 : return JS_FALSE;
10471 : int32_t arg7;
10472 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
10473 0 : return JS_FALSE;
10474 : int32_t arg8;
10475 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
10476 0 : return JS_FALSE;
10477 : JSBool arg9;
10478 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
10479 : JSBool arg10;
10480 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
10481 : JSBool arg11;
10482 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
10483 : JSBool arg12;
10484 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
10485 : uint32_t arg13_u32;
10486 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
10487 0 : return JS_FALSE;
10488 0 : uint16_t arg13 = (uint16_t) arg13_u32;
10489 : nsIDOMEventTarget *arg14;
10490 0 : xpc_qsSelfRef arg14ref;
10491 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
10492 0 : if (NS_FAILED(rv)) {
10493 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
10494 0 : return JS_FALSE;
10495 : }
10496 0 : rv = self->InitMouseEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14);
10497 0 : if (NS_FAILED(rv))
10498 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10499 0 : *vp = JSVAL_VOID;
10500 0 : return JS_TRUE;
10501 : }
10502 :
10503 : static JSBool
10504 0 : nsIDOMMouseEvent_GetMozPressure(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10505 : {
10506 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10507 : nsIDOMMouseEvent *self;
10508 0 : xpc_qsSelfRef selfref;
10509 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10510 0 : return JS_FALSE;
10511 : nsresult rv;
10512 : float result;
10513 0 : rv = self->GetMozPressure(&result);
10514 0 : if (NS_FAILED(rv))
10515 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10516 0 : return JS_NewNumberValue(cx, result, vp);
10517 : }
10518 :
10519 : static JSBool
10520 0 : nsIDOMMouseEvent_GetMozInputSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10521 : {
10522 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10523 : nsIDOMMouseEvent *self;
10524 0 : xpc_qsSelfRef selfref;
10525 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10526 0 : return JS_FALSE;
10527 : nsresult rv;
10528 : PRUint16 result;
10529 0 : rv = self->GetMozInputSource(&result);
10530 0 : if (NS_FAILED(rv))
10531 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10532 0 : *vp = INT_TO_JSVAL((int32_t) result);
10533 0 : return JS_TRUE;
10534 : }
10535 :
10536 : static JSBool
10537 0 : nsIDOMMouseEvent_InitNSMouseEvent(JSContext *cx, unsigned argc, jsval *vp)
10538 : {
10539 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10540 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10541 0 : if (!obj)
10542 0 : return JS_FALSE;
10543 : nsIDOMMouseEvent *self;
10544 0 : xpc_qsSelfRef selfref;
10545 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10546 0 : return JS_FALSE;
10547 0 : if (argc < 17)
10548 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10549 0 : jsval *argv = JS_ARGV(cx, vp);
10550 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10551 : xpc_qsDOMString::eDefaultNullBehavior,
10552 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10553 0 : if (!arg0.IsValid())
10554 0 : return JS_FALSE;
10555 : JSBool arg1;
10556 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10557 : JSBool arg2;
10558 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10559 : nsresult rv;
10560 : nsIDOMWindow *arg3;
10561 0 : xpc_qsSelfRef arg3ref;
10562 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10563 0 : if (NS_FAILED(rv)) {
10564 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10565 0 : return JS_FALSE;
10566 : }
10567 : int32_t arg4;
10568 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
10569 0 : return JS_FALSE;
10570 : int32_t arg5;
10571 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
10572 0 : return JS_FALSE;
10573 : int32_t arg6;
10574 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
10575 0 : return JS_FALSE;
10576 : int32_t arg7;
10577 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
10578 0 : return JS_FALSE;
10579 : int32_t arg8;
10580 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
10581 0 : return JS_FALSE;
10582 : JSBool arg9;
10583 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
10584 : JSBool arg10;
10585 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
10586 : JSBool arg11;
10587 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
10588 : JSBool arg12;
10589 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
10590 : uint32_t arg13_u32;
10591 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
10592 0 : return JS_FALSE;
10593 0 : uint16_t arg13 = (uint16_t) arg13_u32;
10594 : nsIDOMEventTarget *arg14;
10595 0 : xpc_qsSelfRef arg14ref;
10596 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
10597 0 : if (NS_FAILED(rv)) {
10598 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
10599 0 : return JS_FALSE;
10600 : }
10601 : double arg15_dbl;
10602 0 : if (!JS_ValueToNumber(cx, argv[15], &arg15_dbl))
10603 0 : return JS_FALSE;
10604 0 : float arg15 = (float) arg15_dbl;
10605 : uint32_t arg16_u32;
10606 0 : if (!JS_ValueToECMAUint32(cx, argv[16], &arg16_u32))
10607 0 : return JS_FALSE;
10608 0 : uint16_t arg16 = (uint16_t) arg16_u32;
10609 0 : rv = self->InitNSMouseEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16);
10610 0 : if (NS_FAILED(rv))
10611 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10612 0 : *vp = JSVAL_VOID;
10613 0 : return JS_TRUE;
10614 : }
10615 :
10616 : // === interface nsIDOMKeyEvent
10617 :
10618 : static JSBool
10619 0 : nsIDOMKeyEvent_GetCharCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10620 : {
10621 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10622 : nsIDOMKeyEvent *self;
10623 0 : xpc_qsSelfRef selfref;
10624 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10625 0 : return JS_FALSE;
10626 : nsresult rv;
10627 : PRUint32 result;
10628 0 : rv = self->GetCharCode(&result);
10629 0 : if (NS_FAILED(rv))
10630 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10631 0 : *vp = UINT_TO_JSVAL(result);
10632 0 : return JS_TRUE;
10633 : }
10634 :
10635 : static JSBool
10636 0 : nsIDOMKeyEvent_GetKeyCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10637 : {
10638 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10639 : nsIDOMKeyEvent *self;
10640 0 : xpc_qsSelfRef selfref;
10641 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10642 0 : return JS_FALSE;
10643 : nsresult rv;
10644 : PRUint32 result;
10645 0 : rv = self->GetKeyCode(&result);
10646 0 : if (NS_FAILED(rv))
10647 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10648 0 : *vp = UINT_TO_JSVAL(result);
10649 0 : return JS_TRUE;
10650 : }
10651 :
10652 : static JSBool
10653 0 : nsIDOMKeyEvent_GetAltKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10654 : {
10655 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10656 : nsIDOMKeyEvent *self;
10657 0 : xpc_qsSelfRef selfref;
10658 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10659 0 : return JS_FALSE;
10660 : nsresult rv;
10661 : bool result;
10662 0 : rv = self->GetAltKey(&result);
10663 0 : if (NS_FAILED(rv))
10664 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10665 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10666 0 : return JS_TRUE;
10667 : }
10668 :
10669 : static JSBool
10670 0 : nsIDOMKeyEvent_GetCtrlKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10671 : {
10672 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10673 : nsIDOMKeyEvent *self;
10674 0 : xpc_qsSelfRef selfref;
10675 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10676 0 : return JS_FALSE;
10677 : nsresult rv;
10678 : bool result;
10679 0 : rv = self->GetCtrlKey(&result);
10680 0 : if (NS_FAILED(rv))
10681 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10682 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10683 0 : return JS_TRUE;
10684 : }
10685 :
10686 : static JSBool
10687 0 : nsIDOMKeyEvent_GetShiftKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10688 : {
10689 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10690 : nsIDOMKeyEvent *self;
10691 0 : xpc_qsSelfRef selfref;
10692 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10693 0 : return JS_FALSE;
10694 : nsresult rv;
10695 : bool result;
10696 0 : rv = self->GetShiftKey(&result);
10697 0 : if (NS_FAILED(rv))
10698 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10699 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10700 0 : return JS_TRUE;
10701 : }
10702 :
10703 : static JSBool
10704 0 : nsIDOMKeyEvent_GetMetaKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10705 : {
10706 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10707 : nsIDOMKeyEvent *self;
10708 0 : xpc_qsSelfRef selfref;
10709 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10710 0 : return JS_FALSE;
10711 : nsresult rv;
10712 : bool result;
10713 0 : rv = self->GetMetaKey(&result);
10714 0 : if (NS_FAILED(rv))
10715 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10716 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10717 0 : return JS_TRUE;
10718 : }
10719 :
10720 : static JSBool
10721 0 : nsIDOMKeyEvent_InitKeyEvent(JSContext *cx, unsigned argc, jsval *vp)
10722 : {
10723 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10724 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10725 0 : if (!obj)
10726 0 : return JS_FALSE;
10727 : nsIDOMKeyEvent *self;
10728 0 : xpc_qsSelfRef selfref;
10729 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10730 0 : return JS_FALSE;
10731 0 : if (argc < 10)
10732 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10733 0 : jsval *argv = JS_ARGV(cx, vp);
10734 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10735 : xpc_qsDOMString::eDefaultNullBehavior,
10736 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10737 0 : if (!arg0.IsValid())
10738 0 : return JS_FALSE;
10739 : JSBool arg1;
10740 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10741 : JSBool arg2;
10742 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10743 : nsresult rv;
10744 : nsIDOMWindow *arg3;
10745 0 : xpc_qsSelfRef arg3ref;
10746 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10747 0 : if (NS_FAILED(rv)) {
10748 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10749 0 : return JS_FALSE;
10750 : }
10751 : JSBool arg4;
10752 0 : JS_ValueToBoolean(cx, argv[4], &arg4);
10753 : JSBool arg5;
10754 0 : JS_ValueToBoolean(cx, argv[5], &arg5);
10755 : JSBool arg6;
10756 0 : JS_ValueToBoolean(cx, argv[6], &arg6);
10757 : JSBool arg7;
10758 0 : JS_ValueToBoolean(cx, argv[7], &arg7);
10759 : uint32_t arg8;
10760 0 : if (!JS_ValueToECMAUint32(cx, argv[8], &arg8))
10761 0 : return JS_FALSE;
10762 : uint32_t arg9;
10763 0 : if (!JS_ValueToECMAUint32(cx, argv[9], &arg9))
10764 0 : return JS_FALSE;
10765 0 : rv = self->InitKeyEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
10766 0 : if (NS_FAILED(rv))
10767 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10768 0 : *vp = JSVAL_VOID;
10769 0 : return JS_TRUE;
10770 : }
10771 :
10772 : // === interface nsIDOMMutationEvent
10773 :
10774 : static JSBool
10775 0 : nsIDOMMutationEvent_GetRelatedNode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10776 : {
10777 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10778 0 : JSObject *callee = nsnull;
10779 : nsIDOMMutationEvent *self;
10780 0 : xpc_qsSelfRef selfref;
10781 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10782 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10783 0 : return JS_FALSE;
10784 : nsresult rv;
10785 0 : nsCOMPtr<nsIDOMNode> result;
10786 0 : rv = self->GetRelatedNode(getter_AddRefs(result));
10787 0 : if (NS_FAILED(rv))
10788 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10789 0 : if (!result) {
10790 0 : *vp = JSVAL_NULL;
10791 0 : return JS_TRUE;
10792 : }
10793 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10794 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10795 0 : return JS_TRUE;
10796 : }
10797 : // After this point do not use 'result'!
10798 0 : qsObjectHelper helper(result, cache);
10799 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
10800 : }
10801 :
10802 : static JSBool
10803 0 : nsIDOMMutationEvent_GetPrevValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10804 : {
10805 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10806 : nsIDOMMutationEvent *self;
10807 0 : xpc_qsSelfRef selfref;
10808 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10809 0 : return JS_FALSE;
10810 : nsresult rv;
10811 0 : nsString result;
10812 0 : rv = self->GetPrevValue(result);
10813 0 : if (NS_FAILED(rv))
10814 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10815 0 : return xpc::StringToJsval(cx, result, vp);
10816 : }
10817 :
10818 : static JSBool
10819 0 : nsIDOMMutationEvent_GetNewValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10820 : {
10821 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10822 : nsIDOMMutationEvent *self;
10823 0 : xpc_qsSelfRef selfref;
10824 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10825 0 : return JS_FALSE;
10826 : nsresult rv;
10827 0 : nsString result;
10828 0 : rv = self->GetNewValue(result);
10829 0 : if (NS_FAILED(rv))
10830 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10831 0 : return xpc::StringToJsval(cx, result, vp);
10832 : }
10833 :
10834 : static JSBool
10835 0 : nsIDOMMutationEvent_GetAttrName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10836 : {
10837 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10838 : nsIDOMMutationEvent *self;
10839 0 : xpc_qsSelfRef selfref;
10840 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10841 0 : return JS_FALSE;
10842 : nsresult rv;
10843 0 : nsString result;
10844 0 : rv = self->GetAttrName(result);
10845 0 : if (NS_FAILED(rv))
10846 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10847 0 : return xpc::StringToJsval(cx, result, vp);
10848 : }
10849 :
10850 : static JSBool
10851 0 : nsIDOMMutationEvent_GetAttrChange(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10852 : {
10853 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10854 : nsIDOMMutationEvent *self;
10855 0 : xpc_qsSelfRef selfref;
10856 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10857 0 : return JS_FALSE;
10858 : nsresult rv;
10859 : PRUint16 result;
10860 0 : rv = self->GetAttrChange(&result);
10861 0 : if (NS_FAILED(rv))
10862 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10863 0 : *vp = INT_TO_JSVAL((int32_t) result);
10864 0 : return JS_TRUE;
10865 : }
10866 :
10867 : static JSBool
10868 0 : nsIDOMMutationEvent_InitMutationEvent(JSContext *cx, unsigned argc, jsval *vp)
10869 : {
10870 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10871 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10872 0 : if (!obj)
10873 0 : return JS_FALSE;
10874 : nsIDOMMutationEvent *self;
10875 0 : xpc_qsSelfRef selfref;
10876 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10877 0 : return JS_FALSE;
10878 0 : if (argc < 8)
10879 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10880 0 : jsval *argv = JS_ARGV(cx, vp);
10881 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10882 : xpc_qsDOMString::eDefaultNullBehavior,
10883 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10884 0 : if (!arg0.IsValid())
10885 0 : return JS_FALSE;
10886 : JSBool arg1;
10887 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10888 : JSBool arg2;
10889 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10890 : nsresult rv;
10891 : nsIDOMNode *arg3;
10892 0 : xpc_qsSelfRef arg3ref;
10893 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10894 0 : if (NS_FAILED(rv)) {
10895 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10896 0 : return JS_FALSE;
10897 : }
10898 0 : xpc_qsDOMString arg4(cx, argv[4], &argv[4],
10899 : xpc_qsDOMString::eDefaultNullBehavior,
10900 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10901 0 : if (!arg4.IsValid())
10902 0 : return JS_FALSE;
10903 0 : xpc_qsDOMString arg5(cx, argv[5], &argv[5],
10904 : xpc_qsDOMString::eDefaultNullBehavior,
10905 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10906 0 : if (!arg5.IsValid())
10907 0 : return JS_FALSE;
10908 0 : xpc_qsDOMString arg6(cx, argv[6], &argv[6],
10909 : xpc_qsDOMString::eDefaultNullBehavior,
10910 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10911 0 : if (!arg6.IsValid())
10912 0 : return JS_FALSE;
10913 : uint32_t arg7_u32;
10914 0 : if (!JS_ValueToECMAUint32(cx, argv[7], &arg7_u32))
10915 0 : return JS_FALSE;
10916 0 : uint16_t arg7 = (uint16_t) arg7_u32;
10917 0 : rv = self->InitMutationEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
10918 0 : if (NS_FAILED(rv))
10919 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10920 0 : *vp = JSVAL_VOID;
10921 0 : return JS_TRUE;
10922 : }
10923 :
10924 : // === interface nsIDOMDragEvent
10925 :
10926 : static JSBool
10927 0 : nsIDOMDragEvent_GetDataTransfer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10928 : {
10929 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10930 0 : JSObject *callee = nsnull;
10931 : nsIDOMDragEvent *self;
10932 0 : xpc_qsSelfRef selfref;
10933 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10934 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10935 0 : return JS_FALSE;
10936 : nsresult rv;
10937 0 : nsCOMPtr<nsIDOMDataTransfer> result;
10938 0 : rv = self->GetDataTransfer(getter_AddRefs(result));
10939 0 : if (NS_FAILED(rv))
10940 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10941 0 : if (!result) {
10942 0 : *vp = JSVAL_NULL;
10943 0 : return JS_TRUE;
10944 : }
10945 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10946 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10947 0 : return JS_TRUE;
10948 : }
10949 : // After this point do not use 'result'!
10950 0 : qsObjectHelper helper(result, cache);
10951 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDataTransfer), &interfaces[k_nsIDOMDataTransfer], vp);
10952 : }
10953 :
10954 : static JSBool
10955 0 : nsIDOMDragEvent_InitDragEvent(JSContext *cx, unsigned argc, jsval *vp)
10956 : {
10957 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10958 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10959 0 : if (!obj)
10960 0 : return JS_FALSE;
10961 : nsIDOMDragEvent *self;
10962 0 : xpc_qsSelfRef selfref;
10963 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10964 0 : return JS_FALSE;
10965 0 : if (argc < 16)
10966 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10967 0 : jsval *argv = JS_ARGV(cx, vp);
10968 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10969 : xpc_qsDOMString::eDefaultNullBehavior,
10970 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10971 0 : if (!arg0.IsValid())
10972 0 : return JS_FALSE;
10973 : JSBool arg1;
10974 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10975 : JSBool arg2;
10976 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10977 : nsresult rv;
10978 : nsIDOMWindow *arg3;
10979 0 : xpc_qsSelfRef arg3ref;
10980 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10981 0 : if (NS_FAILED(rv)) {
10982 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10983 0 : return JS_FALSE;
10984 : }
10985 : int32_t arg4;
10986 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
10987 0 : return JS_FALSE;
10988 : int32_t arg5;
10989 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
10990 0 : return JS_FALSE;
10991 : int32_t arg6;
10992 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
10993 0 : return JS_FALSE;
10994 : int32_t arg7;
10995 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
10996 0 : return JS_FALSE;
10997 : int32_t arg8;
10998 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
10999 0 : return JS_FALSE;
11000 : JSBool arg9;
11001 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
11002 : JSBool arg10;
11003 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
11004 : JSBool arg11;
11005 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
11006 : JSBool arg12;
11007 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
11008 : uint32_t arg13_u32;
11009 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
11010 0 : return JS_FALSE;
11011 0 : uint16_t arg13 = (uint16_t) arg13_u32;
11012 : nsIDOMEventTarget *arg14;
11013 0 : xpc_qsSelfRef arg14ref;
11014 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
11015 0 : if (NS_FAILED(rv)) {
11016 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
11017 0 : return JS_FALSE;
11018 : }
11019 : nsIDOMDataTransfer *arg15;
11020 0 : xpc_qsSelfRef arg15ref;
11021 0 : rv = xpc_qsUnwrapArg<nsIDOMDataTransfer>(cx, argv[15], &arg15, &arg15ref.ptr, &argv[15]);
11022 0 : if (NS_FAILED(rv)) {
11023 0 : xpc_qsThrowBadArg(cx, rv, vp, 15);
11024 0 : return JS_FALSE;
11025 : }
11026 0 : rv = self->InitDragEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15);
11027 0 : if (NS_FAILED(rv))
11028 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11029 0 : *vp = JSVAL_VOID;
11030 0 : return JS_TRUE;
11031 : }
11032 :
11033 : // === interface nsIDOMScrollAreaEvent
11034 :
11035 : static JSBool
11036 0 : nsIDOMScrollAreaEvent_GetX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11037 : {
11038 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11039 : nsIDOMScrollAreaEvent *self;
11040 0 : xpc_qsSelfRef selfref;
11041 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11042 0 : return JS_FALSE;
11043 : nsresult rv;
11044 : float result;
11045 0 : rv = self->GetX(&result);
11046 0 : if (NS_FAILED(rv))
11047 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11048 0 : return JS_NewNumberValue(cx, result, vp);
11049 : }
11050 :
11051 : static JSBool
11052 0 : nsIDOMScrollAreaEvent_GetY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11053 : {
11054 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11055 : nsIDOMScrollAreaEvent *self;
11056 0 : xpc_qsSelfRef selfref;
11057 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11058 0 : return JS_FALSE;
11059 : nsresult rv;
11060 : float result;
11061 0 : rv = self->GetY(&result);
11062 0 : if (NS_FAILED(rv))
11063 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11064 0 : return JS_NewNumberValue(cx, result, vp);
11065 : }
11066 :
11067 : static JSBool
11068 0 : nsIDOMScrollAreaEvent_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11069 : {
11070 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11071 : nsIDOMScrollAreaEvent *self;
11072 0 : xpc_qsSelfRef selfref;
11073 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11074 0 : return JS_FALSE;
11075 : nsresult rv;
11076 : float result;
11077 0 : rv = self->GetWidth(&result);
11078 0 : if (NS_FAILED(rv))
11079 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11080 0 : return JS_NewNumberValue(cx, result, vp);
11081 : }
11082 :
11083 : static JSBool
11084 0 : nsIDOMScrollAreaEvent_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11085 : {
11086 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11087 : nsIDOMScrollAreaEvent *self;
11088 0 : xpc_qsSelfRef selfref;
11089 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11090 0 : return JS_FALSE;
11091 : nsresult rv;
11092 : float result;
11093 0 : rv = self->GetHeight(&result);
11094 0 : if (NS_FAILED(rv))
11095 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11096 0 : return JS_NewNumberValue(cx, result, vp);
11097 : }
11098 :
11099 : static JSBool
11100 0 : nsIDOMScrollAreaEvent_InitScrollAreaEvent(JSContext *cx, unsigned argc, jsval *vp)
11101 : {
11102 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11103 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11104 0 : if (!obj)
11105 0 : return JS_FALSE;
11106 : nsIDOMScrollAreaEvent *self;
11107 0 : xpc_qsSelfRef selfref;
11108 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11109 0 : return JS_FALSE;
11110 0 : if (argc < 9)
11111 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11112 0 : jsval *argv = JS_ARGV(cx, vp);
11113 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
11114 : xpc_qsDOMString::eDefaultNullBehavior,
11115 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11116 0 : if (!arg0.IsValid())
11117 0 : return JS_FALSE;
11118 : JSBool arg1;
11119 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
11120 : JSBool arg2;
11121 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
11122 : nsresult rv;
11123 : nsIDOMWindow *arg3;
11124 0 : xpc_qsSelfRef arg3ref;
11125 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
11126 0 : if (NS_FAILED(rv)) {
11127 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
11128 0 : return JS_FALSE;
11129 : }
11130 : int32_t arg4;
11131 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
11132 0 : return JS_FALSE;
11133 : double arg5_dbl;
11134 0 : if (!JS_ValueToNumber(cx, argv[5], &arg5_dbl))
11135 0 : return JS_FALSE;
11136 0 : float arg5 = (float) arg5_dbl;
11137 : double arg6_dbl;
11138 0 : if (!JS_ValueToNumber(cx, argv[6], &arg6_dbl))
11139 0 : return JS_FALSE;
11140 0 : float arg6 = (float) arg6_dbl;
11141 : double arg7_dbl;
11142 0 : if (!JS_ValueToNumber(cx, argv[7], &arg7_dbl))
11143 0 : return JS_FALSE;
11144 0 : float arg7 = (float) arg7_dbl;
11145 : double arg8_dbl;
11146 0 : if (!JS_ValueToNumber(cx, argv[8], &arg8_dbl))
11147 0 : return JS_FALSE;
11148 0 : float arg8 = (float) arg8_dbl;
11149 0 : rv = self->InitScrollAreaEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
11150 0 : if (NS_FAILED(rv))
11151 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11152 0 : *vp = JSVAL_VOID;
11153 0 : return JS_TRUE;
11154 : }
11155 :
11156 : // === interface nsIDOMNotifyPaintEvent
11157 :
11158 : static JSBool
11159 0 : nsIDOMNotifyPaintEvent_GetClientRects(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11160 : {
11161 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11162 0 : JSObject *callee = nsnull;
11163 : nsIDOMNotifyPaintEvent *self;
11164 0 : xpc_qsSelfRef selfref;
11165 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11166 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11167 0 : return JS_FALSE;
11168 : nsresult rv;
11169 0 : nsCOMPtr<nsIDOMClientRectList> result;
11170 0 : rv = self->GetClientRects(getter_AddRefs(result));
11171 0 : if (NS_FAILED(rv))
11172 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11173 0 : if (!result) {
11174 0 : *vp = JSVAL_NULL;
11175 0 : return JS_TRUE;
11176 : }
11177 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11178 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11179 0 : return JS_TRUE;
11180 : }
11181 : // After this point do not use 'result'!
11182 0 : qsObjectHelper helper(result, cache);
11183 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRectList), &interfaces[k_nsIDOMClientRectList], vp);
11184 : }
11185 :
11186 : static JSBool
11187 0 : nsIDOMNotifyPaintEvent_GetBoundingClientRect(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11188 : {
11189 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11190 0 : JSObject *callee = nsnull;
11191 : nsIDOMNotifyPaintEvent *self;
11192 0 : xpc_qsSelfRef selfref;
11193 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11194 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11195 0 : return JS_FALSE;
11196 : nsresult rv;
11197 0 : nsCOMPtr<nsIDOMClientRect> result;
11198 0 : rv = self->GetBoundingClientRect(getter_AddRefs(result));
11199 0 : if (NS_FAILED(rv))
11200 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11201 0 : if (!result) {
11202 0 : *vp = JSVAL_NULL;
11203 0 : return JS_TRUE;
11204 : }
11205 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11206 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11207 0 : return JS_TRUE;
11208 : }
11209 : // After this point do not use 'result'!
11210 0 : qsObjectHelper helper(result, cache);
11211 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
11212 : }
11213 :
11214 : static JSBool
11215 0 : nsIDOMNotifyPaintEvent_GetPaintRequests(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11216 : {
11217 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11218 0 : JSObject *callee = nsnull;
11219 : nsIDOMNotifyPaintEvent *self;
11220 0 : xpc_qsSelfRef selfref;
11221 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11222 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11223 0 : return JS_FALSE;
11224 : nsresult rv;
11225 0 : nsCOMPtr<nsIDOMPaintRequestList> result;
11226 0 : rv = self->GetPaintRequests(getter_AddRefs(result));
11227 0 : if (NS_FAILED(rv))
11228 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11229 0 : if (!result) {
11230 0 : *vp = JSVAL_NULL;
11231 0 : return JS_TRUE;
11232 : }
11233 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11234 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11235 0 : return JS_TRUE;
11236 : }
11237 : // After this point do not use 'result'!
11238 0 : qsObjectHelper helper(result, cache);
11239 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMPaintRequestList), &interfaces[k_nsIDOMPaintRequestList], vp);
11240 : }
11241 :
11242 : // === interface nsIDOMMessageEvent
11243 :
11244 : static JSBool
11245 0 : nsIDOMMessageEvent_GetData(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11246 : {
11247 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11248 : nsIDOMMessageEvent *self;
11249 0 : xpc_qsSelfRef selfref;
11250 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11251 0 : return JS_FALSE;
11252 : nsresult rv;
11253 0 : rv = self->GetData(cx, vp);
11254 0 : if (NS_FAILED(rv))
11255 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11256 0 : return JS_TRUE;
11257 : }
11258 :
11259 : static JSBool
11260 0 : nsIDOMMessageEvent_GetOrigin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11261 : {
11262 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11263 : nsIDOMMessageEvent *self;
11264 0 : xpc_qsSelfRef selfref;
11265 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11266 0 : return JS_FALSE;
11267 : nsresult rv;
11268 0 : nsString result;
11269 0 : rv = self->GetOrigin(result);
11270 0 : if (NS_FAILED(rv))
11271 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11272 0 : return xpc::StringToJsval(cx, result, vp);
11273 : }
11274 :
11275 : static JSBool
11276 0 : nsIDOMMessageEvent_GetLastEventId(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11277 : {
11278 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11279 : nsIDOMMessageEvent *self;
11280 0 : xpc_qsSelfRef selfref;
11281 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11282 0 : return JS_FALSE;
11283 : nsresult rv;
11284 0 : nsString result;
11285 0 : rv = self->GetLastEventId(result);
11286 0 : if (NS_FAILED(rv))
11287 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11288 0 : return xpc::StringToJsval(cx, result, vp);
11289 : }
11290 :
11291 : static JSBool
11292 0 : nsIDOMMessageEvent_GetSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11293 : {
11294 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11295 0 : JSObject *callee = nsnull;
11296 : nsIDOMMessageEvent *self;
11297 0 : xpc_qsSelfRef selfref;
11298 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11299 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11300 0 : return JS_FALSE;
11301 : nsresult rv;
11302 0 : nsCOMPtr<nsIDOMWindow> result;
11303 0 : rv = self->GetSource(getter_AddRefs(result));
11304 0 : if (NS_FAILED(rv))
11305 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11306 0 : if (!result) {
11307 0 : *vp = JSVAL_NULL;
11308 0 : return JS_TRUE;
11309 : }
11310 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11311 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11312 0 : return JS_TRUE;
11313 : }
11314 : // After this point do not use 'result'!
11315 0 : qsObjectHelper helper(result, cache);
11316 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
11317 : }
11318 :
11319 : static JSBool
11320 0 : nsIDOMMessageEvent_InitMessageEvent(JSContext *cx, unsigned argc, jsval *vp)
11321 : {
11322 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11323 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11324 0 : if (!obj)
11325 0 : return JS_FALSE;
11326 : nsIDOMMessageEvent *self;
11327 0 : xpc_qsSelfRef selfref;
11328 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11329 0 : return JS_FALSE;
11330 0 : if (argc < 7)
11331 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11332 0 : jsval *argv = JS_ARGV(cx, vp);
11333 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
11334 : xpc_qsDOMString::eDefaultNullBehavior,
11335 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11336 0 : if (!arg0.IsValid())
11337 0 : return JS_FALSE;
11338 : JSBool arg1;
11339 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
11340 : JSBool arg2;
11341 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
11342 0 : jsval arg3 = argv[3];
11343 0 : xpc_qsDOMString arg4(cx, argv[4], &argv[4],
11344 : xpc_qsDOMString::eDefaultNullBehavior,
11345 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11346 0 : if (!arg4.IsValid())
11347 0 : return JS_FALSE;
11348 0 : xpc_qsDOMString arg5(cx, argv[5], &argv[5],
11349 : xpc_qsDOMString::eDefaultNullBehavior,
11350 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11351 0 : if (!arg5.IsValid())
11352 0 : return JS_FALSE;
11353 : nsresult rv;
11354 : nsIDOMWindow *arg6;
11355 0 : xpc_qsSelfRef arg6ref;
11356 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[6], &arg6, &arg6ref.ptr, &argv[6]);
11357 0 : if (NS_FAILED(rv)) {
11358 0 : xpc_qsThrowBadArg(cx, rv, vp, 6);
11359 0 : return JS_FALSE;
11360 : }
11361 0 : rv = self->InitMessageEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
11362 0 : if (NS_FAILED(rv))
11363 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11364 0 : *vp = JSVAL_VOID;
11365 0 : return JS_TRUE;
11366 : }
11367 :
11368 : // === interface nsIDOMMouseScrollEvent
11369 :
11370 : static JSBool
11371 0 : nsIDOMMouseScrollEvent_GetAxis(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11372 : {
11373 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11374 : nsIDOMMouseScrollEvent *self;
11375 0 : xpc_qsSelfRef selfref;
11376 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11377 0 : return JS_FALSE;
11378 : nsresult rv;
11379 : PRInt32 result;
11380 0 : rv = self->GetAxis(&result);
11381 0 : if (NS_FAILED(rv))
11382 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11383 0 : *vp = INT_TO_JSVAL(result);
11384 0 : return JS_TRUE;
11385 : }
11386 :
11387 : static JSBool
11388 0 : nsIDOMMouseScrollEvent_InitMouseScrollEvent(JSContext *cx, unsigned argc, jsval *vp)
11389 : {
11390 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11391 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11392 0 : if (!obj)
11393 0 : return JS_FALSE;
11394 : nsIDOMMouseScrollEvent *self;
11395 0 : xpc_qsSelfRef selfref;
11396 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11397 0 : return JS_FALSE;
11398 0 : if (argc < 16)
11399 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11400 0 : jsval *argv = JS_ARGV(cx, vp);
11401 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
11402 : xpc_qsDOMString::eDefaultNullBehavior,
11403 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11404 0 : if (!arg0.IsValid())
11405 0 : return JS_FALSE;
11406 : JSBool arg1;
11407 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
11408 : JSBool arg2;
11409 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
11410 : nsresult rv;
11411 : nsIDOMWindow *arg3;
11412 0 : xpc_qsSelfRef arg3ref;
11413 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
11414 0 : if (NS_FAILED(rv)) {
11415 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
11416 0 : return JS_FALSE;
11417 : }
11418 : int32_t arg4;
11419 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
11420 0 : return JS_FALSE;
11421 : int32_t arg5;
11422 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
11423 0 : return JS_FALSE;
11424 : int32_t arg6;
11425 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
11426 0 : return JS_FALSE;
11427 : int32_t arg7;
11428 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
11429 0 : return JS_FALSE;
11430 : int32_t arg8;
11431 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
11432 0 : return JS_FALSE;
11433 : JSBool arg9;
11434 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
11435 : JSBool arg10;
11436 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
11437 : JSBool arg11;
11438 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
11439 : JSBool arg12;
11440 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
11441 : uint32_t arg13_u32;
11442 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
11443 0 : return JS_FALSE;
11444 0 : uint16_t arg13 = (uint16_t) arg13_u32;
11445 : nsIDOMEventTarget *arg14;
11446 0 : xpc_qsSelfRef arg14ref;
11447 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
11448 0 : if (NS_FAILED(rv)) {
11449 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
11450 0 : return JS_FALSE;
11451 : }
11452 : int32_t arg15;
11453 0 : if (!JS_ValueToECMAInt32(cx, argv[15], &arg15))
11454 0 : return JS_FALSE;
11455 0 : rv = self->InitMouseScrollEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15);
11456 0 : if (NS_FAILED(rv))
11457 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11458 0 : *vp = JSVAL_VOID;
11459 0 : return JS_TRUE;
11460 : }
11461 :
11462 : // === interface nsIDOMProgressEvent
11463 :
11464 : static JSBool
11465 0 : nsIDOMProgressEvent_GetLengthComputable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11466 : {
11467 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11468 : nsIDOMProgressEvent *self;
11469 0 : xpc_qsSelfRef selfref;
11470 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11471 0 : return JS_FALSE;
11472 : nsresult rv;
11473 : bool result;
11474 0 : rv = self->GetLengthComputable(&result);
11475 0 : if (NS_FAILED(rv))
11476 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11477 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
11478 0 : return JS_TRUE;
11479 : }
11480 :
11481 : static JSBool
11482 0 : nsIDOMProgressEvent_GetLoaded(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11483 : {
11484 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11485 : nsIDOMProgressEvent *self;
11486 0 : xpc_qsSelfRef selfref;
11487 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11488 0 : return JS_FALSE;
11489 : nsresult rv;
11490 : PRUint64 result;
11491 0 : rv = self->GetLoaded(&result);
11492 0 : if (NS_FAILED(rv))
11493 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11494 0 : return xpc_qsUint64ToJsval(cx, result, vp);
11495 : }
11496 :
11497 : static JSBool
11498 0 : nsIDOMProgressEvent_GetTotal(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11499 : {
11500 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11501 : nsIDOMProgressEvent *self;
11502 0 : xpc_qsSelfRef selfref;
11503 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11504 0 : return JS_FALSE;
11505 : nsresult rv;
11506 : PRUint64 result;
11507 0 : rv = self->GetTotal(&result);
11508 0 : if (NS_FAILED(rv))
11509 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11510 0 : return xpc_qsUint64ToJsval(cx, result, vp);
11511 : }
11512 :
11513 : // === interface nsIDOMNSEvent
11514 :
11515 : static JSBool
11516 0 : nsIDOMNSEvent_GetOriginalTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11517 : {
11518 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11519 0 : JSObject *callee = nsnull;
11520 : nsIDOMNSEvent *self;
11521 0 : xpc_qsSelfRef selfref;
11522 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11523 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11524 0 : return JS_FALSE;
11525 : nsresult rv;
11526 0 : nsCOMPtr<nsIDOMEventTarget> result;
11527 0 : rv = self->GetOriginalTarget(getter_AddRefs(result));
11528 0 : if (NS_FAILED(rv))
11529 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11530 0 : if (!result) {
11531 0 : *vp = JSVAL_NULL;
11532 0 : return JS_TRUE;
11533 : }
11534 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11535 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11536 0 : return JS_TRUE;
11537 : }
11538 : // After this point do not use 'result'!
11539 0 : qsObjectHelper helper(result, cache);
11540 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
11541 : }
11542 :
11543 : static JSBool
11544 0 : nsIDOMNSEvent_GetPreventDefault(JSContext *cx, unsigned argc, jsval *vp)
11545 : {
11546 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11547 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11548 0 : if (!obj)
11549 0 : return JS_FALSE;
11550 : nsIDOMNSEvent *self;
11551 0 : xpc_qsSelfRef selfref;
11552 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11553 0 : return JS_FALSE;
11554 : nsresult rv;
11555 : bool result;
11556 0 : rv = self->GetPreventDefault(&result);
11557 0 : if (NS_FAILED(rv))
11558 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11559 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
11560 0 : return JS_TRUE;
11561 : }
11562 :
11563 : // === interface nsIDOMUIEvent
11564 :
11565 : static JSBool
11566 0 : nsIDOMUIEvent_GetWhich(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11567 : {
11568 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11569 : nsIDOMUIEvent *self;
11570 0 : xpc_qsSelfRef selfref;
11571 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11572 0 : return JS_FALSE;
11573 : nsresult rv;
11574 : PRUint32 result;
11575 0 : rv = self->GetWhich(&result);
11576 0 : if (NS_FAILED(rv))
11577 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11578 0 : *vp = UINT_TO_JSVAL(result);
11579 0 : return JS_TRUE;
11580 : }
11581 :
11582 : static JSBool
11583 0 : nsIDOMUIEvent_GetRangeParent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11584 : {
11585 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11586 0 : JSObject *callee = nsnull;
11587 : nsIDOMUIEvent *self;
11588 0 : xpc_qsSelfRef selfref;
11589 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11590 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11591 0 : return JS_FALSE;
11592 : nsresult rv;
11593 0 : nsCOMPtr<nsIDOMNode> result;
11594 0 : rv = self->GetRangeParent(getter_AddRefs(result));
11595 0 : if (NS_FAILED(rv))
11596 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11597 0 : if (!result) {
11598 0 : *vp = JSVAL_NULL;
11599 0 : return JS_TRUE;
11600 : }
11601 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11602 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11603 0 : return JS_TRUE;
11604 : }
11605 : // After this point do not use 'result'!
11606 0 : qsObjectHelper helper(result, cache);
11607 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
11608 : }
11609 :
11610 : static JSBool
11611 0 : nsIDOMUIEvent_GetRangeOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11612 : {
11613 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11614 : nsIDOMUIEvent *self;
11615 0 : xpc_qsSelfRef selfref;
11616 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11617 0 : return JS_FALSE;
11618 : nsresult rv;
11619 : PRInt32 result;
11620 0 : rv = self->GetRangeOffset(&result);
11621 0 : if (NS_FAILED(rv))
11622 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11623 0 : *vp = INT_TO_JSVAL(result);
11624 0 : return JS_TRUE;
11625 : }
11626 :
11627 : static JSBool
11628 0 : nsIDOMUIEvent_GetPageX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11629 : {
11630 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11631 : nsIDOMUIEvent *self;
11632 0 : xpc_qsSelfRef selfref;
11633 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11634 0 : return JS_FALSE;
11635 : nsresult rv;
11636 : PRInt32 result;
11637 0 : rv = self->GetPageX(&result);
11638 0 : if (NS_FAILED(rv))
11639 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11640 0 : *vp = INT_TO_JSVAL(result);
11641 0 : return JS_TRUE;
11642 : }
11643 :
11644 : static JSBool
11645 0 : nsIDOMUIEvent_GetPageY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11646 : {
11647 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11648 : nsIDOMUIEvent *self;
11649 0 : xpc_qsSelfRef selfref;
11650 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11651 0 : return JS_FALSE;
11652 : nsresult rv;
11653 : PRInt32 result;
11654 0 : rv = self->GetPageY(&result);
11655 0 : if (NS_FAILED(rv))
11656 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11657 0 : *vp = INT_TO_JSVAL(result);
11658 0 : return JS_TRUE;
11659 : }
11660 :
11661 : static JSBool
11662 0 : nsIDOMUIEvent_GetIsChar(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11663 : {
11664 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11665 : nsIDOMUIEvent *self;
11666 0 : xpc_qsSelfRef selfref;
11667 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11668 0 : return JS_FALSE;
11669 : nsresult rv;
11670 : bool result;
11671 0 : rv = self->GetIsChar(&result);
11672 0 : if (NS_FAILED(rv))
11673 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11674 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
11675 0 : return JS_TRUE;
11676 : }
11677 :
11678 : // === interface nsIDOMTouch
11679 :
11680 : static JSBool
11681 0 : nsIDOMTouch_GetIdentifier(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11682 : {
11683 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11684 : nsIDOMTouch *self;
11685 0 : xpc_qsSelfRef selfref;
11686 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11687 0 : return JS_FALSE;
11688 : nsresult rv;
11689 : PRInt32 result;
11690 0 : rv = self->GetIdentifier(&result);
11691 0 : if (NS_FAILED(rv))
11692 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11693 0 : *vp = INT_TO_JSVAL(result);
11694 0 : return JS_TRUE;
11695 : }
11696 :
11697 : static JSBool
11698 0 : nsIDOMTouch_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11699 : {
11700 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11701 0 : JSObject *callee = nsnull;
11702 : nsIDOMTouch *self;
11703 0 : xpc_qsSelfRef selfref;
11704 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11705 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11706 0 : return JS_FALSE;
11707 : nsresult rv;
11708 0 : nsCOMPtr<nsIDOMEventTarget> result;
11709 0 : rv = self->GetTarget(getter_AddRefs(result));
11710 0 : if (NS_FAILED(rv))
11711 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11712 0 : if (!result) {
11713 0 : *vp = JSVAL_NULL;
11714 0 : return JS_TRUE;
11715 : }
11716 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11717 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11718 0 : return JS_TRUE;
11719 : }
11720 : // After this point do not use 'result'!
11721 0 : qsObjectHelper helper(result, cache);
11722 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
11723 : }
11724 :
11725 : static JSBool
11726 0 : nsIDOMTouch_GetPageX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11727 : {
11728 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11729 : nsIDOMTouch *self;
11730 0 : xpc_qsSelfRef selfref;
11731 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11732 0 : return JS_FALSE;
11733 : nsresult rv;
11734 : PRInt32 result;
11735 0 : rv = self->GetPageX(&result);
11736 0 : if (NS_FAILED(rv))
11737 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11738 0 : *vp = INT_TO_JSVAL(result);
11739 0 : return JS_TRUE;
11740 : }
11741 :
11742 : static JSBool
11743 0 : nsIDOMTouch_GetPageY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11744 : {
11745 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11746 : nsIDOMTouch *self;
11747 0 : xpc_qsSelfRef selfref;
11748 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11749 0 : return JS_FALSE;
11750 : nsresult rv;
11751 : PRInt32 result;
11752 0 : rv = self->GetPageY(&result);
11753 0 : if (NS_FAILED(rv))
11754 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11755 0 : *vp = INT_TO_JSVAL(result);
11756 0 : return JS_TRUE;
11757 : }
11758 :
11759 : static JSBool
11760 0 : nsIDOMTouch_GetScreenX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11761 : {
11762 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11763 : nsIDOMTouch *self;
11764 0 : xpc_qsSelfRef selfref;
11765 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11766 0 : return JS_FALSE;
11767 : nsresult rv;
11768 : PRInt32 result;
11769 0 : rv = self->GetScreenX(&result);
11770 0 : if (NS_FAILED(rv))
11771 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11772 0 : *vp = INT_TO_JSVAL(result);
11773 0 : return JS_TRUE;
11774 : }
11775 :
11776 : static JSBool
11777 0 : nsIDOMTouch_GetScreenY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11778 : {
11779 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11780 : nsIDOMTouch *self;
11781 0 : xpc_qsSelfRef selfref;
11782 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11783 0 : return JS_FALSE;
11784 : nsresult rv;
11785 : PRInt32 result;
11786 0 : rv = self->GetScreenY(&result);
11787 0 : if (NS_FAILED(rv))
11788 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11789 0 : *vp = INT_TO_JSVAL(result);
11790 0 : return JS_TRUE;
11791 : }
11792 :
11793 : static JSBool
11794 0 : nsIDOMTouch_GetClientX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11795 : {
11796 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11797 : nsIDOMTouch *self;
11798 0 : xpc_qsSelfRef selfref;
11799 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11800 0 : return JS_FALSE;
11801 : nsresult rv;
11802 : PRInt32 result;
11803 0 : rv = self->GetClientX(&result);
11804 0 : if (NS_FAILED(rv))
11805 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11806 0 : *vp = INT_TO_JSVAL(result);
11807 0 : return JS_TRUE;
11808 : }
11809 :
11810 : static JSBool
11811 0 : nsIDOMTouch_GetClientY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11812 : {
11813 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11814 : nsIDOMTouch *self;
11815 0 : xpc_qsSelfRef selfref;
11816 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11817 0 : return JS_FALSE;
11818 : nsresult rv;
11819 : PRInt32 result;
11820 0 : rv = self->GetClientY(&result);
11821 0 : if (NS_FAILED(rv))
11822 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11823 0 : *vp = INT_TO_JSVAL(result);
11824 0 : return JS_TRUE;
11825 : }
11826 :
11827 : static JSBool
11828 0 : nsIDOMTouch_GetRadiusX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11829 : {
11830 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11831 : nsIDOMTouch *self;
11832 0 : xpc_qsSelfRef selfref;
11833 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11834 0 : return JS_FALSE;
11835 : nsresult rv;
11836 : PRInt32 result;
11837 0 : rv = self->GetRadiusX(&result);
11838 0 : if (NS_FAILED(rv))
11839 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11840 0 : *vp = INT_TO_JSVAL(result);
11841 0 : return JS_TRUE;
11842 : }
11843 :
11844 : static JSBool
11845 0 : nsIDOMTouch_GetRadiusY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11846 : {
11847 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11848 : nsIDOMTouch *self;
11849 0 : xpc_qsSelfRef selfref;
11850 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11851 0 : return JS_FALSE;
11852 : nsresult rv;
11853 : PRInt32 result;
11854 0 : rv = self->GetRadiusY(&result);
11855 0 : if (NS_FAILED(rv))
11856 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11857 0 : *vp = INT_TO_JSVAL(result);
11858 0 : return JS_TRUE;
11859 : }
11860 :
11861 : static JSBool
11862 0 : nsIDOMTouch_GetRotationAngle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11863 : {
11864 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11865 : nsIDOMTouch *self;
11866 0 : xpc_qsSelfRef selfref;
11867 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11868 0 : return JS_FALSE;
11869 : nsresult rv;
11870 : float result;
11871 0 : rv = self->GetRotationAngle(&result);
11872 0 : if (NS_FAILED(rv))
11873 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11874 0 : return JS_NewNumberValue(cx, result, vp);
11875 : }
11876 :
11877 : static JSBool
11878 0 : nsIDOMTouch_GetForce(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11879 : {
11880 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11881 : nsIDOMTouch *self;
11882 0 : xpc_qsSelfRef selfref;
11883 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11884 0 : return JS_FALSE;
11885 : nsresult rv;
11886 : float result;
11887 0 : rv = self->GetForce(&result);
11888 0 : if (NS_FAILED(rv))
11889 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11890 0 : return JS_NewNumberValue(cx, result, vp);
11891 : }
11892 :
11893 : // === interface nsIDOMTouchList
11894 :
11895 : static JSBool
11896 0 : nsIDOMTouchList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11897 : {
11898 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11899 : nsIDOMTouchList *self;
11900 0 : xpc_qsSelfRef selfref;
11901 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11902 0 : return JS_FALSE;
11903 : nsresult rv;
11904 : PRUint32 result;
11905 0 : rv = self->GetLength(&result);
11906 0 : if (NS_FAILED(rv))
11907 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11908 0 : *vp = UINT_TO_JSVAL(result);
11909 0 : return JS_TRUE;
11910 : }
11911 :
11912 : static JSBool
11913 0 : nsIDOMTouchList_Item(JSContext *cx, unsigned argc, jsval *vp)
11914 : {
11915 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11916 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11917 0 : if (!obj)
11918 0 : return JS_FALSE;
11919 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
11920 : nsIDOMTouchList *self;
11921 0 : xpc_qsSelfRef selfref;
11922 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11923 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
11924 0 : return JS_FALSE;
11925 0 : if (argc < 1)
11926 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11927 0 : jsval *argv = JS_ARGV(cx, vp);
11928 : uint32_t arg0;
11929 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
11930 0 : return JS_FALSE;
11931 : nsresult rv;
11932 0 : nsCOMPtr<nsIDOMTouch> result;
11933 0 : rv = self->Item(arg0, getter_AddRefs(result));
11934 0 : if (NS_FAILED(rv))
11935 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11936 0 : if (!result) {
11937 0 : *vp = JSVAL_NULL;
11938 0 : return JS_TRUE;
11939 : }
11940 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11941 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11942 0 : return JS_TRUE;
11943 : }
11944 : // After this point do not use 'result'!
11945 0 : qsObjectHelper helper(result, cache);
11946 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouch), &interfaces[k_nsIDOMTouch], vp);
11947 : }
11948 :
11949 : static JSBool
11950 0 : nsIDOMTouchList_IdentifiedTouch(JSContext *cx, unsigned argc, jsval *vp)
11951 : {
11952 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11953 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11954 0 : if (!obj)
11955 0 : return JS_FALSE;
11956 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
11957 : nsIDOMTouchList *self;
11958 0 : xpc_qsSelfRef selfref;
11959 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11960 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
11961 0 : return JS_FALSE;
11962 0 : if (argc < 1)
11963 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11964 0 : jsval *argv = JS_ARGV(cx, vp);
11965 : int32_t arg0;
11966 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
11967 0 : return JS_FALSE;
11968 : nsresult rv;
11969 0 : nsCOMPtr<nsIDOMTouch> result;
11970 0 : rv = self->IdentifiedTouch(arg0, getter_AddRefs(result));
11971 0 : if (NS_FAILED(rv))
11972 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11973 0 : if (!result) {
11974 0 : *vp = JSVAL_NULL;
11975 0 : return JS_TRUE;
11976 : }
11977 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11978 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11979 0 : return JS_TRUE;
11980 : }
11981 : // After this point do not use 'result'!
11982 0 : qsObjectHelper helper(result, cache);
11983 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouch), &interfaces[k_nsIDOMTouch], vp);
11984 : }
11985 :
11986 : // === interface nsIDOMTouchEvent
11987 :
11988 : static JSBool
11989 0 : nsIDOMTouchEvent_GetTouches(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11990 : {
11991 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11992 0 : JSObject *callee = nsnull;
11993 : nsIDOMTouchEvent *self;
11994 0 : xpc_qsSelfRef selfref;
11995 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11996 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11997 0 : return JS_FALSE;
11998 : nsresult rv;
11999 0 : nsCOMPtr<nsIDOMTouchList> result;
12000 0 : rv = self->GetTouches(getter_AddRefs(result));
12001 0 : if (NS_FAILED(rv))
12002 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12003 0 : if (!result) {
12004 0 : *vp = JSVAL_NULL;
12005 0 : return JS_TRUE;
12006 : }
12007 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12008 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12009 0 : return JS_TRUE;
12010 : }
12011 : // After this point do not use 'result'!
12012 0 : qsObjectHelper helper(result, cache);
12013 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouchList), &interfaces[k_nsIDOMTouchList], vp);
12014 : }
12015 :
12016 : static JSBool
12017 0 : nsIDOMTouchEvent_GetTargetTouches(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12018 : {
12019 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12020 0 : JSObject *callee = nsnull;
12021 : nsIDOMTouchEvent *self;
12022 0 : xpc_qsSelfRef selfref;
12023 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
12024 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
12025 0 : return JS_FALSE;
12026 : nsresult rv;
12027 0 : nsCOMPtr<nsIDOMTouchList> result;
12028 0 : rv = self->GetTargetTouches(getter_AddRefs(result));
12029 0 : if (NS_FAILED(rv))
12030 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12031 0 : if (!result) {
12032 0 : *vp = JSVAL_NULL;
12033 0 : return JS_TRUE;
12034 : }
12035 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12036 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12037 0 : return JS_TRUE;
12038 : }
12039 : // After this point do not use 'result'!
12040 0 : qsObjectHelper helper(result, cache);
12041 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouchList), &interfaces[k_nsIDOMTouchList], vp);
12042 : }
12043 :
12044 : static JSBool
12045 0 : nsIDOMTouchEvent_GetChangedTouches(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12046 : {
12047 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12048 0 : JSObject *callee = nsnull;
12049 : nsIDOMTouchEvent *self;
12050 0 : xpc_qsSelfRef selfref;
12051 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
12052 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
12053 0 : return JS_FALSE;
12054 : nsresult rv;
12055 0 : nsCOMPtr<nsIDOMTouchList> result;
12056 0 : rv = self->GetChangedTouches(getter_AddRefs(result));
12057 0 : if (NS_FAILED(rv))
12058 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12059 0 : if (!result) {
12060 0 : *vp = JSVAL_NULL;
12061 0 : return JS_TRUE;
12062 : }
12063 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12064 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12065 0 : return JS_TRUE;
12066 : }
12067 : // After this point do not use 'result'!
12068 0 : qsObjectHelper helper(result, cache);
12069 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouchList), &interfaces[k_nsIDOMTouchList], vp);
12070 : }
12071 :
12072 : static JSBool
12073 0 : nsIDOMTouchEvent_GetAltKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12074 : {
12075 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12076 : nsIDOMTouchEvent *self;
12077 0 : xpc_qsSelfRef selfref;
12078 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12079 0 : return JS_FALSE;
12080 : nsresult rv;
12081 : bool result;
12082 0 : rv = self->GetAltKey(&result);
12083 0 : if (NS_FAILED(rv))
12084 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12085 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12086 0 : return JS_TRUE;
12087 : }
12088 :
12089 : static JSBool
12090 0 : nsIDOMTouchEvent_GetMetaKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12091 : {
12092 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12093 : nsIDOMTouchEvent *self;
12094 0 : xpc_qsSelfRef selfref;
12095 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12096 0 : return JS_FALSE;
12097 : nsresult rv;
12098 : bool result;
12099 0 : rv = self->GetMetaKey(&result);
12100 0 : if (NS_FAILED(rv))
12101 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12102 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12103 0 : return JS_TRUE;
12104 : }
12105 :
12106 : static JSBool
12107 0 : nsIDOMTouchEvent_GetCtrlKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12108 : {
12109 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12110 : nsIDOMTouchEvent *self;
12111 0 : xpc_qsSelfRef selfref;
12112 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12113 0 : return JS_FALSE;
12114 : nsresult rv;
12115 : bool result;
12116 0 : rv = self->GetCtrlKey(&result);
12117 0 : if (NS_FAILED(rv))
12118 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12119 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12120 0 : return JS_TRUE;
12121 : }
12122 :
12123 : static JSBool
12124 0 : nsIDOMTouchEvent_GetShiftKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12125 : {
12126 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12127 : nsIDOMTouchEvent *self;
12128 0 : xpc_qsSelfRef selfref;
12129 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12130 0 : return JS_FALSE;
12131 : nsresult rv;
12132 : bool result;
12133 0 : rv = self->GetShiftKey(&result);
12134 0 : if (NS_FAILED(rv))
12135 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12136 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12137 0 : return JS_TRUE;
12138 : }
12139 :
12140 : static JSBool
12141 0 : nsIDOMTouchEvent_InitTouchEvent(JSContext *cx, unsigned argc, jsval *vp)
12142 : {
12143 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12144 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
12145 0 : if (!obj)
12146 0 : return JS_FALSE;
12147 : nsIDOMTouchEvent *self;
12148 0 : xpc_qsSelfRef selfref;
12149 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
12150 0 : return JS_FALSE;
12151 0 : if (argc < 12)
12152 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
12153 0 : jsval *argv = JS_ARGV(cx, vp);
12154 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
12155 : xpc_qsDOMString::eDefaultNullBehavior,
12156 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12157 0 : if (!arg0.IsValid())
12158 0 : return JS_FALSE;
12159 : JSBool arg1;
12160 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
12161 : JSBool arg2;
12162 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
12163 : nsresult rv;
12164 : nsIDOMWindow *arg3;
12165 0 : xpc_qsSelfRef arg3ref;
12166 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
12167 0 : if (NS_FAILED(rv)) {
12168 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
12169 0 : return JS_FALSE;
12170 : }
12171 : int32_t arg4;
12172 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
12173 0 : return JS_FALSE;
12174 : JSBool arg5;
12175 0 : JS_ValueToBoolean(cx, argv[5], &arg5);
12176 : JSBool arg6;
12177 0 : JS_ValueToBoolean(cx, argv[6], &arg6);
12178 : JSBool arg7;
12179 0 : JS_ValueToBoolean(cx, argv[7], &arg7);
12180 : JSBool arg8;
12181 0 : JS_ValueToBoolean(cx, argv[8], &arg8);
12182 : nsIDOMTouchList *arg9;
12183 0 : xpc_qsSelfRef arg9ref;
12184 0 : rv = xpc_qsUnwrapArg<nsIDOMTouchList>(cx, argv[9], &arg9, &arg9ref.ptr, &argv[9]);
12185 0 : if (NS_FAILED(rv)) {
12186 0 : xpc_qsThrowBadArg(cx, rv, vp, 9);
12187 0 : return JS_FALSE;
12188 : }
12189 : nsIDOMTouchList *arg10;
12190 0 : xpc_qsSelfRef arg10ref;
12191 0 : rv = xpc_qsUnwrapArg<nsIDOMTouchList>(cx, argv[10], &arg10, &arg10ref.ptr, &argv[10]);
12192 0 : if (NS_FAILED(rv)) {
12193 0 : xpc_qsThrowBadArg(cx, rv, vp, 10);
12194 0 : return JS_FALSE;
12195 : }
12196 : nsIDOMTouchList *arg11;
12197 0 : xpc_qsSelfRef arg11ref;
12198 0 : rv = xpc_qsUnwrapArg<nsIDOMTouchList>(cx, argv[11], &arg11, &arg11ref.ptr, &argv[11]);
12199 0 : if (NS_FAILED(rv)) {
12200 0 : xpc_qsThrowBadArg(cx, rv, vp, 11);
12201 0 : return JS_FALSE;
12202 : }
12203 0 : rv = self->InitTouchEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
12204 0 : if (NS_FAILED(rv))
12205 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
12206 0 : *vp = JSVAL_VOID;
12207 0 : return JS_TRUE;
12208 : }
12209 :
12210 : // === interface nsIDOMHTMLAnchorElement
12211 :
12212 : static JSBool
12213 0 : nsIDOMHTMLAnchorElement_GetHref(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12214 : {
12215 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12216 : nsIDOMHTMLAnchorElement *self;
12217 0 : xpc_qsSelfRef selfref;
12218 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12219 0 : return JS_FALSE;
12220 : nsresult rv;
12221 0 : nsString result;
12222 0 : rv = self->GetHref(result);
12223 0 : if (NS_FAILED(rv))
12224 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12225 0 : return xpc::StringToJsval(cx, result, vp);
12226 : }
12227 :
12228 : static JSBool
12229 0 : nsIDOMHTMLAnchorElement_SetHref(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12230 : {
12231 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12232 : nsIDOMHTMLAnchorElement *self;
12233 0 : xpc_qsSelfRef selfref;
12234 0 : JS::AutoValueRooter tvr(cx);
12235 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12236 0 : return JS_FALSE;
12237 : xpc_qsDOMString arg0(cx, *vp, vp,
12238 : xpc_qsDOMString::eDefaultNullBehavior,
12239 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12240 0 : if (!arg0.IsValid())
12241 0 : return JS_FALSE;
12242 : nsresult rv;
12243 0 : rv = self->SetHref(arg0);
12244 0 : if (NS_FAILED(rv))
12245 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12246 0 : return JS_TRUE;
12247 : }
12248 :
12249 : static JSBool
12250 0 : nsIDOMHTMLAnchorElement_GetRel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12251 : {
12252 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12253 : nsIDOMHTMLAnchorElement *self;
12254 0 : xpc_qsSelfRef selfref;
12255 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12256 0 : return JS_FALSE;
12257 : nsresult rv;
12258 0 : nsString result;
12259 0 : rv = self->GetRel(result);
12260 0 : if (NS_FAILED(rv))
12261 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12262 0 : return xpc::StringToJsval(cx, result, vp);
12263 : }
12264 :
12265 : static JSBool
12266 0 : nsIDOMHTMLAnchorElement_SetRel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12267 : {
12268 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12269 : nsIDOMHTMLAnchorElement *self;
12270 0 : xpc_qsSelfRef selfref;
12271 0 : JS::AutoValueRooter tvr(cx);
12272 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12273 0 : return JS_FALSE;
12274 : xpc_qsDOMString arg0(cx, *vp, vp,
12275 : xpc_qsDOMString::eDefaultNullBehavior,
12276 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12277 0 : if (!arg0.IsValid())
12278 0 : return JS_FALSE;
12279 : nsresult rv;
12280 0 : rv = self->SetRel(arg0);
12281 0 : if (NS_FAILED(rv))
12282 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12283 0 : return JS_TRUE;
12284 : }
12285 :
12286 : static JSBool
12287 0 : nsIDOMHTMLAnchorElement_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12288 : {
12289 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12290 : nsIDOMHTMLAnchorElement *self;
12291 0 : xpc_qsSelfRef selfref;
12292 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12293 0 : return JS_FALSE;
12294 : nsresult rv;
12295 0 : nsString result;
12296 0 : rv = self->GetTarget(result);
12297 0 : if (NS_FAILED(rv))
12298 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12299 0 : return xpc::StringToJsval(cx, result, vp);
12300 : }
12301 :
12302 : static JSBool
12303 0 : nsIDOMHTMLAnchorElement_SetTarget(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12304 : {
12305 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12306 : nsIDOMHTMLAnchorElement *self;
12307 0 : xpc_qsSelfRef selfref;
12308 0 : JS::AutoValueRooter tvr(cx);
12309 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12310 0 : return JS_FALSE;
12311 : xpc_qsDOMString arg0(cx, *vp, vp,
12312 : xpc_qsDOMString::eDefaultNullBehavior,
12313 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12314 0 : if (!arg0.IsValid())
12315 0 : return JS_FALSE;
12316 : nsresult rv;
12317 0 : rv = self->SetTarget(arg0);
12318 0 : if (NS_FAILED(rv))
12319 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12320 0 : return JS_TRUE;
12321 : }
12322 :
12323 : static JSBool
12324 0 : nsIDOMHTMLAnchorElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12325 : {
12326 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12327 : nsIDOMHTMLAnchorElement *self;
12328 0 : xpc_qsSelfRef selfref;
12329 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12330 0 : return JS_FALSE;
12331 : nsresult rv;
12332 0 : nsString result;
12333 0 : rv = self->GetName(result);
12334 0 : if (NS_FAILED(rv))
12335 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12336 0 : return xpc::StringToJsval(cx, result, vp);
12337 : }
12338 :
12339 : static JSBool
12340 0 : nsIDOMHTMLAnchorElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12341 : {
12342 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12343 : nsIDOMHTMLAnchorElement *self;
12344 0 : xpc_qsSelfRef selfref;
12345 0 : JS::AutoValueRooter tvr(cx);
12346 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12347 0 : return JS_FALSE;
12348 : xpc_qsDOMString arg0(cx, *vp, vp,
12349 : xpc_qsDOMString::eDefaultNullBehavior,
12350 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12351 0 : if (!arg0.IsValid())
12352 0 : return JS_FALSE;
12353 : nsresult rv;
12354 0 : rv = self->SetName(arg0);
12355 0 : if (NS_FAILED(rv))
12356 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12357 0 : return JS_TRUE;
12358 : }
12359 :
12360 : static JSBool
12361 0 : nsIDOMHTMLAnchorElement_GetText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12362 : {
12363 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12364 : nsIDOMHTMLAnchorElement *self;
12365 0 : xpc_qsSelfRef selfref;
12366 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12367 0 : return JS_FALSE;
12368 : nsresult rv;
12369 0 : nsString result;
12370 0 : rv = self->GetText(result);
12371 0 : if (NS_FAILED(rv))
12372 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12373 0 : return xpc::StringToJsval(cx, result, vp);
12374 : }
12375 :
12376 : static JSBool
12377 0 : nsIDOMHTMLAnchorElement_SetText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12378 : {
12379 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12380 : nsIDOMHTMLAnchorElement *self;
12381 0 : xpc_qsSelfRef selfref;
12382 0 : JS::AutoValueRooter tvr(cx);
12383 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12384 0 : return JS_FALSE;
12385 : xpc_qsDOMString arg0(cx, *vp, vp,
12386 : xpc_qsDOMString::eStringify,
12387 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12388 0 : if (!arg0.IsValid())
12389 0 : return JS_FALSE;
12390 : nsresult rv;
12391 0 : rv = self->SetText(arg0);
12392 0 : if (NS_FAILED(rv))
12393 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12394 0 : return JS_TRUE;
12395 : }
12396 :
12397 : static JSBool
12398 0 : nsIDOMHTMLAnchorElement_GetSearch(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12399 : {
12400 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12401 : nsIDOMHTMLAnchorElement *self;
12402 0 : xpc_qsSelfRef selfref;
12403 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12404 0 : return JS_FALSE;
12405 : nsresult rv;
12406 0 : nsString result;
12407 0 : rv = self->GetSearch(result);
12408 0 : if (NS_FAILED(rv))
12409 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12410 0 : return xpc::StringToJsval(cx, result, vp);
12411 : }
12412 :
12413 : static JSBool
12414 0 : nsIDOMHTMLAnchorElement_SetSearch(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12415 : {
12416 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12417 : nsIDOMHTMLAnchorElement *self;
12418 0 : xpc_qsSelfRef selfref;
12419 0 : JS::AutoValueRooter tvr(cx);
12420 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12421 0 : return JS_FALSE;
12422 : xpc_qsDOMString arg0(cx, *vp, vp,
12423 : xpc_qsDOMString::eDefaultNullBehavior,
12424 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12425 0 : if (!arg0.IsValid())
12426 0 : return JS_FALSE;
12427 : nsresult rv;
12428 0 : rv = self->SetSearch(arg0);
12429 0 : if (NS_FAILED(rv))
12430 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12431 0 : return JS_TRUE;
12432 : }
12433 :
12434 : static JSBool
12435 0 : nsIDOMHTMLAnchorElement_GetHash(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12436 : {
12437 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12438 : nsIDOMHTMLAnchorElement *self;
12439 0 : xpc_qsSelfRef selfref;
12440 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12441 0 : return JS_FALSE;
12442 : nsresult rv;
12443 0 : nsString result;
12444 0 : rv = self->GetHash(result);
12445 0 : if (NS_FAILED(rv))
12446 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12447 0 : return xpc::StringToJsval(cx, result, vp);
12448 : }
12449 :
12450 : static JSBool
12451 0 : nsIDOMHTMLAnchorElement_SetHash(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12452 : {
12453 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12454 : nsIDOMHTMLAnchorElement *self;
12455 0 : xpc_qsSelfRef selfref;
12456 0 : JS::AutoValueRooter tvr(cx);
12457 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12458 0 : return JS_FALSE;
12459 : xpc_qsDOMString arg0(cx, *vp, vp,
12460 : xpc_qsDOMString::eDefaultNullBehavior,
12461 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12462 0 : if (!arg0.IsValid())
12463 0 : return JS_FALSE;
12464 : nsresult rv;
12465 0 : rv = self->SetHash(arg0);
12466 0 : if (NS_FAILED(rv))
12467 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12468 0 : return JS_TRUE;
12469 : }
12470 :
12471 : // === interface nsIDOMHTMLBaseElement
12472 :
12473 : static JSBool
12474 0 : nsIDOMHTMLBaseElement_GetHref(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12475 : {
12476 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12477 : nsIDOMHTMLBaseElement *self;
12478 0 : xpc_qsSelfRef selfref;
12479 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12480 0 : return JS_FALSE;
12481 : nsresult rv;
12482 0 : nsString result;
12483 0 : rv = self->GetHref(result);
12484 0 : if (NS_FAILED(rv))
12485 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12486 0 : return xpc::StringToJsval(cx, result, vp);
12487 : }
12488 :
12489 : static JSBool
12490 0 : nsIDOMHTMLBaseElement_SetHref(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12491 : {
12492 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12493 : nsIDOMHTMLBaseElement *self;
12494 0 : xpc_qsSelfRef selfref;
12495 0 : JS::AutoValueRooter tvr(cx);
12496 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12497 0 : return JS_FALSE;
12498 : xpc_qsDOMString arg0(cx, *vp, vp,
12499 : xpc_qsDOMString::eDefaultNullBehavior,
12500 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12501 0 : if (!arg0.IsValid())
12502 0 : return JS_FALSE;
12503 : nsresult rv;
12504 0 : rv = self->SetHref(arg0);
12505 0 : if (NS_FAILED(rv))
12506 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12507 0 : return JS_TRUE;
12508 : }
12509 :
12510 : static JSBool
12511 0 : nsIDOMHTMLBaseElement_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12512 : {
12513 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12514 : nsIDOMHTMLBaseElement *self;
12515 0 : xpc_qsSelfRef selfref;
12516 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12517 0 : return JS_FALSE;
12518 : nsresult rv;
12519 0 : nsString result;
12520 0 : rv = self->GetTarget(result);
12521 0 : if (NS_FAILED(rv))
12522 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12523 0 : return xpc::StringToJsval(cx, result, vp);
12524 : }
12525 :
12526 : static JSBool
12527 0 : nsIDOMHTMLBaseElement_SetTarget(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12528 : {
12529 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12530 : nsIDOMHTMLBaseElement *self;
12531 0 : xpc_qsSelfRef selfref;
12532 0 : JS::AutoValueRooter tvr(cx);
12533 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12534 0 : return JS_FALSE;
12535 : xpc_qsDOMString arg0(cx, *vp, vp,
12536 : xpc_qsDOMString::eDefaultNullBehavior,
12537 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12538 0 : if (!arg0.IsValid())
12539 0 : return JS_FALSE;
12540 : nsresult rv;
12541 0 : rv = self->SetTarget(arg0);
12542 0 : if (NS_FAILED(rv))
12543 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12544 0 : return JS_TRUE;
12545 : }
12546 :
12547 : // === interface nsIDOMHTMLButtonElement
12548 :
12549 : static JSBool
12550 0 : nsIDOMHTMLButtonElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12551 : {
12552 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12553 : nsIDOMHTMLButtonElement *self;
12554 0 : xpc_qsSelfRef selfref;
12555 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12556 0 : return JS_FALSE;
12557 : nsresult rv;
12558 0 : nsString result;
12559 0 : rv = self->GetName(result);
12560 0 : if (NS_FAILED(rv))
12561 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12562 0 : return xpc::StringToJsval(cx, result, vp);
12563 : }
12564 :
12565 : static JSBool
12566 0 : nsIDOMHTMLButtonElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12567 : {
12568 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12569 : nsIDOMHTMLButtonElement *self;
12570 0 : xpc_qsSelfRef selfref;
12571 0 : JS::AutoValueRooter tvr(cx);
12572 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12573 0 : return JS_FALSE;
12574 : xpc_qsDOMString arg0(cx, *vp, vp,
12575 : xpc_qsDOMString::eDefaultNullBehavior,
12576 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12577 0 : if (!arg0.IsValid())
12578 0 : return JS_FALSE;
12579 : nsresult rv;
12580 0 : rv = self->SetName(arg0);
12581 0 : if (NS_FAILED(rv))
12582 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12583 0 : return JS_TRUE;
12584 : }
12585 :
12586 : static JSBool
12587 0 : nsIDOMHTMLButtonElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12588 : {
12589 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12590 0 : JSObject *callee = nsnull;
12591 : nsIDOMHTMLButtonElement *self;
12592 0 : xpc_qsSelfRef selfref;
12593 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
12594 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
12595 0 : return JS_FALSE;
12596 : nsresult rv;
12597 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
12598 0 : rv = self->GetForm(getter_AddRefs(result));
12599 0 : if (NS_FAILED(rv))
12600 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12601 0 : if (!result) {
12602 0 : *vp = JSVAL_NULL;
12603 0 : return JS_TRUE;
12604 : }
12605 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12606 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12607 0 : return JS_TRUE;
12608 : }
12609 : // After this point do not use 'result'!
12610 0 : qsObjectHelper helper(result, cache);
12611 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
12612 : }
12613 :
12614 : static JSBool
12615 0 : nsIDOMHTMLButtonElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12616 : {
12617 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12618 : nsIDOMHTMLButtonElement *self;
12619 0 : xpc_qsSelfRef selfref;
12620 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12621 0 : return JS_FALSE;
12622 : nsresult rv;
12623 0 : nsString result;
12624 0 : rv = self->GetValue(result);
12625 0 : if (NS_FAILED(rv))
12626 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12627 0 : return xpc::StringToJsval(cx, result, vp);
12628 : }
12629 :
12630 : static JSBool
12631 0 : nsIDOMHTMLButtonElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12632 : {
12633 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12634 : nsIDOMHTMLButtonElement *self;
12635 0 : xpc_qsSelfRef selfref;
12636 0 : JS::AutoValueRooter tvr(cx);
12637 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12638 0 : return JS_FALSE;
12639 : xpc_qsDOMString arg0(cx, *vp, vp,
12640 : xpc_qsDOMString::eDefaultNullBehavior,
12641 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12642 0 : if (!arg0.IsValid())
12643 0 : return JS_FALSE;
12644 : nsresult rv;
12645 0 : rv = self->SetValue(arg0);
12646 0 : if (NS_FAILED(rv))
12647 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12648 0 : return JS_TRUE;
12649 : }
12650 :
12651 : static JSBool
12652 0 : nsIDOMHTMLButtonElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12653 : {
12654 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12655 : nsIDOMHTMLButtonElement *self;
12656 0 : xpc_qsSelfRef selfref;
12657 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12658 0 : return JS_FALSE;
12659 : nsresult rv;
12660 : bool result;
12661 0 : rv = self->GetDisabled(&result);
12662 0 : if (NS_FAILED(rv))
12663 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12664 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12665 0 : return JS_TRUE;
12666 : }
12667 :
12668 : static JSBool
12669 0 : nsIDOMHTMLButtonElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12670 : {
12671 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12672 : nsIDOMHTMLButtonElement *self;
12673 0 : xpc_qsSelfRef selfref;
12674 0 : JS::AutoValueRooter tvr(cx);
12675 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12676 0 : return JS_FALSE;
12677 : JSBool arg0;
12678 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12679 : nsresult rv;
12680 0 : rv = self->SetDisabled(arg0);
12681 0 : if (NS_FAILED(rv))
12682 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12683 0 : return JS_TRUE;
12684 : }
12685 :
12686 : // === interface nsIDOMHTMLCollection
12687 :
12688 : static JSBool
12689 0 : nsIDOMHTMLCollection_Item(JSContext *cx, unsigned argc, jsval *vp)
12690 : {
12691 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12692 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
12693 0 : if (!obj)
12694 0 : return JS_FALSE;
12695 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
12696 : nsIDOMHTMLCollection *self;
12697 0 : xpc_qsSelfRef selfref;
12698 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
12699 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
12700 0 : return JS_FALSE;
12701 0 : if (argc < 1)
12702 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
12703 0 : jsval *argv = JS_ARGV(cx, vp);
12704 : uint32_t arg0;
12705 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
12706 0 : return JS_FALSE;
12707 : nsresult rv;
12708 0 : nsCOMPtr<nsIDOMNode> result;
12709 0 : rv = self->Item(arg0, getter_AddRefs(result));
12710 0 : if (NS_FAILED(rv))
12711 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
12712 0 : if (!result) {
12713 0 : *vp = JSVAL_NULL;
12714 0 : return JS_TRUE;
12715 : }
12716 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12717 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12718 0 : return JS_TRUE;
12719 : }
12720 : // After this point do not use 'result'!
12721 0 : qsObjectHelper helper(result, cache);
12722 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
12723 : }
12724 :
12725 : static JSBool
12726 0 : nsIDOMHTMLCollection_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12727 : {
12728 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12729 : nsIDOMHTMLCollection *self;
12730 0 : xpc_qsSelfRef selfref;
12731 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12732 0 : return JS_FALSE;
12733 : nsresult rv;
12734 : PRUint32 result;
12735 0 : rv = self->GetLength(&result);
12736 0 : if (NS_FAILED(rv))
12737 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12738 0 : *vp = UINT_TO_JSVAL(result);
12739 0 : return JS_TRUE;
12740 : }
12741 :
12742 : // === interface nsIDOMHTMLCommandElement
12743 :
12744 : static JSBool
12745 0 : nsIDOMHTMLCommandElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12746 : {
12747 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12748 : nsIDOMHTMLCommandElement *self;
12749 0 : xpc_qsSelfRef selfref;
12750 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12751 0 : return JS_FALSE;
12752 : nsresult rv;
12753 0 : nsString result;
12754 0 : rv = self->GetType(result);
12755 0 : if (NS_FAILED(rv))
12756 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12757 0 : return xpc::StringToJsval(cx, result, vp);
12758 : }
12759 :
12760 : static JSBool
12761 0 : nsIDOMHTMLCommandElement_SetType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12762 : {
12763 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12764 : nsIDOMHTMLCommandElement *self;
12765 0 : xpc_qsSelfRef selfref;
12766 0 : JS::AutoValueRooter tvr(cx);
12767 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12768 0 : return JS_FALSE;
12769 : xpc_qsDOMString arg0(cx, *vp, vp,
12770 : xpc_qsDOMString::eDefaultNullBehavior,
12771 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12772 0 : if (!arg0.IsValid())
12773 0 : return JS_FALSE;
12774 : nsresult rv;
12775 0 : rv = self->SetType(arg0);
12776 0 : if (NS_FAILED(rv))
12777 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12778 0 : return JS_TRUE;
12779 : }
12780 :
12781 : static JSBool
12782 0 : nsIDOMHTMLCommandElement_GetLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12783 : {
12784 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12785 : nsIDOMHTMLCommandElement *self;
12786 0 : xpc_qsSelfRef selfref;
12787 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12788 0 : return JS_FALSE;
12789 : nsresult rv;
12790 0 : nsString result;
12791 0 : rv = self->GetLabel(result);
12792 0 : if (NS_FAILED(rv))
12793 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12794 0 : return xpc::StringToJsval(cx, result, vp);
12795 : }
12796 :
12797 : static JSBool
12798 0 : nsIDOMHTMLCommandElement_SetLabel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12799 : {
12800 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12801 : nsIDOMHTMLCommandElement *self;
12802 0 : xpc_qsSelfRef selfref;
12803 0 : JS::AutoValueRooter tvr(cx);
12804 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12805 0 : return JS_FALSE;
12806 : xpc_qsDOMString arg0(cx, *vp, vp,
12807 : xpc_qsDOMString::eDefaultNullBehavior,
12808 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12809 0 : if (!arg0.IsValid())
12810 0 : return JS_FALSE;
12811 : nsresult rv;
12812 0 : rv = self->SetLabel(arg0);
12813 0 : if (NS_FAILED(rv))
12814 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12815 0 : return JS_TRUE;
12816 : }
12817 :
12818 : static JSBool
12819 0 : nsIDOMHTMLCommandElement_GetIcon(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12820 : {
12821 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12822 : nsIDOMHTMLCommandElement *self;
12823 0 : xpc_qsSelfRef selfref;
12824 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12825 0 : return JS_FALSE;
12826 : nsresult rv;
12827 0 : nsString result;
12828 0 : rv = self->GetIcon(result);
12829 0 : if (NS_FAILED(rv))
12830 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12831 0 : return xpc::StringToJsval(cx, result, vp);
12832 : }
12833 :
12834 : static JSBool
12835 0 : nsIDOMHTMLCommandElement_SetIcon(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12836 : {
12837 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12838 : nsIDOMHTMLCommandElement *self;
12839 0 : xpc_qsSelfRef selfref;
12840 0 : JS::AutoValueRooter tvr(cx);
12841 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12842 0 : return JS_FALSE;
12843 : xpc_qsDOMString arg0(cx, *vp, vp,
12844 : xpc_qsDOMString::eDefaultNullBehavior,
12845 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12846 0 : if (!arg0.IsValid())
12847 0 : return JS_FALSE;
12848 : nsresult rv;
12849 0 : rv = self->SetIcon(arg0);
12850 0 : if (NS_FAILED(rv))
12851 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12852 0 : return JS_TRUE;
12853 : }
12854 :
12855 : static JSBool
12856 0 : nsIDOMHTMLCommandElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12857 : {
12858 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12859 : nsIDOMHTMLCommandElement *self;
12860 0 : xpc_qsSelfRef selfref;
12861 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12862 0 : return JS_FALSE;
12863 : nsresult rv;
12864 : bool result;
12865 0 : rv = self->GetDisabled(&result);
12866 0 : if (NS_FAILED(rv))
12867 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12868 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12869 0 : return JS_TRUE;
12870 : }
12871 :
12872 : static JSBool
12873 0 : nsIDOMHTMLCommandElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12874 : {
12875 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12876 : nsIDOMHTMLCommandElement *self;
12877 0 : xpc_qsSelfRef selfref;
12878 0 : JS::AutoValueRooter tvr(cx);
12879 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12880 0 : return JS_FALSE;
12881 : JSBool arg0;
12882 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12883 : nsresult rv;
12884 0 : rv = self->SetDisabled(arg0);
12885 0 : if (NS_FAILED(rv))
12886 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12887 0 : return JS_TRUE;
12888 : }
12889 :
12890 : static JSBool
12891 0 : nsIDOMHTMLCommandElement_GetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12892 : {
12893 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12894 : nsIDOMHTMLCommandElement *self;
12895 0 : xpc_qsSelfRef selfref;
12896 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12897 0 : return JS_FALSE;
12898 : nsresult rv;
12899 : bool result;
12900 0 : rv = self->GetDefaultChecked(&result);
12901 0 : if (NS_FAILED(rv))
12902 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12903 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12904 0 : return JS_TRUE;
12905 : }
12906 :
12907 : static JSBool
12908 0 : nsIDOMHTMLCommandElement_SetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12909 : {
12910 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12911 : nsIDOMHTMLCommandElement *self;
12912 0 : xpc_qsSelfRef selfref;
12913 0 : JS::AutoValueRooter tvr(cx);
12914 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12915 0 : return JS_FALSE;
12916 : JSBool arg0;
12917 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12918 : nsresult rv;
12919 0 : rv = self->SetDefaultChecked(arg0);
12920 0 : if (NS_FAILED(rv))
12921 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12922 0 : return JS_TRUE;
12923 : }
12924 :
12925 : static JSBool
12926 0 : nsIDOMHTMLCommandElement_GetChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12927 : {
12928 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12929 : nsIDOMHTMLCommandElement *self;
12930 0 : xpc_qsSelfRef selfref;
12931 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12932 0 : return JS_FALSE;
12933 : nsresult rv;
12934 : bool result;
12935 0 : rv = self->GetChecked(&result);
12936 0 : if (NS_FAILED(rv))
12937 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12938 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12939 0 : return JS_TRUE;
12940 : }
12941 :
12942 : static JSBool
12943 0 : nsIDOMHTMLCommandElement_SetChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12944 : {
12945 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12946 : nsIDOMHTMLCommandElement *self;
12947 0 : xpc_qsSelfRef selfref;
12948 0 : JS::AutoValueRooter tvr(cx);
12949 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12950 0 : return JS_FALSE;
12951 : JSBool arg0;
12952 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12953 : nsresult rv;
12954 0 : rv = self->SetChecked(arg0);
12955 0 : if (NS_FAILED(rv))
12956 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12957 0 : return JS_TRUE;
12958 : }
12959 :
12960 : static JSBool
12961 0 : nsIDOMHTMLCommandElement_GetRadiogroup(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12962 : {
12963 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12964 : nsIDOMHTMLCommandElement *self;
12965 0 : xpc_qsSelfRef selfref;
12966 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12967 0 : return JS_FALSE;
12968 : nsresult rv;
12969 0 : nsString result;
12970 0 : rv = self->GetRadiogroup(result);
12971 0 : if (NS_FAILED(rv))
12972 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12973 0 : return xpc::StringToJsval(cx, result, vp);
12974 : }
12975 :
12976 : static JSBool
12977 0 : nsIDOMHTMLCommandElement_SetRadiogroup(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12978 : {
12979 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12980 : nsIDOMHTMLCommandElement *self;
12981 0 : xpc_qsSelfRef selfref;
12982 0 : JS::AutoValueRooter tvr(cx);
12983 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12984 0 : return JS_FALSE;
12985 : xpc_qsDOMString arg0(cx, *vp, vp,
12986 : xpc_qsDOMString::eDefaultNullBehavior,
12987 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12988 0 : if (!arg0.IsValid())
12989 0 : return JS_FALSE;
12990 : nsresult rv;
12991 0 : rv = self->SetRadiogroup(arg0);
12992 0 : if (NS_FAILED(rv))
12993 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12994 0 : return JS_TRUE;
12995 : }
12996 :
12997 : // === interface nsIDOMHTMLDocument
12998 :
12999 : static JSBool
13000 0 : nsIDOMHTMLDocument_GetBody(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13001 : {
13002 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13003 0 : JSObject *callee = nsnull;
13004 : nsHTMLDocument *self;
13005 0 : xpc_qsSelfRef selfref;
13006 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13007 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13008 0 : return JS_FALSE;
13009 0 : nsIContent *result = self->GetBody();
13010 : #ifdef DEBUG
13011 : nsresult debug_rv;
13012 0 : nsCOMPtr<nsIDOMHTMLDocument> debug_self;
13013 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
13014 0 : nsCOMPtr<nsIDOMHTMLElement> debug_result;
13015 0 : debug_rv = debug_self->GetBody(getter_AddRefs(debug_result));
13016 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
13017 : "Got the wrong answer from the custom method call!");
13018 : #endif
13019 0 : if (!result) {
13020 0 : *vp = JSVAL_NULL;
13021 0 : return JS_TRUE;
13022 : }
13023 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13024 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13025 0 : return JS_TRUE;
13026 : }
13027 : // After this point do not use 'result'!
13028 0 : qsObjectHelper helper(result, cache);
13029 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
13030 : }
13031 :
13032 : static JSBool
13033 0 : nsIDOMHTMLDocument_SetBody(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13034 : {
13035 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13036 : nsHTMLDocument *self;
13037 0 : xpc_qsSelfRef selfref;
13038 0 : JS::AutoValueRooter tvr(cx);
13039 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13040 0 : return JS_FALSE;
13041 : nsresult rv;
13042 : nsIDOMHTMLElement *arg0;
13043 0 : xpc_qsSelfRef arg0ref;
13044 0 : rv = xpc_qsUnwrapArg<nsIDOMHTMLElement>(cx, *vp, &arg0, &arg0ref.ptr, vp);
13045 0 : if (NS_FAILED(rv)) {
13046 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13047 0 : return JS_FALSE;
13048 : }
13049 0 : rv = self->SetBody(arg0);
13050 0 : if (NS_FAILED(rv))
13051 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13052 0 : return JS_TRUE;
13053 : }
13054 :
13055 : static JSBool
13056 0 : nsIDOMHTMLDocument_GetElementsByName(JSContext *cx, unsigned argc, jsval *vp)
13057 : {
13058 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13059 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13060 0 : if (!obj)
13061 0 : return JS_FALSE;
13062 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
13063 : nsHTMLDocument *self;
13064 0 : xpc_qsSelfRef selfref;
13065 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13066 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
13067 0 : return JS_FALSE;
13068 0 : if (argc < 1)
13069 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
13070 0 : jsval *argv = JS_ARGV(cx, vp);
13071 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
13072 : xpc_qsDOMString::eDefaultNullBehavior,
13073 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13074 0 : if (!arg0.IsValid())
13075 0 : return JS_FALSE;
13076 0 : nsRefPtr<nsContentList> result = self->GetElementsByName(arg0);
13077 0 : if (!result) {
13078 0 : *vp = JSVAL_NULL;
13079 0 : return JS_TRUE;
13080 : }
13081 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13082 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13083 0 : return JS_TRUE;
13084 : }
13085 : // After this point do not use 'result'!
13086 0 : qsObjectHelper helper(result, cache);
13087 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
13088 : }
13089 :
13090 : static JSBool
13091 0 : nsIDOMHTMLDocument_GetAnchors(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13092 : {
13093 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13094 0 : JSObject *callee = nsnull;
13095 : nsHTMLDocument *self;
13096 0 : xpc_qsSelfRef selfref;
13097 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13098 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13099 0 : return JS_FALSE;
13100 : nsresult rv;
13101 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13102 0 : rv = self->GetAnchors(getter_AddRefs(result));
13103 0 : if (NS_FAILED(rv))
13104 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13105 0 : if (!result) {
13106 0 : *vp = JSVAL_NULL;
13107 0 : return JS_TRUE;
13108 : }
13109 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13110 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13111 0 : return JS_TRUE;
13112 : }
13113 : // After this point do not use 'result'!
13114 0 : qsObjectHelper helper(result, cache);
13115 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13116 : }
13117 :
13118 : static JSBool
13119 0 : nsIDOMHTMLDocument_GetLinks(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13120 : {
13121 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13122 0 : JSObject *callee = nsnull;
13123 : nsHTMLDocument *self;
13124 0 : xpc_qsSelfRef selfref;
13125 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13126 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13127 0 : return JS_FALSE;
13128 : nsresult rv;
13129 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13130 0 : rv = self->GetLinks(getter_AddRefs(result));
13131 0 : if (NS_FAILED(rv))
13132 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13133 0 : if (!result) {
13134 0 : *vp = JSVAL_NULL;
13135 0 : return JS_TRUE;
13136 : }
13137 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13138 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13139 0 : return JS_TRUE;
13140 : }
13141 : // After this point do not use 'result'!
13142 0 : qsObjectHelper helper(result, cache);
13143 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13144 : }
13145 :
13146 : static JSBool
13147 0 : nsIDOMHTMLDocument_GetURL(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13148 : {
13149 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13150 : nsHTMLDocument *self;
13151 0 : xpc_qsSelfRef selfref;
13152 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13153 0 : return JS_FALSE;
13154 : nsresult rv;
13155 0 : nsString result;
13156 0 : rv = self->GetURL(result);
13157 0 : if (NS_FAILED(rv))
13158 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13159 0 : return xpc::StringToJsval(cx, result, vp);
13160 : }
13161 :
13162 : static JSBool
13163 0 : nsIDOMHTMLDocument_GetForms(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13164 : {
13165 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13166 0 : JSObject *callee = nsnull;
13167 : nsHTMLDocument *self;
13168 0 : xpc_qsSelfRef selfref;
13169 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13170 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13171 0 : return JS_FALSE;
13172 : nsresult rv;
13173 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13174 0 : rv = self->GetForms(getter_AddRefs(result));
13175 0 : if (NS_FAILED(rv))
13176 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13177 0 : if (!result) {
13178 0 : *vp = JSVAL_NULL;
13179 0 : return JS_TRUE;
13180 : }
13181 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13182 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13183 0 : return JS_TRUE;
13184 : }
13185 : // After this point do not use 'result'!
13186 0 : qsObjectHelper helper(result, cache);
13187 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13188 : }
13189 :
13190 : static JSBool
13191 0 : nsIDOMHTMLDocument_GetCookie(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13192 : {
13193 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13194 : nsHTMLDocument *self;
13195 0 : xpc_qsSelfRef selfref;
13196 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13197 0 : return JS_FALSE;
13198 : nsresult rv;
13199 0 : nsString result;
13200 0 : rv = self->GetCookie(result);
13201 0 : if (NS_FAILED(rv))
13202 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13203 0 : return xpc::StringToJsval(cx, result, vp);
13204 : }
13205 :
13206 : static JSBool
13207 0 : nsIDOMHTMLDocument_SetCookie(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13208 : {
13209 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13210 : nsHTMLDocument *self;
13211 0 : xpc_qsSelfRef selfref;
13212 0 : JS::AutoValueRooter tvr(cx);
13213 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13214 0 : return JS_FALSE;
13215 : xpc_qsDOMString arg0(cx, *vp, vp,
13216 : xpc_qsDOMString::eDefaultNullBehavior,
13217 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13218 0 : if (!arg0.IsValid())
13219 0 : return JS_FALSE;
13220 : nsresult rv;
13221 0 : rv = self->SetCookie(arg0);
13222 0 : if (NS_FAILED(rv))
13223 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13224 0 : return JS_TRUE;
13225 : }
13226 :
13227 : static JSBool
13228 0 : nsIDOMHTMLDocument_GetImages(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13229 : {
13230 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13231 0 : JSObject *callee = nsnull;
13232 : nsHTMLDocument *self;
13233 0 : xpc_qsSelfRef selfref;
13234 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13235 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13236 0 : return JS_FALSE;
13237 : nsresult rv;
13238 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13239 0 : rv = self->GetImages(getter_AddRefs(result));
13240 0 : if (NS_FAILED(rv))
13241 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13242 0 : if (!result) {
13243 0 : *vp = JSVAL_NULL;
13244 0 : return JS_TRUE;
13245 : }
13246 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13247 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13248 0 : return JS_TRUE;
13249 : }
13250 : // After this point do not use 'result'!
13251 0 : qsObjectHelper helper(result, cache);
13252 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13253 : }
13254 :
13255 : static JSBool
13256 0 : nsIDOMHTMLDocument_Write(JSContext *cx, unsigned argc, jsval *vp)
13257 : {
13258 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13259 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13260 0 : if (!obj)
13261 0 : return JS_FALSE;
13262 : nsHTMLDocument *self;
13263 0 : xpc_qsSelfRef selfref;
13264 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13265 0 : return JS_FALSE;
13266 0 : jsval *argv = JS_ARGV(cx, vp);
13267 : xpc_qsDOMString arg0(cx, (0 < argc ? argv[0] : JSVAL_NULL), (0 < argc ? &argv[0] : NULL),
13268 : xpc_qsDOMString::eStringify,
13269 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13270 0 : if (!arg0.IsValid())
13271 0 : return JS_FALSE;
13272 : nsresult rv;
13273 :
13274 0 : nsAString &str = arg0;
13275 0 : for (unsigned i = 1; i < argc; ++i) {
13276 0 : xpc_qsDOMString next_arg(cx, argv[i], &argv[i],
13277 : xpc_qsDOMString::eStringify,
13278 0 : xpc_qsDOMString::eStringify);
13279 0 : if (!next_arg.IsValid())
13280 0 : return JS_FALSE;
13281 :
13282 0 : str.Append(next_arg);
13283 : }
13284 :
13285 0 : rv = self->Write(arg0, cx);
13286 :
13287 0 : if (NS_FAILED(rv))
13288 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13289 0 : *vp = JSVAL_VOID;
13290 0 : return JS_TRUE;
13291 : }
13292 :
13293 : static JSBool
13294 0 : nsIDOMHTMLDocument_Writeln(JSContext *cx, unsigned argc, jsval *vp)
13295 : {
13296 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13297 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13298 0 : if (!obj)
13299 0 : return JS_FALSE;
13300 : nsHTMLDocument *self;
13301 0 : xpc_qsSelfRef selfref;
13302 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13303 0 : return JS_FALSE;
13304 0 : jsval *argv = JS_ARGV(cx, vp);
13305 : xpc_qsDOMString arg0(cx, (0 < argc ? argv[0] : JSVAL_NULL), (0 < argc ? &argv[0] : NULL),
13306 : xpc_qsDOMString::eStringify,
13307 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13308 0 : if (!arg0.IsValid())
13309 0 : return JS_FALSE;
13310 : nsresult rv;
13311 :
13312 0 : nsAString &str = arg0;
13313 0 : for (unsigned i = 1; i < argc; ++i) {
13314 0 : xpc_qsDOMString next_arg(cx, argv[i], &argv[i],
13315 : xpc_qsDOMString::eStringify,
13316 0 : xpc_qsDOMString::eStringify);
13317 0 : if (!next_arg.IsValid())
13318 0 : return JS_FALSE;
13319 :
13320 0 : str.Append(next_arg);
13321 : }
13322 :
13323 0 : rv = self->Writeln(arg0, cx);
13324 :
13325 0 : if (NS_FAILED(rv))
13326 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13327 0 : *vp = JSVAL_VOID;
13328 0 : return JS_TRUE;
13329 : }
13330 :
13331 : static JSBool
13332 0 : nsIDOMHTMLDocument_GetDomain(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13333 : {
13334 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13335 : nsHTMLDocument *self;
13336 0 : xpc_qsSelfRef selfref;
13337 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13338 0 : return JS_FALSE;
13339 : nsresult rv;
13340 0 : nsString result;
13341 0 : rv = self->GetDomain(result);
13342 0 : if (NS_FAILED(rv))
13343 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13344 0 : return xpc::StringToJsval(cx, result, vp);
13345 : }
13346 :
13347 : static JSBool
13348 0 : nsIDOMHTMLDocument_SetDomain(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13349 : {
13350 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13351 : nsHTMLDocument *self;
13352 0 : xpc_qsSelfRef selfref;
13353 0 : JS::AutoValueRooter tvr(cx);
13354 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13355 0 : return JS_FALSE;
13356 : xpc_qsDOMString arg0(cx, *vp, vp,
13357 : xpc_qsDOMString::eDefaultNullBehavior,
13358 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13359 0 : if (!arg0.IsValid())
13360 0 : return JS_FALSE;
13361 : nsresult rv;
13362 0 : rv = self->SetDomain(arg0);
13363 0 : if (NS_FAILED(rv))
13364 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13365 0 : return JS_TRUE;
13366 : }
13367 :
13368 : static JSBool
13369 0 : nsIDOMHTMLDocument_GetSelection(JSContext *cx, unsigned argc, jsval *vp)
13370 : {
13371 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13372 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13373 0 : if (!obj)
13374 0 : return JS_FALSE;
13375 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
13376 : nsHTMLDocument *self;
13377 0 : xpc_qsSelfRef selfref;
13378 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13379 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
13380 0 : return JS_FALSE;
13381 : nsresult rv;
13382 0 : nsCOMPtr<nsISelection> result;
13383 0 : rv = self->GetSelection(getter_AddRefs(result));
13384 0 : if (NS_FAILED(rv))
13385 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13386 0 : if (!result) {
13387 0 : *vp = JSVAL_NULL;
13388 0 : return JS_TRUE;
13389 : }
13390 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13391 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13392 0 : return JS_TRUE;
13393 : }
13394 : // After this point do not use 'result'!
13395 0 : qsObjectHelper helper(result, cache);
13396 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISelection), &interfaces[k_nsISelection], vp);
13397 : }
13398 :
13399 : static JSBool
13400 0 : nsIDOMHTMLDocument_GetDesignMode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13401 : {
13402 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13403 : nsHTMLDocument *self;
13404 0 : xpc_qsSelfRef selfref;
13405 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13406 0 : return JS_FALSE;
13407 : nsresult rv;
13408 0 : nsString result;
13409 0 : rv = self->GetDesignMode(result);
13410 0 : if (NS_FAILED(rv))
13411 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13412 0 : return xpc::StringToJsval(cx, result, vp);
13413 : }
13414 :
13415 : static JSBool
13416 0 : nsIDOMHTMLDocument_SetDesignMode(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13417 : {
13418 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13419 : nsHTMLDocument *self;
13420 0 : xpc_qsSelfRef selfref;
13421 0 : JS::AutoValueRooter tvr(cx);
13422 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13423 0 : return JS_FALSE;
13424 : xpc_qsDOMString arg0(cx, *vp, vp,
13425 : xpc_qsDOMString::eDefaultNullBehavior,
13426 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13427 0 : if (!arg0.IsValid())
13428 0 : return JS_FALSE;
13429 : nsresult rv;
13430 0 : rv = self->SetDesignMode(arg0);
13431 0 : if (NS_FAILED(rv))
13432 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13433 0 : return JS_TRUE;
13434 : }
13435 :
13436 : static JSBool
13437 0 : nsIDOMHTMLDocument_GetHead(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13438 : {
13439 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13440 0 : JSObject *callee = nsnull;
13441 : nsHTMLDocument *self;
13442 0 : xpc_qsSelfRef selfref;
13443 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13444 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13445 0 : return JS_FALSE;
13446 0 : nsIContent *result = self->GetHead();
13447 : #ifdef DEBUG
13448 : nsresult debug_rv;
13449 0 : nsCOMPtr<nsIDOMHTMLDocument> debug_self;
13450 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
13451 0 : nsCOMPtr<nsIDOMHTMLHeadElement> debug_result;
13452 0 : debug_rv = debug_self->GetHead(getter_AddRefs(debug_result));
13453 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
13454 : "Got the wrong answer from the custom method call!");
13455 : #endif
13456 0 : if (!result) {
13457 0 : *vp = JSVAL_NULL;
13458 0 : return JS_TRUE;
13459 : }
13460 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13461 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13462 0 : return JS_TRUE;
13463 : }
13464 : // After this point do not use 'result'!
13465 0 : qsObjectHelper helper(result, cache);
13466 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLHeadElement), &interfaces[k_nsIDOMHTMLHeadElement], vp);
13467 : }
13468 :
13469 : // === interface nsIDOMHTMLElement
13470 :
13471 : static JSBool
13472 0 : nsIDOMHTMLElement_GetId(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13473 : {
13474 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13475 : nsGenericHTMLElement *self;
13476 0 : xpc_qsSelfRef selfref;
13477 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13478 0 : return JS_FALSE;
13479 : nsresult rv;
13480 0 : nsString result;
13481 0 : rv = self->GetId(result);
13482 0 : if (NS_FAILED(rv))
13483 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13484 0 : return xpc::StringToJsval(cx, result, vp);
13485 : }
13486 :
13487 : static JSBool
13488 0 : nsIDOMHTMLElement_SetId(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13489 : {
13490 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13491 : nsGenericHTMLElement *self;
13492 0 : xpc_qsSelfRef selfref;
13493 0 : JS::AutoValueRooter tvr(cx);
13494 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13495 0 : return JS_FALSE;
13496 : xpc_qsDOMString arg0(cx, *vp, vp,
13497 : xpc_qsDOMString::eDefaultNullBehavior,
13498 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13499 0 : if (!arg0.IsValid())
13500 0 : return JS_FALSE;
13501 : nsresult rv;
13502 0 : rv = self->SetId(arg0);
13503 0 : if (NS_FAILED(rv))
13504 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13505 0 : return JS_TRUE;
13506 : }
13507 :
13508 : static JSBool
13509 0 : nsIDOMHTMLElement_GetTitle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13510 : {
13511 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13512 : nsGenericHTMLElement *self;
13513 0 : xpc_qsSelfRef selfref;
13514 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13515 0 : return JS_FALSE;
13516 : nsresult rv;
13517 0 : nsString result;
13518 0 : rv = self->GetTitle(result);
13519 0 : if (NS_FAILED(rv))
13520 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13521 0 : return xpc::StringToJsval(cx, result, vp);
13522 : }
13523 :
13524 : static JSBool
13525 0 : nsIDOMHTMLElement_SetTitle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13526 : {
13527 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13528 : nsGenericHTMLElement *self;
13529 0 : xpc_qsSelfRef selfref;
13530 0 : JS::AutoValueRooter tvr(cx);
13531 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13532 0 : return JS_FALSE;
13533 : xpc_qsDOMString arg0(cx, *vp, vp,
13534 : xpc_qsDOMString::eDefaultNullBehavior,
13535 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13536 0 : if (!arg0.IsValid())
13537 0 : return JS_FALSE;
13538 : nsresult rv;
13539 0 : rv = self->SetTitle(arg0);
13540 0 : if (NS_FAILED(rv))
13541 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13542 0 : return JS_TRUE;
13543 : }
13544 :
13545 : static JSBool
13546 0 : nsIDOMHTMLElement_GetLang(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13547 : {
13548 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13549 : nsGenericHTMLElement *self;
13550 0 : xpc_qsSelfRef selfref;
13551 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13552 0 : return JS_FALSE;
13553 : nsresult rv;
13554 0 : nsString result;
13555 0 : rv = self->GetLang(result);
13556 0 : if (NS_FAILED(rv))
13557 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13558 0 : return xpc::StringToJsval(cx, result, vp);
13559 : }
13560 :
13561 : static JSBool
13562 0 : nsIDOMHTMLElement_SetLang(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13563 : {
13564 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13565 : nsGenericHTMLElement *self;
13566 0 : xpc_qsSelfRef selfref;
13567 0 : JS::AutoValueRooter tvr(cx);
13568 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13569 0 : return JS_FALSE;
13570 : xpc_qsDOMString arg0(cx, *vp, vp,
13571 : xpc_qsDOMString::eDefaultNullBehavior,
13572 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13573 0 : if (!arg0.IsValid())
13574 0 : return JS_FALSE;
13575 : nsresult rv;
13576 0 : rv = self->SetLang(arg0);
13577 0 : if (NS_FAILED(rv))
13578 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13579 0 : return JS_TRUE;
13580 : }
13581 :
13582 : static JSBool
13583 0 : nsIDOMHTMLElement_GetDir(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13584 : {
13585 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13586 : nsGenericHTMLElement *self;
13587 0 : xpc_qsSelfRef selfref;
13588 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13589 0 : return JS_FALSE;
13590 : nsresult rv;
13591 0 : nsString result;
13592 0 : rv = self->GetDir(result);
13593 0 : if (NS_FAILED(rv))
13594 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13595 0 : return xpc::StringToJsval(cx, result, vp);
13596 : }
13597 :
13598 : static JSBool
13599 0 : nsIDOMHTMLElement_SetDir(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13600 : {
13601 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13602 : nsGenericHTMLElement *self;
13603 0 : xpc_qsSelfRef selfref;
13604 0 : JS::AutoValueRooter tvr(cx);
13605 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13606 0 : return JS_FALSE;
13607 : xpc_qsDOMString arg0(cx, *vp, vp,
13608 : xpc_qsDOMString::eDefaultNullBehavior,
13609 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13610 0 : if (!arg0.IsValid())
13611 0 : return JS_FALSE;
13612 : nsresult rv;
13613 0 : rv = self->SetDir(arg0);
13614 0 : if (NS_FAILED(rv))
13615 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13616 0 : return JS_TRUE;
13617 : }
13618 :
13619 : static JSBool
13620 0 : nsIDOMHTMLElement_GetClassName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13621 : {
13622 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13623 : nsGenericHTMLElement *self;
13624 0 : xpc_qsSelfRef selfref;
13625 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13626 0 : return JS_FALSE;
13627 : nsresult rv;
13628 0 : nsString result;
13629 0 : rv = self->GetClassName(result);
13630 0 : if (NS_FAILED(rv))
13631 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13632 0 : return xpc::StringToJsval(cx, result, vp);
13633 : }
13634 :
13635 : static JSBool
13636 0 : nsIDOMHTMLElement_SetClassName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13637 : {
13638 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13639 : nsGenericHTMLElement *self;
13640 0 : xpc_qsSelfRef selfref;
13641 0 : JS::AutoValueRooter tvr(cx);
13642 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13643 0 : return JS_FALSE;
13644 : xpc_qsDOMString arg0(cx, *vp, vp,
13645 : xpc_qsDOMString::eDefaultNullBehavior,
13646 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13647 0 : if (!arg0.IsValid())
13648 0 : return JS_FALSE;
13649 : nsresult rv;
13650 0 : rv = self->SetClassName(arg0);
13651 0 : if (NS_FAILED(rv))
13652 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13653 0 : return JS_TRUE;
13654 : }
13655 :
13656 : static JSBool
13657 0 : nsIDOMHTMLElement_GetDataset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13658 : {
13659 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13660 0 : JSObject *callee = nsnull;
13661 : nsGenericHTMLElement *self;
13662 0 : xpc_qsSelfRef selfref;
13663 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13664 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13665 0 : return JS_FALSE;
13666 : nsresult rv;
13667 0 : nsCOMPtr<nsIDOMDOMStringMap> result;
13668 0 : rv = self->GetDataset(getter_AddRefs(result));
13669 0 : if (NS_FAILED(rv))
13670 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13671 0 : if (!result) {
13672 0 : *vp = JSVAL_NULL;
13673 0 : return JS_TRUE;
13674 : }
13675 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13676 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13677 0 : return JS_TRUE;
13678 : }
13679 : // After this point do not use 'result'!
13680 0 : qsObjectHelper helper(result, cache);
13681 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringMap), &interfaces[k_nsIDOMDOMStringMap], vp);
13682 : }
13683 :
13684 : static JSBool
13685 0 : nsIDOMHTMLElement_GetHidden(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13686 : {
13687 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13688 : nsGenericHTMLElement *self;
13689 0 : xpc_qsSelfRef selfref;
13690 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13691 0 : return JS_FALSE;
13692 : nsresult rv;
13693 : bool result;
13694 0 : rv = self->GetHidden(&result);
13695 0 : if (NS_FAILED(rv))
13696 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13697 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13698 0 : return JS_TRUE;
13699 : }
13700 :
13701 : static JSBool
13702 0 : nsIDOMHTMLElement_SetHidden(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13703 : {
13704 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13705 : nsGenericHTMLElement *self;
13706 0 : xpc_qsSelfRef selfref;
13707 0 : JS::AutoValueRooter tvr(cx);
13708 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13709 0 : return JS_FALSE;
13710 : JSBool arg0;
13711 0 : JS_ValueToBoolean(cx, *vp, &arg0);
13712 : nsresult rv;
13713 0 : rv = self->SetHidden(arg0);
13714 0 : if (NS_FAILED(rv))
13715 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13716 0 : return JS_TRUE;
13717 : }
13718 :
13719 : static JSBool
13720 0 : nsIDOMHTMLElement_Click(JSContext *cx, unsigned argc, jsval *vp)
13721 : {
13722 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13723 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13724 0 : if (!obj)
13725 0 : return JS_FALSE;
13726 : nsGenericHTMLElement *self;
13727 0 : xpc_qsSelfRef selfref;
13728 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13729 0 : return JS_FALSE;
13730 : nsresult rv;
13731 0 : rv = self->Click();
13732 0 : if (NS_FAILED(rv))
13733 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13734 0 : *vp = JSVAL_VOID;
13735 0 : return JS_TRUE;
13736 : }
13737 :
13738 : static JSBool
13739 0 : nsIDOMHTMLElement_GetTabIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13740 : {
13741 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13742 : nsGenericHTMLElement *self;
13743 0 : xpc_qsSelfRef selfref;
13744 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13745 0 : return JS_FALSE;
13746 : nsresult rv;
13747 : PRInt32 result;
13748 0 : rv = self->GetTabIndex(&result);
13749 0 : if (NS_FAILED(rv))
13750 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13751 0 : *vp = INT_TO_JSVAL(result);
13752 0 : return JS_TRUE;
13753 : }
13754 :
13755 : static JSBool
13756 0 : nsIDOMHTMLElement_SetTabIndex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13757 : {
13758 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13759 : nsGenericHTMLElement *self;
13760 0 : xpc_qsSelfRef selfref;
13761 0 : JS::AutoValueRooter tvr(cx);
13762 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13763 0 : return JS_FALSE;
13764 : int32_t arg0;
13765 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
13766 0 : return JS_FALSE;
13767 : nsresult rv;
13768 0 : rv = self->SetTabIndex(arg0);
13769 0 : if (NS_FAILED(rv))
13770 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13771 0 : return JS_TRUE;
13772 : }
13773 :
13774 : static JSBool
13775 0 : nsIDOMHTMLElement_Focus(JSContext *cx, unsigned argc, jsval *vp)
13776 : {
13777 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13778 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13779 0 : if (!obj)
13780 0 : return JS_FALSE;
13781 : nsGenericHTMLElement *self;
13782 0 : xpc_qsSelfRef selfref;
13783 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13784 0 : return JS_FALSE;
13785 : nsresult rv;
13786 0 : rv = self->Focus();
13787 0 : if (NS_FAILED(rv))
13788 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13789 0 : *vp = JSVAL_VOID;
13790 0 : return JS_TRUE;
13791 : }
13792 :
13793 : static JSBool
13794 0 : nsIDOMHTMLElement_Blur(JSContext *cx, unsigned argc, jsval *vp)
13795 : {
13796 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13797 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13798 0 : if (!obj)
13799 0 : return JS_FALSE;
13800 : nsGenericHTMLElement *self;
13801 0 : xpc_qsSelfRef selfref;
13802 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13803 0 : return JS_FALSE;
13804 : nsresult rv;
13805 0 : rv = self->Blur();
13806 0 : if (NS_FAILED(rv))
13807 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13808 0 : *vp = JSVAL_VOID;
13809 0 : return JS_TRUE;
13810 : }
13811 :
13812 : static JSBool
13813 0 : nsIDOMHTMLElement_GetAccessKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13814 : {
13815 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13816 : nsGenericHTMLElement *self;
13817 0 : xpc_qsSelfRef selfref;
13818 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13819 0 : return JS_FALSE;
13820 : nsresult rv;
13821 0 : nsString result;
13822 0 : rv = self->GetAccessKey(result);
13823 0 : if (NS_FAILED(rv))
13824 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13825 0 : return xpc::StringToJsval(cx, result, vp);
13826 : }
13827 :
13828 : static JSBool
13829 0 : nsIDOMHTMLElement_SetAccessKey(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13830 : {
13831 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13832 : nsGenericHTMLElement *self;
13833 0 : xpc_qsSelfRef selfref;
13834 0 : JS::AutoValueRooter tvr(cx);
13835 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13836 0 : return JS_FALSE;
13837 : xpc_qsDOMString arg0(cx, *vp, vp,
13838 : xpc_qsDOMString::eDefaultNullBehavior,
13839 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13840 0 : if (!arg0.IsValid())
13841 0 : return JS_FALSE;
13842 : nsresult rv;
13843 0 : rv = self->SetAccessKey(arg0);
13844 0 : if (NS_FAILED(rv))
13845 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13846 0 : return JS_TRUE;
13847 : }
13848 :
13849 : static JSBool
13850 0 : nsIDOMHTMLElement_GetAccessKeyLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13851 : {
13852 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13853 : nsGenericHTMLElement *self;
13854 0 : xpc_qsSelfRef selfref;
13855 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13856 0 : return JS_FALSE;
13857 : nsresult rv;
13858 0 : nsString result;
13859 0 : rv = self->GetAccessKeyLabel(result);
13860 0 : if (NS_FAILED(rv))
13861 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13862 0 : return xpc::StringToJsval(cx, result, vp);
13863 : }
13864 :
13865 : static JSBool
13866 0 : nsIDOMHTMLElement_GetDraggable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13867 : {
13868 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13869 : nsGenericHTMLElement *self;
13870 0 : xpc_qsSelfRef selfref;
13871 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13872 0 : return JS_FALSE;
13873 : nsresult rv;
13874 : bool result;
13875 0 : rv = self->GetDraggable(&result);
13876 0 : if (NS_FAILED(rv))
13877 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13878 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13879 0 : return JS_TRUE;
13880 : }
13881 :
13882 : static JSBool
13883 0 : nsIDOMHTMLElement_SetDraggable(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13884 : {
13885 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13886 : nsGenericHTMLElement *self;
13887 0 : xpc_qsSelfRef selfref;
13888 0 : JS::AutoValueRooter tvr(cx);
13889 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13890 0 : return JS_FALSE;
13891 : JSBool arg0;
13892 0 : JS_ValueToBoolean(cx, *vp, &arg0);
13893 : nsresult rv;
13894 0 : rv = self->SetDraggable(arg0);
13895 0 : if (NS_FAILED(rv))
13896 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13897 0 : return JS_TRUE;
13898 : }
13899 :
13900 : static JSBool
13901 0 : nsIDOMHTMLElement_GetContentEditable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13902 : {
13903 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13904 : nsGenericHTMLElement *self;
13905 0 : xpc_qsSelfRef selfref;
13906 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13907 0 : return JS_FALSE;
13908 : nsresult rv;
13909 0 : nsString result;
13910 0 : rv = self->GetContentEditable(result);
13911 0 : if (NS_FAILED(rv))
13912 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13913 0 : return xpc::StringToJsval(cx, result, vp);
13914 : }
13915 :
13916 : static JSBool
13917 0 : nsIDOMHTMLElement_SetContentEditable(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13918 : {
13919 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13920 : nsGenericHTMLElement *self;
13921 0 : xpc_qsSelfRef selfref;
13922 0 : JS::AutoValueRooter tvr(cx);
13923 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13924 0 : return JS_FALSE;
13925 : xpc_qsDOMString arg0(cx, *vp, vp,
13926 : xpc_qsDOMString::eDefaultNullBehavior,
13927 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13928 0 : if (!arg0.IsValid())
13929 0 : return JS_FALSE;
13930 : nsresult rv;
13931 0 : rv = self->SetContentEditable(arg0);
13932 0 : if (NS_FAILED(rv))
13933 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13934 0 : return JS_TRUE;
13935 : }
13936 :
13937 : static JSBool
13938 0 : nsIDOMHTMLElement_GetIsContentEditable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13939 : {
13940 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13941 : nsGenericHTMLElement *self;
13942 0 : xpc_qsSelfRef selfref;
13943 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13944 0 : return JS_FALSE;
13945 : nsresult rv;
13946 : bool result;
13947 0 : rv = self->GetIsContentEditable(&result);
13948 0 : if (NS_FAILED(rv))
13949 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13950 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13951 0 : return JS_TRUE;
13952 : }
13953 :
13954 : static JSBool
13955 0 : nsIDOMHTMLElement_GetContextMenu(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13956 : {
13957 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13958 0 : JSObject *callee = nsnull;
13959 : nsGenericHTMLElement *self;
13960 0 : xpc_qsSelfRef selfref;
13961 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13962 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13963 0 : return JS_FALSE;
13964 : nsresult rv;
13965 0 : nsCOMPtr<nsIDOMHTMLMenuElement> result;
13966 0 : rv = self->GetContextMenu(getter_AddRefs(result));
13967 0 : if (NS_FAILED(rv))
13968 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13969 0 : if (!result) {
13970 0 : *vp = JSVAL_NULL;
13971 0 : return JS_TRUE;
13972 : }
13973 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13974 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13975 0 : return JS_TRUE;
13976 : }
13977 : // After this point do not use 'result'!
13978 0 : qsObjectHelper helper(result, cache);
13979 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLMenuElement), &interfaces[k_nsIDOMHTMLMenuElement], vp);
13980 : }
13981 :
13982 : static JSBool
13983 0 : nsIDOMHTMLElement_GetSpellcheck(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13984 : {
13985 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13986 : nsGenericHTMLElement *self;
13987 0 : xpc_qsSelfRef selfref;
13988 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13989 0 : return JS_FALSE;
13990 : nsresult rv;
13991 : bool result;
13992 0 : rv = self->GetSpellcheck(&result);
13993 0 : if (NS_FAILED(rv))
13994 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13995 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13996 0 : return JS_TRUE;
13997 : }
13998 :
13999 : static JSBool
14000 0 : nsIDOMHTMLElement_SetSpellcheck(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14001 : {
14002 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14003 : nsGenericHTMLElement *self;
14004 0 : xpc_qsSelfRef selfref;
14005 0 : JS::AutoValueRooter tvr(cx);
14006 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14007 0 : return JS_FALSE;
14008 : JSBool arg0;
14009 0 : JS_ValueToBoolean(cx, *vp, &arg0);
14010 : nsresult rv;
14011 0 : rv = self->SetSpellcheck(arg0);
14012 0 : if (NS_FAILED(rv))
14013 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14014 0 : return JS_TRUE;
14015 : }
14016 :
14017 : static JSBool
14018 0 : nsIDOMHTMLElement_GetInnerHTML(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14019 : {
14020 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14021 : nsGenericHTMLElement *self;
14022 0 : xpc_qsSelfRef selfref;
14023 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14024 0 : return JS_FALSE;
14025 : nsresult rv;
14026 0 : nsString result;
14027 0 : rv = self->GetInnerHTML(result);
14028 0 : if (NS_FAILED(rv))
14029 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14030 0 : return xpc::StringToJsval(cx, result, vp);
14031 : }
14032 :
14033 : static JSBool
14034 0 : nsIDOMHTMLElement_SetInnerHTML(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14035 : {
14036 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14037 : nsGenericHTMLElement *self;
14038 0 : xpc_qsSelfRef selfref;
14039 0 : JS::AutoValueRooter tvr(cx);
14040 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14041 0 : return JS_FALSE;
14042 : xpc_qsDOMString arg0(cx, *vp, vp,
14043 : xpc_qsDOMString::eDefaultNullBehavior,
14044 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14045 0 : if (!arg0.IsValid())
14046 0 : return JS_FALSE;
14047 : nsresult rv;
14048 0 : rv = self->SetInnerHTML(arg0);
14049 0 : if (NS_FAILED(rv))
14050 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14051 0 : return JS_TRUE;
14052 : }
14053 :
14054 : static JSBool
14055 0 : nsIDOMHTMLElement_GetOuterHTML(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14056 : {
14057 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14058 : nsGenericHTMLElement *self;
14059 0 : xpc_qsSelfRef selfref;
14060 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14061 0 : return JS_FALSE;
14062 : nsresult rv;
14063 0 : nsString result;
14064 0 : rv = self->GetOuterHTML(result);
14065 0 : if (NS_FAILED(rv))
14066 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14067 0 : return xpc::StringToJsval(cx, result, vp);
14068 : }
14069 :
14070 : static JSBool
14071 0 : nsIDOMHTMLElement_SetOuterHTML(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14072 : {
14073 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14074 : nsGenericHTMLElement *self;
14075 0 : xpc_qsSelfRef selfref;
14076 0 : JS::AutoValueRooter tvr(cx);
14077 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14078 0 : return JS_FALSE;
14079 : xpc_qsDOMString arg0(cx, *vp, vp,
14080 : xpc_qsDOMString::eDefaultNullBehavior,
14081 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14082 0 : if (!arg0.IsValid())
14083 0 : return JS_FALSE;
14084 : nsresult rv;
14085 0 : rv = self->SetOuterHTML(arg0);
14086 0 : if (NS_FAILED(rv))
14087 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14088 0 : return JS_TRUE;
14089 : }
14090 :
14091 : static JSBool
14092 0 : nsIDOMHTMLElement_InsertAdjacentHTML(JSContext *cx, unsigned argc, jsval *vp)
14093 : {
14094 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14095 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14096 0 : if (!obj)
14097 0 : return JS_FALSE;
14098 : nsGenericHTMLElement *self;
14099 0 : xpc_qsSelfRef selfref;
14100 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14101 0 : return JS_FALSE;
14102 0 : if (argc < 2)
14103 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
14104 0 : jsval *argv = JS_ARGV(cx, vp);
14105 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
14106 : xpc_qsDOMString::eDefaultNullBehavior,
14107 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14108 0 : if (!arg0.IsValid())
14109 0 : return JS_FALSE;
14110 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
14111 : xpc_qsDOMString::eDefaultNullBehavior,
14112 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14113 0 : if (!arg1.IsValid())
14114 0 : return JS_FALSE;
14115 : nsresult rv;
14116 0 : rv = self->InsertAdjacentHTML(arg0, arg1);
14117 0 : if (NS_FAILED(rv))
14118 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14119 0 : *vp = JSVAL_VOID;
14120 0 : return JS_TRUE;
14121 : }
14122 :
14123 : static JSBool
14124 0 : nsIDOMHTMLElement_ScrollIntoView(JSContext *cx, unsigned argc, jsval *vp)
14125 : {
14126 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14127 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14128 0 : if (!obj)
14129 0 : return JS_FALSE;
14130 : nsGenericHTMLElement *self;
14131 0 : xpc_qsSelfRef selfref;
14132 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14133 0 : return JS_FALSE;
14134 0 : jsval *argv = JS_ARGV(cx, vp);
14135 : JSBool arg0;
14136 0 : JS_ValueToBoolean(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0);
14137 : nsresult rv;
14138 0 : rv = self->ScrollIntoView(arg0, NS_MIN<PRUint32>(argc, 1) - 0);
14139 0 : if (NS_FAILED(rv))
14140 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14141 0 : *vp = JSVAL_VOID;
14142 0 : return JS_TRUE;
14143 : }
14144 :
14145 : static JSBool
14146 0 : nsIDOMHTMLElement_GetOffsetParent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14147 : {
14148 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14149 0 : JSObject *callee = nsnull;
14150 : nsGenericHTMLElement *self;
14151 0 : xpc_qsSelfRef selfref;
14152 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14153 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14154 0 : return JS_FALSE;
14155 : nsresult rv;
14156 0 : nsCOMPtr<nsIDOMElement> result;
14157 0 : rv = self->GetOffsetParent(getter_AddRefs(result));
14158 0 : if (NS_FAILED(rv))
14159 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14160 0 : if (!result) {
14161 0 : *vp = JSVAL_NULL;
14162 0 : return JS_TRUE;
14163 : }
14164 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14165 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14166 0 : return JS_TRUE;
14167 : }
14168 : // After this point do not use 'result'!
14169 0 : qsObjectHelper helper(result, cache);
14170 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
14171 : }
14172 :
14173 : static JSBool
14174 0 : nsIDOMHTMLElement_GetOffsetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14175 : {
14176 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14177 : nsGenericHTMLElement *self;
14178 0 : xpc_qsSelfRef selfref;
14179 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14180 0 : return JS_FALSE;
14181 : nsresult rv;
14182 : PRInt32 result;
14183 0 : rv = self->GetOffsetTop(&result);
14184 0 : if (NS_FAILED(rv))
14185 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14186 0 : *vp = INT_TO_JSVAL(result);
14187 0 : return JS_TRUE;
14188 : }
14189 :
14190 : static JSBool
14191 0 : nsIDOMHTMLElement_GetOffsetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14192 : {
14193 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14194 : nsGenericHTMLElement *self;
14195 0 : xpc_qsSelfRef selfref;
14196 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14197 0 : return JS_FALSE;
14198 : nsresult rv;
14199 : PRInt32 result;
14200 0 : rv = self->GetOffsetLeft(&result);
14201 0 : if (NS_FAILED(rv))
14202 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14203 0 : *vp = INT_TO_JSVAL(result);
14204 0 : return JS_TRUE;
14205 : }
14206 :
14207 : static JSBool
14208 0 : nsIDOMHTMLElement_GetOffsetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14209 : {
14210 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14211 : nsGenericHTMLElement *self;
14212 0 : xpc_qsSelfRef selfref;
14213 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14214 0 : return JS_FALSE;
14215 : nsresult rv;
14216 : PRInt32 result;
14217 0 : rv = self->GetOffsetWidth(&result);
14218 0 : if (NS_FAILED(rv))
14219 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14220 0 : *vp = INT_TO_JSVAL(result);
14221 0 : return JS_TRUE;
14222 : }
14223 :
14224 : static JSBool
14225 0 : nsIDOMHTMLElement_GetOffsetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14226 : {
14227 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14228 : nsGenericHTMLElement *self;
14229 0 : xpc_qsSelfRef selfref;
14230 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14231 0 : return JS_FALSE;
14232 : nsresult rv;
14233 : PRInt32 result;
14234 0 : rv = self->GetOffsetHeight(&result);
14235 0 : if (NS_FAILED(rv))
14236 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14237 0 : *vp = INT_TO_JSVAL(result);
14238 0 : return JS_TRUE;
14239 : }
14240 :
14241 : static JSBool
14242 0 : nsIDOMHTMLElement_MozRequestFullScreen(JSContext *cx, unsigned argc, jsval *vp)
14243 : {
14244 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14245 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14246 0 : if (!obj)
14247 0 : return JS_FALSE;
14248 : nsGenericHTMLElement *self;
14249 0 : xpc_qsSelfRef selfref;
14250 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14251 0 : return JS_FALSE;
14252 : nsresult rv;
14253 0 : rv = self->MozRequestFullScreen();
14254 0 : if (NS_FAILED(rv))
14255 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14256 0 : *vp = JSVAL_VOID;
14257 0 : return JS_TRUE;
14258 : }
14259 :
14260 : // === interface nsIDOMHTMLFormElement
14261 :
14262 : static JSBool
14263 0 : nsIDOMHTMLFormElement_GetElements(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14264 : {
14265 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14266 0 : JSObject *callee = nsnull;
14267 : nsIDOMHTMLFormElement *self;
14268 0 : xpc_qsSelfRef selfref;
14269 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14270 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14271 0 : return JS_FALSE;
14272 : nsresult rv;
14273 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
14274 0 : rv = self->GetElements(getter_AddRefs(result));
14275 0 : if (NS_FAILED(rv))
14276 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14277 0 : if (!result) {
14278 0 : *vp = JSVAL_NULL;
14279 0 : return JS_TRUE;
14280 : }
14281 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14282 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14283 0 : return JS_TRUE;
14284 : }
14285 : // After this point do not use 'result'!
14286 0 : qsObjectHelper helper(result, cache);
14287 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
14288 : }
14289 :
14290 : static JSBool
14291 0 : nsIDOMHTMLFormElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14292 : {
14293 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14294 : nsIDOMHTMLFormElement *self;
14295 0 : xpc_qsSelfRef selfref;
14296 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14297 0 : return JS_FALSE;
14298 : nsresult rv;
14299 0 : nsString result;
14300 0 : rv = self->GetName(result);
14301 0 : if (NS_FAILED(rv))
14302 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14303 0 : return xpc::StringToJsval(cx, result, vp);
14304 : }
14305 :
14306 : static JSBool
14307 0 : nsIDOMHTMLFormElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14308 : {
14309 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14310 : nsIDOMHTMLFormElement *self;
14311 0 : xpc_qsSelfRef selfref;
14312 0 : JS::AutoValueRooter tvr(cx);
14313 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14314 0 : return JS_FALSE;
14315 : xpc_qsDOMString arg0(cx, *vp, vp,
14316 : xpc_qsDOMString::eDefaultNullBehavior,
14317 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14318 0 : if (!arg0.IsValid())
14319 0 : return JS_FALSE;
14320 : nsresult rv;
14321 0 : rv = self->SetName(arg0);
14322 0 : if (NS_FAILED(rv))
14323 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14324 0 : return JS_TRUE;
14325 : }
14326 :
14327 : static JSBool
14328 0 : nsIDOMHTMLFormElement_Submit(JSContext *cx, unsigned argc, jsval *vp)
14329 : {
14330 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14331 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14332 0 : if (!obj)
14333 0 : return JS_FALSE;
14334 : nsIDOMHTMLFormElement *self;
14335 0 : xpc_qsSelfRef selfref;
14336 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14337 0 : return JS_FALSE;
14338 : nsresult rv;
14339 0 : rv = self->Submit();
14340 0 : if (NS_FAILED(rv))
14341 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14342 0 : *vp = JSVAL_VOID;
14343 0 : return JS_TRUE;
14344 : }
14345 :
14346 : static JSBool
14347 0 : nsIDOMHTMLFormElement_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14348 : {
14349 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14350 : nsIDOMHTMLFormElement *self;
14351 0 : xpc_qsSelfRef selfref;
14352 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14353 0 : return JS_FALSE;
14354 : nsresult rv;
14355 : PRInt32 result;
14356 0 : rv = self->GetLength(&result);
14357 0 : if (NS_FAILED(rv))
14358 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14359 0 : *vp = INT_TO_JSVAL(result);
14360 0 : return JS_TRUE;
14361 : }
14362 :
14363 : static JSBool
14364 0 : nsIDOMHTMLFormElement_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14365 : {
14366 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14367 : nsIDOMHTMLFormElement *self;
14368 0 : xpc_qsSelfRef selfref;
14369 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14370 0 : return JS_FALSE;
14371 : nsresult rv;
14372 0 : nsString result;
14373 0 : rv = self->GetTarget(result);
14374 0 : if (NS_FAILED(rv))
14375 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14376 0 : return xpc::StringToJsval(cx, result, vp);
14377 : }
14378 :
14379 : static JSBool
14380 0 : nsIDOMHTMLFormElement_SetTarget(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14381 : {
14382 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14383 : nsIDOMHTMLFormElement *self;
14384 0 : xpc_qsSelfRef selfref;
14385 0 : JS::AutoValueRooter tvr(cx);
14386 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14387 0 : return JS_FALSE;
14388 : xpc_qsDOMString arg0(cx, *vp, vp,
14389 : xpc_qsDOMString::eDefaultNullBehavior,
14390 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14391 0 : if (!arg0.IsValid())
14392 0 : return JS_FALSE;
14393 : nsresult rv;
14394 0 : rv = self->SetTarget(arg0);
14395 0 : if (NS_FAILED(rv))
14396 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14397 0 : return JS_TRUE;
14398 : }
14399 :
14400 : static JSBool
14401 0 : nsIDOMHTMLFormElement_GetAction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14402 : {
14403 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14404 : nsIDOMHTMLFormElement *self;
14405 0 : xpc_qsSelfRef selfref;
14406 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14407 0 : return JS_FALSE;
14408 : nsresult rv;
14409 0 : nsString result;
14410 0 : rv = self->GetAction(result);
14411 0 : if (NS_FAILED(rv))
14412 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14413 0 : return xpc::StringToJsval(cx, result, vp);
14414 : }
14415 :
14416 : static JSBool
14417 0 : nsIDOMHTMLFormElement_SetAction(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14418 : {
14419 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14420 : nsIDOMHTMLFormElement *self;
14421 0 : xpc_qsSelfRef selfref;
14422 0 : JS::AutoValueRooter tvr(cx);
14423 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14424 0 : return JS_FALSE;
14425 : xpc_qsDOMString arg0(cx, *vp, vp,
14426 : xpc_qsDOMString::eDefaultNullBehavior,
14427 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14428 0 : if (!arg0.IsValid())
14429 0 : return JS_FALSE;
14430 : nsresult rv;
14431 0 : rv = self->SetAction(arg0);
14432 0 : if (NS_FAILED(rv))
14433 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14434 0 : return JS_TRUE;
14435 : }
14436 :
14437 : // === interface nsIDOMHTMLFrameElement
14438 :
14439 : static JSBool
14440 0 : nsIDOMHTMLFrameElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14441 : {
14442 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14443 : nsIDOMHTMLFrameElement *self;
14444 0 : xpc_qsSelfRef selfref;
14445 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14446 0 : return JS_FALSE;
14447 : nsresult rv;
14448 0 : nsString result;
14449 0 : rv = self->GetSrc(result);
14450 0 : if (NS_FAILED(rv))
14451 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14452 0 : return xpc::StringToJsval(cx, result, vp);
14453 : }
14454 :
14455 : static JSBool
14456 0 : nsIDOMHTMLFrameElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14457 : {
14458 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14459 : nsIDOMHTMLFrameElement *self;
14460 0 : xpc_qsSelfRef selfref;
14461 0 : JS::AutoValueRooter tvr(cx);
14462 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14463 0 : return JS_FALSE;
14464 : xpc_qsDOMString arg0(cx, *vp, vp,
14465 : xpc_qsDOMString::eDefaultNullBehavior,
14466 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14467 0 : if (!arg0.IsValid())
14468 0 : return JS_FALSE;
14469 : nsresult rv;
14470 0 : rv = self->SetSrc(arg0);
14471 0 : if (NS_FAILED(rv))
14472 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14473 0 : return JS_TRUE;
14474 : }
14475 :
14476 : static JSBool
14477 0 : nsIDOMHTMLFrameElement_GetContentDocument(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14478 : {
14479 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14480 0 : JSObject *callee = nsnull;
14481 : nsIDOMHTMLFrameElement *self;
14482 0 : xpc_qsSelfRef selfref;
14483 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14484 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14485 0 : return JS_FALSE;
14486 : nsresult rv;
14487 0 : nsCOMPtr<nsIDOMDocument> result;
14488 0 : rv = self->GetContentDocument(getter_AddRefs(result));
14489 0 : if (NS_FAILED(rv))
14490 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14491 0 : if (!result) {
14492 0 : *vp = JSVAL_NULL;
14493 0 : return JS_TRUE;
14494 : }
14495 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14496 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14497 0 : return JS_TRUE;
14498 : }
14499 : // After this point do not use 'result'!
14500 0 : qsObjectHelper helper(result, cache);
14501 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
14502 : }
14503 :
14504 : static JSBool
14505 0 : nsIDOMHTMLFrameElement_GetContentWindow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14506 : {
14507 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14508 0 : JSObject *callee = nsnull;
14509 : nsIDOMHTMLFrameElement *self;
14510 0 : xpc_qsSelfRef selfref;
14511 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14512 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14513 0 : return JS_FALSE;
14514 : nsresult rv;
14515 0 : nsCOMPtr<nsIDOMWindow> result;
14516 0 : rv = self->GetContentWindow(getter_AddRefs(result));
14517 0 : if (NS_FAILED(rv))
14518 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14519 0 : if (!result) {
14520 0 : *vp = JSVAL_NULL;
14521 0 : return JS_TRUE;
14522 : }
14523 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14524 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14525 0 : return JS_TRUE;
14526 : }
14527 : // After this point do not use 'result'!
14528 0 : qsObjectHelper helper(result, cache);
14529 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
14530 : }
14531 :
14532 : static JSBool
14533 0 : nsIDOMHTMLFrameElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14534 : {
14535 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14536 : nsIDOMHTMLFrameElement *self;
14537 0 : xpc_qsSelfRef selfref;
14538 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14539 0 : return JS_FALSE;
14540 : nsresult rv;
14541 0 : nsString result;
14542 0 : rv = self->GetName(result);
14543 0 : if (NS_FAILED(rv))
14544 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14545 0 : return xpc::StringToJsval(cx, result, vp);
14546 : }
14547 :
14548 : static JSBool
14549 0 : nsIDOMHTMLFrameElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14550 : {
14551 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14552 : nsIDOMHTMLFrameElement *self;
14553 0 : xpc_qsSelfRef selfref;
14554 0 : JS::AutoValueRooter tvr(cx);
14555 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14556 0 : return JS_FALSE;
14557 : xpc_qsDOMString arg0(cx, *vp, vp,
14558 : xpc_qsDOMString::eDefaultNullBehavior,
14559 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14560 0 : if (!arg0.IsValid())
14561 0 : return JS_FALSE;
14562 : nsresult rv;
14563 0 : rv = self->SetName(arg0);
14564 0 : if (NS_FAILED(rv))
14565 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14566 0 : return JS_TRUE;
14567 : }
14568 :
14569 : // === interface nsIDOMHTMLFrameSetElement
14570 :
14571 : static JSBool
14572 0 : nsIDOMHTMLFrameSetElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14573 : {
14574 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14575 : nsIDOMHTMLFrameSetElement *self;
14576 0 : xpc_qsSelfRef selfref;
14577 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14578 0 : return JS_FALSE;
14579 : nsresult rv;
14580 0 : nsString result;
14581 0 : rv = self->GetRows(result);
14582 0 : if (NS_FAILED(rv))
14583 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14584 0 : return xpc::StringToJsval(cx, result, vp);
14585 : }
14586 :
14587 : static JSBool
14588 0 : nsIDOMHTMLFrameSetElement_SetRows(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14589 : {
14590 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14591 : nsIDOMHTMLFrameSetElement *self;
14592 0 : xpc_qsSelfRef selfref;
14593 0 : JS::AutoValueRooter tvr(cx);
14594 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14595 0 : return JS_FALSE;
14596 : xpc_qsDOMString arg0(cx, *vp, vp,
14597 : xpc_qsDOMString::eDefaultNullBehavior,
14598 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14599 0 : if (!arg0.IsValid())
14600 0 : return JS_FALSE;
14601 : nsresult rv;
14602 0 : rv = self->SetRows(arg0);
14603 0 : if (NS_FAILED(rv))
14604 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14605 0 : return JS_TRUE;
14606 : }
14607 :
14608 : static JSBool
14609 0 : nsIDOMHTMLFrameSetElement_GetCols(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14610 : {
14611 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14612 : nsIDOMHTMLFrameSetElement *self;
14613 0 : xpc_qsSelfRef selfref;
14614 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14615 0 : return JS_FALSE;
14616 : nsresult rv;
14617 0 : nsString result;
14618 0 : rv = self->GetCols(result);
14619 0 : if (NS_FAILED(rv))
14620 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14621 0 : return xpc::StringToJsval(cx, result, vp);
14622 : }
14623 :
14624 : static JSBool
14625 0 : nsIDOMHTMLFrameSetElement_SetCols(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14626 : {
14627 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14628 : nsIDOMHTMLFrameSetElement *self;
14629 0 : xpc_qsSelfRef selfref;
14630 0 : JS::AutoValueRooter tvr(cx);
14631 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14632 0 : return JS_FALSE;
14633 : xpc_qsDOMString arg0(cx, *vp, vp,
14634 : xpc_qsDOMString::eDefaultNullBehavior,
14635 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14636 0 : if (!arg0.IsValid())
14637 0 : return JS_FALSE;
14638 : nsresult rv;
14639 0 : rv = self->SetCols(arg0);
14640 0 : if (NS_FAILED(rv))
14641 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14642 0 : return JS_TRUE;
14643 : }
14644 :
14645 : // === interface nsIDOMHTMLIFrameElement
14646 :
14647 : static JSBool
14648 0 : nsIDOMHTMLIFrameElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14649 : {
14650 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14651 : nsIDOMHTMLIFrameElement *self;
14652 0 : xpc_qsSelfRef selfref;
14653 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14654 0 : return JS_FALSE;
14655 : nsresult rv;
14656 0 : nsString result;
14657 0 : rv = self->GetSrc(result);
14658 0 : if (NS_FAILED(rv))
14659 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14660 0 : return xpc::StringToJsval(cx, result, vp);
14661 : }
14662 :
14663 : static JSBool
14664 0 : nsIDOMHTMLIFrameElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14665 : {
14666 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14667 : nsIDOMHTMLIFrameElement *self;
14668 0 : xpc_qsSelfRef selfref;
14669 0 : JS::AutoValueRooter tvr(cx);
14670 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14671 0 : return JS_FALSE;
14672 : xpc_qsDOMString arg0(cx, *vp, vp,
14673 : xpc_qsDOMString::eDefaultNullBehavior,
14674 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14675 0 : if (!arg0.IsValid())
14676 0 : return JS_FALSE;
14677 : nsresult rv;
14678 0 : rv = self->SetSrc(arg0);
14679 0 : if (NS_FAILED(rv))
14680 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14681 0 : return JS_TRUE;
14682 : }
14683 :
14684 : static JSBool
14685 0 : nsIDOMHTMLIFrameElement_GetContentDocument(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14686 : {
14687 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14688 0 : JSObject *callee = nsnull;
14689 : nsIDOMHTMLIFrameElement *self;
14690 0 : xpc_qsSelfRef selfref;
14691 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14692 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14693 0 : return JS_FALSE;
14694 : nsresult rv;
14695 0 : nsCOMPtr<nsIDOMDocument> result;
14696 0 : rv = self->GetContentDocument(getter_AddRefs(result));
14697 0 : if (NS_FAILED(rv))
14698 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14699 0 : if (!result) {
14700 0 : *vp = JSVAL_NULL;
14701 0 : return JS_TRUE;
14702 : }
14703 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14704 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14705 0 : return JS_TRUE;
14706 : }
14707 : // After this point do not use 'result'!
14708 0 : qsObjectHelper helper(result, cache);
14709 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
14710 : }
14711 :
14712 : static JSBool
14713 0 : nsIDOMHTMLIFrameElement_GetContentWindow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14714 : {
14715 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14716 0 : JSObject *callee = nsnull;
14717 : nsIDOMHTMLIFrameElement *self;
14718 0 : xpc_qsSelfRef selfref;
14719 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14720 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14721 0 : return JS_FALSE;
14722 : nsresult rv;
14723 0 : nsCOMPtr<nsIDOMWindow> result;
14724 0 : rv = self->GetContentWindow(getter_AddRefs(result));
14725 0 : if (NS_FAILED(rv))
14726 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14727 0 : if (!result) {
14728 0 : *vp = JSVAL_NULL;
14729 0 : return JS_TRUE;
14730 : }
14731 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14732 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14733 0 : return JS_TRUE;
14734 : }
14735 : // After this point do not use 'result'!
14736 0 : qsObjectHelper helper(result, cache);
14737 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
14738 : }
14739 :
14740 : // === interface nsIDOMHTMLImageElement
14741 :
14742 : static JSBool
14743 0 : nsIDOMHTMLImageElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14744 : {
14745 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14746 : nsIDOMHTMLImageElement *self;
14747 0 : xpc_qsSelfRef selfref;
14748 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14749 0 : return JS_FALSE;
14750 : nsresult rv;
14751 0 : nsString result;
14752 0 : rv = self->GetSrc(result);
14753 0 : if (NS_FAILED(rv))
14754 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14755 0 : return xpc::StringToJsval(cx, result, vp);
14756 : }
14757 :
14758 : static JSBool
14759 0 : nsIDOMHTMLImageElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14760 : {
14761 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14762 : nsIDOMHTMLImageElement *self;
14763 0 : xpc_qsSelfRef selfref;
14764 0 : JS::AutoValueRooter tvr(cx);
14765 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14766 0 : return JS_FALSE;
14767 : xpc_qsDOMString arg0(cx, *vp, vp,
14768 : xpc_qsDOMString::eDefaultNullBehavior,
14769 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14770 0 : if (!arg0.IsValid())
14771 0 : return JS_FALSE;
14772 : nsresult rv;
14773 0 : rv = self->SetSrc(arg0);
14774 0 : if (NS_FAILED(rv))
14775 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14776 0 : return JS_TRUE;
14777 : }
14778 :
14779 : static JSBool
14780 0 : nsIDOMHTMLImageElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14781 : {
14782 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14783 : nsIDOMHTMLImageElement *self;
14784 0 : xpc_qsSelfRef selfref;
14785 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14786 0 : return JS_FALSE;
14787 : nsresult rv;
14788 0 : nsString result;
14789 0 : rv = self->GetName(result);
14790 0 : if (NS_FAILED(rv))
14791 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14792 0 : return xpc::StringToJsval(cx, result, vp);
14793 : }
14794 :
14795 : static JSBool
14796 0 : nsIDOMHTMLImageElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14797 : {
14798 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14799 : nsIDOMHTMLImageElement *self;
14800 0 : xpc_qsSelfRef selfref;
14801 0 : JS::AutoValueRooter tvr(cx);
14802 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14803 0 : return JS_FALSE;
14804 : xpc_qsDOMString arg0(cx, *vp, vp,
14805 : xpc_qsDOMString::eDefaultNullBehavior,
14806 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14807 0 : if (!arg0.IsValid())
14808 0 : return JS_FALSE;
14809 : nsresult rv;
14810 0 : rv = self->SetName(arg0);
14811 0 : if (NS_FAILED(rv))
14812 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14813 0 : return JS_TRUE;
14814 : }
14815 :
14816 : static JSBool
14817 0 : nsIDOMHTMLImageElement_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14818 : {
14819 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14820 : nsIDOMHTMLImageElement *self;
14821 0 : xpc_qsSelfRef selfref;
14822 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14823 0 : return JS_FALSE;
14824 : nsresult rv;
14825 : PRUint32 result;
14826 0 : rv = self->GetHeight(&result);
14827 0 : if (NS_FAILED(rv))
14828 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14829 0 : *vp = UINT_TO_JSVAL(result);
14830 0 : return JS_TRUE;
14831 : }
14832 :
14833 : static JSBool
14834 0 : nsIDOMHTMLImageElement_SetHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14835 : {
14836 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14837 : nsIDOMHTMLImageElement *self;
14838 0 : xpc_qsSelfRef selfref;
14839 0 : JS::AutoValueRooter tvr(cx);
14840 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14841 0 : return JS_FALSE;
14842 : uint32_t arg0;
14843 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
14844 0 : return JS_FALSE;
14845 : nsresult rv;
14846 0 : rv = self->SetHeight(arg0);
14847 0 : if (NS_FAILED(rv))
14848 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14849 0 : return JS_TRUE;
14850 : }
14851 :
14852 : static JSBool
14853 0 : nsIDOMHTMLImageElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14854 : {
14855 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14856 : nsIDOMHTMLImageElement *self;
14857 0 : xpc_qsSelfRef selfref;
14858 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14859 0 : return JS_FALSE;
14860 : nsresult rv;
14861 : PRUint32 result;
14862 0 : rv = self->GetWidth(&result);
14863 0 : if (NS_FAILED(rv))
14864 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14865 0 : *vp = UINT_TO_JSVAL(result);
14866 0 : return JS_TRUE;
14867 : }
14868 :
14869 : static JSBool
14870 0 : nsIDOMHTMLImageElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14871 : {
14872 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14873 : nsIDOMHTMLImageElement *self;
14874 0 : xpc_qsSelfRef selfref;
14875 0 : JS::AutoValueRooter tvr(cx);
14876 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14877 0 : return JS_FALSE;
14878 : uint32_t arg0;
14879 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
14880 0 : return JS_FALSE;
14881 : nsresult rv;
14882 0 : rv = self->SetWidth(arg0);
14883 0 : if (NS_FAILED(rv))
14884 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14885 0 : return JS_TRUE;
14886 : }
14887 :
14888 : static JSBool
14889 0 : nsIDOMHTMLImageElement_GetComplete(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14890 : {
14891 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14892 : nsIDOMHTMLImageElement *self;
14893 0 : xpc_qsSelfRef selfref;
14894 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14895 0 : return JS_FALSE;
14896 : nsresult rv;
14897 : bool result;
14898 0 : rv = self->GetComplete(&result);
14899 0 : if (NS_FAILED(rv))
14900 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14901 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
14902 0 : return JS_TRUE;
14903 : }
14904 :
14905 : // === interface nsIDOMHTMLInputElement
14906 :
14907 : static JSBool
14908 0 : nsIDOMHTMLInputElement_GetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14909 : {
14910 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14911 : nsIDOMHTMLInputElement *self;
14912 0 : xpc_qsSelfRef selfref;
14913 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14914 0 : return JS_FALSE;
14915 : nsresult rv;
14916 : bool result;
14917 0 : rv = self->GetDefaultChecked(&result);
14918 0 : if (NS_FAILED(rv))
14919 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14920 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
14921 0 : return JS_TRUE;
14922 : }
14923 :
14924 : static JSBool
14925 0 : nsIDOMHTMLInputElement_SetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14926 : {
14927 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14928 : nsIDOMHTMLInputElement *self;
14929 0 : xpc_qsSelfRef selfref;
14930 0 : JS::AutoValueRooter tvr(cx);
14931 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14932 0 : return JS_FALSE;
14933 : JSBool arg0;
14934 0 : JS_ValueToBoolean(cx, *vp, &arg0);
14935 : nsresult rv;
14936 0 : rv = self->SetDefaultChecked(arg0);
14937 0 : if (NS_FAILED(rv))
14938 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14939 0 : return JS_TRUE;
14940 : }
14941 :
14942 : static JSBool
14943 0 : nsIDOMHTMLInputElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14944 : {
14945 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14946 : nsIDOMHTMLInputElement *self;
14947 0 : xpc_qsSelfRef selfref;
14948 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14949 0 : return JS_FALSE;
14950 : nsresult rv;
14951 : bool result;
14952 0 : rv = self->GetDisabled(&result);
14953 0 : if (NS_FAILED(rv))
14954 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14955 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
14956 0 : return JS_TRUE;
14957 : }
14958 :
14959 : static JSBool
14960 0 : nsIDOMHTMLInputElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14961 : {
14962 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14963 : nsIDOMHTMLInputElement *self;
14964 0 : xpc_qsSelfRef selfref;
14965 0 : JS::AutoValueRooter tvr(cx);
14966 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14967 0 : return JS_FALSE;
14968 : JSBool arg0;
14969 0 : JS_ValueToBoolean(cx, *vp, &arg0);
14970 : nsresult rv;
14971 0 : rv = self->SetDisabled(arg0);
14972 0 : if (NS_FAILED(rv))
14973 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14974 0 : return JS_TRUE;
14975 : }
14976 :
14977 : static JSBool
14978 0 : nsIDOMHTMLInputElement_Select(JSContext *cx, unsigned argc, jsval *vp)
14979 : {
14980 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14981 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14982 0 : if (!obj)
14983 0 : return JS_FALSE;
14984 : nsIDOMHTMLInputElement *self;
14985 0 : xpc_qsSelfRef selfref;
14986 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14987 0 : return JS_FALSE;
14988 : nsresult rv;
14989 0 : rv = self->Select();
14990 0 : if (NS_FAILED(rv))
14991 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14992 0 : *vp = JSVAL_VOID;
14993 0 : return JS_TRUE;
14994 : }
14995 :
14996 : static JSBool
14997 0 : nsIDOMHTMLInputElement_GetChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14998 : {
14999 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15000 : nsIDOMHTMLInputElement *self;
15001 0 : xpc_qsSelfRef selfref;
15002 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15003 0 : return JS_FALSE;
15004 : nsresult rv;
15005 : bool result;
15006 0 : rv = self->GetChecked(&result);
15007 0 : if (NS_FAILED(rv))
15008 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15009 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15010 0 : return JS_TRUE;
15011 : }
15012 :
15013 : static JSBool
15014 0 : nsIDOMHTMLInputElement_SetChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15015 : {
15016 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15017 : nsIDOMHTMLInputElement *self;
15018 0 : xpc_qsSelfRef selfref;
15019 0 : JS::AutoValueRooter tvr(cx);
15020 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15021 0 : return JS_FALSE;
15022 : JSBool arg0;
15023 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15024 : nsresult rv;
15025 0 : rv = self->SetChecked(arg0);
15026 0 : if (NS_FAILED(rv))
15027 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15028 0 : return JS_TRUE;
15029 : }
15030 :
15031 : static JSBool
15032 0 : nsIDOMHTMLInputElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15033 : {
15034 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15035 : nsIDOMHTMLInputElement *self;
15036 0 : xpc_qsSelfRef selfref;
15037 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15038 0 : return JS_FALSE;
15039 : nsresult rv;
15040 0 : nsString result;
15041 0 : rv = self->GetType(result);
15042 0 : if (NS_FAILED(rv))
15043 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15044 0 : return xpc::StringToJsval(cx, result, vp);
15045 : }
15046 :
15047 : static JSBool
15048 0 : nsIDOMHTMLInputElement_SetType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15049 : {
15050 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15051 : nsIDOMHTMLInputElement *self;
15052 0 : xpc_qsSelfRef selfref;
15053 0 : JS::AutoValueRooter tvr(cx);
15054 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15055 0 : return JS_FALSE;
15056 : xpc_qsDOMString arg0(cx, *vp, vp,
15057 : xpc_qsDOMString::eDefaultNullBehavior,
15058 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15059 0 : if (!arg0.IsValid())
15060 0 : return JS_FALSE;
15061 : nsresult rv;
15062 0 : rv = self->SetType(arg0);
15063 0 : if (NS_FAILED(rv))
15064 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15065 0 : return JS_TRUE;
15066 : }
15067 :
15068 : static JSBool
15069 0 : nsIDOMHTMLInputElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15070 : {
15071 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15072 0 : JSObject *callee = nsnull;
15073 : nsIDOMHTMLInputElement *self;
15074 0 : xpc_qsSelfRef selfref;
15075 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15076 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
15077 0 : return JS_FALSE;
15078 : nsresult rv;
15079 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
15080 0 : rv = self->GetForm(getter_AddRefs(result));
15081 0 : if (NS_FAILED(rv))
15082 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15083 0 : if (!result) {
15084 0 : *vp = JSVAL_NULL;
15085 0 : return JS_TRUE;
15086 : }
15087 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15088 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15089 0 : return JS_TRUE;
15090 : }
15091 : // After this point do not use 'result'!
15092 0 : qsObjectHelper helper(result, cache);
15093 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
15094 : }
15095 :
15096 : static JSBool
15097 0 : nsIDOMHTMLInputElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15098 : {
15099 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15100 : nsIDOMHTMLInputElement *self;
15101 0 : xpc_qsSelfRef selfref;
15102 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15103 0 : return JS_FALSE;
15104 : nsresult rv;
15105 0 : nsString result;
15106 0 : rv = self->GetSrc(result);
15107 0 : if (NS_FAILED(rv))
15108 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15109 0 : return xpc::StringToJsval(cx, result, vp);
15110 : }
15111 :
15112 : static JSBool
15113 0 : nsIDOMHTMLInputElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15114 : {
15115 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15116 : nsIDOMHTMLInputElement *self;
15117 0 : xpc_qsSelfRef selfref;
15118 0 : JS::AutoValueRooter tvr(cx);
15119 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15120 0 : return JS_FALSE;
15121 : xpc_qsDOMString arg0(cx, *vp, vp,
15122 : xpc_qsDOMString::eDefaultNullBehavior,
15123 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15124 0 : if (!arg0.IsValid())
15125 0 : return JS_FALSE;
15126 : nsresult rv;
15127 0 : rv = self->SetSrc(arg0);
15128 0 : if (NS_FAILED(rv))
15129 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15130 0 : return JS_TRUE;
15131 : }
15132 :
15133 : static JSBool
15134 0 : nsIDOMHTMLInputElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15135 : {
15136 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15137 : nsIDOMHTMLInputElement *self;
15138 0 : xpc_qsSelfRef selfref;
15139 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15140 0 : return JS_FALSE;
15141 : nsresult rv;
15142 0 : nsString result;
15143 0 : rv = self->GetName(result);
15144 0 : if (NS_FAILED(rv))
15145 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15146 0 : return xpc::StringToJsval(cx, result, vp);
15147 : }
15148 :
15149 : static JSBool
15150 0 : nsIDOMHTMLInputElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15151 : {
15152 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15153 : nsIDOMHTMLInputElement *self;
15154 0 : xpc_qsSelfRef selfref;
15155 0 : JS::AutoValueRooter tvr(cx);
15156 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15157 0 : return JS_FALSE;
15158 : xpc_qsDOMString arg0(cx, *vp, vp,
15159 : xpc_qsDOMString::eDefaultNullBehavior,
15160 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15161 0 : if (!arg0.IsValid())
15162 0 : return JS_FALSE;
15163 : nsresult rv;
15164 0 : rv = self->SetName(arg0);
15165 0 : if (NS_FAILED(rv))
15166 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15167 0 : return JS_TRUE;
15168 : }
15169 :
15170 : static JSBool
15171 0 : nsIDOMHTMLInputElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15172 : {
15173 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15174 : nsIDOMHTMLInputElement *self;
15175 0 : xpc_qsSelfRef selfref;
15176 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15177 0 : return JS_FALSE;
15178 : nsresult rv;
15179 0 : nsString result;
15180 0 : rv = self->GetValue(result);
15181 0 : if (NS_FAILED(rv))
15182 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15183 0 : return xpc::StringToJsval(cx, result, vp);
15184 : }
15185 :
15186 : static JSBool
15187 0 : nsIDOMHTMLInputElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15188 : {
15189 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15190 : nsIDOMHTMLInputElement *self;
15191 0 : xpc_qsSelfRef selfref;
15192 0 : JS::AutoValueRooter tvr(cx);
15193 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15194 0 : return JS_FALSE;
15195 : xpc_qsDOMString arg0(cx, *vp, vp,
15196 : xpc_qsDOMString::eDefaultNullBehavior,
15197 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15198 0 : if (!arg0.IsValid())
15199 0 : return JS_FALSE;
15200 : nsresult rv;
15201 0 : rv = self->SetValue(arg0);
15202 0 : if (NS_FAILED(rv))
15203 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15204 0 : return JS_TRUE;
15205 : }
15206 :
15207 : static JSBool
15208 0 : nsIDOMHTMLInputElement_GetFiles(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15209 : {
15210 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15211 0 : JSObject *callee = nsnull;
15212 : nsIDOMHTMLInputElement *self;
15213 0 : xpc_qsSelfRef selfref;
15214 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15215 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
15216 0 : return JS_FALSE;
15217 : nsresult rv;
15218 0 : nsCOMPtr<nsIDOMFileList> result;
15219 0 : rv = self->GetFiles(getter_AddRefs(result));
15220 0 : if (NS_FAILED(rv))
15221 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15222 0 : if (!result) {
15223 0 : *vp = JSVAL_NULL;
15224 0 : return JS_TRUE;
15225 : }
15226 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15227 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15228 0 : return JS_TRUE;
15229 : }
15230 : // After this point do not use 'result'!
15231 0 : qsObjectHelper helper(result, cache);
15232 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMFileList), &interfaces[k_nsIDOMFileList], vp);
15233 : }
15234 :
15235 : static JSBool
15236 0 : nsIDOMHTMLInputElement_GetTextLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15237 : {
15238 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15239 : nsIDOMHTMLInputElement *self;
15240 0 : xpc_qsSelfRef selfref;
15241 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15242 0 : return JS_FALSE;
15243 : nsresult rv;
15244 : PRInt32 result;
15245 0 : rv = self->GetTextLength(&result);
15246 0 : if (NS_FAILED(rv))
15247 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15248 0 : *vp = INT_TO_JSVAL(result);
15249 0 : return JS_TRUE;
15250 : }
15251 :
15252 : static JSBool
15253 0 : nsIDOMHTMLInputElement_GetSelectionStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15254 : {
15255 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15256 : nsIDOMHTMLInputElement *self;
15257 0 : xpc_qsSelfRef selfref;
15258 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15259 0 : return JS_FALSE;
15260 : nsresult rv;
15261 : PRInt32 result;
15262 0 : rv = self->GetSelectionStart(&result);
15263 0 : if (NS_FAILED(rv))
15264 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15265 0 : *vp = INT_TO_JSVAL(result);
15266 0 : return JS_TRUE;
15267 : }
15268 :
15269 : static JSBool
15270 0 : nsIDOMHTMLInputElement_SetSelectionStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15271 : {
15272 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15273 : nsIDOMHTMLInputElement *self;
15274 0 : xpc_qsSelfRef selfref;
15275 0 : JS::AutoValueRooter tvr(cx);
15276 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15277 0 : return JS_FALSE;
15278 : int32_t arg0;
15279 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
15280 0 : return JS_FALSE;
15281 : nsresult rv;
15282 0 : rv = self->SetSelectionStart(arg0);
15283 0 : if (NS_FAILED(rv))
15284 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15285 0 : return JS_TRUE;
15286 : }
15287 :
15288 : static JSBool
15289 0 : nsIDOMHTMLInputElement_GetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15290 : {
15291 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15292 : nsIDOMHTMLInputElement *self;
15293 0 : xpc_qsSelfRef selfref;
15294 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15295 0 : return JS_FALSE;
15296 : nsresult rv;
15297 : PRInt32 result;
15298 0 : rv = self->GetSelectionEnd(&result);
15299 0 : if (NS_FAILED(rv))
15300 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15301 0 : *vp = INT_TO_JSVAL(result);
15302 0 : return JS_TRUE;
15303 : }
15304 :
15305 : static JSBool
15306 0 : nsIDOMHTMLInputElement_SetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15307 : {
15308 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15309 : nsIDOMHTMLInputElement *self;
15310 0 : xpc_qsSelfRef selfref;
15311 0 : JS::AutoValueRooter tvr(cx);
15312 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15313 0 : return JS_FALSE;
15314 : int32_t arg0;
15315 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
15316 0 : return JS_FALSE;
15317 : nsresult rv;
15318 0 : rv = self->SetSelectionEnd(arg0);
15319 0 : if (NS_FAILED(rv))
15320 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15321 0 : return JS_TRUE;
15322 : }
15323 :
15324 : static JSBool
15325 0 : nsIDOMHTMLInputElement_GetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15326 : {
15327 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15328 : nsIDOMHTMLInputElement *self;
15329 0 : xpc_qsSelfRef selfref;
15330 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15331 0 : return JS_FALSE;
15332 : nsresult rv;
15333 0 : nsString result;
15334 0 : rv = self->GetSelectionDirection(result);
15335 0 : if (NS_FAILED(rv))
15336 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15337 0 : return xpc::StringToJsval(cx, result, vp);
15338 : }
15339 :
15340 : static JSBool
15341 0 : nsIDOMHTMLInputElement_SetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15342 : {
15343 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15344 : nsIDOMHTMLInputElement *self;
15345 0 : xpc_qsSelfRef selfref;
15346 0 : JS::AutoValueRooter tvr(cx);
15347 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15348 0 : return JS_FALSE;
15349 : xpc_qsDOMString arg0(cx, *vp, vp,
15350 : xpc_qsDOMString::eDefaultNullBehavior,
15351 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15352 0 : if (!arg0.IsValid())
15353 0 : return JS_FALSE;
15354 : nsresult rv;
15355 0 : rv = self->SetSelectionDirection(arg0);
15356 0 : if (NS_FAILED(rv))
15357 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15358 0 : return JS_TRUE;
15359 : }
15360 :
15361 : static JSBool
15362 0 : nsIDOMHTMLInputElement_SetSelectionRange(JSContext *cx, unsigned argc, jsval *vp)
15363 : {
15364 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15365 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
15366 0 : if (!obj)
15367 0 : return JS_FALSE;
15368 : nsIDOMHTMLInputElement *self;
15369 0 : xpc_qsSelfRef selfref;
15370 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
15371 0 : return JS_FALSE;
15372 0 : if (argc < 2)
15373 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
15374 0 : jsval *argv = JS_ARGV(cx, vp);
15375 : int32_t arg0;
15376 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
15377 0 : return JS_FALSE;
15378 : int32_t arg1;
15379 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
15380 0 : return JS_FALSE;
15381 : xpc_qsDOMString arg2(cx, (2 < argc ? argv[2] : JSVAL_NULL), (2 < argc ? &argv[2] : NULL),
15382 : xpc_qsDOMString::eDefaultNullBehavior,
15383 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15384 0 : if (!arg2.IsValid())
15385 0 : return JS_FALSE;
15386 : nsresult rv;
15387 0 : rv = self->SetSelectionRange(arg0, arg1, arg2);
15388 0 : if (NS_FAILED(rv))
15389 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
15390 0 : *vp = JSVAL_VOID;
15391 0 : return JS_TRUE;
15392 : }
15393 :
15394 : // === interface nsIDOMHTMLLinkElement
15395 :
15396 : static JSBool
15397 0 : nsIDOMHTMLLinkElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15398 : {
15399 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15400 : nsIDOMHTMLLinkElement *self;
15401 0 : xpc_qsSelfRef selfref;
15402 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15403 0 : return JS_FALSE;
15404 : nsresult rv;
15405 : bool result;
15406 0 : rv = self->GetDisabled(&result);
15407 0 : if (NS_FAILED(rv))
15408 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15409 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15410 0 : return JS_TRUE;
15411 : }
15412 :
15413 : static JSBool
15414 0 : nsIDOMHTMLLinkElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15415 : {
15416 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15417 : nsIDOMHTMLLinkElement *self;
15418 0 : xpc_qsSelfRef selfref;
15419 0 : JS::AutoValueRooter tvr(cx);
15420 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15421 0 : return JS_FALSE;
15422 : JSBool arg0;
15423 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15424 : nsresult rv;
15425 0 : rv = self->SetDisabled(arg0);
15426 0 : if (NS_FAILED(rv))
15427 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15428 0 : return JS_TRUE;
15429 : }
15430 :
15431 : // === interface nsIDOMHTMLMenuElement
15432 :
15433 : static JSBool
15434 0 : nsIDOMHTMLMenuElement_GetCompact(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15435 : {
15436 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15437 : nsIDOMHTMLMenuElement *self;
15438 0 : xpc_qsSelfRef selfref;
15439 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15440 0 : return JS_FALSE;
15441 : nsresult rv;
15442 : bool result;
15443 0 : rv = self->GetCompact(&result);
15444 0 : if (NS_FAILED(rv))
15445 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15446 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15447 0 : return JS_TRUE;
15448 : }
15449 :
15450 : static JSBool
15451 0 : nsIDOMHTMLMenuElement_SetCompact(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15452 : {
15453 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15454 : nsIDOMHTMLMenuElement *self;
15455 0 : xpc_qsSelfRef selfref;
15456 0 : JS::AutoValueRooter tvr(cx);
15457 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15458 0 : return JS_FALSE;
15459 : JSBool arg0;
15460 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15461 : nsresult rv;
15462 0 : rv = self->SetCompact(arg0);
15463 0 : if (NS_FAILED(rv))
15464 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15465 0 : return JS_TRUE;
15466 : }
15467 :
15468 : static JSBool
15469 0 : nsIDOMHTMLMenuElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15470 : {
15471 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15472 : nsIDOMHTMLMenuElement *self;
15473 0 : xpc_qsSelfRef selfref;
15474 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15475 0 : return JS_FALSE;
15476 : nsresult rv;
15477 0 : nsString result;
15478 0 : rv = self->GetType(result);
15479 0 : if (NS_FAILED(rv))
15480 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15481 0 : return xpc::StringToJsval(cx, result, vp);
15482 : }
15483 :
15484 : static JSBool
15485 0 : nsIDOMHTMLMenuElement_SetType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15486 : {
15487 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15488 : nsIDOMHTMLMenuElement *self;
15489 0 : xpc_qsSelfRef selfref;
15490 0 : JS::AutoValueRooter tvr(cx);
15491 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15492 0 : return JS_FALSE;
15493 : xpc_qsDOMString arg0(cx, *vp, vp,
15494 : xpc_qsDOMString::eDefaultNullBehavior,
15495 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15496 0 : if (!arg0.IsValid())
15497 0 : return JS_FALSE;
15498 : nsresult rv;
15499 0 : rv = self->SetType(arg0);
15500 0 : if (NS_FAILED(rv))
15501 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15502 0 : return JS_TRUE;
15503 : }
15504 :
15505 : static JSBool
15506 0 : nsIDOMHTMLMenuElement_GetLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15507 : {
15508 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15509 : nsIDOMHTMLMenuElement *self;
15510 0 : xpc_qsSelfRef selfref;
15511 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15512 0 : return JS_FALSE;
15513 : nsresult rv;
15514 0 : nsString result;
15515 0 : rv = self->GetLabel(result);
15516 0 : if (NS_FAILED(rv))
15517 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15518 0 : return xpc::StringToJsval(cx, result, vp);
15519 : }
15520 :
15521 : static JSBool
15522 0 : nsIDOMHTMLMenuElement_SetLabel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15523 : {
15524 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15525 : nsIDOMHTMLMenuElement *self;
15526 0 : xpc_qsSelfRef selfref;
15527 0 : JS::AutoValueRooter tvr(cx);
15528 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15529 0 : return JS_FALSE;
15530 : xpc_qsDOMString arg0(cx, *vp, vp,
15531 : xpc_qsDOMString::eDefaultNullBehavior,
15532 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15533 0 : if (!arg0.IsValid())
15534 0 : return JS_FALSE;
15535 : nsresult rv;
15536 0 : rv = self->SetLabel(arg0);
15537 0 : if (NS_FAILED(rv))
15538 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15539 0 : return JS_TRUE;
15540 : }
15541 :
15542 : // === interface nsIDOMHTMLMenuItemElement
15543 :
15544 : // === interface nsIDOMHTMLOptionElement
15545 :
15546 : static JSBool
15547 0 : nsIDOMHTMLOptionElement_GetIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15548 : {
15549 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15550 : nsIDOMHTMLOptionElement *self;
15551 0 : xpc_qsSelfRef selfref;
15552 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15553 0 : return JS_FALSE;
15554 : nsresult rv;
15555 : PRInt32 result;
15556 0 : rv = self->GetIndex(&result);
15557 0 : if (NS_FAILED(rv))
15558 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15559 0 : *vp = INT_TO_JSVAL(result);
15560 0 : return JS_TRUE;
15561 : }
15562 :
15563 : static JSBool
15564 0 : nsIDOMHTMLOptionElement_GetSelected(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15565 : {
15566 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15567 : nsIDOMHTMLOptionElement *self;
15568 0 : xpc_qsSelfRef selfref;
15569 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15570 0 : return JS_FALSE;
15571 : nsresult rv;
15572 : bool result;
15573 0 : rv = self->GetSelected(&result);
15574 0 : if (NS_FAILED(rv))
15575 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15576 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15577 0 : return JS_TRUE;
15578 : }
15579 :
15580 : static JSBool
15581 0 : nsIDOMHTMLOptionElement_SetSelected(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15582 : {
15583 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15584 : nsIDOMHTMLOptionElement *self;
15585 0 : xpc_qsSelfRef selfref;
15586 0 : JS::AutoValueRooter tvr(cx);
15587 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15588 0 : return JS_FALSE;
15589 : JSBool arg0;
15590 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15591 : nsresult rv;
15592 0 : rv = self->SetSelected(arg0);
15593 0 : if (NS_FAILED(rv))
15594 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15595 0 : return JS_TRUE;
15596 : }
15597 :
15598 : static JSBool
15599 0 : nsIDOMHTMLOptionElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15600 : {
15601 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15602 0 : JSObject *callee = nsnull;
15603 : nsIDOMHTMLOptionElement *self;
15604 0 : xpc_qsSelfRef selfref;
15605 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15606 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
15607 0 : return JS_FALSE;
15608 : nsresult rv;
15609 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
15610 0 : rv = self->GetForm(getter_AddRefs(result));
15611 0 : if (NS_FAILED(rv))
15612 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15613 0 : if (!result) {
15614 0 : *vp = JSVAL_NULL;
15615 0 : return JS_TRUE;
15616 : }
15617 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15618 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15619 0 : return JS_TRUE;
15620 : }
15621 : // After this point do not use 'result'!
15622 0 : qsObjectHelper helper(result, cache);
15623 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
15624 : }
15625 :
15626 : static JSBool
15627 0 : nsIDOMHTMLOptionElement_GetText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15628 : {
15629 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15630 : nsIDOMHTMLOptionElement *self;
15631 0 : xpc_qsSelfRef selfref;
15632 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15633 0 : return JS_FALSE;
15634 : nsresult rv;
15635 0 : nsString result;
15636 0 : rv = self->GetText(result);
15637 0 : if (NS_FAILED(rv))
15638 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15639 0 : return xpc::StringToJsval(cx, result, vp);
15640 : }
15641 :
15642 : static JSBool
15643 0 : nsIDOMHTMLOptionElement_SetText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15644 : {
15645 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15646 : nsIDOMHTMLOptionElement *self;
15647 0 : xpc_qsSelfRef selfref;
15648 0 : JS::AutoValueRooter tvr(cx);
15649 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15650 0 : return JS_FALSE;
15651 : xpc_qsDOMString arg0(cx, *vp, vp,
15652 : xpc_qsDOMString::eDefaultNullBehavior,
15653 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15654 0 : if (!arg0.IsValid())
15655 0 : return JS_FALSE;
15656 : nsresult rv;
15657 0 : rv = self->SetText(arg0);
15658 0 : if (NS_FAILED(rv))
15659 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15660 0 : return JS_TRUE;
15661 : }
15662 :
15663 : static JSBool
15664 0 : nsIDOMHTMLOptionElement_GetDefaultSelected(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15665 : {
15666 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15667 : nsIDOMHTMLOptionElement *self;
15668 0 : xpc_qsSelfRef selfref;
15669 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15670 0 : return JS_FALSE;
15671 : nsresult rv;
15672 : bool result;
15673 0 : rv = self->GetDefaultSelected(&result);
15674 0 : if (NS_FAILED(rv))
15675 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15676 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15677 0 : return JS_TRUE;
15678 : }
15679 :
15680 : static JSBool
15681 0 : nsIDOMHTMLOptionElement_SetDefaultSelected(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15682 : {
15683 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15684 : nsIDOMHTMLOptionElement *self;
15685 0 : xpc_qsSelfRef selfref;
15686 0 : JS::AutoValueRooter tvr(cx);
15687 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15688 0 : return JS_FALSE;
15689 : JSBool arg0;
15690 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15691 : nsresult rv;
15692 0 : rv = self->SetDefaultSelected(arg0);
15693 0 : if (NS_FAILED(rv))
15694 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15695 0 : return JS_TRUE;
15696 : }
15697 :
15698 : static JSBool
15699 0 : nsIDOMHTMLOptionElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15700 : {
15701 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15702 : nsIDOMHTMLOptionElement *self;
15703 0 : xpc_qsSelfRef selfref;
15704 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15705 0 : return JS_FALSE;
15706 : nsresult rv;
15707 0 : nsString result;
15708 0 : rv = self->GetValue(result);
15709 0 : if (NS_FAILED(rv))
15710 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15711 0 : return xpc::StringToJsval(cx, result, vp);
15712 : }
15713 :
15714 : static JSBool
15715 0 : nsIDOMHTMLOptionElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15716 : {
15717 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15718 : nsIDOMHTMLOptionElement *self;
15719 0 : xpc_qsSelfRef selfref;
15720 0 : JS::AutoValueRooter tvr(cx);
15721 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15722 0 : return JS_FALSE;
15723 : xpc_qsDOMString arg0(cx, *vp, vp,
15724 : xpc_qsDOMString::eDefaultNullBehavior,
15725 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15726 0 : if (!arg0.IsValid())
15727 0 : return JS_FALSE;
15728 : nsresult rv;
15729 0 : rv = self->SetValue(arg0);
15730 0 : if (NS_FAILED(rv))
15731 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15732 0 : return JS_TRUE;
15733 : }
15734 :
15735 : static JSBool
15736 0 : nsIDOMHTMLOptionElement_GetLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15737 : {
15738 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15739 : nsIDOMHTMLOptionElement *self;
15740 0 : xpc_qsSelfRef selfref;
15741 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15742 0 : return JS_FALSE;
15743 : nsresult rv;
15744 0 : nsString result;
15745 0 : rv = self->GetLabel(result);
15746 0 : if (NS_FAILED(rv))
15747 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15748 0 : return xpc::StringToJsval(cx, result, vp);
15749 : }
15750 :
15751 : static JSBool
15752 0 : nsIDOMHTMLOptionElement_SetLabel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15753 : {
15754 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15755 : nsIDOMHTMLOptionElement *self;
15756 0 : xpc_qsSelfRef selfref;
15757 0 : JS::AutoValueRooter tvr(cx);
15758 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15759 0 : return JS_FALSE;
15760 : xpc_qsDOMString arg0(cx, *vp, vp,
15761 : xpc_qsDOMString::eDefaultNullBehavior,
15762 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15763 0 : if (!arg0.IsValid())
15764 0 : return JS_FALSE;
15765 : nsresult rv;
15766 0 : rv = self->SetLabel(arg0);
15767 0 : if (NS_FAILED(rv))
15768 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15769 0 : return JS_TRUE;
15770 : }
15771 :
15772 : static JSBool
15773 0 : nsIDOMHTMLOptionElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15774 : {
15775 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15776 : nsIDOMHTMLOptionElement *self;
15777 0 : xpc_qsSelfRef selfref;
15778 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15779 0 : return JS_FALSE;
15780 : nsresult rv;
15781 : bool result;
15782 0 : rv = self->GetDisabled(&result);
15783 0 : if (NS_FAILED(rv))
15784 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15785 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15786 0 : return JS_TRUE;
15787 : }
15788 :
15789 : static JSBool
15790 0 : nsIDOMHTMLOptionElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15791 : {
15792 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15793 : nsIDOMHTMLOptionElement *self;
15794 0 : xpc_qsSelfRef selfref;
15795 0 : JS::AutoValueRooter tvr(cx);
15796 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15797 0 : return JS_FALSE;
15798 : JSBool arg0;
15799 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15800 : nsresult rv;
15801 0 : rv = self->SetDisabled(arg0);
15802 0 : if (NS_FAILED(rv))
15803 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15804 0 : return JS_TRUE;
15805 : }
15806 :
15807 : // === interface nsIDOMHTMLOptionsCollection
15808 :
15809 : static JSBool
15810 0 : nsIDOMHTMLOptionsCollection_Item(JSContext *cx, unsigned argc, jsval *vp)
15811 : {
15812 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15813 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
15814 0 : if (!obj)
15815 0 : return JS_FALSE;
15816 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
15817 : nsIDOMHTMLOptionsCollection *self;
15818 0 : xpc_qsSelfRef selfref;
15819 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15820 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
15821 0 : return JS_FALSE;
15822 0 : if (argc < 1)
15823 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
15824 0 : jsval *argv = JS_ARGV(cx, vp);
15825 : uint32_t arg0;
15826 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
15827 0 : return JS_FALSE;
15828 : nsresult rv;
15829 0 : nsCOMPtr<nsIDOMNode> result;
15830 0 : rv = self->Item(arg0, getter_AddRefs(result));
15831 0 : if (NS_FAILED(rv))
15832 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
15833 0 : if (!result) {
15834 0 : *vp = JSVAL_NULL;
15835 0 : return JS_TRUE;
15836 : }
15837 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15838 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15839 0 : return JS_TRUE;
15840 : }
15841 : // After this point do not use 'result'!
15842 0 : qsObjectHelper helper(result, cache);
15843 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
15844 : }
15845 :
15846 : static JSBool
15847 0 : nsIDOMHTMLOptionsCollection_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15848 : {
15849 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15850 : nsIDOMHTMLOptionsCollection *self;
15851 0 : xpc_qsSelfRef selfref;
15852 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15853 0 : return JS_FALSE;
15854 : nsresult rv;
15855 : PRUint32 result;
15856 0 : rv = self->GetLength(&result);
15857 0 : if (NS_FAILED(rv))
15858 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15859 0 : *vp = UINT_TO_JSVAL(result);
15860 0 : return JS_TRUE;
15861 : }
15862 :
15863 : static JSBool
15864 0 : nsIDOMHTMLOptionsCollection_SetLength(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15865 : {
15866 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15867 : nsIDOMHTMLOptionsCollection *self;
15868 0 : xpc_qsSelfRef selfref;
15869 0 : JS::AutoValueRooter tvr(cx);
15870 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15871 0 : return JS_FALSE;
15872 : uint32_t arg0;
15873 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
15874 0 : return JS_FALSE;
15875 : nsresult rv;
15876 0 : rv = self->SetLength(arg0);
15877 0 : if (NS_FAILED(rv))
15878 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15879 0 : return JS_TRUE;
15880 : }
15881 :
15882 : static JSBool
15883 0 : nsIDOMHTMLOptionsCollection_GetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15884 : {
15885 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15886 : nsIDOMHTMLOptionsCollection *self;
15887 0 : xpc_qsSelfRef selfref;
15888 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15889 0 : return JS_FALSE;
15890 : nsresult rv;
15891 : PRInt32 result;
15892 0 : rv = self->GetSelectedIndex(&result);
15893 0 : if (NS_FAILED(rv))
15894 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15895 0 : *vp = INT_TO_JSVAL(result);
15896 0 : return JS_TRUE;
15897 : }
15898 :
15899 : static JSBool
15900 0 : nsIDOMHTMLOptionsCollection_SetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15901 : {
15902 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15903 : nsIDOMHTMLOptionsCollection *self;
15904 0 : xpc_qsSelfRef selfref;
15905 0 : JS::AutoValueRooter tvr(cx);
15906 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15907 0 : return JS_FALSE;
15908 : int32_t arg0;
15909 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
15910 0 : return JS_FALSE;
15911 : nsresult rv;
15912 0 : rv = self->SetSelectedIndex(arg0);
15913 0 : if (NS_FAILED(rv))
15914 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15915 0 : return JS_TRUE;
15916 : }
15917 :
15918 : static JSBool
15919 0 : nsIDOMHTMLOptionsCollection_Add(JSContext *cx, unsigned argc, jsval *vp)
15920 : {
15921 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15922 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
15923 0 : if (!obj)
15924 0 : return JS_FALSE;
15925 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
15926 : nsIDOMHTMLOptionsCollection *self;
15927 0 : xpc_qsSelfRef selfref;
15928 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
15929 0 : return JS_FALSE;
15930 0 : if (argc < 1)
15931 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
15932 0 : jsval *argv = JS_ARGV(cx, vp);
15933 : nsresult rv;
15934 : nsIDOMHTMLOptionElement *arg0;
15935 0 : xpc_qsSelfRef arg0ref;
15936 0 : rv = xpc_qsUnwrapArg<nsIDOMHTMLOptionElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
15937 0 : if (NS_FAILED(rv)) {
15938 0 : xpc_qsThrowBadArgWithCcx(ccx, rv, 0);
15939 0 : return JS_FALSE;
15940 : }
15941 0 : nsCOMPtr<nsIVariant> arg1(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (1 < argc ? argv[1] : JSVAL_NULL))));
15942 0 : if (!arg1) {
15943 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 1);
15944 0 : return JS_FALSE;
15945 0 : } rv = self->Add(arg0, arg1);
15946 0 : if (NS_FAILED(rv))
15947 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
15948 0 : *vp = JSVAL_VOID;
15949 0 : return JS_TRUE;
15950 : }
15951 :
15952 : // === interface nsIDOMHTMLProgressElement
15953 :
15954 : static JSBool
15955 0 : nsIDOMHTMLProgressElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15956 : {
15957 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15958 : nsIDOMHTMLProgressElement *self;
15959 0 : xpc_qsSelfRef selfref;
15960 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15961 0 : return JS_FALSE;
15962 : nsresult rv;
15963 : double result;
15964 0 : rv = self->GetValue(&result);
15965 0 : if (NS_FAILED(rv))
15966 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15967 0 : return JS_NewNumberValue(cx, result, vp);
15968 : }
15969 :
15970 : static JSBool
15971 0 : nsIDOMHTMLProgressElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15972 : {
15973 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15974 : nsIDOMHTMLProgressElement *self;
15975 0 : xpc_qsSelfRef selfref;
15976 0 : JS::AutoValueRooter tvr(cx);
15977 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15978 0 : return JS_FALSE;
15979 : double arg0;
15980 0 : if (!JS_ValueToNumber(cx, *vp, &arg0))
15981 0 : return JS_FALSE;
15982 : nsresult rv;
15983 0 : rv = self->SetValue(arg0);
15984 0 : if (NS_FAILED(rv))
15985 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15986 0 : return JS_TRUE;
15987 : }
15988 :
15989 : static JSBool
15990 0 : nsIDOMHTMLProgressElement_GetMax(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15991 : {
15992 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15993 : nsIDOMHTMLProgressElement *self;
15994 0 : xpc_qsSelfRef selfref;
15995 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15996 0 : return JS_FALSE;
15997 : nsresult rv;
15998 : double result;
15999 0 : rv = self->GetMax(&result);
16000 0 : if (NS_FAILED(rv))
16001 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16002 0 : return JS_NewNumberValue(cx, result, vp);
16003 : }
16004 :
16005 : static JSBool
16006 0 : nsIDOMHTMLProgressElement_SetMax(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16007 : {
16008 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16009 : nsIDOMHTMLProgressElement *self;
16010 0 : xpc_qsSelfRef selfref;
16011 0 : JS::AutoValueRooter tvr(cx);
16012 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16013 0 : return JS_FALSE;
16014 : double arg0;
16015 0 : if (!JS_ValueToNumber(cx, *vp, &arg0))
16016 0 : return JS_FALSE;
16017 : nsresult rv;
16018 0 : rv = self->SetMax(arg0);
16019 0 : if (NS_FAILED(rv))
16020 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16021 0 : return JS_TRUE;
16022 : }
16023 :
16024 : static JSBool
16025 0 : nsIDOMHTMLProgressElement_GetPosition(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16026 : {
16027 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16028 : nsIDOMHTMLProgressElement *self;
16029 0 : xpc_qsSelfRef selfref;
16030 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16031 0 : return JS_FALSE;
16032 : nsresult rv;
16033 : double result;
16034 0 : rv = self->GetPosition(&result);
16035 0 : if (NS_FAILED(rv))
16036 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16037 0 : return JS_NewNumberValue(cx, result, vp);
16038 : }
16039 :
16040 : static JSBool
16041 0 : nsIDOMHTMLProgressElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16042 : {
16043 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16044 0 : JSObject *callee = nsnull;
16045 : nsIDOMHTMLProgressElement *self;
16046 0 : xpc_qsSelfRef selfref;
16047 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16048 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16049 0 : return JS_FALSE;
16050 : nsresult rv;
16051 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
16052 0 : rv = self->GetForm(getter_AddRefs(result));
16053 0 : if (NS_FAILED(rv))
16054 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16055 0 : if (!result) {
16056 0 : *vp = JSVAL_NULL;
16057 0 : return JS_TRUE;
16058 : }
16059 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16060 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16061 0 : return JS_TRUE;
16062 : }
16063 : // After this point do not use 'result'!
16064 0 : qsObjectHelper helper(result, cache);
16065 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
16066 : }
16067 :
16068 : // === interface nsIDOMHTMLSelectElement
16069 :
16070 : static JSBool
16071 0 : nsIDOMHTMLSelectElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16072 : {
16073 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16074 : nsIDOMHTMLSelectElement *self;
16075 0 : xpc_qsSelfRef selfref;
16076 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16077 0 : return JS_FALSE;
16078 : nsresult rv;
16079 0 : nsString result;
16080 0 : rv = self->GetName(result);
16081 0 : if (NS_FAILED(rv))
16082 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16083 0 : return xpc::StringToJsval(cx, result, vp);
16084 : }
16085 :
16086 : static JSBool
16087 0 : nsIDOMHTMLSelectElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16088 : {
16089 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16090 : nsIDOMHTMLSelectElement *self;
16091 0 : xpc_qsSelfRef selfref;
16092 0 : JS::AutoValueRooter tvr(cx);
16093 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16094 0 : return JS_FALSE;
16095 : xpc_qsDOMString arg0(cx, *vp, vp,
16096 : xpc_qsDOMString::eDefaultNullBehavior,
16097 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16098 0 : if (!arg0.IsValid())
16099 0 : return JS_FALSE;
16100 : nsresult rv;
16101 0 : rv = self->SetName(arg0);
16102 0 : if (NS_FAILED(rv))
16103 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16104 0 : return JS_TRUE;
16105 : }
16106 :
16107 : static JSBool
16108 0 : nsIDOMHTMLSelectElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16109 : {
16110 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16111 0 : JSObject *callee = nsnull;
16112 : nsIDOMHTMLSelectElement *self;
16113 0 : xpc_qsSelfRef selfref;
16114 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16115 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16116 0 : return JS_FALSE;
16117 : nsresult rv;
16118 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
16119 0 : rv = self->GetForm(getter_AddRefs(result));
16120 0 : if (NS_FAILED(rv))
16121 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16122 0 : if (!result) {
16123 0 : *vp = JSVAL_NULL;
16124 0 : return JS_TRUE;
16125 : }
16126 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16127 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16128 0 : return JS_TRUE;
16129 : }
16130 : // After this point do not use 'result'!
16131 0 : qsObjectHelper helper(result, cache);
16132 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
16133 : }
16134 :
16135 : static JSBool
16136 0 : nsIDOMHTMLSelectElement_Add(JSContext *cx, unsigned argc, jsval *vp)
16137 : {
16138 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16139 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16140 0 : if (!obj)
16141 0 : return JS_FALSE;
16142 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
16143 : nsIDOMHTMLSelectElement *self;
16144 0 : xpc_qsSelfRef selfref;
16145 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
16146 0 : return JS_FALSE;
16147 0 : if (argc < 1)
16148 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16149 0 : jsval *argv = JS_ARGV(cx, vp);
16150 : nsresult rv;
16151 : nsIDOMHTMLElement *arg0;
16152 0 : xpc_qsSelfRef arg0ref;
16153 0 : rv = xpc_qsUnwrapArg<nsIDOMHTMLElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
16154 0 : if (NS_FAILED(rv)) {
16155 0 : xpc_qsThrowBadArgWithCcx(ccx, rv, 0);
16156 0 : return JS_FALSE;
16157 : }
16158 0 : nsCOMPtr<nsIVariant> arg1(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (1 < argc ? argv[1] : JSVAL_NULL))));
16159 0 : if (!arg1) {
16160 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 1);
16161 0 : return JS_FALSE;
16162 0 : } rv = self->Add(arg0, arg1);
16163 0 : if (NS_FAILED(rv))
16164 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
16165 0 : *vp = JSVAL_VOID;
16166 0 : return JS_TRUE;
16167 : }
16168 :
16169 : static JSBool
16170 0 : nsIDOMHTMLSelectElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16171 : {
16172 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16173 : nsIDOMHTMLSelectElement *self;
16174 0 : xpc_qsSelfRef selfref;
16175 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16176 0 : return JS_FALSE;
16177 : nsresult rv;
16178 0 : nsString result;
16179 0 : rv = self->GetValue(result);
16180 0 : if (NS_FAILED(rv))
16181 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16182 0 : return xpc::StringToJsval(cx, result, vp);
16183 : }
16184 :
16185 : static JSBool
16186 0 : nsIDOMHTMLSelectElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16187 : {
16188 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16189 : nsIDOMHTMLSelectElement *self;
16190 0 : xpc_qsSelfRef selfref;
16191 0 : JS::AutoValueRooter tvr(cx);
16192 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16193 0 : return JS_FALSE;
16194 : xpc_qsDOMString arg0(cx, *vp, vp,
16195 : xpc_qsDOMString::eDefaultNullBehavior,
16196 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16197 0 : if (!arg0.IsValid())
16198 0 : return JS_FALSE;
16199 : nsresult rv;
16200 0 : rv = self->SetValue(arg0);
16201 0 : if (NS_FAILED(rv))
16202 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16203 0 : return JS_TRUE;
16204 : }
16205 :
16206 : static JSBool
16207 0 : nsIDOMHTMLSelectElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16208 : {
16209 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16210 : nsIDOMHTMLSelectElement *self;
16211 0 : xpc_qsSelfRef selfref;
16212 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16213 0 : return JS_FALSE;
16214 : nsresult rv;
16215 : bool result;
16216 0 : rv = self->GetDisabled(&result);
16217 0 : if (NS_FAILED(rv))
16218 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16219 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
16220 0 : return JS_TRUE;
16221 : }
16222 :
16223 : static JSBool
16224 0 : nsIDOMHTMLSelectElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16225 : {
16226 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16227 : nsIDOMHTMLSelectElement *self;
16228 0 : xpc_qsSelfRef selfref;
16229 0 : JS::AutoValueRooter tvr(cx);
16230 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16231 0 : return JS_FALSE;
16232 : JSBool arg0;
16233 0 : JS_ValueToBoolean(cx, *vp, &arg0);
16234 : nsresult rv;
16235 0 : rv = self->SetDisabled(arg0);
16236 0 : if (NS_FAILED(rv))
16237 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16238 0 : return JS_TRUE;
16239 : }
16240 :
16241 : static JSBool
16242 0 : nsIDOMHTMLSelectElement_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16243 : {
16244 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16245 : nsIDOMHTMLSelectElement *self;
16246 0 : xpc_qsSelfRef selfref;
16247 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16248 0 : return JS_FALSE;
16249 : nsresult rv;
16250 : PRUint32 result;
16251 0 : rv = self->GetLength(&result);
16252 0 : if (NS_FAILED(rv))
16253 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16254 0 : *vp = UINT_TO_JSVAL(result);
16255 0 : return JS_TRUE;
16256 : }
16257 :
16258 : static JSBool
16259 0 : nsIDOMHTMLSelectElement_SetLength(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16260 : {
16261 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16262 : nsIDOMHTMLSelectElement *self;
16263 0 : xpc_qsSelfRef selfref;
16264 0 : JS::AutoValueRooter tvr(cx);
16265 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16266 0 : return JS_FALSE;
16267 : uint32_t arg0;
16268 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
16269 0 : return JS_FALSE;
16270 : nsresult rv;
16271 0 : rv = self->SetLength(arg0);
16272 0 : if (NS_FAILED(rv))
16273 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16274 0 : return JS_TRUE;
16275 : }
16276 :
16277 : static JSBool
16278 0 : nsIDOMHTMLSelectElement_Remove(JSContext *cx, unsigned argc, jsval *vp)
16279 : {
16280 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16281 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16282 0 : if (!obj)
16283 0 : return JS_FALSE;
16284 : nsIDOMHTMLSelectElement *self;
16285 0 : xpc_qsSelfRef selfref;
16286 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
16287 0 : return JS_FALSE;
16288 0 : if (argc < 1)
16289 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16290 0 : jsval *argv = JS_ARGV(cx, vp);
16291 : int32_t arg0;
16292 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
16293 0 : return JS_FALSE;
16294 : nsresult rv;
16295 0 : rv = self->Remove(arg0);
16296 0 : if (NS_FAILED(rv))
16297 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16298 0 : *vp = JSVAL_VOID;
16299 0 : return JS_TRUE;
16300 : }
16301 :
16302 : static JSBool
16303 0 : nsIDOMHTMLSelectElement_GetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16304 : {
16305 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16306 : nsIDOMHTMLSelectElement *self;
16307 0 : xpc_qsSelfRef selfref;
16308 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16309 0 : return JS_FALSE;
16310 : nsresult rv;
16311 : PRInt32 result;
16312 0 : rv = self->GetSelectedIndex(&result);
16313 0 : if (NS_FAILED(rv))
16314 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16315 0 : *vp = INT_TO_JSVAL(result);
16316 0 : return JS_TRUE;
16317 : }
16318 :
16319 : static JSBool
16320 0 : nsIDOMHTMLSelectElement_SetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16321 : {
16322 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16323 : nsIDOMHTMLSelectElement *self;
16324 0 : xpc_qsSelfRef selfref;
16325 0 : JS::AutoValueRooter tvr(cx);
16326 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16327 0 : return JS_FALSE;
16328 : int32_t arg0;
16329 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16330 0 : return JS_FALSE;
16331 : nsresult rv;
16332 0 : rv = self->SetSelectedIndex(arg0);
16333 0 : if (NS_FAILED(rv))
16334 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16335 0 : return JS_TRUE;
16336 : }
16337 :
16338 : static JSBool
16339 0 : nsIDOMHTMLSelectElement_Item(JSContext *cx, unsigned argc, jsval *vp)
16340 : {
16341 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16342 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16343 0 : if (!obj)
16344 0 : return JS_FALSE;
16345 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
16346 : nsIDOMHTMLSelectElement *self;
16347 0 : xpc_qsSelfRef selfref;
16348 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16349 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
16350 0 : return JS_FALSE;
16351 0 : if (argc < 1)
16352 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16353 0 : jsval *argv = JS_ARGV(cx, vp);
16354 : uint32_t arg0;
16355 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
16356 0 : return JS_FALSE;
16357 : nsresult rv;
16358 0 : nsCOMPtr<nsIDOMNode> result;
16359 0 : rv = self->Item(arg0, getter_AddRefs(result));
16360 0 : if (NS_FAILED(rv))
16361 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16362 0 : if (!result) {
16363 0 : *vp = JSVAL_NULL;
16364 0 : return JS_TRUE;
16365 : }
16366 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16367 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16368 0 : return JS_TRUE;
16369 : }
16370 : // After this point do not use 'result'!
16371 0 : qsObjectHelper helper(result, cache);
16372 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
16373 : }
16374 :
16375 : static JSBool
16376 0 : nsIDOMHTMLSelectElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16377 : {
16378 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16379 : nsIDOMHTMLSelectElement *self;
16380 0 : xpc_qsSelfRef selfref;
16381 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16382 0 : return JS_FALSE;
16383 : nsresult rv;
16384 0 : nsString result;
16385 0 : rv = self->GetType(result);
16386 0 : if (NS_FAILED(rv))
16387 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16388 0 : return xpc::StringToJsval(cx, result, vp);
16389 : }
16390 :
16391 : static JSBool
16392 0 : nsIDOMHTMLSelectElement_GetOptions(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16393 : {
16394 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16395 0 : JSObject *callee = nsnull;
16396 : nsIDOMHTMLSelectElement *self;
16397 0 : xpc_qsSelfRef selfref;
16398 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16399 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16400 0 : return JS_FALSE;
16401 : nsresult rv;
16402 0 : nsCOMPtr<nsIDOMHTMLOptionsCollection> result;
16403 0 : rv = self->GetOptions(getter_AddRefs(result));
16404 0 : if (NS_FAILED(rv))
16405 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16406 0 : if (!result) {
16407 0 : *vp = JSVAL_NULL;
16408 0 : return JS_TRUE;
16409 : }
16410 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16411 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16412 0 : return JS_TRUE;
16413 : }
16414 : // After this point do not use 'result'!
16415 0 : qsObjectHelper helper(result, cache);
16416 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLOptionsCollection), &interfaces[k_nsIDOMHTMLOptionsCollection], vp);
16417 : }
16418 :
16419 : static JSBool
16420 0 : nsIDOMHTMLSelectElement_GetSize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16421 : {
16422 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16423 : nsIDOMHTMLSelectElement *self;
16424 0 : xpc_qsSelfRef selfref;
16425 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16426 0 : return JS_FALSE;
16427 : nsresult rv;
16428 : PRInt32 result;
16429 0 : rv = self->GetSize(&result);
16430 0 : if (NS_FAILED(rv))
16431 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16432 0 : *vp = INT_TO_JSVAL(result);
16433 0 : return JS_TRUE;
16434 : }
16435 :
16436 : static JSBool
16437 0 : nsIDOMHTMLSelectElement_SetSize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16438 : {
16439 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16440 : nsIDOMHTMLSelectElement *self;
16441 0 : xpc_qsSelfRef selfref;
16442 0 : JS::AutoValueRooter tvr(cx);
16443 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16444 0 : return JS_FALSE;
16445 : int32_t arg0;
16446 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16447 0 : return JS_FALSE;
16448 : nsresult rv;
16449 0 : rv = self->SetSize(arg0);
16450 0 : if (NS_FAILED(rv))
16451 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16452 0 : return JS_TRUE;
16453 : }
16454 :
16455 : // === interface nsIDOMHTMLStyleElement
16456 :
16457 : static JSBool
16458 0 : nsIDOMHTMLStyleElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16459 : {
16460 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16461 : nsIDOMHTMLStyleElement *self;
16462 0 : xpc_qsSelfRef selfref;
16463 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16464 0 : return JS_FALSE;
16465 : nsresult rv;
16466 : bool result;
16467 0 : rv = self->GetDisabled(&result);
16468 0 : if (NS_FAILED(rv))
16469 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16470 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
16471 0 : return JS_TRUE;
16472 : }
16473 :
16474 : static JSBool
16475 0 : nsIDOMHTMLStyleElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16476 : {
16477 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16478 : nsIDOMHTMLStyleElement *self;
16479 0 : xpc_qsSelfRef selfref;
16480 0 : JS::AutoValueRooter tvr(cx);
16481 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16482 0 : return JS_FALSE;
16483 : JSBool arg0;
16484 0 : JS_ValueToBoolean(cx, *vp, &arg0);
16485 : nsresult rv;
16486 0 : rv = self->SetDisabled(arg0);
16487 0 : if (NS_FAILED(rv))
16488 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16489 0 : return JS_TRUE;
16490 : }
16491 :
16492 : // === interface nsIDOMHTMLTableCellElement
16493 :
16494 : static JSBool
16495 0 : nsIDOMHTMLTableCellElement_GetColSpan(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16496 : {
16497 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16498 : nsIDOMHTMLTableCellElement *self;
16499 0 : xpc_qsSelfRef selfref;
16500 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16501 0 : return JS_FALSE;
16502 : nsresult rv;
16503 : PRInt32 result;
16504 0 : rv = self->GetColSpan(&result);
16505 0 : if (NS_FAILED(rv))
16506 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16507 0 : *vp = INT_TO_JSVAL(result);
16508 0 : return JS_TRUE;
16509 : }
16510 :
16511 : static JSBool
16512 0 : nsIDOMHTMLTableCellElement_SetColSpan(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16513 : {
16514 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16515 : nsIDOMHTMLTableCellElement *self;
16516 0 : xpc_qsSelfRef selfref;
16517 0 : JS::AutoValueRooter tvr(cx);
16518 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16519 0 : return JS_FALSE;
16520 : int32_t arg0;
16521 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16522 0 : return JS_FALSE;
16523 : nsresult rv;
16524 0 : rv = self->SetColSpan(arg0);
16525 0 : if (NS_FAILED(rv))
16526 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16527 0 : return JS_TRUE;
16528 : }
16529 :
16530 : static JSBool
16531 0 : nsIDOMHTMLTableCellElement_GetHeaders(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16532 : {
16533 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16534 : nsIDOMHTMLTableCellElement *self;
16535 0 : xpc_qsSelfRef selfref;
16536 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16537 0 : return JS_FALSE;
16538 : nsresult rv;
16539 0 : nsString result;
16540 0 : rv = self->GetHeaders(result);
16541 0 : if (NS_FAILED(rv))
16542 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16543 0 : return xpc::StringToJsval(cx, result, vp);
16544 : }
16545 :
16546 : static JSBool
16547 0 : nsIDOMHTMLTableCellElement_SetHeaders(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16548 : {
16549 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16550 : nsIDOMHTMLTableCellElement *self;
16551 0 : xpc_qsSelfRef selfref;
16552 0 : JS::AutoValueRooter tvr(cx);
16553 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16554 0 : return JS_FALSE;
16555 : xpc_qsDOMString arg0(cx, *vp, vp,
16556 : xpc_qsDOMString::eDefaultNullBehavior,
16557 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16558 0 : if (!arg0.IsValid())
16559 0 : return JS_FALSE;
16560 : nsresult rv;
16561 0 : rv = self->SetHeaders(arg0);
16562 0 : if (NS_FAILED(rv))
16563 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16564 0 : return JS_TRUE;
16565 : }
16566 :
16567 : static JSBool
16568 0 : nsIDOMHTMLTableCellElement_GetCellIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16569 : {
16570 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16571 : nsIDOMHTMLTableCellElement *self;
16572 0 : xpc_qsSelfRef selfref;
16573 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16574 0 : return JS_FALSE;
16575 : nsresult rv;
16576 : PRInt32 result;
16577 0 : rv = self->GetCellIndex(&result);
16578 0 : if (NS_FAILED(rv))
16579 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16580 0 : *vp = INT_TO_JSVAL(result);
16581 0 : return JS_TRUE;
16582 : }
16583 :
16584 : static JSBool
16585 0 : nsIDOMHTMLTableCellElement_GetRowSpan(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16586 : {
16587 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16588 : nsIDOMHTMLTableCellElement *self;
16589 0 : xpc_qsSelfRef selfref;
16590 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16591 0 : return JS_FALSE;
16592 : nsresult rv;
16593 : PRInt32 result;
16594 0 : rv = self->GetRowSpan(&result);
16595 0 : if (NS_FAILED(rv))
16596 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16597 0 : *vp = INT_TO_JSVAL(result);
16598 0 : return JS_TRUE;
16599 : }
16600 :
16601 : static JSBool
16602 0 : nsIDOMHTMLTableCellElement_SetRowSpan(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16603 : {
16604 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16605 : nsIDOMHTMLTableCellElement *self;
16606 0 : xpc_qsSelfRef selfref;
16607 0 : JS::AutoValueRooter tvr(cx);
16608 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16609 0 : return JS_FALSE;
16610 : int32_t arg0;
16611 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16612 0 : return JS_FALSE;
16613 : nsresult rv;
16614 0 : rv = self->SetRowSpan(arg0);
16615 0 : if (NS_FAILED(rv))
16616 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16617 0 : return JS_TRUE;
16618 : }
16619 :
16620 : static JSBool
16621 0 : nsIDOMHTMLTableCellElement_GetAbbr(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16622 : {
16623 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16624 : nsIDOMHTMLTableCellElement *self;
16625 0 : xpc_qsSelfRef selfref;
16626 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16627 0 : return JS_FALSE;
16628 : nsresult rv;
16629 0 : nsString result;
16630 0 : rv = self->GetAbbr(result);
16631 0 : if (NS_FAILED(rv))
16632 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16633 0 : return xpc::StringToJsval(cx, result, vp);
16634 : }
16635 :
16636 : static JSBool
16637 0 : nsIDOMHTMLTableCellElement_SetAbbr(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16638 : {
16639 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16640 : nsIDOMHTMLTableCellElement *self;
16641 0 : xpc_qsSelfRef selfref;
16642 0 : JS::AutoValueRooter tvr(cx);
16643 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16644 0 : return JS_FALSE;
16645 : xpc_qsDOMString arg0(cx, *vp, vp,
16646 : xpc_qsDOMString::eDefaultNullBehavior,
16647 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16648 0 : if (!arg0.IsValid())
16649 0 : return JS_FALSE;
16650 : nsresult rv;
16651 0 : rv = self->SetAbbr(arg0);
16652 0 : if (NS_FAILED(rv))
16653 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16654 0 : return JS_TRUE;
16655 : }
16656 :
16657 : static JSBool
16658 0 : nsIDOMHTMLTableCellElement_GetScope(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16659 : {
16660 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16661 : nsIDOMHTMLTableCellElement *self;
16662 0 : xpc_qsSelfRef selfref;
16663 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16664 0 : return JS_FALSE;
16665 : nsresult rv;
16666 0 : nsString result;
16667 0 : rv = self->GetScope(result);
16668 0 : if (NS_FAILED(rv))
16669 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16670 0 : return xpc::StringToJsval(cx, result, vp);
16671 : }
16672 :
16673 : static JSBool
16674 0 : nsIDOMHTMLTableCellElement_SetScope(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16675 : {
16676 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16677 : nsIDOMHTMLTableCellElement *self;
16678 0 : xpc_qsSelfRef selfref;
16679 0 : JS::AutoValueRooter tvr(cx);
16680 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16681 0 : return JS_FALSE;
16682 : xpc_qsDOMString arg0(cx, *vp, vp,
16683 : xpc_qsDOMString::eDefaultNullBehavior,
16684 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16685 0 : if (!arg0.IsValid())
16686 0 : return JS_FALSE;
16687 : nsresult rv;
16688 0 : rv = self->SetScope(arg0);
16689 0 : if (NS_FAILED(rv))
16690 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16691 0 : return JS_TRUE;
16692 : }
16693 :
16694 : static JSBool
16695 0 : nsIDOMHTMLTableCellElement_GetNoWrap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16696 : {
16697 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16698 : nsIDOMHTMLTableCellElement *self;
16699 0 : xpc_qsSelfRef selfref;
16700 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16701 0 : return JS_FALSE;
16702 : nsresult rv;
16703 : bool result;
16704 0 : rv = self->GetNoWrap(&result);
16705 0 : if (NS_FAILED(rv))
16706 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16707 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
16708 0 : return JS_TRUE;
16709 : }
16710 :
16711 : static JSBool
16712 0 : nsIDOMHTMLTableCellElement_SetNoWrap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16713 : {
16714 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16715 : nsIDOMHTMLTableCellElement *self;
16716 0 : xpc_qsSelfRef selfref;
16717 0 : JS::AutoValueRooter tvr(cx);
16718 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16719 0 : return JS_FALSE;
16720 : JSBool arg0;
16721 0 : JS_ValueToBoolean(cx, *vp, &arg0);
16722 : nsresult rv;
16723 0 : rv = self->SetNoWrap(arg0);
16724 0 : if (NS_FAILED(rv))
16725 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16726 0 : return JS_TRUE;
16727 : }
16728 :
16729 : static JSBool
16730 0 : nsIDOMHTMLTableCellElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16731 : {
16732 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16733 : nsIDOMHTMLTableCellElement *self;
16734 0 : xpc_qsSelfRef selfref;
16735 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16736 0 : return JS_FALSE;
16737 : nsresult rv;
16738 0 : nsString result;
16739 0 : rv = self->GetWidth(result);
16740 0 : if (NS_FAILED(rv))
16741 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16742 0 : return xpc::StringToJsval(cx, result, vp);
16743 : }
16744 :
16745 : static JSBool
16746 0 : nsIDOMHTMLTableCellElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16747 : {
16748 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16749 : nsIDOMHTMLTableCellElement *self;
16750 0 : xpc_qsSelfRef selfref;
16751 0 : JS::AutoValueRooter tvr(cx);
16752 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16753 0 : return JS_FALSE;
16754 : xpc_qsDOMString arg0(cx, *vp, vp,
16755 : xpc_qsDOMString::eDefaultNullBehavior,
16756 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16757 0 : if (!arg0.IsValid())
16758 0 : return JS_FALSE;
16759 : nsresult rv;
16760 0 : rv = self->SetWidth(arg0);
16761 0 : if (NS_FAILED(rv))
16762 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16763 0 : return JS_TRUE;
16764 : }
16765 :
16766 : // === interface nsIDOMHTMLTableColElement
16767 :
16768 : static JSBool
16769 0 : nsIDOMHTMLTableColElement_GetSpan(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16770 : {
16771 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16772 : nsIDOMHTMLTableColElement *self;
16773 0 : xpc_qsSelfRef selfref;
16774 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16775 0 : return JS_FALSE;
16776 : nsresult rv;
16777 : PRInt32 result;
16778 0 : rv = self->GetSpan(&result);
16779 0 : if (NS_FAILED(rv))
16780 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16781 0 : *vp = INT_TO_JSVAL(result);
16782 0 : return JS_TRUE;
16783 : }
16784 :
16785 : static JSBool
16786 0 : nsIDOMHTMLTableColElement_SetSpan(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16787 : {
16788 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16789 : nsIDOMHTMLTableColElement *self;
16790 0 : xpc_qsSelfRef selfref;
16791 0 : JS::AutoValueRooter tvr(cx);
16792 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16793 0 : return JS_FALSE;
16794 : int32_t arg0;
16795 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16796 0 : return JS_FALSE;
16797 : nsresult rv;
16798 0 : rv = self->SetSpan(arg0);
16799 0 : if (NS_FAILED(rv))
16800 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16801 0 : return JS_TRUE;
16802 : }
16803 :
16804 : static JSBool
16805 0 : nsIDOMHTMLTableColElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16806 : {
16807 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16808 : nsIDOMHTMLTableColElement *self;
16809 0 : xpc_qsSelfRef selfref;
16810 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16811 0 : return JS_FALSE;
16812 : nsresult rv;
16813 0 : nsString result;
16814 0 : rv = self->GetWidth(result);
16815 0 : if (NS_FAILED(rv))
16816 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16817 0 : return xpc::StringToJsval(cx, result, vp);
16818 : }
16819 :
16820 : static JSBool
16821 0 : nsIDOMHTMLTableColElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16822 : {
16823 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16824 : nsIDOMHTMLTableColElement *self;
16825 0 : xpc_qsSelfRef selfref;
16826 0 : JS::AutoValueRooter tvr(cx);
16827 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16828 0 : return JS_FALSE;
16829 : xpc_qsDOMString arg0(cx, *vp, vp,
16830 : xpc_qsDOMString::eDefaultNullBehavior,
16831 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16832 0 : if (!arg0.IsValid())
16833 0 : return JS_FALSE;
16834 : nsresult rv;
16835 0 : rv = self->SetWidth(arg0);
16836 0 : if (NS_FAILED(rv))
16837 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16838 0 : return JS_TRUE;
16839 : }
16840 :
16841 : // === interface nsIDOMHTMLTableElement
16842 :
16843 : static JSBool
16844 0 : nsIDOMHTMLTableElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16845 : {
16846 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16847 0 : JSObject *callee = nsnull;
16848 : nsIDOMHTMLTableElement *self;
16849 0 : xpc_qsSelfRef selfref;
16850 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16851 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16852 0 : return JS_FALSE;
16853 : nsresult rv;
16854 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
16855 0 : rv = self->GetRows(getter_AddRefs(result));
16856 0 : if (NS_FAILED(rv))
16857 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16858 0 : if (!result) {
16859 0 : *vp = JSVAL_NULL;
16860 0 : return JS_TRUE;
16861 : }
16862 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16863 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16864 0 : return JS_TRUE;
16865 : }
16866 : // After this point do not use 'result'!
16867 0 : qsObjectHelper helper(result, cache);
16868 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
16869 : }
16870 :
16871 : static JSBool
16872 0 : nsIDOMHTMLTableElement_DeleteRow(JSContext *cx, unsigned argc, jsval *vp)
16873 : {
16874 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16875 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16876 0 : if (!obj)
16877 0 : return JS_FALSE;
16878 : nsIDOMHTMLTableElement *self;
16879 0 : xpc_qsSelfRef selfref;
16880 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
16881 0 : return JS_FALSE;
16882 0 : if (argc < 1)
16883 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16884 0 : jsval *argv = JS_ARGV(cx, vp);
16885 : int32_t arg0;
16886 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
16887 0 : return JS_FALSE;
16888 : nsresult rv;
16889 0 : rv = self->DeleteRow(arg0);
16890 0 : if (NS_FAILED(rv))
16891 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16892 0 : *vp = JSVAL_VOID;
16893 0 : return JS_TRUE;
16894 : }
16895 :
16896 : static JSBool
16897 0 : nsIDOMHTMLTableElement_GetSummary(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16898 : {
16899 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16900 : nsIDOMHTMLTableElement *self;
16901 0 : xpc_qsSelfRef selfref;
16902 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16903 0 : return JS_FALSE;
16904 : nsresult rv;
16905 0 : nsString result;
16906 0 : rv = self->GetSummary(result);
16907 0 : if (NS_FAILED(rv))
16908 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16909 0 : return xpc::StringToJsval(cx, result, vp);
16910 : }
16911 :
16912 : static JSBool
16913 0 : nsIDOMHTMLTableElement_SetSummary(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16914 : {
16915 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16916 : nsIDOMHTMLTableElement *self;
16917 0 : xpc_qsSelfRef selfref;
16918 0 : JS::AutoValueRooter tvr(cx);
16919 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16920 0 : return JS_FALSE;
16921 : xpc_qsDOMString arg0(cx, *vp, vp,
16922 : xpc_qsDOMString::eDefaultNullBehavior,
16923 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16924 0 : if (!arg0.IsValid())
16925 0 : return JS_FALSE;
16926 : nsresult rv;
16927 0 : rv = self->SetSummary(arg0);
16928 0 : if (NS_FAILED(rv))
16929 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16930 0 : return JS_TRUE;
16931 : }
16932 :
16933 : static JSBool
16934 0 : nsIDOMHTMLTableElement_InsertRow(JSContext *cx, unsigned argc, jsval *vp)
16935 : {
16936 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16937 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16938 0 : if (!obj)
16939 0 : return JS_FALSE;
16940 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
16941 : nsIDOMHTMLTableElement *self;
16942 0 : xpc_qsSelfRef selfref;
16943 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16944 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
16945 0 : return JS_FALSE;
16946 0 : if (argc < 1)
16947 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16948 0 : jsval *argv = JS_ARGV(cx, vp);
16949 : int32_t arg0;
16950 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
16951 0 : return JS_FALSE;
16952 : nsresult rv;
16953 0 : nsCOMPtr<nsIDOMHTMLElement> result;
16954 0 : rv = self->InsertRow(arg0, getter_AddRefs(result));
16955 0 : if (NS_FAILED(rv))
16956 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16957 0 : if (!result) {
16958 0 : *vp = JSVAL_NULL;
16959 0 : return JS_TRUE;
16960 : }
16961 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16962 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16963 0 : return JS_TRUE;
16964 : }
16965 : // After this point do not use 'result'!
16966 0 : qsObjectHelper helper(result, cache);
16967 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
16968 : }
16969 :
16970 : // === interface nsIDOMHTMLTableRowElement
16971 :
16972 : static JSBool
16973 0 : nsIDOMHTMLTableRowElement_GetSectionRowIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16974 : {
16975 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16976 : nsIDOMHTMLTableRowElement *self;
16977 0 : xpc_qsSelfRef selfref;
16978 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16979 0 : return JS_FALSE;
16980 : nsresult rv;
16981 : PRInt32 result;
16982 0 : rv = self->GetSectionRowIndex(&result);
16983 0 : if (NS_FAILED(rv))
16984 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16985 0 : *vp = INT_TO_JSVAL(result);
16986 0 : return JS_TRUE;
16987 : }
16988 :
16989 : static JSBool
16990 0 : nsIDOMHTMLTableRowElement_GetRowIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16991 : {
16992 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16993 : nsIDOMHTMLTableRowElement *self;
16994 0 : xpc_qsSelfRef selfref;
16995 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16996 0 : return JS_FALSE;
16997 : nsresult rv;
16998 : PRInt32 result;
16999 0 : rv = self->GetRowIndex(&result);
17000 0 : if (NS_FAILED(rv))
17001 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17002 0 : *vp = INT_TO_JSVAL(result);
17003 0 : return JS_TRUE;
17004 : }
17005 :
17006 : static JSBool
17007 0 : nsIDOMHTMLTableRowElement_GetCells(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17008 : {
17009 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17010 0 : JSObject *callee = nsnull;
17011 : nsIDOMHTMLTableRowElement *self;
17012 0 : xpc_qsSelfRef selfref;
17013 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17014 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17015 0 : return JS_FALSE;
17016 : nsresult rv;
17017 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
17018 0 : rv = self->GetCells(getter_AddRefs(result));
17019 0 : if (NS_FAILED(rv))
17020 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17021 0 : if (!result) {
17022 0 : *vp = JSVAL_NULL;
17023 0 : return JS_TRUE;
17024 : }
17025 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17026 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17027 0 : return JS_TRUE;
17028 : }
17029 : // After this point do not use 'result'!
17030 0 : qsObjectHelper helper(result, cache);
17031 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
17032 : }
17033 :
17034 : static JSBool
17035 0 : nsIDOMHTMLTableRowElement_DeleteCell(JSContext *cx, unsigned argc, jsval *vp)
17036 : {
17037 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17038 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17039 0 : if (!obj)
17040 0 : return JS_FALSE;
17041 : nsIDOMHTMLTableRowElement *self;
17042 0 : xpc_qsSelfRef selfref;
17043 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17044 0 : return JS_FALSE;
17045 0 : if (argc < 1)
17046 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17047 0 : jsval *argv = JS_ARGV(cx, vp);
17048 : int32_t arg0;
17049 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17050 0 : return JS_FALSE;
17051 : nsresult rv;
17052 0 : rv = self->DeleteCell(arg0);
17053 0 : if (NS_FAILED(rv))
17054 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17055 0 : *vp = JSVAL_VOID;
17056 0 : return JS_TRUE;
17057 : }
17058 :
17059 : static JSBool
17060 0 : nsIDOMHTMLTableRowElement_InsertCell(JSContext *cx, unsigned argc, jsval *vp)
17061 : {
17062 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17063 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17064 0 : if (!obj)
17065 0 : return JS_FALSE;
17066 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
17067 : nsIDOMHTMLTableRowElement *self;
17068 0 : xpc_qsSelfRef selfref;
17069 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17070 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
17071 0 : return JS_FALSE;
17072 0 : if (argc < 1)
17073 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17074 0 : jsval *argv = JS_ARGV(cx, vp);
17075 : int32_t arg0;
17076 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17077 0 : return JS_FALSE;
17078 : nsresult rv;
17079 0 : nsCOMPtr<nsIDOMHTMLElement> result;
17080 0 : rv = self->InsertCell(arg0, getter_AddRefs(result));
17081 0 : if (NS_FAILED(rv))
17082 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17083 0 : if (!result) {
17084 0 : *vp = JSVAL_NULL;
17085 0 : return JS_TRUE;
17086 : }
17087 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17088 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17089 0 : return JS_TRUE;
17090 : }
17091 : // After this point do not use 'result'!
17092 0 : qsObjectHelper helper(result, cache);
17093 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
17094 : }
17095 :
17096 : // === interface nsIDOMHTMLTableSectionElement
17097 :
17098 : static JSBool
17099 0 : nsIDOMHTMLTableSectionElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17100 : {
17101 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17102 0 : JSObject *callee = nsnull;
17103 : nsIDOMHTMLTableSectionElement *self;
17104 0 : xpc_qsSelfRef selfref;
17105 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17106 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17107 0 : return JS_FALSE;
17108 : nsresult rv;
17109 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
17110 0 : rv = self->GetRows(getter_AddRefs(result));
17111 0 : if (NS_FAILED(rv))
17112 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17113 0 : if (!result) {
17114 0 : *vp = JSVAL_NULL;
17115 0 : return JS_TRUE;
17116 : }
17117 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17118 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17119 0 : return JS_TRUE;
17120 : }
17121 : // After this point do not use 'result'!
17122 0 : qsObjectHelper helper(result, cache);
17123 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
17124 : }
17125 :
17126 : static JSBool
17127 0 : nsIDOMHTMLTableSectionElement_InsertRow(JSContext *cx, unsigned argc, jsval *vp)
17128 : {
17129 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17130 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17131 0 : if (!obj)
17132 0 : return JS_FALSE;
17133 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
17134 : nsIDOMHTMLTableSectionElement *self;
17135 0 : xpc_qsSelfRef selfref;
17136 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17137 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
17138 0 : return JS_FALSE;
17139 0 : if (argc < 1)
17140 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17141 0 : jsval *argv = JS_ARGV(cx, vp);
17142 : int32_t arg0;
17143 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17144 0 : return JS_FALSE;
17145 : nsresult rv;
17146 0 : nsCOMPtr<nsIDOMHTMLElement> result;
17147 0 : rv = self->InsertRow(arg0, getter_AddRefs(result));
17148 0 : if (NS_FAILED(rv))
17149 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17150 0 : if (!result) {
17151 0 : *vp = JSVAL_NULL;
17152 0 : return JS_TRUE;
17153 : }
17154 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17155 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17156 0 : return JS_TRUE;
17157 : }
17158 : // After this point do not use 'result'!
17159 0 : qsObjectHelper helper(result, cache);
17160 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
17161 : }
17162 :
17163 : static JSBool
17164 0 : nsIDOMHTMLTableSectionElement_DeleteRow(JSContext *cx, unsigned argc, jsval *vp)
17165 : {
17166 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17167 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17168 0 : if (!obj)
17169 0 : return JS_FALSE;
17170 : nsIDOMHTMLTableSectionElement *self;
17171 0 : xpc_qsSelfRef selfref;
17172 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17173 0 : return JS_FALSE;
17174 0 : if (argc < 1)
17175 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17176 0 : jsval *argv = JS_ARGV(cx, vp);
17177 : int32_t arg0;
17178 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17179 0 : return JS_FALSE;
17180 : nsresult rv;
17181 0 : rv = self->DeleteRow(arg0);
17182 0 : if (NS_FAILED(rv))
17183 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17184 0 : *vp = JSVAL_VOID;
17185 0 : return JS_TRUE;
17186 : }
17187 :
17188 : // === interface nsIDOMHTMLTextAreaElement
17189 :
17190 : static JSBool
17191 0 : nsIDOMHTMLTextAreaElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17192 : {
17193 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17194 : nsIDOMHTMLTextAreaElement *self;
17195 0 : xpc_qsSelfRef selfref;
17196 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17197 0 : return JS_FALSE;
17198 : nsresult rv;
17199 : PRUint32 result;
17200 0 : rv = self->GetRows(&result);
17201 0 : if (NS_FAILED(rv))
17202 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17203 0 : *vp = UINT_TO_JSVAL(result);
17204 0 : return JS_TRUE;
17205 : }
17206 :
17207 : static JSBool
17208 0 : nsIDOMHTMLTextAreaElement_SetRows(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17209 : {
17210 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17211 : nsIDOMHTMLTextAreaElement *self;
17212 0 : xpc_qsSelfRef selfref;
17213 0 : JS::AutoValueRooter tvr(cx);
17214 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17215 0 : return JS_FALSE;
17216 : uint32_t arg0;
17217 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17218 0 : return JS_FALSE;
17219 : nsresult rv;
17220 0 : rv = self->SetRows(arg0);
17221 0 : if (NS_FAILED(rv))
17222 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17223 0 : return JS_TRUE;
17224 : }
17225 :
17226 : static JSBool
17227 0 : nsIDOMHTMLTextAreaElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17228 : {
17229 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17230 : nsIDOMHTMLTextAreaElement *self;
17231 0 : xpc_qsSelfRef selfref;
17232 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17233 0 : return JS_FALSE;
17234 : nsresult rv;
17235 0 : nsString result;
17236 0 : rv = self->GetName(result);
17237 0 : if (NS_FAILED(rv))
17238 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17239 0 : return xpc::StringToJsval(cx, result, vp);
17240 : }
17241 :
17242 : static JSBool
17243 0 : nsIDOMHTMLTextAreaElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17244 : {
17245 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17246 : nsIDOMHTMLTextAreaElement *self;
17247 0 : xpc_qsSelfRef selfref;
17248 0 : JS::AutoValueRooter tvr(cx);
17249 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17250 0 : return JS_FALSE;
17251 : xpc_qsDOMString arg0(cx, *vp, vp,
17252 : xpc_qsDOMString::eDefaultNullBehavior,
17253 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17254 0 : if (!arg0.IsValid())
17255 0 : return JS_FALSE;
17256 : nsresult rv;
17257 0 : rv = self->SetName(arg0);
17258 0 : if (NS_FAILED(rv))
17259 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17260 0 : return JS_TRUE;
17261 : }
17262 :
17263 : static JSBool
17264 0 : nsIDOMHTMLTextAreaElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17265 : {
17266 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17267 0 : JSObject *callee = nsnull;
17268 : nsIDOMHTMLTextAreaElement *self;
17269 0 : xpc_qsSelfRef selfref;
17270 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17271 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17272 0 : return JS_FALSE;
17273 : nsresult rv;
17274 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
17275 0 : rv = self->GetForm(getter_AddRefs(result));
17276 0 : if (NS_FAILED(rv))
17277 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17278 0 : if (!result) {
17279 0 : *vp = JSVAL_NULL;
17280 0 : return JS_TRUE;
17281 : }
17282 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17283 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17284 0 : return JS_TRUE;
17285 : }
17286 : // After this point do not use 'result'!
17287 0 : qsObjectHelper helper(result, cache);
17288 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
17289 : }
17290 :
17291 : static JSBool
17292 0 : nsIDOMHTMLTextAreaElement_GetDefaultValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17293 : {
17294 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17295 : nsIDOMHTMLTextAreaElement *self;
17296 0 : xpc_qsSelfRef selfref;
17297 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17298 0 : return JS_FALSE;
17299 : nsresult rv;
17300 0 : nsString result;
17301 0 : rv = self->GetDefaultValue(result);
17302 0 : if (NS_FAILED(rv))
17303 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17304 0 : return xpc::StringToJsval(cx, result, vp);
17305 : }
17306 :
17307 : static JSBool
17308 0 : nsIDOMHTMLTextAreaElement_SetDefaultValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17309 : {
17310 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17311 : nsIDOMHTMLTextAreaElement *self;
17312 0 : xpc_qsSelfRef selfref;
17313 0 : JS::AutoValueRooter tvr(cx);
17314 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17315 0 : return JS_FALSE;
17316 : xpc_qsDOMString arg0(cx, *vp, vp,
17317 : xpc_qsDOMString::eDefaultNullBehavior,
17318 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17319 0 : if (!arg0.IsValid())
17320 0 : return JS_FALSE;
17321 : nsresult rv;
17322 0 : rv = self->SetDefaultValue(arg0);
17323 0 : if (NS_FAILED(rv))
17324 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17325 0 : return JS_TRUE;
17326 : }
17327 :
17328 : static JSBool
17329 0 : nsIDOMHTMLTextAreaElement_GetCols(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17330 : {
17331 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17332 : nsIDOMHTMLTextAreaElement *self;
17333 0 : xpc_qsSelfRef selfref;
17334 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17335 0 : return JS_FALSE;
17336 : nsresult rv;
17337 : PRUint32 result;
17338 0 : rv = self->GetCols(&result);
17339 0 : if (NS_FAILED(rv))
17340 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17341 0 : *vp = UINT_TO_JSVAL(result);
17342 0 : return JS_TRUE;
17343 : }
17344 :
17345 : static JSBool
17346 0 : nsIDOMHTMLTextAreaElement_SetCols(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17347 : {
17348 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17349 : nsIDOMHTMLTextAreaElement *self;
17350 0 : xpc_qsSelfRef selfref;
17351 0 : JS::AutoValueRooter tvr(cx);
17352 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17353 0 : return JS_FALSE;
17354 : uint32_t arg0;
17355 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17356 0 : return JS_FALSE;
17357 : nsresult rv;
17358 0 : rv = self->SetCols(arg0);
17359 0 : if (NS_FAILED(rv))
17360 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17361 0 : return JS_TRUE;
17362 : }
17363 :
17364 : static JSBool
17365 0 : nsIDOMHTMLTextAreaElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17366 : {
17367 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17368 : nsIDOMHTMLTextAreaElement *self;
17369 0 : xpc_qsSelfRef selfref;
17370 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17371 0 : return JS_FALSE;
17372 : nsresult rv;
17373 0 : nsString result;
17374 0 : rv = self->GetValue(result);
17375 0 : if (NS_FAILED(rv))
17376 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17377 0 : return xpc::StringToJsval(cx, result, vp);
17378 : }
17379 :
17380 : static JSBool
17381 0 : nsIDOMHTMLTextAreaElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17382 : {
17383 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17384 : nsIDOMHTMLTextAreaElement *self;
17385 0 : xpc_qsSelfRef selfref;
17386 0 : JS::AutoValueRooter tvr(cx);
17387 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17388 0 : return JS_FALSE;
17389 : xpc_qsDOMString arg0(cx, *vp, vp,
17390 : xpc_qsDOMString::eDefaultNullBehavior,
17391 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17392 0 : if (!arg0.IsValid())
17393 0 : return JS_FALSE;
17394 : nsresult rv;
17395 0 : rv = self->SetValue(arg0);
17396 0 : if (NS_FAILED(rv))
17397 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17398 0 : return JS_TRUE;
17399 : }
17400 :
17401 : static JSBool
17402 0 : nsIDOMHTMLTextAreaElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17403 : {
17404 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17405 : nsIDOMHTMLTextAreaElement *self;
17406 0 : xpc_qsSelfRef selfref;
17407 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17408 0 : return JS_FALSE;
17409 : nsresult rv;
17410 0 : nsString result;
17411 0 : rv = self->GetType(result);
17412 0 : if (NS_FAILED(rv))
17413 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17414 0 : return xpc::StringToJsval(cx, result, vp);
17415 : }
17416 :
17417 : static JSBool
17418 0 : nsIDOMHTMLTextAreaElement_Select(JSContext *cx, unsigned argc, jsval *vp)
17419 : {
17420 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17421 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17422 0 : if (!obj)
17423 0 : return JS_FALSE;
17424 : nsIDOMHTMLTextAreaElement *self;
17425 0 : xpc_qsSelfRef selfref;
17426 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17427 0 : return JS_FALSE;
17428 : nsresult rv;
17429 0 : rv = self->Select();
17430 0 : if (NS_FAILED(rv))
17431 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17432 0 : *vp = JSVAL_VOID;
17433 0 : return JS_TRUE;
17434 : }
17435 :
17436 : static JSBool
17437 0 : nsIDOMHTMLTextAreaElement_SetSelectionRange(JSContext *cx, unsigned argc, jsval *vp)
17438 : {
17439 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17440 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17441 0 : if (!obj)
17442 0 : return JS_FALSE;
17443 : nsIDOMHTMLTextAreaElement *self;
17444 0 : xpc_qsSelfRef selfref;
17445 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17446 0 : return JS_FALSE;
17447 0 : if (argc < 2)
17448 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17449 0 : jsval *argv = JS_ARGV(cx, vp);
17450 : int32_t arg0;
17451 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17452 0 : return JS_FALSE;
17453 : int32_t arg1;
17454 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
17455 0 : return JS_FALSE;
17456 : xpc_qsDOMString arg2(cx, (2 < argc ? argv[2] : JSVAL_NULL), (2 < argc ? &argv[2] : NULL),
17457 : xpc_qsDOMString::eDefaultNullBehavior,
17458 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17459 0 : if (!arg2.IsValid())
17460 0 : return JS_FALSE;
17461 : nsresult rv;
17462 0 : rv = self->SetSelectionRange(arg0, arg1, arg2);
17463 0 : if (NS_FAILED(rv))
17464 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17465 0 : *vp = JSVAL_VOID;
17466 0 : return JS_TRUE;
17467 : }
17468 :
17469 : static JSBool
17470 0 : nsIDOMHTMLTextAreaElement_GetSelectionStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17471 : {
17472 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17473 : nsIDOMHTMLTextAreaElement *self;
17474 0 : xpc_qsSelfRef selfref;
17475 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17476 0 : return JS_FALSE;
17477 : nsresult rv;
17478 : PRInt32 result;
17479 0 : rv = self->GetSelectionStart(&result);
17480 0 : if (NS_FAILED(rv))
17481 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17482 0 : *vp = INT_TO_JSVAL(result);
17483 0 : return JS_TRUE;
17484 : }
17485 :
17486 : static JSBool
17487 0 : nsIDOMHTMLTextAreaElement_SetSelectionStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17488 : {
17489 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17490 : nsIDOMHTMLTextAreaElement *self;
17491 0 : xpc_qsSelfRef selfref;
17492 0 : JS::AutoValueRooter tvr(cx);
17493 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17494 0 : return JS_FALSE;
17495 : int32_t arg0;
17496 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
17497 0 : return JS_FALSE;
17498 : nsresult rv;
17499 0 : rv = self->SetSelectionStart(arg0);
17500 0 : if (NS_FAILED(rv))
17501 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17502 0 : return JS_TRUE;
17503 : }
17504 :
17505 : static JSBool
17506 0 : nsIDOMHTMLTextAreaElement_GetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17507 : {
17508 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17509 : nsIDOMHTMLTextAreaElement *self;
17510 0 : xpc_qsSelfRef selfref;
17511 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17512 0 : return JS_FALSE;
17513 : nsresult rv;
17514 : PRInt32 result;
17515 0 : rv = self->GetSelectionEnd(&result);
17516 0 : if (NS_FAILED(rv))
17517 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17518 0 : *vp = INT_TO_JSVAL(result);
17519 0 : return JS_TRUE;
17520 : }
17521 :
17522 : static JSBool
17523 0 : nsIDOMHTMLTextAreaElement_SetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17524 : {
17525 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17526 : nsIDOMHTMLTextAreaElement *self;
17527 0 : xpc_qsSelfRef selfref;
17528 0 : JS::AutoValueRooter tvr(cx);
17529 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17530 0 : return JS_FALSE;
17531 : int32_t arg0;
17532 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
17533 0 : return JS_FALSE;
17534 : nsresult rv;
17535 0 : rv = self->SetSelectionEnd(arg0);
17536 0 : if (NS_FAILED(rv))
17537 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17538 0 : return JS_TRUE;
17539 : }
17540 :
17541 : static JSBool
17542 0 : nsIDOMHTMLTextAreaElement_GetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17543 : {
17544 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17545 : nsIDOMHTMLTextAreaElement *self;
17546 0 : xpc_qsSelfRef selfref;
17547 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17548 0 : return JS_FALSE;
17549 : nsresult rv;
17550 0 : nsString result;
17551 0 : rv = self->GetSelectionDirection(result);
17552 0 : if (NS_FAILED(rv))
17553 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17554 0 : return xpc::StringToJsval(cx, result, vp);
17555 : }
17556 :
17557 : static JSBool
17558 0 : nsIDOMHTMLTextAreaElement_SetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17559 : {
17560 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17561 : nsIDOMHTMLTextAreaElement *self;
17562 0 : xpc_qsSelfRef selfref;
17563 0 : JS::AutoValueRooter tvr(cx);
17564 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17565 0 : return JS_FALSE;
17566 : xpc_qsDOMString arg0(cx, *vp, vp,
17567 : xpc_qsDOMString::eDefaultNullBehavior,
17568 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17569 0 : if (!arg0.IsValid())
17570 0 : return JS_FALSE;
17571 : nsresult rv;
17572 0 : rv = self->SetSelectionDirection(arg0);
17573 0 : if (NS_FAILED(rv))
17574 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17575 0 : return JS_TRUE;
17576 : }
17577 :
17578 : static JSBool
17579 0 : nsIDOMHTMLTextAreaElement_GetTextLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17580 : {
17581 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17582 : nsIDOMHTMLTextAreaElement *self;
17583 0 : xpc_qsSelfRef selfref;
17584 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17585 0 : return JS_FALSE;
17586 : nsresult rv;
17587 : PRInt32 result;
17588 0 : rv = self->GetTextLength(&result);
17589 0 : if (NS_FAILED(rv))
17590 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17591 0 : *vp = INT_TO_JSVAL(result);
17592 0 : return JS_TRUE;
17593 : }
17594 :
17595 : static JSBool
17596 0 : nsIDOMHTMLTextAreaElement_GetWrap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17597 : {
17598 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17599 : nsIDOMHTMLTextAreaElement *self;
17600 0 : xpc_qsSelfRef selfref;
17601 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17602 0 : return JS_FALSE;
17603 : nsresult rv;
17604 0 : nsString result;
17605 0 : rv = self->GetWrap(result);
17606 0 : if (NS_FAILED(rv))
17607 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17608 0 : return xpc::StringToJsval(cx, result, vp);
17609 : }
17610 :
17611 : static JSBool
17612 0 : nsIDOMHTMLTextAreaElement_SetWrap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17613 : {
17614 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17615 : nsIDOMHTMLTextAreaElement *self;
17616 0 : xpc_qsSelfRef selfref;
17617 0 : JS::AutoValueRooter tvr(cx);
17618 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17619 0 : return JS_FALSE;
17620 : xpc_qsDOMString arg0(cx, *vp, vp,
17621 : xpc_qsDOMString::eStringify,
17622 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17623 0 : if (!arg0.IsValid())
17624 0 : return JS_FALSE;
17625 : nsresult rv;
17626 0 : rv = self->SetWrap(arg0);
17627 0 : if (NS_FAILED(rv))
17628 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17629 0 : return JS_TRUE;
17630 : }
17631 :
17632 : // === interface nsIDOMHTMLTitleElement
17633 :
17634 : static JSBool
17635 0 : nsIDOMHTMLTitleElement_GetText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17636 : {
17637 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17638 : nsIDOMHTMLTitleElement *self;
17639 0 : xpc_qsSelfRef selfref;
17640 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17641 0 : return JS_FALSE;
17642 : nsresult rv;
17643 0 : nsString result;
17644 0 : rv = self->GetText(result);
17645 0 : if (NS_FAILED(rv))
17646 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17647 0 : return xpc::StringToJsval(cx, result, vp);
17648 : }
17649 :
17650 : static JSBool
17651 0 : nsIDOMHTMLTitleElement_SetText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17652 : {
17653 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17654 : nsIDOMHTMLTitleElement *self;
17655 0 : xpc_qsSelfRef selfref;
17656 0 : JS::AutoValueRooter tvr(cx);
17657 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17658 0 : return JS_FALSE;
17659 : xpc_qsDOMString arg0(cx, *vp, vp,
17660 : xpc_qsDOMString::eDefaultNullBehavior,
17661 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17662 0 : if (!arg0.IsValid())
17663 0 : return JS_FALSE;
17664 : nsresult rv;
17665 0 : rv = self->SetText(arg0);
17666 0 : if (NS_FAILED(rv))
17667 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17668 0 : return JS_TRUE;
17669 : }
17670 :
17671 : // === interface nsIDOMHTMLCanvasElement
17672 :
17673 : static JSBool
17674 0 : nsIDOMHTMLCanvasElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17675 : {
17676 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17677 : nsIDOMHTMLCanvasElement *self;
17678 0 : xpc_qsSelfRef selfref;
17679 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17680 0 : return JS_FALSE;
17681 : nsresult rv;
17682 : PRUint32 result;
17683 0 : rv = self->GetWidth(&result);
17684 0 : if (NS_FAILED(rv))
17685 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17686 0 : *vp = UINT_TO_JSVAL(result);
17687 0 : return JS_TRUE;
17688 : }
17689 :
17690 : static JSBool
17691 0 : nsIDOMHTMLCanvasElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17692 : {
17693 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17694 : nsIDOMHTMLCanvasElement *self;
17695 0 : xpc_qsSelfRef selfref;
17696 0 : JS::AutoValueRooter tvr(cx);
17697 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17698 0 : return JS_FALSE;
17699 : uint32_t arg0;
17700 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17701 0 : return JS_FALSE;
17702 : nsresult rv;
17703 0 : rv = self->SetWidth(arg0);
17704 0 : if (NS_FAILED(rv))
17705 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17706 0 : return JS_TRUE;
17707 : }
17708 :
17709 : static JSBool
17710 0 : nsIDOMHTMLCanvasElement_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17711 : {
17712 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17713 : nsIDOMHTMLCanvasElement *self;
17714 0 : xpc_qsSelfRef selfref;
17715 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17716 0 : return JS_FALSE;
17717 : nsresult rv;
17718 : PRUint32 result;
17719 0 : rv = self->GetHeight(&result);
17720 0 : if (NS_FAILED(rv))
17721 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17722 0 : *vp = UINT_TO_JSVAL(result);
17723 0 : return JS_TRUE;
17724 : }
17725 :
17726 : static JSBool
17727 0 : nsIDOMHTMLCanvasElement_SetHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17728 : {
17729 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17730 : nsIDOMHTMLCanvasElement *self;
17731 0 : xpc_qsSelfRef selfref;
17732 0 : JS::AutoValueRooter tvr(cx);
17733 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17734 0 : return JS_FALSE;
17735 : uint32_t arg0;
17736 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17737 0 : return JS_FALSE;
17738 : nsresult rv;
17739 0 : rv = self->SetHeight(arg0);
17740 0 : if (NS_FAILED(rv))
17741 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17742 0 : return JS_TRUE;
17743 : }
17744 :
17745 : static JSBool
17746 0 : nsIDOMHTMLCanvasElement_GetContext(JSContext *cx, unsigned argc, jsval *vp)
17747 : {
17748 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17749 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17750 0 : if (!obj)
17751 0 : return JS_FALSE;
17752 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
17753 : nsIDOMHTMLCanvasElement *self;
17754 0 : xpc_qsSelfRef selfref;
17755 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17756 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
17757 0 : return JS_FALSE;
17758 0 : if (argc < 1)
17759 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17760 0 : jsval *argv = JS_ARGV(cx, vp);
17761 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
17762 : xpc_qsDOMString::eDefaultNullBehavior,
17763 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17764 0 : if (!arg0.IsValid())
17765 0 : return JS_FALSE;
17766 0 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
17767 : nsresult rv;
17768 0 : nsCOMPtr<nsISupports> result;
17769 0 : rv = self->GetContext(arg0, arg1, getter_AddRefs(result));
17770 0 : if (NS_FAILED(rv))
17771 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17772 0 : if (!result) {
17773 0 : *vp = JSVAL_NULL;
17774 0 : return JS_TRUE;
17775 : }
17776 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17777 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17778 0 : return JS_TRUE;
17779 : }
17780 : // After this point do not use 'result'!
17781 0 : qsObjectHelper helper(result, cache);
17782 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
17783 : }
17784 :
17785 : static JSBool
17786 0 : nsIDOMHTMLCanvasElement_ToDataURL(JSContext *cx, unsigned argc, jsval *vp)
17787 : {
17788 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17789 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17790 0 : if (!obj)
17791 0 : return JS_FALSE;
17792 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
17793 : nsIDOMHTMLCanvasElement *self;
17794 0 : xpc_qsSelfRef selfref;
17795 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
17796 0 : return JS_FALSE;
17797 0 : jsval *argv = JS_ARGV(cx, vp);
17798 : xpc_qsDOMString arg0(cx, (0 < argc ? argv[0] : JSVAL_NULL), (0 < argc ? &argv[0] : NULL),
17799 : xpc_qsDOMString::eDefaultNullBehavior,
17800 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17801 0 : if (!arg0.IsValid())
17802 0 : return JS_FALSE;
17803 0 : nsCOMPtr<nsIVariant> arg1(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (1 < argc ? argv[1] : JSVAL_NULL))));
17804 0 : if (!arg1) {
17805 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 1);
17806 0 : return JS_FALSE;
17807 : } nsresult rv;
17808 0 : nsString result;
17809 0 : rv = self->ToDataURL(arg0, arg1, NS_MIN<PRUint32>(argc, 2) - 0, result);
17810 0 : if (NS_FAILED(rv))
17811 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
17812 0 : return xpc::StringToJsval(cx, result, vp);
17813 : }
17814 :
17815 : // === interface nsIDOMRange
17816 :
17817 : static JSBool
17818 23 : nsIDOMRange_GetStartContainer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17819 : {
17820 23 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17821 23 : JSObject *callee = nsnull;
17822 : nsIDOMRange *self;
17823 46 : xpc_qsSelfRef selfref;
17824 46 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17825 23 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17826 0 : return JS_FALSE;
17827 : nsresult rv;
17828 46 : nsCOMPtr<nsIDOMNode> result;
17829 23 : rv = self->GetStartContainer(getter_AddRefs(result));
17830 23 : if (NS_FAILED(rv))
17831 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17832 23 : if (!result) {
17833 0 : *vp = JSVAL_NULL;
17834 0 : return JS_TRUE;
17835 : }
17836 23 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17837 23 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17838 0 : return JS_TRUE;
17839 : }
17840 : // After this point do not use 'result'!
17841 46 : qsObjectHelper helper(result, cache);
17842 23 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
17843 : }
17844 :
17845 : static JSBool
17846 5 : nsIDOMRange_GetStartOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17847 : {
17848 5 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17849 : nsIDOMRange *self;
17850 10 : xpc_qsSelfRef selfref;
17851 5 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17852 0 : return JS_FALSE;
17853 : nsresult rv;
17854 : PRInt32 result;
17855 5 : rv = self->GetStartOffset(&result);
17856 5 : if (NS_FAILED(rv))
17857 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17858 5 : *vp = INT_TO_JSVAL(result);
17859 5 : return JS_TRUE;
17860 : }
17861 :
17862 : static JSBool
17863 24 : nsIDOMRange_GetEndContainer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17864 : {
17865 24 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17866 24 : JSObject *callee = nsnull;
17867 : nsIDOMRange *self;
17868 48 : xpc_qsSelfRef selfref;
17869 48 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17870 24 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17871 0 : return JS_FALSE;
17872 : nsresult rv;
17873 48 : nsCOMPtr<nsIDOMNode> result;
17874 24 : rv = self->GetEndContainer(getter_AddRefs(result));
17875 24 : if (NS_FAILED(rv))
17876 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17877 24 : if (!result) {
17878 0 : *vp = JSVAL_NULL;
17879 0 : return JS_TRUE;
17880 : }
17881 24 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17882 24 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17883 0 : return JS_TRUE;
17884 : }
17885 : // After this point do not use 'result'!
17886 48 : qsObjectHelper helper(result, cache);
17887 24 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
17888 : }
17889 :
17890 : static JSBool
17891 2 : nsIDOMRange_GetEndOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17892 : {
17893 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17894 : nsIDOMRange *self;
17895 4 : xpc_qsSelfRef selfref;
17896 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17897 0 : return JS_FALSE;
17898 : nsresult rv;
17899 : PRInt32 result;
17900 2 : rv = self->GetEndOffset(&result);
17901 2 : if (NS_FAILED(rv))
17902 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17903 2 : *vp = INT_TO_JSVAL(result);
17904 2 : return JS_TRUE;
17905 : }
17906 :
17907 : static JSBool
17908 3 : nsIDOMRange_GetCollapsed(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17909 : {
17910 3 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17911 : nsIDOMRange *self;
17912 6 : xpc_qsSelfRef selfref;
17913 3 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17914 0 : return JS_FALSE;
17915 : nsresult rv;
17916 : bool result;
17917 3 : rv = self->GetCollapsed(&result);
17918 3 : if (NS_FAILED(rv))
17919 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17920 3 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
17921 3 : return JS_TRUE;
17922 : }
17923 :
17924 : static JSBool
17925 0 : nsIDOMRange_GetCommonAncestorContainer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17926 : {
17927 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17928 0 : JSObject *callee = nsnull;
17929 : nsIDOMRange *self;
17930 0 : xpc_qsSelfRef selfref;
17931 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17932 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17933 0 : return JS_FALSE;
17934 : nsresult rv;
17935 0 : nsCOMPtr<nsIDOMNode> result;
17936 0 : rv = self->GetCommonAncestorContainer(getter_AddRefs(result));
17937 0 : if (NS_FAILED(rv))
17938 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17939 0 : if (!result) {
17940 0 : *vp = JSVAL_NULL;
17941 0 : return JS_TRUE;
17942 : }
17943 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17944 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17945 0 : return JS_TRUE;
17946 : }
17947 : // After this point do not use 'result'!
17948 0 : qsObjectHelper helper(result, cache);
17949 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
17950 : }
17951 :
17952 : static JSBool
17953 36 : nsIDOMRange_SetStart(JSContext *cx, unsigned argc, jsval *vp)
17954 : {
17955 36 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17956 36 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17957 36 : if (!obj)
17958 0 : return JS_FALSE;
17959 : nsIDOMRange *self;
17960 72 : xpc_qsSelfRef selfref;
17961 36 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17962 0 : return JS_FALSE;
17963 36 : if (argc < 2)
17964 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17965 36 : jsval *argv = JS_ARGV(cx, vp);
17966 : nsresult rv;
17967 : nsIDOMNode *arg0;
17968 72 : xpc_qsSelfRef arg0ref;
17969 36 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
17970 36 : if (NS_FAILED(rv)) {
17971 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
17972 0 : return JS_FALSE;
17973 : }
17974 : int32_t arg1;
17975 36 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
17976 0 : return JS_FALSE;
17977 36 : rv = self->SetStart(arg0, arg1);
17978 36 : if (NS_FAILED(rv))
17979 4 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17980 32 : *vp = JSVAL_VOID;
17981 32 : return JS_TRUE;
17982 : }
17983 :
17984 : static JSBool
17985 33 : nsIDOMRange_SetEnd(JSContext *cx, unsigned argc, jsval *vp)
17986 : {
17987 33 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17988 33 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17989 33 : if (!obj)
17990 0 : return JS_FALSE;
17991 : nsIDOMRange *self;
17992 66 : xpc_qsSelfRef selfref;
17993 33 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17994 0 : return JS_FALSE;
17995 33 : if (argc < 2)
17996 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17997 33 : jsval *argv = JS_ARGV(cx, vp);
17998 : nsresult rv;
17999 : nsIDOMNode *arg0;
18000 66 : xpc_qsSelfRef arg0ref;
18001 33 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18002 33 : if (NS_FAILED(rv)) {
18003 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18004 0 : return JS_FALSE;
18005 : }
18006 : int32_t arg1;
18007 33 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
18008 0 : return JS_FALSE;
18009 33 : rv = self->SetEnd(arg0, arg1);
18010 33 : if (NS_FAILED(rv))
18011 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18012 33 : *vp = JSVAL_VOID;
18013 33 : return JS_TRUE;
18014 : }
18015 :
18016 : static JSBool
18017 0 : nsIDOMRange_SetStartBefore(JSContext *cx, unsigned argc, jsval *vp)
18018 : {
18019 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18020 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18021 0 : if (!obj)
18022 0 : return JS_FALSE;
18023 : nsIDOMRange *self;
18024 0 : xpc_qsSelfRef selfref;
18025 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18026 0 : return JS_FALSE;
18027 0 : if (argc < 1)
18028 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18029 0 : jsval *argv = JS_ARGV(cx, vp);
18030 : nsresult rv;
18031 : nsIDOMNode *arg0;
18032 0 : xpc_qsSelfRef arg0ref;
18033 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18034 0 : if (NS_FAILED(rv)) {
18035 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18036 0 : return JS_FALSE;
18037 : }
18038 0 : rv = self->SetStartBefore(arg0);
18039 0 : if (NS_FAILED(rv))
18040 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18041 0 : *vp = JSVAL_VOID;
18042 0 : return JS_TRUE;
18043 : }
18044 :
18045 : static JSBool
18046 0 : nsIDOMRange_SetStartAfter(JSContext *cx, unsigned argc, jsval *vp)
18047 : {
18048 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18049 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18050 0 : if (!obj)
18051 0 : return JS_FALSE;
18052 : nsIDOMRange *self;
18053 0 : xpc_qsSelfRef selfref;
18054 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18055 0 : return JS_FALSE;
18056 0 : if (argc < 1)
18057 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18058 0 : jsval *argv = JS_ARGV(cx, vp);
18059 : nsresult rv;
18060 : nsIDOMNode *arg0;
18061 0 : xpc_qsSelfRef arg0ref;
18062 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18063 0 : if (NS_FAILED(rv)) {
18064 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18065 0 : return JS_FALSE;
18066 : }
18067 0 : rv = self->SetStartAfter(arg0);
18068 0 : if (NS_FAILED(rv))
18069 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18070 0 : *vp = JSVAL_VOID;
18071 0 : return JS_TRUE;
18072 : }
18073 :
18074 : static JSBool
18075 0 : nsIDOMRange_SetEndBefore(JSContext *cx, unsigned argc, jsval *vp)
18076 : {
18077 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18078 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18079 0 : if (!obj)
18080 0 : return JS_FALSE;
18081 : nsIDOMRange *self;
18082 0 : xpc_qsSelfRef selfref;
18083 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18084 0 : return JS_FALSE;
18085 0 : if (argc < 1)
18086 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18087 0 : jsval *argv = JS_ARGV(cx, vp);
18088 : nsresult rv;
18089 : nsIDOMNode *arg0;
18090 0 : xpc_qsSelfRef arg0ref;
18091 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18092 0 : if (NS_FAILED(rv)) {
18093 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18094 0 : return JS_FALSE;
18095 : }
18096 0 : rv = self->SetEndBefore(arg0);
18097 0 : if (NS_FAILED(rv))
18098 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18099 0 : *vp = JSVAL_VOID;
18100 0 : return JS_TRUE;
18101 : }
18102 :
18103 : static JSBool
18104 0 : nsIDOMRange_SetEndAfter(JSContext *cx, unsigned argc, jsval *vp)
18105 : {
18106 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18107 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18108 0 : if (!obj)
18109 0 : return JS_FALSE;
18110 : nsIDOMRange *self;
18111 0 : xpc_qsSelfRef selfref;
18112 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18113 0 : return JS_FALSE;
18114 0 : if (argc < 1)
18115 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18116 0 : jsval *argv = JS_ARGV(cx, vp);
18117 : nsresult rv;
18118 : nsIDOMNode *arg0;
18119 0 : xpc_qsSelfRef arg0ref;
18120 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18121 0 : if (NS_FAILED(rv)) {
18122 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18123 0 : return JS_FALSE;
18124 : }
18125 0 : rv = self->SetEndAfter(arg0);
18126 0 : if (NS_FAILED(rv))
18127 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18128 0 : *vp = JSVAL_VOID;
18129 0 : return JS_TRUE;
18130 : }
18131 :
18132 : static JSBool
18133 0 : nsIDOMRange_Collapse(JSContext *cx, unsigned argc, jsval *vp)
18134 : {
18135 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18136 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18137 0 : if (!obj)
18138 0 : return JS_FALSE;
18139 : nsIDOMRange *self;
18140 0 : xpc_qsSelfRef selfref;
18141 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18142 0 : return JS_FALSE;
18143 0 : if (argc < 1)
18144 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18145 0 : jsval *argv = JS_ARGV(cx, vp);
18146 : JSBool arg0;
18147 0 : JS_ValueToBoolean(cx, argv[0], &arg0);
18148 : nsresult rv;
18149 0 : rv = self->Collapse(arg0);
18150 0 : if (NS_FAILED(rv))
18151 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18152 0 : *vp = JSVAL_VOID;
18153 0 : return JS_TRUE;
18154 : }
18155 :
18156 : static JSBool
18157 0 : nsIDOMRange_SelectNode(JSContext *cx, unsigned argc, jsval *vp)
18158 : {
18159 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18160 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18161 0 : if (!obj)
18162 0 : return JS_FALSE;
18163 : nsIDOMRange *self;
18164 0 : xpc_qsSelfRef selfref;
18165 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18166 0 : return JS_FALSE;
18167 0 : if (argc < 1)
18168 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18169 0 : jsval *argv = JS_ARGV(cx, vp);
18170 : nsresult rv;
18171 : nsIDOMNode *arg0;
18172 0 : xpc_qsSelfRef arg0ref;
18173 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18174 0 : if (NS_FAILED(rv)) {
18175 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18176 0 : return JS_FALSE;
18177 : }
18178 0 : rv = self->SelectNode(arg0);
18179 0 : if (NS_FAILED(rv))
18180 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18181 0 : *vp = JSVAL_VOID;
18182 0 : return JS_TRUE;
18183 : }
18184 :
18185 : static JSBool
18186 0 : nsIDOMRange_SelectNodeContents(JSContext *cx, unsigned argc, jsval *vp)
18187 : {
18188 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18189 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18190 0 : if (!obj)
18191 0 : return JS_FALSE;
18192 : nsIDOMRange *self;
18193 0 : xpc_qsSelfRef selfref;
18194 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18195 0 : return JS_FALSE;
18196 0 : if (argc < 1)
18197 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18198 0 : jsval *argv = JS_ARGV(cx, vp);
18199 : nsresult rv;
18200 : nsIDOMNode *arg0;
18201 0 : xpc_qsSelfRef arg0ref;
18202 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18203 0 : if (NS_FAILED(rv)) {
18204 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18205 0 : return JS_FALSE;
18206 : }
18207 0 : rv = self->SelectNodeContents(arg0);
18208 0 : if (NS_FAILED(rv))
18209 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18210 0 : *vp = JSVAL_VOID;
18211 0 : return JS_TRUE;
18212 : }
18213 :
18214 : static JSBool
18215 0 : nsIDOMRange_CompareBoundaryPoints(JSContext *cx, unsigned argc, jsval *vp)
18216 : {
18217 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18218 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18219 0 : if (!obj)
18220 0 : return JS_FALSE;
18221 : nsIDOMRange *self;
18222 0 : xpc_qsSelfRef selfref;
18223 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18224 0 : return JS_FALSE;
18225 0 : if (argc < 2)
18226 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18227 0 : jsval *argv = JS_ARGV(cx, vp);
18228 : uint32_t arg0_u32;
18229 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0_u32))
18230 0 : return JS_FALSE;
18231 0 : uint16_t arg0 = (uint16_t) arg0_u32;
18232 : nsresult rv;
18233 : nsIDOMRange *arg1;
18234 0 : xpc_qsSelfRef arg1ref;
18235 0 : rv = xpc_qsUnwrapArg<nsIDOMRange>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
18236 0 : if (NS_FAILED(rv)) {
18237 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
18238 0 : return JS_FALSE;
18239 : }
18240 : PRInt16 result;
18241 0 : rv = self->CompareBoundaryPoints(arg0, arg1, &result);
18242 0 : if (NS_FAILED(rv))
18243 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18244 0 : *vp = INT_TO_JSVAL((int32_t) result);
18245 0 : return JS_TRUE;
18246 : }
18247 :
18248 : static JSBool
18249 18 : nsIDOMRange_DeleteContents(JSContext *cx, unsigned argc, jsval *vp)
18250 : {
18251 18 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18252 18 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18253 18 : if (!obj)
18254 0 : return JS_FALSE;
18255 : nsIDOMRange *self;
18256 36 : xpc_qsSelfRef selfref;
18257 18 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18258 0 : return JS_FALSE;
18259 : nsresult rv;
18260 18 : rv = self->DeleteContents();
18261 18 : if (NS_FAILED(rv))
18262 9 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18263 9 : *vp = JSVAL_VOID;
18264 9 : return JS_TRUE;
18265 : }
18266 :
18267 : static JSBool
18268 19 : nsIDOMRange_ExtractContents(JSContext *cx, unsigned argc, jsval *vp)
18269 : {
18270 19 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18271 19 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18272 19 : if (!obj)
18273 0 : return JS_FALSE;
18274 19 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18275 : nsIDOMRange *self;
18276 38 : xpc_qsSelfRef selfref;
18277 38 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18278 19 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18279 0 : return JS_FALSE;
18280 : nsresult rv;
18281 38 : nsCOMPtr<nsIDOMDocumentFragment> result;
18282 19 : rv = self->ExtractContents(getter_AddRefs(result));
18283 19 : if (NS_FAILED(rv))
18284 9 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18285 10 : if (!result) {
18286 0 : *vp = JSVAL_NULL;
18287 0 : return JS_TRUE;
18288 : }
18289 10 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18290 10 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18291 0 : return JS_TRUE;
18292 : }
18293 : // After this point do not use 'result'!
18294 20 : qsObjectHelper helper(result, cache);
18295 10 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentFragment), &interfaces[k_nsIDOMDocumentFragment], vp);
18296 : }
18297 :
18298 : static JSBool
18299 0 : nsIDOMRange_CloneContents(JSContext *cx, unsigned argc, jsval *vp)
18300 : {
18301 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18302 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18303 0 : if (!obj)
18304 0 : return JS_FALSE;
18305 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18306 : nsIDOMRange *self;
18307 0 : xpc_qsSelfRef selfref;
18308 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18309 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18310 0 : return JS_FALSE;
18311 : nsresult rv;
18312 0 : nsCOMPtr<nsIDOMDocumentFragment> result;
18313 0 : rv = self->CloneContents(getter_AddRefs(result));
18314 0 : if (NS_FAILED(rv))
18315 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18316 0 : if (!result) {
18317 0 : *vp = JSVAL_NULL;
18318 0 : return JS_TRUE;
18319 : }
18320 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18321 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18322 0 : return JS_TRUE;
18323 : }
18324 : // After this point do not use 'result'!
18325 0 : qsObjectHelper helper(result, cache);
18326 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentFragment), &interfaces[k_nsIDOMDocumentFragment], vp);
18327 : }
18328 :
18329 : static JSBool
18330 0 : nsIDOMRange_InsertNode(JSContext *cx, unsigned argc, jsval *vp)
18331 : {
18332 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18333 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18334 0 : if (!obj)
18335 0 : return JS_FALSE;
18336 : nsIDOMRange *self;
18337 0 : xpc_qsSelfRef selfref;
18338 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18339 0 : return JS_FALSE;
18340 0 : if (argc < 1)
18341 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18342 0 : jsval *argv = JS_ARGV(cx, vp);
18343 : nsresult rv;
18344 : nsIDOMNode *arg0;
18345 0 : xpc_qsSelfRef arg0ref;
18346 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18347 0 : if (NS_FAILED(rv)) {
18348 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18349 0 : return JS_FALSE;
18350 : }
18351 0 : rv = self->InsertNode(arg0);
18352 0 : if (NS_FAILED(rv))
18353 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18354 0 : *vp = JSVAL_VOID;
18355 0 : return JS_TRUE;
18356 : }
18357 :
18358 : static JSBool
18359 0 : nsIDOMRange_SurroundContents(JSContext *cx, unsigned argc, jsval *vp)
18360 : {
18361 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18362 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18363 0 : if (!obj)
18364 0 : return JS_FALSE;
18365 : nsIDOMRange *self;
18366 0 : xpc_qsSelfRef selfref;
18367 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18368 0 : return JS_FALSE;
18369 0 : if (argc < 1)
18370 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18371 0 : jsval *argv = JS_ARGV(cx, vp);
18372 : nsresult rv;
18373 : nsIDOMNode *arg0;
18374 0 : xpc_qsSelfRef arg0ref;
18375 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18376 0 : if (NS_FAILED(rv)) {
18377 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18378 0 : return JS_FALSE;
18379 : }
18380 0 : rv = self->SurroundContents(arg0);
18381 0 : if (NS_FAILED(rv))
18382 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18383 0 : *vp = JSVAL_VOID;
18384 0 : return JS_TRUE;
18385 : }
18386 :
18387 : static JSBool
18388 0 : nsIDOMRange_CloneRange(JSContext *cx, unsigned argc, jsval *vp)
18389 : {
18390 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18391 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18392 0 : if (!obj)
18393 0 : return JS_FALSE;
18394 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18395 : nsIDOMRange *self;
18396 0 : xpc_qsSelfRef selfref;
18397 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18398 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18399 0 : return JS_FALSE;
18400 : nsresult rv;
18401 0 : nsCOMPtr<nsIDOMRange> result;
18402 0 : rv = self->CloneRange(getter_AddRefs(result));
18403 0 : if (NS_FAILED(rv))
18404 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18405 0 : if (!result) {
18406 0 : *vp = JSVAL_NULL;
18407 0 : return JS_TRUE;
18408 : }
18409 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18410 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18411 0 : return JS_TRUE;
18412 : }
18413 : // After this point do not use 'result'!
18414 0 : qsObjectHelper helper(result, cache);
18415 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMRange), &interfaces[k_nsIDOMRange], vp);
18416 : }
18417 :
18418 : static JSBool
18419 0 : nsIDOMRange_ToString(JSContext *cx, unsigned argc, jsval *vp)
18420 : {
18421 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18422 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18423 0 : if (!obj)
18424 0 : return JS_FALSE;
18425 : nsIDOMRange *self;
18426 0 : xpc_qsSelfRef selfref;
18427 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18428 0 : return JS_FALSE;
18429 : nsresult rv;
18430 0 : nsString result;
18431 0 : rv = self->ToString(result);
18432 0 : if (NS_FAILED(rv))
18433 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18434 0 : return xpc::StringToJsval(cx, result, vp);
18435 : }
18436 :
18437 : static JSBool
18438 9 : nsIDOMRange_Detach(JSContext *cx, unsigned argc, jsval *vp)
18439 : {
18440 9 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18441 9 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18442 9 : if (!obj)
18443 0 : return JS_FALSE;
18444 : nsIDOMRange *self;
18445 18 : xpc_qsSelfRef selfref;
18446 9 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18447 0 : return JS_FALSE;
18448 : nsresult rv;
18449 9 : rv = self->Detach();
18450 9 : if (NS_FAILED(rv))
18451 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18452 9 : *vp = JSVAL_VOID;
18453 9 : return JS_TRUE;
18454 : }
18455 :
18456 : static JSBool
18457 0 : nsIDOMRange_CreateContextualFragment(JSContext *cx, unsigned argc, jsval *vp)
18458 : {
18459 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18460 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18461 0 : if (!obj)
18462 0 : return JS_FALSE;
18463 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18464 : nsIDOMRange *self;
18465 0 : xpc_qsSelfRef selfref;
18466 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18467 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18468 0 : return JS_FALSE;
18469 0 : if (argc < 1)
18470 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18471 0 : jsval *argv = JS_ARGV(cx, vp);
18472 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18473 : xpc_qsDOMString::eDefaultNullBehavior,
18474 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18475 0 : if (!arg0.IsValid())
18476 0 : return JS_FALSE;
18477 : nsresult rv;
18478 0 : nsCOMPtr<nsIDOMDocumentFragment> result;
18479 0 : rv = self->CreateContextualFragment(arg0, getter_AddRefs(result));
18480 0 : if (NS_FAILED(rv))
18481 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18482 0 : if (!result) {
18483 0 : *vp = JSVAL_NULL;
18484 0 : return JS_TRUE;
18485 : }
18486 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18487 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18488 0 : return JS_TRUE;
18489 : }
18490 : // After this point do not use 'result'!
18491 0 : qsObjectHelper helper(result, cache);
18492 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentFragment), &interfaces[k_nsIDOMDocumentFragment], vp);
18493 : }
18494 :
18495 : static JSBool
18496 0 : nsIDOMRange_IsPointInRange(JSContext *cx, unsigned argc, jsval *vp)
18497 : {
18498 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18499 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18500 0 : if (!obj)
18501 0 : return JS_FALSE;
18502 : nsIDOMRange *self;
18503 0 : xpc_qsSelfRef selfref;
18504 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18505 0 : return JS_FALSE;
18506 0 : if (argc < 2)
18507 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18508 0 : jsval *argv = JS_ARGV(cx, vp);
18509 : nsresult rv;
18510 : nsIDOMNode *arg0;
18511 0 : xpc_qsSelfRef arg0ref;
18512 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18513 0 : if (NS_FAILED(rv)) {
18514 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18515 0 : return JS_FALSE;
18516 : }
18517 : int32_t arg1;
18518 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
18519 0 : return JS_FALSE;
18520 : bool result;
18521 0 : rv = self->IsPointInRange(arg0, arg1, &result);
18522 0 : if (NS_FAILED(rv))
18523 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18524 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
18525 0 : return JS_TRUE;
18526 : }
18527 :
18528 : static JSBool
18529 0 : nsIDOMRange_ComparePoint(JSContext *cx, unsigned argc, jsval *vp)
18530 : {
18531 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18532 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18533 0 : if (!obj)
18534 0 : return JS_FALSE;
18535 : nsIDOMRange *self;
18536 0 : xpc_qsSelfRef selfref;
18537 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18538 0 : return JS_FALSE;
18539 0 : if (argc < 2)
18540 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18541 0 : jsval *argv = JS_ARGV(cx, vp);
18542 : nsresult rv;
18543 : nsIDOMNode *arg0;
18544 0 : xpc_qsSelfRef arg0ref;
18545 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18546 0 : if (NS_FAILED(rv)) {
18547 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18548 0 : return JS_FALSE;
18549 : }
18550 : int32_t arg1;
18551 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
18552 0 : return JS_FALSE;
18553 : PRInt16 result;
18554 0 : rv = self->ComparePoint(arg0, arg1, &result);
18555 0 : if (NS_FAILED(rv))
18556 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18557 0 : *vp = INT_TO_JSVAL((int32_t) result);
18558 0 : return JS_TRUE;
18559 : }
18560 :
18561 : static JSBool
18562 0 : nsIDOMRange_GetClientRects(JSContext *cx, unsigned argc, jsval *vp)
18563 : {
18564 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18565 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18566 0 : if (!obj)
18567 0 : return JS_FALSE;
18568 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18569 : nsIDOMRange *self;
18570 0 : xpc_qsSelfRef selfref;
18571 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18572 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18573 0 : return JS_FALSE;
18574 : nsresult rv;
18575 0 : nsCOMPtr<nsIDOMClientRectList> result;
18576 0 : rv = self->GetClientRects(getter_AddRefs(result));
18577 0 : if (NS_FAILED(rv))
18578 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18579 0 : if (!result) {
18580 0 : *vp = JSVAL_NULL;
18581 0 : return JS_TRUE;
18582 : }
18583 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18584 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18585 0 : return JS_TRUE;
18586 : }
18587 : // After this point do not use 'result'!
18588 0 : qsObjectHelper helper(result, cache);
18589 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRectList), &interfaces[k_nsIDOMClientRectList], vp);
18590 : }
18591 :
18592 : static JSBool
18593 0 : nsIDOMRange_GetBoundingClientRect(JSContext *cx, unsigned argc, jsval *vp)
18594 : {
18595 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18596 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18597 0 : if (!obj)
18598 0 : return JS_FALSE;
18599 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18600 : nsIDOMRange *self;
18601 0 : xpc_qsSelfRef selfref;
18602 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18603 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18604 0 : return JS_FALSE;
18605 : nsresult rv;
18606 0 : nsCOMPtr<nsIDOMClientRect> result;
18607 0 : rv = self->GetBoundingClientRect(getter_AddRefs(result));
18608 0 : if (NS_FAILED(rv))
18609 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18610 0 : if (!result) {
18611 0 : *vp = JSVAL_NULL;
18612 0 : return JS_TRUE;
18613 : }
18614 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18615 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18616 0 : return JS_TRUE;
18617 : }
18618 : // After this point do not use 'result'!
18619 0 : qsObjectHelper helper(result, cache);
18620 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
18621 : }
18622 :
18623 : // === interface nsIDOMToString
18624 :
18625 : static JSBool
18626 0 : nsIDOMToString_ToString(JSContext *cx, unsigned argc, jsval *vp)
18627 : {
18628 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18629 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18630 0 : if (!obj)
18631 0 : return JS_FALSE;
18632 : nsIDOMToString *self;
18633 0 : xpc_qsSelfRef selfref;
18634 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18635 0 : return JS_FALSE;
18636 : nsresult rv;
18637 0 : nsString result;
18638 0 : rv = self->ToString(result);
18639 0 : if (NS_FAILED(rv))
18640 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18641 0 : return xpc::StringToJsval(cx, result, vp);
18642 : }
18643 :
18644 : // === interface nsIDOMStorage
18645 :
18646 : static JSBool
18647 18 : nsIDOMStorage_SetItem(JSContext *cx, unsigned argc, jsval *vp)
18648 : {
18649 18 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18650 18 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18651 18 : if (!obj)
18652 0 : return JS_FALSE;
18653 : nsIDOMStorage *self;
18654 36 : xpc_qsSelfRef selfref;
18655 18 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18656 0 : return JS_FALSE;
18657 18 : if (argc < 2)
18658 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18659 18 : jsval *argv = JS_ARGV(cx, vp);
18660 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18661 : xpc_qsDOMString::eDefaultNullBehavior,
18662 36 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18663 18 : if (!arg0.IsValid())
18664 0 : return JS_FALSE;
18665 18 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
18666 : xpc_qsDOMString::eDefaultNullBehavior,
18667 54 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18668 18 : if (!arg1.IsValid())
18669 0 : return JS_FALSE;
18670 : nsresult rv;
18671 18 : rv = self->SetItem(arg0, arg1);
18672 18 : if (NS_FAILED(rv))
18673 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18674 18 : *vp = JSVAL_VOID;
18675 18 : return JS_TRUE;
18676 : }
18677 :
18678 : static JSBool
18679 44 : nsIDOMStorage_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18680 : {
18681 44 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18682 : nsIDOMStorage *self;
18683 88 : xpc_qsSelfRef selfref;
18684 44 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
18685 0 : return JS_FALSE;
18686 : nsresult rv;
18687 : PRUint32 result;
18688 44 : rv = self->GetLength(&result);
18689 44 : if (NS_FAILED(rv))
18690 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18691 44 : *vp = UINT_TO_JSVAL(result);
18692 44 : return JS_TRUE;
18693 : }
18694 :
18695 : static JSBool
18696 44 : nsIDOMStorage_GetItem(JSContext *cx, unsigned argc, jsval *vp)
18697 : {
18698 44 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18699 44 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18700 44 : if (!obj)
18701 0 : return JS_FALSE;
18702 : nsIDOMStorage *self;
18703 88 : xpc_qsSelfRef selfref;
18704 44 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18705 0 : return JS_FALSE;
18706 44 : if (argc < 1)
18707 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18708 44 : jsval *argv = JS_ARGV(cx, vp);
18709 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18710 : xpc_qsDOMString::eDefaultNullBehavior,
18711 88 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18712 44 : if (!arg0.IsValid())
18713 0 : return JS_FALSE;
18714 : nsresult rv;
18715 88 : nsString result;
18716 44 : rv = self->GetItem(arg0, result);
18717 44 : if (NS_FAILED(rv))
18718 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18719 44 : return xpc::StringToJsval(cx, result, vp);
18720 : }
18721 :
18722 : static JSBool
18723 24 : nsIDOMStorage_Key(JSContext *cx, unsigned argc, jsval *vp)
18724 : {
18725 24 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18726 24 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18727 24 : if (!obj)
18728 0 : return JS_FALSE;
18729 : nsIDOMStorage *self;
18730 48 : xpc_qsSelfRef selfref;
18731 24 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18732 0 : return JS_FALSE;
18733 24 : if (argc < 1)
18734 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18735 24 : jsval *argv = JS_ARGV(cx, vp);
18736 : uint32_t arg0;
18737 24 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
18738 0 : return JS_FALSE;
18739 : nsresult rv;
18740 48 : nsString result;
18741 24 : rv = self->Key(arg0, result);
18742 24 : if (NS_FAILED(rv))
18743 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18744 24 : return xpc::StringToJsval(cx, result, vp);
18745 : }
18746 :
18747 : static JSBool
18748 6 : nsIDOMStorage_RemoveItem(JSContext *cx, unsigned argc, jsval *vp)
18749 : {
18750 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18751 6 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18752 6 : if (!obj)
18753 0 : return JS_FALSE;
18754 : nsIDOMStorage *self;
18755 12 : xpc_qsSelfRef selfref;
18756 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18757 0 : return JS_FALSE;
18758 6 : if (argc < 1)
18759 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18760 6 : jsval *argv = JS_ARGV(cx, vp);
18761 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18762 : xpc_qsDOMString::eDefaultNullBehavior,
18763 12 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18764 6 : if (!arg0.IsValid())
18765 0 : return JS_FALSE;
18766 : nsresult rv;
18767 6 : rv = self->RemoveItem(arg0);
18768 6 : if (NS_FAILED(rv))
18769 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18770 6 : *vp = JSVAL_VOID;
18771 6 : return JS_TRUE;
18772 : }
18773 :
18774 : static JSBool
18775 6 : nsIDOMStorage_Clear(JSContext *cx, unsigned argc, jsval *vp)
18776 : {
18777 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18778 6 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18779 6 : if (!obj)
18780 0 : return JS_FALSE;
18781 : nsIDOMStorage *self;
18782 12 : xpc_qsSelfRef selfref;
18783 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18784 0 : return JS_FALSE;
18785 : nsresult rv;
18786 :
18787 6 : rv = self->Clear();
18788 6 : if (NS_SUCCEEDED(rv))
18789 6 : JS_ClearScope(cx, obj);
18790 :
18791 6 : if (NS_FAILED(rv))
18792 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18793 6 : *vp = JSVAL_VOID;
18794 6 : return JS_TRUE;
18795 : }
18796 :
18797 : // === interface nsIDOMStorageItem
18798 :
18799 : static JSBool
18800 0 : nsIDOMStorageItem_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18801 : {
18802 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18803 : nsIDOMStorageItem *self;
18804 0 : xpc_qsSelfRef selfref;
18805 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
18806 0 : return JS_FALSE;
18807 : nsresult rv;
18808 0 : nsString result;
18809 0 : rv = self->GetValue(result);
18810 0 : if (NS_FAILED(rv))
18811 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18812 0 : return xpc::StringToJsval(cx, result, vp);
18813 : }
18814 :
18815 : static JSBool
18816 0 : nsIDOMStorageItem_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
18817 : {
18818 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18819 : nsIDOMStorageItem *self;
18820 0 : xpc_qsSelfRef selfref;
18821 0 : JS::AutoValueRooter tvr(cx);
18822 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
18823 0 : return JS_FALSE;
18824 : xpc_qsDOMString arg0(cx, *vp, vp,
18825 : xpc_qsDOMString::eDefaultNullBehavior,
18826 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18827 0 : if (!arg0.IsValid())
18828 0 : return JS_FALSE;
18829 : nsresult rv;
18830 0 : rv = self->SetValue(arg0);
18831 0 : if (NS_FAILED(rv))
18832 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
18833 0 : return JS_TRUE;
18834 : }
18835 :
18836 : // === interface nsIDOMSVGStylable
18837 :
18838 : static JSBool
18839 0 : nsIDOMSVGStylable_GetClassName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18840 : {
18841 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18842 0 : JSObject *callee = nsnull;
18843 : nsIDOMSVGStylable *self;
18844 0 : xpc_qsSelfRef selfref;
18845 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18846 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
18847 0 : return JS_FALSE;
18848 : nsresult rv;
18849 0 : nsCOMPtr<nsIDOMSVGAnimatedString> result;
18850 0 : rv = self->GetClassName(getter_AddRefs(result));
18851 0 : if (NS_FAILED(rv))
18852 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18853 0 : if (!result) {
18854 0 : *vp = JSVAL_NULL;
18855 0 : return JS_TRUE;
18856 : }
18857 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18858 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18859 0 : return JS_TRUE;
18860 : }
18861 : // After this point do not use 'result'!
18862 0 : qsObjectHelper helper(result, cache);
18863 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMSVGAnimatedString), &interfaces[k_nsIDOMSVGAnimatedString], vp);
18864 : }
18865 :
18866 : static JSBool
18867 0 : nsIDOMSVGStylable_GetStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18868 : {
18869 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18870 0 : JSObject *callee = nsnull;
18871 : nsSVGStylableElement *self;
18872 0 : xpc_qsSelfRef selfref;
18873 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18874 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
18875 0 : return JS_FALSE;
18876 : nsresult rv;
18877 0 : nsIDOMCSSStyleDeclaration* result = self->GetStyle(&rv);
18878 : #ifdef DEBUG
18879 : nsresult debug_rv;
18880 0 : nsCOMPtr<nsIDOMSVGStylable> debug_self;
18881 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
18882 0 : nsCOMPtr<nsIDOMCSSStyleDeclaration> debug_result;
18883 0 : debug_rv = debug_self->GetStyle(getter_AddRefs(debug_result));
18884 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) == NS_SUCCEEDED(rv) && xpc_qsSameResult(debug_result, result),
18885 : "Got the wrong answer from the custom method call!");
18886 : #endif
18887 0 : if (NS_FAILED(rv))
18888 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18889 0 : if (!result) {
18890 0 : *vp = JSVAL_NULL;
18891 0 : return JS_TRUE;
18892 : }
18893 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18894 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18895 0 : return JS_TRUE;
18896 : }
18897 : // After this point do not use 'result'!
18898 0 : qsObjectHelper helper(result, cache);
18899 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSStyleDeclaration), &interfaces[k_nsIDOMCSSStyleDeclaration], vp);
18900 : }
18901 :
18902 : static JSBool
18903 0 : nsIDOMSVGStylable_GetPresentationAttribute(JSContext *cx, unsigned argc, jsval *vp)
18904 : {
18905 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18906 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18907 0 : if (!obj)
18908 0 : return JS_FALSE;
18909 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18910 : nsIDOMSVGStylable *self;
18911 0 : xpc_qsSelfRef selfref;
18912 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18913 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18914 0 : return JS_FALSE;
18915 0 : if (argc < 1)
18916 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18917 0 : jsval *argv = JS_ARGV(cx, vp);
18918 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18919 : xpc_qsDOMString::eDefaultNullBehavior,
18920 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18921 0 : if (!arg0.IsValid())
18922 0 : return JS_FALSE;
18923 : nsresult rv;
18924 0 : nsCOMPtr<nsIDOMCSSValue> result;
18925 0 : rv = self->GetPresentationAttribute(arg0, getter_AddRefs(result));
18926 0 : if (NS_FAILED(rv))
18927 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18928 0 : if (!result) {
18929 0 : *vp = JSVAL_NULL;
18930 0 : return JS_TRUE;
18931 : }
18932 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18933 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18934 0 : return JS_TRUE;
18935 : }
18936 : // After this point do not use 'result'!
18937 0 : qsObjectHelper helper(result, cache);
18938 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSValue), &interfaces[k_nsIDOMCSSValue], vp);
18939 : }
18940 :
18941 : // === interface nsIDOMNodeIterator
18942 :
18943 : static JSBool
18944 0 : nsIDOMNodeIterator_NextNode(JSContext *cx, unsigned argc, jsval *vp)
18945 : {
18946 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18947 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18948 0 : if (!obj)
18949 0 : return JS_FALSE;
18950 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18951 : nsIDOMNodeIterator *self;
18952 0 : xpc_qsSelfRef selfref;
18953 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18954 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18955 0 : return JS_FALSE;
18956 : nsresult rv;
18957 0 : nsCOMPtr<nsIDOMNode> result;
18958 0 : rv = self->NextNode(getter_AddRefs(result));
18959 0 : if (NS_FAILED(rv))
18960 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18961 0 : if (!result) {
18962 0 : *vp = JSVAL_NULL;
18963 0 : return JS_TRUE;
18964 : }
18965 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18966 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18967 0 : return JS_TRUE;
18968 : }
18969 : // After this point do not use 'result'!
18970 0 : qsObjectHelper helper(result, cache);
18971 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
18972 : }
18973 :
18974 : // === interface nsIDOMXPathEvaluator
18975 :
18976 : static JSBool
18977 0 : nsIDOMXPathEvaluator_Evaluate(JSContext *cx, unsigned argc, jsval *vp)
18978 : {
18979 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18980 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18981 0 : if (!obj)
18982 0 : return JS_FALSE;
18983 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18984 : nsIDOMXPathEvaluator *self;
18985 0 : xpc_qsSelfRef selfref;
18986 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18987 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18988 0 : return JS_FALSE;
18989 0 : if (argc < 5)
18990 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18991 0 : jsval *argv = JS_ARGV(cx, vp);
18992 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18993 : xpc_qsDOMString::eDefaultNullBehavior,
18994 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18995 0 : if (!arg0.IsValid())
18996 0 : return JS_FALSE;
18997 : nsresult rv;
18998 : nsIDOMNode *arg1;
18999 0 : xpc_qsSelfRef arg1ref;
19000 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
19001 0 : if (NS_FAILED(rv)) {
19002 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
19003 0 : return JS_FALSE;
19004 : }
19005 : nsIDOMXPathNSResolver *arg2;
19006 0 : xpc_qsSelfRef arg2ref;
19007 0 : rv = xpc_qsUnwrapArg<nsIDOMXPathNSResolver>(cx, argv[2], &arg2, &arg2ref.ptr, &argv[2]);
19008 0 : if (NS_FAILED(rv)) {
19009 0 : xpc_qsThrowBadArg(cx, rv, vp, 2);
19010 0 : return JS_FALSE;
19011 : }
19012 : uint32_t arg3_u32;
19013 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3_u32))
19014 0 : return JS_FALSE;
19015 0 : uint16_t arg3 = (uint16_t) arg3_u32;
19016 : nsISupports *arg4;
19017 0 : xpc_qsSelfRef arg4ref;
19018 0 : rv = xpc_qsUnwrapArg<nsISupports>(cx, argv[4], &arg4, &arg4ref.ptr, &argv[4]);
19019 0 : if (NS_FAILED(rv)) {
19020 0 : xpc_qsThrowBadArg(cx, rv, vp, 4);
19021 0 : return JS_FALSE;
19022 : }
19023 0 : nsCOMPtr<nsISupports> result;
19024 0 : rv = self->Evaluate(arg0, arg1, arg2, arg3, arg4, getter_AddRefs(result));
19025 0 : if (NS_FAILED(rv))
19026 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19027 0 : if (!result) {
19028 0 : *vp = JSVAL_NULL;
19029 0 : return JS_TRUE;
19030 : }
19031 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19032 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19033 0 : return JS_TRUE;
19034 : }
19035 : // After this point do not use 'result'!
19036 0 : qsObjectHelper helper(result, cache);
19037 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
19038 : }
19039 :
19040 : static JSBool
19041 42 : nsIDOMXPathEvaluator_CreateExpression(JSContext *cx, unsigned argc, jsval *vp)
19042 : {
19043 42 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19044 42 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19045 42 : if (!obj)
19046 0 : return JS_FALSE;
19047 42 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19048 : nsIDOMXPathEvaluator *self;
19049 84 : xpc_qsSelfRef selfref;
19050 84 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19051 42 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19052 0 : return JS_FALSE;
19053 42 : if (argc < 2)
19054 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19055 42 : jsval *argv = JS_ARGV(cx, vp);
19056 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
19057 : xpc_qsDOMString::eDefaultNullBehavior,
19058 84 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19059 42 : if (!arg0.IsValid())
19060 0 : return JS_FALSE;
19061 : nsresult rv;
19062 : nsIDOMXPathNSResolver *arg1;
19063 84 : xpc_qsSelfRef arg1ref;
19064 42 : rv = xpc_qsUnwrapArg<nsIDOMXPathNSResolver>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
19065 42 : if (NS_FAILED(rv)) {
19066 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
19067 0 : return JS_FALSE;
19068 : }
19069 84 : nsCOMPtr<nsIDOMXPathExpression> result;
19070 42 : rv = self->CreateExpression(arg0, arg1, getter_AddRefs(result));
19071 42 : if (NS_FAILED(rv))
19072 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19073 42 : if (!result) {
19074 0 : *vp = JSVAL_NULL;
19075 0 : return JS_TRUE;
19076 : }
19077 42 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19078 42 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19079 0 : return JS_TRUE;
19080 : }
19081 : // After this point do not use 'result'!
19082 84 : qsObjectHelper helper(result, cache);
19083 42 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMXPathExpression), &interfaces[k_nsIDOMXPathExpression], vp);
19084 : }
19085 :
19086 : static JSBool
19087 0 : nsIDOMXPathEvaluator_CreateNSResolver(JSContext *cx, unsigned argc, jsval *vp)
19088 : {
19089 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19090 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19091 0 : if (!obj)
19092 0 : return JS_FALSE;
19093 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19094 : nsIDOMXPathEvaluator *self;
19095 0 : xpc_qsSelfRef selfref;
19096 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19097 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19098 0 : return JS_FALSE;
19099 0 : if (argc < 1)
19100 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19101 0 : jsval *argv = JS_ARGV(cx, vp);
19102 : nsresult rv;
19103 : nsIDOMNode *arg0;
19104 0 : xpc_qsSelfRef arg0ref;
19105 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
19106 0 : if (NS_FAILED(rv)) {
19107 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
19108 0 : return JS_FALSE;
19109 : }
19110 0 : nsCOMPtr<nsIDOMXPathNSResolver> result;
19111 0 : rv = self->CreateNSResolver(arg0, getter_AddRefs(result));
19112 0 : if (NS_FAILED(rv))
19113 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19114 0 : if (!result) {
19115 0 : *vp = JSVAL_NULL;
19116 0 : return JS_TRUE;
19117 : }
19118 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19119 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19120 0 : return JS_TRUE;
19121 : }
19122 : // After this point do not use 'result'!
19123 0 : qsObjectHelper helper(result, cache);
19124 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMXPathNSResolver), &interfaces[k_nsIDOMXPathNSResolver], vp);
19125 : }
19126 :
19127 : // === interface nsIDOMXPathExpression
19128 :
19129 : static JSBool
19130 42 : nsIDOMXPathExpression_Evaluate(JSContext *cx, unsigned argc, jsval *vp)
19131 : {
19132 42 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19133 42 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19134 42 : if (!obj)
19135 0 : return JS_FALSE;
19136 42 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19137 : nsIDOMXPathExpression *self;
19138 84 : xpc_qsSelfRef selfref;
19139 84 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19140 42 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19141 0 : return JS_FALSE;
19142 42 : if (argc < 3)
19143 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19144 42 : jsval *argv = JS_ARGV(cx, vp);
19145 : nsresult rv;
19146 : nsIDOMNode *arg0;
19147 84 : xpc_qsSelfRef arg0ref;
19148 42 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
19149 42 : if (NS_FAILED(rv)) {
19150 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
19151 0 : return JS_FALSE;
19152 : }
19153 : uint32_t arg1_u32;
19154 42 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1_u32))
19155 0 : return JS_FALSE;
19156 42 : uint16_t arg1 = (uint16_t) arg1_u32;
19157 : nsISupports *arg2;
19158 84 : xpc_qsSelfRef arg2ref;
19159 42 : rv = xpc_qsUnwrapArg<nsISupports>(cx, argv[2], &arg2, &arg2ref.ptr, &argv[2]);
19160 42 : if (NS_FAILED(rv)) {
19161 0 : xpc_qsThrowBadArg(cx, rv, vp, 2);
19162 0 : return JS_FALSE;
19163 : }
19164 84 : nsCOMPtr<nsISupports> result;
19165 42 : rv = self->Evaluate(arg0, arg1, arg2, getter_AddRefs(result));
19166 42 : if (NS_FAILED(rv))
19167 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19168 42 : if (!result) {
19169 0 : *vp = JSVAL_NULL;
19170 0 : return JS_TRUE;
19171 : }
19172 42 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19173 42 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19174 0 : return JS_TRUE;
19175 : }
19176 : // After this point do not use 'result'!
19177 84 : qsObjectHelper helper(result, cache);
19178 42 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
19179 : }
19180 :
19181 : // === interface nsIDOMXPathNSResolver
19182 :
19183 : static JSBool
19184 0 : nsIDOMXPathNSResolver_LookupNamespaceURI(JSContext *cx, unsigned argc, jsval *vp)
19185 : {
19186 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19187 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19188 0 : if (!obj)
19189 0 : return JS_FALSE;
19190 : nsIDOMXPathNSResolver *self;
19191 0 : xpc_qsSelfRef selfref;
19192 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
19193 0 : return JS_FALSE;
19194 0 : if (argc < 1)
19195 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19196 0 : jsval *argv = JS_ARGV(cx, vp);
19197 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
19198 : xpc_qsDOMString::eDefaultNullBehavior,
19199 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19200 0 : if (!arg0.IsValid())
19201 0 : return JS_FALSE;
19202 : nsresult rv;
19203 0 : nsString result;
19204 0 : rv = self->LookupNamespaceURI(arg0, result);
19205 0 : if (NS_FAILED(rv))
19206 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19207 0 : return xpc::StringToJsval(cx, result, vp);
19208 : }
19209 :
19210 : // === interface nsIDOMXPathResult
19211 :
19212 : static JSBool
19213 0 : nsIDOMXPathResult_SnapshotItem(JSContext *cx, unsigned argc, jsval *vp)
19214 : {
19215 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19216 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19217 0 : if (!obj)
19218 0 : return JS_FALSE;
19219 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19220 : nsIDOMXPathResult *self;
19221 0 : xpc_qsSelfRef selfref;
19222 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19223 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19224 0 : return JS_FALSE;
19225 0 : if (argc < 1)
19226 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19227 0 : jsval *argv = JS_ARGV(cx, vp);
19228 : uint32_t arg0;
19229 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
19230 0 : return JS_FALSE;
19231 : nsresult rv;
19232 0 : nsCOMPtr<nsIDOMNode> result;
19233 0 : rv = self->SnapshotItem(arg0, getter_AddRefs(result));
19234 0 : if (NS_FAILED(rv))
19235 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19236 0 : if (!result) {
19237 0 : *vp = JSVAL_NULL;
19238 0 : return JS_TRUE;
19239 : }
19240 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19241 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19242 0 : return JS_TRUE;
19243 : }
19244 : // After this point do not use 'result'!
19245 0 : qsObjectHelper helper(result, cache);
19246 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
19247 : }
19248 :
19249 : static JSBool
19250 0 : nsIDOMXPathResult_IterateNext(JSContext *cx, unsigned argc, jsval *vp)
19251 : {
19252 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19253 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19254 0 : if (!obj)
19255 0 : return JS_FALSE;
19256 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19257 : nsIDOMXPathResult *self;
19258 0 : xpc_qsSelfRef selfref;
19259 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19260 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19261 0 : return JS_FALSE;
19262 : nsresult rv;
19263 0 : nsCOMPtr<nsIDOMNode> result;
19264 0 : rv = self->IterateNext(getter_AddRefs(result));
19265 0 : if (NS_FAILED(rv))
19266 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19267 0 : if (!result) {
19268 0 : *vp = JSVAL_NULL;
19269 0 : return JS_TRUE;
19270 : }
19271 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19272 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19273 0 : return JS_TRUE;
19274 : }
19275 : // After this point do not use 'result'!
19276 0 : qsObjectHelper helper(result, cache);
19277 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
19278 : }
19279 :
19280 : static JSBool
19281 0 : nsIDOMXPathResult_GetSnapshotLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19282 : {
19283 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19284 : nsIDOMXPathResult *self;
19285 0 : xpc_qsSelfRef selfref;
19286 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19287 0 : return JS_FALSE;
19288 : nsresult rv;
19289 : PRUint32 result;
19290 0 : rv = self->GetSnapshotLength(&result);
19291 0 : if (NS_FAILED(rv))
19292 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19293 0 : *vp = UINT_TO_JSVAL(result);
19294 0 : return JS_TRUE;
19295 : }
19296 :
19297 : static JSBool
19298 0 : nsIDOMXPathResult_GetResultType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19299 : {
19300 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19301 : nsIDOMXPathResult *self;
19302 0 : xpc_qsSelfRef selfref;
19303 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19304 0 : return JS_FALSE;
19305 : nsresult rv;
19306 : PRUint16 result;
19307 0 : rv = self->GetResultType(&result);
19308 0 : if (NS_FAILED(rv))
19309 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19310 0 : *vp = INT_TO_JSVAL((int32_t) result);
19311 0 : return JS_TRUE;
19312 : }
19313 :
19314 : static JSBool
19315 0 : nsIDOMXPathResult_GetNumberValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19316 : {
19317 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19318 : nsIDOMXPathResult *self;
19319 0 : xpc_qsSelfRef selfref;
19320 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19321 0 : return JS_FALSE;
19322 : nsresult rv;
19323 : double result;
19324 0 : rv = self->GetNumberValue(&result);
19325 0 : if (NS_FAILED(rv))
19326 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19327 0 : return JS_NewNumberValue(cx, result, vp);
19328 : }
19329 :
19330 : static JSBool
19331 0 : nsIDOMXPathResult_GetStringValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19332 : {
19333 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19334 : nsIDOMXPathResult *self;
19335 0 : xpc_qsSelfRef selfref;
19336 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19337 0 : return JS_FALSE;
19338 : nsresult rv;
19339 0 : nsString result;
19340 0 : rv = self->GetStringValue(result);
19341 0 : if (NS_FAILED(rv))
19342 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19343 0 : return xpc::StringToJsval(cx, result, vp);
19344 : }
19345 :
19346 : static JSBool
19347 0 : nsIDOMXPathResult_GetBooleanValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19348 : {
19349 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19350 : nsIDOMXPathResult *self;
19351 0 : xpc_qsSelfRef selfref;
19352 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19353 0 : return JS_FALSE;
19354 : nsresult rv;
19355 : bool result;
19356 0 : rv = self->GetBooleanValue(&result);
19357 0 : if (NS_FAILED(rv))
19358 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19359 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
19360 0 : return JS_TRUE;
19361 : }
19362 :
19363 : static JSBool
19364 42 : nsIDOMXPathResult_GetSingleNodeValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19365 : {
19366 42 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19367 42 : JSObject *callee = nsnull;
19368 : nsIDOMXPathResult *self;
19369 84 : xpc_qsSelfRef selfref;
19370 84 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19371 42 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
19372 0 : return JS_FALSE;
19373 : nsresult rv;
19374 84 : nsCOMPtr<nsIDOMNode> result;
19375 42 : rv = self->GetSingleNodeValue(getter_AddRefs(result));
19376 42 : if (NS_FAILED(rv))
19377 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19378 42 : if (!result) {
19379 0 : *vp = JSVAL_NULL;
19380 0 : return JS_TRUE;
19381 : }
19382 42 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19383 42 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19384 0 : return JS_TRUE;
19385 : }
19386 : // After this point do not use 'result'!
19387 84 : qsObjectHelper helper(result, cache);
19388 42 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
19389 : }
19390 :
19391 : // === interface nsIDOMNSXPathExpression
19392 :
19393 : static JSBool
19394 0 : nsIDOMNSXPathExpression_EvaluateWithContext(JSContext *cx, unsigned argc, jsval *vp)
19395 : {
19396 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19397 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19398 0 : if (!obj)
19399 0 : return JS_FALSE;
19400 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19401 : nsIDOMNSXPathExpression *self;
19402 0 : xpc_qsSelfRef selfref;
19403 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19404 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19405 0 : return JS_FALSE;
19406 0 : if (argc < 5)
19407 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19408 0 : jsval *argv = JS_ARGV(cx, vp);
19409 : nsresult rv;
19410 : nsIDOMNode *arg0;
19411 0 : xpc_qsSelfRef arg0ref;
19412 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
19413 0 : if (NS_FAILED(rv)) {
19414 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
19415 0 : return JS_FALSE;
19416 : }
19417 : uint32_t arg1;
19418 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
19419 0 : return JS_FALSE;
19420 : uint32_t arg2;
19421 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
19422 0 : return JS_FALSE;
19423 : uint32_t arg3_u32;
19424 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3_u32))
19425 0 : return JS_FALSE;
19426 0 : uint16_t arg3 = (uint16_t) arg3_u32;
19427 : nsISupports *arg4;
19428 0 : xpc_qsSelfRef arg4ref;
19429 0 : rv = xpc_qsUnwrapArg<nsISupports>(cx, argv[4], &arg4, &arg4ref.ptr, &argv[4]);
19430 0 : if (NS_FAILED(rv)) {
19431 0 : xpc_qsThrowBadArg(cx, rv, vp, 4);
19432 0 : return JS_FALSE;
19433 : }
19434 0 : nsCOMPtr<nsISupports> result;
19435 0 : rv = self->EvaluateWithContext(arg0, arg1, arg2, arg3, arg4, getter_AddRefs(result));
19436 0 : if (NS_FAILED(rv))
19437 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19438 0 : if (!result) {
19439 0 : *vp = JSVAL_NULL;
19440 0 : return JS_TRUE;
19441 : }
19442 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19443 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19444 0 : return JS_TRUE;
19445 : }
19446 : // After this point do not use 'result'!
19447 0 : qsObjectHelper helper(result, cache);
19448 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
19449 : }
19450 :
19451 : // === interface nsIDOMXULElement
19452 :
19453 : static JSBool
19454 0 : nsIDOMXULElement_GetId(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19455 : {
19456 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19457 : nsIDOMXULElement *self;
19458 0 : xpc_qsSelfRef selfref;
19459 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19460 0 : return JS_FALSE;
19461 : nsresult rv;
19462 0 : nsString result;
19463 0 : rv = self->GetId(result);
19464 0 : if (NS_FAILED(rv))
19465 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19466 0 : return xpc::StringToJsval(cx, result, vp);
19467 : }
19468 :
19469 : static JSBool
19470 0 : nsIDOMXULElement_SetId(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19471 : {
19472 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19473 : nsIDOMXULElement *self;
19474 0 : xpc_qsSelfRef selfref;
19475 0 : JS::AutoValueRooter tvr(cx);
19476 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19477 0 : return JS_FALSE;
19478 : xpc_qsDOMString arg0(cx, *vp, vp,
19479 : xpc_qsDOMString::eDefaultNullBehavior,
19480 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19481 0 : if (!arg0.IsValid())
19482 0 : return JS_FALSE;
19483 : nsresult rv;
19484 0 : rv = self->SetId(arg0);
19485 0 : if (NS_FAILED(rv))
19486 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19487 0 : return JS_TRUE;
19488 : }
19489 :
19490 : static JSBool
19491 0 : nsIDOMXULElement_GetClassName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19492 : {
19493 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19494 : nsIDOMXULElement *self;
19495 0 : xpc_qsSelfRef selfref;
19496 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19497 0 : return JS_FALSE;
19498 : nsresult rv;
19499 0 : nsString result;
19500 0 : rv = self->GetClassName(result);
19501 0 : if (NS_FAILED(rv))
19502 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19503 0 : return xpc::StringToJsval(cx, result, vp);
19504 : }
19505 :
19506 : static JSBool
19507 0 : nsIDOMXULElement_SetClassName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19508 : {
19509 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19510 : nsIDOMXULElement *self;
19511 0 : xpc_qsSelfRef selfref;
19512 0 : JS::AutoValueRooter tvr(cx);
19513 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19514 0 : return JS_FALSE;
19515 : xpc_qsDOMString arg0(cx, *vp, vp,
19516 : xpc_qsDOMString::eDefaultNullBehavior,
19517 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19518 0 : if (!arg0.IsValid())
19519 0 : return JS_FALSE;
19520 : nsresult rv;
19521 0 : rv = self->SetClassName(arg0);
19522 0 : if (NS_FAILED(rv))
19523 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19524 0 : return JS_TRUE;
19525 : }
19526 :
19527 : static JSBool
19528 0 : nsIDOMXULElement_GetAlign(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19529 : {
19530 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19531 : nsIDOMXULElement *self;
19532 0 : xpc_qsSelfRef selfref;
19533 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19534 0 : return JS_FALSE;
19535 : nsresult rv;
19536 0 : nsString result;
19537 0 : rv = self->GetAlign(result);
19538 0 : if (NS_FAILED(rv))
19539 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19540 0 : return xpc::StringToJsval(cx, result, vp);
19541 : }
19542 :
19543 : static JSBool
19544 0 : nsIDOMXULElement_SetAlign(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19545 : {
19546 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19547 : nsIDOMXULElement *self;
19548 0 : xpc_qsSelfRef selfref;
19549 0 : JS::AutoValueRooter tvr(cx);
19550 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19551 0 : return JS_FALSE;
19552 : xpc_qsDOMString arg0(cx, *vp, vp,
19553 : xpc_qsDOMString::eDefaultNullBehavior,
19554 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19555 0 : if (!arg0.IsValid())
19556 0 : return JS_FALSE;
19557 : nsresult rv;
19558 0 : rv = self->SetAlign(arg0);
19559 0 : if (NS_FAILED(rv))
19560 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19561 0 : return JS_TRUE;
19562 : }
19563 :
19564 : static JSBool
19565 0 : nsIDOMXULElement_GetDir(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19566 : {
19567 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19568 : nsIDOMXULElement *self;
19569 0 : xpc_qsSelfRef selfref;
19570 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19571 0 : return JS_FALSE;
19572 : nsresult rv;
19573 0 : nsString result;
19574 0 : rv = self->GetDir(result);
19575 0 : if (NS_FAILED(rv))
19576 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19577 0 : return xpc::StringToJsval(cx, result, vp);
19578 : }
19579 :
19580 : static JSBool
19581 0 : nsIDOMXULElement_SetDir(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19582 : {
19583 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19584 : nsIDOMXULElement *self;
19585 0 : xpc_qsSelfRef selfref;
19586 0 : JS::AutoValueRooter tvr(cx);
19587 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19588 0 : return JS_FALSE;
19589 : xpc_qsDOMString arg0(cx, *vp, vp,
19590 : xpc_qsDOMString::eDefaultNullBehavior,
19591 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19592 0 : if (!arg0.IsValid())
19593 0 : return JS_FALSE;
19594 : nsresult rv;
19595 0 : rv = self->SetDir(arg0);
19596 0 : if (NS_FAILED(rv))
19597 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19598 0 : return JS_TRUE;
19599 : }
19600 :
19601 : static JSBool
19602 0 : nsIDOMXULElement_GetFlex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19603 : {
19604 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19605 : nsIDOMXULElement *self;
19606 0 : xpc_qsSelfRef selfref;
19607 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19608 0 : return JS_FALSE;
19609 : nsresult rv;
19610 0 : nsString result;
19611 0 : rv = self->GetFlex(result);
19612 0 : if (NS_FAILED(rv))
19613 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19614 0 : return xpc::StringToJsval(cx, result, vp);
19615 : }
19616 :
19617 : static JSBool
19618 0 : nsIDOMXULElement_SetFlex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19619 : {
19620 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19621 : nsIDOMXULElement *self;
19622 0 : xpc_qsSelfRef selfref;
19623 0 : JS::AutoValueRooter tvr(cx);
19624 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19625 0 : return JS_FALSE;
19626 : xpc_qsDOMString arg0(cx, *vp, vp,
19627 : xpc_qsDOMString::eDefaultNullBehavior,
19628 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19629 0 : if (!arg0.IsValid())
19630 0 : return JS_FALSE;
19631 : nsresult rv;
19632 0 : rv = self->SetFlex(arg0);
19633 0 : if (NS_FAILED(rv))
19634 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19635 0 : return JS_TRUE;
19636 : }
19637 :
19638 : static JSBool
19639 0 : nsIDOMXULElement_GetFlexGroup(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19640 : {
19641 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19642 : nsIDOMXULElement *self;
19643 0 : xpc_qsSelfRef selfref;
19644 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19645 0 : return JS_FALSE;
19646 : nsresult rv;
19647 0 : nsString result;
19648 0 : rv = self->GetFlexGroup(result);
19649 0 : if (NS_FAILED(rv))
19650 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19651 0 : return xpc::StringToJsval(cx, result, vp);
19652 : }
19653 :
19654 : static JSBool
19655 0 : nsIDOMXULElement_SetFlexGroup(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19656 : {
19657 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19658 : nsIDOMXULElement *self;
19659 0 : xpc_qsSelfRef selfref;
19660 0 : JS::AutoValueRooter tvr(cx);
19661 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19662 0 : return JS_FALSE;
19663 : xpc_qsDOMString arg0(cx, *vp, vp,
19664 : xpc_qsDOMString::eDefaultNullBehavior,
19665 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19666 0 : if (!arg0.IsValid())
19667 0 : return JS_FALSE;
19668 : nsresult rv;
19669 0 : rv = self->SetFlexGroup(arg0);
19670 0 : if (NS_FAILED(rv))
19671 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19672 0 : return JS_TRUE;
19673 : }
19674 :
19675 : static JSBool
19676 0 : nsIDOMXULElement_GetOrdinal(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19677 : {
19678 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19679 : nsIDOMXULElement *self;
19680 0 : xpc_qsSelfRef selfref;
19681 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19682 0 : return JS_FALSE;
19683 : nsresult rv;
19684 0 : nsString result;
19685 0 : rv = self->GetOrdinal(result);
19686 0 : if (NS_FAILED(rv))
19687 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19688 0 : return xpc::StringToJsval(cx, result, vp);
19689 : }
19690 :
19691 : static JSBool
19692 0 : nsIDOMXULElement_SetOrdinal(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19693 : {
19694 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19695 : nsIDOMXULElement *self;
19696 0 : xpc_qsSelfRef selfref;
19697 0 : JS::AutoValueRooter tvr(cx);
19698 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19699 0 : return JS_FALSE;
19700 : xpc_qsDOMString arg0(cx, *vp, vp,
19701 : xpc_qsDOMString::eDefaultNullBehavior,
19702 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19703 0 : if (!arg0.IsValid())
19704 0 : return JS_FALSE;
19705 : nsresult rv;
19706 0 : rv = self->SetOrdinal(arg0);
19707 0 : if (NS_FAILED(rv))
19708 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19709 0 : return JS_TRUE;
19710 : }
19711 :
19712 : static JSBool
19713 0 : nsIDOMXULElement_GetOrient(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19714 : {
19715 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19716 : nsIDOMXULElement *self;
19717 0 : xpc_qsSelfRef selfref;
19718 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19719 0 : return JS_FALSE;
19720 : nsresult rv;
19721 0 : nsString result;
19722 0 : rv = self->GetOrient(result);
19723 0 : if (NS_FAILED(rv))
19724 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19725 0 : return xpc::StringToJsval(cx, result, vp);
19726 : }
19727 :
19728 : static JSBool
19729 0 : nsIDOMXULElement_SetOrient(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19730 : {
19731 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19732 : nsIDOMXULElement *self;
19733 0 : xpc_qsSelfRef selfref;
19734 0 : JS::AutoValueRooter tvr(cx);
19735 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19736 0 : return JS_FALSE;
19737 : xpc_qsDOMString arg0(cx, *vp, vp,
19738 : xpc_qsDOMString::eDefaultNullBehavior,
19739 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19740 0 : if (!arg0.IsValid())
19741 0 : return JS_FALSE;
19742 : nsresult rv;
19743 0 : rv = self->SetOrient(arg0);
19744 0 : if (NS_FAILED(rv))
19745 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19746 0 : return JS_TRUE;
19747 : }
19748 :
19749 : static JSBool
19750 0 : nsIDOMXULElement_GetPack(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19751 : {
19752 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19753 : nsIDOMXULElement *self;
19754 0 : xpc_qsSelfRef selfref;
19755 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19756 0 : return JS_FALSE;
19757 : nsresult rv;
19758 0 : nsString result;
19759 0 : rv = self->GetPack(result);
19760 0 : if (NS_FAILED(rv))
19761 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19762 0 : return xpc::StringToJsval(cx, result, vp);
19763 : }
19764 :
19765 : static JSBool
19766 0 : nsIDOMXULElement_SetPack(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19767 : {
19768 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19769 : nsIDOMXULElement *self;
19770 0 : xpc_qsSelfRef selfref;
19771 0 : JS::AutoValueRooter tvr(cx);
19772 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19773 0 : return JS_FALSE;
19774 : xpc_qsDOMString arg0(cx, *vp, vp,
19775 : xpc_qsDOMString::eDefaultNullBehavior,
19776 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19777 0 : if (!arg0.IsValid())
19778 0 : return JS_FALSE;
19779 : nsresult rv;
19780 0 : rv = self->SetPack(arg0);
19781 0 : if (NS_FAILED(rv))
19782 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19783 0 : return JS_TRUE;
19784 : }
19785 :
19786 : static JSBool
19787 0 : nsIDOMXULElement_GetHidden(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19788 : {
19789 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19790 : nsIDOMXULElement *self;
19791 0 : xpc_qsSelfRef selfref;
19792 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19793 0 : return JS_FALSE;
19794 : nsresult rv;
19795 : bool result;
19796 0 : rv = self->GetHidden(&result);
19797 0 : if (NS_FAILED(rv))
19798 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19799 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
19800 0 : return JS_TRUE;
19801 : }
19802 :
19803 : static JSBool
19804 0 : nsIDOMXULElement_SetHidden(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19805 : {
19806 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19807 : nsIDOMXULElement *self;
19808 0 : xpc_qsSelfRef selfref;
19809 0 : JS::AutoValueRooter tvr(cx);
19810 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19811 0 : return JS_FALSE;
19812 : JSBool arg0;
19813 0 : JS_ValueToBoolean(cx, *vp, &arg0);
19814 : nsresult rv;
19815 0 : rv = self->SetHidden(arg0);
19816 0 : if (NS_FAILED(rv))
19817 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19818 0 : return JS_TRUE;
19819 : }
19820 :
19821 : static JSBool
19822 0 : nsIDOMXULElement_GetCollapsed(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19823 : {
19824 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19825 : nsIDOMXULElement *self;
19826 0 : xpc_qsSelfRef selfref;
19827 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19828 0 : return JS_FALSE;
19829 : nsresult rv;
19830 : bool result;
19831 0 : rv = self->GetCollapsed(&result);
19832 0 : if (NS_FAILED(rv))
19833 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19834 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
19835 0 : return JS_TRUE;
19836 : }
19837 :
19838 : static JSBool
19839 0 : nsIDOMXULElement_SetCollapsed(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19840 : {
19841 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19842 : nsIDOMXULElement *self;
19843 0 : xpc_qsSelfRef selfref;
19844 0 : JS::AutoValueRooter tvr(cx);
19845 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19846 0 : return JS_FALSE;
19847 : JSBool arg0;
19848 0 : JS_ValueToBoolean(cx, *vp, &arg0);
19849 : nsresult rv;
19850 0 : rv = self->SetCollapsed(arg0);
19851 0 : if (NS_FAILED(rv))
19852 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19853 0 : return JS_TRUE;
19854 : }
19855 :
19856 : static JSBool
19857 0 : nsIDOMXULElement_GetObserves(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19858 : {
19859 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19860 : nsIDOMXULElement *self;
19861 0 : xpc_qsSelfRef selfref;
19862 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19863 0 : return JS_FALSE;
19864 : nsresult rv;
19865 0 : nsString result;
19866 0 : rv = self->GetObserves(result);
19867 0 : if (NS_FAILED(rv))
19868 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19869 0 : return xpc::StringToJsval(cx, result, vp);
19870 : }
19871 :
19872 : static JSBool
19873 0 : nsIDOMXULElement_SetObserves(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19874 : {
19875 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19876 : nsIDOMXULElement *self;
19877 0 : xpc_qsSelfRef selfref;
19878 0 : JS::AutoValueRooter tvr(cx);
19879 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19880 0 : return JS_FALSE;
19881 : xpc_qsDOMString arg0(cx, *vp, vp,
19882 : xpc_qsDOMString::eDefaultNullBehavior,
19883 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19884 0 : if (!arg0.IsValid())
19885 0 : return JS_FALSE;
19886 : nsresult rv;
19887 0 : rv = self->SetObserves(arg0);
19888 0 : if (NS_FAILED(rv))
19889 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19890 0 : return JS_TRUE;
19891 : }
19892 :
19893 : static JSBool
19894 0 : nsIDOMXULElement_GetMenu(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19895 : {
19896 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19897 : nsIDOMXULElement *self;
19898 0 : xpc_qsSelfRef selfref;
19899 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19900 0 : return JS_FALSE;
19901 : nsresult rv;
19902 0 : nsString result;
19903 0 : rv = self->GetMenu(result);
19904 0 : if (NS_FAILED(rv))
19905 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19906 0 : return xpc::StringToJsval(cx, result, vp);
19907 : }
19908 :
19909 : static JSBool
19910 0 : nsIDOMXULElement_SetMenu(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19911 : {
19912 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19913 : nsIDOMXULElement *self;
19914 0 : xpc_qsSelfRef selfref;
19915 0 : JS::AutoValueRooter tvr(cx);
19916 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19917 0 : return JS_FALSE;
19918 : xpc_qsDOMString arg0(cx, *vp, vp,
19919 : xpc_qsDOMString::eDefaultNullBehavior,
19920 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19921 0 : if (!arg0.IsValid())
19922 0 : return JS_FALSE;
19923 : nsresult rv;
19924 0 : rv = self->SetMenu(arg0);
19925 0 : if (NS_FAILED(rv))
19926 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19927 0 : return JS_TRUE;
19928 : }
19929 :
19930 : static JSBool
19931 0 : nsIDOMXULElement_GetContextMenu(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19932 : {
19933 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19934 : nsIDOMXULElement *self;
19935 0 : xpc_qsSelfRef selfref;
19936 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19937 0 : return JS_FALSE;
19938 : nsresult rv;
19939 0 : nsString result;
19940 0 : rv = self->GetContextMenu(result);
19941 0 : if (NS_FAILED(rv))
19942 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19943 0 : return xpc::StringToJsval(cx, result, vp);
19944 : }
19945 :
19946 : static JSBool
19947 0 : nsIDOMXULElement_SetContextMenu(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19948 : {
19949 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19950 : nsIDOMXULElement *self;
19951 0 : xpc_qsSelfRef selfref;
19952 0 : JS::AutoValueRooter tvr(cx);
19953 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19954 0 : return JS_FALSE;
19955 : xpc_qsDOMString arg0(cx, *vp, vp,
19956 : xpc_qsDOMString::eDefaultNullBehavior,
19957 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19958 0 : if (!arg0.IsValid())
19959 0 : return JS_FALSE;
19960 : nsresult rv;
19961 0 : rv = self->SetContextMenu(arg0);
19962 0 : if (NS_FAILED(rv))
19963 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19964 0 : return JS_TRUE;
19965 : }
19966 :
19967 : static JSBool
19968 0 : nsIDOMXULElement_GetTooltip(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19969 : {
19970 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19971 : nsIDOMXULElement *self;
19972 0 : xpc_qsSelfRef selfref;
19973 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19974 0 : return JS_FALSE;
19975 : nsresult rv;
19976 0 : nsString result;
19977 0 : rv = self->GetTooltip(result);
19978 0 : if (NS_FAILED(rv))
19979 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19980 0 : return xpc::StringToJsval(cx, result, vp);
19981 : }
19982 :
19983 : static JSBool
19984 0 : nsIDOMXULElement_SetTooltip(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19985 : {
19986 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19987 : nsIDOMXULElement *self;
19988 0 : xpc_qsSelfRef selfref;
19989 0 : JS::AutoValueRooter tvr(cx);
19990 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19991 0 : return JS_FALSE;
19992 : xpc_qsDOMString arg0(cx, *vp, vp,
19993 : xpc_qsDOMString::eDefaultNullBehavior,
19994 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19995 0 : if (!arg0.IsValid())
19996 0 : return JS_FALSE;
19997 : nsresult rv;
19998 0 : rv = self->SetTooltip(arg0);
19999 0 : if (NS_FAILED(rv))
20000 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20001 0 : return JS_TRUE;
20002 : }
20003 :
20004 : static JSBool
20005 0 : nsIDOMXULElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20006 : {
20007 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20008 : nsIDOMXULElement *self;
20009 0 : xpc_qsSelfRef selfref;
20010 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20011 0 : return JS_FALSE;
20012 : nsresult rv;
20013 0 : nsString result;
20014 0 : rv = self->GetWidth(result);
20015 0 : if (NS_FAILED(rv))
20016 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20017 0 : return xpc::StringToJsval(cx, result, vp);
20018 : }
20019 :
20020 : static JSBool
20021 0 : nsIDOMXULElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20022 : {
20023 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20024 : nsIDOMXULElement *self;
20025 0 : xpc_qsSelfRef selfref;
20026 0 : JS::AutoValueRooter tvr(cx);
20027 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20028 0 : return JS_FALSE;
20029 : xpc_qsDOMString arg0(cx, *vp, vp,
20030 : xpc_qsDOMString::eDefaultNullBehavior,
20031 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20032 0 : if (!arg0.IsValid())
20033 0 : return JS_FALSE;
20034 : nsresult rv;
20035 0 : rv = self->SetWidth(arg0);
20036 0 : if (NS_FAILED(rv))
20037 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20038 0 : return JS_TRUE;
20039 : }
20040 :
20041 : static JSBool
20042 0 : nsIDOMXULElement_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20043 : {
20044 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20045 : nsIDOMXULElement *self;
20046 0 : xpc_qsSelfRef selfref;
20047 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20048 0 : return JS_FALSE;
20049 : nsresult rv;
20050 0 : nsString result;
20051 0 : rv = self->GetHeight(result);
20052 0 : if (NS_FAILED(rv))
20053 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20054 0 : return xpc::StringToJsval(cx, result, vp);
20055 : }
20056 :
20057 : static JSBool
20058 0 : nsIDOMXULElement_SetHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20059 : {
20060 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20061 : nsIDOMXULElement *self;
20062 0 : xpc_qsSelfRef selfref;
20063 0 : JS::AutoValueRooter tvr(cx);
20064 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20065 0 : return JS_FALSE;
20066 : xpc_qsDOMString arg0(cx, *vp, vp,
20067 : xpc_qsDOMString::eDefaultNullBehavior,
20068 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20069 0 : if (!arg0.IsValid())
20070 0 : return JS_FALSE;
20071 : nsresult rv;
20072 0 : rv = self->SetHeight(arg0);
20073 0 : if (NS_FAILED(rv))
20074 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20075 0 : return JS_TRUE;
20076 : }
20077 :
20078 : static JSBool
20079 0 : nsIDOMXULElement_GetMinWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20080 : {
20081 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20082 : nsIDOMXULElement *self;
20083 0 : xpc_qsSelfRef selfref;
20084 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20085 0 : return JS_FALSE;
20086 : nsresult rv;
20087 0 : nsString result;
20088 0 : rv = self->GetMinWidth(result);
20089 0 : if (NS_FAILED(rv))
20090 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20091 0 : return xpc::StringToJsval(cx, result, vp);
20092 : }
20093 :
20094 : static JSBool
20095 0 : nsIDOMXULElement_SetMinWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20096 : {
20097 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20098 : nsIDOMXULElement *self;
20099 0 : xpc_qsSelfRef selfref;
20100 0 : JS::AutoValueRooter tvr(cx);
20101 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20102 0 : return JS_FALSE;
20103 : xpc_qsDOMString arg0(cx, *vp, vp,
20104 : xpc_qsDOMString::eDefaultNullBehavior,
20105 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20106 0 : if (!arg0.IsValid())
20107 0 : return JS_FALSE;
20108 : nsresult rv;
20109 0 : rv = self->SetMinWidth(arg0);
20110 0 : if (NS_FAILED(rv))
20111 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20112 0 : return JS_TRUE;
20113 : }
20114 :
20115 : static JSBool
20116 0 : nsIDOMXULElement_GetMinHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20117 : {
20118 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20119 : nsIDOMXULElement *self;
20120 0 : xpc_qsSelfRef selfref;
20121 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20122 0 : return JS_FALSE;
20123 : nsresult rv;
20124 0 : nsString result;
20125 0 : rv = self->GetMinHeight(result);
20126 0 : if (NS_FAILED(rv))
20127 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20128 0 : return xpc::StringToJsval(cx, result, vp);
20129 : }
20130 :
20131 : static JSBool
20132 0 : nsIDOMXULElement_SetMinHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20133 : {
20134 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20135 : nsIDOMXULElement *self;
20136 0 : xpc_qsSelfRef selfref;
20137 0 : JS::AutoValueRooter tvr(cx);
20138 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20139 0 : return JS_FALSE;
20140 : xpc_qsDOMString arg0(cx, *vp, vp,
20141 : xpc_qsDOMString::eDefaultNullBehavior,
20142 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20143 0 : if (!arg0.IsValid())
20144 0 : return JS_FALSE;
20145 : nsresult rv;
20146 0 : rv = self->SetMinHeight(arg0);
20147 0 : if (NS_FAILED(rv))
20148 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20149 0 : return JS_TRUE;
20150 : }
20151 :
20152 : static JSBool
20153 0 : nsIDOMXULElement_GetMaxWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20154 : {
20155 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20156 : nsIDOMXULElement *self;
20157 0 : xpc_qsSelfRef selfref;
20158 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20159 0 : return JS_FALSE;
20160 : nsresult rv;
20161 0 : nsString result;
20162 0 : rv = self->GetMaxWidth(result);
20163 0 : if (NS_FAILED(rv))
20164 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20165 0 : return xpc::StringToJsval(cx, result, vp);
20166 : }
20167 :
20168 : static JSBool
20169 0 : nsIDOMXULElement_SetMaxWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20170 : {
20171 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20172 : nsIDOMXULElement *self;
20173 0 : xpc_qsSelfRef selfref;
20174 0 : JS::AutoValueRooter tvr(cx);
20175 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20176 0 : return JS_FALSE;
20177 : xpc_qsDOMString arg0(cx, *vp, vp,
20178 : xpc_qsDOMString::eDefaultNullBehavior,
20179 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20180 0 : if (!arg0.IsValid())
20181 0 : return JS_FALSE;
20182 : nsresult rv;
20183 0 : rv = self->SetMaxWidth(arg0);
20184 0 : if (NS_FAILED(rv))
20185 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20186 0 : return JS_TRUE;
20187 : }
20188 :
20189 : static JSBool
20190 0 : nsIDOMXULElement_GetMaxHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20191 : {
20192 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20193 : nsIDOMXULElement *self;
20194 0 : xpc_qsSelfRef selfref;
20195 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20196 0 : return JS_FALSE;
20197 : nsresult rv;
20198 0 : nsString result;
20199 0 : rv = self->GetMaxHeight(result);
20200 0 : if (NS_FAILED(rv))
20201 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20202 0 : return xpc::StringToJsval(cx, result, vp);
20203 : }
20204 :
20205 : static JSBool
20206 0 : nsIDOMXULElement_SetMaxHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20207 : {
20208 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20209 : nsIDOMXULElement *self;
20210 0 : xpc_qsSelfRef selfref;
20211 0 : JS::AutoValueRooter tvr(cx);
20212 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20213 0 : return JS_FALSE;
20214 : xpc_qsDOMString arg0(cx, *vp, vp,
20215 : xpc_qsDOMString::eDefaultNullBehavior,
20216 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20217 0 : if (!arg0.IsValid())
20218 0 : return JS_FALSE;
20219 : nsresult rv;
20220 0 : rv = self->SetMaxHeight(arg0);
20221 0 : if (NS_FAILED(rv))
20222 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20223 0 : return JS_TRUE;
20224 : }
20225 :
20226 : static JSBool
20227 0 : nsIDOMXULElement_GetPersist(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20228 : {
20229 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20230 : nsIDOMXULElement *self;
20231 0 : xpc_qsSelfRef selfref;
20232 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20233 0 : return JS_FALSE;
20234 : nsresult rv;
20235 0 : nsString result;
20236 0 : rv = self->GetPersist(result);
20237 0 : if (NS_FAILED(rv))
20238 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20239 0 : return xpc::StringToJsval(cx, result, vp);
20240 : }
20241 :
20242 : static JSBool
20243 0 : nsIDOMXULElement_SetPersist(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20244 : {
20245 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20246 : nsIDOMXULElement *self;
20247 0 : xpc_qsSelfRef selfref;
20248 0 : JS::AutoValueRooter tvr(cx);
20249 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20250 0 : return JS_FALSE;
20251 : xpc_qsDOMString arg0(cx, *vp, vp,
20252 : xpc_qsDOMString::eDefaultNullBehavior,
20253 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20254 0 : if (!arg0.IsValid())
20255 0 : return JS_FALSE;
20256 : nsresult rv;
20257 0 : rv = self->SetPersist(arg0);
20258 0 : if (NS_FAILED(rv))
20259 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20260 0 : return JS_TRUE;
20261 : }
20262 :
20263 : static JSBool
20264 0 : nsIDOMXULElement_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20265 : {
20266 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20267 : nsIDOMXULElement *self;
20268 0 : xpc_qsSelfRef selfref;
20269 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20270 0 : return JS_FALSE;
20271 : nsresult rv;
20272 0 : nsString result;
20273 0 : rv = self->GetLeft(result);
20274 0 : if (NS_FAILED(rv))
20275 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20276 0 : return xpc::StringToJsval(cx, result, vp);
20277 : }
20278 :
20279 : static JSBool
20280 0 : nsIDOMXULElement_SetLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20281 : {
20282 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20283 : nsIDOMXULElement *self;
20284 0 : xpc_qsSelfRef selfref;
20285 0 : JS::AutoValueRooter tvr(cx);
20286 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20287 0 : return JS_FALSE;
20288 : xpc_qsDOMString arg0(cx, *vp, vp,
20289 : xpc_qsDOMString::eDefaultNullBehavior,
20290 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20291 0 : if (!arg0.IsValid())
20292 0 : return JS_FALSE;
20293 : nsresult rv;
20294 0 : rv = self->SetLeft(arg0);
20295 0 : if (NS_FAILED(rv))
20296 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20297 0 : return JS_TRUE;
20298 : }
20299 :
20300 : static JSBool
20301 0 : nsIDOMXULElement_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20302 : {
20303 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20304 : nsIDOMXULElement *self;
20305 0 : xpc_qsSelfRef selfref;
20306 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20307 0 : return JS_FALSE;
20308 : nsresult rv;
20309 0 : nsString result;
20310 0 : rv = self->GetTop(result);
20311 0 : if (NS_FAILED(rv))
20312 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20313 0 : return xpc::StringToJsval(cx, result, vp);
20314 : }
20315 :
20316 : static JSBool
20317 0 : nsIDOMXULElement_SetTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20318 : {
20319 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20320 : nsIDOMXULElement *self;
20321 0 : xpc_qsSelfRef selfref;
20322 0 : JS::AutoValueRooter tvr(cx);
20323 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20324 0 : return JS_FALSE;
20325 : xpc_qsDOMString arg0(cx, *vp, vp,
20326 : xpc_qsDOMString::eDefaultNullBehavior,
20327 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20328 0 : if (!arg0.IsValid())
20329 0 : return JS_FALSE;
20330 : nsresult rv;
20331 0 : rv = self->SetTop(arg0);
20332 0 : if (NS_FAILED(rv))
20333 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20334 0 : return JS_TRUE;
20335 : }
20336 :
20337 : static JSBool
20338 0 : nsIDOMXULElement_GetDatasources(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20339 : {
20340 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20341 : nsIDOMXULElement *self;
20342 0 : xpc_qsSelfRef selfref;
20343 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20344 0 : return JS_FALSE;
20345 : nsresult rv;
20346 0 : nsString result;
20347 0 : rv = self->GetDatasources(result);
20348 0 : if (NS_FAILED(rv))
20349 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20350 0 : return xpc::StringToJsval(cx, result, vp);
20351 : }
20352 :
20353 : static JSBool
20354 0 : nsIDOMXULElement_SetDatasources(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20355 : {
20356 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20357 : nsIDOMXULElement *self;
20358 0 : xpc_qsSelfRef selfref;
20359 0 : JS::AutoValueRooter tvr(cx);
20360 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20361 0 : return JS_FALSE;
20362 : xpc_qsDOMString arg0(cx, *vp, vp,
20363 : xpc_qsDOMString::eDefaultNullBehavior,
20364 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20365 0 : if (!arg0.IsValid())
20366 0 : return JS_FALSE;
20367 : nsresult rv;
20368 0 : rv = self->SetDatasources(arg0);
20369 0 : if (NS_FAILED(rv))
20370 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20371 0 : return JS_TRUE;
20372 : }
20373 :
20374 : static JSBool
20375 0 : nsIDOMXULElement_GetRef(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20376 : {
20377 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20378 : nsIDOMXULElement *self;
20379 0 : xpc_qsSelfRef selfref;
20380 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20381 0 : return JS_FALSE;
20382 : nsresult rv;
20383 0 : nsString result;
20384 0 : rv = self->GetRef(result);
20385 0 : if (NS_FAILED(rv))
20386 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20387 0 : return xpc::StringToJsval(cx, result, vp);
20388 : }
20389 :
20390 : static JSBool
20391 0 : nsIDOMXULElement_SetRef(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20392 : {
20393 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20394 : nsIDOMXULElement *self;
20395 0 : xpc_qsSelfRef selfref;
20396 0 : JS::AutoValueRooter tvr(cx);
20397 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20398 0 : return JS_FALSE;
20399 : xpc_qsDOMString arg0(cx, *vp, vp,
20400 : xpc_qsDOMString::eDefaultNullBehavior,
20401 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20402 0 : if (!arg0.IsValid())
20403 0 : return JS_FALSE;
20404 : nsresult rv;
20405 0 : rv = self->SetRef(arg0);
20406 0 : if (NS_FAILED(rv))
20407 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20408 0 : return JS_TRUE;
20409 : }
20410 :
20411 : static JSBool
20412 0 : nsIDOMXULElement_GetTooltipText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20413 : {
20414 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20415 : nsIDOMXULElement *self;
20416 0 : xpc_qsSelfRef selfref;
20417 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20418 0 : return JS_FALSE;
20419 : nsresult rv;
20420 0 : nsString result;
20421 0 : rv = self->GetTooltipText(result);
20422 0 : if (NS_FAILED(rv))
20423 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20424 0 : return xpc::StringToJsval(cx, result, vp);
20425 : }
20426 :
20427 : static JSBool
20428 0 : nsIDOMXULElement_SetTooltipText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20429 : {
20430 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20431 : nsIDOMXULElement *self;
20432 0 : xpc_qsSelfRef selfref;
20433 0 : JS::AutoValueRooter tvr(cx);
20434 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20435 0 : return JS_FALSE;
20436 : xpc_qsDOMString arg0(cx, *vp, vp,
20437 : xpc_qsDOMString::eDefaultNullBehavior,
20438 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20439 0 : if (!arg0.IsValid())
20440 0 : return JS_FALSE;
20441 : nsresult rv;
20442 0 : rv = self->SetTooltipText(arg0);
20443 0 : if (NS_FAILED(rv))
20444 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20445 0 : return JS_TRUE;
20446 : }
20447 :
20448 : static JSBool
20449 0 : nsIDOMXULElement_GetStatusText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20450 : {
20451 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20452 : nsIDOMXULElement *self;
20453 0 : xpc_qsSelfRef selfref;
20454 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20455 0 : return JS_FALSE;
20456 : nsresult rv;
20457 0 : nsString result;
20458 0 : rv = self->GetStatusText(result);
20459 0 : if (NS_FAILED(rv))
20460 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20461 0 : return xpc::StringToJsval(cx, result, vp);
20462 : }
20463 :
20464 : static JSBool
20465 0 : nsIDOMXULElement_SetStatusText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20466 : {
20467 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20468 : nsIDOMXULElement *self;
20469 0 : xpc_qsSelfRef selfref;
20470 0 : JS::AutoValueRooter tvr(cx);
20471 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20472 0 : return JS_FALSE;
20473 : xpc_qsDOMString arg0(cx, *vp, vp,
20474 : xpc_qsDOMString::eDefaultNullBehavior,
20475 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20476 0 : if (!arg0.IsValid())
20477 0 : return JS_FALSE;
20478 : nsresult rv;
20479 0 : rv = self->SetStatusText(arg0);
20480 0 : if (NS_FAILED(rv))
20481 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20482 0 : return JS_TRUE;
20483 : }
20484 :
20485 : static JSBool
20486 0 : nsIDOMXULElement_GetAllowEvents(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20487 : {
20488 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20489 : nsIDOMXULElement *self;
20490 0 : xpc_qsSelfRef selfref;
20491 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20492 0 : return JS_FALSE;
20493 : nsresult rv;
20494 : bool result;
20495 0 : rv = self->GetAllowEvents(&result);
20496 0 : if (NS_FAILED(rv))
20497 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20498 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
20499 0 : return JS_TRUE;
20500 : }
20501 :
20502 : static JSBool
20503 0 : nsIDOMXULElement_SetAllowEvents(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20504 : {
20505 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20506 : nsIDOMXULElement *self;
20507 0 : xpc_qsSelfRef selfref;
20508 0 : JS::AutoValueRooter tvr(cx);
20509 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20510 0 : return JS_FALSE;
20511 : JSBool arg0;
20512 0 : JS_ValueToBoolean(cx, *vp, &arg0);
20513 : nsresult rv;
20514 0 : rv = self->SetAllowEvents(arg0);
20515 0 : if (NS_FAILED(rv))
20516 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20517 0 : return JS_TRUE;
20518 : }
20519 :
20520 : static JSBool
20521 0 : nsIDOMXULElement_GetDatabase(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20522 : {
20523 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20524 0 : JSObject *callee = nsnull;
20525 : nsIDOMXULElement *self;
20526 0 : xpc_qsSelfRef selfref;
20527 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20528 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20529 0 : return JS_FALSE;
20530 : nsresult rv;
20531 0 : nsCOMPtr<nsIRDFCompositeDataSource> result;
20532 0 : rv = self->GetDatabase(getter_AddRefs(result));
20533 0 : if (NS_FAILED(rv))
20534 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20535 0 : if (!result) {
20536 0 : *vp = JSVAL_NULL;
20537 0 : return JS_TRUE;
20538 : }
20539 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20540 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20541 0 : return JS_TRUE;
20542 : }
20543 : // After this point do not use 'result'!
20544 0 : qsObjectHelper helper(result, cache);
20545 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIRDFCompositeDataSource), &interfaces[k_nsIRDFCompositeDataSource], vp);
20546 : }
20547 :
20548 : static JSBool
20549 0 : nsIDOMXULElement_GetBuilder(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20550 : {
20551 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20552 0 : JSObject *callee = nsnull;
20553 : nsIDOMXULElement *self;
20554 0 : xpc_qsSelfRef selfref;
20555 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20556 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20557 0 : return JS_FALSE;
20558 : nsresult rv;
20559 0 : nsCOMPtr<nsIXULTemplateBuilder> result;
20560 0 : rv = self->GetBuilder(getter_AddRefs(result));
20561 0 : if (NS_FAILED(rv))
20562 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20563 0 : if (!result) {
20564 0 : *vp = JSVAL_NULL;
20565 0 : return JS_TRUE;
20566 : }
20567 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20568 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20569 0 : return JS_TRUE;
20570 : }
20571 : // After this point do not use 'result'!
20572 0 : qsObjectHelper helper(result, cache);
20573 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIXULTemplateBuilder), &interfaces[k_nsIXULTemplateBuilder], vp);
20574 : }
20575 :
20576 : static JSBool
20577 0 : nsIDOMXULElement_GetResource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20578 : {
20579 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20580 0 : JSObject *callee = nsnull;
20581 : nsIDOMXULElement *self;
20582 0 : xpc_qsSelfRef selfref;
20583 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20584 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20585 0 : return JS_FALSE;
20586 : nsresult rv;
20587 0 : nsCOMPtr<nsIRDFResource> result;
20588 0 : rv = self->GetResource(getter_AddRefs(result));
20589 0 : if (NS_FAILED(rv))
20590 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20591 0 : if (!result) {
20592 0 : *vp = JSVAL_NULL;
20593 0 : return JS_TRUE;
20594 : }
20595 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20596 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20597 0 : return JS_TRUE;
20598 : }
20599 : // After this point do not use 'result'!
20600 0 : qsObjectHelper helper(result, cache);
20601 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIRDFResource), &interfaces[k_nsIRDFResource], vp);
20602 : }
20603 :
20604 : static JSBool
20605 0 : nsIDOMXULElement_GetControllers(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20606 : {
20607 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20608 0 : JSObject *callee = nsnull;
20609 : nsIDOMXULElement *self;
20610 0 : xpc_qsSelfRef selfref;
20611 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20612 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20613 0 : return JS_FALSE;
20614 : nsresult rv;
20615 0 : nsCOMPtr<nsIControllers> result;
20616 0 : rv = self->GetControllers(getter_AddRefs(result));
20617 0 : if (NS_FAILED(rv))
20618 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20619 0 : if (!result) {
20620 0 : *vp = JSVAL_NULL;
20621 0 : return JS_TRUE;
20622 : }
20623 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20624 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20625 0 : return JS_TRUE;
20626 : }
20627 : // After this point do not use 'result'!
20628 0 : qsObjectHelper helper(result, cache);
20629 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIControllers), &interfaces[k_nsIControllers], vp);
20630 : }
20631 :
20632 : static JSBool
20633 0 : nsIDOMXULElement_GetBoxObject(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20634 : {
20635 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20636 0 : JSObject *callee = nsnull;
20637 : nsIDOMXULElement *self;
20638 0 : xpc_qsSelfRef selfref;
20639 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20640 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20641 0 : return JS_FALSE;
20642 : nsresult rv;
20643 0 : nsCOMPtr<nsIBoxObject> result;
20644 0 : rv = self->GetBoxObject(getter_AddRefs(result));
20645 0 : if (NS_FAILED(rv))
20646 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20647 0 : if (!result) {
20648 0 : *vp = JSVAL_NULL;
20649 0 : return JS_TRUE;
20650 : }
20651 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20652 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20653 0 : return JS_TRUE;
20654 : }
20655 : // After this point do not use 'result'!
20656 0 : qsObjectHelper helper(result, cache);
20657 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIBoxObject), &interfaces[k_nsIBoxObject], vp);
20658 : }
20659 :
20660 : static JSBool
20661 0 : nsIDOMXULElement_Focus(JSContext *cx, unsigned argc, jsval *vp)
20662 : {
20663 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20664 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20665 0 : if (!obj)
20666 0 : return JS_FALSE;
20667 : nsIDOMXULElement *self;
20668 0 : xpc_qsSelfRef selfref;
20669 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20670 0 : return JS_FALSE;
20671 : nsresult rv;
20672 0 : rv = self->Focus();
20673 0 : if (NS_FAILED(rv))
20674 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20675 0 : *vp = JSVAL_VOID;
20676 0 : return JS_TRUE;
20677 : }
20678 :
20679 : static JSBool
20680 0 : nsIDOMXULElement_Blur(JSContext *cx, unsigned argc, jsval *vp)
20681 : {
20682 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20683 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20684 0 : if (!obj)
20685 0 : return JS_FALSE;
20686 : nsIDOMXULElement *self;
20687 0 : xpc_qsSelfRef selfref;
20688 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20689 0 : return JS_FALSE;
20690 : nsresult rv;
20691 0 : rv = self->Blur();
20692 0 : if (NS_FAILED(rv))
20693 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20694 0 : *vp = JSVAL_VOID;
20695 0 : return JS_TRUE;
20696 : }
20697 :
20698 : static JSBool
20699 0 : nsIDOMXULElement_Click(JSContext *cx, unsigned argc, jsval *vp)
20700 : {
20701 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20702 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20703 0 : if (!obj)
20704 0 : return JS_FALSE;
20705 : nsIDOMXULElement *self;
20706 0 : xpc_qsSelfRef selfref;
20707 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20708 0 : return JS_FALSE;
20709 : nsresult rv;
20710 0 : rv = self->Click();
20711 0 : if (NS_FAILED(rv))
20712 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20713 0 : *vp = JSVAL_VOID;
20714 0 : return JS_TRUE;
20715 : }
20716 :
20717 : static JSBool
20718 0 : nsIDOMXULElement_DoCommand(JSContext *cx, unsigned argc, jsval *vp)
20719 : {
20720 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20721 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20722 0 : if (!obj)
20723 0 : return JS_FALSE;
20724 : nsIDOMXULElement *self;
20725 0 : xpc_qsSelfRef selfref;
20726 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20727 0 : return JS_FALSE;
20728 : nsresult rv;
20729 0 : rv = self->DoCommand();
20730 0 : if (NS_FAILED(rv))
20731 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20732 0 : *vp = JSVAL_VOID;
20733 0 : return JS_TRUE;
20734 : }
20735 :
20736 : static JSBool
20737 45 : nsIDOMXULElement_GetElementsByAttribute(JSContext *cx, unsigned argc, jsval *vp)
20738 : {
20739 45 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20740 45 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20741 45 : if (!obj)
20742 0 : return JS_FALSE;
20743 45 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
20744 : nsIDOMXULElement *self;
20745 90 : xpc_qsSelfRef selfref;
20746 90 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20747 45 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
20748 0 : return JS_FALSE;
20749 45 : if (argc < 2)
20750 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20751 45 : jsval *argv = JS_ARGV(cx, vp);
20752 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
20753 : xpc_qsDOMString::eDefaultNullBehavior,
20754 90 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20755 45 : if (!arg0.IsValid())
20756 0 : return JS_FALSE;
20757 45 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
20758 : xpc_qsDOMString::eDefaultNullBehavior,
20759 135 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20760 45 : if (!arg1.IsValid())
20761 0 : return JS_FALSE;
20762 : nsresult rv;
20763 90 : nsCOMPtr<nsIDOMNodeList> result;
20764 45 : rv = self->GetElementsByAttribute(arg0, arg1, getter_AddRefs(result));
20765 45 : if (NS_FAILED(rv))
20766 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20767 45 : if (!result) {
20768 0 : *vp = JSVAL_NULL;
20769 0 : return JS_TRUE;
20770 : }
20771 45 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20772 45 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20773 0 : return JS_TRUE;
20774 : }
20775 : // After this point do not use 'result'!
20776 90 : qsObjectHelper helper(result, cache);
20777 45 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
20778 : }
20779 :
20780 : static JSBool
20781 37 : nsIDOMXULElement_GetElementsByAttributeNS(JSContext *cx, unsigned argc, jsval *vp)
20782 : {
20783 37 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20784 37 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20785 37 : if (!obj)
20786 0 : return JS_FALSE;
20787 37 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
20788 : nsIDOMXULElement *self;
20789 74 : xpc_qsSelfRef selfref;
20790 74 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20791 37 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
20792 0 : return JS_FALSE;
20793 37 : if (argc < 3)
20794 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20795 37 : jsval *argv = JS_ARGV(cx, vp);
20796 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
20797 : xpc_qsDOMString::eDefaultNullBehavior,
20798 74 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20799 37 : if (!arg0.IsValid())
20800 0 : return JS_FALSE;
20801 37 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
20802 : xpc_qsDOMString::eDefaultNullBehavior,
20803 111 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20804 37 : if (!arg1.IsValid())
20805 0 : return JS_FALSE;
20806 37 : xpc_qsDOMString arg2(cx, argv[2], &argv[2],
20807 : xpc_qsDOMString::eDefaultNullBehavior,
20808 111 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20809 37 : if (!arg2.IsValid())
20810 0 : return JS_FALSE;
20811 : nsresult rv;
20812 74 : nsCOMPtr<nsIDOMNodeList> result;
20813 37 : rv = self->GetElementsByAttributeNS(arg0, arg1, arg2, getter_AddRefs(result));
20814 37 : if (NS_FAILED(rv))
20815 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20816 37 : if (!result) {
20817 0 : *vp = JSVAL_NULL;
20818 0 : return JS_TRUE;
20819 : }
20820 37 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20821 37 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20822 0 : return JS_TRUE;
20823 : }
20824 : // After this point do not use 'result'!
20825 74 : qsObjectHelper helper(result, cache);
20826 37 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
20827 : }
20828 :
20829 : // === interface nsIBoxObject
20830 :
20831 : static JSBool
20832 0 : nsIBoxObject_GetX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20833 : {
20834 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20835 : nsIBoxObject *self;
20836 0 : xpc_qsSelfRef selfref;
20837 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20838 0 : return JS_FALSE;
20839 : nsresult rv;
20840 : PRInt32 result;
20841 0 : rv = self->GetX(&result);
20842 0 : if (NS_FAILED(rv))
20843 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20844 0 : *vp = INT_TO_JSVAL(result);
20845 0 : return JS_TRUE;
20846 : }
20847 :
20848 : static JSBool
20849 0 : nsIBoxObject_GetY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20850 : {
20851 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20852 : nsIBoxObject *self;
20853 0 : xpc_qsSelfRef selfref;
20854 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20855 0 : return JS_FALSE;
20856 : nsresult rv;
20857 : PRInt32 result;
20858 0 : rv = self->GetY(&result);
20859 0 : if (NS_FAILED(rv))
20860 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20861 0 : *vp = INT_TO_JSVAL(result);
20862 0 : return JS_TRUE;
20863 : }
20864 :
20865 : static JSBool
20866 0 : nsIBoxObject_GetScreenX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20867 : {
20868 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20869 : nsIBoxObject *self;
20870 0 : xpc_qsSelfRef selfref;
20871 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20872 0 : return JS_FALSE;
20873 : nsresult rv;
20874 : PRInt32 result;
20875 0 : rv = self->GetScreenX(&result);
20876 0 : if (NS_FAILED(rv))
20877 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20878 0 : *vp = INT_TO_JSVAL(result);
20879 0 : return JS_TRUE;
20880 : }
20881 :
20882 : static JSBool
20883 0 : nsIBoxObject_GetScreenY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20884 : {
20885 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20886 : nsIBoxObject *self;
20887 0 : xpc_qsSelfRef selfref;
20888 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20889 0 : return JS_FALSE;
20890 : nsresult rv;
20891 : PRInt32 result;
20892 0 : rv = self->GetScreenY(&result);
20893 0 : if (NS_FAILED(rv))
20894 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20895 0 : *vp = INT_TO_JSVAL(result);
20896 0 : return JS_TRUE;
20897 : }
20898 :
20899 : static JSBool
20900 0 : nsIBoxObject_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20901 : {
20902 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20903 : nsIBoxObject *self;
20904 0 : xpc_qsSelfRef selfref;
20905 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20906 0 : return JS_FALSE;
20907 : nsresult rv;
20908 : PRInt32 result;
20909 0 : rv = self->GetWidth(&result);
20910 0 : if (NS_FAILED(rv))
20911 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20912 0 : *vp = INT_TO_JSVAL(result);
20913 0 : return JS_TRUE;
20914 : }
20915 :
20916 : static JSBool
20917 0 : nsIBoxObject_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20918 : {
20919 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20920 : nsIBoxObject *self;
20921 0 : xpc_qsSelfRef selfref;
20922 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20923 0 : return JS_FALSE;
20924 : nsresult rv;
20925 : PRInt32 result;
20926 0 : rv = self->GetHeight(&result);
20927 0 : if (NS_FAILED(rv))
20928 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20929 0 : *vp = INT_TO_JSVAL(result);
20930 0 : return JS_TRUE;
20931 : }
20932 :
20933 : // === interface nsIDOMFileReader
20934 :
20935 : static JSBool
20936 2 : nsIDOMFileReader_ReadAsArrayBuffer(JSContext *cx, unsigned argc, jsval *vp)
20937 : {
20938 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20939 2 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20940 2 : if (!obj)
20941 0 : return JS_FALSE;
20942 : nsIDOMFileReader *self;
20943 4 : xpc_qsSelfRef selfref;
20944 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20945 0 : return JS_FALSE;
20946 2 : if (argc < 1)
20947 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20948 2 : jsval *argv = JS_ARGV(cx, vp);
20949 : nsresult rv;
20950 : nsIDOMBlob *arg0;
20951 4 : xpc_qsSelfRef arg0ref;
20952 2 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
20953 2 : if (NS_FAILED(rv)) {
20954 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
20955 0 : return JS_FALSE;
20956 : }
20957 2 : rv = self->ReadAsArrayBuffer(arg0, cx);
20958 2 : if (NS_FAILED(rv))
20959 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20960 2 : *vp = JSVAL_VOID;
20961 2 : return JS_TRUE;
20962 : }
20963 :
20964 : static JSBool
20965 0 : nsIDOMFileReader_ReadAsBinaryString(JSContext *cx, unsigned argc, jsval *vp)
20966 : {
20967 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20968 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20969 0 : if (!obj)
20970 0 : return JS_FALSE;
20971 : nsIDOMFileReader *self;
20972 0 : xpc_qsSelfRef selfref;
20973 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20974 0 : return JS_FALSE;
20975 0 : if (argc < 1)
20976 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20977 0 : jsval *argv = JS_ARGV(cx, vp);
20978 : nsresult rv;
20979 : nsIDOMBlob *arg0;
20980 0 : xpc_qsSelfRef arg0ref;
20981 0 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
20982 0 : if (NS_FAILED(rv)) {
20983 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
20984 0 : return JS_FALSE;
20985 : }
20986 0 : rv = self->ReadAsBinaryString(arg0);
20987 0 : if (NS_FAILED(rv))
20988 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20989 0 : *vp = JSVAL_VOID;
20990 0 : return JS_TRUE;
20991 : }
20992 :
20993 : static JSBool
20994 0 : nsIDOMFileReader_ReadAsText(JSContext *cx, unsigned argc, jsval *vp)
20995 : {
20996 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20997 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20998 0 : if (!obj)
20999 0 : return JS_FALSE;
21000 : nsIDOMFileReader *self;
21001 0 : xpc_qsSelfRef selfref;
21002 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21003 0 : return JS_FALSE;
21004 0 : if (argc < 1)
21005 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
21006 0 : jsval *argv = JS_ARGV(cx, vp);
21007 : nsresult rv;
21008 : nsIDOMBlob *arg0;
21009 0 : xpc_qsSelfRef arg0ref;
21010 0 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
21011 0 : if (NS_FAILED(rv)) {
21012 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
21013 0 : return JS_FALSE;
21014 : }
21015 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
21016 : xpc_qsDOMString::eDefaultNullBehavior,
21017 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
21018 0 : if (!arg1.IsValid())
21019 0 : return JS_FALSE;
21020 0 : rv = self->ReadAsText(arg0, arg1);
21021 0 : if (NS_FAILED(rv))
21022 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21023 0 : *vp = JSVAL_VOID;
21024 0 : return JS_TRUE;
21025 : }
21026 :
21027 : static JSBool
21028 0 : nsIDOMFileReader_ReadAsDataURL(JSContext *cx, unsigned argc, jsval *vp)
21029 : {
21030 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21031 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21032 0 : if (!obj)
21033 0 : return JS_FALSE;
21034 : nsIDOMFileReader *self;
21035 0 : xpc_qsSelfRef selfref;
21036 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21037 0 : return JS_FALSE;
21038 0 : if (argc < 1)
21039 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
21040 0 : jsval *argv = JS_ARGV(cx, vp);
21041 : nsresult rv;
21042 : nsIDOMBlob *arg0;
21043 0 : xpc_qsSelfRef arg0ref;
21044 0 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
21045 0 : if (NS_FAILED(rv)) {
21046 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
21047 0 : return JS_FALSE;
21048 : }
21049 0 : rv = self->ReadAsDataURL(arg0);
21050 0 : if (NS_FAILED(rv))
21051 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21052 0 : *vp = JSVAL_VOID;
21053 0 : return JS_TRUE;
21054 : }
21055 :
21056 : static JSBool
21057 0 : nsIDOMFileReader_Abort(JSContext *cx, unsigned argc, jsval *vp)
21058 : {
21059 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21060 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21061 0 : if (!obj)
21062 0 : return JS_FALSE;
21063 : nsIDOMFileReader *self;
21064 0 : xpc_qsSelfRef selfref;
21065 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21066 0 : return JS_FALSE;
21067 : nsresult rv;
21068 0 : rv = self->Abort();
21069 0 : if (NS_FAILED(rv))
21070 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21071 0 : *vp = JSVAL_VOID;
21072 0 : return JS_TRUE;
21073 : }
21074 :
21075 : static JSBool
21076 2 : nsIDOMFileReader_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21077 : {
21078 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21079 : nsIDOMFileReader *self;
21080 4 : xpc_qsSelfRef selfref;
21081 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21082 0 : return JS_FALSE;
21083 : nsresult rv;
21084 : PRUint16 result;
21085 2 : rv = self->GetReadyState(&result);
21086 2 : if (NS_FAILED(rv))
21087 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21088 2 : *vp = INT_TO_JSVAL((int32_t) result);
21089 2 : return JS_TRUE;
21090 : }
21091 :
21092 : static JSBool
21093 2 : nsIDOMFileReader_GetResult(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21094 : {
21095 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21096 : nsIDOMFileReader *self;
21097 4 : xpc_qsSelfRef selfref;
21098 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21099 0 : return JS_FALSE;
21100 : nsresult rv;
21101 2 : rv = self->GetResult(cx, vp);
21102 2 : if (NS_FAILED(rv))
21103 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21104 2 : return JS_TRUE;
21105 : }
21106 :
21107 : static JSBool
21108 0 : nsIDOMFileReader_GetError(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21109 : {
21110 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21111 0 : JSObject *callee = nsnull;
21112 : nsIDOMFileReader *self;
21113 0 : xpc_qsSelfRef selfref;
21114 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21115 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21116 0 : return JS_FALSE;
21117 : nsresult rv;
21118 0 : nsCOMPtr<nsIDOMDOMError> result;
21119 0 : rv = self->GetError(getter_AddRefs(result));
21120 0 : if (NS_FAILED(rv))
21121 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21122 0 : if (!result) {
21123 0 : *vp = JSVAL_NULL;
21124 0 : return JS_TRUE;
21125 : }
21126 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21127 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21128 0 : return JS_TRUE;
21129 : }
21130 : // After this point do not use 'result'!
21131 0 : qsObjectHelper helper(result, cache);
21132 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMError), &interfaces[k_nsIDOMDOMError], vp);
21133 : }
21134 :
21135 : static JSBool
21136 0 : nsIDOMFileReader_GetOnloadstart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21137 : {
21138 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21139 0 : JSObject *callee = nsnull;
21140 : nsIDOMFileReader *self;
21141 0 : xpc_qsSelfRef selfref;
21142 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21143 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21144 0 : return JS_FALSE;
21145 : nsresult rv;
21146 0 : nsCOMPtr<nsIDOMEventListener> result;
21147 0 : rv = self->GetOnloadstart(getter_AddRefs(result));
21148 0 : if (NS_FAILED(rv))
21149 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21150 0 : if (!result) {
21151 0 : *vp = JSVAL_NULL;
21152 0 : return JS_TRUE;
21153 : }
21154 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21155 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21156 0 : return JS_TRUE;
21157 : }
21158 : // After this point do not use 'result'!
21159 0 : qsObjectHelper helper(result, cache);
21160 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21161 : }
21162 :
21163 : static JSBool
21164 0 : nsIDOMFileReader_SetOnloadstart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21165 : {
21166 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21167 : nsIDOMFileReader *self;
21168 0 : xpc_qsSelfRef selfref;
21169 0 : JS::AutoValueRooter tvr(cx);
21170 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21171 0 : return JS_FALSE;
21172 : nsresult rv;
21173 : nsIDOMEventListener *arg0;
21174 0 : xpc_qsSelfRef arg0ref;
21175 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21176 0 : if (NS_FAILED(rv)) {
21177 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21178 0 : return JS_FALSE;
21179 : }
21180 0 : rv = self->SetOnloadstart(arg0);
21181 0 : if (NS_FAILED(rv))
21182 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21183 0 : return JS_TRUE;
21184 : }
21185 :
21186 : static JSBool
21187 0 : nsIDOMFileReader_GetOnprogress(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21188 : {
21189 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21190 0 : JSObject *callee = nsnull;
21191 : nsIDOMFileReader *self;
21192 0 : xpc_qsSelfRef selfref;
21193 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21194 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21195 0 : return JS_FALSE;
21196 : nsresult rv;
21197 0 : nsCOMPtr<nsIDOMEventListener> result;
21198 0 : rv = self->GetOnprogress(getter_AddRefs(result));
21199 0 : if (NS_FAILED(rv))
21200 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21201 0 : if (!result) {
21202 0 : *vp = JSVAL_NULL;
21203 0 : return JS_TRUE;
21204 : }
21205 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21206 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21207 0 : return JS_TRUE;
21208 : }
21209 : // After this point do not use 'result'!
21210 0 : qsObjectHelper helper(result, cache);
21211 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21212 : }
21213 :
21214 : static JSBool
21215 0 : nsIDOMFileReader_SetOnprogress(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21216 : {
21217 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21218 : nsIDOMFileReader *self;
21219 0 : xpc_qsSelfRef selfref;
21220 0 : JS::AutoValueRooter tvr(cx);
21221 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21222 0 : return JS_FALSE;
21223 : nsresult rv;
21224 : nsIDOMEventListener *arg0;
21225 0 : xpc_qsSelfRef arg0ref;
21226 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21227 0 : if (NS_FAILED(rv)) {
21228 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21229 0 : return JS_FALSE;
21230 : }
21231 0 : rv = self->SetOnprogress(arg0);
21232 0 : if (NS_FAILED(rv))
21233 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21234 0 : return JS_TRUE;
21235 : }
21236 :
21237 : static JSBool
21238 0 : nsIDOMFileReader_GetOnload(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21239 : {
21240 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21241 0 : JSObject *callee = nsnull;
21242 : nsIDOMFileReader *self;
21243 0 : xpc_qsSelfRef selfref;
21244 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21245 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21246 0 : return JS_FALSE;
21247 : nsresult rv;
21248 0 : nsCOMPtr<nsIDOMEventListener> result;
21249 0 : rv = self->GetOnload(getter_AddRefs(result));
21250 0 : if (NS_FAILED(rv))
21251 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21252 0 : if (!result) {
21253 0 : *vp = JSVAL_NULL;
21254 0 : return JS_TRUE;
21255 : }
21256 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21257 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21258 0 : return JS_TRUE;
21259 : }
21260 : // After this point do not use 'result'!
21261 0 : qsObjectHelper helper(result, cache);
21262 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21263 : }
21264 :
21265 : static JSBool
21266 0 : nsIDOMFileReader_SetOnload(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21267 : {
21268 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21269 : nsIDOMFileReader *self;
21270 0 : xpc_qsSelfRef selfref;
21271 0 : JS::AutoValueRooter tvr(cx);
21272 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21273 0 : return JS_FALSE;
21274 : nsresult rv;
21275 : nsIDOMEventListener *arg0;
21276 0 : xpc_qsSelfRef arg0ref;
21277 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21278 0 : if (NS_FAILED(rv)) {
21279 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21280 0 : return JS_FALSE;
21281 : }
21282 0 : rv = self->SetOnload(arg0);
21283 0 : if (NS_FAILED(rv))
21284 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21285 0 : return JS_TRUE;
21286 : }
21287 :
21288 : static JSBool
21289 0 : nsIDOMFileReader_GetOnabort(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21290 : {
21291 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21292 0 : JSObject *callee = nsnull;
21293 : nsIDOMFileReader *self;
21294 0 : xpc_qsSelfRef selfref;
21295 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21296 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21297 0 : return JS_FALSE;
21298 : nsresult rv;
21299 0 : nsCOMPtr<nsIDOMEventListener> result;
21300 0 : rv = self->GetOnabort(getter_AddRefs(result));
21301 0 : if (NS_FAILED(rv))
21302 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21303 0 : if (!result) {
21304 0 : *vp = JSVAL_NULL;
21305 0 : return JS_TRUE;
21306 : }
21307 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21308 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21309 0 : return JS_TRUE;
21310 : }
21311 : // After this point do not use 'result'!
21312 0 : qsObjectHelper helper(result, cache);
21313 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21314 : }
21315 :
21316 : static JSBool
21317 0 : nsIDOMFileReader_SetOnabort(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21318 : {
21319 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21320 : nsIDOMFileReader *self;
21321 0 : xpc_qsSelfRef selfref;
21322 0 : JS::AutoValueRooter tvr(cx);
21323 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21324 0 : return JS_FALSE;
21325 : nsresult rv;
21326 : nsIDOMEventListener *arg0;
21327 0 : xpc_qsSelfRef arg0ref;
21328 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21329 0 : if (NS_FAILED(rv)) {
21330 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21331 0 : return JS_FALSE;
21332 : }
21333 0 : rv = self->SetOnabort(arg0);
21334 0 : if (NS_FAILED(rv))
21335 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21336 0 : return JS_TRUE;
21337 : }
21338 :
21339 : static JSBool
21340 0 : nsIDOMFileReader_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21341 : {
21342 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21343 0 : JSObject *callee = nsnull;
21344 : nsIDOMFileReader *self;
21345 0 : xpc_qsSelfRef selfref;
21346 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21347 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21348 0 : return JS_FALSE;
21349 : nsresult rv;
21350 0 : nsCOMPtr<nsIDOMEventListener> result;
21351 0 : rv = self->GetOnerror(getter_AddRefs(result));
21352 0 : if (NS_FAILED(rv))
21353 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21354 0 : if (!result) {
21355 0 : *vp = JSVAL_NULL;
21356 0 : return JS_TRUE;
21357 : }
21358 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21359 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21360 0 : return JS_TRUE;
21361 : }
21362 : // After this point do not use 'result'!
21363 0 : qsObjectHelper helper(result, cache);
21364 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21365 : }
21366 :
21367 : static JSBool
21368 0 : nsIDOMFileReader_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21369 : {
21370 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21371 : nsIDOMFileReader *self;
21372 0 : xpc_qsSelfRef selfref;
21373 0 : JS::AutoValueRooter tvr(cx);
21374 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21375 0 : return JS_FALSE;
21376 : nsresult rv;
21377 : nsIDOMEventListener *arg0;
21378 0 : xpc_qsSelfRef arg0ref;
21379 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21380 0 : if (NS_FAILED(rv)) {
21381 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21382 0 : return JS_FALSE;
21383 : }
21384 0 : rv = self->SetOnerror(arg0);
21385 0 : if (NS_FAILED(rv))
21386 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21387 0 : return JS_TRUE;
21388 : }
21389 :
21390 : static JSBool
21391 0 : nsIDOMFileReader_GetOnloadend(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21392 : {
21393 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21394 0 : JSObject *callee = nsnull;
21395 : nsIDOMFileReader *self;
21396 0 : xpc_qsSelfRef selfref;
21397 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21398 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21399 0 : return JS_FALSE;
21400 : nsresult rv;
21401 0 : nsCOMPtr<nsIDOMEventListener> result;
21402 0 : rv = self->GetOnloadend(getter_AddRefs(result));
21403 0 : if (NS_FAILED(rv))
21404 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21405 0 : if (!result) {
21406 0 : *vp = JSVAL_NULL;
21407 0 : return JS_TRUE;
21408 : }
21409 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21410 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21411 0 : return JS_TRUE;
21412 : }
21413 : // After this point do not use 'result'!
21414 0 : qsObjectHelper helper(result, cache);
21415 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21416 : }
21417 :
21418 : static JSBool
21419 0 : nsIDOMFileReader_SetOnloadend(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21420 : {
21421 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21422 : nsIDOMFileReader *self;
21423 0 : xpc_qsSelfRef selfref;
21424 0 : JS::AutoValueRooter tvr(cx);
21425 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21426 0 : return JS_FALSE;
21427 : nsresult rv;
21428 : nsIDOMEventListener *arg0;
21429 0 : xpc_qsSelfRef arg0ref;
21430 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21431 0 : if (NS_FAILED(rv)) {
21432 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21433 0 : return JS_FALSE;
21434 : }
21435 0 : rv = self->SetOnloadend(arg0);
21436 0 : if (NS_FAILED(rv))
21437 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21438 0 : return JS_TRUE;
21439 : }
21440 :
21441 : // === interface nsIXMLHttpRequest
21442 :
21443 : static JSBool
21444 392 : nsIXMLHttpRequest_GetResponseXML(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21445 : {
21446 392 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21447 392 : JSObject *callee = nsnull;
21448 : nsIXMLHttpRequest *self;
21449 784 : xpc_qsSelfRef selfref;
21450 784 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21451 392 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21452 0 : return JS_FALSE;
21453 : nsresult rv;
21454 784 : nsCOMPtr<nsIDOMDocument> result;
21455 392 : rv = self->GetResponseXML(getter_AddRefs(result));
21456 392 : if (NS_FAILED(rv))
21457 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21458 392 : if (!result) {
21459 0 : *vp = JSVAL_NULL;
21460 0 : return JS_TRUE;
21461 : }
21462 392 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21463 392 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21464 0 : return JS_TRUE;
21465 : }
21466 : // After this point do not use 'result'!
21467 784 : qsObjectHelper helper(result, cache);
21468 392 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
21469 : }
21470 :
21471 : static JSBool
21472 351 : nsIXMLHttpRequest_GetResponseText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21473 : {
21474 351 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21475 : nsIXMLHttpRequest *self;
21476 702 : xpc_qsSelfRef selfref;
21477 351 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21478 0 : return JS_FALSE;
21479 : nsresult rv;
21480 702 : nsString result;
21481 351 : rv = self->GetResponseText(result);
21482 351 : if (NS_FAILED(rv))
21483 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21484 351 : return xpc::StringToJsval(cx, result, vp);
21485 : }
21486 :
21487 : static JSBool
21488 0 : nsIXMLHttpRequest_GetResponseType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21489 : {
21490 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21491 : nsIXMLHttpRequest *self;
21492 0 : xpc_qsSelfRef selfref;
21493 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21494 0 : return JS_FALSE;
21495 : nsresult rv;
21496 0 : nsString result;
21497 0 : rv = self->GetResponseType(result);
21498 0 : if (NS_FAILED(rv))
21499 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21500 0 : return xpc::StringToJsval(cx, result, vp);
21501 : }
21502 :
21503 : static JSBool
21504 1 : nsIXMLHttpRequest_SetResponseType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21505 : {
21506 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21507 : nsIXMLHttpRequest *self;
21508 2 : xpc_qsSelfRef selfref;
21509 2 : JS::AutoValueRooter tvr(cx);
21510 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21511 0 : return JS_FALSE;
21512 2 : xpc_qsAString arg0(cx, *vp, vp);
21513 1 : if (!arg0.IsValid())
21514 0 : return JS_FALSE;
21515 : nsresult rv;
21516 1 : rv = self->SetResponseType(arg0);
21517 1 : if (NS_FAILED(rv))
21518 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21519 1 : return JS_TRUE;
21520 : }
21521 :
21522 : static JSBool
21523 0 : nsIXMLHttpRequest_GetResponse(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21524 : {
21525 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21526 : nsIXMLHttpRequest *self;
21527 0 : xpc_qsSelfRef selfref;
21528 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21529 0 : return JS_FALSE;
21530 : nsresult rv;
21531 0 : rv = self->GetResponse(cx, vp);
21532 0 : if (NS_FAILED(rv))
21533 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21534 0 : return JS_TRUE;
21535 : }
21536 :
21537 : static JSBool
21538 538 : nsIXMLHttpRequest_GetStatus(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21539 : {
21540 538 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21541 : nsIXMLHttpRequest *self;
21542 1076 : xpc_qsSelfRef selfref;
21543 538 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21544 0 : return JS_FALSE;
21545 : nsresult rv;
21546 : PRUint32 result;
21547 538 : rv = self->GetStatus(&result);
21548 538 : if (NS_FAILED(rv))
21549 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21550 538 : *vp = UINT_TO_JSVAL(result);
21551 538 : return JS_TRUE;
21552 : }
21553 :
21554 : static JSBool
21555 12 : nsIXMLHttpRequest_Abort(JSContext *cx, unsigned argc, jsval *vp)
21556 : {
21557 12 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21558 12 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21559 12 : if (!obj)
21560 0 : return JS_FALSE;
21561 : nsIXMLHttpRequest *self;
21562 24 : xpc_qsSelfRef selfref;
21563 12 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21564 0 : return JS_FALSE;
21565 : nsresult rv;
21566 12 : rv = self->Abort();
21567 12 : if (NS_FAILED(rv))
21568 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21569 12 : *vp = JSVAL_VOID;
21570 12 : return JS_TRUE;
21571 : }
21572 :
21573 : static JSBool
21574 597 : nsIXMLHttpRequest_Open(JSContext *cx, unsigned argc, jsval *vp)
21575 : {
21576 597 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21577 597 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21578 597 : if (!obj)
21579 0 : return JS_FALSE;
21580 : nsIXMLHttpRequest *self;
21581 1194 : xpc_qsSelfRef selfref;
21582 597 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21583 0 : return JS_FALSE;
21584 597 : if (argc < 2)
21585 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
21586 597 : jsval *argv = JS_ARGV(cx, vp);
21587 1194 : xpc_qsAUTF8String arg0(cx, argv[0], &argv[0]);
21588 597 : if (!arg0.IsValid())
21589 0 : return JS_FALSE;
21590 1194 : xpc_qsAUTF8String arg1(cx, argv[1], &argv[1]);
21591 597 : if (!arg1.IsValid())
21592 0 : return JS_FALSE;
21593 : JSBool arg2;
21594 597 : JS_ValueToBoolean(cx, (2 < argc ? argv[2] : JSVAL_NULL), &arg2);
21595 : xpc_qsDOMString arg3(cx, (3 < argc ? argv[3] : JSVAL_NULL), (3 < argc ? &argv[3] : NULL),
21596 : xpc_qsDOMString::eDefaultNullBehavior,
21597 1194 : xpc_qsDOMString::eEmpty);
21598 597 : if (!arg3.IsValid())
21599 0 : return JS_FALSE;
21600 : xpc_qsDOMString arg4(cx, (4 < argc ? argv[4] : JSVAL_NULL), (4 < argc ? &argv[4] : NULL),
21601 : xpc_qsDOMString::eDefaultNullBehavior,
21602 1194 : xpc_qsDOMString::eEmpty);
21603 597 : if (!arg4.IsValid())
21604 0 : return JS_FALSE;
21605 : nsresult rv;
21606 597 : rv = self->Open(arg0, arg1, arg2, arg3, arg4, NS_MIN<PRUint32>(argc, 5) - 2);
21607 597 : if (NS_FAILED(rv))
21608 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21609 597 : *vp = JSVAL_VOID;
21610 597 : return JS_TRUE;
21611 : }
21612 :
21613 : static JSBool
21614 596 : nsIXMLHttpRequest_Send(JSContext *cx, unsigned argc, jsval *vp)
21615 : {
21616 596 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21617 596 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21618 596 : if (!obj)
21619 0 : return JS_FALSE;
21620 1192 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
21621 : nsIXMLHttpRequest *self;
21622 1192 : xpc_qsSelfRef selfref;
21623 596 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
21624 0 : return JS_FALSE;
21625 596 : jsval *argv = JS_ARGV(cx, vp);
21626 1192 : nsCOMPtr<nsIVariant> arg0(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (0 < argc ? argv[0] : JSVAL_NULL))));
21627 596 : if (!arg0) {
21628 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 0);
21629 0 : return JS_FALSE;
21630 : } nsresult rv;
21631 596 : rv = self->Send(arg0);
21632 596 : if (NS_FAILED(rv))
21633 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
21634 596 : *vp = JSVAL_VOID;
21635 596 : return JS_TRUE;
21636 : }
21637 :
21638 : static JSBool
21639 0 : nsIXMLHttpRequest_SendAsBinary(JSContext *cx, unsigned argc, jsval *vp)
21640 : {
21641 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21642 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21643 0 : if (!obj)
21644 0 : return JS_FALSE;
21645 : nsIXMLHttpRequest *self;
21646 0 : xpc_qsSelfRef selfref;
21647 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21648 0 : return JS_FALSE;
21649 0 : if (argc < 1)
21650 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
21651 0 : jsval *argv = JS_ARGV(cx, vp);
21652 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
21653 : xpc_qsDOMString::eDefaultNullBehavior,
21654 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
21655 0 : if (!arg0.IsValid())
21656 0 : return JS_FALSE;
21657 : nsresult rv;
21658 0 : rv = self->SendAsBinary(arg0);
21659 0 : if (NS_FAILED(rv))
21660 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21661 0 : *vp = JSVAL_VOID;
21662 0 : return JS_TRUE;
21663 : }
21664 :
21665 : static JSBool
21666 0 : nsIXMLHttpRequest_GetTimeout(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21667 : {
21668 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21669 : nsIXMLHttpRequest *self;
21670 0 : xpc_qsSelfRef selfref;
21671 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21672 0 : return JS_FALSE;
21673 : nsresult rv;
21674 : PRUint32 result;
21675 0 : rv = self->GetTimeout(&result);
21676 0 : if (NS_FAILED(rv))
21677 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21678 0 : *vp = UINT_TO_JSVAL(result);
21679 0 : return JS_TRUE;
21680 : }
21681 :
21682 : static JSBool
21683 0 : nsIXMLHttpRequest_SetTimeout(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21684 : {
21685 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21686 : nsIXMLHttpRequest *self;
21687 0 : xpc_qsSelfRef selfref;
21688 0 : JS::AutoValueRooter tvr(cx);
21689 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21690 0 : return JS_FALSE;
21691 : uint32_t arg0;
21692 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
21693 0 : return JS_FALSE;
21694 : nsresult rv;
21695 0 : rv = self->SetTimeout(arg0);
21696 0 : if (NS_FAILED(rv))
21697 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21698 0 : return JS_TRUE;
21699 : }
21700 :
21701 : static JSBool
21702 56 : nsIXMLHttpRequest_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21703 : {
21704 56 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21705 : nsIXMLHttpRequest *self;
21706 112 : xpc_qsSelfRef selfref;
21707 56 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21708 0 : return JS_FALSE;
21709 : nsresult rv;
21710 : PRUint16 result;
21711 56 : rv = self->GetReadyState(&result);
21712 56 : if (NS_FAILED(rv))
21713 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21714 56 : *vp = INT_TO_JSVAL((int32_t) result);
21715 56 : return JS_TRUE;
21716 : }
21717 :
21718 : static JSBool
21719 0 : nsIXMLHttpRequest_GetMultipart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21720 : {
21721 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21722 : nsIXMLHttpRequest *self;
21723 0 : xpc_qsSelfRef selfref;
21724 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21725 0 : return JS_FALSE;
21726 : nsresult rv;
21727 : bool result;
21728 0 : rv = self->GetMultipart(&result);
21729 0 : if (NS_FAILED(rv))
21730 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21731 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
21732 0 : return JS_TRUE;
21733 : }
21734 :
21735 : static JSBool
21736 0 : nsIXMLHttpRequest_SetMultipart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21737 : {
21738 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21739 : nsIXMLHttpRequest *self;
21740 0 : xpc_qsSelfRef selfref;
21741 0 : JS::AutoValueRooter tvr(cx);
21742 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21743 0 : return JS_FALSE;
21744 : JSBool arg0;
21745 0 : JS_ValueToBoolean(cx, *vp, &arg0);
21746 : nsresult rv;
21747 0 : rv = self->SetMultipart(arg0);
21748 0 : if (NS_FAILED(rv))
21749 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21750 0 : return JS_TRUE;
21751 : }
21752 :
21753 : static JSBool
21754 0 : nsIXMLHttpRequest_GetMozBackgroundRequest(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21755 : {
21756 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21757 : nsIXMLHttpRequest *self;
21758 0 : xpc_qsSelfRef selfref;
21759 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21760 0 : return JS_FALSE;
21761 : nsresult rv;
21762 : bool result;
21763 0 : rv = self->GetMozBackgroundRequest(&result);
21764 0 : if (NS_FAILED(rv))
21765 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21766 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
21767 0 : return JS_TRUE;
21768 : }
21769 :
21770 : static JSBool
21771 87 : nsIXMLHttpRequest_SetMozBackgroundRequest(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21772 : {
21773 87 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21774 : nsIXMLHttpRequest *self;
21775 174 : xpc_qsSelfRef selfref;
21776 174 : JS::AutoValueRooter tvr(cx);
21777 87 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21778 0 : return JS_FALSE;
21779 : JSBool arg0;
21780 87 : JS_ValueToBoolean(cx, *vp, &arg0);
21781 : nsresult rv;
21782 87 : rv = self->SetMozBackgroundRequest(arg0);
21783 87 : if (NS_FAILED(rv))
21784 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21785 87 : return JS_TRUE;
21786 : }
21787 :
21788 : static JSBool
21789 0 : nsIXMLHttpRequest_GetWithCredentials(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21790 : {
21791 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21792 : nsIXMLHttpRequest *self;
21793 0 : xpc_qsSelfRef selfref;
21794 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21795 0 : return JS_FALSE;
21796 : nsresult rv;
21797 : bool result;
21798 0 : rv = self->GetWithCredentials(&result);
21799 0 : if (NS_FAILED(rv))
21800 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21801 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
21802 0 : return JS_TRUE;
21803 : }
21804 :
21805 : static JSBool
21806 1 : nsIXMLHttpRequest_SetWithCredentials(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21807 : {
21808 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21809 : nsIXMLHttpRequest *self;
21810 2 : xpc_qsSelfRef selfref;
21811 2 : JS::AutoValueRooter tvr(cx);
21812 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21813 0 : return JS_FALSE;
21814 : JSBool arg0;
21815 1 : JS_ValueToBoolean(cx, *vp, &arg0);
21816 : nsresult rv;
21817 1 : rv = self->SetWithCredentials(arg0);
21818 1 : if (NS_FAILED(rv))
21819 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21820 1 : return JS_TRUE;
21821 : }
21822 :
21823 : static JSBool
21824 0 : nsIXMLHttpRequest_GetOnreadystatechange(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21825 : {
21826 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21827 0 : JSObject *callee = nsnull;
21828 : nsIXMLHttpRequest *self;
21829 0 : xpc_qsSelfRef selfref;
21830 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21831 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21832 0 : return JS_FALSE;
21833 : nsresult rv;
21834 0 : nsCOMPtr<nsIDOMEventListener> result;
21835 0 : rv = self->GetOnreadystatechange(getter_AddRefs(result));
21836 0 : if (NS_FAILED(rv))
21837 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21838 0 : if (!result) {
21839 0 : *vp = JSVAL_NULL;
21840 0 : return JS_TRUE;
21841 : }
21842 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21843 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21844 0 : return JS_TRUE;
21845 : }
21846 : // After this point do not use 'result'!
21847 0 : qsObjectHelper helper(result, cache);
21848 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21849 : }
21850 :
21851 : static JSBool
21852 0 : nsIXMLHttpRequest_SetOnreadystatechange(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21853 : {
21854 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21855 : nsIXMLHttpRequest *self;
21856 0 : xpc_qsSelfRef selfref;
21857 0 : JS::AutoValueRooter tvr(cx);
21858 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21859 0 : return JS_FALSE;
21860 : nsresult rv;
21861 : nsIDOMEventListener *arg0;
21862 0 : xpc_qsSelfRef arg0ref;
21863 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21864 0 : if (NS_FAILED(rv)) {
21865 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21866 0 : return JS_FALSE;
21867 : }
21868 0 : rv = self->SetOnreadystatechange(arg0);
21869 0 : if (NS_FAILED(rv))
21870 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21871 0 : return JS_TRUE;
21872 : }
21873 :
21874 : // === interface nsIWebSocket
21875 :
21876 : static JSBool
21877 0 : nsIWebSocket_GetUrl(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21878 : {
21879 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21880 : nsIWebSocket *self;
21881 0 : xpc_qsSelfRef selfref;
21882 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21883 0 : return JS_FALSE;
21884 : nsresult rv;
21885 0 : nsString result;
21886 0 : rv = self->GetUrl(result);
21887 0 : if (NS_FAILED(rv))
21888 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21889 0 : return xpc::StringToJsval(cx, result, vp);
21890 : }
21891 :
21892 : static JSBool
21893 0 : nsIWebSocket_GetExtensions(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21894 : {
21895 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21896 : nsIWebSocket *self;
21897 0 : xpc_qsSelfRef selfref;
21898 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21899 0 : return JS_FALSE;
21900 : nsresult rv;
21901 0 : nsString result;
21902 0 : rv = self->GetExtensions(result);
21903 0 : if (NS_FAILED(rv))
21904 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21905 0 : return xpc::StringToJsval(cx, result, vp);
21906 : }
21907 :
21908 : static JSBool
21909 0 : nsIWebSocket_GetProtocol(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21910 : {
21911 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21912 : nsIWebSocket *self;
21913 0 : xpc_qsSelfRef selfref;
21914 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21915 0 : return JS_FALSE;
21916 : nsresult rv;
21917 0 : nsString result;
21918 0 : rv = self->GetProtocol(result);
21919 0 : if (NS_FAILED(rv))
21920 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21921 0 : return xpc::StringToJsval(cx, result, vp);
21922 : }
21923 :
21924 : static JSBool
21925 0 : nsIWebSocket_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21926 : {
21927 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21928 : nsIWebSocket *self;
21929 0 : xpc_qsSelfRef selfref;
21930 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21931 0 : return JS_FALSE;
21932 : nsresult rv;
21933 : PRUint16 result;
21934 0 : rv = self->GetReadyState(&result);
21935 0 : if (NS_FAILED(rv))
21936 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21937 0 : *vp = INT_TO_JSVAL((int32_t) result);
21938 0 : return JS_TRUE;
21939 : }
21940 :
21941 : static JSBool
21942 0 : nsIWebSocket_GetBufferedAmount(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21943 : {
21944 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21945 : nsIWebSocket *self;
21946 0 : xpc_qsSelfRef selfref;
21947 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21948 0 : return JS_FALSE;
21949 : nsresult rv;
21950 : PRUint32 result;
21951 0 : rv = self->GetBufferedAmount(&result);
21952 0 : if (NS_FAILED(rv))
21953 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21954 0 : *vp = UINT_TO_JSVAL(result);
21955 0 : return JS_TRUE;
21956 : }
21957 :
21958 : static JSBool
21959 0 : nsIWebSocket_GetBinaryType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21960 : {
21961 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21962 : nsIWebSocket *self;
21963 0 : xpc_qsSelfRef selfref;
21964 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21965 0 : return JS_FALSE;
21966 : nsresult rv;
21967 0 : nsString result;
21968 0 : rv = self->GetBinaryType(result);
21969 0 : if (NS_FAILED(rv))
21970 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21971 0 : return xpc::StringToJsval(cx, result, vp);
21972 : }
21973 :
21974 : static JSBool
21975 0 : nsIWebSocket_SetBinaryType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21976 : {
21977 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21978 : nsIWebSocket *self;
21979 0 : xpc_qsSelfRef selfref;
21980 0 : JS::AutoValueRooter tvr(cx);
21981 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21982 0 : return JS_FALSE;
21983 : xpc_qsDOMString arg0(cx, *vp, vp,
21984 : xpc_qsDOMString::eDefaultNullBehavior,
21985 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
21986 0 : if (!arg0.IsValid())
21987 0 : return JS_FALSE;
21988 : nsresult rv;
21989 0 : rv = self->SetBinaryType(arg0);
21990 0 : if (NS_FAILED(rv))
21991 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21992 0 : return JS_TRUE;
21993 : }
21994 :
21995 : static JSBool
21996 0 : nsIWebSocket_GetOnopen(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21997 : {
21998 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21999 0 : JSObject *callee = nsnull;
22000 : nsIWebSocket *self;
22001 0 : xpc_qsSelfRef selfref;
22002 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22003 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22004 0 : return JS_FALSE;
22005 : nsresult rv;
22006 0 : nsCOMPtr<nsIDOMEventListener> result;
22007 0 : rv = self->GetOnopen(getter_AddRefs(result));
22008 0 : if (NS_FAILED(rv))
22009 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22010 0 : if (!result) {
22011 0 : *vp = JSVAL_NULL;
22012 0 : return JS_TRUE;
22013 : }
22014 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22015 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22016 0 : return JS_TRUE;
22017 : }
22018 : // After this point do not use 'result'!
22019 0 : qsObjectHelper helper(result, cache);
22020 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
22021 : }
22022 :
22023 : static JSBool
22024 0 : nsIWebSocket_SetOnopen(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
22025 : {
22026 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22027 : nsIWebSocket *self;
22028 0 : xpc_qsSelfRef selfref;
22029 0 : JS::AutoValueRooter tvr(cx);
22030 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
22031 0 : return JS_FALSE;
22032 : nsresult rv;
22033 : nsIDOMEventListener *arg0;
22034 0 : xpc_qsSelfRef arg0ref;
22035 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
22036 0 : if (NS_FAILED(rv)) {
22037 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22038 0 : return JS_FALSE;
22039 : }
22040 0 : rv = self->SetOnopen(arg0);
22041 0 : if (NS_FAILED(rv))
22042 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22043 0 : return JS_TRUE;
22044 : }
22045 :
22046 : static JSBool
22047 0 : nsIWebSocket_GetOnmessage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
22048 : {
22049 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22050 0 : JSObject *callee = nsnull;
22051 : nsIWebSocket *self;
22052 0 : xpc_qsSelfRef selfref;
22053 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22054 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22055 0 : return JS_FALSE;
22056 : nsresult rv;
22057 0 : nsCOMPtr<nsIDOMEventListener> result;
22058 0 : rv = self->GetOnmessage(getter_AddRefs(result));
22059 0 : if (NS_FAILED(rv))
22060 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22061 0 : if (!result) {
22062 0 : *vp = JSVAL_NULL;
22063 0 : return JS_TRUE;
22064 : }
22065 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22066 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22067 0 : return JS_TRUE;
22068 : }
22069 : // After this point do not use 'result'!
22070 0 : qsObjectHelper helper(result, cache);
22071 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
22072 : }
22073 :
22074 : static JSBool
22075 0 : nsIWebSocket_SetOnmessage(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
22076 : {
22077 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22078 : nsIWebSocket *self;
22079 0 : xpc_qsSelfRef selfref;
22080 0 : JS::AutoValueRooter tvr(cx);
22081 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
22082 0 : return JS_FALSE;
22083 : nsresult rv;
22084 : nsIDOMEventListener *arg0;
22085 0 : xpc_qsSelfRef arg0ref;
22086 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
22087 0 : if (NS_FAILED(rv)) {
22088 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22089 0 : return JS_FALSE;
22090 : }
22091 0 : rv = self->SetOnmessage(arg0);
22092 0 : if (NS_FAILED(rv))
22093 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22094 0 : return JS_TRUE;
22095 : }
22096 :
22097 : static JSBool
22098 0 : nsIWebSocket_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
22099 : {
22100 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22101 0 : JSObject *callee = nsnull;
22102 : nsIWebSocket *self;
22103 0 : xpc_qsSelfRef selfref;
22104 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22105 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22106 0 : return JS_FALSE;
22107 : nsresult rv;
22108 0 : nsCOMPtr<nsIDOMEventListener> result;
22109 0 : rv = self->GetOnerror(getter_AddRefs(result));
22110 0 : if (NS_FAILED(rv))
22111 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22112 0 : if (!result) {
22113 0 : *vp = JSVAL_NULL;
22114 0 : return JS_TRUE;
22115 : }
22116 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22117 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22118 0 : return JS_TRUE;
22119 : }
22120 : // After this point do not use 'result'!
22121 0 : qsObjectHelper helper(result, cache);
22122 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
22123 : }
22124 :
22125 : static JSBool
22126 0 : nsIWebSocket_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
22127 : {
22128 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22129 : nsIWebSocket *self;
22130 0 : xpc_qsSelfRef selfref;
22131 0 : JS::AutoValueRooter tvr(cx);
22132 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
22133 0 : return JS_FALSE;
22134 : nsresult rv;
22135 : nsIDOMEventListener *arg0;
22136 0 : xpc_qsSelfRef arg0ref;
22137 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
22138 0 : if (NS_FAILED(rv)) {
22139 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22140 0 : return JS_FALSE;
22141 : }
22142 0 : rv = self->SetOnerror(arg0);
22143 0 : if (NS_FAILED(rv))
22144 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22145 0 : return JS_TRUE;
22146 : }
22147 :
22148 : static JSBool
22149 0 : nsIWebSocket_GetOnclose(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
22150 : {
22151 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22152 0 : JSObject *callee = nsnull;
22153 : nsIWebSocket *self;
22154 0 : xpc_qsSelfRef selfref;
22155 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22156 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22157 0 : return JS_FALSE;
22158 : nsresult rv;
22159 0 : nsCOMPtr<nsIDOMEventListener> result;
22160 0 : rv = self->GetOnclose(getter_AddRefs(result));
22161 0 : if (NS_FAILED(rv))
22162 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22163 0 : if (!result) {
22164 0 : *vp = JSVAL_NULL;
22165 0 : return JS_TRUE;
22166 : }
22167 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22168 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22169 0 : return JS_TRUE;
22170 : }
22171 : // After this point do not use 'result'!
22172 0 : qsObjectHelper helper(result, cache);
22173 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
22174 : }
22175 :
22176 : static JSBool
22177 0 : nsIWebSocket_SetOnclose(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
22178 : {
22179 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22180 : nsIWebSocket *self;
22181 0 : xpc_qsSelfRef selfref;
22182 0 : JS::AutoValueRooter tvr(cx);
22183 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
22184 0 : return JS_FALSE;
22185 : nsresult rv;
22186 : nsIDOMEventListener *arg0;
22187 0 : xpc_qsSelfRef arg0ref;
22188 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
22189 0 : if (NS_FAILED(rv)) {
22190 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22191 0 : return JS_FALSE;
22192 : }
22193 0 : rv = self->SetOnclose(arg0);
22194 0 : if (NS_FAILED(rv))
22195 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22196 0 : return JS_TRUE;
22197 : }
22198 :
22199 : static JSBool
22200 0 : nsIWebSocket_Send(JSContext *cx, unsigned argc, jsval *vp)
22201 : {
22202 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22203 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22204 0 : if (!obj)
22205 0 : return JS_FALSE;
22206 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
22207 : nsIWebSocket *self;
22208 0 : xpc_qsSelfRef selfref;
22209 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
22210 0 : return JS_FALSE;
22211 0 : if (argc < 1)
22212 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22213 0 : jsval *argv = JS_ARGV(cx, vp);
22214 0 : nsCOMPtr<nsIVariant> arg0(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, argv[0])));
22215 0 : if (!arg0) {
22216 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 0);
22217 0 : return JS_FALSE;
22218 : } nsresult rv;
22219 0 : rv = self->Send(arg0);
22220 0 : if (NS_FAILED(rv))
22221 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
22222 0 : *vp = JSVAL_VOID;
22223 0 : return JS_TRUE;
22224 : }
22225 :
22226 : static JSBool
22227 0 : nsIWebSocket_Close(JSContext *cx, unsigned argc, jsval *vp)
22228 : {
22229 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22230 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22231 0 : if (!obj)
22232 0 : return JS_FALSE;
22233 : nsIWebSocket *self;
22234 0 : xpc_qsSelfRef selfref;
22235 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22236 0 : return JS_FALSE;
22237 0 : jsval *argv = JS_ARGV(cx, vp);
22238 : uint32_t arg0_u32;
22239 0 : if (!JS_ValueToECMAUint32(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0_u32))
22240 0 : return JS_FALSE;
22241 0 : uint16_t arg0 = (uint16_t) arg0_u32;
22242 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
22243 : xpc_qsDOMString::eDefaultNullBehavior,
22244 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
22245 0 : if (!arg1.IsValid())
22246 0 : return JS_FALSE;
22247 : nsresult rv;
22248 0 : rv = self->Close(arg0, arg1, NS_MIN<PRUint32>(argc, 2) - 0);
22249 0 : if (NS_FAILED(rv))
22250 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22251 0 : *vp = JSVAL_VOID;
22252 0 : return JS_TRUE;
22253 : }
22254 :
22255 : // === interface nsIDOMWebGLRenderingContext
22256 :
22257 : static JSBool
22258 0 : nsIDOMWebGLRenderingContext_GetCanvas(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
22259 : {
22260 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22261 0 : JSObject *callee = nsnull;
22262 : nsIDOMWebGLRenderingContext *self;
22263 0 : xpc_qsSelfRef selfref;
22264 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22265 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22266 0 : return JS_FALSE;
22267 : nsresult rv;
22268 0 : nsCOMPtr<nsIDOMHTMLCanvasElement> result;
22269 0 : rv = self->GetCanvas(getter_AddRefs(result));
22270 0 : if (NS_FAILED(rv))
22271 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22272 0 : if (!result) {
22273 0 : *vp = JSVAL_NULL;
22274 0 : return JS_TRUE;
22275 : }
22276 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22277 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22278 0 : return JS_TRUE;
22279 : }
22280 : // After this point do not use 'result'!
22281 0 : qsObjectHelper helper(result, cache);
22282 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCanvasElement), &interfaces[k_nsIDOMHTMLCanvasElement], vp);
22283 : }
22284 :
22285 : static JSBool
22286 0 : nsIDOMWebGLRenderingContext_ActiveTexture(JSContext *cx, unsigned argc, jsval *vp)
22287 : {
22288 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22289 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22290 0 : if (!obj)
22291 0 : return JS_FALSE;
22292 : nsIDOMWebGLRenderingContext *self;
22293 0 : xpc_qsSelfRef selfref;
22294 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22295 0 : return JS_FALSE;
22296 0 : if (argc < 1)
22297 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22298 0 : jsval *argv = JS_ARGV(cx, vp);
22299 : uint32_t arg0;
22300 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22301 0 : return JS_FALSE;
22302 : nsresult rv;
22303 0 : rv = self->ActiveTexture(arg0);
22304 0 : if (NS_FAILED(rv))
22305 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22306 0 : *vp = JSVAL_VOID;
22307 0 : return JS_TRUE;
22308 : }
22309 :
22310 : static JSBool
22311 0 : nsIDOMWebGLRenderingContext_AttachShader(JSContext *cx, unsigned argc, jsval *vp)
22312 : {
22313 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22314 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22315 0 : if (!obj)
22316 0 : return JS_FALSE;
22317 : nsIDOMWebGLRenderingContext *self;
22318 0 : xpc_qsSelfRef selfref;
22319 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22320 0 : return JS_FALSE;
22321 0 : jsval *argv = JS_ARGV(cx, vp);
22322 : nsresult rv;
22323 : nsIWebGLProgram *arg0;
22324 0 : xpc_qsSelfRef arg0ref;
22325 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
22326 0 : if (NS_FAILED(rv)) {
22327 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
22328 0 : return JS_FALSE;
22329 : }
22330 : nsIWebGLShader *arg1;
22331 0 : xpc_qsSelfRef arg1ref;
22332 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1, &arg1ref.ptr, (1 < argc ? &argv[1] : NULL));
22333 0 : if (NS_FAILED(rv)) {
22334 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22335 0 : return JS_FALSE;
22336 : }
22337 0 : rv = self->AttachShader(arg0, arg1);
22338 0 : if (NS_FAILED(rv))
22339 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22340 0 : *vp = JSVAL_VOID;
22341 0 : return JS_TRUE;
22342 : }
22343 :
22344 : static JSBool
22345 0 : nsIDOMWebGLRenderingContext_BindAttribLocation(JSContext *cx, unsigned argc, jsval *vp)
22346 : {
22347 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22348 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22349 0 : if (!obj)
22350 0 : return JS_FALSE;
22351 : nsIDOMWebGLRenderingContext *self;
22352 0 : xpc_qsSelfRef selfref;
22353 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22354 0 : return JS_FALSE;
22355 0 : if (argc < 3)
22356 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22357 0 : jsval *argv = JS_ARGV(cx, vp);
22358 : nsresult rv;
22359 : nsIWebGLProgram *arg0;
22360 0 : xpc_qsSelfRef arg0ref;
22361 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
22362 0 : if (NS_FAILED(rv)) {
22363 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
22364 0 : return JS_FALSE;
22365 : }
22366 : uint32_t arg1;
22367 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22368 0 : return JS_FALSE;
22369 0 : xpc_qsDOMString arg2(cx, argv[2], &argv[2],
22370 : xpc_qsDOMString::eDefaultNullBehavior,
22371 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
22372 0 : if (!arg2.IsValid())
22373 0 : return JS_FALSE;
22374 0 : rv = self->BindAttribLocation(arg0, arg1, arg2);
22375 0 : if (NS_FAILED(rv))
22376 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22377 0 : *vp = JSVAL_VOID;
22378 0 : return JS_TRUE;
22379 : }
22380 :
22381 : static JSBool
22382 0 : nsIDOMWebGLRenderingContext_BindBuffer(JSContext *cx, unsigned argc, jsval *vp)
22383 : {
22384 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22385 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22386 0 : if (!obj)
22387 0 : return JS_FALSE;
22388 : nsIDOMWebGLRenderingContext *self;
22389 0 : xpc_qsSelfRef selfref;
22390 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22391 0 : return JS_FALSE;
22392 0 : if (argc < 2)
22393 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22394 0 : jsval *argv = JS_ARGV(cx, vp);
22395 : uint32_t arg0;
22396 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22397 0 : return JS_FALSE;
22398 : nsresult rv;
22399 : nsIWebGLBuffer *arg1;
22400 0 : xpc_qsSelfRef arg1ref;
22401 0 : rv = xpc_qsUnwrapArg<nsIWebGLBuffer>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22402 0 : if (NS_FAILED(rv)) {
22403 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22404 0 : return JS_FALSE;
22405 : }
22406 0 : rv = self->BindBuffer(arg0, arg1);
22407 0 : if (NS_FAILED(rv))
22408 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22409 0 : *vp = JSVAL_VOID;
22410 0 : return JS_TRUE;
22411 : }
22412 :
22413 : static JSBool
22414 0 : nsIDOMWebGLRenderingContext_BindFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
22415 : {
22416 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22417 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22418 0 : if (!obj)
22419 0 : return JS_FALSE;
22420 : nsIDOMWebGLRenderingContext *self;
22421 0 : xpc_qsSelfRef selfref;
22422 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22423 0 : return JS_FALSE;
22424 0 : if (argc < 2)
22425 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22426 0 : jsval *argv = JS_ARGV(cx, vp);
22427 : uint32_t arg0;
22428 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22429 0 : return JS_FALSE;
22430 : nsresult rv;
22431 : nsIWebGLFramebuffer *arg1;
22432 0 : xpc_qsSelfRef arg1ref;
22433 0 : rv = xpc_qsUnwrapArg<nsIWebGLFramebuffer>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22434 0 : if (NS_FAILED(rv)) {
22435 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22436 0 : return JS_FALSE;
22437 : }
22438 0 : rv = self->BindFramebuffer(arg0, arg1);
22439 0 : if (NS_FAILED(rv))
22440 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22441 0 : *vp = JSVAL_VOID;
22442 0 : return JS_TRUE;
22443 : }
22444 :
22445 : static JSBool
22446 0 : nsIDOMWebGLRenderingContext_BindRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
22447 : {
22448 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22449 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22450 0 : if (!obj)
22451 0 : return JS_FALSE;
22452 : nsIDOMWebGLRenderingContext *self;
22453 0 : xpc_qsSelfRef selfref;
22454 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22455 0 : return JS_FALSE;
22456 0 : if (argc < 2)
22457 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22458 0 : jsval *argv = JS_ARGV(cx, vp);
22459 : uint32_t arg0;
22460 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22461 0 : return JS_FALSE;
22462 : nsresult rv;
22463 : nsIWebGLRenderbuffer *arg1;
22464 0 : xpc_qsSelfRef arg1ref;
22465 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22466 0 : if (NS_FAILED(rv)) {
22467 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22468 0 : return JS_FALSE;
22469 : }
22470 0 : rv = self->BindRenderbuffer(arg0, arg1);
22471 0 : if (NS_FAILED(rv))
22472 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22473 0 : *vp = JSVAL_VOID;
22474 0 : return JS_TRUE;
22475 : }
22476 :
22477 : static JSBool
22478 0 : nsIDOMWebGLRenderingContext_BindTexture(JSContext *cx, unsigned argc, jsval *vp)
22479 : {
22480 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22481 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22482 0 : if (!obj)
22483 0 : return JS_FALSE;
22484 : nsIDOMWebGLRenderingContext *self;
22485 0 : xpc_qsSelfRef selfref;
22486 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22487 0 : return JS_FALSE;
22488 0 : if (argc < 2)
22489 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22490 0 : jsval *argv = JS_ARGV(cx, vp);
22491 : uint32_t arg0;
22492 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22493 0 : return JS_FALSE;
22494 : nsresult rv;
22495 : nsIWebGLTexture *arg1;
22496 0 : xpc_qsSelfRef arg1ref;
22497 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22498 0 : if (NS_FAILED(rv)) {
22499 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22500 0 : return JS_FALSE;
22501 : }
22502 0 : rv = self->BindTexture(arg0, arg1);
22503 0 : if (NS_FAILED(rv))
22504 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22505 0 : *vp = JSVAL_VOID;
22506 0 : return JS_TRUE;
22507 : }
22508 :
22509 : static JSBool
22510 0 : nsIDOMWebGLRenderingContext_BlendColor(JSContext *cx, unsigned argc, jsval *vp)
22511 : {
22512 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22513 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22514 0 : if (!obj)
22515 0 : return JS_FALSE;
22516 : nsIDOMWebGLRenderingContext *self;
22517 0 : xpc_qsSelfRef selfref;
22518 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22519 0 : return JS_FALSE;
22520 0 : if (argc < 4)
22521 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22522 0 : jsval *argv = JS_ARGV(cx, vp);
22523 : double arg0_dbl;
22524 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
22525 0 : return JS_FALSE;
22526 0 : float arg0 = (float) arg0_dbl;
22527 : double arg1_dbl;
22528 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
22529 0 : return JS_FALSE;
22530 0 : float arg1 = (float) arg1_dbl;
22531 : double arg2_dbl;
22532 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
22533 0 : return JS_FALSE;
22534 0 : float arg2 = (float) arg2_dbl;
22535 : double arg3_dbl;
22536 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
22537 0 : return JS_FALSE;
22538 0 : float arg3 = (float) arg3_dbl;
22539 : nsresult rv;
22540 0 : rv = self->BlendColor(arg0, arg1, arg2, arg3);
22541 0 : if (NS_FAILED(rv))
22542 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22543 0 : *vp = JSVAL_VOID;
22544 0 : return JS_TRUE;
22545 : }
22546 :
22547 : static JSBool
22548 0 : nsIDOMWebGLRenderingContext_BlendEquation(JSContext *cx, unsigned argc, jsval *vp)
22549 : {
22550 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22551 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22552 0 : if (!obj)
22553 0 : return JS_FALSE;
22554 : nsIDOMWebGLRenderingContext *self;
22555 0 : xpc_qsSelfRef selfref;
22556 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22557 0 : return JS_FALSE;
22558 0 : if (argc < 1)
22559 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22560 0 : jsval *argv = JS_ARGV(cx, vp);
22561 : uint32_t arg0;
22562 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22563 0 : return JS_FALSE;
22564 : nsresult rv;
22565 0 : rv = self->BlendEquation(arg0);
22566 0 : if (NS_FAILED(rv))
22567 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22568 0 : *vp = JSVAL_VOID;
22569 0 : return JS_TRUE;
22570 : }
22571 :
22572 : static JSBool
22573 0 : nsIDOMWebGLRenderingContext_BlendEquationSeparate(JSContext *cx, unsigned argc, jsval *vp)
22574 : {
22575 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22576 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22577 0 : if (!obj)
22578 0 : return JS_FALSE;
22579 : nsIDOMWebGLRenderingContext *self;
22580 0 : xpc_qsSelfRef selfref;
22581 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22582 0 : return JS_FALSE;
22583 0 : if (argc < 2)
22584 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22585 0 : jsval *argv = JS_ARGV(cx, vp);
22586 : uint32_t arg0;
22587 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22588 0 : return JS_FALSE;
22589 : uint32_t arg1;
22590 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22591 0 : return JS_FALSE;
22592 : nsresult rv;
22593 0 : rv = self->BlendEquationSeparate(arg0, arg1);
22594 0 : if (NS_FAILED(rv))
22595 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22596 0 : *vp = JSVAL_VOID;
22597 0 : return JS_TRUE;
22598 : }
22599 :
22600 : static JSBool
22601 0 : nsIDOMWebGLRenderingContext_BlendFunc(JSContext *cx, unsigned argc, jsval *vp)
22602 : {
22603 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22604 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22605 0 : if (!obj)
22606 0 : return JS_FALSE;
22607 : nsIDOMWebGLRenderingContext *self;
22608 0 : xpc_qsSelfRef selfref;
22609 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22610 0 : return JS_FALSE;
22611 0 : if (argc < 2)
22612 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22613 0 : jsval *argv = JS_ARGV(cx, vp);
22614 : uint32_t arg0;
22615 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22616 0 : return JS_FALSE;
22617 : uint32_t arg1;
22618 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22619 0 : return JS_FALSE;
22620 : nsresult rv;
22621 0 : rv = self->BlendFunc(arg0, arg1);
22622 0 : if (NS_FAILED(rv))
22623 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22624 0 : *vp = JSVAL_VOID;
22625 0 : return JS_TRUE;
22626 : }
22627 :
22628 : static JSBool
22629 0 : nsIDOMWebGLRenderingContext_BlendFuncSeparate(JSContext *cx, unsigned argc, jsval *vp)
22630 : {
22631 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22632 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22633 0 : if (!obj)
22634 0 : return JS_FALSE;
22635 : nsIDOMWebGLRenderingContext *self;
22636 0 : xpc_qsSelfRef selfref;
22637 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22638 0 : return JS_FALSE;
22639 0 : if (argc < 4)
22640 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22641 0 : jsval *argv = JS_ARGV(cx, vp);
22642 : uint32_t arg0;
22643 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22644 0 : return JS_FALSE;
22645 : uint32_t arg1;
22646 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22647 0 : return JS_FALSE;
22648 : uint32_t arg2;
22649 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
22650 0 : return JS_FALSE;
22651 : uint32_t arg3;
22652 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3))
22653 0 : return JS_FALSE;
22654 : nsresult rv;
22655 0 : rv = self->BlendFuncSeparate(arg0, arg1, arg2, arg3);
22656 0 : if (NS_FAILED(rv))
22657 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22658 0 : *vp = JSVAL_VOID;
22659 0 : return JS_TRUE;
22660 : }
22661 :
22662 : static JSBool
22663 0 : nsIDOMWebGLRenderingContext_CheckFramebufferStatus(JSContext *cx, unsigned argc, jsval *vp)
22664 : {
22665 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22666 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22667 0 : if (!obj)
22668 0 : return JS_FALSE;
22669 : nsIDOMWebGLRenderingContext *self;
22670 0 : xpc_qsSelfRef selfref;
22671 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22672 0 : return JS_FALSE;
22673 0 : if (argc < 1)
22674 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22675 0 : jsval *argv = JS_ARGV(cx, vp);
22676 : uint32_t arg0;
22677 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22678 0 : return JS_FALSE;
22679 : nsresult rv;
22680 : WebGLenum result;
22681 0 : rv = self->CheckFramebufferStatus(arg0, &result);
22682 0 : if (NS_FAILED(rv))
22683 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22684 0 : *vp = UINT_TO_JSVAL(result);
22685 0 : return JS_TRUE;
22686 : }
22687 :
22688 : static JSBool
22689 0 : nsIDOMWebGLRenderingContext_Clear(JSContext *cx, unsigned argc, jsval *vp)
22690 : {
22691 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22692 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22693 0 : if (!obj)
22694 0 : return JS_FALSE;
22695 : nsIDOMWebGLRenderingContext *self;
22696 0 : xpc_qsSelfRef selfref;
22697 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22698 0 : return JS_FALSE;
22699 0 : if (argc < 1)
22700 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22701 0 : jsval *argv = JS_ARGV(cx, vp);
22702 : uint32_t arg0;
22703 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22704 0 : return JS_FALSE;
22705 : nsresult rv;
22706 0 : rv = self->Clear(arg0);
22707 0 : if (NS_FAILED(rv))
22708 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22709 0 : *vp = JSVAL_VOID;
22710 0 : return JS_TRUE;
22711 : }
22712 :
22713 : static JSBool
22714 0 : nsIDOMWebGLRenderingContext_ClearColor(JSContext *cx, unsigned argc, jsval *vp)
22715 : {
22716 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22717 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22718 0 : if (!obj)
22719 0 : return JS_FALSE;
22720 : nsIDOMWebGLRenderingContext *self;
22721 0 : xpc_qsSelfRef selfref;
22722 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22723 0 : return JS_FALSE;
22724 0 : if (argc < 4)
22725 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22726 0 : jsval *argv = JS_ARGV(cx, vp);
22727 : double arg0_dbl;
22728 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
22729 0 : return JS_FALSE;
22730 0 : float arg0 = (float) arg0_dbl;
22731 : double arg1_dbl;
22732 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
22733 0 : return JS_FALSE;
22734 0 : float arg1 = (float) arg1_dbl;
22735 : double arg2_dbl;
22736 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
22737 0 : return JS_FALSE;
22738 0 : float arg2 = (float) arg2_dbl;
22739 : double arg3_dbl;
22740 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
22741 0 : return JS_FALSE;
22742 0 : float arg3 = (float) arg3_dbl;
22743 : nsresult rv;
22744 0 : rv = self->ClearColor(arg0, arg1, arg2, arg3);
22745 0 : if (NS_FAILED(rv))
22746 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22747 0 : *vp = JSVAL_VOID;
22748 0 : return JS_TRUE;
22749 : }
22750 :
22751 : static JSBool
22752 0 : nsIDOMWebGLRenderingContext_ClearDepth(JSContext *cx, unsigned argc, jsval *vp)
22753 : {
22754 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22755 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22756 0 : if (!obj)
22757 0 : return JS_FALSE;
22758 : nsIDOMWebGLRenderingContext *self;
22759 0 : xpc_qsSelfRef selfref;
22760 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22761 0 : return JS_FALSE;
22762 0 : if (argc < 1)
22763 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22764 0 : jsval *argv = JS_ARGV(cx, vp);
22765 : double arg0_dbl;
22766 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
22767 0 : return JS_FALSE;
22768 0 : float arg0 = (float) arg0_dbl;
22769 : nsresult rv;
22770 0 : rv = self->ClearDepth(arg0);
22771 0 : if (NS_FAILED(rv))
22772 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22773 0 : *vp = JSVAL_VOID;
22774 0 : return JS_TRUE;
22775 : }
22776 :
22777 : static JSBool
22778 0 : nsIDOMWebGLRenderingContext_ClearStencil(JSContext *cx, unsigned argc, jsval *vp)
22779 : {
22780 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22781 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22782 0 : if (!obj)
22783 0 : return JS_FALSE;
22784 : nsIDOMWebGLRenderingContext *self;
22785 0 : xpc_qsSelfRef selfref;
22786 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22787 0 : return JS_FALSE;
22788 0 : if (argc < 1)
22789 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22790 0 : jsval *argv = JS_ARGV(cx, vp);
22791 : int32_t arg0;
22792 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
22793 0 : return JS_FALSE;
22794 : nsresult rv;
22795 0 : rv = self->ClearStencil(arg0);
22796 0 : if (NS_FAILED(rv))
22797 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22798 0 : *vp = JSVAL_VOID;
22799 0 : return JS_TRUE;
22800 : }
22801 :
22802 : static JSBool
22803 0 : nsIDOMWebGLRenderingContext_ColorMask(JSContext *cx, unsigned argc, jsval *vp)
22804 : {
22805 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22806 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22807 0 : if (!obj)
22808 0 : return JS_FALSE;
22809 : nsIDOMWebGLRenderingContext *self;
22810 0 : xpc_qsSelfRef selfref;
22811 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22812 0 : return JS_FALSE;
22813 0 : if (argc < 4)
22814 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22815 0 : jsval *argv = JS_ARGV(cx, vp);
22816 : JSBool arg0;
22817 0 : JS_ValueToBoolean(cx, argv[0], &arg0);
22818 : JSBool arg1;
22819 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
22820 : JSBool arg2;
22821 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
22822 : JSBool arg3;
22823 0 : JS_ValueToBoolean(cx, argv[3], &arg3);
22824 : nsresult rv;
22825 0 : rv = self->ColorMask(arg0, arg1, arg2, arg3);
22826 0 : if (NS_FAILED(rv))
22827 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22828 0 : *vp = JSVAL_VOID;
22829 0 : return JS_TRUE;
22830 : }
22831 :
22832 : static JSBool
22833 0 : nsIDOMWebGLRenderingContext_CompileShader(JSContext *cx, unsigned argc, jsval *vp)
22834 : {
22835 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22836 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22837 0 : if (!obj)
22838 0 : return JS_FALSE;
22839 : nsIDOMWebGLRenderingContext *self;
22840 0 : xpc_qsSelfRef selfref;
22841 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22842 0 : return JS_FALSE;
22843 0 : jsval *argv = JS_ARGV(cx, vp);
22844 : nsresult rv;
22845 : nsIWebGLShader *arg0;
22846 0 : xpc_qsSelfRef arg0ref;
22847 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
22848 0 : if (NS_FAILED(rv)) {
22849 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
22850 0 : return JS_FALSE;
22851 : }
22852 0 : rv = self->CompileShader(arg0);
22853 0 : if (NS_FAILED(rv))
22854 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22855 0 : *vp = JSVAL_VOID;
22856 0 : return JS_TRUE;
22857 : }
22858 :
22859 : static JSBool
22860 0 : nsIDOMWebGLRenderingContext_CopyTexImage2D(JSContext *cx, unsigned argc, jsval *vp)
22861 : {
22862 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22863 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22864 0 : if (!obj)
22865 0 : return JS_FALSE;
22866 : nsIDOMWebGLRenderingContext *self;
22867 0 : xpc_qsSelfRef selfref;
22868 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22869 0 : return JS_FALSE;
22870 0 : if (argc < 8)
22871 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22872 0 : jsval *argv = JS_ARGV(cx, vp);
22873 : uint32_t arg0;
22874 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22875 0 : return JS_FALSE;
22876 : int32_t arg1;
22877 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
22878 0 : return JS_FALSE;
22879 : uint32_t arg2;
22880 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
22881 0 : return JS_FALSE;
22882 : int32_t arg3;
22883 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
22884 0 : return JS_FALSE;
22885 : int32_t arg4;
22886 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
22887 0 : return JS_FALSE;
22888 : int32_t arg5;
22889 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
22890 0 : return JS_FALSE;
22891 : int32_t arg6;
22892 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
22893 0 : return JS_FALSE;
22894 : int32_t arg7;
22895 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
22896 0 : return JS_FALSE;
22897 : nsresult rv;
22898 0 : rv = self->CopyTexImage2D(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
22899 0 : if (NS_FAILED(rv))
22900 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22901 0 : *vp = JSVAL_VOID;
22902 0 : return JS_TRUE;
22903 : }
22904 :
22905 : static JSBool
22906 0 : nsIDOMWebGLRenderingContext_CopyTexSubImage2D(JSContext *cx, unsigned argc, jsval *vp)
22907 : {
22908 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22909 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22910 0 : if (!obj)
22911 0 : return JS_FALSE;
22912 : nsIDOMWebGLRenderingContext *self;
22913 0 : xpc_qsSelfRef selfref;
22914 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22915 0 : return JS_FALSE;
22916 0 : if (argc < 8)
22917 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22918 0 : jsval *argv = JS_ARGV(cx, vp);
22919 : uint32_t arg0;
22920 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22921 0 : return JS_FALSE;
22922 : int32_t arg1;
22923 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
22924 0 : return JS_FALSE;
22925 : int32_t arg2;
22926 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
22927 0 : return JS_FALSE;
22928 : int32_t arg3;
22929 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
22930 0 : return JS_FALSE;
22931 : int32_t arg4;
22932 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
22933 0 : return JS_FALSE;
22934 : int32_t arg5;
22935 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
22936 0 : return JS_FALSE;
22937 : int32_t arg6;
22938 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
22939 0 : return JS_FALSE;
22940 : int32_t arg7;
22941 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
22942 0 : return JS_FALSE;
22943 : nsresult rv;
22944 0 : rv = self->CopyTexSubImage2D(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
22945 0 : if (NS_FAILED(rv))
22946 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22947 0 : *vp = JSVAL_VOID;
22948 0 : return JS_TRUE;
22949 : }
22950 :
22951 : static JSBool
22952 0 : nsIDOMWebGLRenderingContext_CreateBuffer(JSContext *cx, unsigned argc, jsval *vp)
22953 : {
22954 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22955 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22956 0 : if (!obj)
22957 0 : return JS_FALSE;
22958 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
22959 : nsIDOMWebGLRenderingContext *self;
22960 0 : xpc_qsSelfRef selfref;
22961 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22962 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
22963 0 : return JS_FALSE;
22964 : nsresult rv;
22965 0 : nsCOMPtr<nsIWebGLBuffer> result;
22966 0 : rv = self->CreateBuffer(getter_AddRefs(result));
22967 0 : if (NS_FAILED(rv))
22968 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22969 0 : if (!result) {
22970 0 : *vp = JSVAL_NULL;
22971 0 : return JS_TRUE;
22972 : }
22973 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22974 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22975 0 : return JS_TRUE;
22976 : }
22977 : // After this point do not use 'result'!
22978 0 : qsObjectHelper helper(result, cache);
22979 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLBuffer), &interfaces[k_nsIWebGLBuffer], vp);
22980 : }
22981 :
22982 : static JSBool
22983 0 : nsIDOMWebGLRenderingContext_CreateProgram(JSContext *cx, unsigned argc, jsval *vp)
22984 : {
22985 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22986 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22987 0 : if (!obj)
22988 0 : return JS_FALSE;
22989 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
22990 : nsIDOMWebGLRenderingContext *self;
22991 0 : xpc_qsSelfRef selfref;
22992 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22993 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
22994 0 : return JS_FALSE;
22995 : nsresult rv;
22996 0 : nsCOMPtr<nsIWebGLProgram> result;
22997 0 : rv = self->CreateProgram(getter_AddRefs(result));
22998 0 : if (NS_FAILED(rv))
22999 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23000 0 : if (!result) {
23001 0 : *vp = JSVAL_NULL;
23002 0 : return JS_TRUE;
23003 : }
23004 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23005 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23006 0 : return JS_TRUE;
23007 : }
23008 : // After this point do not use 'result'!
23009 0 : qsObjectHelper helper(result, cache);
23010 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLProgram), &interfaces[k_nsIWebGLProgram], vp);
23011 : }
23012 :
23013 : static JSBool
23014 0 : nsIDOMWebGLRenderingContext_CreateFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
23015 : {
23016 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23017 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23018 0 : if (!obj)
23019 0 : return JS_FALSE;
23020 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23021 : nsIDOMWebGLRenderingContext *self;
23022 0 : xpc_qsSelfRef selfref;
23023 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23024 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23025 0 : return JS_FALSE;
23026 : nsresult rv;
23027 0 : nsCOMPtr<nsIWebGLFramebuffer> result;
23028 0 : rv = self->CreateFramebuffer(getter_AddRefs(result));
23029 0 : if (NS_FAILED(rv))
23030 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23031 0 : if (!result) {
23032 0 : *vp = JSVAL_NULL;
23033 0 : return JS_TRUE;
23034 : }
23035 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23036 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23037 0 : return JS_TRUE;
23038 : }
23039 : // After this point do not use 'result'!
23040 0 : qsObjectHelper helper(result, cache);
23041 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLFramebuffer), &interfaces[k_nsIWebGLFramebuffer], vp);
23042 : }
23043 :
23044 : static JSBool
23045 0 : nsIDOMWebGLRenderingContext_CreateRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
23046 : {
23047 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23048 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23049 0 : if (!obj)
23050 0 : return JS_FALSE;
23051 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23052 : nsIDOMWebGLRenderingContext *self;
23053 0 : xpc_qsSelfRef selfref;
23054 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23055 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23056 0 : return JS_FALSE;
23057 : nsresult rv;
23058 0 : nsCOMPtr<nsIWebGLRenderbuffer> result;
23059 0 : rv = self->CreateRenderbuffer(getter_AddRefs(result));
23060 0 : if (NS_FAILED(rv))
23061 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23062 0 : if (!result) {
23063 0 : *vp = JSVAL_NULL;
23064 0 : return JS_TRUE;
23065 : }
23066 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23067 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23068 0 : return JS_TRUE;
23069 : }
23070 : // After this point do not use 'result'!
23071 0 : qsObjectHelper helper(result, cache);
23072 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLRenderbuffer), &interfaces[k_nsIWebGLRenderbuffer], vp);
23073 : }
23074 :
23075 : static JSBool
23076 0 : nsIDOMWebGLRenderingContext_CreateShader(JSContext *cx, unsigned argc, jsval *vp)
23077 : {
23078 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23079 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23080 0 : if (!obj)
23081 0 : return JS_FALSE;
23082 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23083 : nsIDOMWebGLRenderingContext *self;
23084 0 : xpc_qsSelfRef selfref;
23085 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23086 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23087 0 : return JS_FALSE;
23088 0 : if (argc < 1)
23089 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23090 0 : jsval *argv = JS_ARGV(cx, vp);
23091 : uint32_t arg0;
23092 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23093 0 : return JS_FALSE;
23094 : nsresult rv;
23095 0 : nsCOMPtr<nsIWebGLShader> result;
23096 0 : rv = self->CreateShader(arg0, getter_AddRefs(result));
23097 0 : if (NS_FAILED(rv))
23098 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23099 0 : if (!result) {
23100 0 : *vp = JSVAL_NULL;
23101 0 : return JS_TRUE;
23102 : }
23103 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23104 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23105 0 : return JS_TRUE;
23106 : }
23107 : // After this point do not use 'result'!
23108 0 : qsObjectHelper helper(result, cache);
23109 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLShader), &interfaces[k_nsIWebGLShader], vp);
23110 : }
23111 :
23112 : static JSBool
23113 0 : nsIDOMWebGLRenderingContext_CreateTexture(JSContext *cx, unsigned argc, jsval *vp)
23114 : {
23115 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23116 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23117 0 : if (!obj)
23118 0 : return JS_FALSE;
23119 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23120 : nsIDOMWebGLRenderingContext *self;
23121 0 : xpc_qsSelfRef selfref;
23122 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23123 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23124 0 : return JS_FALSE;
23125 : nsresult rv;
23126 0 : nsCOMPtr<nsIWebGLTexture> result;
23127 0 : rv = self->CreateTexture(getter_AddRefs(result));
23128 0 : if (NS_FAILED(rv))
23129 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23130 0 : if (!result) {
23131 0 : *vp = JSVAL_NULL;
23132 0 : return JS_TRUE;
23133 : }
23134 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23135 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23136 0 : return JS_TRUE;
23137 : }
23138 : // After this point do not use 'result'!
23139 0 : qsObjectHelper helper(result, cache);
23140 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLTexture), &interfaces[k_nsIWebGLTexture], vp);
23141 : }
23142 :
23143 : static JSBool
23144 0 : nsIDOMWebGLRenderingContext_CullFace(JSContext *cx, unsigned argc, jsval *vp)
23145 : {
23146 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23147 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23148 0 : if (!obj)
23149 0 : return JS_FALSE;
23150 : nsIDOMWebGLRenderingContext *self;
23151 0 : xpc_qsSelfRef selfref;
23152 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23153 0 : return JS_FALSE;
23154 0 : if (argc < 1)
23155 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23156 0 : jsval *argv = JS_ARGV(cx, vp);
23157 : uint32_t arg0;
23158 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23159 0 : return JS_FALSE;
23160 : nsresult rv;
23161 0 : rv = self->CullFace(arg0);
23162 0 : if (NS_FAILED(rv))
23163 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23164 0 : *vp = JSVAL_VOID;
23165 0 : return JS_TRUE;
23166 : }
23167 :
23168 : static JSBool
23169 0 : nsIDOMWebGLRenderingContext_DeleteBuffer(JSContext *cx, unsigned argc, jsval *vp)
23170 : {
23171 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23172 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23173 0 : if (!obj)
23174 0 : return JS_FALSE;
23175 : nsIDOMWebGLRenderingContext *self;
23176 0 : xpc_qsSelfRef selfref;
23177 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23178 0 : return JS_FALSE;
23179 0 : if (argc < 1)
23180 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23181 0 : jsval *argv = JS_ARGV(cx, vp);
23182 : nsresult rv;
23183 : nsIWebGLBuffer *arg0;
23184 0 : xpc_qsSelfRef arg0ref;
23185 0 : rv = xpc_qsUnwrapArg<nsIWebGLBuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23186 0 : if (NS_FAILED(rv)) {
23187 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23188 0 : return JS_FALSE;
23189 : }
23190 0 : rv = self->DeleteBuffer(arg0);
23191 0 : if (NS_FAILED(rv))
23192 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23193 0 : *vp = JSVAL_VOID;
23194 0 : return JS_TRUE;
23195 : }
23196 :
23197 : static JSBool
23198 0 : nsIDOMWebGLRenderingContext_DeleteProgram(JSContext *cx, unsigned argc, jsval *vp)
23199 : {
23200 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23201 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23202 0 : if (!obj)
23203 0 : return JS_FALSE;
23204 : nsIDOMWebGLRenderingContext *self;
23205 0 : xpc_qsSelfRef selfref;
23206 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23207 0 : return JS_FALSE;
23208 0 : if (argc < 1)
23209 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23210 0 : jsval *argv = JS_ARGV(cx, vp);
23211 : nsresult rv;
23212 : nsIWebGLProgram *arg0;
23213 0 : xpc_qsSelfRef arg0ref;
23214 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23215 0 : if (NS_FAILED(rv)) {
23216 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23217 0 : return JS_FALSE;
23218 : }
23219 0 : rv = self->DeleteProgram(arg0);
23220 0 : if (NS_FAILED(rv))
23221 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23222 0 : *vp = JSVAL_VOID;
23223 0 : return JS_TRUE;
23224 : }
23225 :
23226 : static JSBool
23227 0 : nsIDOMWebGLRenderingContext_DeleteFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
23228 : {
23229 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23230 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23231 0 : if (!obj)
23232 0 : return JS_FALSE;
23233 : nsIDOMWebGLRenderingContext *self;
23234 0 : xpc_qsSelfRef selfref;
23235 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23236 0 : return JS_FALSE;
23237 0 : if (argc < 1)
23238 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23239 0 : jsval *argv = JS_ARGV(cx, vp);
23240 : nsresult rv;
23241 : nsIWebGLFramebuffer *arg0;
23242 0 : xpc_qsSelfRef arg0ref;
23243 0 : rv = xpc_qsUnwrapArg<nsIWebGLFramebuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23244 0 : if (NS_FAILED(rv)) {
23245 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23246 0 : return JS_FALSE;
23247 : }
23248 0 : rv = self->DeleteFramebuffer(arg0);
23249 0 : if (NS_FAILED(rv))
23250 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23251 0 : *vp = JSVAL_VOID;
23252 0 : return JS_TRUE;
23253 : }
23254 :
23255 : static JSBool
23256 0 : nsIDOMWebGLRenderingContext_DeleteRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
23257 : {
23258 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23259 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23260 0 : if (!obj)
23261 0 : return JS_FALSE;
23262 : nsIDOMWebGLRenderingContext *self;
23263 0 : xpc_qsSelfRef selfref;
23264 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23265 0 : return JS_FALSE;
23266 0 : if (argc < 1)
23267 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23268 0 : jsval *argv = JS_ARGV(cx, vp);
23269 : nsresult rv;
23270 : nsIWebGLRenderbuffer *arg0;
23271 0 : xpc_qsSelfRef arg0ref;
23272 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23273 0 : if (NS_FAILED(rv)) {
23274 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23275 0 : return JS_FALSE;
23276 : }
23277 0 : rv = self->DeleteRenderbuffer(arg0);
23278 0 : if (NS_FAILED(rv))
23279 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23280 0 : *vp = JSVAL_VOID;
23281 0 : return JS_TRUE;
23282 : }
23283 :
23284 : static JSBool
23285 0 : nsIDOMWebGLRenderingContext_DeleteShader(JSContext *cx, unsigned argc, jsval *vp)
23286 : {
23287 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23288 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23289 0 : if (!obj)
23290 0 : return JS_FALSE;
23291 : nsIDOMWebGLRenderingContext *self;
23292 0 : xpc_qsSelfRef selfref;
23293 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23294 0 : return JS_FALSE;
23295 0 : if (argc < 1)
23296 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23297 0 : jsval *argv = JS_ARGV(cx, vp);
23298 : nsresult rv;
23299 : nsIWebGLShader *arg0;
23300 0 : xpc_qsSelfRef arg0ref;
23301 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23302 0 : if (NS_FAILED(rv)) {
23303 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23304 0 : return JS_FALSE;
23305 : }
23306 0 : rv = self->DeleteShader(arg0);
23307 0 : if (NS_FAILED(rv))
23308 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23309 0 : *vp = JSVAL_VOID;
23310 0 : return JS_TRUE;
23311 : }
23312 :
23313 : static JSBool
23314 0 : nsIDOMWebGLRenderingContext_DeleteTexture(JSContext *cx, unsigned argc, jsval *vp)
23315 : {
23316 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23317 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23318 0 : if (!obj)
23319 0 : return JS_FALSE;
23320 : nsIDOMWebGLRenderingContext *self;
23321 0 : xpc_qsSelfRef selfref;
23322 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23323 0 : return JS_FALSE;
23324 0 : if (argc < 1)
23325 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23326 0 : jsval *argv = JS_ARGV(cx, vp);
23327 : nsresult rv;
23328 : nsIWebGLTexture *arg0;
23329 0 : xpc_qsSelfRef arg0ref;
23330 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23331 0 : if (NS_FAILED(rv)) {
23332 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23333 0 : return JS_FALSE;
23334 : }
23335 0 : rv = self->DeleteTexture(arg0);
23336 0 : if (NS_FAILED(rv))
23337 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23338 0 : *vp = JSVAL_VOID;
23339 0 : return JS_TRUE;
23340 : }
23341 :
23342 : static JSBool
23343 0 : nsIDOMWebGLRenderingContext_DepthFunc(JSContext *cx, unsigned argc, jsval *vp)
23344 : {
23345 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23346 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23347 0 : if (!obj)
23348 0 : return JS_FALSE;
23349 : nsIDOMWebGLRenderingContext *self;
23350 0 : xpc_qsSelfRef selfref;
23351 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23352 0 : return JS_FALSE;
23353 0 : if (argc < 1)
23354 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23355 0 : jsval *argv = JS_ARGV(cx, vp);
23356 : uint32_t arg0;
23357 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23358 0 : return JS_FALSE;
23359 : nsresult rv;
23360 0 : rv = self->DepthFunc(arg0);
23361 0 : if (NS_FAILED(rv))
23362 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23363 0 : *vp = JSVAL_VOID;
23364 0 : return JS_TRUE;
23365 : }
23366 :
23367 : static JSBool
23368 0 : nsIDOMWebGLRenderingContext_DepthMask(JSContext *cx, unsigned argc, jsval *vp)
23369 : {
23370 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23371 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23372 0 : if (!obj)
23373 0 : return JS_FALSE;
23374 : nsIDOMWebGLRenderingContext *self;
23375 0 : xpc_qsSelfRef selfref;
23376 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23377 0 : return JS_FALSE;
23378 0 : if (argc < 1)
23379 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23380 0 : jsval *argv = JS_ARGV(cx, vp);
23381 : JSBool arg0;
23382 0 : JS_ValueToBoolean(cx, argv[0], &arg0);
23383 : nsresult rv;
23384 0 : rv = self->DepthMask(arg0);
23385 0 : if (NS_FAILED(rv))
23386 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23387 0 : *vp = JSVAL_VOID;
23388 0 : return JS_TRUE;
23389 : }
23390 :
23391 : static JSBool
23392 0 : nsIDOMWebGLRenderingContext_DepthRange(JSContext *cx, unsigned argc, jsval *vp)
23393 : {
23394 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23395 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23396 0 : if (!obj)
23397 0 : return JS_FALSE;
23398 : nsIDOMWebGLRenderingContext *self;
23399 0 : xpc_qsSelfRef selfref;
23400 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23401 0 : return JS_FALSE;
23402 0 : if (argc < 2)
23403 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23404 0 : jsval *argv = JS_ARGV(cx, vp);
23405 : double arg0_dbl;
23406 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
23407 0 : return JS_FALSE;
23408 0 : float arg0 = (float) arg0_dbl;
23409 : double arg1_dbl;
23410 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
23411 0 : return JS_FALSE;
23412 0 : float arg1 = (float) arg1_dbl;
23413 : nsresult rv;
23414 0 : rv = self->DepthRange(arg0, arg1);
23415 0 : if (NS_FAILED(rv))
23416 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23417 0 : *vp = JSVAL_VOID;
23418 0 : return JS_TRUE;
23419 : }
23420 :
23421 : static JSBool
23422 0 : nsIDOMWebGLRenderingContext_DetachShader(JSContext *cx, unsigned argc, jsval *vp)
23423 : {
23424 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23425 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23426 0 : if (!obj)
23427 0 : return JS_FALSE;
23428 : nsIDOMWebGLRenderingContext *self;
23429 0 : xpc_qsSelfRef selfref;
23430 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23431 0 : return JS_FALSE;
23432 0 : if (argc < 2)
23433 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23434 0 : jsval *argv = JS_ARGV(cx, vp);
23435 : nsresult rv;
23436 : nsIWebGLProgram *arg0;
23437 0 : xpc_qsSelfRef arg0ref;
23438 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23439 0 : if (NS_FAILED(rv)) {
23440 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23441 0 : return JS_FALSE;
23442 : }
23443 : nsIWebGLShader *arg1;
23444 0 : xpc_qsSelfRef arg1ref;
23445 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
23446 0 : if (NS_FAILED(rv)) {
23447 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
23448 0 : return JS_FALSE;
23449 : }
23450 0 : rv = self->DetachShader(arg0, arg1);
23451 0 : if (NS_FAILED(rv))
23452 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23453 0 : *vp = JSVAL_VOID;
23454 0 : return JS_TRUE;
23455 : }
23456 :
23457 : static JSBool
23458 0 : nsIDOMWebGLRenderingContext_Disable(JSContext *cx, unsigned argc, jsval *vp)
23459 : {
23460 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23461 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23462 0 : if (!obj)
23463 0 : return JS_FALSE;
23464 : nsIDOMWebGLRenderingContext *self;
23465 0 : xpc_qsSelfRef selfref;
23466 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23467 0 : return JS_FALSE;
23468 0 : if (argc < 1)
23469 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23470 0 : jsval *argv = JS_ARGV(cx, vp);
23471 : uint32_t arg0;
23472 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23473 0 : return JS_FALSE;
23474 : nsresult rv;
23475 0 : rv = self->Disable(arg0);
23476 0 : if (NS_FAILED(rv))
23477 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23478 0 : *vp = JSVAL_VOID;
23479 0 : return JS_TRUE;
23480 : }
23481 :
23482 : static JSBool
23483 0 : nsIDOMWebGLRenderingContext_DisableVertexAttribArray(JSContext *cx, unsigned argc, jsval *vp)
23484 : {
23485 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23486 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23487 0 : if (!obj)
23488 0 : return JS_FALSE;
23489 : nsIDOMWebGLRenderingContext *self;
23490 0 : xpc_qsSelfRef selfref;
23491 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23492 0 : return JS_FALSE;
23493 0 : if (argc < 1)
23494 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23495 0 : jsval *argv = JS_ARGV(cx, vp);
23496 : uint32_t arg0;
23497 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23498 0 : return JS_FALSE;
23499 : nsresult rv;
23500 0 : rv = self->DisableVertexAttribArray(arg0);
23501 0 : if (NS_FAILED(rv))
23502 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23503 0 : *vp = JSVAL_VOID;
23504 0 : return JS_TRUE;
23505 : }
23506 :
23507 : static JSBool
23508 0 : nsIDOMWebGLRenderingContext_DrawArrays(JSContext *cx, unsigned argc, jsval *vp)
23509 : {
23510 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23511 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23512 0 : if (!obj)
23513 0 : return JS_FALSE;
23514 : nsIDOMWebGLRenderingContext *self;
23515 0 : xpc_qsSelfRef selfref;
23516 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23517 0 : return JS_FALSE;
23518 0 : if (argc < 3)
23519 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23520 0 : jsval *argv = JS_ARGV(cx, vp);
23521 : uint32_t arg0;
23522 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23523 0 : return JS_FALSE;
23524 : int32_t arg1;
23525 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
23526 0 : return JS_FALSE;
23527 : int32_t arg2;
23528 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
23529 0 : return JS_FALSE;
23530 : nsresult rv;
23531 0 : rv = self->DrawArrays(arg0, arg1, arg2);
23532 0 : if (NS_FAILED(rv))
23533 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23534 0 : *vp = JSVAL_VOID;
23535 0 : return JS_TRUE;
23536 : }
23537 :
23538 : static JSBool
23539 0 : nsIDOMWebGLRenderingContext_DrawElements(JSContext *cx, unsigned argc, jsval *vp)
23540 : {
23541 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23542 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23543 0 : if (!obj)
23544 0 : return JS_FALSE;
23545 : nsIDOMWebGLRenderingContext *self;
23546 0 : xpc_qsSelfRef selfref;
23547 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23548 0 : return JS_FALSE;
23549 0 : if (argc < 4)
23550 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23551 0 : jsval *argv = JS_ARGV(cx, vp);
23552 : uint32_t arg0;
23553 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23554 0 : return JS_FALSE;
23555 : int32_t arg1;
23556 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
23557 0 : return JS_FALSE;
23558 : uint32_t arg2;
23559 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
23560 0 : return JS_FALSE;
23561 : int32_t arg3;
23562 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
23563 0 : return JS_FALSE;
23564 : nsresult rv;
23565 0 : rv = self->DrawElements(arg0, arg1, arg2, arg3);
23566 0 : if (NS_FAILED(rv))
23567 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23568 0 : *vp = JSVAL_VOID;
23569 0 : return JS_TRUE;
23570 : }
23571 :
23572 : static JSBool
23573 0 : nsIDOMWebGLRenderingContext_Enable(JSContext *cx, unsigned argc, jsval *vp)
23574 : {
23575 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23576 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23577 0 : if (!obj)
23578 0 : return JS_FALSE;
23579 : nsIDOMWebGLRenderingContext *self;
23580 0 : xpc_qsSelfRef selfref;
23581 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23582 0 : return JS_FALSE;
23583 0 : if (argc < 1)
23584 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23585 0 : jsval *argv = JS_ARGV(cx, vp);
23586 : uint32_t arg0;
23587 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23588 0 : return JS_FALSE;
23589 : nsresult rv;
23590 0 : rv = self->Enable(arg0);
23591 0 : if (NS_FAILED(rv))
23592 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23593 0 : *vp = JSVAL_VOID;
23594 0 : return JS_TRUE;
23595 : }
23596 :
23597 : static JSBool
23598 0 : nsIDOMWebGLRenderingContext_EnableVertexAttribArray(JSContext *cx, unsigned argc, jsval *vp)
23599 : {
23600 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23601 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23602 0 : if (!obj)
23603 0 : return JS_FALSE;
23604 : nsIDOMWebGLRenderingContext *self;
23605 0 : xpc_qsSelfRef selfref;
23606 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23607 0 : return JS_FALSE;
23608 0 : if (argc < 1)
23609 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23610 0 : jsval *argv = JS_ARGV(cx, vp);
23611 : uint32_t arg0;
23612 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23613 0 : return JS_FALSE;
23614 : nsresult rv;
23615 0 : rv = self->EnableVertexAttribArray(arg0);
23616 0 : if (NS_FAILED(rv))
23617 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23618 0 : *vp = JSVAL_VOID;
23619 0 : return JS_TRUE;
23620 : }
23621 :
23622 : static JSBool
23623 0 : nsIDOMWebGLRenderingContext_Finish(JSContext *cx, unsigned argc, jsval *vp)
23624 : {
23625 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23626 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23627 0 : if (!obj)
23628 0 : return JS_FALSE;
23629 : nsIDOMWebGLRenderingContext *self;
23630 0 : xpc_qsSelfRef selfref;
23631 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23632 0 : return JS_FALSE;
23633 : nsresult rv;
23634 0 : rv = self->Finish();
23635 0 : if (NS_FAILED(rv))
23636 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23637 0 : *vp = JSVAL_VOID;
23638 0 : return JS_TRUE;
23639 : }
23640 :
23641 : static JSBool
23642 0 : nsIDOMWebGLRenderingContext_Flush(JSContext *cx, unsigned argc, jsval *vp)
23643 : {
23644 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23645 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23646 0 : if (!obj)
23647 0 : return JS_FALSE;
23648 : nsIDOMWebGLRenderingContext *self;
23649 0 : xpc_qsSelfRef selfref;
23650 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23651 0 : return JS_FALSE;
23652 : nsresult rv;
23653 0 : rv = self->Flush();
23654 0 : if (NS_FAILED(rv))
23655 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23656 0 : *vp = JSVAL_VOID;
23657 0 : return JS_TRUE;
23658 : }
23659 :
23660 : static JSBool
23661 0 : nsIDOMWebGLRenderingContext_FramebufferRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
23662 : {
23663 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23664 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23665 0 : if (!obj)
23666 0 : return JS_FALSE;
23667 : nsIDOMWebGLRenderingContext *self;
23668 0 : xpc_qsSelfRef selfref;
23669 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23670 0 : return JS_FALSE;
23671 0 : if (argc < 4)
23672 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23673 0 : jsval *argv = JS_ARGV(cx, vp);
23674 : uint32_t arg0;
23675 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23676 0 : return JS_FALSE;
23677 : uint32_t arg1;
23678 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23679 0 : return JS_FALSE;
23680 : uint32_t arg2;
23681 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
23682 0 : return JS_FALSE;
23683 : nsresult rv;
23684 : nsIWebGLRenderbuffer *arg3;
23685 0 : xpc_qsSelfRef arg3ref;
23686 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
23687 0 : if (NS_FAILED(rv)) {
23688 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
23689 0 : return JS_FALSE;
23690 : }
23691 0 : rv = self->FramebufferRenderbuffer(arg0, arg1, arg2, arg3);
23692 0 : if (NS_FAILED(rv))
23693 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23694 0 : *vp = JSVAL_VOID;
23695 0 : return JS_TRUE;
23696 : }
23697 :
23698 : static JSBool
23699 0 : nsIDOMWebGLRenderingContext_FramebufferTexture2D(JSContext *cx, unsigned argc, jsval *vp)
23700 : {
23701 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23702 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23703 0 : if (!obj)
23704 0 : return JS_FALSE;
23705 : nsIDOMWebGLRenderingContext *self;
23706 0 : xpc_qsSelfRef selfref;
23707 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23708 0 : return JS_FALSE;
23709 0 : if (argc < 5)
23710 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23711 0 : jsval *argv = JS_ARGV(cx, vp);
23712 : uint32_t arg0;
23713 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23714 0 : return JS_FALSE;
23715 : uint32_t arg1;
23716 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23717 0 : return JS_FALSE;
23718 : uint32_t arg2;
23719 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
23720 0 : return JS_FALSE;
23721 : nsresult rv;
23722 : nsIWebGLTexture *arg3;
23723 0 : xpc_qsSelfRef arg3ref;
23724 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
23725 0 : if (NS_FAILED(rv)) {
23726 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
23727 0 : return JS_FALSE;
23728 : }
23729 : int32_t arg4;
23730 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
23731 0 : return JS_FALSE;
23732 0 : rv = self->FramebufferTexture2D(arg0, arg1, arg2, arg3, arg4);
23733 0 : if (NS_FAILED(rv))
23734 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23735 0 : *vp = JSVAL_VOID;
23736 0 : return JS_TRUE;
23737 : }
23738 :
23739 : static JSBool
23740 0 : nsIDOMWebGLRenderingContext_FrontFace(JSContext *cx, unsigned argc, jsval *vp)
23741 : {
23742 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23743 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23744 0 : if (!obj)
23745 0 : return JS_FALSE;
23746 : nsIDOMWebGLRenderingContext *self;
23747 0 : xpc_qsSelfRef selfref;
23748 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23749 0 : return JS_FALSE;
23750 0 : if (argc < 1)
23751 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23752 0 : jsval *argv = JS_ARGV(cx, vp);
23753 : uint32_t arg0;
23754 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23755 0 : return JS_FALSE;
23756 : nsresult rv;
23757 0 : rv = self->FrontFace(arg0);
23758 0 : if (NS_FAILED(rv))
23759 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23760 0 : *vp = JSVAL_VOID;
23761 0 : return JS_TRUE;
23762 : }
23763 :
23764 : static JSBool
23765 0 : nsIDOMWebGLRenderingContext_GenerateMipmap(JSContext *cx, unsigned argc, jsval *vp)
23766 : {
23767 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23768 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23769 0 : if (!obj)
23770 0 : return JS_FALSE;
23771 : nsIDOMWebGLRenderingContext *self;
23772 0 : xpc_qsSelfRef selfref;
23773 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23774 0 : return JS_FALSE;
23775 0 : if (argc < 1)
23776 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23777 0 : jsval *argv = JS_ARGV(cx, vp);
23778 : uint32_t arg0;
23779 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23780 0 : return JS_FALSE;
23781 : nsresult rv;
23782 0 : rv = self->GenerateMipmap(arg0);
23783 0 : if (NS_FAILED(rv))
23784 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23785 0 : *vp = JSVAL_VOID;
23786 0 : return JS_TRUE;
23787 : }
23788 :
23789 : static JSBool
23790 0 : nsIDOMWebGLRenderingContext_GetActiveAttrib(JSContext *cx, unsigned argc, jsval *vp)
23791 : {
23792 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23793 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23794 0 : if (!obj)
23795 0 : return JS_FALSE;
23796 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23797 : nsIDOMWebGLRenderingContext *self;
23798 0 : xpc_qsSelfRef selfref;
23799 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23800 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23801 0 : return JS_FALSE;
23802 0 : if (argc < 2)
23803 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23804 0 : jsval *argv = JS_ARGV(cx, vp);
23805 : nsresult rv;
23806 : nsIWebGLProgram *arg0;
23807 0 : xpc_qsSelfRef arg0ref;
23808 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23809 0 : if (NS_FAILED(rv)) {
23810 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23811 0 : return JS_FALSE;
23812 : }
23813 : uint32_t arg1;
23814 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23815 0 : return JS_FALSE;
23816 0 : nsCOMPtr<nsIWebGLActiveInfo> result;
23817 0 : rv = self->GetActiveAttrib(arg0, arg1, getter_AddRefs(result));
23818 0 : if (NS_FAILED(rv))
23819 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23820 0 : if (!result) {
23821 0 : *vp = JSVAL_NULL;
23822 0 : return JS_TRUE;
23823 : }
23824 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23825 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23826 0 : return JS_TRUE;
23827 : }
23828 : // After this point do not use 'result'!
23829 0 : qsObjectHelper helper(result, cache);
23830 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLActiveInfo), &interfaces[k_nsIWebGLActiveInfo], vp);
23831 : }
23832 :
23833 : static JSBool
23834 0 : nsIDOMWebGLRenderingContext_GetActiveUniform(JSContext *cx, unsigned argc, jsval *vp)
23835 : {
23836 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23837 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23838 0 : if (!obj)
23839 0 : return JS_FALSE;
23840 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23841 : nsIDOMWebGLRenderingContext *self;
23842 0 : xpc_qsSelfRef selfref;
23843 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23844 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23845 0 : return JS_FALSE;
23846 0 : if (argc < 2)
23847 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23848 0 : jsval *argv = JS_ARGV(cx, vp);
23849 : nsresult rv;
23850 : nsIWebGLProgram *arg0;
23851 0 : xpc_qsSelfRef arg0ref;
23852 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23853 0 : if (NS_FAILED(rv)) {
23854 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23855 0 : return JS_FALSE;
23856 : }
23857 : uint32_t arg1;
23858 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23859 0 : return JS_FALSE;
23860 0 : nsCOMPtr<nsIWebGLActiveInfo> result;
23861 0 : rv = self->GetActiveUniform(arg0, arg1, getter_AddRefs(result));
23862 0 : if (NS_FAILED(rv))
23863 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23864 0 : if (!result) {
23865 0 : *vp = JSVAL_NULL;
23866 0 : return JS_TRUE;
23867 : }
23868 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23869 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23870 0 : return JS_TRUE;
23871 : }
23872 : // After this point do not use 'result'!
23873 0 : qsObjectHelper helper(result, cache);
23874 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLActiveInfo), &interfaces[k_nsIWebGLActiveInfo], vp);
23875 : }
23876 :
23877 : static JSBool
23878 0 : nsIDOMWebGLRenderingContext_GetAttachedShaders(JSContext *cx, unsigned argc, jsval *vp)
23879 : {
23880 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23881 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23882 0 : if (!obj)
23883 0 : return JS_FALSE;
23884 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23885 : nsIDOMWebGLRenderingContext *self;
23886 0 : xpc_qsSelfRef selfref;
23887 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23888 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23889 0 : return JS_FALSE;
23890 0 : if (argc < 1)
23891 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23892 0 : jsval *argv = JS_ARGV(cx, vp);
23893 : nsresult rv;
23894 : nsIWebGLProgram *arg0;
23895 0 : xpc_qsSelfRef arg0ref;
23896 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23897 0 : if (NS_FAILED(rv)) {
23898 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23899 0 : return JS_FALSE;
23900 : }
23901 0 : nsCOMPtr<nsIVariant> result;
23902 0 : rv = self->GetAttachedShaders(arg0, getter_AddRefs(result));
23903 0 : if (NS_FAILED(rv))
23904 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23905 0 : return xpc_qsVariantToJsval(lccx, result, vp);
23906 : }
23907 :
23908 : static JSBool
23909 0 : nsIDOMWebGLRenderingContext_GetAttribLocation(JSContext *cx, unsigned argc, jsval *vp)
23910 : {
23911 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23912 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23913 0 : if (!obj)
23914 0 : return JS_FALSE;
23915 : nsIDOMWebGLRenderingContext *self;
23916 0 : xpc_qsSelfRef selfref;
23917 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23918 0 : return JS_FALSE;
23919 0 : if (argc < 2)
23920 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23921 0 : jsval *argv = JS_ARGV(cx, vp);
23922 : nsresult rv;
23923 : nsIWebGLProgram *arg0;
23924 0 : xpc_qsSelfRef arg0ref;
23925 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23926 0 : if (NS_FAILED(rv)) {
23927 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23928 0 : return JS_FALSE;
23929 : }
23930 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
23931 : xpc_qsDOMString::eDefaultNullBehavior,
23932 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
23933 0 : if (!arg1.IsValid())
23934 0 : return JS_FALSE;
23935 : WebGLint result;
23936 0 : rv = self->GetAttribLocation(arg0, arg1, &result);
23937 0 : if (NS_FAILED(rv))
23938 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23939 0 : *vp = INT_TO_JSVAL(result);
23940 0 : return JS_TRUE;
23941 : }
23942 :
23943 : static JSBool
23944 0 : nsIDOMWebGLRenderingContext_GetParameter(JSContext *cx, unsigned argc, jsval *vp)
23945 : {
23946 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23947 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23948 0 : if (!obj)
23949 0 : return JS_FALSE;
23950 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23951 : nsIDOMWebGLRenderingContext *self;
23952 0 : xpc_qsSelfRef selfref;
23953 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23954 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23955 0 : return JS_FALSE;
23956 0 : if (argc < 1)
23957 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23958 0 : jsval *argv = JS_ARGV(cx, vp);
23959 : uint32_t arg0;
23960 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23961 0 : return JS_FALSE;
23962 : nsresult rv;
23963 0 : nsCOMPtr<nsIVariant> result;
23964 0 : rv = self->GetParameter(arg0, getter_AddRefs(result));
23965 0 : if (NS_FAILED(rv))
23966 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23967 0 : return xpc_qsVariantToJsval(lccx, result, vp);
23968 : }
23969 :
23970 : static JSBool
23971 0 : nsIDOMWebGLRenderingContext_GetBufferParameter(JSContext *cx, unsigned argc, jsval *vp)
23972 : {
23973 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23974 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23975 0 : if (!obj)
23976 0 : return JS_FALSE;
23977 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23978 : nsIDOMWebGLRenderingContext *self;
23979 0 : xpc_qsSelfRef selfref;
23980 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23981 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23982 0 : return JS_FALSE;
23983 0 : if (argc < 2)
23984 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23985 0 : jsval *argv = JS_ARGV(cx, vp);
23986 : uint32_t arg0;
23987 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23988 0 : return JS_FALSE;
23989 : uint32_t arg1;
23990 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23991 0 : return JS_FALSE;
23992 : nsresult rv;
23993 0 : nsCOMPtr<nsIVariant> result;
23994 0 : rv = self->GetBufferParameter(arg0, arg1, getter_AddRefs(result));
23995 0 : if (NS_FAILED(rv))
23996 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23997 0 : return xpc_qsVariantToJsval(lccx, result, vp);
23998 : }
23999 :
24000 : static JSBool
24001 0 : nsIDOMWebGLRenderingContext_GetError(JSContext *cx, unsigned argc, jsval *vp)
24002 : {
24003 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24004 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24005 0 : if (!obj)
24006 0 : return JS_FALSE;
24007 : nsIDOMWebGLRenderingContext *self;
24008 0 : xpc_qsSelfRef selfref;
24009 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24010 0 : return JS_FALSE;
24011 : nsresult rv;
24012 : WebGLenum result;
24013 0 : rv = self->GetError(&result);
24014 0 : if (NS_FAILED(rv))
24015 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24016 0 : *vp = UINT_TO_JSVAL(result);
24017 0 : return JS_TRUE;
24018 : }
24019 :
24020 : static JSBool
24021 0 : nsIDOMWebGLRenderingContext_GetFramebufferAttachmentParameter(JSContext *cx, unsigned argc, jsval *vp)
24022 : {
24023 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24024 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24025 0 : if (!obj)
24026 0 : return JS_FALSE;
24027 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24028 : nsIDOMWebGLRenderingContext *self;
24029 0 : xpc_qsSelfRef selfref;
24030 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24031 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24032 0 : return JS_FALSE;
24033 0 : if (argc < 3)
24034 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24035 0 : jsval *argv = JS_ARGV(cx, vp);
24036 : uint32_t arg0;
24037 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24038 0 : return JS_FALSE;
24039 : uint32_t arg1;
24040 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24041 0 : return JS_FALSE;
24042 : uint32_t arg2;
24043 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
24044 0 : return JS_FALSE;
24045 : nsresult rv;
24046 0 : nsCOMPtr<nsIVariant> result;
24047 0 : rv = self->GetFramebufferAttachmentParameter(arg0, arg1, arg2, getter_AddRefs(result));
24048 0 : if (NS_FAILED(rv))
24049 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24050 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24051 : }
24052 :
24053 : static JSBool
24054 0 : nsIDOMWebGLRenderingContext_GetProgramParameter(JSContext *cx, unsigned argc, jsval *vp)
24055 : {
24056 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24057 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24058 0 : if (!obj)
24059 0 : return JS_FALSE;
24060 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24061 : nsIDOMWebGLRenderingContext *self;
24062 0 : xpc_qsSelfRef selfref;
24063 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24064 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24065 0 : return JS_FALSE;
24066 0 : if (argc < 2)
24067 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24068 0 : jsval *argv = JS_ARGV(cx, vp);
24069 : nsresult rv;
24070 : nsIWebGLProgram *arg0;
24071 0 : xpc_qsSelfRef arg0ref;
24072 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24073 0 : if (NS_FAILED(rv)) {
24074 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24075 0 : return JS_FALSE;
24076 : }
24077 : uint32_t arg1;
24078 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24079 0 : return JS_FALSE;
24080 0 : nsCOMPtr<nsIVariant> result;
24081 0 : rv = self->GetProgramParameter(arg0, arg1, getter_AddRefs(result));
24082 0 : if (NS_FAILED(rv))
24083 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24084 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24085 : }
24086 :
24087 : static JSBool
24088 0 : nsIDOMWebGLRenderingContext_GetProgramInfoLog(JSContext *cx, unsigned argc, jsval *vp)
24089 : {
24090 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24091 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24092 0 : if (!obj)
24093 0 : return JS_FALSE;
24094 : nsIDOMWebGLRenderingContext *self;
24095 0 : xpc_qsSelfRef selfref;
24096 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24097 0 : return JS_FALSE;
24098 0 : if (argc < 1)
24099 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24100 0 : jsval *argv = JS_ARGV(cx, vp);
24101 : nsresult rv;
24102 : nsIWebGLProgram *arg0;
24103 0 : xpc_qsSelfRef arg0ref;
24104 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24105 0 : if (NS_FAILED(rv)) {
24106 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24107 0 : return JS_FALSE;
24108 : }
24109 0 : nsString result;
24110 0 : rv = self->GetProgramInfoLog(arg0, result);
24111 0 : if (NS_FAILED(rv))
24112 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24113 0 : return xpc::StringToJsval(cx, result, vp);
24114 : }
24115 :
24116 : static JSBool
24117 0 : nsIDOMWebGLRenderingContext_GetRenderbufferParameter(JSContext *cx, unsigned argc, jsval *vp)
24118 : {
24119 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24120 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24121 0 : if (!obj)
24122 0 : return JS_FALSE;
24123 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24124 : nsIDOMWebGLRenderingContext *self;
24125 0 : xpc_qsSelfRef selfref;
24126 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24127 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24128 0 : return JS_FALSE;
24129 0 : if (argc < 2)
24130 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24131 0 : jsval *argv = JS_ARGV(cx, vp);
24132 : uint32_t arg0;
24133 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24134 0 : return JS_FALSE;
24135 : uint32_t arg1;
24136 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24137 0 : return JS_FALSE;
24138 : nsresult rv;
24139 0 : nsCOMPtr<nsIVariant> result;
24140 0 : rv = self->GetRenderbufferParameter(arg0, arg1, getter_AddRefs(result));
24141 0 : if (NS_FAILED(rv))
24142 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24143 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24144 : }
24145 :
24146 : static JSBool
24147 0 : nsIDOMWebGLRenderingContext_GetShaderParameter(JSContext *cx, unsigned argc, jsval *vp)
24148 : {
24149 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24150 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24151 0 : if (!obj)
24152 0 : return JS_FALSE;
24153 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24154 : nsIDOMWebGLRenderingContext *self;
24155 0 : xpc_qsSelfRef selfref;
24156 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24157 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24158 0 : return JS_FALSE;
24159 0 : if (argc < 2)
24160 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24161 0 : jsval *argv = JS_ARGV(cx, vp);
24162 : nsresult rv;
24163 : nsIWebGLShader *arg0;
24164 0 : xpc_qsSelfRef arg0ref;
24165 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24166 0 : if (NS_FAILED(rv)) {
24167 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24168 0 : return JS_FALSE;
24169 : }
24170 : uint32_t arg1;
24171 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24172 0 : return JS_FALSE;
24173 0 : nsCOMPtr<nsIVariant> result;
24174 0 : rv = self->GetShaderParameter(arg0, arg1, getter_AddRefs(result));
24175 0 : if (NS_FAILED(rv))
24176 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24177 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24178 : }
24179 :
24180 : static JSBool
24181 0 : nsIDOMWebGLRenderingContext_GetShaderInfoLog(JSContext *cx, unsigned argc, jsval *vp)
24182 : {
24183 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24184 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24185 0 : if (!obj)
24186 0 : return JS_FALSE;
24187 : nsIDOMWebGLRenderingContext *self;
24188 0 : xpc_qsSelfRef selfref;
24189 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24190 0 : return JS_FALSE;
24191 0 : if (argc < 1)
24192 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24193 0 : jsval *argv = JS_ARGV(cx, vp);
24194 : nsresult rv;
24195 : nsIWebGLShader *arg0;
24196 0 : xpc_qsSelfRef arg0ref;
24197 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24198 0 : if (NS_FAILED(rv)) {
24199 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24200 0 : return JS_FALSE;
24201 : }
24202 0 : nsString result;
24203 0 : rv = self->GetShaderInfoLog(arg0, result);
24204 0 : if (NS_FAILED(rv))
24205 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24206 0 : return xpc::StringToJsval(cx, result, vp);
24207 : }
24208 :
24209 : static JSBool
24210 0 : nsIDOMWebGLRenderingContext_GetShaderPrecisionFormat(JSContext *cx, unsigned argc, jsval *vp)
24211 : {
24212 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24213 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24214 0 : if (!obj)
24215 0 : return JS_FALSE;
24216 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24217 : nsIDOMWebGLRenderingContext *self;
24218 0 : xpc_qsSelfRef selfref;
24219 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24220 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24221 0 : return JS_FALSE;
24222 0 : if (argc < 2)
24223 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24224 0 : jsval *argv = JS_ARGV(cx, vp);
24225 : uint32_t arg0;
24226 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24227 0 : return JS_FALSE;
24228 : uint32_t arg1;
24229 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24230 0 : return JS_FALSE;
24231 : nsresult rv;
24232 0 : nsCOMPtr<nsIWebGLShaderPrecisionFormat> result;
24233 0 : rv = self->GetShaderPrecisionFormat(arg0, arg1, getter_AddRefs(result));
24234 0 : if (NS_FAILED(rv))
24235 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24236 0 : if (!result) {
24237 0 : *vp = JSVAL_NULL;
24238 0 : return JS_TRUE;
24239 : }
24240 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
24241 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
24242 0 : return JS_TRUE;
24243 : }
24244 : // After this point do not use 'result'!
24245 0 : qsObjectHelper helper(result, cache);
24246 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLShaderPrecisionFormat), &interfaces[k_nsIWebGLShaderPrecisionFormat], vp);
24247 : }
24248 :
24249 : static JSBool
24250 0 : nsIDOMWebGLRenderingContext_GetShaderSource(JSContext *cx, unsigned argc, jsval *vp)
24251 : {
24252 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24253 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24254 0 : if (!obj)
24255 0 : return JS_FALSE;
24256 : nsIDOMWebGLRenderingContext *self;
24257 0 : xpc_qsSelfRef selfref;
24258 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24259 0 : return JS_FALSE;
24260 0 : if (argc < 1)
24261 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24262 0 : jsval *argv = JS_ARGV(cx, vp);
24263 : nsresult rv;
24264 : nsIWebGLShader *arg0;
24265 0 : xpc_qsSelfRef arg0ref;
24266 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24267 0 : if (NS_FAILED(rv)) {
24268 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24269 0 : return JS_FALSE;
24270 : }
24271 0 : nsString result;
24272 0 : rv = self->GetShaderSource(arg0, result);
24273 0 : if (NS_FAILED(rv))
24274 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24275 0 : return xpc::StringToJsval(cx, result, vp);
24276 : }
24277 :
24278 : static JSBool
24279 0 : nsIDOMWebGLRenderingContext_GetTexParameter(JSContext *cx, unsigned argc, jsval *vp)
24280 : {
24281 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24282 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24283 0 : if (!obj)
24284 0 : return JS_FALSE;
24285 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24286 : nsIDOMWebGLRenderingContext *self;
24287 0 : xpc_qsSelfRef selfref;
24288 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24289 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24290 0 : return JS_FALSE;
24291 0 : if (argc < 2)
24292 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24293 0 : jsval *argv = JS_ARGV(cx, vp);
24294 : uint32_t arg0;
24295 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24296 0 : return JS_FALSE;
24297 : uint32_t arg1;
24298 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24299 0 : return JS_FALSE;
24300 : nsresult rv;
24301 0 : nsCOMPtr<nsIVariant> result;
24302 0 : rv = self->GetTexParameter(arg0, arg1, getter_AddRefs(result));
24303 0 : if (NS_FAILED(rv))
24304 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24305 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24306 : }
24307 :
24308 : static JSBool
24309 0 : nsIDOMWebGLRenderingContext_GetUniform(JSContext *cx, unsigned argc, jsval *vp)
24310 : {
24311 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24312 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24313 0 : if (!obj)
24314 0 : return JS_FALSE;
24315 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24316 : nsIDOMWebGLRenderingContext *self;
24317 0 : xpc_qsSelfRef selfref;
24318 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24319 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24320 0 : return JS_FALSE;
24321 0 : if (argc < 2)
24322 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24323 0 : jsval *argv = JS_ARGV(cx, vp);
24324 : nsresult rv;
24325 : nsIWebGLProgram *arg0;
24326 0 : xpc_qsSelfRef arg0ref;
24327 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24328 0 : if (NS_FAILED(rv)) {
24329 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24330 0 : return JS_FALSE;
24331 : }
24332 : nsIWebGLUniformLocation *arg1;
24333 0 : xpc_qsSelfRef arg1ref;
24334 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
24335 0 : if (NS_FAILED(rv)) {
24336 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
24337 0 : return JS_FALSE;
24338 : }
24339 0 : nsCOMPtr<nsIVariant> result;
24340 0 : rv = self->GetUniform(arg0, arg1, getter_AddRefs(result));
24341 0 : if (NS_FAILED(rv))
24342 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24343 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24344 : }
24345 :
24346 : static JSBool
24347 0 : nsIDOMWebGLRenderingContext_GetUniformLocation(JSContext *cx, unsigned argc, jsval *vp)
24348 : {
24349 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24350 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24351 0 : if (!obj)
24352 0 : return JS_FALSE;
24353 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24354 : nsIDOMWebGLRenderingContext *self;
24355 0 : xpc_qsSelfRef selfref;
24356 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24357 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24358 0 : return JS_FALSE;
24359 0 : if (argc < 2)
24360 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24361 0 : jsval *argv = JS_ARGV(cx, vp);
24362 : nsresult rv;
24363 : nsIWebGLProgram *arg0;
24364 0 : xpc_qsSelfRef arg0ref;
24365 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24366 0 : if (NS_FAILED(rv)) {
24367 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24368 0 : return JS_FALSE;
24369 : }
24370 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
24371 : xpc_qsDOMString::eDefaultNullBehavior,
24372 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
24373 0 : if (!arg1.IsValid())
24374 0 : return JS_FALSE;
24375 0 : nsCOMPtr<nsIWebGLUniformLocation> result;
24376 0 : rv = self->GetUniformLocation(arg0, arg1, getter_AddRefs(result));
24377 0 : if (NS_FAILED(rv))
24378 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24379 0 : if (!result) {
24380 0 : *vp = JSVAL_NULL;
24381 0 : return JS_TRUE;
24382 : }
24383 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
24384 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
24385 0 : return JS_TRUE;
24386 : }
24387 : // After this point do not use 'result'!
24388 0 : qsObjectHelper helper(result, cache);
24389 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLUniformLocation), &interfaces[k_nsIWebGLUniformLocation], vp);
24390 : }
24391 :
24392 : static JSBool
24393 0 : nsIDOMWebGLRenderingContext_GetVertexAttrib(JSContext *cx, unsigned argc, jsval *vp)
24394 : {
24395 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24396 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24397 0 : if (!obj)
24398 0 : return JS_FALSE;
24399 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24400 : nsIDOMWebGLRenderingContext *self;
24401 0 : xpc_qsSelfRef selfref;
24402 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24403 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24404 0 : return JS_FALSE;
24405 0 : if (argc < 2)
24406 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24407 0 : jsval *argv = JS_ARGV(cx, vp);
24408 : uint32_t arg0;
24409 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24410 0 : return JS_FALSE;
24411 : uint32_t arg1;
24412 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24413 0 : return JS_FALSE;
24414 : nsresult rv;
24415 0 : nsCOMPtr<nsIVariant> result;
24416 0 : rv = self->GetVertexAttrib(arg0, arg1, getter_AddRefs(result));
24417 0 : if (NS_FAILED(rv))
24418 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24419 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24420 : }
24421 :
24422 : static JSBool
24423 0 : nsIDOMWebGLRenderingContext_GetVertexAttribOffset(JSContext *cx, unsigned argc, jsval *vp)
24424 : {
24425 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24426 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24427 0 : if (!obj)
24428 0 : return JS_FALSE;
24429 : nsIDOMWebGLRenderingContext *self;
24430 0 : xpc_qsSelfRef selfref;
24431 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24432 0 : return JS_FALSE;
24433 0 : if (argc < 2)
24434 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24435 0 : jsval *argv = JS_ARGV(cx, vp);
24436 : uint32_t arg0;
24437 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24438 0 : return JS_FALSE;
24439 : uint32_t arg1;
24440 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24441 0 : return JS_FALSE;
24442 : nsresult rv;
24443 : WebGLuint result;
24444 0 : rv = self->GetVertexAttribOffset(arg0, arg1, &result);
24445 0 : if (NS_FAILED(rv))
24446 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24447 0 : *vp = UINT_TO_JSVAL(result);
24448 0 : return JS_TRUE;
24449 : }
24450 :
24451 : static JSBool
24452 0 : nsIDOMWebGLRenderingContext_Hint(JSContext *cx, unsigned argc, jsval *vp)
24453 : {
24454 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24455 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24456 0 : if (!obj)
24457 0 : return JS_FALSE;
24458 : nsIDOMWebGLRenderingContext *self;
24459 0 : xpc_qsSelfRef selfref;
24460 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24461 0 : return JS_FALSE;
24462 0 : if (argc < 2)
24463 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24464 0 : jsval *argv = JS_ARGV(cx, vp);
24465 : uint32_t arg0;
24466 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24467 0 : return JS_FALSE;
24468 : uint32_t arg1;
24469 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24470 0 : return JS_FALSE;
24471 : nsresult rv;
24472 0 : rv = self->Hint(arg0, arg1);
24473 0 : if (NS_FAILED(rv))
24474 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24475 0 : *vp = JSVAL_VOID;
24476 0 : return JS_TRUE;
24477 : }
24478 :
24479 : static JSBool
24480 0 : nsIDOMWebGLRenderingContext_IsBuffer(JSContext *cx, unsigned argc, jsval *vp)
24481 : {
24482 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24483 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24484 0 : if (!obj)
24485 0 : return JS_FALSE;
24486 : nsIDOMWebGLRenderingContext *self;
24487 0 : xpc_qsSelfRef selfref;
24488 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24489 0 : return JS_FALSE;
24490 0 : if (argc < 1)
24491 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24492 0 : jsval *argv = JS_ARGV(cx, vp);
24493 : nsresult rv;
24494 : nsIWebGLBuffer *arg0;
24495 0 : xpc_qsSelfRef arg0ref;
24496 0 : rv = xpc_qsUnwrapArg<nsIWebGLBuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24497 0 : if (NS_FAILED(rv)) {
24498 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24499 0 : return JS_FALSE;
24500 : }
24501 : WebGLboolean result;
24502 0 : rv = self->IsBuffer(arg0, &result);
24503 0 : if (NS_FAILED(rv))
24504 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24505 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24506 0 : return JS_TRUE;
24507 : }
24508 :
24509 : static JSBool
24510 0 : nsIDOMWebGLRenderingContext_IsFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
24511 : {
24512 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24513 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24514 0 : if (!obj)
24515 0 : return JS_FALSE;
24516 : nsIDOMWebGLRenderingContext *self;
24517 0 : xpc_qsSelfRef selfref;
24518 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24519 0 : return JS_FALSE;
24520 0 : if (argc < 1)
24521 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24522 0 : jsval *argv = JS_ARGV(cx, vp);
24523 : nsresult rv;
24524 : nsIWebGLFramebuffer *arg0;
24525 0 : xpc_qsSelfRef arg0ref;
24526 0 : rv = xpc_qsUnwrapArg<nsIWebGLFramebuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24527 0 : if (NS_FAILED(rv)) {
24528 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24529 0 : return JS_FALSE;
24530 : }
24531 : WebGLboolean result;
24532 0 : rv = self->IsFramebuffer(arg0, &result);
24533 0 : if (NS_FAILED(rv))
24534 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24535 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24536 0 : return JS_TRUE;
24537 : }
24538 :
24539 : static JSBool
24540 0 : nsIDOMWebGLRenderingContext_IsProgram(JSContext *cx, unsigned argc, jsval *vp)
24541 : {
24542 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24543 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24544 0 : if (!obj)
24545 0 : return JS_FALSE;
24546 : nsIDOMWebGLRenderingContext *self;
24547 0 : xpc_qsSelfRef selfref;
24548 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24549 0 : return JS_FALSE;
24550 0 : if (argc < 1)
24551 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24552 0 : jsval *argv = JS_ARGV(cx, vp);
24553 : nsresult rv;
24554 : nsIWebGLProgram *arg0;
24555 0 : xpc_qsSelfRef arg0ref;
24556 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24557 0 : if (NS_FAILED(rv)) {
24558 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24559 0 : return JS_FALSE;
24560 : }
24561 : WebGLboolean result;
24562 0 : rv = self->IsProgram(arg0, &result);
24563 0 : if (NS_FAILED(rv))
24564 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24565 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24566 0 : return JS_TRUE;
24567 : }
24568 :
24569 : static JSBool
24570 0 : nsIDOMWebGLRenderingContext_IsRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
24571 : {
24572 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24573 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24574 0 : if (!obj)
24575 0 : return JS_FALSE;
24576 : nsIDOMWebGLRenderingContext *self;
24577 0 : xpc_qsSelfRef selfref;
24578 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24579 0 : return JS_FALSE;
24580 0 : if (argc < 1)
24581 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24582 0 : jsval *argv = JS_ARGV(cx, vp);
24583 : nsresult rv;
24584 : nsIWebGLRenderbuffer *arg0;
24585 0 : xpc_qsSelfRef arg0ref;
24586 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24587 0 : if (NS_FAILED(rv)) {
24588 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24589 0 : return JS_FALSE;
24590 : }
24591 : WebGLboolean result;
24592 0 : rv = self->IsRenderbuffer(arg0, &result);
24593 0 : if (NS_FAILED(rv))
24594 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24595 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24596 0 : return JS_TRUE;
24597 : }
24598 :
24599 : static JSBool
24600 0 : nsIDOMWebGLRenderingContext_IsShader(JSContext *cx, unsigned argc, jsval *vp)
24601 : {
24602 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24603 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24604 0 : if (!obj)
24605 0 : return JS_FALSE;
24606 : nsIDOMWebGLRenderingContext *self;
24607 0 : xpc_qsSelfRef selfref;
24608 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24609 0 : return JS_FALSE;
24610 0 : if (argc < 1)
24611 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24612 0 : jsval *argv = JS_ARGV(cx, vp);
24613 : nsresult rv;
24614 : nsIWebGLShader *arg0;
24615 0 : xpc_qsSelfRef arg0ref;
24616 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24617 0 : if (NS_FAILED(rv)) {
24618 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24619 0 : return JS_FALSE;
24620 : }
24621 : WebGLboolean result;
24622 0 : rv = self->IsShader(arg0, &result);
24623 0 : if (NS_FAILED(rv))
24624 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24625 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24626 0 : return JS_TRUE;
24627 : }
24628 :
24629 : static JSBool
24630 0 : nsIDOMWebGLRenderingContext_IsTexture(JSContext *cx, unsigned argc, jsval *vp)
24631 : {
24632 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24633 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24634 0 : if (!obj)
24635 0 : return JS_FALSE;
24636 : nsIDOMWebGLRenderingContext *self;
24637 0 : xpc_qsSelfRef selfref;
24638 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24639 0 : return JS_FALSE;
24640 0 : if (argc < 1)
24641 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24642 0 : jsval *argv = JS_ARGV(cx, vp);
24643 : nsresult rv;
24644 : nsIWebGLTexture *arg0;
24645 0 : xpc_qsSelfRef arg0ref;
24646 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24647 0 : if (NS_FAILED(rv)) {
24648 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24649 0 : return JS_FALSE;
24650 : }
24651 : WebGLboolean result;
24652 0 : rv = self->IsTexture(arg0, &result);
24653 0 : if (NS_FAILED(rv))
24654 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24655 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24656 0 : return JS_TRUE;
24657 : }
24658 :
24659 : static JSBool
24660 0 : nsIDOMWebGLRenderingContext_IsEnabled(JSContext *cx, unsigned argc, jsval *vp)
24661 : {
24662 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24663 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24664 0 : if (!obj)
24665 0 : return JS_FALSE;
24666 : nsIDOMWebGLRenderingContext *self;
24667 0 : xpc_qsSelfRef selfref;
24668 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24669 0 : return JS_FALSE;
24670 0 : if (argc < 1)
24671 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24672 0 : jsval *argv = JS_ARGV(cx, vp);
24673 : uint32_t arg0;
24674 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24675 0 : return JS_FALSE;
24676 : nsresult rv;
24677 : WebGLboolean result;
24678 0 : rv = self->IsEnabled(arg0, &result);
24679 0 : if (NS_FAILED(rv))
24680 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24681 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24682 0 : return JS_TRUE;
24683 : }
24684 :
24685 : static JSBool
24686 0 : nsIDOMWebGLRenderingContext_LineWidth(JSContext *cx, unsigned argc, jsval *vp)
24687 : {
24688 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24689 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24690 0 : if (!obj)
24691 0 : return JS_FALSE;
24692 : nsIDOMWebGLRenderingContext *self;
24693 0 : xpc_qsSelfRef selfref;
24694 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24695 0 : return JS_FALSE;
24696 0 : if (argc < 1)
24697 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24698 0 : jsval *argv = JS_ARGV(cx, vp);
24699 : double arg0_dbl;
24700 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
24701 0 : return JS_FALSE;
24702 0 : float arg0 = (float) arg0_dbl;
24703 : nsresult rv;
24704 0 : rv = self->LineWidth(arg0);
24705 0 : if (NS_FAILED(rv))
24706 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24707 0 : *vp = JSVAL_VOID;
24708 0 : return JS_TRUE;
24709 : }
24710 :
24711 : static JSBool
24712 0 : nsIDOMWebGLRenderingContext_LinkProgram(JSContext *cx, unsigned argc, jsval *vp)
24713 : {
24714 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24715 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24716 0 : if (!obj)
24717 0 : return JS_FALSE;
24718 : nsIDOMWebGLRenderingContext *self;
24719 0 : xpc_qsSelfRef selfref;
24720 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24721 0 : return JS_FALSE;
24722 0 : jsval *argv = JS_ARGV(cx, vp);
24723 : nsresult rv;
24724 : nsIWebGLProgram *arg0;
24725 0 : xpc_qsSelfRef arg0ref;
24726 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
24727 0 : if (NS_FAILED(rv)) {
24728 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24729 0 : return JS_FALSE;
24730 : }
24731 0 : rv = self->LinkProgram(arg0);
24732 0 : if (NS_FAILED(rv))
24733 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24734 0 : *vp = JSVAL_VOID;
24735 0 : return JS_TRUE;
24736 : }
24737 :
24738 : static JSBool
24739 0 : nsIDOMWebGLRenderingContext_PixelStorei(JSContext *cx, unsigned argc, jsval *vp)
24740 : {
24741 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24742 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24743 0 : if (!obj)
24744 0 : return JS_FALSE;
24745 : nsIDOMWebGLRenderingContext *self;
24746 0 : xpc_qsSelfRef selfref;
24747 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24748 0 : return JS_FALSE;
24749 0 : if (argc < 2)
24750 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24751 0 : jsval *argv = JS_ARGV(cx, vp);
24752 : uint32_t arg0;
24753 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24754 0 : return JS_FALSE;
24755 : int32_t arg1;
24756 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
24757 0 : return JS_FALSE;
24758 : nsresult rv;
24759 0 : rv = self->PixelStorei(arg0, arg1);
24760 0 : if (NS_FAILED(rv))
24761 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24762 0 : *vp = JSVAL_VOID;
24763 0 : return JS_TRUE;
24764 : }
24765 :
24766 : static JSBool
24767 0 : nsIDOMWebGLRenderingContext_PolygonOffset(JSContext *cx, unsigned argc, jsval *vp)
24768 : {
24769 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24770 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24771 0 : if (!obj)
24772 0 : return JS_FALSE;
24773 : nsIDOMWebGLRenderingContext *self;
24774 0 : xpc_qsSelfRef selfref;
24775 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24776 0 : return JS_FALSE;
24777 0 : if (argc < 2)
24778 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24779 0 : jsval *argv = JS_ARGV(cx, vp);
24780 : double arg0_dbl;
24781 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
24782 0 : return JS_FALSE;
24783 0 : float arg0 = (float) arg0_dbl;
24784 : double arg1_dbl;
24785 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
24786 0 : return JS_FALSE;
24787 0 : float arg1 = (float) arg1_dbl;
24788 : nsresult rv;
24789 0 : rv = self->PolygonOffset(arg0, arg1);
24790 0 : if (NS_FAILED(rv))
24791 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24792 0 : *vp = JSVAL_VOID;
24793 0 : return JS_TRUE;
24794 : }
24795 :
24796 : static JSBool
24797 0 : nsIDOMWebGLRenderingContext_RenderbufferStorage(JSContext *cx, unsigned argc, jsval *vp)
24798 : {
24799 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24800 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24801 0 : if (!obj)
24802 0 : return JS_FALSE;
24803 : nsIDOMWebGLRenderingContext *self;
24804 0 : xpc_qsSelfRef selfref;
24805 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24806 0 : return JS_FALSE;
24807 0 : if (argc < 4)
24808 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24809 0 : jsval *argv = JS_ARGV(cx, vp);
24810 : uint32_t arg0;
24811 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24812 0 : return JS_FALSE;
24813 : uint32_t arg1;
24814 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24815 0 : return JS_FALSE;
24816 : int32_t arg2;
24817 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
24818 0 : return JS_FALSE;
24819 : int32_t arg3;
24820 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
24821 0 : return JS_FALSE;
24822 : nsresult rv;
24823 0 : rv = self->RenderbufferStorage(arg0, arg1, arg2, arg3);
24824 0 : if (NS_FAILED(rv))
24825 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24826 0 : *vp = JSVAL_VOID;
24827 0 : return JS_TRUE;
24828 : }
24829 :
24830 : static JSBool
24831 0 : nsIDOMWebGLRenderingContext_SampleCoverage(JSContext *cx, unsigned argc, jsval *vp)
24832 : {
24833 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24834 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24835 0 : if (!obj)
24836 0 : return JS_FALSE;
24837 : nsIDOMWebGLRenderingContext *self;
24838 0 : xpc_qsSelfRef selfref;
24839 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24840 0 : return JS_FALSE;
24841 0 : if (argc < 2)
24842 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24843 0 : jsval *argv = JS_ARGV(cx, vp);
24844 : double arg0_dbl;
24845 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
24846 0 : return JS_FALSE;
24847 0 : float arg0 = (float) arg0_dbl;
24848 : JSBool arg1;
24849 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
24850 : nsresult rv;
24851 0 : rv = self->SampleCoverage(arg0, arg1);
24852 0 : if (NS_FAILED(rv))
24853 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24854 0 : *vp = JSVAL_VOID;
24855 0 : return JS_TRUE;
24856 : }
24857 :
24858 : static JSBool
24859 0 : nsIDOMWebGLRenderingContext_Scissor(JSContext *cx, unsigned argc, jsval *vp)
24860 : {
24861 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24862 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24863 0 : if (!obj)
24864 0 : return JS_FALSE;
24865 : nsIDOMWebGLRenderingContext *self;
24866 0 : xpc_qsSelfRef selfref;
24867 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24868 0 : return JS_FALSE;
24869 0 : if (argc < 4)
24870 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24871 0 : jsval *argv = JS_ARGV(cx, vp);
24872 : int32_t arg0;
24873 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
24874 0 : return JS_FALSE;
24875 : int32_t arg1;
24876 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
24877 0 : return JS_FALSE;
24878 : int32_t arg2;
24879 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
24880 0 : return JS_FALSE;
24881 : int32_t arg3;
24882 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
24883 0 : return JS_FALSE;
24884 : nsresult rv;
24885 0 : rv = self->Scissor(arg0, arg1, arg2, arg3);
24886 0 : if (NS_FAILED(rv))
24887 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24888 0 : *vp = JSVAL_VOID;
24889 0 : return JS_TRUE;
24890 : }
24891 :
24892 : static JSBool
24893 0 : nsIDOMWebGLRenderingContext_ShaderSource(JSContext *cx, unsigned argc, jsval *vp)
24894 : {
24895 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24896 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24897 0 : if (!obj)
24898 0 : return JS_FALSE;
24899 : nsIDOMWebGLRenderingContext *self;
24900 0 : xpc_qsSelfRef selfref;
24901 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24902 0 : return JS_FALSE;
24903 0 : jsval *argv = JS_ARGV(cx, vp);
24904 : nsresult rv;
24905 : nsIWebGLShader *arg0;
24906 0 : xpc_qsSelfRef arg0ref;
24907 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
24908 0 : if (NS_FAILED(rv)) {
24909 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24910 0 : return JS_FALSE;
24911 : }
24912 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
24913 : xpc_qsDOMString::eDefaultNullBehavior,
24914 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
24915 0 : if (!arg1.IsValid())
24916 0 : return JS_FALSE;
24917 0 : rv = self->ShaderSource(arg0, arg1);
24918 0 : if (NS_FAILED(rv))
24919 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24920 0 : *vp = JSVAL_VOID;
24921 0 : return JS_TRUE;
24922 : }
24923 :
24924 : static JSBool
24925 0 : nsIDOMWebGLRenderingContext_StencilFunc(JSContext *cx, unsigned argc, jsval *vp)
24926 : {
24927 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24928 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24929 0 : if (!obj)
24930 0 : return JS_FALSE;
24931 : nsIDOMWebGLRenderingContext *self;
24932 0 : xpc_qsSelfRef selfref;
24933 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24934 0 : return JS_FALSE;
24935 0 : if (argc < 3)
24936 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24937 0 : jsval *argv = JS_ARGV(cx, vp);
24938 : uint32_t arg0;
24939 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24940 0 : return JS_FALSE;
24941 : int32_t arg1;
24942 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
24943 0 : return JS_FALSE;
24944 : uint32_t arg2;
24945 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
24946 0 : return JS_FALSE;
24947 : nsresult rv;
24948 0 : rv = self->StencilFunc(arg0, arg1, arg2);
24949 0 : if (NS_FAILED(rv))
24950 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24951 0 : *vp = JSVAL_VOID;
24952 0 : return JS_TRUE;
24953 : }
24954 :
24955 : static JSBool
24956 0 : nsIDOMWebGLRenderingContext_StencilFuncSeparate(JSContext *cx, unsigned argc, jsval *vp)
24957 : {
24958 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24959 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24960 0 : if (!obj)
24961 0 : return JS_FALSE;
24962 : nsIDOMWebGLRenderingContext *self;
24963 0 : xpc_qsSelfRef selfref;
24964 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24965 0 : return JS_FALSE;
24966 0 : if (argc < 4)
24967 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24968 0 : jsval *argv = JS_ARGV(cx, vp);
24969 : uint32_t arg0;
24970 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24971 0 : return JS_FALSE;
24972 : uint32_t arg1;
24973 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24974 0 : return JS_FALSE;
24975 : int32_t arg2;
24976 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
24977 0 : return JS_FALSE;
24978 : uint32_t arg3;
24979 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3))
24980 0 : return JS_FALSE;
24981 : nsresult rv;
24982 0 : rv = self->StencilFuncSeparate(arg0, arg1, arg2, arg3);
24983 0 : if (NS_FAILED(rv))
24984 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24985 0 : *vp = JSVAL_VOID;
24986 0 : return JS_TRUE;
24987 : }
24988 :
24989 : static JSBool
24990 0 : nsIDOMWebGLRenderingContext_StencilMask(JSContext *cx, unsigned argc, jsval *vp)
24991 : {
24992 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24993 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24994 0 : if (!obj)
24995 0 : return JS_FALSE;
24996 : nsIDOMWebGLRenderingContext *self;
24997 0 : xpc_qsSelfRef selfref;
24998 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24999 0 : return JS_FALSE;
25000 0 : if (argc < 1)
25001 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25002 0 : jsval *argv = JS_ARGV(cx, vp);
25003 : uint32_t arg0;
25004 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25005 0 : return JS_FALSE;
25006 : nsresult rv;
25007 0 : rv = self->StencilMask(arg0);
25008 0 : if (NS_FAILED(rv))
25009 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25010 0 : *vp = JSVAL_VOID;
25011 0 : return JS_TRUE;
25012 : }
25013 :
25014 : static JSBool
25015 0 : nsIDOMWebGLRenderingContext_StencilMaskSeparate(JSContext *cx, unsigned argc, jsval *vp)
25016 : {
25017 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25018 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25019 0 : if (!obj)
25020 0 : return JS_FALSE;
25021 : nsIDOMWebGLRenderingContext *self;
25022 0 : xpc_qsSelfRef selfref;
25023 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25024 0 : return JS_FALSE;
25025 0 : if (argc < 2)
25026 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25027 0 : jsval *argv = JS_ARGV(cx, vp);
25028 : uint32_t arg0;
25029 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25030 0 : return JS_FALSE;
25031 : uint32_t arg1;
25032 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25033 0 : return JS_FALSE;
25034 : nsresult rv;
25035 0 : rv = self->StencilMaskSeparate(arg0, arg1);
25036 0 : if (NS_FAILED(rv))
25037 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25038 0 : *vp = JSVAL_VOID;
25039 0 : return JS_TRUE;
25040 : }
25041 :
25042 : static JSBool
25043 0 : nsIDOMWebGLRenderingContext_StencilOp(JSContext *cx, unsigned argc, jsval *vp)
25044 : {
25045 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25046 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25047 0 : if (!obj)
25048 0 : return JS_FALSE;
25049 : nsIDOMWebGLRenderingContext *self;
25050 0 : xpc_qsSelfRef selfref;
25051 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25052 0 : return JS_FALSE;
25053 0 : if (argc < 3)
25054 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25055 0 : jsval *argv = JS_ARGV(cx, vp);
25056 : uint32_t arg0;
25057 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25058 0 : return JS_FALSE;
25059 : uint32_t arg1;
25060 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25061 0 : return JS_FALSE;
25062 : uint32_t arg2;
25063 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
25064 0 : return JS_FALSE;
25065 : nsresult rv;
25066 0 : rv = self->StencilOp(arg0, arg1, arg2);
25067 0 : if (NS_FAILED(rv))
25068 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25069 0 : *vp = JSVAL_VOID;
25070 0 : return JS_TRUE;
25071 : }
25072 :
25073 : static JSBool
25074 0 : nsIDOMWebGLRenderingContext_StencilOpSeparate(JSContext *cx, unsigned argc, jsval *vp)
25075 : {
25076 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25077 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25078 0 : if (!obj)
25079 0 : return JS_FALSE;
25080 : nsIDOMWebGLRenderingContext *self;
25081 0 : xpc_qsSelfRef selfref;
25082 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25083 0 : return JS_FALSE;
25084 0 : if (argc < 4)
25085 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25086 0 : jsval *argv = JS_ARGV(cx, vp);
25087 : uint32_t arg0;
25088 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25089 0 : return JS_FALSE;
25090 : uint32_t arg1;
25091 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25092 0 : return JS_FALSE;
25093 : uint32_t arg2;
25094 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
25095 0 : return JS_FALSE;
25096 : uint32_t arg3;
25097 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3))
25098 0 : return JS_FALSE;
25099 : nsresult rv;
25100 0 : rv = self->StencilOpSeparate(arg0, arg1, arg2, arg3);
25101 0 : if (NS_FAILED(rv))
25102 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25103 0 : *vp = JSVAL_VOID;
25104 0 : return JS_TRUE;
25105 : }
25106 :
25107 : static JSBool
25108 0 : nsIDOMWebGLRenderingContext_TexParameterf(JSContext *cx, unsigned argc, jsval *vp)
25109 : {
25110 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25111 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25112 0 : if (!obj)
25113 0 : return JS_FALSE;
25114 : nsIDOMWebGLRenderingContext *self;
25115 0 : xpc_qsSelfRef selfref;
25116 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25117 0 : return JS_FALSE;
25118 0 : if (argc < 3)
25119 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25120 0 : jsval *argv = JS_ARGV(cx, vp);
25121 : uint32_t arg0;
25122 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25123 0 : return JS_FALSE;
25124 : uint32_t arg1;
25125 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25126 0 : return JS_FALSE;
25127 : double arg2_dbl;
25128 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25129 0 : return JS_FALSE;
25130 0 : float arg2 = (float) arg2_dbl;
25131 : nsresult rv;
25132 0 : rv = self->TexParameterf(arg0, arg1, arg2);
25133 0 : if (NS_FAILED(rv))
25134 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25135 0 : *vp = JSVAL_VOID;
25136 0 : return JS_TRUE;
25137 : }
25138 :
25139 : static JSBool
25140 0 : nsIDOMWebGLRenderingContext_TexParameteri(JSContext *cx, unsigned argc, jsval *vp)
25141 : {
25142 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25143 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25144 0 : if (!obj)
25145 0 : return JS_FALSE;
25146 : nsIDOMWebGLRenderingContext *self;
25147 0 : xpc_qsSelfRef selfref;
25148 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25149 0 : return JS_FALSE;
25150 0 : if (argc < 3)
25151 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25152 0 : jsval *argv = JS_ARGV(cx, vp);
25153 : uint32_t arg0;
25154 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25155 0 : return JS_FALSE;
25156 : uint32_t arg1;
25157 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25158 0 : return JS_FALSE;
25159 : int32_t arg2;
25160 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25161 0 : return JS_FALSE;
25162 : nsresult rv;
25163 0 : rv = self->TexParameteri(arg0, arg1, arg2);
25164 0 : if (NS_FAILED(rv))
25165 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25166 0 : *vp = JSVAL_VOID;
25167 0 : return JS_TRUE;
25168 : }
25169 :
25170 : static JSBool
25171 0 : nsIDOMWebGLRenderingContext_Uniform1f(JSContext *cx, unsigned argc, jsval *vp)
25172 : {
25173 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25174 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25175 0 : if (!obj)
25176 0 : return JS_FALSE;
25177 : nsIDOMWebGLRenderingContext *self;
25178 0 : xpc_qsSelfRef selfref;
25179 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25180 0 : return JS_FALSE;
25181 0 : if (argc < 2)
25182 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25183 0 : jsval *argv = JS_ARGV(cx, vp);
25184 : nsresult rv;
25185 : nsIWebGLUniformLocation *arg0;
25186 0 : xpc_qsSelfRef arg0ref;
25187 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25188 0 : if (NS_FAILED(rv)) {
25189 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25190 0 : return JS_FALSE;
25191 : }
25192 : double arg1_dbl;
25193 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25194 0 : return JS_FALSE;
25195 0 : float arg1 = (float) arg1_dbl;
25196 0 : rv = self->Uniform1f(arg0, arg1);
25197 0 : if (NS_FAILED(rv))
25198 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25199 0 : *vp = JSVAL_VOID;
25200 0 : return JS_TRUE;
25201 : }
25202 :
25203 : static JSBool
25204 0 : nsIDOMWebGLRenderingContext_Uniform1i(JSContext *cx, unsigned argc, jsval *vp)
25205 : {
25206 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25207 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25208 0 : if (!obj)
25209 0 : return JS_FALSE;
25210 : nsIDOMWebGLRenderingContext *self;
25211 0 : xpc_qsSelfRef selfref;
25212 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25213 0 : return JS_FALSE;
25214 0 : if (argc < 2)
25215 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25216 0 : jsval *argv = JS_ARGV(cx, vp);
25217 : nsresult rv;
25218 : nsIWebGLUniformLocation *arg0;
25219 0 : xpc_qsSelfRef arg0ref;
25220 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25221 0 : if (NS_FAILED(rv)) {
25222 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25223 0 : return JS_FALSE;
25224 : }
25225 : int32_t arg1;
25226 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25227 0 : return JS_FALSE;
25228 0 : rv = self->Uniform1i(arg0, arg1);
25229 0 : if (NS_FAILED(rv))
25230 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25231 0 : *vp = JSVAL_VOID;
25232 0 : return JS_TRUE;
25233 : }
25234 :
25235 : static JSBool
25236 0 : nsIDOMWebGLRenderingContext_Uniform2f(JSContext *cx, unsigned argc, jsval *vp)
25237 : {
25238 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25239 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25240 0 : if (!obj)
25241 0 : return JS_FALSE;
25242 : nsIDOMWebGLRenderingContext *self;
25243 0 : xpc_qsSelfRef selfref;
25244 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25245 0 : return JS_FALSE;
25246 0 : if (argc < 3)
25247 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25248 0 : jsval *argv = JS_ARGV(cx, vp);
25249 : nsresult rv;
25250 : nsIWebGLUniformLocation *arg0;
25251 0 : xpc_qsSelfRef arg0ref;
25252 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25253 0 : if (NS_FAILED(rv)) {
25254 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25255 0 : return JS_FALSE;
25256 : }
25257 : double arg1_dbl;
25258 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25259 0 : return JS_FALSE;
25260 0 : float arg1 = (float) arg1_dbl;
25261 : double arg2_dbl;
25262 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25263 0 : return JS_FALSE;
25264 0 : float arg2 = (float) arg2_dbl;
25265 0 : rv = self->Uniform2f(arg0, arg1, arg2);
25266 0 : if (NS_FAILED(rv))
25267 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25268 0 : *vp = JSVAL_VOID;
25269 0 : return JS_TRUE;
25270 : }
25271 :
25272 : static JSBool
25273 0 : nsIDOMWebGLRenderingContext_Uniform2i(JSContext *cx, unsigned argc, jsval *vp)
25274 : {
25275 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25276 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25277 0 : if (!obj)
25278 0 : return JS_FALSE;
25279 : nsIDOMWebGLRenderingContext *self;
25280 0 : xpc_qsSelfRef selfref;
25281 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25282 0 : return JS_FALSE;
25283 0 : if (argc < 3)
25284 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25285 0 : jsval *argv = JS_ARGV(cx, vp);
25286 : nsresult rv;
25287 : nsIWebGLUniformLocation *arg0;
25288 0 : xpc_qsSelfRef arg0ref;
25289 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25290 0 : if (NS_FAILED(rv)) {
25291 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25292 0 : return JS_FALSE;
25293 : }
25294 : int32_t arg1;
25295 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25296 0 : return JS_FALSE;
25297 : int32_t arg2;
25298 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25299 0 : return JS_FALSE;
25300 0 : rv = self->Uniform2i(arg0, arg1, arg2);
25301 0 : if (NS_FAILED(rv))
25302 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25303 0 : *vp = JSVAL_VOID;
25304 0 : return JS_TRUE;
25305 : }
25306 :
25307 : static JSBool
25308 0 : nsIDOMWebGLRenderingContext_Uniform3f(JSContext *cx, unsigned argc, jsval *vp)
25309 : {
25310 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25311 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25312 0 : if (!obj)
25313 0 : return JS_FALSE;
25314 : nsIDOMWebGLRenderingContext *self;
25315 0 : xpc_qsSelfRef selfref;
25316 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25317 0 : return JS_FALSE;
25318 0 : if (argc < 4)
25319 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25320 0 : jsval *argv = JS_ARGV(cx, vp);
25321 : nsresult rv;
25322 : nsIWebGLUniformLocation *arg0;
25323 0 : xpc_qsSelfRef arg0ref;
25324 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25325 0 : if (NS_FAILED(rv)) {
25326 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25327 0 : return JS_FALSE;
25328 : }
25329 : double arg1_dbl;
25330 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25331 0 : return JS_FALSE;
25332 0 : float arg1 = (float) arg1_dbl;
25333 : double arg2_dbl;
25334 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25335 0 : return JS_FALSE;
25336 0 : float arg2 = (float) arg2_dbl;
25337 : double arg3_dbl;
25338 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25339 0 : return JS_FALSE;
25340 0 : float arg3 = (float) arg3_dbl;
25341 0 : rv = self->Uniform3f(arg0, arg1, arg2, arg3);
25342 0 : if (NS_FAILED(rv))
25343 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25344 0 : *vp = JSVAL_VOID;
25345 0 : return JS_TRUE;
25346 : }
25347 :
25348 : static JSBool
25349 0 : nsIDOMWebGLRenderingContext_Uniform3i(JSContext *cx, unsigned argc, jsval *vp)
25350 : {
25351 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25352 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25353 0 : if (!obj)
25354 0 : return JS_FALSE;
25355 : nsIDOMWebGLRenderingContext *self;
25356 0 : xpc_qsSelfRef selfref;
25357 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25358 0 : return JS_FALSE;
25359 0 : if (argc < 4)
25360 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25361 0 : jsval *argv = JS_ARGV(cx, vp);
25362 : nsresult rv;
25363 : nsIWebGLUniformLocation *arg0;
25364 0 : xpc_qsSelfRef arg0ref;
25365 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25366 0 : if (NS_FAILED(rv)) {
25367 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25368 0 : return JS_FALSE;
25369 : }
25370 : int32_t arg1;
25371 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25372 0 : return JS_FALSE;
25373 : int32_t arg2;
25374 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25375 0 : return JS_FALSE;
25376 : int32_t arg3;
25377 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
25378 0 : return JS_FALSE;
25379 0 : rv = self->Uniform3i(arg0, arg1, arg2, arg3);
25380 0 : if (NS_FAILED(rv))
25381 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25382 0 : *vp = JSVAL_VOID;
25383 0 : return JS_TRUE;
25384 : }
25385 :
25386 : static JSBool
25387 0 : nsIDOMWebGLRenderingContext_Uniform4f(JSContext *cx, unsigned argc, jsval *vp)
25388 : {
25389 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25390 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25391 0 : if (!obj)
25392 0 : return JS_FALSE;
25393 : nsIDOMWebGLRenderingContext *self;
25394 0 : xpc_qsSelfRef selfref;
25395 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25396 0 : return JS_FALSE;
25397 0 : if (argc < 5)
25398 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25399 0 : jsval *argv = JS_ARGV(cx, vp);
25400 : nsresult rv;
25401 : nsIWebGLUniformLocation *arg0;
25402 0 : xpc_qsSelfRef arg0ref;
25403 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25404 0 : if (NS_FAILED(rv)) {
25405 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25406 0 : return JS_FALSE;
25407 : }
25408 : double arg1_dbl;
25409 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25410 0 : return JS_FALSE;
25411 0 : float arg1 = (float) arg1_dbl;
25412 : double arg2_dbl;
25413 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25414 0 : return JS_FALSE;
25415 0 : float arg2 = (float) arg2_dbl;
25416 : double arg3_dbl;
25417 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25418 0 : return JS_FALSE;
25419 0 : float arg3 = (float) arg3_dbl;
25420 : double arg4_dbl;
25421 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
25422 0 : return JS_FALSE;
25423 0 : float arg4 = (float) arg4_dbl;
25424 0 : rv = self->Uniform4f(arg0, arg1, arg2, arg3, arg4);
25425 0 : if (NS_FAILED(rv))
25426 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25427 0 : *vp = JSVAL_VOID;
25428 0 : return JS_TRUE;
25429 : }
25430 :
25431 : static JSBool
25432 0 : nsIDOMWebGLRenderingContext_Uniform4i(JSContext *cx, unsigned argc, jsval *vp)
25433 : {
25434 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25435 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25436 0 : if (!obj)
25437 0 : return JS_FALSE;
25438 : nsIDOMWebGLRenderingContext *self;
25439 0 : xpc_qsSelfRef selfref;
25440 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25441 0 : return JS_FALSE;
25442 0 : if (argc < 5)
25443 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25444 0 : jsval *argv = JS_ARGV(cx, vp);
25445 : nsresult rv;
25446 : nsIWebGLUniformLocation *arg0;
25447 0 : xpc_qsSelfRef arg0ref;
25448 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25449 0 : if (NS_FAILED(rv)) {
25450 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25451 0 : return JS_FALSE;
25452 : }
25453 : int32_t arg1;
25454 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25455 0 : return JS_FALSE;
25456 : int32_t arg2;
25457 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25458 0 : return JS_FALSE;
25459 : int32_t arg3;
25460 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
25461 0 : return JS_FALSE;
25462 : int32_t arg4;
25463 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
25464 0 : return JS_FALSE;
25465 0 : rv = self->Uniform4i(arg0, arg1, arg2, arg3, arg4);
25466 0 : if (NS_FAILED(rv))
25467 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25468 0 : *vp = JSVAL_VOID;
25469 0 : return JS_TRUE;
25470 : }
25471 :
25472 : static JSBool
25473 0 : nsIDOMWebGLRenderingContext_UseProgram(JSContext *cx, unsigned argc, jsval *vp)
25474 : {
25475 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25476 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25477 0 : if (!obj)
25478 0 : return JS_FALSE;
25479 : nsIDOMWebGLRenderingContext *self;
25480 0 : xpc_qsSelfRef selfref;
25481 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25482 0 : return JS_FALSE;
25483 0 : if (argc < 1)
25484 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25485 0 : jsval *argv = JS_ARGV(cx, vp);
25486 : nsresult rv;
25487 : nsIWebGLProgram *arg0;
25488 0 : xpc_qsSelfRef arg0ref;
25489 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25490 0 : if (NS_FAILED(rv)) {
25491 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25492 0 : return JS_FALSE;
25493 : }
25494 0 : rv = self->UseProgram(arg0);
25495 0 : if (NS_FAILED(rv))
25496 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25497 0 : *vp = JSVAL_VOID;
25498 0 : return JS_TRUE;
25499 : }
25500 :
25501 : static JSBool
25502 0 : nsIDOMWebGLRenderingContext_ValidateProgram(JSContext *cx, unsigned argc, jsval *vp)
25503 : {
25504 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25505 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25506 0 : if (!obj)
25507 0 : return JS_FALSE;
25508 : nsIDOMWebGLRenderingContext *self;
25509 0 : xpc_qsSelfRef selfref;
25510 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25511 0 : return JS_FALSE;
25512 0 : if (argc < 1)
25513 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25514 0 : jsval *argv = JS_ARGV(cx, vp);
25515 : nsresult rv;
25516 : nsIWebGLProgram *arg0;
25517 0 : xpc_qsSelfRef arg0ref;
25518 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25519 0 : if (NS_FAILED(rv)) {
25520 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25521 0 : return JS_FALSE;
25522 : }
25523 0 : rv = self->ValidateProgram(arg0);
25524 0 : if (NS_FAILED(rv))
25525 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25526 0 : *vp = JSVAL_VOID;
25527 0 : return JS_TRUE;
25528 : }
25529 :
25530 : static JSBool
25531 0 : nsIDOMWebGLRenderingContext_VertexAttrib1f(JSContext *cx, unsigned argc, jsval *vp)
25532 : {
25533 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25534 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25535 0 : if (!obj)
25536 0 : return JS_FALSE;
25537 : nsIDOMWebGLRenderingContext *self;
25538 0 : xpc_qsSelfRef selfref;
25539 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25540 0 : return JS_FALSE;
25541 0 : if (argc < 2)
25542 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25543 0 : jsval *argv = JS_ARGV(cx, vp);
25544 : uint32_t arg0;
25545 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25546 0 : return JS_FALSE;
25547 : double arg1_dbl;
25548 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25549 0 : return JS_FALSE;
25550 0 : float arg1 = (float) arg1_dbl;
25551 : nsresult rv;
25552 0 : rv = self->VertexAttrib1f(arg0, arg1);
25553 0 : if (NS_FAILED(rv))
25554 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25555 0 : *vp = JSVAL_VOID;
25556 0 : return JS_TRUE;
25557 : }
25558 :
25559 : static JSBool
25560 0 : nsIDOMWebGLRenderingContext_VertexAttrib2f(JSContext *cx, unsigned argc, jsval *vp)
25561 : {
25562 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25563 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25564 0 : if (!obj)
25565 0 : return JS_FALSE;
25566 : nsIDOMWebGLRenderingContext *self;
25567 0 : xpc_qsSelfRef selfref;
25568 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25569 0 : return JS_FALSE;
25570 0 : if (argc < 3)
25571 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25572 0 : jsval *argv = JS_ARGV(cx, vp);
25573 : uint32_t arg0;
25574 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25575 0 : return JS_FALSE;
25576 : double arg1_dbl;
25577 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25578 0 : return JS_FALSE;
25579 0 : float arg1 = (float) arg1_dbl;
25580 : double arg2_dbl;
25581 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25582 0 : return JS_FALSE;
25583 0 : float arg2 = (float) arg2_dbl;
25584 : nsresult rv;
25585 0 : rv = self->VertexAttrib2f(arg0, arg1, arg2);
25586 0 : if (NS_FAILED(rv))
25587 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25588 0 : *vp = JSVAL_VOID;
25589 0 : return JS_TRUE;
25590 : }
25591 :
25592 : static JSBool
25593 0 : nsIDOMWebGLRenderingContext_VertexAttrib3f(JSContext *cx, unsigned argc, jsval *vp)
25594 : {
25595 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25596 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25597 0 : if (!obj)
25598 0 : return JS_FALSE;
25599 : nsIDOMWebGLRenderingContext *self;
25600 0 : xpc_qsSelfRef selfref;
25601 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25602 0 : return JS_FALSE;
25603 0 : if (argc < 4)
25604 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25605 0 : jsval *argv = JS_ARGV(cx, vp);
25606 : uint32_t arg0;
25607 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25608 0 : return JS_FALSE;
25609 : double arg1_dbl;
25610 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25611 0 : return JS_FALSE;
25612 0 : float arg1 = (float) arg1_dbl;
25613 : double arg2_dbl;
25614 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25615 0 : return JS_FALSE;
25616 0 : float arg2 = (float) arg2_dbl;
25617 : double arg3_dbl;
25618 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25619 0 : return JS_FALSE;
25620 0 : float arg3 = (float) arg3_dbl;
25621 : nsresult rv;
25622 0 : rv = self->VertexAttrib3f(arg0, arg1, arg2, arg3);
25623 0 : if (NS_FAILED(rv))
25624 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25625 0 : *vp = JSVAL_VOID;
25626 0 : return JS_TRUE;
25627 : }
25628 :
25629 : static JSBool
25630 0 : nsIDOMWebGLRenderingContext_VertexAttrib4f(JSContext *cx, unsigned argc, jsval *vp)
25631 : {
25632 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25633 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25634 0 : if (!obj)
25635 0 : return JS_FALSE;
25636 : nsIDOMWebGLRenderingContext *self;
25637 0 : xpc_qsSelfRef selfref;
25638 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25639 0 : return JS_FALSE;
25640 0 : if (argc < 5)
25641 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25642 0 : jsval *argv = JS_ARGV(cx, vp);
25643 : uint32_t arg0;
25644 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25645 0 : return JS_FALSE;
25646 : double arg1_dbl;
25647 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25648 0 : return JS_FALSE;
25649 0 : float arg1 = (float) arg1_dbl;
25650 : double arg2_dbl;
25651 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25652 0 : return JS_FALSE;
25653 0 : float arg2 = (float) arg2_dbl;
25654 : double arg3_dbl;
25655 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25656 0 : return JS_FALSE;
25657 0 : float arg3 = (float) arg3_dbl;
25658 : double arg4_dbl;
25659 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
25660 0 : return JS_FALSE;
25661 0 : float arg4 = (float) arg4_dbl;
25662 : nsresult rv;
25663 0 : rv = self->VertexAttrib4f(arg0, arg1, arg2, arg3, arg4);
25664 0 : if (NS_FAILED(rv))
25665 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25666 0 : *vp = JSVAL_VOID;
25667 0 : return JS_TRUE;
25668 : }
25669 :
25670 : static JSBool
25671 0 : nsIDOMWebGLRenderingContext_VertexAttribPointer(JSContext *cx, unsigned argc, jsval *vp)
25672 : {
25673 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25674 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25675 0 : if (!obj)
25676 0 : return JS_FALSE;
25677 : nsIDOMWebGLRenderingContext *self;
25678 0 : xpc_qsSelfRef selfref;
25679 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25680 0 : return JS_FALSE;
25681 0 : if (argc < 6)
25682 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25683 0 : jsval *argv = JS_ARGV(cx, vp);
25684 : uint32_t arg0;
25685 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25686 0 : return JS_FALSE;
25687 : int32_t arg1;
25688 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25689 0 : return JS_FALSE;
25690 : uint32_t arg2;
25691 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
25692 0 : return JS_FALSE;
25693 : JSBool arg3;
25694 0 : JS_ValueToBoolean(cx, argv[3], &arg3);
25695 : int32_t arg4;
25696 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
25697 0 : return JS_FALSE;
25698 : int32_t arg5;
25699 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
25700 0 : return JS_FALSE;
25701 : nsresult rv;
25702 0 : rv = self->VertexAttribPointer(arg0, arg1, arg2, arg3, arg4, arg5);
25703 0 : if (NS_FAILED(rv))
25704 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25705 0 : *vp = JSVAL_VOID;
25706 0 : return JS_TRUE;
25707 : }
25708 :
25709 : static JSBool
25710 0 : nsIDOMWebGLRenderingContext_Viewport(JSContext *cx, unsigned argc, jsval *vp)
25711 : {
25712 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25713 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25714 0 : if (!obj)
25715 0 : return JS_FALSE;
25716 : nsIDOMWebGLRenderingContext *self;
25717 0 : xpc_qsSelfRef selfref;
25718 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25719 0 : return JS_FALSE;
25720 0 : if (argc < 4)
25721 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25722 0 : jsval *argv = JS_ARGV(cx, vp);
25723 : int32_t arg0;
25724 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
25725 0 : return JS_FALSE;
25726 : int32_t arg1;
25727 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25728 0 : return JS_FALSE;
25729 : int32_t arg2;
25730 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25731 0 : return JS_FALSE;
25732 : int32_t arg3;
25733 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
25734 0 : return JS_FALSE;
25735 : nsresult rv;
25736 0 : rv = self->Viewport(arg0, arg1, arg2, arg3);
25737 0 : if (NS_FAILED(rv))
25738 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25739 0 : *vp = JSVAL_VOID;
25740 0 : return JS_TRUE;
25741 : }
25742 :
25743 : static JSBool
25744 0 : nsIDOMWebGLRenderingContext_GetExtension(JSContext *cx, unsigned argc, jsval *vp)
25745 : {
25746 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25747 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25748 0 : if (!obj)
25749 0 : return JS_FALSE;
25750 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
25751 : nsIDOMWebGLRenderingContext *self;
25752 0 : xpc_qsSelfRef selfref;
25753 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25754 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
25755 0 : return JS_FALSE;
25756 0 : if (argc < 1)
25757 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25758 0 : jsval *argv = JS_ARGV(cx, vp);
25759 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
25760 : xpc_qsDOMString::eDefaultNullBehavior,
25761 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
25762 0 : if (!arg0.IsValid())
25763 0 : return JS_FALSE;
25764 : nsresult rv;
25765 0 : nsCOMPtr<nsIWebGLExtension> result;
25766 0 : rv = self->GetExtension(arg0, getter_AddRefs(result));
25767 0 : if (NS_FAILED(rv))
25768 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25769 0 : if (!result) {
25770 0 : *vp = JSVAL_NULL;
25771 0 : return JS_TRUE;
25772 : }
25773 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
25774 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
25775 0 : return JS_TRUE;
25776 : }
25777 : // After this point do not use 'result'!
25778 0 : qsObjectHelper helper(result, cache);
25779 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLExtension), &interfaces[k_nsIWebGLExtension], vp);
25780 : }
25781 :
25782 : static JSBool
25783 0 : nsIDOMWebGLRenderingContext_GetSupportedExtensions(JSContext *cx, unsigned argc, jsval *vp)
25784 : {
25785 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25786 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25787 0 : if (!obj)
25788 0 : return JS_FALSE;
25789 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
25790 : nsIDOMWebGLRenderingContext *self;
25791 0 : xpc_qsSelfRef selfref;
25792 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25793 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
25794 0 : return JS_FALSE;
25795 : nsresult rv;
25796 0 : nsCOMPtr<nsIVariant> result;
25797 0 : rv = self->GetSupportedExtensions(getter_AddRefs(result));
25798 0 : if (NS_FAILED(rv))
25799 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25800 0 : return xpc_qsVariantToJsval(lccx, result, vp);
25801 : }
25802 :
25803 : static JSBool
25804 0 : nsIDOMWebGLRenderingContext_IsContextLost(JSContext *cx, unsigned argc, jsval *vp)
25805 : {
25806 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25807 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25808 0 : if (!obj)
25809 0 : return JS_FALSE;
25810 : nsIDOMWebGLRenderingContext *self;
25811 0 : xpc_qsSelfRef selfref;
25812 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25813 0 : return JS_FALSE;
25814 : nsresult rv;
25815 : WebGLboolean result;
25816 0 : rv = self->IsContextLost(&result);
25817 0 : if (NS_FAILED(rv))
25818 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25819 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
25820 0 : return JS_TRUE;
25821 : }
25822 :
25823 : static JSBool
25824 0 : nsIDOMWebGLRenderingContext_GetDrawingBufferWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25825 : {
25826 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25827 : nsIDOMWebGLRenderingContext *self;
25828 0 : xpc_qsSelfRef selfref;
25829 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25830 0 : return JS_FALSE;
25831 : nsresult rv;
25832 : WebGLsizei result;
25833 0 : rv = self->GetDrawingBufferWidth(&result);
25834 0 : if (NS_FAILED(rv))
25835 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25836 0 : *vp = INT_TO_JSVAL(result);
25837 0 : return JS_TRUE;
25838 : }
25839 :
25840 : static JSBool
25841 0 : nsIDOMWebGLRenderingContext_GetDrawingBufferHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25842 : {
25843 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25844 : nsIDOMWebGLRenderingContext *self;
25845 0 : xpc_qsSelfRef selfref;
25846 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25847 0 : return JS_FALSE;
25848 : nsresult rv;
25849 : WebGLsizei result;
25850 0 : rv = self->GetDrawingBufferHeight(&result);
25851 0 : if (NS_FAILED(rv))
25852 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25853 0 : *vp = INT_TO_JSVAL(result);
25854 0 : return JS_TRUE;
25855 : }
25856 :
25857 : // === interface nsIDOMNotifyAudioAvailableEvent
25858 :
25859 : static JSBool
25860 0 : nsIDOMNotifyAudioAvailableEvent_GetFrameBuffer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25861 : {
25862 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25863 : nsIDOMNotifyAudioAvailableEvent *self;
25864 0 : xpc_qsSelfRef selfref;
25865 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25866 0 : return JS_FALSE;
25867 : nsresult rv;
25868 0 : rv = self->GetFrameBuffer(cx, vp);
25869 0 : if (NS_FAILED(rv))
25870 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25871 0 : return JS_TRUE;
25872 : }
25873 :
25874 : static JSBool
25875 0 : nsIDOMNotifyAudioAvailableEvent_GetTime(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25876 : {
25877 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25878 : nsIDOMNotifyAudioAvailableEvent *self;
25879 0 : xpc_qsSelfRef selfref;
25880 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25881 0 : return JS_FALSE;
25882 : nsresult rv;
25883 : float result;
25884 0 : rv = self->GetTime(&result);
25885 0 : if (NS_FAILED(rv))
25886 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25887 0 : return JS_NewNumberValue(cx, result, vp);
25888 : }
25889 :
25890 : // === interface nsIDOMHTMLAudioElement
25891 :
25892 : static JSBool
25893 0 : nsIDOMHTMLAudioElement_MozWriteAudio(JSContext *cx, unsigned argc, jsval *vp)
25894 : {
25895 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25896 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25897 0 : if (!obj)
25898 0 : return JS_FALSE;
25899 : nsIDOMHTMLAudioElement *self;
25900 0 : xpc_qsSelfRef selfref;
25901 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25902 0 : return JS_FALSE;
25903 0 : if (argc < 1)
25904 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25905 0 : jsval *argv = JS_ARGV(cx, vp);
25906 0 : jsval arg0 = argv[0];
25907 : nsresult rv;
25908 : PRUint32 result;
25909 0 : rv = self->MozWriteAudio(arg0, cx, &result);
25910 0 : if (NS_FAILED(rv))
25911 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25912 0 : *vp = UINT_TO_JSVAL(result);
25913 0 : return JS_TRUE;
25914 : }
25915 :
25916 : // === interface nsIIDBCursor
25917 :
25918 : static JSBool
25919 0 : nsIIDBCursor_GetDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25920 : {
25921 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25922 : nsIIDBCursor *self;
25923 0 : xpc_qsSelfRef selfref;
25924 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25925 0 : return JS_FALSE;
25926 : nsresult rv;
25927 0 : nsString result;
25928 0 : rv = self->GetDirection(result);
25929 0 : if (NS_FAILED(rv))
25930 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25931 0 : return xpc::StringToJsval(cx, result, vp);
25932 : }
25933 :
25934 : static JSBool
25935 0 : nsIIDBCursor_GetSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25936 : {
25937 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25938 0 : JSObject *callee = nsnull;
25939 : nsIIDBCursor *self;
25940 0 : xpc_qsSelfRef selfref;
25941 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25942 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
25943 0 : return JS_FALSE;
25944 : nsresult rv;
25945 0 : nsCOMPtr<nsISupports> result;
25946 0 : rv = self->GetSource(getter_AddRefs(result));
25947 0 : if (NS_FAILED(rv))
25948 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25949 0 : if (!result) {
25950 0 : *vp = JSVAL_NULL;
25951 0 : return JS_TRUE;
25952 : }
25953 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
25954 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
25955 0 : return JS_TRUE;
25956 : }
25957 : // After this point do not use 'result'!
25958 0 : qsObjectHelper helper(result, cache);
25959 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
25960 : }
25961 :
25962 : static JSBool
25963 659 : nsIIDBCursor_GetKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25964 : {
25965 659 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25966 : nsIIDBCursor *self;
25967 1318 : xpc_qsSelfRef selfref;
25968 659 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25969 0 : return JS_FALSE;
25970 : nsresult rv;
25971 659 : rv = self->GetKey(cx, vp);
25972 659 : if (NS_FAILED(rv))
25973 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25974 659 : return JS_TRUE;
25975 : }
25976 :
25977 : static JSBool
25978 469 : nsIIDBCursor_GetPrimaryKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25979 : {
25980 469 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25981 : nsIIDBCursor *self;
25982 938 : xpc_qsSelfRef selfref;
25983 469 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25984 0 : return JS_FALSE;
25985 : nsresult rv;
25986 469 : rv = self->GetPrimaryKey(cx, vp);
25987 469 : if (NS_FAILED(rv))
25988 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25989 469 : return JS_TRUE;
25990 : }
25991 :
25992 : static JSBool
25993 1782 : nsIIDBCursor_Continue(JSContext *cx, unsigned argc, jsval *vp)
25994 : {
25995 1782 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25996 1782 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25997 1782 : if (!obj)
25998 0 : return JS_FALSE;
25999 : nsIIDBCursor *self;
26000 3564 : xpc_qsSelfRef selfref;
26001 1782 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
26002 0 : return JS_FALSE;
26003 1782 : jsval *argv = JS_ARGV(cx, vp);
26004 1782 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26005 : nsresult rv;
26006 1782 : rv = self->Continue(arg0, cx);
26007 1782 : if (NS_FAILED(rv))
26008 10 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26009 1772 : *vp = JSVAL_VOID;
26010 1772 : return JS_TRUE;
26011 : }
26012 :
26013 : static JSBool
26014 21 : nsIIDBCursor_Update(JSContext *cx, unsigned argc, jsval *vp)
26015 : {
26016 21 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26017 21 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26018 21 : if (!obj)
26019 0 : return JS_FALSE;
26020 21 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26021 : nsIIDBCursor *self;
26022 42 : xpc_qsSelfRef selfref;
26023 42 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26024 21 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26025 0 : return JS_FALSE;
26026 21 : if (argc < 1)
26027 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26028 21 : jsval *argv = JS_ARGV(cx, vp);
26029 21 : jsval arg0 = argv[0];
26030 : nsresult rv;
26031 42 : nsCOMPtr<nsIIDBRequest> result;
26032 21 : rv = self->Update(arg0, cx, getter_AddRefs(result));
26033 21 : if (NS_FAILED(rv))
26034 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26035 21 : if (!result) {
26036 0 : *vp = JSVAL_NULL;
26037 0 : return JS_TRUE;
26038 : }
26039 21 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26040 21 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26041 0 : return JS_TRUE;
26042 : }
26043 : // After this point do not use 'result'!
26044 42 : qsObjectHelper helper(result, cache);
26045 21 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26046 : }
26047 :
26048 : static JSBool
26049 9 : nsIIDBCursor_Delete(JSContext *cx, unsigned argc, jsval *vp)
26050 : {
26051 9 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26052 9 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26053 9 : if (!obj)
26054 0 : return JS_FALSE;
26055 9 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26056 : nsIIDBCursor *self;
26057 18 : xpc_qsSelfRef selfref;
26058 18 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26059 9 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26060 0 : return JS_FALSE;
26061 : nsresult rv;
26062 18 : nsCOMPtr<nsIIDBRequest> result;
26063 9 : rv = self->Delete(cx, getter_AddRefs(result));
26064 9 : if (NS_FAILED(rv))
26065 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26066 9 : if (!result) {
26067 0 : *vp = JSVAL_NULL;
26068 0 : return JS_TRUE;
26069 : }
26070 9 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26071 9 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26072 0 : return JS_TRUE;
26073 : }
26074 : // After this point do not use 'result'!
26075 18 : qsObjectHelper helper(result, cache);
26076 9 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26077 : }
26078 :
26079 : static JSBool
26080 6 : nsIIDBCursor_Advance(JSContext *cx, unsigned argc, jsval *vp)
26081 : {
26082 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26083 6 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26084 6 : if (!obj)
26085 0 : return JS_FALSE;
26086 : nsIIDBCursor *self;
26087 12 : xpc_qsSelfRef selfref;
26088 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
26089 0 : return JS_FALSE;
26090 6 : if (argc < 1)
26091 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26092 6 : jsval *argv = JS_ARGV(cx, vp);
26093 : int32_t arg0;
26094 6 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
26095 0 : return JS_FALSE;
26096 : nsresult rv;
26097 6 : rv = self->Advance(arg0);
26098 6 : if (NS_FAILED(rv))
26099 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26100 6 : *vp = JSVAL_VOID;
26101 6 : return JS_TRUE;
26102 : }
26103 :
26104 : // === interface nsIIDBCursorWithValue
26105 :
26106 : static JSBool
26107 697 : nsIIDBCursorWithValue_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26108 : {
26109 697 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26110 : nsIIDBCursorWithValue *self;
26111 1394 : xpc_qsSelfRef selfref;
26112 697 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26113 0 : return JS_FALSE;
26114 : nsresult rv;
26115 697 : rv = self->GetValue(cx, vp);
26116 697 : if (NS_FAILED(rv))
26117 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26118 697 : return JS_TRUE;
26119 : }
26120 :
26121 : // === interface nsIIDBDatabase
26122 :
26123 : static JSBool
26124 9 : nsIIDBDatabase_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26125 : {
26126 9 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26127 : nsIIDBDatabase *self;
26128 18 : xpc_qsSelfRef selfref;
26129 9 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26130 0 : return JS_FALSE;
26131 : nsresult rv;
26132 18 : nsString result;
26133 9 : rv = self->GetName(result);
26134 9 : if (NS_FAILED(rv))
26135 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26136 9 : return xpc::StringToJsval(cx, result, vp);
26137 : }
26138 :
26139 : static JSBool
26140 24 : nsIIDBDatabase_GetVersion(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26141 : {
26142 24 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26143 : nsIIDBDatabase *self;
26144 48 : xpc_qsSelfRef selfref;
26145 24 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26146 0 : return JS_FALSE;
26147 : nsresult rv;
26148 : PRUint64 result;
26149 24 : rv = self->GetVersion(&result);
26150 24 : if (NS_FAILED(rv))
26151 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26152 24 : return xpc_qsUint64ToJsval(cx, result, vp);
26153 : }
26154 :
26155 : static JSBool
26156 219 : nsIIDBDatabase_GetObjectStoreNames(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26157 : {
26158 219 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26159 219 : JSObject *callee = nsnull;
26160 : nsIIDBDatabase *self;
26161 438 : xpc_qsSelfRef selfref;
26162 438 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26163 219 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26164 0 : return JS_FALSE;
26165 : nsresult rv;
26166 438 : nsCOMPtr<nsIDOMDOMStringList> result;
26167 219 : rv = self->GetObjectStoreNames(getter_AddRefs(result));
26168 219 : if (NS_FAILED(rv))
26169 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26170 219 : if (!result) {
26171 0 : *vp = JSVAL_NULL;
26172 0 : return JS_TRUE;
26173 : }
26174 219 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26175 219 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26176 0 : return JS_TRUE;
26177 : }
26178 : // After this point do not use 'result'!
26179 438 : qsObjectHelper helper(result, cache);
26180 219 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringList), &interfaces[k_nsIDOMDOMStringList], vp);
26181 : }
26182 :
26183 : static JSBool
26184 202 : nsIIDBDatabase_CreateObjectStore(JSContext *cx, unsigned argc, jsval *vp)
26185 : {
26186 202 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26187 202 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26188 202 : if (!obj)
26189 0 : return JS_FALSE;
26190 202 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26191 : nsIIDBDatabase *self;
26192 404 : xpc_qsSelfRef selfref;
26193 404 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26194 202 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26195 0 : return JS_FALSE;
26196 202 : if (argc < 1)
26197 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26198 202 : jsval *argv = JS_ARGV(cx, vp);
26199 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
26200 : xpc_qsDOMString::eStringify,
26201 404 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26202 202 : if (!arg0.IsValid())
26203 0 : return JS_FALSE;
26204 202 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
26205 : nsresult rv;
26206 404 : nsCOMPtr<nsIIDBObjectStore> result;
26207 202 : rv = self->CreateObjectStore(arg0, arg1, cx, getter_AddRefs(result));
26208 202 : if (NS_FAILED(rv))
26209 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26210 201 : if (!result) {
26211 0 : *vp = JSVAL_NULL;
26212 0 : return JS_TRUE;
26213 : }
26214 201 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26215 201 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26216 0 : return JS_TRUE;
26217 : }
26218 : // After this point do not use 'result'!
26219 402 : qsObjectHelper helper(result, cache);
26220 201 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBObjectStore), &interfaces[k_nsIIDBObjectStore], vp);
26221 : }
26222 :
26223 : static JSBool
26224 123 : nsIIDBDatabase_DeleteObjectStore(JSContext *cx, unsigned argc, jsval *vp)
26225 : {
26226 123 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26227 123 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26228 123 : if (!obj)
26229 0 : return JS_FALSE;
26230 : nsIIDBDatabase *self;
26231 246 : xpc_qsSelfRef selfref;
26232 123 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
26233 0 : return JS_FALSE;
26234 123 : if (argc < 1)
26235 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26236 123 : jsval *argv = JS_ARGV(cx, vp);
26237 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
26238 : xpc_qsDOMString::eStringify,
26239 246 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26240 123 : if (!arg0.IsValid())
26241 0 : return JS_FALSE;
26242 : nsresult rv;
26243 123 : rv = self->DeleteObjectStore(arg0);
26244 123 : if (NS_FAILED(rv))
26245 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26246 123 : *vp = JSVAL_VOID;
26247 123 : return JS_TRUE;
26248 : }
26249 :
26250 : static JSBool
26251 651 : nsIIDBDatabase_Transaction(JSContext *cx, unsigned argc, jsval *vp)
26252 : {
26253 651 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26254 651 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26255 651 : if (!obj)
26256 0 : return JS_FALSE;
26257 651 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26258 : nsIIDBDatabase *self;
26259 1302 : xpc_qsSelfRef selfref;
26260 1302 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26261 651 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26262 0 : return JS_FALSE;
26263 651 : if (argc < 1)
26264 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26265 651 : jsval *argv = JS_ARGV(cx, vp);
26266 651 : jsval arg0 = argv[0];
26267 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
26268 : xpc_qsDOMString::eDefaultNullBehavior,
26269 1302 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26270 651 : if (!arg1.IsValid())
26271 0 : return JS_FALSE;
26272 : nsresult rv;
26273 1302 : nsCOMPtr<nsIIDBTransaction> result;
26274 651 : rv = self->Transaction(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
26275 651 : if (NS_FAILED(rv))
26276 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26277 649 : if (!result) {
26278 0 : *vp = JSVAL_NULL;
26279 0 : return JS_TRUE;
26280 : }
26281 649 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26282 649 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26283 0 : return JS_TRUE;
26284 : }
26285 : // After this point do not use 'result'!
26286 1298 : qsObjectHelper helper(result, cache);
26287 649 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBTransaction), &interfaces[k_nsIIDBTransaction], vp);
26288 : }
26289 :
26290 : static JSBool
26291 25 : nsIIDBDatabase_Close(JSContext *cx, unsigned argc, jsval *vp)
26292 : {
26293 25 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26294 25 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26295 25 : if (!obj)
26296 0 : return JS_FALSE;
26297 : nsIIDBDatabase *self;
26298 50 : xpc_qsSelfRef selfref;
26299 25 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
26300 0 : return JS_FALSE;
26301 : nsresult rv;
26302 25 : rv = self->Close();
26303 25 : if (NS_FAILED(rv))
26304 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26305 25 : *vp = JSVAL_VOID;
26306 25 : return JS_TRUE;
26307 : }
26308 :
26309 : static JSBool
26310 0 : nsIIDBDatabase_GetOnabort(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26311 : {
26312 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26313 0 : JSObject *callee = nsnull;
26314 : nsIIDBDatabase *self;
26315 0 : xpc_qsSelfRef selfref;
26316 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26317 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26318 0 : return JS_FALSE;
26319 : nsresult rv;
26320 0 : nsCOMPtr<nsIDOMEventListener> result;
26321 0 : rv = self->GetOnabort(getter_AddRefs(result));
26322 0 : if (NS_FAILED(rv))
26323 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26324 0 : if (!result) {
26325 0 : *vp = JSVAL_NULL;
26326 0 : return JS_TRUE;
26327 : }
26328 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26329 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26330 0 : return JS_TRUE;
26331 : }
26332 : // After this point do not use 'result'!
26333 0 : qsObjectHelper helper(result, cache);
26334 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
26335 : }
26336 :
26337 : static JSBool
26338 1 : nsIIDBDatabase_SetOnabort(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
26339 : {
26340 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26341 : nsIIDBDatabase *self;
26342 2 : xpc_qsSelfRef selfref;
26343 2 : JS::AutoValueRooter tvr(cx);
26344 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
26345 0 : return JS_FALSE;
26346 : nsresult rv;
26347 : nsIDOMEventListener *arg0;
26348 2 : xpc_qsSelfRef arg0ref;
26349 1 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
26350 1 : if (NS_FAILED(rv)) {
26351 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26352 0 : return JS_FALSE;
26353 : }
26354 1 : rv = self->SetOnabort(arg0);
26355 1 : if (NS_FAILED(rv))
26356 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26357 1 : return JS_TRUE;
26358 : }
26359 :
26360 : static JSBool
26361 0 : nsIIDBDatabase_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26362 : {
26363 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26364 0 : JSObject *callee = nsnull;
26365 : nsIIDBDatabase *self;
26366 0 : xpc_qsSelfRef selfref;
26367 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26368 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26369 0 : return JS_FALSE;
26370 : nsresult rv;
26371 0 : nsCOMPtr<nsIDOMEventListener> result;
26372 0 : rv = self->GetOnerror(getter_AddRefs(result));
26373 0 : if (NS_FAILED(rv))
26374 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26375 0 : if (!result) {
26376 0 : *vp = JSVAL_NULL;
26377 0 : return JS_TRUE;
26378 : }
26379 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26380 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26381 0 : return JS_TRUE;
26382 : }
26383 : // After this point do not use 'result'!
26384 0 : qsObjectHelper helper(result, cache);
26385 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
26386 : }
26387 :
26388 : static JSBool
26389 13 : nsIIDBDatabase_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
26390 : {
26391 13 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26392 : nsIIDBDatabase *self;
26393 26 : xpc_qsSelfRef selfref;
26394 26 : JS::AutoValueRooter tvr(cx);
26395 13 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
26396 0 : return JS_FALSE;
26397 : nsresult rv;
26398 : nsIDOMEventListener *arg0;
26399 26 : xpc_qsSelfRef arg0ref;
26400 13 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
26401 13 : if (NS_FAILED(rv)) {
26402 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26403 0 : return JS_FALSE;
26404 : }
26405 13 : rv = self->SetOnerror(arg0);
26406 13 : if (NS_FAILED(rv))
26407 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26408 13 : return JS_TRUE;
26409 : }
26410 :
26411 : static JSBool
26412 0 : nsIIDBDatabase_GetOnversionchange(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26413 : {
26414 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26415 0 : JSObject *callee = nsnull;
26416 : nsIIDBDatabase *self;
26417 0 : xpc_qsSelfRef selfref;
26418 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26419 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26420 0 : return JS_FALSE;
26421 : nsresult rv;
26422 0 : nsCOMPtr<nsIDOMEventListener> result;
26423 0 : rv = self->GetOnversionchange(getter_AddRefs(result));
26424 0 : if (NS_FAILED(rv))
26425 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26426 0 : if (!result) {
26427 0 : *vp = JSVAL_NULL;
26428 0 : return JS_TRUE;
26429 : }
26430 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26431 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26432 0 : return JS_TRUE;
26433 : }
26434 : // After this point do not use 'result'!
26435 0 : qsObjectHelper helper(result, cache);
26436 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
26437 : }
26438 :
26439 : static JSBool
26440 1 : nsIIDBDatabase_SetOnversionchange(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
26441 : {
26442 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26443 : nsIIDBDatabase *self;
26444 2 : xpc_qsSelfRef selfref;
26445 2 : JS::AutoValueRooter tvr(cx);
26446 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
26447 0 : return JS_FALSE;
26448 : nsresult rv;
26449 : nsIDOMEventListener *arg0;
26450 2 : xpc_qsSelfRef arg0ref;
26451 1 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
26452 1 : if (NS_FAILED(rv)) {
26453 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26454 0 : return JS_FALSE;
26455 : }
26456 1 : rv = self->SetOnversionchange(arg0);
26457 1 : if (NS_FAILED(rv))
26458 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26459 1 : return JS_TRUE;
26460 : }
26461 :
26462 : // === interface nsIIDBDatabaseException
26463 :
26464 : static JSBool
26465 170 : nsIIDBDatabaseException_GetCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26466 : {
26467 170 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26468 : nsIIDBDatabaseException *self;
26469 340 : xpc_qsSelfRef selfref;
26470 170 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26471 0 : return JS_FALSE;
26472 : nsresult rv;
26473 : PRUint16 result;
26474 170 : rv = self->GetCode(&result);
26475 170 : if (NS_FAILED(rv))
26476 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26477 170 : *vp = INT_TO_JSVAL((int32_t) result);
26478 170 : return JS_TRUE;
26479 : }
26480 :
26481 : // === interface nsIIDBIndex
26482 :
26483 : static JSBool
26484 15 : nsIIDBIndex_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26485 : {
26486 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26487 : nsIIDBIndex *self;
26488 30 : xpc_qsSelfRef selfref;
26489 15 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26490 0 : return JS_FALSE;
26491 : nsresult rv;
26492 30 : nsString result;
26493 15 : rv = self->GetName(result);
26494 15 : if (NS_FAILED(rv))
26495 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26496 15 : return xpc::StringToJsval(cx, result, vp);
26497 : }
26498 :
26499 : static JSBool
26500 3 : nsIIDBIndex_GetStoreName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26501 : {
26502 3 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26503 : nsIIDBIndex *self;
26504 6 : xpc_qsSelfRef selfref;
26505 3 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26506 0 : return JS_FALSE;
26507 : nsresult rv;
26508 6 : nsString result;
26509 3 : rv = self->GetStoreName(result);
26510 3 : if (NS_FAILED(rv))
26511 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26512 3 : return xpc::StringToJsval(cx, result, vp);
26513 : }
26514 :
26515 : static JSBool
26516 15 : nsIIDBIndex_GetKeyPath(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26517 : {
26518 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26519 : nsIIDBIndex *self;
26520 30 : xpc_qsSelfRef selfref;
26521 15 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26522 0 : return JS_FALSE;
26523 : nsresult rv;
26524 15 : rv = self->GetKeyPath(cx, vp);
26525 15 : if (NS_FAILED(rv))
26526 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26527 15 : return JS_TRUE;
26528 : }
26529 :
26530 : static JSBool
26531 15 : nsIIDBIndex_GetUnique(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26532 : {
26533 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26534 : nsIIDBIndex *self;
26535 30 : xpc_qsSelfRef selfref;
26536 15 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26537 0 : return JS_FALSE;
26538 : nsresult rv;
26539 : bool result;
26540 15 : rv = self->GetUnique(&result);
26541 15 : if (NS_FAILED(rv))
26542 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26543 15 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26544 15 : return JS_TRUE;
26545 : }
26546 :
26547 : static JSBool
26548 3 : nsIIDBIndex_GetMultiEntry(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26549 : {
26550 3 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26551 : nsIIDBIndex *self;
26552 6 : xpc_qsSelfRef selfref;
26553 3 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26554 0 : return JS_FALSE;
26555 : nsresult rv;
26556 : bool result;
26557 3 : rv = self->GetMultiEntry(&result);
26558 3 : if (NS_FAILED(rv))
26559 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26560 3 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26561 3 : return JS_TRUE;
26562 : }
26563 :
26564 : static JSBool
26565 0 : nsIIDBIndex_GetObjectStore(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26566 : {
26567 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26568 0 : JSObject *callee = nsnull;
26569 : nsIIDBIndex *self;
26570 0 : xpc_qsSelfRef selfref;
26571 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26572 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26573 0 : return JS_FALSE;
26574 : nsresult rv;
26575 0 : nsCOMPtr<nsIIDBObjectStore> result;
26576 0 : rv = self->GetObjectStore(getter_AddRefs(result));
26577 0 : if (NS_FAILED(rv))
26578 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26579 0 : if (!result) {
26580 0 : *vp = JSVAL_NULL;
26581 0 : return JS_TRUE;
26582 : }
26583 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26584 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26585 0 : return JS_TRUE;
26586 : }
26587 : // After this point do not use 'result'!
26588 0 : qsObjectHelper helper(result, cache);
26589 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBObjectStore), &interfaces[k_nsIIDBObjectStore], vp);
26590 : }
26591 :
26592 : static JSBool
26593 28 : nsIIDBIndex_Get(JSContext *cx, unsigned argc, jsval *vp)
26594 : {
26595 28 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26596 28 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26597 28 : if (!obj)
26598 0 : return JS_FALSE;
26599 28 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26600 : nsIIDBIndex *self;
26601 56 : xpc_qsSelfRef selfref;
26602 56 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26603 28 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26604 0 : return JS_FALSE;
26605 28 : if (argc < 1)
26606 1 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26607 27 : jsval *argv = JS_ARGV(cx, vp);
26608 27 : jsval arg0 = argv[0];
26609 : nsresult rv;
26610 54 : nsCOMPtr<nsIIDBRequest> result;
26611 27 : rv = self->Get(arg0, cx, getter_AddRefs(result));
26612 27 : if (NS_FAILED(rv))
26613 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26614 25 : if (!result) {
26615 0 : *vp = JSVAL_NULL;
26616 0 : return JS_TRUE;
26617 : }
26618 25 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26619 25 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26620 0 : return JS_TRUE;
26621 : }
26622 : // After this point do not use 'result'!
26623 50 : qsObjectHelper helper(result, cache);
26624 25 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26625 : }
26626 :
26627 : static JSBool
26628 15 : nsIIDBIndex_GetKey(JSContext *cx, unsigned argc, jsval *vp)
26629 : {
26630 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26631 15 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26632 15 : if (!obj)
26633 0 : return JS_FALSE;
26634 15 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26635 : nsIIDBIndex *self;
26636 30 : xpc_qsSelfRef selfref;
26637 30 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26638 15 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26639 0 : return JS_FALSE;
26640 15 : if (argc < 1)
26641 1 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26642 14 : jsval *argv = JS_ARGV(cx, vp);
26643 14 : jsval arg0 = argv[0];
26644 : nsresult rv;
26645 28 : nsCOMPtr<nsIIDBRequest> result;
26646 14 : rv = self->GetKey(arg0, cx, getter_AddRefs(result));
26647 14 : if (NS_FAILED(rv))
26648 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26649 12 : if (!result) {
26650 0 : *vp = JSVAL_NULL;
26651 0 : return JS_TRUE;
26652 : }
26653 12 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26654 12 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26655 0 : return JS_TRUE;
26656 : }
26657 : // After this point do not use 'result'!
26658 24 : qsObjectHelper helper(result, cache);
26659 12 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26660 : }
26661 :
26662 : static JSBool
26663 12 : nsIIDBIndex_GetAll(JSContext *cx, unsigned argc, jsval *vp)
26664 : {
26665 12 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26666 12 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26667 12 : if (!obj)
26668 0 : return JS_FALSE;
26669 12 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26670 : nsIIDBIndex *self;
26671 24 : xpc_qsSelfRef selfref;
26672 24 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26673 12 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26674 0 : return JS_FALSE;
26675 12 : jsval *argv = JS_ARGV(cx, vp);
26676 12 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26677 : uint32_t arg1;
26678 12 : if (!JS_ValueToECMAUint32(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
26679 0 : return JS_FALSE;
26680 : nsresult rv;
26681 24 : nsCOMPtr<nsIIDBRequest> result;
26682 12 : rv = self->GetAll(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26683 12 : if (NS_FAILED(rv))
26684 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26685 12 : if (!result) {
26686 0 : *vp = JSVAL_NULL;
26687 0 : return JS_TRUE;
26688 : }
26689 12 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26690 12 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26691 0 : return JS_TRUE;
26692 : }
26693 : // After this point do not use 'result'!
26694 24 : qsObjectHelper helper(result, cache);
26695 12 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26696 : }
26697 :
26698 : static JSBool
26699 12 : nsIIDBIndex_GetAllKeys(JSContext *cx, unsigned argc, jsval *vp)
26700 : {
26701 12 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26702 12 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26703 12 : if (!obj)
26704 0 : return JS_FALSE;
26705 12 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26706 : nsIIDBIndex *self;
26707 24 : xpc_qsSelfRef selfref;
26708 24 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26709 12 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26710 0 : return JS_FALSE;
26711 12 : jsval *argv = JS_ARGV(cx, vp);
26712 12 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26713 : uint32_t arg1;
26714 12 : if (!JS_ValueToECMAUint32(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
26715 0 : return JS_FALSE;
26716 : nsresult rv;
26717 24 : nsCOMPtr<nsIIDBRequest> result;
26718 12 : rv = self->GetAllKeys(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26719 12 : if (NS_FAILED(rv))
26720 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26721 12 : if (!result) {
26722 0 : *vp = JSVAL_NULL;
26723 0 : return JS_TRUE;
26724 : }
26725 12 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26726 12 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26727 0 : return JS_TRUE;
26728 : }
26729 : // After this point do not use 'result'!
26730 24 : qsObjectHelper helper(result, cache);
26731 12 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26732 : }
26733 :
26734 : static JSBool
26735 57 : nsIIDBIndex_OpenCursor(JSContext *cx, unsigned argc, jsval *vp)
26736 : {
26737 57 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26738 57 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26739 57 : if (!obj)
26740 0 : return JS_FALSE;
26741 57 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26742 : nsIIDBIndex *self;
26743 114 : xpc_qsSelfRef selfref;
26744 114 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26745 57 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26746 0 : return JS_FALSE;
26747 57 : jsval *argv = JS_ARGV(cx, vp);
26748 57 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26749 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
26750 : xpc_qsDOMString::eDefaultNullBehavior,
26751 114 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26752 57 : if (!arg1.IsValid())
26753 0 : return JS_FALSE;
26754 : nsresult rv;
26755 114 : nsCOMPtr<nsIIDBRequest> result;
26756 57 : rv = self->OpenCursor(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26757 57 : if (NS_FAILED(rv))
26758 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26759 57 : if (!result) {
26760 0 : *vp = JSVAL_NULL;
26761 0 : return JS_TRUE;
26762 : }
26763 57 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26764 57 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26765 0 : return JS_TRUE;
26766 : }
26767 : // After this point do not use 'result'!
26768 114 : qsObjectHelper helper(result, cache);
26769 57 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26770 : }
26771 :
26772 : static JSBool
26773 89 : nsIIDBIndex_OpenKeyCursor(JSContext *cx, unsigned argc, jsval *vp)
26774 : {
26775 89 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26776 89 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26777 89 : if (!obj)
26778 0 : return JS_FALSE;
26779 89 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26780 : nsIIDBIndex *self;
26781 178 : xpc_qsSelfRef selfref;
26782 178 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26783 89 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26784 0 : return JS_FALSE;
26785 89 : jsval *argv = JS_ARGV(cx, vp);
26786 89 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26787 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
26788 : xpc_qsDOMString::eDefaultNullBehavior,
26789 178 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26790 89 : if (!arg1.IsValid())
26791 0 : return JS_FALSE;
26792 : nsresult rv;
26793 178 : nsCOMPtr<nsIIDBRequest> result;
26794 89 : rv = self->OpenKeyCursor(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26795 89 : if (NS_FAILED(rv))
26796 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26797 89 : if (!result) {
26798 0 : *vp = JSVAL_NULL;
26799 0 : return JS_TRUE;
26800 : }
26801 89 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26802 89 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26803 0 : return JS_TRUE;
26804 : }
26805 : // After this point do not use 'result'!
26806 178 : qsObjectHelper helper(result, cache);
26807 89 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26808 : }
26809 :
26810 : static JSBool
26811 39 : nsIIDBIndex_Count(JSContext *cx, unsigned argc, jsval *vp)
26812 : {
26813 39 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26814 39 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26815 39 : if (!obj)
26816 0 : return JS_FALSE;
26817 39 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26818 : nsIIDBIndex *self;
26819 78 : xpc_qsSelfRef selfref;
26820 78 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26821 39 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26822 0 : return JS_FALSE;
26823 39 : jsval *argv = JS_ARGV(cx, vp);
26824 39 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26825 : nsresult rv;
26826 78 : nsCOMPtr<nsIIDBRequest> result;
26827 39 : rv = self->Count(arg0, cx, NS_MIN<PRUint32>(argc, 1) - 0, getter_AddRefs(result));
26828 39 : if (NS_FAILED(rv))
26829 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26830 39 : if (!result) {
26831 0 : *vp = JSVAL_NULL;
26832 0 : return JS_TRUE;
26833 : }
26834 39 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26835 39 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26836 0 : return JS_TRUE;
26837 : }
26838 : // After this point do not use 'result'!
26839 78 : qsObjectHelper helper(result, cache);
26840 39 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26841 : }
26842 :
26843 : // === interface nsIIDBKeyRange
26844 :
26845 : static JSBool
26846 0 : nsIIDBKeyRange_GetLower(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26847 : {
26848 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26849 : nsIIDBKeyRange *self;
26850 0 : xpc_qsSelfRef selfref;
26851 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26852 0 : return JS_FALSE;
26853 : nsresult rv;
26854 0 : rv = self->GetLower(cx, vp);
26855 0 : if (NS_FAILED(rv))
26856 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26857 0 : return JS_TRUE;
26858 : }
26859 :
26860 : static JSBool
26861 0 : nsIIDBKeyRange_GetUpper(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26862 : {
26863 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26864 : nsIIDBKeyRange *self;
26865 0 : xpc_qsSelfRef selfref;
26866 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26867 0 : return JS_FALSE;
26868 : nsresult rv;
26869 0 : rv = self->GetUpper(cx, vp);
26870 0 : if (NS_FAILED(rv))
26871 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26872 0 : return JS_TRUE;
26873 : }
26874 :
26875 : static JSBool
26876 0 : nsIIDBKeyRange_GetLowerOpen(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26877 : {
26878 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26879 : nsIIDBKeyRange *self;
26880 0 : xpc_qsSelfRef selfref;
26881 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26882 0 : return JS_FALSE;
26883 : nsresult rv;
26884 : bool result;
26885 0 : rv = self->GetLowerOpen(&result);
26886 0 : if (NS_FAILED(rv))
26887 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26888 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26889 0 : return JS_TRUE;
26890 : }
26891 :
26892 : static JSBool
26893 0 : nsIIDBKeyRange_GetUpperOpen(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26894 : {
26895 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26896 : nsIIDBKeyRange *self;
26897 0 : xpc_qsSelfRef selfref;
26898 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26899 0 : return JS_FALSE;
26900 : nsresult rv;
26901 : bool result;
26902 0 : rv = self->GetUpperOpen(&result);
26903 0 : if (NS_FAILED(rv))
26904 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26905 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26906 0 : return JS_TRUE;
26907 : }
26908 :
26909 : // === interface nsIIDBObjectStore
26910 :
26911 : static JSBool
26912 25 : nsIIDBObjectStore_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26913 : {
26914 25 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26915 : nsIIDBObjectStore *self;
26916 50 : xpc_qsSelfRef selfref;
26917 25 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26918 0 : return JS_FALSE;
26919 : nsresult rv;
26920 50 : nsString result;
26921 25 : rv = self->GetName(result);
26922 25 : if (NS_FAILED(rv))
26923 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26924 25 : return xpc::StringToJsval(cx, result, vp);
26925 : }
26926 :
26927 : static JSBool
26928 20 : nsIIDBObjectStore_GetKeyPath(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26929 : {
26930 20 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26931 : nsIIDBObjectStore *self;
26932 40 : xpc_qsSelfRef selfref;
26933 20 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26934 0 : return JS_FALSE;
26935 : nsresult rv;
26936 20 : rv = self->GetKeyPath(cx, vp);
26937 20 : if (NS_FAILED(rv))
26938 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26939 20 : return JS_TRUE;
26940 : }
26941 :
26942 : static JSBool
26943 150 : nsIIDBObjectStore_GetIndexNames(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26944 : {
26945 150 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26946 150 : JSObject *callee = nsnull;
26947 : nsIIDBObjectStore *self;
26948 300 : xpc_qsSelfRef selfref;
26949 300 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26950 150 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26951 0 : return JS_FALSE;
26952 : nsresult rv;
26953 300 : nsCOMPtr<nsIDOMDOMStringList> result;
26954 150 : rv = self->GetIndexNames(getter_AddRefs(result));
26955 150 : if (NS_FAILED(rv))
26956 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26957 150 : if (!result) {
26958 0 : *vp = JSVAL_NULL;
26959 0 : return JS_TRUE;
26960 : }
26961 150 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26962 150 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26963 0 : return JS_TRUE;
26964 : }
26965 : // After this point do not use 'result'!
26966 300 : qsObjectHelper helper(result, cache);
26967 150 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringList), &interfaces[k_nsIDOMDOMStringList], vp);
26968 : }
26969 :
26970 : static JSBool
26971 1 : nsIIDBObjectStore_GetTransaction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26972 : {
26973 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26974 1 : JSObject *callee = nsnull;
26975 : nsIIDBObjectStore *self;
26976 2 : xpc_qsSelfRef selfref;
26977 2 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26978 1 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26979 0 : return JS_FALSE;
26980 : nsresult rv;
26981 2 : nsCOMPtr<nsIIDBTransaction> result;
26982 1 : rv = self->GetTransaction(getter_AddRefs(result));
26983 1 : if (NS_FAILED(rv))
26984 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26985 1 : if (!result) {
26986 0 : *vp = JSVAL_NULL;
26987 0 : return JS_TRUE;
26988 : }
26989 1 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26990 1 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26991 0 : return JS_TRUE;
26992 : }
26993 : // After this point do not use 'result'!
26994 2 : qsObjectHelper helper(result, cache);
26995 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBTransaction), &interfaces[k_nsIIDBTransaction], vp);
26996 : }
26997 :
26998 : static JSBool
26999 0 : nsIIDBObjectStore_GetAutoIncrement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27000 : {
27001 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27002 : nsIIDBObjectStore *self;
27003 0 : xpc_qsSelfRef selfref;
27004 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27005 0 : return JS_FALSE;
27006 : nsresult rv;
27007 : bool result;
27008 0 : rv = self->GetAutoIncrement(&result);
27009 0 : if (NS_FAILED(rv))
27010 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27011 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
27012 0 : return JS_TRUE;
27013 : }
27014 :
27015 : static JSBool
27016 356 : nsIIDBObjectStore_Get(JSContext *cx, unsigned argc, jsval *vp)
27017 : {
27018 356 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27019 356 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27020 356 : if (!obj)
27021 0 : return JS_FALSE;
27022 356 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27023 : nsIIDBObjectStore *self;
27024 712 : xpc_qsSelfRef selfref;
27025 712 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27026 356 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27027 0 : return JS_FALSE;
27028 356 : if (argc < 1)
27029 1 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27030 355 : jsval *argv = JS_ARGV(cx, vp);
27031 355 : jsval arg0 = argv[0];
27032 : nsresult rv;
27033 710 : nsCOMPtr<nsIIDBRequest> result;
27034 355 : rv = self->Get(arg0, cx, getter_AddRefs(result));
27035 355 : if (NS_FAILED(rv))
27036 3 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27037 352 : if (!result) {
27038 0 : *vp = JSVAL_NULL;
27039 0 : return JS_TRUE;
27040 : }
27041 352 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27042 352 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27043 0 : return JS_TRUE;
27044 : }
27045 : // After this point do not use 'result'!
27046 704 : qsObjectHelper helper(result, cache);
27047 352 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27048 : }
27049 :
27050 : static JSBool
27051 18 : nsIIDBObjectStore_GetAll(JSContext *cx, unsigned argc, jsval *vp)
27052 : {
27053 18 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27054 18 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27055 18 : if (!obj)
27056 0 : return JS_FALSE;
27057 18 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27058 : nsIIDBObjectStore *self;
27059 36 : xpc_qsSelfRef selfref;
27060 36 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27061 18 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27062 0 : return JS_FALSE;
27063 18 : jsval *argv = JS_ARGV(cx, vp);
27064 18 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
27065 : uint32_t arg1;
27066 18 : if (!JS_ValueToECMAUint32(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
27067 0 : return JS_FALSE;
27068 : nsresult rv;
27069 36 : nsCOMPtr<nsIIDBRequest> result;
27070 18 : rv = self->GetAll(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
27071 18 : if (NS_FAILED(rv))
27072 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27073 17 : if (!result) {
27074 0 : *vp = JSVAL_NULL;
27075 0 : return JS_TRUE;
27076 : }
27077 17 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27078 17 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27079 0 : return JS_TRUE;
27080 : }
27081 : // After this point do not use 'result'!
27082 34 : qsObjectHelper helper(result, cache);
27083 17 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27084 : }
27085 :
27086 : static JSBool
27087 1827 : nsIIDBObjectStore_Add(JSContext *cx, unsigned argc, jsval *vp)
27088 : {
27089 1827 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27090 1827 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27091 1827 : if (!obj)
27092 0 : return JS_FALSE;
27093 1827 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27094 : nsIIDBObjectStore *self;
27095 3654 : xpc_qsSelfRef selfref;
27096 3654 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27097 1827 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27098 0 : return JS_FALSE;
27099 1827 : if (argc < 1)
27100 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27101 1827 : jsval *argv = JS_ARGV(cx, vp);
27102 1827 : jsval arg0 = argv[0];
27103 1827 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
27104 : nsresult rv;
27105 3654 : nsCOMPtr<nsIIDBRequest> result;
27106 1827 : rv = self->Add(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
27107 1827 : if (NS_FAILED(rv))
27108 50 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27109 1777 : if (!result) {
27110 0 : *vp = JSVAL_NULL;
27111 0 : return JS_TRUE;
27112 : }
27113 1777 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27114 1777 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27115 0 : return JS_TRUE;
27116 : }
27117 : // After this point do not use 'result'!
27118 3554 : qsObjectHelper helper(result, cache);
27119 1777 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27120 : }
27121 :
27122 : static JSBool
27123 111 : nsIIDBObjectStore_Put(JSContext *cx, unsigned argc, jsval *vp)
27124 : {
27125 111 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27126 111 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27127 111 : if (!obj)
27128 0 : return JS_FALSE;
27129 111 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27130 : nsIIDBObjectStore *self;
27131 222 : xpc_qsSelfRef selfref;
27132 222 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27133 111 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27134 0 : return JS_FALSE;
27135 111 : if (argc < 1)
27136 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27137 111 : jsval *argv = JS_ARGV(cx, vp);
27138 111 : jsval arg0 = argv[0];
27139 111 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
27140 : nsresult rv;
27141 222 : nsCOMPtr<nsIIDBRequest> result;
27142 111 : rv = self->Put(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
27143 111 : if (NS_FAILED(rv))
27144 72 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27145 39 : if (!result) {
27146 0 : *vp = JSVAL_NULL;
27147 0 : return JS_TRUE;
27148 : }
27149 39 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27150 39 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27151 0 : return JS_TRUE;
27152 : }
27153 : // After this point do not use 'result'!
27154 78 : qsObjectHelper helper(result, cache);
27155 39 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27156 : }
27157 :
27158 : static JSBool
27159 26 : nsIIDBObjectStore_Delete(JSContext *cx, unsigned argc, jsval *vp)
27160 : {
27161 26 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27162 26 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27163 26 : if (!obj)
27164 0 : return JS_FALSE;
27165 26 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27166 : nsIIDBObjectStore *self;
27167 52 : xpc_qsSelfRef selfref;
27168 52 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27169 26 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27170 0 : return JS_FALSE;
27171 26 : if (argc < 1)
27172 5 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27173 21 : jsval *argv = JS_ARGV(cx, vp);
27174 21 : jsval arg0 = argv[0];
27175 : nsresult rv;
27176 42 : nsCOMPtr<nsIIDBRequest> result;
27177 21 : rv = self->Delete(arg0, cx, getter_AddRefs(result));
27178 21 : if (NS_FAILED(rv))
27179 4 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27180 17 : if (!result) {
27181 0 : *vp = JSVAL_NULL;
27182 0 : return JS_TRUE;
27183 : }
27184 17 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27185 17 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27186 0 : return JS_TRUE;
27187 : }
27188 : // After this point do not use 'result'!
27189 34 : qsObjectHelper helper(result, cache);
27190 17 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27191 : }
27192 :
27193 : static JSBool
27194 11 : nsIIDBObjectStore_Clear(JSContext *cx, unsigned argc, jsval *vp)
27195 : {
27196 11 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27197 11 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27198 11 : if (!obj)
27199 0 : return JS_FALSE;
27200 11 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27201 : nsIIDBObjectStore *self;
27202 22 : xpc_qsSelfRef selfref;
27203 22 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27204 11 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27205 0 : return JS_FALSE;
27206 : nsresult rv;
27207 22 : nsCOMPtr<nsIIDBRequest> result;
27208 11 : rv = self->Clear(getter_AddRefs(result));
27209 11 : if (NS_FAILED(rv))
27210 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27211 10 : if (!result) {
27212 0 : *vp = JSVAL_NULL;
27213 0 : return JS_TRUE;
27214 : }
27215 10 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27216 10 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27217 0 : return JS_TRUE;
27218 : }
27219 : // After this point do not use 'result'!
27220 20 : qsObjectHelper helper(result, cache);
27221 10 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27222 : }
27223 :
27224 : static JSBool
27225 48 : nsIIDBObjectStore_OpenCursor(JSContext *cx, unsigned argc, jsval *vp)
27226 : {
27227 48 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27228 48 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27229 48 : if (!obj)
27230 0 : return JS_FALSE;
27231 48 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27232 : nsIIDBObjectStore *self;
27233 96 : xpc_qsSelfRef selfref;
27234 96 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27235 48 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27236 0 : return JS_FALSE;
27237 48 : jsval *argv = JS_ARGV(cx, vp);
27238 48 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
27239 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
27240 : xpc_qsDOMString::eDefaultNullBehavior,
27241 96 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27242 48 : if (!arg1.IsValid())
27243 0 : return JS_FALSE;
27244 : nsresult rv;
27245 96 : nsCOMPtr<nsIIDBRequest> result;
27246 48 : rv = self->OpenCursor(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
27247 48 : if (NS_FAILED(rv))
27248 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27249 47 : if (!result) {
27250 0 : *vp = JSVAL_NULL;
27251 0 : return JS_TRUE;
27252 : }
27253 47 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27254 47 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27255 0 : return JS_TRUE;
27256 : }
27257 : // After this point do not use 'result'!
27258 94 : qsObjectHelper helper(result, cache);
27259 47 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27260 : }
27261 :
27262 : static JSBool
27263 94 : nsIIDBObjectStore_CreateIndex(JSContext *cx, unsigned argc, jsval *vp)
27264 : {
27265 94 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27266 94 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27267 94 : if (!obj)
27268 0 : return JS_FALSE;
27269 94 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27270 : nsIIDBObjectStore *self;
27271 188 : xpc_qsSelfRef selfref;
27272 188 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27273 94 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27274 0 : return JS_FALSE;
27275 94 : if (argc < 2)
27276 2 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27277 92 : jsval *argv = JS_ARGV(cx, vp);
27278 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27279 : xpc_qsDOMString::eStringify,
27280 184 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27281 92 : if (!arg0.IsValid())
27282 0 : return JS_FALSE;
27283 92 : jsval arg1 = argv[1];
27284 92 : jsval arg2 = (2 < argc ? argv[2] : JSVAL_VOID);
27285 : nsresult rv;
27286 184 : nsCOMPtr<nsIIDBIndex> result;
27287 92 : rv = self->CreateIndex(arg0, arg1, arg2, cx, getter_AddRefs(result));
27288 92 : if (NS_FAILED(rv))
27289 7 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27290 85 : if (!result) {
27291 0 : *vp = JSVAL_NULL;
27292 0 : return JS_TRUE;
27293 : }
27294 85 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27295 85 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27296 0 : return JS_TRUE;
27297 : }
27298 : // After this point do not use 'result'!
27299 170 : qsObjectHelper helper(result, cache);
27300 85 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBIndex), &interfaces[k_nsIIDBIndex], vp);
27301 : }
27302 :
27303 : static JSBool
27304 94 : nsIIDBObjectStore_Index(JSContext *cx, unsigned argc, jsval *vp)
27305 : {
27306 94 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27307 94 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27308 94 : if (!obj)
27309 0 : return JS_FALSE;
27310 94 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27311 : nsIIDBObjectStore *self;
27312 188 : xpc_qsSelfRef selfref;
27313 188 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27314 94 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27315 0 : return JS_FALSE;
27316 94 : if (argc < 1)
27317 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27318 94 : jsval *argv = JS_ARGV(cx, vp);
27319 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27320 : xpc_qsDOMString::eStringify,
27321 188 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27322 94 : if (!arg0.IsValid())
27323 0 : return JS_FALSE;
27324 : nsresult rv;
27325 188 : nsCOMPtr<nsIIDBIndex> result;
27326 94 : rv = self->Index(arg0, getter_AddRefs(result));
27327 94 : if (NS_FAILED(rv))
27328 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27329 92 : if (!result) {
27330 0 : *vp = JSVAL_NULL;
27331 0 : return JS_TRUE;
27332 : }
27333 92 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27334 92 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27335 0 : return JS_TRUE;
27336 : }
27337 : // After this point do not use 'result'!
27338 184 : qsObjectHelper helper(result, cache);
27339 92 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBIndex), &interfaces[k_nsIIDBIndex], vp);
27340 : }
27341 :
27342 : static JSBool
27343 25 : nsIIDBObjectStore_DeleteIndex(JSContext *cx, unsigned argc, jsval *vp)
27344 : {
27345 25 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27346 25 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27347 25 : if (!obj)
27348 0 : return JS_FALSE;
27349 : nsIIDBObjectStore *self;
27350 50 : xpc_qsSelfRef selfref;
27351 25 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
27352 0 : return JS_FALSE;
27353 25 : if (argc < 1)
27354 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27355 25 : jsval *argv = JS_ARGV(cx, vp);
27356 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27357 : xpc_qsDOMString::eStringify,
27358 50 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27359 25 : if (!arg0.IsValid())
27360 0 : return JS_FALSE;
27361 : nsresult rv;
27362 25 : rv = self->DeleteIndex(arg0);
27363 25 : if (NS_FAILED(rv))
27364 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27365 24 : *vp = JSVAL_VOID;
27366 24 : return JS_TRUE;
27367 : }
27368 :
27369 : static JSBool
27370 32 : nsIIDBObjectStore_Count(JSContext *cx, unsigned argc, jsval *vp)
27371 : {
27372 32 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27373 32 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27374 32 : if (!obj)
27375 0 : return JS_FALSE;
27376 32 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27377 : nsIIDBObjectStore *self;
27378 64 : xpc_qsSelfRef selfref;
27379 64 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27380 32 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27381 0 : return JS_FALSE;
27382 32 : jsval *argv = JS_ARGV(cx, vp);
27383 32 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
27384 : nsresult rv;
27385 64 : nsCOMPtr<nsIIDBRequest> result;
27386 32 : rv = self->Count(arg0, cx, NS_MIN<PRUint32>(argc, 1) - 0, getter_AddRefs(result));
27387 32 : if (NS_FAILED(rv))
27388 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27389 32 : if (!result) {
27390 0 : *vp = JSVAL_NULL;
27391 0 : return JS_TRUE;
27392 : }
27393 32 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27394 32 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27395 0 : return JS_TRUE;
27396 : }
27397 : // After this point do not use 'result'!
27398 64 : qsObjectHelper helper(result, cache);
27399 32 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27400 : }
27401 :
27402 : // === interface nsIIDBRequest
27403 :
27404 : static JSBool
27405 6 : nsIIDBRequest_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27406 : {
27407 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27408 : nsIIDBRequest *self;
27409 12 : xpc_qsSelfRef selfref;
27410 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27411 0 : return JS_FALSE;
27412 : nsresult rv;
27413 12 : nsString result;
27414 6 : rv = self->GetReadyState(result);
27415 6 : if (NS_FAILED(rv))
27416 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27417 6 : return xpc::StringToJsval(cx, result, vp);
27418 : }
27419 :
27420 : static JSBool
27421 4 : nsIIDBRequest_GetSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27422 : {
27423 4 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27424 4 : JSObject *callee = nsnull;
27425 : nsIIDBRequest *self;
27426 8 : xpc_qsSelfRef selfref;
27427 8 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27428 4 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27429 0 : return JS_FALSE;
27430 : nsresult rv;
27431 8 : nsCOMPtr<nsISupports> result;
27432 4 : rv = self->GetSource(getter_AddRefs(result));
27433 4 : if (NS_FAILED(rv))
27434 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27435 4 : if (!result) {
27436 3 : *vp = JSVAL_NULL;
27437 3 : return JS_TRUE;
27438 : }
27439 1 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27440 1 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27441 0 : return JS_TRUE;
27442 : }
27443 : // After this point do not use 'result'!
27444 2 : qsObjectHelper helper(result, cache);
27445 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
27446 : }
27447 :
27448 : static JSBool
27449 768 : nsIIDBRequest_GetTransaction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27450 : {
27451 768 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27452 768 : JSObject *callee = nsnull;
27453 : nsIIDBRequest *self;
27454 1536 : xpc_qsSelfRef selfref;
27455 1536 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27456 768 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27457 0 : return JS_FALSE;
27458 : nsresult rv;
27459 1536 : nsCOMPtr<nsIIDBTransaction> result;
27460 768 : rv = self->GetTransaction(getter_AddRefs(result));
27461 768 : if (NS_FAILED(rv))
27462 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27463 768 : if (!result) {
27464 1 : *vp = JSVAL_NULL;
27465 1 : return JS_TRUE;
27466 : }
27467 767 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27468 767 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27469 0 : return JS_TRUE;
27470 : }
27471 : // After this point do not use 'result'!
27472 1534 : qsObjectHelper helper(result, cache);
27473 767 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBTransaction), &interfaces[k_nsIIDBTransaction], vp);
27474 : }
27475 :
27476 : static JSBool
27477 3099 : nsIIDBRequest_GetResult(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27478 : {
27479 3099 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27480 : nsIIDBRequest *self;
27481 6198 : xpc_qsSelfRef selfref;
27482 3099 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27483 0 : return JS_FALSE;
27484 : nsresult rv;
27485 3099 : rv = self->GetResult(vp);
27486 3099 : if (NS_FAILED(rv))
27487 1 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27488 3098 : return JS_TRUE;
27489 : }
27490 :
27491 : static JSBool
27492 19 : nsIIDBRequest_GetErrorCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27493 : {
27494 19 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27495 : nsIIDBRequest *self;
27496 38 : xpc_qsSelfRef selfref;
27497 19 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27498 0 : return JS_FALSE;
27499 : nsresult rv;
27500 : PRUint16 result;
27501 19 : rv = self->GetErrorCode(&result);
27502 19 : if (NS_FAILED(rv))
27503 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27504 19 : *vp = INT_TO_JSVAL((int32_t) result);
27505 19 : return JS_TRUE;
27506 : }
27507 :
27508 : static JSBool
27509 0 : nsIIDBRequest_GetOnsuccess(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27510 : {
27511 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27512 0 : JSObject *callee = nsnull;
27513 : nsIIDBRequest *self;
27514 0 : xpc_qsSelfRef selfref;
27515 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27516 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27517 0 : return JS_FALSE;
27518 : nsresult rv;
27519 0 : nsCOMPtr<nsIDOMEventListener> result;
27520 0 : rv = self->GetOnsuccess(getter_AddRefs(result));
27521 0 : if (NS_FAILED(rv))
27522 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27523 0 : if (!result) {
27524 0 : *vp = JSVAL_NULL;
27525 0 : return JS_TRUE;
27526 : }
27527 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27528 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27529 0 : return JS_TRUE;
27530 : }
27531 : // After this point do not use 'result'!
27532 0 : qsObjectHelper helper(result, cache);
27533 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27534 : }
27535 :
27536 : static JSBool
27537 1498 : nsIIDBRequest_SetOnsuccess(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27538 : {
27539 1498 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27540 : nsIIDBRequest *self;
27541 2996 : xpc_qsSelfRef selfref;
27542 2996 : JS::AutoValueRooter tvr(cx);
27543 1498 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27544 0 : return JS_FALSE;
27545 : nsresult rv;
27546 : nsIDOMEventListener *arg0;
27547 2996 : xpc_qsSelfRef arg0ref;
27548 1498 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27549 1498 : if (NS_FAILED(rv)) {
27550 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27551 0 : return JS_FALSE;
27552 : }
27553 1498 : rv = self->SetOnsuccess(arg0);
27554 1498 : if (NS_FAILED(rv))
27555 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27556 1498 : return JS_TRUE;
27557 : }
27558 :
27559 : static JSBool
27560 0 : nsIIDBRequest_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27561 : {
27562 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27563 0 : JSObject *callee = nsnull;
27564 : nsIIDBRequest *self;
27565 0 : xpc_qsSelfRef selfref;
27566 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27567 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27568 0 : return JS_FALSE;
27569 : nsresult rv;
27570 0 : nsCOMPtr<nsIDOMEventListener> result;
27571 0 : rv = self->GetOnerror(getter_AddRefs(result));
27572 0 : if (NS_FAILED(rv))
27573 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27574 0 : if (!result) {
27575 0 : *vp = JSVAL_NULL;
27576 0 : return JS_TRUE;
27577 : }
27578 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27579 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27580 0 : return JS_TRUE;
27581 : }
27582 : // After this point do not use 'result'!
27583 0 : qsObjectHelper helper(result, cache);
27584 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27585 : }
27586 :
27587 : static JSBool
27588 1993 : nsIIDBRequest_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27589 : {
27590 1993 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27591 : nsIIDBRequest *self;
27592 3986 : xpc_qsSelfRef selfref;
27593 3986 : JS::AutoValueRooter tvr(cx);
27594 1993 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27595 0 : return JS_FALSE;
27596 : nsresult rv;
27597 : nsIDOMEventListener *arg0;
27598 3986 : xpc_qsSelfRef arg0ref;
27599 1993 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27600 1993 : if (NS_FAILED(rv)) {
27601 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27602 0 : return JS_FALSE;
27603 : }
27604 1993 : rv = self->SetOnerror(arg0);
27605 1993 : if (NS_FAILED(rv))
27606 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27607 1993 : return JS_TRUE;
27608 : }
27609 :
27610 : // === interface nsIIDBTransaction
27611 :
27612 : static JSBool
27613 28 : nsIIDBTransaction_GetDb(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27614 : {
27615 28 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27616 28 : JSObject *callee = nsnull;
27617 : nsIIDBTransaction *self;
27618 56 : xpc_qsSelfRef selfref;
27619 56 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27620 28 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27621 0 : return JS_FALSE;
27622 : nsresult rv;
27623 56 : nsCOMPtr<nsIIDBDatabase> result;
27624 28 : rv = self->GetDb(getter_AddRefs(result));
27625 28 : if (NS_FAILED(rv))
27626 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27627 28 : if (!result) {
27628 0 : *vp = JSVAL_NULL;
27629 0 : return JS_TRUE;
27630 : }
27631 28 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27632 28 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27633 0 : return JS_TRUE;
27634 : }
27635 : // After this point do not use 'result'!
27636 56 : qsObjectHelper helper(result, cache);
27637 28 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBDatabase), &interfaces[k_nsIIDBDatabase], vp);
27638 : }
27639 :
27640 : static JSBool
27641 298 : nsIIDBTransaction_GetMode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27642 : {
27643 298 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27644 : nsIIDBTransaction *self;
27645 596 : xpc_qsSelfRef selfref;
27646 298 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27647 0 : return JS_FALSE;
27648 : nsresult rv;
27649 596 : nsString result;
27650 298 : rv = self->GetMode(result);
27651 298 : if (NS_FAILED(rv))
27652 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27653 298 : return xpc::StringToJsval(cx, result, vp);
27654 : }
27655 :
27656 : static JSBool
27657 142 : nsIIDBTransaction_GetObjectStoreNames(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27658 : {
27659 142 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27660 142 : JSObject *callee = nsnull;
27661 : nsIIDBTransaction *self;
27662 284 : xpc_qsSelfRef selfref;
27663 284 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27664 142 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27665 0 : return JS_FALSE;
27666 : nsresult rv;
27667 284 : nsCOMPtr<nsIDOMDOMStringList> result;
27668 142 : rv = self->GetObjectStoreNames(getter_AddRefs(result));
27669 142 : if (NS_FAILED(rv))
27670 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27671 142 : if (!result) {
27672 0 : *vp = JSVAL_NULL;
27673 0 : return JS_TRUE;
27674 : }
27675 142 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27676 142 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27677 0 : return JS_TRUE;
27678 : }
27679 : // After this point do not use 'result'!
27680 284 : qsObjectHelper helper(result, cache);
27681 142 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringList), &interfaces[k_nsIDOMDOMStringList], vp);
27682 : }
27683 :
27684 : static JSBool
27685 660 : nsIIDBTransaction_ObjectStore(JSContext *cx, unsigned argc, jsval *vp)
27686 : {
27687 660 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27688 660 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27689 660 : if (!obj)
27690 0 : return JS_FALSE;
27691 660 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27692 : nsIIDBTransaction *self;
27693 1320 : xpc_qsSelfRef selfref;
27694 1320 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27695 660 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27696 0 : return JS_FALSE;
27697 660 : if (argc < 1)
27698 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27699 660 : jsval *argv = JS_ARGV(cx, vp);
27700 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27701 : xpc_qsDOMString::eStringify,
27702 1320 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27703 660 : if (!arg0.IsValid())
27704 0 : return JS_FALSE;
27705 : nsresult rv;
27706 1320 : nsCOMPtr<nsIIDBObjectStore> result;
27707 660 : rv = self->ObjectStore(arg0, getter_AddRefs(result));
27708 660 : if (NS_FAILED(rv))
27709 3 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27710 657 : if (!result) {
27711 0 : *vp = JSVAL_NULL;
27712 0 : return JS_TRUE;
27713 : }
27714 657 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27715 657 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27716 0 : return JS_TRUE;
27717 : }
27718 : // After this point do not use 'result'!
27719 1314 : qsObjectHelper helper(result, cache);
27720 657 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBObjectStore), &interfaces[k_nsIIDBObjectStore], vp);
27721 : }
27722 :
27723 : static JSBool
27724 14 : nsIIDBTransaction_Abort(JSContext *cx, unsigned argc, jsval *vp)
27725 : {
27726 14 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27727 14 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27728 14 : if (!obj)
27729 0 : return JS_FALSE;
27730 : nsIIDBTransaction *self;
27731 28 : xpc_qsSelfRef selfref;
27732 14 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
27733 0 : return JS_FALSE;
27734 : nsresult rv;
27735 14 : rv = self->Abort();
27736 14 : if (NS_FAILED(rv))
27737 4 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27738 10 : *vp = JSVAL_VOID;
27739 10 : return JS_TRUE;
27740 : }
27741 :
27742 : static JSBool
27743 0 : nsIIDBTransaction_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27744 : {
27745 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27746 0 : JSObject *callee = nsnull;
27747 : nsIIDBTransaction *self;
27748 0 : xpc_qsSelfRef selfref;
27749 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27750 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27751 0 : return JS_FALSE;
27752 : nsresult rv;
27753 0 : nsCOMPtr<nsIDOMEventListener> result;
27754 0 : rv = self->GetOnerror(getter_AddRefs(result));
27755 0 : if (NS_FAILED(rv))
27756 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27757 0 : if (!result) {
27758 0 : *vp = JSVAL_NULL;
27759 0 : return JS_TRUE;
27760 : }
27761 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27762 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27763 0 : return JS_TRUE;
27764 : }
27765 : // After this point do not use 'result'!
27766 0 : qsObjectHelper helper(result, cache);
27767 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27768 : }
27769 :
27770 : static JSBool
27771 0 : nsIIDBTransaction_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27772 : {
27773 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27774 : nsIIDBTransaction *self;
27775 0 : xpc_qsSelfRef selfref;
27776 0 : JS::AutoValueRooter tvr(cx);
27777 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27778 0 : return JS_FALSE;
27779 : nsresult rv;
27780 : nsIDOMEventListener *arg0;
27781 0 : xpc_qsSelfRef arg0ref;
27782 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27783 0 : if (NS_FAILED(rv)) {
27784 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27785 0 : return JS_FALSE;
27786 : }
27787 0 : rv = self->SetOnerror(arg0);
27788 0 : if (NS_FAILED(rv))
27789 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27790 0 : return JS_TRUE;
27791 : }
27792 :
27793 : static JSBool
27794 1 : nsIIDBTransaction_GetOncomplete(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27795 : {
27796 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27797 1 : JSObject *callee = nsnull;
27798 : nsIIDBTransaction *self;
27799 2 : xpc_qsSelfRef selfref;
27800 2 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27801 1 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27802 0 : return JS_FALSE;
27803 : nsresult rv;
27804 2 : nsCOMPtr<nsIDOMEventListener> result;
27805 1 : rv = self->GetOncomplete(getter_AddRefs(result));
27806 1 : if (NS_FAILED(rv))
27807 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27808 1 : if (!result) {
27809 1 : *vp = JSVAL_NULL;
27810 1 : return JS_TRUE;
27811 : }
27812 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27813 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27814 0 : return JS_TRUE;
27815 : }
27816 : // After this point do not use 'result'!
27817 0 : qsObjectHelper helper(result, cache);
27818 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27819 : }
27820 :
27821 : static JSBool
27822 277 : nsIIDBTransaction_SetOncomplete(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27823 : {
27824 277 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27825 : nsIIDBTransaction *self;
27826 554 : xpc_qsSelfRef selfref;
27827 554 : JS::AutoValueRooter tvr(cx);
27828 277 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27829 0 : return JS_FALSE;
27830 : nsresult rv;
27831 : nsIDOMEventListener *arg0;
27832 554 : xpc_qsSelfRef arg0ref;
27833 277 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27834 277 : if (NS_FAILED(rv)) {
27835 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27836 0 : return JS_FALSE;
27837 : }
27838 277 : rv = self->SetOncomplete(arg0);
27839 277 : if (NS_FAILED(rv))
27840 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27841 277 : return JS_TRUE;
27842 : }
27843 :
27844 : static JSBool
27845 2 : nsIIDBTransaction_GetOnabort(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27846 : {
27847 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27848 2 : JSObject *callee = nsnull;
27849 : nsIIDBTransaction *self;
27850 4 : xpc_qsSelfRef selfref;
27851 4 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27852 2 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27853 0 : return JS_FALSE;
27854 : nsresult rv;
27855 4 : nsCOMPtr<nsIDOMEventListener> result;
27856 2 : rv = self->GetOnabort(getter_AddRefs(result));
27857 2 : if (NS_FAILED(rv))
27858 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27859 2 : if (!result) {
27860 2 : *vp = JSVAL_NULL;
27861 2 : return JS_TRUE;
27862 : }
27863 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27864 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27865 0 : return JS_TRUE;
27866 : }
27867 : // After this point do not use 'result'!
27868 0 : qsObjectHelper helper(result, cache);
27869 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27870 : }
27871 :
27872 : static JSBool
27873 6 : nsIIDBTransaction_SetOnabort(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27874 : {
27875 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27876 : nsIIDBTransaction *self;
27877 12 : xpc_qsSelfRef selfref;
27878 12 : JS::AutoValueRooter tvr(cx);
27879 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27880 0 : return JS_FALSE;
27881 : nsresult rv;
27882 : nsIDOMEventListener *arg0;
27883 12 : xpc_qsSelfRef arg0ref;
27884 6 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27885 6 : if (NS_FAILED(rv)) {
27886 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27887 0 : return JS_FALSE;
27888 : }
27889 6 : rv = self->SetOnabort(arg0);
27890 6 : if (NS_FAILED(rv))
27891 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27892 6 : return JS_TRUE;
27893 : }
27894 :
27895 : // === interface nsIIDBFactory
27896 :
27897 : static JSBool
27898 76 : nsIIDBFactory_Open(JSContext *cx, unsigned argc, jsval *vp)
27899 : {
27900 76 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27901 76 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27902 76 : if (!obj)
27903 0 : return JS_FALSE;
27904 76 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27905 : nsIIDBFactory *self;
27906 152 : xpc_qsSelfRef selfref;
27907 152 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27908 76 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27909 0 : return JS_FALSE;
27910 76 : if (argc < 1)
27911 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27912 76 : jsval *argv = JS_ARGV(cx, vp);
27913 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27914 : xpc_qsDOMString::eStringify,
27915 152 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27916 76 : if (!arg0.IsValid())
27917 0 : return JS_FALSE;
27918 : PRInt64 arg1;
27919 76 : if (!xpc_qsValueToInt64(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
27920 0 : return JS_FALSE;
27921 : nsresult rv;
27922 152 : nsCOMPtr<nsIIDBOpenDBRequest> result;
27923 76 : rv = self->Open(arg0, arg1, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
27924 76 : if (NS_FAILED(rv))
27925 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27926 76 : if (!result) {
27927 0 : *vp = JSVAL_NULL;
27928 0 : return JS_TRUE;
27929 : }
27930 76 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27931 76 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27932 0 : return JS_TRUE;
27933 : }
27934 : // After this point do not use 'result'!
27935 152 : qsObjectHelper helper(result, cache);
27936 76 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBOpenDBRequest), &interfaces[k_nsIIDBOpenDBRequest], vp);
27937 : }
27938 :
27939 : static JSBool
27940 0 : nsIIDBFactory_DeleteDatabase(JSContext *cx, unsigned argc, jsval *vp)
27941 : {
27942 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27943 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27944 0 : if (!obj)
27945 0 : return JS_FALSE;
27946 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27947 : nsIIDBFactory *self;
27948 0 : xpc_qsSelfRef selfref;
27949 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27950 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27951 0 : return JS_FALSE;
27952 0 : if (argc < 1)
27953 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27954 0 : jsval *argv = JS_ARGV(cx, vp);
27955 0 : xpc_qsAString arg0(cx, argv[0], &argv[0]);
27956 0 : if (!arg0.IsValid())
27957 0 : return JS_FALSE;
27958 : nsresult rv;
27959 0 : nsCOMPtr<nsIIDBOpenDBRequest> result;
27960 0 : rv = self->DeleteDatabase(arg0, getter_AddRefs(result));
27961 0 : if (NS_FAILED(rv))
27962 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27963 0 : if (!result) {
27964 0 : *vp = JSVAL_NULL;
27965 0 : return JS_TRUE;
27966 : }
27967 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27968 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27969 0 : return JS_TRUE;
27970 : }
27971 : // After this point do not use 'result'!
27972 0 : qsObjectHelper helper(result, cache);
27973 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBOpenDBRequest), &interfaces[k_nsIIDBOpenDBRequest], vp);
27974 : }
27975 :
27976 : static JSBool
27977 2864 : nsIIDBFactory_Cmp(JSContext *cx, unsigned argc, jsval *vp)
27978 : {
27979 2864 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27980 2864 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27981 2864 : if (!obj)
27982 0 : return JS_FALSE;
27983 : nsIIDBFactory *self;
27984 5728 : xpc_qsSelfRef selfref;
27985 2864 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
27986 0 : return JS_FALSE;
27987 2864 : if (argc < 2)
27988 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27989 2864 : jsval *argv = JS_ARGV(cx, vp);
27990 2864 : jsval arg0 = argv[0];
27991 2864 : jsval arg1 = argv[1];
27992 : nsresult rv;
27993 : PRInt16 result;
27994 2864 : rv = self->Cmp(arg0, arg1, cx, &result);
27995 2864 : if (NS_FAILED(rv))
27996 40 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27997 2824 : *vp = INT_TO_JSVAL((int32_t) result);
27998 2824 : return JS_TRUE;
27999 : }
28000 :
28001 : // === interface nsIIDBOpenDBRequest
28002 :
28003 : static JSBool
28004 0 : nsIIDBOpenDBRequest_GetOnblocked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28005 : {
28006 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28007 0 : JSObject *callee = nsnull;
28008 : nsIIDBOpenDBRequest *self;
28009 0 : xpc_qsSelfRef selfref;
28010 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
28011 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
28012 0 : return JS_FALSE;
28013 : nsresult rv;
28014 0 : nsCOMPtr<nsIDOMEventListener> result;
28015 0 : rv = self->GetOnblocked(getter_AddRefs(result));
28016 0 : if (NS_FAILED(rv))
28017 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28018 0 : if (!result) {
28019 0 : *vp = JSVAL_NULL;
28020 0 : return JS_TRUE;
28021 : }
28022 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
28023 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
28024 0 : return JS_TRUE;
28025 : }
28026 : // After this point do not use 'result'!
28027 0 : qsObjectHelper helper(result, cache);
28028 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
28029 : }
28030 :
28031 : static JSBool
28032 4 : nsIIDBOpenDBRequest_SetOnblocked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
28033 : {
28034 4 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28035 : nsIIDBOpenDBRequest *self;
28036 8 : xpc_qsSelfRef selfref;
28037 8 : JS::AutoValueRooter tvr(cx);
28038 4 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
28039 0 : return JS_FALSE;
28040 : nsresult rv;
28041 : nsIDOMEventListener *arg0;
28042 8 : xpc_qsSelfRef arg0ref;
28043 4 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
28044 4 : if (NS_FAILED(rv)) {
28045 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
28046 0 : return JS_FALSE;
28047 : }
28048 4 : rv = self->SetOnblocked(arg0);
28049 4 : if (NS_FAILED(rv))
28050 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
28051 4 : return JS_TRUE;
28052 : }
28053 :
28054 : static JSBool
28055 0 : nsIIDBOpenDBRequest_GetOnupgradeneeded(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28056 : {
28057 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28058 0 : JSObject *callee = nsnull;
28059 : nsIIDBOpenDBRequest *self;
28060 0 : xpc_qsSelfRef selfref;
28061 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
28062 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
28063 0 : return JS_FALSE;
28064 : nsresult rv;
28065 0 : nsCOMPtr<nsIDOMEventListener> result;
28066 0 : rv = self->GetOnupgradeneeded(getter_AddRefs(result));
28067 0 : if (NS_FAILED(rv))
28068 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28069 0 : if (!result) {
28070 0 : *vp = JSVAL_NULL;
28071 0 : return JS_TRUE;
28072 : }
28073 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
28074 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
28075 0 : return JS_TRUE;
28076 : }
28077 : // After this point do not use 'result'!
28078 0 : qsObjectHelper helper(result, cache);
28079 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
28080 : }
28081 :
28082 : static JSBool
28083 73 : nsIIDBOpenDBRequest_SetOnupgradeneeded(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
28084 : {
28085 73 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28086 : nsIIDBOpenDBRequest *self;
28087 146 : xpc_qsSelfRef selfref;
28088 146 : JS::AutoValueRooter tvr(cx);
28089 73 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
28090 0 : return JS_FALSE;
28091 : nsresult rv;
28092 : nsIDOMEventListener *arg0;
28093 146 : xpc_qsSelfRef arg0ref;
28094 73 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
28095 73 : if (NS_FAILED(rv)) {
28096 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
28097 0 : return JS_FALSE;
28098 : }
28099 73 : rv = self->SetOnupgradeneeded(arg0);
28100 73 : if (NS_FAILED(rv))
28101 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
28102 73 : return JS_TRUE;
28103 : }
28104 :
28105 : // === interface nsIIDBVersionChangeEvent
28106 :
28107 : static JSBool
28108 5 : nsIIDBVersionChangeEvent_GetOldVersion(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28109 : {
28110 5 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28111 : nsIIDBVersionChangeEvent *self;
28112 10 : xpc_qsSelfRef selfref;
28113 5 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
28114 0 : return JS_FALSE;
28115 : nsresult rv;
28116 : PRUint64 result;
28117 5 : rv = self->GetOldVersion(&result);
28118 5 : if (NS_FAILED(rv))
28119 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28120 5 : return xpc_qsUint64ToJsval(cx, result, vp);
28121 : }
28122 :
28123 : static JSBool
28124 5 : nsIIDBVersionChangeEvent_GetNewVersion(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28125 : {
28126 5 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28127 : nsIIDBVersionChangeEvent *self;
28128 10 : xpc_qsSelfRef selfref;
28129 5 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
28130 0 : return JS_FALSE;
28131 : nsresult rv;
28132 : PRUint64 result;
28133 5 : rv = self->GetNewVersion(&result);
28134 5 : if (NS_FAILED(rv))
28135 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28136 5 : return xpc_qsUint64ToJsval(cx, result, vp);
28137 : }
28138 :
28139 : // === interface nsIIndexedDatabaseUsageCallback
28140 :
28141 : static JSBool
28142 0 : nsIIndexedDatabaseUsageCallback_OnUsageResult(JSContext *cx, unsigned argc, jsval *vp)
28143 : {
28144 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28145 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28146 0 : if (!obj)
28147 0 : return JS_FALSE;
28148 : nsIIndexedDatabaseUsageCallback *self;
28149 0 : xpc_qsSelfRef selfref;
28150 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28151 0 : return JS_FALSE;
28152 0 : if (argc < 3)
28153 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28154 0 : jsval *argv = JS_ARGV(cx, vp);
28155 : nsresult rv;
28156 : nsIURI *arg0;
28157 0 : xpc_qsSelfRef arg0ref;
28158 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28159 0 : if (NS_FAILED(rv)) {
28160 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28161 0 : return JS_FALSE;
28162 : }
28163 : PRUint64 arg1;
28164 0 : if (!xpc_qsValueToUint64(cx, argv[1], &arg1))
28165 0 : return JS_FALSE;
28166 : PRUint64 arg2;
28167 0 : if (!xpc_qsValueToUint64(cx, argv[2], &arg2))
28168 0 : return JS_FALSE;
28169 0 : rv = self->OnUsageResult(arg0, arg1, arg2);
28170 0 : if (NS_FAILED(rv))
28171 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28172 0 : *vp = JSVAL_VOID;
28173 0 : return JS_TRUE;
28174 : }
28175 :
28176 : // === interface nsIIndexedDatabaseManager
28177 :
28178 : static JSBool
28179 0 : nsIIndexedDatabaseManager_GetUsageForURI(JSContext *cx, unsigned argc, jsval *vp)
28180 : {
28181 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28182 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28183 0 : if (!obj)
28184 0 : return JS_FALSE;
28185 : nsIIndexedDatabaseManager *self;
28186 0 : xpc_qsSelfRef selfref;
28187 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28188 0 : return JS_FALSE;
28189 0 : if (argc < 2)
28190 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28191 0 : jsval *argv = JS_ARGV(cx, vp);
28192 : nsresult rv;
28193 : nsIURI *arg0;
28194 0 : xpc_qsSelfRef arg0ref;
28195 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28196 0 : if (NS_FAILED(rv)) {
28197 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28198 0 : return JS_FALSE;
28199 : }
28200 : nsIIndexedDatabaseUsageCallback *arg1;
28201 0 : xpc_qsSelfRef arg1ref;
28202 0 : rv = xpc_qsUnwrapArg<nsIIndexedDatabaseUsageCallback>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
28203 0 : if (NS_FAILED(rv)) {
28204 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
28205 0 : return JS_FALSE;
28206 : }
28207 0 : rv = self->GetUsageForURI(arg0, arg1);
28208 0 : if (NS_FAILED(rv))
28209 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28210 0 : *vp = JSVAL_VOID;
28211 0 : return JS_TRUE;
28212 : }
28213 :
28214 : static JSBool
28215 0 : nsIIndexedDatabaseManager_CancelGetUsageForURI(JSContext *cx, unsigned argc, jsval *vp)
28216 : {
28217 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28218 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28219 0 : if (!obj)
28220 0 : return JS_FALSE;
28221 : nsIIndexedDatabaseManager *self;
28222 0 : xpc_qsSelfRef selfref;
28223 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28224 0 : return JS_FALSE;
28225 0 : if (argc < 2)
28226 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28227 0 : jsval *argv = JS_ARGV(cx, vp);
28228 : nsresult rv;
28229 : nsIURI *arg0;
28230 0 : xpc_qsSelfRef arg0ref;
28231 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28232 0 : if (NS_FAILED(rv)) {
28233 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28234 0 : return JS_FALSE;
28235 : }
28236 : nsIIndexedDatabaseUsageCallback *arg1;
28237 0 : xpc_qsSelfRef arg1ref;
28238 0 : rv = xpc_qsUnwrapArg<nsIIndexedDatabaseUsageCallback>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
28239 0 : if (NS_FAILED(rv)) {
28240 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
28241 0 : return JS_FALSE;
28242 : }
28243 0 : rv = self->CancelGetUsageForURI(arg0, arg1);
28244 0 : if (NS_FAILED(rv))
28245 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28246 0 : *vp = JSVAL_VOID;
28247 0 : return JS_TRUE;
28248 : }
28249 :
28250 : static JSBool
28251 0 : nsIIndexedDatabaseManager_ClearDatabasesForURI(JSContext *cx, unsigned argc, jsval *vp)
28252 : {
28253 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28254 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28255 0 : if (!obj)
28256 0 : return JS_FALSE;
28257 : nsIIndexedDatabaseManager *self;
28258 0 : xpc_qsSelfRef selfref;
28259 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28260 0 : return JS_FALSE;
28261 0 : if (argc < 1)
28262 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28263 0 : jsval *argv = JS_ARGV(cx, vp);
28264 : nsresult rv;
28265 : nsIURI *arg0;
28266 0 : xpc_qsSelfRef arg0ref;
28267 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28268 0 : if (NS_FAILED(rv)) {
28269 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28270 0 : return JS_FALSE;
28271 : }
28272 0 : rv = self->ClearDatabasesForURI(arg0);
28273 0 : if (NS_FAILED(rv))
28274 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28275 0 : *vp = JSVAL_VOID;
28276 0 : return JS_TRUE;
28277 : }
28278 :
28279 : static JSBool
28280 0 : nsIIndexedDatabaseManager_InitWindowless(JSContext *cx, unsigned argc, jsval *vp)
28281 : {
28282 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28283 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28284 0 : if (!obj)
28285 0 : return JS_FALSE;
28286 : nsIIndexedDatabaseManager *self;
28287 0 : xpc_qsSelfRef selfref;
28288 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28289 0 : return JS_FALSE;
28290 0 : if (argc < 1)
28291 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28292 0 : jsval *argv = JS_ARGV(cx, vp);
28293 0 : jsval arg0 = argv[0];
28294 : nsresult rv;
28295 0 : rv = self->InitWindowless(arg0, cx);
28296 0 : if (NS_FAILED(rv))
28297 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28298 0 : *vp = JSVAL_VOID;
28299 0 : return JS_TRUE;
28300 : }
28301 :
28302 : // === interface nsIDOMDOMError
28303 :
28304 : static JSBool
28305 0 : nsIDOMDOMError_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28306 : {
28307 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28308 : nsIDOMDOMError *self;
28309 0 : xpc_qsSelfRef selfref;
28310 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
28311 0 : return JS_FALSE;
28312 : nsresult rv;
28313 0 : nsString result;
28314 0 : rv = self->GetName(result);
28315 0 : if (NS_FAILED(rv))
28316 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28317 0 : return xpc::StringToJsval(cx, result, vp);
28318 : }
28319 :
28320 : // === Definer
28321 :
28322 : static const xpc_qsPropertySpec all_properties[] = {
28323 : // nsIDOMWindow (index 0)
28324 : {0, nsIDOMWindow_GetName, nsIDOMWindow_SetName},
28325 : {5, nsIDOMWindow_GetScriptableParent, xpc_qsGetterOnlyPropertyStub},
28326 : {12, nsIDOMWindow_GetScriptableTop, xpc_qsGetterOnlyPropertyStub},
28327 : {16, nsIDOMWindow_GetSelf, xpc_qsGetterOnlyPropertyStub},
28328 : {65, nsIDOMWindow_GetSessionStorage, xpc_qsGetterOnlyPropertyStub},
28329 : {80, nsIDOMWindow_GetLocalStorage, xpc_qsGetterOnlyPropertyStub},
28330 : {93, nsIDOMWindow_GetOnmouseenter, nsIDOMWindow_SetOnmouseenter},
28331 : {106, nsIDOMWindow_GetOnmouseleave, nsIDOMWindow_SetOnmouseleave},
28332 : // nsIDOMScreen (index 8)
28333 : {12, nsIDOMScreen_GetTop, xpc_qsGetterOnlyPropertyStub},
28334 : {124, nsIDOMScreen_GetHeight, xpc_qsGetterOnlyPropertyStub},
28335 : {131, nsIDOMScreen_GetWidth, xpc_qsGetterOnlyPropertyStub},
28336 : {137, nsIDOMScreen_GetLeft, xpc_qsGetterOnlyPropertyStub},
28337 : // nsIDOMClientRect (index 12)
28338 : {137, nsIDOMClientRect_GetLeft, xpc_qsGetterOnlyPropertyStub},
28339 : {12, nsIDOMClientRect_GetTop, xpc_qsGetterOnlyPropertyStub},
28340 : {142, nsIDOMClientRect_GetRight, xpc_qsGetterOnlyPropertyStub},
28341 : {148, nsIDOMClientRect_GetBottom, xpc_qsGetterOnlyPropertyStub},
28342 : {131, nsIDOMClientRect_GetWidth, xpc_qsGetterOnlyPropertyStub},
28343 : {124, nsIDOMClientRect_GetHeight, xpc_qsGetterOnlyPropertyStub},
28344 : // nsIDOMClientRectList (index 18)
28345 : {155, nsIDOMClientRectList_GetLength, xpc_qsGetterOnlyPropertyStub},
28346 : // nsIDOMPaintRequest (index 19)
28347 : {167, nsIDOMPaintRequest_GetClientRect, xpc_qsGetterOnlyPropertyStub},
28348 : {178, nsIDOMPaintRequest_GetReason, xpc_qsGetterOnlyPropertyStub},
28349 : // nsIDOMPaintRequestList (index 21)
28350 : {155, nsIDOMPaintRequestList_GetLength, xpc_qsGetterOnlyPropertyStub},
28351 : // nsIDOMCanvasRenderingContext2D (index 22)
28352 : {185, nsIDOMCanvasRenderingContext2D_GetCanvas, xpc_qsGetterOnlyPropertyStub},
28353 : {251, nsIDOMCanvasRenderingContext2D_GetMozCurrentTransform, nsIDOMCanvasRenderingContext2D_SetMozCurrentTransform},
28354 : {271, nsIDOMCanvasRenderingContext2D_GetMozCurrentTransformInverse, nsIDOMCanvasRenderingContext2D_SetMozCurrentTransformInverse},
28355 : {298, nsIDOMCanvasRenderingContext2D_GetGlobalAlpha, nsIDOMCanvasRenderingContext2D_SetGlobalAlpha},
28356 : {310, nsIDOMCanvasRenderingContext2D_GetGlobalCompositeOperation, nsIDOMCanvasRenderingContext2D_SetGlobalCompositeOperation},
28357 : {335, nsIDOMCanvasRenderingContext2D_GetStrokeStyle, nsIDOMCanvasRenderingContext2D_SetStrokeStyle},
28358 : {347, nsIDOMCanvasRenderingContext2D_GetFillStyle, nsIDOMCanvasRenderingContext2D_SetFillStyle},
28359 : {357, nsIDOMCanvasRenderingContext2D_GetMozFillRule, nsIDOMCanvasRenderingContext2D_SetMozFillRule},
28360 : {425, nsIDOMCanvasRenderingContext2D_GetLineWidth, nsIDOMCanvasRenderingContext2D_SetLineWidth},
28361 : {435, nsIDOMCanvasRenderingContext2D_GetLineCap, nsIDOMCanvasRenderingContext2D_SetLineCap},
28362 : {443, nsIDOMCanvasRenderingContext2D_GetLineJoin, nsIDOMCanvasRenderingContext2D_SetLineJoin},
28363 : {452, nsIDOMCanvasRenderingContext2D_GetMiterLimit, nsIDOMCanvasRenderingContext2D_SetMiterLimit},
28364 : {463, nsIDOMCanvasRenderingContext2D_GetMozDash, nsIDOMCanvasRenderingContext2D_SetMozDash},
28365 : {471, nsIDOMCanvasRenderingContext2D_GetMozDashOffset, nsIDOMCanvasRenderingContext2D_SetMozDashOffset},
28366 : {485, nsIDOMCanvasRenderingContext2D_GetShadowOffsetX, nsIDOMCanvasRenderingContext2D_SetShadowOffsetX},
28367 : {499, nsIDOMCanvasRenderingContext2D_GetShadowOffsetY, nsIDOMCanvasRenderingContext2D_SetShadowOffsetY},
28368 : {513, nsIDOMCanvasRenderingContext2D_GetShadowBlur, nsIDOMCanvasRenderingContext2D_SetShadowBlur},
28369 : {524, nsIDOMCanvasRenderingContext2D_GetShadowColor, nsIDOMCanvasRenderingContext2D_SetShadowColor},
28370 : {663, nsIDOMCanvasRenderingContext2D_GetFont, nsIDOMCanvasRenderingContext2D_SetFont},
28371 : {668, nsIDOMCanvasRenderingContext2D_GetTextAlign, nsIDOMCanvasRenderingContext2D_SetTextAlign},
28372 : {678, nsIDOMCanvasRenderingContext2D_GetTextBaseline, nsIDOMCanvasRenderingContext2D_SetTextBaseline},
28373 : {723, nsIDOMCanvasRenderingContext2D_GetMozTextStyle, nsIDOMCanvasRenderingContext2D_SetMozTextStyle},
28374 : {802, nsIDOMCanvasRenderingContext2D_GetMozImageSmoothingEnabled, nsIDOMCanvasRenderingContext2D_SetMozImageSmoothingEnabled},
28375 : // nsIDOMTextMetrics (index 45)
28376 : {131, nsIDOMTextMetrics_GetWidth, xpc_qsGetterOnlyPropertyStub},
28377 : // nsIDOMCharacterData (index 46)
28378 : {871, nsIDOMCharacterData_GetData, nsIDOMCharacterData_SetData},
28379 : {155, nsIDOMCharacterData_GetLength, xpc_qsGetterOnlyPropertyStub},
28380 : // nsIDOMDocument (index 48)
28381 : {876, nsIDOMDocument_GetDocumentElement, xpc_qsGetterOnlyPropertyStub},
28382 : {892, nsIDOMDocument_GetImplementation, xpc_qsGetterOnlyPropertyStub},
28383 : {928, nsIDOMDocument_GetDoctype, xpc_qsGetterOnlyPropertyStub},
28384 : {1053, nsIDOMDocument_GetDocumentURI, xpc_qsGetterOnlyPropertyStub},
28385 : {1075, nsIDOMDocument_GetDefaultView, xpc_qsGetterOnlyPropertyStub},
28386 : {1141, nsIDOMDocument_GetTitle, nsIDOMDocument_SetTitle},
28387 : {1147, nsIDOMDocument_GetReferrer, xpc_qsGetterOnlyPropertyStub},
28388 : {1182, nsIDOMDocument_GetActiveElement, xpc_qsGetterOnlyPropertyStub},
28389 : {1196, nsIDOMDocument_GetOnreadystatechange, nsIDOMDocument_SetOnreadystatechange},
28390 : {93, nsIDOMDocument_GetOnmouseenter, nsIDOMDocument_SetOnmouseenter},
28391 : {106, nsIDOMDocument_GetOnmouseleave, nsIDOMDocument_SetOnmouseleave},
28392 : // nsIDOMElement (index 59)
28393 : {1290, nsIDOMElement_GetTagName, xpc_qsGetterOnlyPropertyStub},
28394 : {93, nsIDOMElement_GetOnmouseenter, nsIDOMElement_SetOnmouseenter},
28395 : {106, nsIDOMElement_GetOnmouseleave, nsIDOMElement_SetOnmouseleave},
28396 : // nsIDOMNamedNodeMap (index 62)
28397 : {155, nsIDOMNamedNodeMap_GetLength, xpc_qsGetterOnlyPropertyStub},
28398 : // nsIDOMNode (index 63)
28399 : {1341, nsIDOMNode_GetNodeName, xpc_qsGetterOnlyPropertyStub},
28400 : {1350, nsIDOMNode_GetNodeValue, nsIDOMNode_SetNodeValue},
28401 : {1360, nsIDOMNode_GetNodeType, xpc_qsGetterOnlyPropertyStub},
28402 : {1369, nsIDOMNode_GetParentNode, xpc_qsGetterOnlyPropertyStub},
28403 : {1380, nsIDOMNode_GetParentElement, xpc_qsGetterOnlyPropertyStub},
28404 : {1394, nsIDOMNode_GetChildNodes, xpc_qsGetterOnlyPropertyStub},
28405 : {1405, nsIDOMNode_GetFirstChild, xpc_qsGetterOnlyPropertyStub},
28406 : {1416, nsIDOMNode_GetLastChild, xpc_qsGetterOnlyPropertyStub},
28407 : {1426, nsIDOMNode_GetPreviousSibling, xpc_qsGetterOnlyPropertyStub},
28408 : {1442, nsIDOMNode_GetNextSibling, xpc_qsGetterOnlyPropertyStub},
28409 : {1454, nsIDOMNode_GetAttributes, xpc_qsGetterOnlyPropertyStub},
28410 : {1465, nsIDOMNode_GetOwnerDocument, xpc_qsGetterOnlyPropertyStub},
28411 : {1575, nsIDOMNode_GetNamespaceURI, xpc_qsGetterOnlyPropertyStub},
28412 : {1588, nsIDOMNode_GetPrefix, xpc_qsGetterOnlyPropertyStub},
28413 : {1595, nsIDOMNode_GetLocalName, xpc_qsGetterOnlyPropertyStub},
28414 : {1619, nsIDOMNode_GetDOMBaseURI, xpc_qsGetterOnlyPropertyStub},
28415 : {1651, nsIDOMNode_GetTextContent, nsIDOMNode_SetTextContent},
28416 : // nsIDOMNodeList (index 80)
28417 : {155, nsIDOMNodeList_GetLength, xpc_qsGetterOnlyPropertyStub},
28418 : // nsIDOMDOMStringList (index 81)
28419 : {155, nsIDOMDOMStringList_GetLength, xpc_qsGetterOnlyPropertyStub},
28420 : // nsIDOMDOMTokenList (index 82)
28421 : {155, nsIDOMDOMTokenList_GetLength, xpc_qsGetterOnlyPropertyStub},
28422 : // nsIDOMDOMSettableTokenList (index 83)
28423 : {1891, nsIDOMDOMSettableTokenList_GetValue, nsIDOMDOMSettableTokenList_SetValue},
28424 : // nsIDOMNSElement (index 84)
28425 : {1950, nsIDOMNSElement_GetScrollTop, nsIDOMNSElement_SetScrollTop},
28426 : {1960, nsIDOMNSElement_GetScrollLeft, nsIDOMNSElement_SetScrollLeft},
28427 : {1971, nsIDOMNSElement_GetScrollHeight, xpc_qsGetterOnlyPropertyStub},
28428 : {1984, nsIDOMNSElement_GetScrollWidth, xpc_qsGetterOnlyPropertyStub},
28429 : {1996, nsIDOMNSElement_GetClientTop, xpc_qsGetterOnlyPropertyStub},
28430 : {2006, nsIDOMNSElement_GetClientLeft, xpc_qsGetterOnlyPropertyStub},
28431 : {2017, nsIDOMNSElement_GetClientHeight, xpc_qsGetterOnlyPropertyStub},
28432 : {2030, nsIDOMNSElement_GetClientWidth, xpc_qsGetterOnlyPropertyStub},
28433 : {2042, nsIDOMNSElement_GetFirstElementChild, xpc_qsGetterOnlyPropertyStub},
28434 : {2060, nsIDOMNSElement_GetLastElementChild, xpc_qsGetterOnlyPropertyStub},
28435 : {2077, nsIDOMNSElement_GetPreviousElementSibling, xpc_qsGetterOnlyPropertyStub},
28436 : {2100, nsIDOMNSElement_GetNextElementSibling, xpc_qsGetterOnlyPropertyStub},
28437 : {2119, nsIDOMNSElement_GetChildElementCount, xpc_qsGetterOnlyPropertyStub},
28438 : {2137, nsIDOMNSElement_GetChildren, xpc_qsGetterOnlyPropertyStub},
28439 : {2146, nsIDOMNSElement_GetClassList, xpc_qsGetterOnlyPropertyStub},
28440 : // nsIDOMElementCSSInlineStyle (index 99)
28441 : {2201, nsIDOMElementCSSInlineStyle_GetStyle, xpc_qsGetterOnlyPropertyStub},
28442 : // nsIDOMCSS2Properties (index 100)
28443 : {2207, nsIDOMCSS2Properties_GetBackground, nsIDOMCSS2Properties_SetBackground},
28444 : {2218, nsIDOMCSS2Properties_GetBackgroundAttachment, nsIDOMCSS2Properties_SetBackgroundAttachment},
28445 : {2239, nsIDOMCSS2Properties_GetBackgroundColor, nsIDOMCSS2Properties_SetBackgroundColor},
28446 : {2255, nsIDOMCSS2Properties_GetBackgroundImage, nsIDOMCSS2Properties_SetBackgroundImage},
28447 : {2271, nsIDOMCSS2Properties_GetBackgroundPosition, nsIDOMCSS2Properties_SetBackgroundPosition},
28448 : {2290, nsIDOMCSS2Properties_GetBackgroundRepeat, nsIDOMCSS2Properties_SetBackgroundRepeat},
28449 : {2307, nsIDOMCSS2Properties_GetBorder, nsIDOMCSS2Properties_SetBorder},
28450 : {2314, nsIDOMCSS2Properties_GetBorderCollapse, nsIDOMCSS2Properties_SetBorderCollapse},
28451 : {2329, nsIDOMCSS2Properties_GetBorderColor, nsIDOMCSS2Properties_SetBorderColor},
28452 : {2341, nsIDOMCSS2Properties_GetBorderSpacing, nsIDOMCSS2Properties_SetBorderSpacing},
28453 : {2355, nsIDOMCSS2Properties_GetBorderStyle, nsIDOMCSS2Properties_SetBorderStyle},
28454 : {2367, nsIDOMCSS2Properties_GetBorderTop, nsIDOMCSS2Properties_SetBorderTop},
28455 : {2377, nsIDOMCSS2Properties_GetBorderRight, nsIDOMCSS2Properties_SetBorderRight},
28456 : {2389, nsIDOMCSS2Properties_GetBorderBottom, nsIDOMCSS2Properties_SetBorderBottom},
28457 : {2402, nsIDOMCSS2Properties_GetBorderLeft, nsIDOMCSS2Properties_SetBorderLeft},
28458 : {2413, nsIDOMCSS2Properties_GetBorderTopColor, nsIDOMCSS2Properties_SetBorderTopColor},
28459 : {2428, nsIDOMCSS2Properties_GetBorderRightColor, nsIDOMCSS2Properties_SetBorderRightColor},
28460 : {2445, nsIDOMCSS2Properties_GetBorderBottomColor, nsIDOMCSS2Properties_SetBorderBottomColor},
28461 : {2463, nsIDOMCSS2Properties_GetBorderLeftColor, nsIDOMCSS2Properties_SetBorderLeftColor},
28462 : {2479, nsIDOMCSS2Properties_GetBorderTopStyle, nsIDOMCSS2Properties_SetBorderTopStyle},
28463 : {2494, nsIDOMCSS2Properties_GetBorderRightStyle, nsIDOMCSS2Properties_SetBorderRightStyle},
28464 : {2511, nsIDOMCSS2Properties_GetBorderBottomStyle, nsIDOMCSS2Properties_SetBorderBottomStyle},
28465 : {2529, nsIDOMCSS2Properties_GetBorderLeftStyle, nsIDOMCSS2Properties_SetBorderLeftStyle},
28466 : {2545, nsIDOMCSS2Properties_GetBorderTopWidth, nsIDOMCSS2Properties_SetBorderTopWidth},
28467 : {2560, nsIDOMCSS2Properties_GetBorderRightWidth, nsIDOMCSS2Properties_SetBorderRightWidth},
28468 : {2577, nsIDOMCSS2Properties_GetBorderBottomWidth, nsIDOMCSS2Properties_SetBorderBottomWidth},
28469 : {2595, nsIDOMCSS2Properties_GetBorderLeftWidth, nsIDOMCSS2Properties_SetBorderLeftWidth},
28470 : {2611, nsIDOMCSS2Properties_GetBorderWidth, nsIDOMCSS2Properties_SetBorderWidth},
28471 : {2623, nsIDOMCSS2Properties_GetBorderRadius, nsIDOMCSS2Properties_SetBorderRadius},
28472 : {2636, nsIDOMCSS2Properties_GetBorderTopLeftRadius, nsIDOMCSS2Properties_SetBorderTopLeftRadius},
28473 : {2656, nsIDOMCSS2Properties_GetBorderTopRightRadius, nsIDOMCSS2Properties_SetBorderTopRightRadius},
28474 : {2677, nsIDOMCSS2Properties_GetBorderBottomLeftRadius, nsIDOMCSS2Properties_SetBorderBottomLeftRadius},
28475 : {2700, nsIDOMCSS2Properties_GetBorderBottomRightRadius, nsIDOMCSS2Properties_SetBorderBottomRightRadius},
28476 : {148, nsIDOMCSS2Properties_GetBottom, nsIDOMCSS2Properties_SetBottom},
28477 : {2724, nsIDOMCSS2Properties_GetBoxShadow, nsIDOMCSS2Properties_SetBoxShadow},
28478 : {2734, nsIDOMCSS2Properties_GetCaptionSide, nsIDOMCSS2Properties_SetCaptionSide},
28479 : {2746, nsIDOMCSS2Properties_GetClear, nsIDOMCSS2Properties_SetClear},
28480 : {658, nsIDOMCSS2Properties_GetClip, nsIDOMCSS2Properties_SetClip},
28481 : {2752, nsIDOMCSS2Properties_GetColor, nsIDOMCSS2Properties_SetColor},
28482 : {2758, nsIDOMCSS2Properties_GetContent, nsIDOMCSS2Properties_SetContent},
28483 : {2766, nsIDOMCSS2Properties_GetCounterIncrement, nsIDOMCSS2Properties_SetCounterIncrement},
28484 : {2783, nsIDOMCSS2Properties_GetCounterReset, nsIDOMCSS2Properties_SetCounterReset},
28485 : {2796, nsIDOMCSS2Properties_GetCursor, nsIDOMCSS2Properties_SetCursor},
28486 : {2803, nsIDOMCSS2Properties_GetDirection, nsIDOMCSS2Properties_SetDirection},
28487 : {2813, nsIDOMCSS2Properties_GetDisplay, nsIDOMCSS2Properties_SetDisplay},
28488 : {2821, nsIDOMCSS2Properties_GetEmptyCells, nsIDOMCSS2Properties_SetEmptyCells},
28489 : {2832, nsIDOMCSS2Properties_GetCssFloat, nsIDOMCSS2Properties_SetCssFloat},
28490 : {663, nsIDOMCSS2Properties_GetFont, nsIDOMCSS2Properties_SetFont},
28491 : {2841, nsIDOMCSS2Properties_GetFontFamily, nsIDOMCSS2Properties_SetFontFamily},
28492 : {2852, nsIDOMCSS2Properties_GetFontSize, nsIDOMCSS2Properties_SetFontSize},
28493 : {2861, nsIDOMCSS2Properties_GetFontSizeAdjust, nsIDOMCSS2Properties_SetFontSizeAdjust},
28494 : {2876, nsIDOMCSS2Properties_GetFontStretch, nsIDOMCSS2Properties_SetFontStretch},
28495 : {2888, nsIDOMCSS2Properties_GetFontStyle, nsIDOMCSS2Properties_SetFontStyle},
28496 : {2898, nsIDOMCSS2Properties_GetFontVariant, nsIDOMCSS2Properties_SetFontVariant},
28497 : {2910, nsIDOMCSS2Properties_GetFontWeight, nsIDOMCSS2Properties_SetFontWeight},
28498 : {124, nsIDOMCSS2Properties_GetHeight, nsIDOMCSS2Properties_SetHeight},
28499 : {137, nsIDOMCSS2Properties_GetLeft, nsIDOMCSS2Properties_SetLeft},
28500 : {2921, nsIDOMCSS2Properties_GetLetterSpacing, nsIDOMCSS2Properties_SetLetterSpacing},
28501 : {2935, nsIDOMCSS2Properties_GetLineHeight, nsIDOMCSS2Properties_SetLineHeight},
28502 : {2946, nsIDOMCSS2Properties_GetListStyle, nsIDOMCSS2Properties_SetListStyle},
28503 : {2956, nsIDOMCSS2Properties_GetListStyleImage, nsIDOMCSS2Properties_SetListStyleImage},
28504 : {2971, nsIDOMCSS2Properties_GetListStylePosition, nsIDOMCSS2Properties_SetListStylePosition},
28505 : {2989, nsIDOMCSS2Properties_GetListStyleType, nsIDOMCSS2Properties_SetListStyleType},
28506 : {3003, nsIDOMCSS2Properties_GetMargin, nsIDOMCSS2Properties_SetMargin},
28507 : {3010, nsIDOMCSS2Properties_GetMarginTop, nsIDOMCSS2Properties_SetMarginTop},
28508 : {3020, nsIDOMCSS2Properties_GetMarginRight, nsIDOMCSS2Properties_SetMarginRight},
28509 : {3032, nsIDOMCSS2Properties_GetMarginBottom, nsIDOMCSS2Properties_SetMarginBottom},
28510 : {3045, nsIDOMCSS2Properties_GetMarginLeft, nsIDOMCSS2Properties_SetMarginLeft},
28511 : {3056, nsIDOMCSS2Properties_GetMarkerOffset, nsIDOMCSS2Properties_SetMarkerOffset},
28512 : {3069, nsIDOMCSS2Properties_GetMarks, nsIDOMCSS2Properties_SetMarks},
28513 : {3075, nsIDOMCSS2Properties_GetMaxHeight, nsIDOMCSS2Properties_SetMaxHeight},
28514 : {3085, nsIDOMCSS2Properties_GetMaxWidth, nsIDOMCSS2Properties_SetMaxWidth},
28515 : {3094, nsIDOMCSS2Properties_GetMinHeight, nsIDOMCSS2Properties_SetMinHeight},
28516 : {3104, nsIDOMCSS2Properties_GetMinWidth, nsIDOMCSS2Properties_SetMinWidth},
28517 : {3113, nsIDOMCSS2Properties_GetOrphans, nsIDOMCSS2Properties_SetOrphans},
28518 : {3121, nsIDOMCSS2Properties_GetOutline, nsIDOMCSS2Properties_SetOutline},
28519 : {3129, nsIDOMCSS2Properties_GetOutlineColor, nsIDOMCSS2Properties_SetOutlineColor},
28520 : {3142, nsIDOMCSS2Properties_GetOutlineStyle, nsIDOMCSS2Properties_SetOutlineStyle},
28521 : {3155, nsIDOMCSS2Properties_GetOutlineWidth, nsIDOMCSS2Properties_SetOutlineWidth},
28522 : {3168, nsIDOMCSS2Properties_GetOverflow, nsIDOMCSS2Properties_SetOverflow},
28523 : {3177, nsIDOMCSS2Properties_GetPadding, nsIDOMCSS2Properties_SetPadding},
28524 : {3185, nsIDOMCSS2Properties_GetPaddingTop, nsIDOMCSS2Properties_SetPaddingTop},
28525 : {3196, nsIDOMCSS2Properties_GetPaddingRight, nsIDOMCSS2Properties_SetPaddingRight},
28526 : {3209, nsIDOMCSS2Properties_GetPaddingBottom, nsIDOMCSS2Properties_SetPaddingBottom},
28527 : {3223, nsIDOMCSS2Properties_GetPaddingLeft, nsIDOMCSS2Properties_SetPaddingLeft},
28528 : {3235, nsIDOMCSS2Properties_GetPage, nsIDOMCSS2Properties_SetPage},
28529 : {3240, nsIDOMCSS2Properties_GetPageBreakAfter, nsIDOMCSS2Properties_SetPageBreakAfter},
28530 : {3255, nsIDOMCSS2Properties_GetPageBreakBefore, nsIDOMCSS2Properties_SetPageBreakBefore},
28531 : {3271, nsIDOMCSS2Properties_GetPageBreakInside, nsIDOMCSS2Properties_SetPageBreakInside},
28532 : {3287, nsIDOMCSS2Properties_GetPosition, nsIDOMCSS2Properties_SetPosition},
28533 : {3296, nsIDOMCSS2Properties_GetQuotes, nsIDOMCSS2Properties_SetQuotes},
28534 : {142, nsIDOMCSS2Properties_GetRight, nsIDOMCSS2Properties_SetRight},
28535 : {3303, nsIDOMCSS2Properties_GetSize, nsIDOMCSS2Properties_SetSize},
28536 : {3308, nsIDOMCSS2Properties_GetTableLayout, nsIDOMCSS2Properties_SetTableLayout},
28537 : {668, nsIDOMCSS2Properties_GetTextAlign, nsIDOMCSS2Properties_SetTextAlign},
28538 : {3320, nsIDOMCSS2Properties_GetTextDecoration, nsIDOMCSS2Properties_SetTextDecoration},
28539 : {3335, nsIDOMCSS2Properties_GetTextIndent, nsIDOMCSS2Properties_SetTextIndent},
28540 : {3346, nsIDOMCSS2Properties_GetTextOverflow, nsIDOMCSS2Properties_SetTextOverflow},
28541 : {3359, nsIDOMCSS2Properties_GetTextShadow, nsIDOMCSS2Properties_SetTextShadow},
28542 : {3370, nsIDOMCSS2Properties_GetTextTransform, nsIDOMCSS2Properties_SetTextTransform},
28543 : {12, nsIDOMCSS2Properties_GetTop, nsIDOMCSS2Properties_SetTop},
28544 : {3384, nsIDOMCSS2Properties_GetUnicodeBidi, nsIDOMCSS2Properties_SetUnicodeBidi},
28545 : {3396, nsIDOMCSS2Properties_GetVerticalAlign, nsIDOMCSS2Properties_SetVerticalAlign},
28546 : {3410, nsIDOMCSS2Properties_GetVisibility, nsIDOMCSS2Properties_SetVisibility},
28547 : {3421, nsIDOMCSS2Properties_GetWhiteSpace, nsIDOMCSS2Properties_SetWhiteSpace},
28548 : {3432, nsIDOMCSS2Properties_GetWidows, nsIDOMCSS2Properties_SetWidows},
28549 : {131, nsIDOMCSS2Properties_GetWidth, nsIDOMCSS2Properties_SetWidth},
28550 : {3439, nsIDOMCSS2Properties_GetWordSpacing, nsIDOMCSS2Properties_SetWordSpacing},
28551 : {3451, nsIDOMCSS2Properties_GetZIndex, nsIDOMCSS2Properties_SetZIndex},
28552 : {3458, nsIDOMCSS2Properties_GetClipPath, nsIDOMCSS2Properties_SetClipPath},
28553 : {3467, nsIDOMCSS2Properties_GetClipRule, nsIDOMCSS2Properties_SetClipRule},
28554 : {3476, nsIDOMCSS2Properties_GetColorInterpolation, nsIDOMCSS2Properties_SetColorInterpolation},
28555 : {3495, nsIDOMCSS2Properties_GetColorInterpolationFilters, nsIDOMCSS2Properties_SetColorInterpolationFilters},
28556 : {3521, nsIDOMCSS2Properties_GetDominantBaseline, nsIDOMCSS2Properties_SetDominantBaseline},
28557 : {646, nsIDOMCSS2Properties_GetFill, nsIDOMCSS2Properties_SetFill},
28558 : {3538, nsIDOMCSS2Properties_GetFillOpacity, nsIDOMCSS2Properties_SetFillOpacity},
28559 : {3550, nsIDOMCSS2Properties_GetFillRule, nsIDOMCSS2Properties_SetFillRule},
28560 : {3559, nsIDOMCSS2Properties_GetFilter, nsIDOMCSS2Properties_SetFilter},
28561 : {3566, nsIDOMCSS2Properties_GetFloodColor, nsIDOMCSS2Properties_SetFloodColor},
28562 : {3577, nsIDOMCSS2Properties_GetFloodOpacity, nsIDOMCSS2Properties_SetFloodOpacity},
28563 : {3590, nsIDOMCSS2Properties_GetImageRendering, nsIDOMCSS2Properties_SetImageRendering},
28564 : {3605, nsIDOMCSS2Properties_GetLightingColor, nsIDOMCSS2Properties_SetLightingColor},
28565 : {3619, nsIDOMCSS2Properties_GetMarker, nsIDOMCSS2Properties_SetMarker},
28566 : {3626, nsIDOMCSS2Properties_GetMarkerEnd, nsIDOMCSS2Properties_SetMarkerEnd},
28567 : {3636, nsIDOMCSS2Properties_GetMarkerMid, nsIDOMCSS2Properties_SetMarkerMid},
28568 : {3646, nsIDOMCSS2Properties_GetMarkerStart, nsIDOMCSS2Properties_SetMarkerStart},
28569 : {3658, nsIDOMCSS2Properties_GetMask, nsIDOMCSS2Properties_SetMask},
28570 : {3663, nsIDOMCSS2Properties_GetShapeRendering, nsIDOMCSS2Properties_SetShapeRendering},
28571 : {3678, nsIDOMCSS2Properties_GetStopColor, nsIDOMCSS2Properties_SetStopColor},
28572 : {3688, nsIDOMCSS2Properties_GetStopOpacity, nsIDOMCSS2Properties_SetStopOpacity},
28573 : {651, nsIDOMCSS2Properties_GetStroke, nsIDOMCSS2Properties_SetStroke},
28574 : {3700, nsIDOMCSS2Properties_GetStrokeDasharray, nsIDOMCSS2Properties_SetStrokeDasharray},
28575 : {3716, nsIDOMCSS2Properties_GetStrokeDashoffset, nsIDOMCSS2Properties_SetStrokeDashoffset},
28576 : {3733, nsIDOMCSS2Properties_GetStrokeLinecap, nsIDOMCSS2Properties_SetStrokeLinecap},
28577 : {3747, nsIDOMCSS2Properties_GetStrokeLinejoin, nsIDOMCSS2Properties_SetStrokeLinejoin},
28578 : {3762, nsIDOMCSS2Properties_GetStrokeMiterlimit, nsIDOMCSS2Properties_SetStrokeMiterlimit},
28579 : {3779, nsIDOMCSS2Properties_GetStrokeOpacity, nsIDOMCSS2Properties_SetStrokeOpacity},
28580 : {3793, nsIDOMCSS2Properties_GetStrokeWidth, nsIDOMCSS2Properties_SetStrokeWidth},
28581 : {3805, nsIDOMCSS2Properties_GetTextAnchor, nsIDOMCSS2Properties_SetTextAnchor},
28582 : {3816, nsIDOMCSS2Properties_GetTextRendering, nsIDOMCSS2Properties_SetTextRendering},
28583 : {3830, nsIDOMCSS2Properties_GetMozAppearance, nsIDOMCSS2Properties_SetMozAppearance},
28584 : {3844, nsIDOMCSS2Properties_GetBackgroundClip, nsIDOMCSS2Properties_SetBackgroundClip},
28585 : {3859, nsIDOMCSS2Properties_GetMozBackgroundInlinePolicy, nsIDOMCSS2Properties_SetMozBackgroundInlinePolicy},
28586 : {3885, nsIDOMCSS2Properties_GetBackgroundOrigin, nsIDOMCSS2Properties_SetBackgroundOrigin},
28587 : {3902, nsIDOMCSS2Properties_GetMozBinding, nsIDOMCSS2Properties_SetMozBinding},
28588 : {3913, nsIDOMCSS2Properties_GetMozBorderBottomColors, nsIDOMCSS2Properties_SetMozBorderBottomColors},
28589 : {3935, nsIDOMCSS2Properties_GetMozBorderLeftColors, nsIDOMCSS2Properties_SetMozBorderLeftColors},
28590 : {3955, nsIDOMCSS2Properties_GetMozBorderRightColors, nsIDOMCSS2Properties_SetMozBorderRightColors},
28591 : {3976, nsIDOMCSS2Properties_GetMozBorderTopColors, nsIDOMCSS2Properties_SetMozBorderTopColors},
28592 : {3995, nsIDOMCSS2Properties_GetMozBoxAlign, nsIDOMCSS2Properties_SetMozBoxAlign},
28593 : {4007, nsIDOMCSS2Properties_GetMozBoxDirection, nsIDOMCSS2Properties_SetMozBoxDirection},
28594 : {4023, nsIDOMCSS2Properties_GetMozBoxFlex, nsIDOMCSS2Properties_SetMozBoxFlex},
28595 : {4034, nsIDOMCSS2Properties_GetMozBoxOrient, nsIDOMCSS2Properties_SetMozBoxOrient},
28596 : {4047, nsIDOMCSS2Properties_GetMozBoxOrdinalGroup, nsIDOMCSS2Properties_SetMozBoxOrdinalGroup},
28597 : {4066, nsIDOMCSS2Properties_GetMozBoxPack, nsIDOMCSS2Properties_SetMozBoxPack},
28598 : {4077, nsIDOMCSS2Properties_GetMozBoxSizing, nsIDOMCSS2Properties_SetMozBoxSizing},
28599 : {4090, nsIDOMCSS2Properties_GetMozColumnCount, nsIDOMCSS2Properties_SetMozColumnCount},
28600 : {4105, nsIDOMCSS2Properties_GetMozColumnWidth, nsIDOMCSS2Properties_SetMozColumnWidth},
28601 : {4120, nsIDOMCSS2Properties_GetMozColumnFill, nsIDOMCSS2Properties_SetMozColumnFill},
28602 : {4134, nsIDOMCSS2Properties_GetMozColumnGap, nsIDOMCSS2Properties_SetMozColumnGap},
28603 : {4147, nsIDOMCSS2Properties_GetMozFloatEdge, nsIDOMCSS2Properties_SetMozFloatEdge},
28604 : {4160, nsIDOMCSS2Properties_GetMozFontFeatureSettings, nsIDOMCSS2Properties_SetMozFontFeatureSettings},
28605 : {4183, nsIDOMCSS2Properties_GetMozFontLanguageOverride, nsIDOMCSS2Properties_SetMozFontLanguageOverride},
28606 : {4207, nsIDOMCSS2Properties_GetMozForceBrokenImageIcon, nsIDOMCSS2Properties_SetMozForceBrokenImageIcon},
28607 : {4231, nsIDOMCSS2Properties_GetMozImageRegion, nsIDOMCSS2Properties_SetMozImageRegion},
28608 : {4246, nsIDOMCSS2Properties_GetMozMarginEnd, nsIDOMCSS2Properties_SetMozMarginEnd},
28609 : {4259, nsIDOMCSS2Properties_GetMozMarginStart, nsIDOMCSS2Properties_SetMozMarginStart},
28610 : {4274, nsIDOMCSS2Properties_GetMozOrient, nsIDOMCSS2Properties_SetMozOrient},
28611 : {4284, nsIDOMCSS2Properties_GetMozOutlineRadius, nsIDOMCSS2Properties_SetMozOutlineRadius},
28612 : {4301, nsIDOMCSS2Properties_GetMozOutlineRadiusTopleft, nsIDOMCSS2Properties_SetMozOutlineRadiusTopleft},
28613 : {4325, nsIDOMCSS2Properties_GetMozOutlineRadiusTopright, nsIDOMCSS2Properties_SetMozOutlineRadiusTopright},
28614 : {4350, nsIDOMCSS2Properties_GetMozOutlineRadiusBottomleft, nsIDOMCSS2Properties_SetMozOutlineRadiusBottomleft},
28615 : {4377, nsIDOMCSS2Properties_GetMozOutlineRadiusBottomright, nsIDOMCSS2Properties_SetMozOutlineRadiusBottomright},
28616 : {4405, nsIDOMCSS2Properties_GetMozPaddingEnd, nsIDOMCSS2Properties_SetMozPaddingEnd},
28617 : {4419, nsIDOMCSS2Properties_GetMozPaddingStart, nsIDOMCSS2Properties_SetMozPaddingStart},
28618 : {4435, nsIDOMCSS2Properties_GetMozUserFocus, nsIDOMCSS2Properties_SetMozUserFocus},
28619 : {4448, nsIDOMCSS2Properties_GetMozUserInput, nsIDOMCSS2Properties_SetMozUserInput},
28620 : {4461, nsIDOMCSS2Properties_GetMozUserModify, nsIDOMCSS2Properties_SetMozUserModify},
28621 : {4475, nsIDOMCSS2Properties_GetMozUserSelect, nsIDOMCSS2Properties_SetMozUserSelect},
28622 : {4489, nsIDOMCSS2Properties_GetOpacity, nsIDOMCSS2Properties_SetOpacity},
28623 : {4497, nsIDOMCSS2Properties_GetOutlineOffset, nsIDOMCSS2Properties_SetOutlineOffset},
28624 : {4511, nsIDOMCSS2Properties_GetMozTextAlignLast, nsIDOMCSS2Properties_SetMozTextAlignLast},
28625 : {4528, nsIDOMCSS2Properties_GetOverflowX, nsIDOMCSS2Properties_SetOverflowX},
28626 : {4538, nsIDOMCSS2Properties_GetOverflowY, nsIDOMCSS2Properties_SetOverflowY},
28627 : {4548, nsIDOMCSS2Properties_GetImeMode, nsIDOMCSS2Properties_SetImeMode},
28628 : {4556, nsIDOMCSS2Properties_GetMozBorderEnd, nsIDOMCSS2Properties_SetMozBorderEnd},
28629 : {4569, nsIDOMCSS2Properties_GetMozBorderEndColor, nsIDOMCSS2Properties_SetMozBorderEndColor},
28630 : {4587, nsIDOMCSS2Properties_GetMozBorderEndStyle, nsIDOMCSS2Properties_SetMozBorderEndStyle},
28631 : {4605, nsIDOMCSS2Properties_GetMozBorderEndWidth, nsIDOMCSS2Properties_SetMozBorderEndWidth},
28632 : {4623, nsIDOMCSS2Properties_GetMozBorderStart, nsIDOMCSS2Properties_SetMozBorderStart},
28633 : {4638, nsIDOMCSS2Properties_GetMozBorderStartColor, nsIDOMCSS2Properties_SetMozBorderStartColor},
28634 : {4658, nsIDOMCSS2Properties_GetMozBorderStartStyle, nsIDOMCSS2Properties_SetMozBorderStartStyle},
28635 : {4678, nsIDOMCSS2Properties_GetMozBorderStartWidth, nsIDOMCSS2Properties_SetMozBorderStartWidth},
28636 : {4698, nsIDOMCSS2Properties_GetMozStackSizing, nsIDOMCSS2Properties_SetMozStackSizing},
28637 : {4713, nsIDOMCSS2Properties_GetMozBorderImage, nsIDOMCSS2Properties_SetMozBorderImage},
28638 : {4728, nsIDOMCSS2Properties_GetMozColumns, nsIDOMCSS2Properties_SetMozColumns},
28639 : {4739, nsIDOMCSS2Properties_GetMozColumnRule, nsIDOMCSS2Properties_SetMozColumnRule},
28640 : {4753, nsIDOMCSS2Properties_GetMozColumnRuleWidth, nsIDOMCSS2Properties_SetMozColumnRuleWidth},
28641 : {4772, nsIDOMCSS2Properties_GetMozColumnRuleStyle, nsIDOMCSS2Properties_SetMozColumnRuleStyle},
28642 : {4791, nsIDOMCSS2Properties_GetMozColumnRuleColor, nsIDOMCSS2Properties_SetMozColumnRuleColor},
28643 : {4810, nsIDOMCSS2Properties_GetWordWrap, nsIDOMCSS2Properties_SetWordWrap},
28644 : {4819, nsIDOMCSS2Properties_GetMozHyphens, nsIDOMCSS2Properties_SetMozHyphens},
28645 : {4830, nsIDOMCSS2Properties_GetMozTransform, nsIDOMCSS2Properties_SetMozTransform},
28646 : {4843, nsIDOMCSS2Properties_GetMozTransformOrigin, nsIDOMCSS2Properties_SetMozTransformOrigin},
28647 : {4862, nsIDOMCSS2Properties_GetMozPerspective, nsIDOMCSS2Properties_SetMozPerspective},
28648 : {4877, nsIDOMCSS2Properties_GetMozPerspectiveOrigin, nsIDOMCSS2Properties_SetMozPerspectiveOrigin},
28649 : {4898, nsIDOMCSS2Properties_GetMozBackfaceVisibility, nsIDOMCSS2Properties_SetMozBackfaceVisibility},
28650 : {4920, nsIDOMCSS2Properties_GetMozTransformStyle, nsIDOMCSS2Properties_SetMozTransformStyle},
28651 : {4938, nsIDOMCSS2Properties_GetMozWindowShadow, nsIDOMCSS2Properties_SetMozWindowShadow},
28652 : {4954, nsIDOMCSS2Properties_GetBackgroundSize, nsIDOMCSS2Properties_SetBackgroundSize},
28653 : {4969, nsIDOMCSS2Properties_GetMozTextBlink, nsIDOMCSS2Properties_SetMozTextBlink},
28654 : {4982, nsIDOMCSS2Properties_GetMozTextDecorationColor, nsIDOMCSS2Properties_SetMozTextDecorationColor},
28655 : {5005, nsIDOMCSS2Properties_GetMozTextDecorationLine, nsIDOMCSS2Properties_SetMozTextDecorationLine},
28656 : {5027, nsIDOMCSS2Properties_GetMozTextDecorationStyle, nsIDOMCSS2Properties_SetMozTextDecorationStyle},
28657 : {5050, nsIDOMCSS2Properties_GetMozTransitionProperty, nsIDOMCSS2Properties_SetMozTransitionProperty},
28658 : {5072, nsIDOMCSS2Properties_GetMozTransitionDuration, nsIDOMCSS2Properties_SetMozTransitionDuration},
28659 : {5094, nsIDOMCSS2Properties_GetMozTransitionDelay, nsIDOMCSS2Properties_SetMozTransitionDelay},
28660 : {5113, nsIDOMCSS2Properties_GetMozTransitionTimingFunction, nsIDOMCSS2Properties_SetMozTransitionTimingFunction},
28661 : {5141, nsIDOMCSS2Properties_GetMozTransition, nsIDOMCSS2Properties_SetMozTransition},
28662 : {5155, nsIDOMCSS2Properties_GetPointerEvents, nsIDOMCSS2Properties_SetPointerEvents},
28663 : {5169, nsIDOMCSS2Properties_GetMozTabSize, nsIDOMCSS2Properties_SetMozTabSize},
28664 : {5180, nsIDOMCSS2Properties_GetResize, nsIDOMCSS2Properties_SetResize},
28665 : {5187, nsIDOMCSS2Properties_GetMozAnimationName, nsIDOMCSS2Properties_SetMozAnimationName},
28666 : {5204, nsIDOMCSS2Properties_GetMozAnimationDuration, nsIDOMCSS2Properties_SetMozAnimationDuration},
28667 : {5225, nsIDOMCSS2Properties_GetMozAnimationDelay, nsIDOMCSS2Properties_SetMozAnimationDelay},
28668 : {5243, nsIDOMCSS2Properties_GetMozAnimationTimingFunction, nsIDOMCSS2Properties_SetMozAnimationTimingFunction},
28669 : {5270, nsIDOMCSS2Properties_GetMozAnimationDirection, nsIDOMCSS2Properties_SetMozAnimationDirection},
28670 : {5292, nsIDOMCSS2Properties_GetMozAnimationFillMode, nsIDOMCSS2Properties_SetMozAnimationFillMode},
28671 : {5313, nsIDOMCSS2Properties_GetMozAnimationIterationCount, nsIDOMCSS2Properties_SetMozAnimationIterationCount},
28672 : {5340, nsIDOMCSS2Properties_GetMozAnimationPlayState, nsIDOMCSS2Properties_SetMozAnimationPlayState},
28673 : {5362, nsIDOMCSS2Properties_GetMozAnimation, nsIDOMCSS2Properties_SetMozAnimation},
28674 : {5375, nsIDOMCSS2Properties_GetMozTextSizeAdjust, nsIDOMCSS2Properties_SetMozTextSizeAdjust},
28675 : {5393, nsIDOMCSS2Properties_GetMozBorderImageSource, nsIDOMCSS2Properties_SetMozBorderImageSource},
28676 : {5414, nsIDOMCSS2Properties_GetMozBorderImageSlice, nsIDOMCSS2Properties_SetMozBorderImageSlice},
28677 : {5434, nsIDOMCSS2Properties_GetMozBorderImageWidth, nsIDOMCSS2Properties_SetMozBorderImageWidth},
28678 : {5454, nsIDOMCSS2Properties_GetMozBorderImageOutset, nsIDOMCSS2Properties_SetMozBorderImageOutset},
28679 : {5475, nsIDOMCSS2Properties_GetMozBorderImageRepeat, nsIDOMCSS2Properties_SetMozBorderImageRepeat},
28680 : // nsIDOMRect (index 337)
28681 : {12, nsIDOMRect_GetTop, xpc_qsGetterOnlyPropertyStub},
28682 : {142, nsIDOMRect_GetRight, xpc_qsGetterOnlyPropertyStub},
28683 : {148, nsIDOMRect_GetBottom, xpc_qsGetterOnlyPropertyStub},
28684 : {137, nsIDOMRect_GetLeft, xpc_qsGetterOnlyPropertyStub},
28685 : // nsIDOMCSSStyleDeclaration (index 341)
28686 : {5496, nsIDOMCSSStyleDeclaration_GetCssText, nsIDOMCSSStyleDeclaration_SetCssText},
28687 : {155, nsIDOMCSSStyleDeclaration_GetLength, xpc_qsGetterOnlyPropertyStub},
28688 : {5588, nsIDOMCSSStyleDeclaration_GetParentRule, xpc_qsGetterOnlyPropertyStub},
28689 : // nsIDOMEvent (index 344)
28690 : {5650, nsIDOMEvent_GetType, xpc_qsGetterOnlyPropertyStub},
28691 : {5655, nsIDOMEvent_GetTarget, xpc_qsGetterOnlyPropertyStub},
28692 : {5662, nsIDOMEvent_GetCurrentTarget, xpc_qsGetterOnlyPropertyStub},
28693 : {5676, nsIDOMEvent_GetEventPhase, xpc_qsGetterOnlyPropertyStub},
28694 : {5687, nsIDOMEvent_GetBubbles, xpc_qsGetterOnlyPropertyStub},
28695 : {5695, nsIDOMEvent_GetCancelable, xpc_qsGetterOnlyPropertyStub},
28696 : {5706, nsIDOMEvent_GetTimeStamp, xpc_qsGetterOnlyPropertyStub},
28697 : {5757, nsIDOMEvent_GetDefaultPrevented, xpc_qsGetterOnlyPropertyStub},
28698 : // nsIDOMMouseEvent (index 352)
28699 : {5799, nsIDOMMouseEvent_GetScreenX, xpc_qsGetterOnlyPropertyStub},
28700 : {5807, nsIDOMMouseEvent_GetScreenY, xpc_qsGetterOnlyPropertyStub},
28701 : {5815, nsIDOMMouseEvent_GetClientX, xpc_qsGetterOnlyPropertyStub},
28702 : {5823, nsIDOMMouseEvent_GetClientY, xpc_qsGetterOnlyPropertyStub},
28703 : {5831, nsIDOMMouseEvent_GetCtrlKey, xpc_qsGetterOnlyPropertyStub},
28704 : {5839, nsIDOMMouseEvent_GetShiftKey, xpc_qsGetterOnlyPropertyStub},
28705 : {5848, nsIDOMMouseEvent_GetAltKey, xpc_qsGetterOnlyPropertyStub},
28706 : {5855, nsIDOMMouseEvent_GetMetaKey, xpc_qsGetterOnlyPropertyStub},
28707 : {5863, nsIDOMMouseEvent_GetButton, xpc_qsGetterOnlyPropertyStub},
28708 : {5870, nsIDOMMouseEvent_GetRelatedTarget, xpc_qsGetterOnlyPropertyStub},
28709 : {5899, nsIDOMMouseEvent_GetMozPressure, xpc_qsGetterOnlyPropertyStub},
28710 : {5911, nsIDOMMouseEvent_GetMozInputSource, xpc_qsGetterOnlyPropertyStub},
28711 : // nsIDOMKeyEvent (index 364)
28712 : {5943, nsIDOMKeyEvent_GetCharCode, xpc_qsGetterOnlyPropertyStub},
28713 : {5952, nsIDOMKeyEvent_GetKeyCode, xpc_qsGetterOnlyPropertyStub},
28714 : {5848, nsIDOMKeyEvent_GetAltKey, xpc_qsGetterOnlyPropertyStub},
28715 : {5831, nsIDOMKeyEvent_GetCtrlKey, xpc_qsGetterOnlyPropertyStub},
28716 : {5839, nsIDOMKeyEvent_GetShiftKey, xpc_qsGetterOnlyPropertyStub},
28717 : {5855, nsIDOMKeyEvent_GetMetaKey, xpc_qsGetterOnlyPropertyStub},
28718 : // nsIDOMMutationEvent (index 370)
28719 : {5973, nsIDOMMutationEvent_GetRelatedNode, xpc_qsGetterOnlyPropertyStub},
28720 : {5985, nsIDOMMutationEvent_GetPrevValue, xpc_qsGetterOnlyPropertyStub},
28721 : {5995, nsIDOMMutationEvent_GetNewValue, xpc_qsGetterOnlyPropertyStub},
28722 : {6004, nsIDOMMutationEvent_GetAttrName, xpc_qsGetterOnlyPropertyStub},
28723 : {6013, nsIDOMMutationEvent_GetAttrChange, xpc_qsGetterOnlyPropertyStub},
28724 : // nsIDOMDragEvent (index 375)
28725 : {6042, nsIDOMDragEvent_GetDataTransfer, xpc_qsGetterOnlyPropertyStub},
28726 : // nsIDOMScrollAreaEvent (index 376)
28727 : {6069, nsIDOMScrollAreaEvent_GetX, xpc_qsGetterOnlyPropertyStub},
28728 : {6071, nsIDOMScrollAreaEvent_GetY, xpc_qsGetterOnlyPropertyStub},
28729 : {131, nsIDOMScrollAreaEvent_GetWidth, xpc_qsGetterOnlyPropertyStub},
28730 : {124, nsIDOMScrollAreaEvent_GetHeight, xpc_qsGetterOnlyPropertyStub},
28731 : // nsIDOMNotifyPaintEvent (index 380)
28732 : {6093, nsIDOMNotifyPaintEvent_GetClientRects, xpc_qsGetterOnlyPropertyStub},
28733 : {6105, nsIDOMNotifyPaintEvent_GetBoundingClientRect, xpc_qsGetterOnlyPropertyStub},
28734 : {6124, nsIDOMNotifyPaintEvent_GetPaintRequests, xpc_qsGetterOnlyPropertyStub},
28735 : // nsIDOMMessageEvent (index 383)
28736 : {871, nsIDOMMessageEvent_GetData, xpc_qsGetterOnlyPropertyStub},
28737 : {6138, nsIDOMMessageEvent_GetOrigin, xpc_qsGetterOnlyPropertyStub},
28738 : {6145, nsIDOMMessageEvent_GetLastEventId, xpc_qsGetterOnlyPropertyStub},
28739 : {6157, nsIDOMMessageEvent_GetSource, xpc_qsGetterOnlyPropertyStub},
28740 : // nsIDOMMouseScrollEvent (index 387)
28741 : {6181, nsIDOMMouseScrollEvent_GetAxis, xpc_qsGetterOnlyPropertyStub},
28742 : // nsIDOMProgressEvent (index 388)
28743 : {6207, nsIDOMProgressEvent_GetLengthComputable, xpc_qsGetterOnlyPropertyStub},
28744 : {6224, nsIDOMProgressEvent_GetLoaded, xpc_qsGetterOnlyPropertyStub},
28745 : {6231, nsIDOMProgressEvent_GetTotal, xpc_qsGetterOnlyPropertyStub},
28746 : // nsIDOMNSEvent (index 391)
28747 : {6237, nsIDOMNSEvent_GetOriginalTarget, xpc_qsGetterOnlyPropertyStub},
28748 : // nsIDOMUIEvent (index 392)
28749 : {6270, nsIDOMUIEvent_GetWhich, xpc_qsGetterOnlyPropertyStub},
28750 : {6276, nsIDOMUIEvent_GetRangeParent, xpc_qsGetterOnlyPropertyStub},
28751 : {6288, nsIDOMUIEvent_GetRangeOffset, xpc_qsGetterOnlyPropertyStub},
28752 : {6300, nsIDOMUIEvent_GetPageX, xpc_qsGetterOnlyPropertyStub},
28753 : {6306, nsIDOMUIEvent_GetPageY, xpc_qsGetterOnlyPropertyStub},
28754 : {6312, nsIDOMUIEvent_GetIsChar, xpc_qsGetterOnlyPropertyStub},
28755 : // nsIDOMTouch (index 398)
28756 : {6319, nsIDOMTouch_GetIdentifier, xpc_qsGetterOnlyPropertyStub},
28757 : {5655, nsIDOMTouch_GetTarget, xpc_qsGetterOnlyPropertyStub},
28758 : {6300, nsIDOMTouch_GetPageX, xpc_qsGetterOnlyPropertyStub},
28759 : {6306, nsIDOMTouch_GetPageY, xpc_qsGetterOnlyPropertyStub},
28760 : {5799, nsIDOMTouch_GetScreenX, xpc_qsGetterOnlyPropertyStub},
28761 : {5807, nsIDOMTouch_GetScreenY, xpc_qsGetterOnlyPropertyStub},
28762 : {5815, nsIDOMTouch_GetClientX, xpc_qsGetterOnlyPropertyStub},
28763 : {5823, nsIDOMTouch_GetClientY, xpc_qsGetterOnlyPropertyStub},
28764 : {6330, nsIDOMTouch_GetRadiusX, xpc_qsGetterOnlyPropertyStub},
28765 : {6338, nsIDOMTouch_GetRadiusY, xpc_qsGetterOnlyPropertyStub},
28766 : {6346, nsIDOMTouch_GetRotationAngle, xpc_qsGetterOnlyPropertyStub},
28767 : {6360, nsIDOMTouch_GetForce, xpc_qsGetterOnlyPropertyStub},
28768 : // nsIDOMTouchList (index 410)
28769 : {155, nsIDOMTouchList_GetLength, xpc_qsGetterOnlyPropertyStub},
28770 : // nsIDOMTouchEvent (index 411)
28771 : {6382, nsIDOMTouchEvent_GetTouches, xpc_qsGetterOnlyPropertyStub},
28772 : {6390, nsIDOMTouchEvent_GetTargetTouches, xpc_qsGetterOnlyPropertyStub},
28773 : {6404, nsIDOMTouchEvent_GetChangedTouches, xpc_qsGetterOnlyPropertyStub},
28774 : {5848, nsIDOMTouchEvent_GetAltKey, xpc_qsGetterOnlyPropertyStub},
28775 : {5855, nsIDOMTouchEvent_GetMetaKey, xpc_qsGetterOnlyPropertyStub},
28776 : {5831, nsIDOMTouchEvent_GetCtrlKey, xpc_qsGetterOnlyPropertyStub},
28777 : {5839, nsIDOMTouchEvent_GetShiftKey, xpc_qsGetterOnlyPropertyStub},
28778 : // nsIDOMHTMLAnchorElement (index 418)
28779 : {6434, nsIDOMHTMLAnchorElement_GetHref, nsIDOMHTMLAnchorElement_SetHref},
28780 : {6439, nsIDOMHTMLAnchorElement_GetRel, nsIDOMHTMLAnchorElement_SetRel},
28781 : {5655, nsIDOMHTMLAnchorElement_GetTarget, nsIDOMHTMLAnchorElement_SetTarget},
28782 : {0, nsIDOMHTMLAnchorElement_GetName, nsIDOMHTMLAnchorElement_SetName},
28783 : {6443, nsIDOMHTMLAnchorElement_GetText, nsIDOMHTMLAnchorElement_SetText},
28784 : {6448, nsIDOMHTMLAnchorElement_GetSearch, nsIDOMHTMLAnchorElement_SetSearch},
28785 : {6455, nsIDOMHTMLAnchorElement_GetHash, nsIDOMHTMLAnchorElement_SetHash},
28786 : // nsIDOMHTMLBaseElement (index 425)
28787 : {6434, nsIDOMHTMLBaseElement_GetHref, nsIDOMHTMLBaseElement_SetHref},
28788 : {5655, nsIDOMHTMLBaseElement_GetTarget, nsIDOMHTMLBaseElement_SetTarget},
28789 : // nsIDOMHTMLButtonElement (index 427)
28790 : {0, nsIDOMHTMLButtonElement_GetName, nsIDOMHTMLButtonElement_SetName},
28791 : {6460, nsIDOMHTMLButtonElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28792 : {1891, nsIDOMHTMLButtonElement_GetValue, nsIDOMHTMLButtonElement_SetValue},
28793 : {6465, nsIDOMHTMLButtonElement_GetDisabled, nsIDOMHTMLButtonElement_SetDisabled},
28794 : // nsIDOMHTMLCollection (index 431)
28795 : {155, nsIDOMHTMLCollection_GetLength, xpc_qsGetterOnlyPropertyStub},
28796 : // nsIDOMHTMLCommandElement (index 432)
28797 : {5650, nsIDOMHTMLCommandElement_GetType, nsIDOMHTMLCommandElement_SetType},
28798 : {6474, nsIDOMHTMLCommandElement_GetLabel, nsIDOMHTMLCommandElement_SetLabel},
28799 : {6480, nsIDOMHTMLCommandElement_GetIcon, nsIDOMHTMLCommandElement_SetIcon},
28800 : {6465, nsIDOMHTMLCommandElement_GetDisabled, nsIDOMHTMLCommandElement_SetDisabled},
28801 : {6485, nsIDOMHTMLCommandElement_GetDefaultChecked, nsIDOMHTMLCommandElement_SetDefaultChecked},
28802 : {6500, nsIDOMHTMLCommandElement_GetChecked, nsIDOMHTMLCommandElement_SetChecked},
28803 : {6508, nsIDOMHTMLCommandElement_GetRadiogroup, nsIDOMHTMLCommandElement_SetRadiogroup},
28804 : // nsIDOMHTMLDocument (index 439)
28805 : {6519, nsIDOMHTMLDocument_GetBody, nsIDOMHTMLDocument_SetBody},
28806 : {6542, nsIDOMHTMLDocument_GetAnchors, xpc_qsGetterOnlyPropertyStub},
28807 : {6550, nsIDOMHTMLDocument_GetLinks, xpc_qsGetterOnlyPropertyStub},
28808 : {6556, nsIDOMHTMLDocument_GetURL, xpc_qsGetterOnlyPropertyStub},
28809 : {6560, nsIDOMHTMLDocument_GetForms, xpc_qsGetterOnlyPropertyStub},
28810 : {6566, nsIDOMHTMLDocument_GetCookie, nsIDOMHTMLDocument_SetCookie},
28811 : {6573, nsIDOMHTMLDocument_GetImages, xpc_qsGetterOnlyPropertyStub},
28812 : {6594, nsIDOMHTMLDocument_GetDomain, nsIDOMHTMLDocument_SetDomain},
28813 : {6601, nsIDOMHTMLDocument_GetDesignMode, nsIDOMHTMLDocument_SetDesignMode},
28814 : {6612, nsIDOMHTMLDocument_GetHead, xpc_qsGetterOnlyPropertyStub},
28815 : // nsIDOMHTMLElement (index 449)
28816 : {6617, nsIDOMHTMLElement_GetId, nsIDOMHTMLElement_SetId},
28817 : {1141, nsIDOMHTMLElement_GetTitle, nsIDOMHTMLElement_SetTitle},
28818 : {6620, nsIDOMHTMLElement_GetLang, nsIDOMHTMLElement_SetLang},
28819 : {6625, nsIDOMHTMLElement_GetDir, nsIDOMHTMLElement_SetDir},
28820 : {6629, nsIDOMHTMLElement_GetClassName, nsIDOMHTMLElement_SetClassName},
28821 : {6639, nsIDOMHTMLElement_GetDataset, xpc_qsGetterOnlyPropertyStub},
28822 : {6647, nsIDOMHTMLElement_GetHidden, nsIDOMHTMLElement_SetHidden},
28823 : {6660, nsIDOMHTMLElement_GetTabIndex, nsIDOMHTMLElement_SetTabIndex},
28824 : {6680, nsIDOMHTMLElement_GetAccessKey, nsIDOMHTMLElement_SetAccessKey},
28825 : {6690, nsIDOMHTMLElement_GetAccessKeyLabel, xpc_qsGetterOnlyPropertyStub},
28826 : {6705, nsIDOMHTMLElement_GetDraggable, nsIDOMHTMLElement_SetDraggable},
28827 : {6715, nsIDOMHTMLElement_GetContentEditable, nsIDOMHTMLElement_SetContentEditable},
28828 : {6731, nsIDOMHTMLElement_GetIsContentEditable, xpc_qsGetterOnlyPropertyStub},
28829 : {6749, nsIDOMHTMLElement_GetContextMenu, xpc_qsGetterOnlyPropertyStub},
28830 : {6761, nsIDOMHTMLElement_GetSpellcheck, nsIDOMHTMLElement_SetSpellcheck},
28831 : {6772, nsIDOMHTMLElement_GetInnerHTML, nsIDOMHTMLElement_SetInnerHTML},
28832 : {6782, nsIDOMHTMLElement_GetOuterHTML, nsIDOMHTMLElement_SetOuterHTML},
28833 : {6826, nsIDOMHTMLElement_GetOffsetParent, xpc_qsGetterOnlyPropertyStub},
28834 : {6839, nsIDOMHTMLElement_GetOffsetTop, xpc_qsGetterOnlyPropertyStub},
28835 : {6849, nsIDOMHTMLElement_GetOffsetLeft, xpc_qsGetterOnlyPropertyStub},
28836 : {6860, nsIDOMHTMLElement_GetOffsetWidth, xpc_qsGetterOnlyPropertyStub},
28837 : {6872, nsIDOMHTMLElement_GetOffsetHeight, xpc_qsGetterOnlyPropertyStub},
28838 : // nsIDOMHTMLFormElement (index 471)
28839 : {6906, nsIDOMHTMLFormElement_GetElements, xpc_qsGetterOnlyPropertyStub},
28840 : {0, nsIDOMHTMLFormElement_GetName, nsIDOMHTMLFormElement_SetName},
28841 : {155, nsIDOMHTMLFormElement_GetLength, xpc_qsGetterOnlyPropertyStub},
28842 : {5655, nsIDOMHTMLFormElement_GetTarget, nsIDOMHTMLFormElement_SetTarget},
28843 : {6922, nsIDOMHTMLFormElement_GetAction, nsIDOMHTMLFormElement_SetAction},
28844 : // nsIDOMHTMLFrameElement (index 476)
28845 : {6929, nsIDOMHTMLFrameElement_GetSrc, nsIDOMHTMLFrameElement_SetSrc},
28846 : {6933, nsIDOMHTMLFrameElement_GetContentDocument, xpc_qsGetterOnlyPropertyStub},
28847 : {6949, nsIDOMHTMLFrameElement_GetContentWindow, xpc_qsGetterOnlyPropertyStub},
28848 : {0, nsIDOMHTMLFrameElement_GetName, nsIDOMHTMLFrameElement_SetName},
28849 : // nsIDOMHTMLFrameSetElement (index 480)
28850 : {6963, nsIDOMHTMLFrameSetElement_GetRows, nsIDOMHTMLFrameSetElement_SetRows},
28851 : {6968, nsIDOMHTMLFrameSetElement_GetCols, nsIDOMHTMLFrameSetElement_SetCols},
28852 : // nsIDOMHTMLIFrameElement (index 482)
28853 : {6929, nsIDOMHTMLIFrameElement_GetSrc, nsIDOMHTMLIFrameElement_SetSrc},
28854 : {6933, nsIDOMHTMLIFrameElement_GetContentDocument, xpc_qsGetterOnlyPropertyStub},
28855 : {6949, nsIDOMHTMLIFrameElement_GetContentWindow, xpc_qsGetterOnlyPropertyStub},
28856 : // nsIDOMHTMLImageElement (index 485)
28857 : {6929, nsIDOMHTMLImageElement_GetSrc, nsIDOMHTMLImageElement_SetSrc},
28858 : {0, nsIDOMHTMLImageElement_GetName, nsIDOMHTMLImageElement_SetName},
28859 : {124, nsIDOMHTMLImageElement_GetHeight, nsIDOMHTMLImageElement_SetHeight},
28860 : {131, nsIDOMHTMLImageElement_GetWidth, nsIDOMHTMLImageElement_SetWidth},
28861 : {6973, nsIDOMHTMLImageElement_GetComplete, xpc_qsGetterOnlyPropertyStub},
28862 : // nsIDOMHTMLInputElement (index 490)
28863 : {6485, nsIDOMHTMLInputElement_GetDefaultChecked, nsIDOMHTMLInputElement_SetDefaultChecked},
28864 : {6465, nsIDOMHTMLInputElement_GetDisabled, nsIDOMHTMLInputElement_SetDisabled},
28865 : {6500, nsIDOMHTMLInputElement_GetChecked, nsIDOMHTMLInputElement_SetChecked},
28866 : {5650, nsIDOMHTMLInputElement_GetType, nsIDOMHTMLInputElement_SetType},
28867 : {6460, nsIDOMHTMLInputElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28868 : {6929, nsIDOMHTMLInputElement_GetSrc, nsIDOMHTMLInputElement_SetSrc},
28869 : {0, nsIDOMHTMLInputElement_GetName, nsIDOMHTMLInputElement_SetName},
28870 : {1891, nsIDOMHTMLInputElement_GetValue, nsIDOMHTMLInputElement_SetValue},
28871 : {6989, nsIDOMHTMLInputElement_GetFiles, xpc_qsGetterOnlyPropertyStub},
28872 : {6995, nsIDOMHTMLInputElement_GetTextLength, xpc_qsGetterOnlyPropertyStub},
28873 : {7006, nsIDOMHTMLInputElement_GetSelectionStart, nsIDOMHTMLInputElement_SetSelectionStart},
28874 : {7021, nsIDOMHTMLInputElement_GetSelectionEnd, nsIDOMHTMLInputElement_SetSelectionEnd},
28875 : {7034, nsIDOMHTMLInputElement_GetSelectionDirection, nsIDOMHTMLInputElement_SetSelectionDirection},
28876 : // nsIDOMHTMLLinkElement (index 503)
28877 : {6465, nsIDOMHTMLLinkElement_GetDisabled, nsIDOMHTMLLinkElement_SetDisabled},
28878 : // nsIDOMHTMLMenuElement (index 504)
28879 : {7071, nsIDOMHTMLMenuElement_GetCompact, nsIDOMHTMLMenuElement_SetCompact},
28880 : {5650, nsIDOMHTMLMenuElement_GetType, nsIDOMHTMLMenuElement_SetType},
28881 : {6474, nsIDOMHTMLMenuElement_GetLabel, nsIDOMHTMLMenuElement_SetLabel},
28882 : // nsIDOMHTMLOptionElement (index 507)
28883 : {7079, nsIDOMHTMLOptionElement_GetIndex, xpc_qsGetterOnlyPropertyStub},
28884 : {7085, nsIDOMHTMLOptionElement_GetSelected, nsIDOMHTMLOptionElement_SetSelected},
28885 : {6460, nsIDOMHTMLOptionElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28886 : {6443, nsIDOMHTMLOptionElement_GetText, nsIDOMHTMLOptionElement_SetText},
28887 : {7094, nsIDOMHTMLOptionElement_GetDefaultSelected, nsIDOMHTMLOptionElement_SetDefaultSelected},
28888 : {1891, nsIDOMHTMLOptionElement_GetValue, nsIDOMHTMLOptionElement_SetValue},
28889 : {6474, nsIDOMHTMLOptionElement_GetLabel, nsIDOMHTMLOptionElement_SetLabel},
28890 : {6465, nsIDOMHTMLOptionElement_GetDisabled, nsIDOMHTMLOptionElement_SetDisabled},
28891 : // nsIDOMHTMLOptionsCollection (index 515)
28892 : {155, nsIDOMHTMLOptionsCollection_GetLength, nsIDOMHTMLOptionsCollection_SetLength},
28893 : {7110, nsIDOMHTMLOptionsCollection_GetSelectedIndex, nsIDOMHTMLOptionsCollection_SetSelectedIndex},
28894 : // nsIDOMHTMLProgressElement (index 517)
28895 : {1891, nsIDOMHTMLProgressElement_GetValue, nsIDOMHTMLProgressElement_SetValue},
28896 : {7124, nsIDOMHTMLProgressElement_GetMax, nsIDOMHTMLProgressElement_SetMax},
28897 : {3287, nsIDOMHTMLProgressElement_GetPosition, xpc_qsGetterOnlyPropertyStub},
28898 : {6460, nsIDOMHTMLProgressElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28899 : // nsIDOMHTMLSelectElement (index 521)
28900 : {0, nsIDOMHTMLSelectElement_GetName, nsIDOMHTMLSelectElement_SetName},
28901 : {6460, nsIDOMHTMLSelectElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28902 : {1891, nsIDOMHTMLSelectElement_GetValue, nsIDOMHTMLSelectElement_SetValue},
28903 : {6465, nsIDOMHTMLSelectElement_GetDisabled, nsIDOMHTMLSelectElement_SetDisabled},
28904 : {155, nsIDOMHTMLSelectElement_GetLength, nsIDOMHTMLSelectElement_SetLength},
28905 : {7110, nsIDOMHTMLSelectElement_GetSelectedIndex, nsIDOMHTMLSelectElement_SetSelectedIndex},
28906 : {5650, nsIDOMHTMLSelectElement_GetType, xpc_qsGetterOnlyPropertyStub},
28907 : {7128, nsIDOMHTMLSelectElement_GetOptions, xpc_qsGetterOnlyPropertyStub},
28908 : {3303, nsIDOMHTMLSelectElement_GetSize, nsIDOMHTMLSelectElement_SetSize},
28909 : // nsIDOMHTMLStyleElement (index 530)
28910 : {6465, nsIDOMHTMLStyleElement_GetDisabled, nsIDOMHTMLStyleElement_SetDisabled},
28911 : // nsIDOMHTMLTableCellElement (index 531)
28912 : {7136, nsIDOMHTMLTableCellElement_GetColSpan, nsIDOMHTMLTableCellElement_SetColSpan},
28913 : {7144, nsIDOMHTMLTableCellElement_GetHeaders, nsIDOMHTMLTableCellElement_SetHeaders},
28914 : {7152, nsIDOMHTMLTableCellElement_GetCellIndex, xpc_qsGetterOnlyPropertyStub},
28915 : {7162, nsIDOMHTMLTableCellElement_GetRowSpan, nsIDOMHTMLTableCellElement_SetRowSpan},
28916 : {7170, nsIDOMHTMLTableCellElement_GetAbbr, nsIDOMHTMLTableCellElement_SetAbbr},
28917 : {7175, nsIDOMHTMLTableCellElement_GetScope, nsIDOMHTMLTableCellElement_SetScope},
28918 : {7181, nsIDOMHTMLTableCellElement_GetNoWrap, nsIDOMHTMLTableCellElement_SetNoWrap},
28919 : {131, nsIDOMHTMLTableCellElement_GetWidth, nsIDOMHTMLTableCellElement_SetWidth},
28920 : // nsIDOMHTMLTableColElement (index 539)
28921 : {7188, nsIDOMHTMLTableColElement_GetSpan, nsIDOMHTMLTableColElement_SetSpan},
28922 : {131, nsIDOMHTMLTableColElement_GetWidth, nsIDOMHTMLTableColElement_SetWidth},
28923 : // nsIDOMHTMLTableElement (index 541)
28924 : {6963, nsIDOMHTMLTableElement_GetRows, xpc_qsGetterOnlyPropertyStub},
28925 : {7203, nsIDOMHTMLTableElement_GetSummary, nsIDOMHTMLTableElement_SetSummary},
28926 : // nsIDOMHTMLTableRowElement (index 543)
28927 : {7221, nsIDOMHTMLTableRowElement_GetSectionRowIndex, xpc_qsGetterOnlyPropertyStub},
28928 : {7237, nsIDOMHTMLTableRowElement_GetRowIndex, xpc_qsGetterOnlyPropertyStub},
28929 : {7246, nsIDOMHTMLTableRowElement_GetCells, xpc_qsGetterOnlyPropertyStub},
28930 : // nsIDOMHTMLTableSectionElement (index 546)
28931 : {6963, nsIDOMHTMLTableSectionElement_GetRows, xpc_qsGetterOnlyPropertyStub},
28932 : // nsIDOMHTMLTextAreaElement (index 547)
28933 : {6963, nsIDOMHTMLTextAreaElement_GetRows, nsIDOMHTMLTextAreaElement_SetRows},
28934 : {0, nsIDOMHTMLTextAreaElement_GetName, nsIDOMHTMLTextAreaElement_SetName},
28935 : {6460, nsIDOMHTMLTextAreaElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28936 : {7274, nsIDOMHTMLTextAreaElement_GetDefaultValue, nsIDOMHTMLTextAreaElement_SetDefaultValue},
28937 : {6968, nsIDOMHTMLTextAreaElement_GetCols, nsIDOMHTMLTextAreaElement_SetCols},
28938 : {1891, nsIDOMHTMLTextAreaElement_GetValue, nsIDOMHTMLTextAreaElement_SetValue},
28939 : {5650, nsIDOMHTMLTextAreaElement_GetType, xpc_qsGetterOnlyPropertyStub},
28940 : {7006, nsIDOMHTMLTextAreaElement_GetSelectionStart, nsIDOMHTMLTextAreaElement_SetSelectionStart},
28941 : {7021, nsIDOMHTMLTextAreaElement_GetSelectionEnd, nsIDOMHTMLTextAreaElement_SetSelectionEnd},
28942 : {7034, nsIDOMHTMLTextAreaElement_GetSelectionDirection, nsIDOMHTMLTextAreaElement_SetSelectionDirection},
28943 : {6995, nsIDOMHTMLTextAreaElement_GetTextLength, xpc_qsGetterOnlyPropertyStub},
28944 : {7287, nsIDOMHTMLTextAreaElement_GetWrap, nsIDOMHTMLTextAreaElement_SetWrap},
28945 : // nsIDOMHTMLTitleElement (index 559)
28946 : {6443, nsIDOMHTMLTitleElement_GetText, nsIDOMHTMLTitleElement_SetText},
28947 : // nsIDOMHTMLCanvasElement (index 560)
28948 : {131, nsIDOMHTMLCanvasElement_GetWidth, nsIDOMHTMLCanvasElement_SetWidth},
28949 : {124, nsIDOMHTMLCanvasElement_GetHeight, nsIDOMHTMLCanvasElement_SetHeight},
28950 : // nsIDOMRange (index 562)
28951 : {7313, nsIDOMRange_GetStartContainer, xpc_qsGetterOnlyPropertyStub},
28952 : {7328, nsIDOMRange_GetStartOffset, xpc_qsGetterOnlyPropertyStub},
28953 : {7340, nsIDOMRange_GetEndContainer, xpc_qsGetterOnlyPropertyStub},
28954 : {7353, nsIDOMRange_GetEndOffset, xpc_qsGetterOnlyPropertyStub},
28955 : {7363, nsIDOMRange_GetCollapsed, xpc_qsGetterOnlyPropertyStub},
28956 : {7373, nsIDOMRange_GetCommonAncestorContainer, xpc_qsGetterOnlyPropertyStub},
28957 : // nsIDOMStorage (index 568)
28958 : {155, nsIDOMStorage_GetLength, xpc_qsGetterOnlyPropertyStub},
28959 : // nsIDOMStorageItem (index 569)
28960 : {1891, nsIDOMStorageItem_GetValue, nsIDOMStorageItem_SetValue},
28961 : // nsIDOMSVGStylable (index 570)
28962 : {6629, nsIDOMSVGStylable_GetClassName, xpc_qsGetterOnlyPropertyStub},
28963 : {2201, nsIDOMSVGStylable_GetStyle, xpc_qsGetterOnlyPropertyStub},
28964 : // nsIDOMXPathResult (index 572)
28965 : {7805, nsIDOMXPathResult_GetSnapshotLength, xpc_qsGetterOnlyPropertyStub},
28966 : {7820, nsIDOMXPathResult_GetResultType, xpc_qsGetterOnlyPropertyStub},
28967 : {7831, nsIDOMXPathResult_GetNumberValue, xpc_qsGetterOnlyPropertyStub},
28968 : {7843, nsIDOMXPathResult_GetStringValue, xpc_qsGetterOnlyPropertyStub},
28969 : {7855, nsIDOMXPathResult_GetBooleanValue, xpc_qsGetterOnlyPropertyStub},
28970 : {7868, nsIDOMXPathResult_GetSingleNodeValue, xpc_qsGetterOnlyPropertyStub},
28971 : // nsIDOMXULElement (index 578)
28972 : {6617, nsIDOMXULElement_GetId, nsIDOMXULElement_SetId},
28973 : {6629, nsIDOMXULElement_GetClassName, nsIDOMXULElement_SetClassName},
28974 : {7904, nsIDOMXULElement_GetAlign, nsIDOMXULElement_SetAlign},
28975 : {6625, nsIDOMXULElement_GetDir, nsIDOMXULElement_SetDir},
28976 : {7910, nsIDOMXULElement_GetFlex, nsIDOMXULElement_SetFlex},
28977 : {7915, nsIDOMXULElement_GetFlexGroup, nsIDOMXULElement_SetFlexGroup},
28978 : {7925, nsIDOMXULElement_GetOrdinal, nsIDOMXULElement_SetOrdinal},
28979 : {7933, nsIDOMXULElement_GetOrient, nsIDOMXULElement_SetOrient},
28980 : {7940, nsIDOMXULElement_GetPack, nsIDOMXULElement_SetPack},
28981 : {6647, nsIDOMXULElement_GetHidden, nsIDOMXULElement_SetHidden},
28982 : {7363, nsIDOMXULElement_GetCollapsed, nsIDOMXULElement_SetCollapsed},
28983 : {7945, nsIDOMXULElement_GetObserves, nsIDOMXULElement_SetObserves},
28984 : {7954, nsIDOMXULElement_GetMenu, nsIDOMXULElement_SetMenu},
28985 : {6749, nsIDOMXULElement_GetContextMenu, nsIDOMXULElement_SetContextMenu},
28986 : {7959, nsIDOMXULElement_GetTooltip, nsIDOMXULElement_SetTooltip},
28987 : {131, nsIDOMXULElement_GetWidth, nsIDOMXULElement_SetWidth},
28988 : {124, nsIDOMXULElement_GetHeight, nsIDOMXULElement_SetHeight},
28989 : {3104, nsIDOMXULElement_GetMinWidth, nsIDOMXULElement_SetMinWidth},
28990 : {3094, nsIDOMXULElement_GetMinHeight, nsIDOMXULElement_SetMinHeight},
28991 : {3085, nsIDOMXULElement_GetMaxWidth, nsIDOMXULElement_SetMaxWidth},
28992 : {3075, nsIDOMXULElement_GetMaxHeight, nsIDOMXULElement_SetMaxHeight},
28993 : {7967, nsIDOMXULElement_GetPersist, nsIDOMXULElement_SetPersist},
28994 : {137, nsIDOMXULElement_GetLeft, nsIDOMXULElement_SetLeft},
28995 : {12, nsIDOMXULElement_GetTop, nsIDOMXULElement_SetTop},
28996 : {7975, nsIDOMXULElement_GetDatasources, nsIDOMXULElement_SetDatasources},
28997 : {7987, nsIDOMXULElement_GetRef, nsIDOMXULElement_SetRef},
28998 : {7991, nsIDOMXULElement_GetTooltipText, nsIDOMXULElement_SetTooltipText},
28999 : {8003, nsIDOMXULElement_GetStatusText, nsIDOMXULElement_SetStatusText},
29000 : {8014, nsIDOMXULElement_GetAllowEvents, nsIDOMXULElement_SetAllowEvents},
29001 : {8026, nsIDOMXULElement_GetDatabase, xpc_qsGetterOnlyPropertyStub},
29002 : {8035, nsIDOMXULElement_GetBuilder, xpc_qsGetterOnlyPropertyStub},
29003 : {8043, nsIDOMXULElement_GetResource, xpc_qsGetterOnlyPropertyStub},
29004 : {8052, nsIDOMXULElement_GetControllers, xpc_qsGetterOnlyPropertyStub},
29005 : {8064, nsIDOMXULElement_GetBoxObject, xpc_qsGetterOnlyPropertyStub},
29006 : // nsIBoxObject (index 612)
29007 : {6069, nsIBoxObject_GetX, xpc_qsGetterOnlyPropertyStub},
29008 : {6071, nsIBoxObject_GetY, xpc_qsGetterOnlyPropertyStub},
29009 : {5799, nsIBoxObject_GetScreenX, xpc_qsGetterOnlyPropertyStub},
29010 : {5807, nsIBoxObject_GetScreenY, xpc_qsGetterOnlyPropertyStub},
29011 : {131, nsIBoxObject_GetWidth, xpc_qsGetterOnlyPropertyStub},
29012 : {124, nsIBoxObject_GetHeight, xpc_qsGetterOnlyPropertyStub},
29013 : // nsIDOMFileReader (index 618)
29014 : {8200, nsIDOMFileReader_GetReadyState, xpc_qsGetterOnlyPropertyStub},
29015 : {8211, nsIDOMFileReader_GetResult, xpc_qsGetterOnlyPropertyStub},
29016 : {8218, nsIDOMFileReader_GetError, xpc_qsGetterOnlyPropertyStub},
29017 : {8224, nsIDOMFileReader_GetOnloadstart, nsIDOMFileReader_SetOnloadstart},
29018 : {8236, nsIDOMFileReader_GetOnprogress, nsIDOMFileReader_SetOnprogress},
29019 : {8247, nsIDOMFileReader_GetOnload, nsIDOMFileReader_SetOnload},
29020 : {8254, nsIDOMFileReader_GetOnabort, nsIDOMFileReader_SetOnabort},
29021 : {8262, nsIDOMFileReader_GetOnerror, nsIDOMFileReader_SetOnerror},
29022 : {8270, nsIDOMFileReader_GetOnloadend, nsIDOMFileReader_SetOnloadend},
29023 : // nsIXMLHttpRequest (index 627)
29024 : {8280, nsIXMLHttpRequest_GetResponseXML, xpc_qsGetterOnlyPropertyStub},
29025 : {8292, nsIXMLHttpRequest_GetResponseText, xpc_qsGetterOnlyPropertyStub},
29026 : {8305, nsIXMLHttpRequest_GetResponseType, nsIXMLHttpRequest_SetResponseType},
29027 : {8318, nsIXMLHttpRequest_GetResponse, xpc_qsGetterOnlyPropertyStub},
29028 : {8327, nsIXMLHttpRequest_GetStatus, xpc_qsGetterOnlyPropertyStub},
29029 : {8357, nsIXMLHttpRequest_GetTimeout, nsIXMLHttpRequest_SetTimeout},
29030 : {8200, nsIXMLHttpRequest_GetReadyState, xpc_qsGetterOnlyPropertyStub},
29031 : {8365, nsIXMLHttpRequest_GetMultipart, nsIXMLHttpRequest_SetMultipart},
29032 : {8375, nsIXMLHttpRequest_GetMozBackgroundRequest, nsIXMLHttpRequest_SetMozBackgroundRequest},
29033 : {8396, nsIXMLHttpRequest_GetWithCredentials, nsIXMLHttpRequest_SetWithCredentials},
29034 : {1196, nsIXMLHttpRequest_GetOnreadystatechange, nsIXMLHttpRequest_SetOnreadystatechange},
29035 : // nsIWebSocket (index 638)
29036 : {8412, nsIWebSocket_GetUrl, xpc_qsGetterOnlyPropertyStub},
29037 : {8416, nsIWebSocket_GetExtensions, xpc_qsGetterOnlyPropertyStub},
29038 : {8427, nsIWebSocket_GetProtocol, xpc_qsGetterOnlyPropertyStub},
29039 : {8200, nsIWebSocket_GetReadyState, xpc_qsGetterOnlyPropertyStub},
29040 : {8436, nsIWebSocket_GetBufferedAmount, xpc_qsGetterOnlyPropertyStub},
29041 : {8451, nsIWebSocket_GetBinaryType, nsIWebSocket_SetBinaryType},
29042 : {8462, nsIWebSocket_GetOnopen, nsIWebSocket_SetOnopen},
29043 : {8469, nsIWebSocket_GetOnmessage, nsIWebSocket_SetOnmessage},
29044 : {8262, nsIWebSocket_GetOnerror, nsIWebSocket_SetOnerror},
29045 : {8479, nsIWebSocket_GetOnclose, nsIWebSocket_SetOnclose},
29046 : // nsIDOMWebGLRenderingContext (index 648)
29047 : {185, nsIDOMWebGLRenderingContext_GetCanvas, xpc_qsGetterOnlyPropertyStub},
29048 : {10411, nsIDOMWebGLRenderingContext_GetDrawingBufferWidth, xpc_qsGetterOnlyPropertyStub},
29049 : {10430, nsIDOMWebGLRenderingContext_GetDrawingBufferHeight, xpc_qsGetterOnlyPropertyStub},
29050 : // nsIDOMNotifyAudioAvailableEvent (index 651)
29051 : {10450, nsIDOMNotifyAudioAvailableEvent_GetFrameBuffer, xpc_qsGetterOnlyPropertyStub},
29052 : {10462, nsIDOMNotifyAudioAvailableEvent_GetTime, xpc_qsGetterOnlyPropertyStub},
29053 : // nsIIDBCursor (index 653)
29054 : {2803, nsIIDBCursor_GetDirection, xpc_qsGetterOnlyPropertyStub},
29055 : {6157, nsIIDBCursor_GetSource, xpc_qsGetterOnlyPropertyStub},
29056 : {7688, nsIIDBCursor_GetKey, xpc_qsGetterOnlyPropertyStub},
29057 : {10481, nsIIDBCursor_GetPrimaryKey, xpc_qsGetterOnlyPropertyStub},
29058 : // nsIIDBCursorWithValue (index 657)
29059 : {1891, nsIIDBCursorWithValue_GetValue, xpc_qsGetterOnlyPropertyStub},
29060 : // nsIIDBDatabase (index 658)
29061 : {0, nsIIDBDatabase_GetName, xpc_qsGetterOnlyPropertyStub},
29062 : {10523, nsIIDBDatabase_GetVersion, xpc_qsGetterOnlyPropertyStub},
29063 : {10531, nsIIDBDatabase_GetObjectStoreNames, xpc_qsGetterOnlyPropertyStub},
29064 : {8254, nsIIDBDatabase_GetOnabort, nsIIDBDatabase_SetOnabort},
29065 : {8262, nsIIDBDatabase_GetOnerror, nsIIDBDatabase_SetOnerror},
29066 : {10596, nsIIDBDatabase_GetOnversionchange, nsIIDBDatabase_SetOnversionchange},
29067 : // nsIIDBDatabaseException (index 664)
29068 : {10612, nsIIDBDatabaseException_GetCode, xpc_qsGetterOnlyPropertyStub},
29069 : // nsIIDBIndex (index 665)
29070 : {0, nsIIDBIndex_GetName, xpc_qsGetterOnlyPropertyStub},
29071 : {10617, nsIIDBIndex_GetStoreName, xpc_qsGetterOnlyPropertyStub},
29072 : {10627, nsIIDBIndex_GetKeyPath, xpc_qsGetterOnlyPropertyStub},
29073 : {10635, nsIIDBIndex_GetUnique, xpc_qsGetterOnlyPropertyStub},
29074 : {10642, nsIIDBIndex_GetMultiEntry, xpc_qsGetterOnlyPropertyStub},
29075 : {10653, nsIIDBIndex_GetObjectStore, xpc_qsGetterOnlyPropertyStub},
29076 : // nsIIDBKeyRange (index 671)
29077 : {10725, nsIIDBKeyRange_GetLower, xpc_qsGetterOnlyPropertyStub},
29078 : {10731, nsIIDBKeyRange_GetUpper, xpc_qsGetterOnlyPropertyStub},
29079 : {10737, nsIIDBKeyRange_GetLowerOpen, xpc_qsGetterOnlyPropertyStub},
29080 : {10747, nsIIDBKeyRange_GetUpperOpen, xpc_qsGetterOnlyPropertyStub},
29081 : // nsIIDBObjectStore (index 675)
29082 : {0, nsIIDBObjectStore_GetName, xpc_qsGetterOnlyPropertyStub},
29083 : {10627, nsIIDBObjectStore_GetKeyPath, xpc_qsGetterOnlyPropertyStub},
29084 : {10757, nsIIDBObjectStore_GetIndexNames, xpc_qsGetterOnlyPropertyStub},
29085 : {10584, nsIIDBObjectStore_GetTransaction, xpc_qsGetterOnlyPropertyStub},
29086 : {10768, nsIIDBObjectStore_GetAutoIncrement, xpc_qsGetterOnlyPropertyStub},
29087 : // nsIIDBRequest (index 680)
29088 : {8200, nsIIDBRequest_GetReadyState, xpc_qsGetterOnlyPropertyStub},
29089 : {6157, nsIIDBRequest_GetSource, xpc_qsGetterOnlyPropertyStub},
29090 : {10584, nsIIDBRequest_GetTransaction, xpc_qsGetterOnlyPropertyStub},
29091 : {8211, nsIIDBRequest_GetResult, xpc_qsGetterOnlyPropertyStub},
29092 : {10810, nsIIDBRequest_GetErrorCode, xpc_qsGetterOnlyPropertyStub},
29093 : {10820, nsIIDBRequest_GetOnsuccess, nsIIDBRequest_SetOnsuccess},
29094 : {8262, nsIIDBRequest_GetOnerror, nsIIDBRequest_SetOnerror},
29095 : // nsIIDBTransaction (index 687)
29096 : {10830, nsIIDBTransaction_GetDb, xpc_qsGetterOnlyPropertyStub},
29097 : {10833, nsIIDBTransaction_GetMode, xpc_qsGetterOnlyPropertyStub},
29098 : {10531, nsIIDBTransaction_GetObjectStoreNames, xpc_qsGetterOnlyPropertyStub},
29099 : {8262, nsIIDBTransaction_GetOnerror, nsIIDBTransaction_SetOnerror},
29100 : {10838, nsIIDBTransaction_GetOncomplete, nsIIDBTransaction_SetOncomplete},
29101 : {8254, nsIIDBTransaction_GetOnabort, nsIIDBTransaction_SetOnabort},
29102 : // nsIIDBOpenDBRequest (index 693)
29103 : {10868, nsIIDBOpenDBRequest_GetOnblocked, nsIIDBOpenDBRequest_SetOnblocked},
29104 : {10878, nsIIDBOpenDBRequest_GetOnupgradeneeded, nsIIDBOpenDBRequest_SetOnupgradeneeded},
29105 : // nsIIDBVersionChangeEvent (index 695)
29106 : {10894, nsIIDBVersionChangeEvent_GetOldVersion, xpc_qsGetterOnlyPropertyStub},
29107 : {10905, nsIIDBVersionChangeEvent_GetNewVersion, xpc_qsGetterOnlyPropertyStub},
29108 : // nsIDOMDOMError (index 697)
29109 : {0, nsIDOMDOMError_GetName, xpc_qsGetterOnlyPropertyStub},
29110 : };
29111 :
29112 : static const xpc_qsFunctionSpec all_functions[] = {
29113 : // nsIDOMWindow (index 0)
29114 : {21, 0, nsIDOMWindow_GetSelection},
29115 : {34, 1, nsIDOMWindow_ScrollByLines},
29116 : {48, 2, nsIDOMWindow_GetComputedStyle},
29117 : // nsIDOMJSWindow (index 3)
29118 : {119, 1, nsIDOMJSWindow_Dump},
29119 : // nsIDOMClientRectList (index 4)
29120 : {162, 1, nsIDOMClientRectList_Item},
29121 : // nsIDOMPaintRequestList (index 5)
29122 : {162, 1, nsIDOMPaintRequestList_Item},
29123 : // nsIDOMCanvasRenderingContext2D (index 6)
29124 : {192, 0, nsIDOMCanvasRenderingContext2D_Save},
29125 : {197, 0, nsIDOMCanvasRenderingContext2D_Restore},
29126 : {205, 2, nsIDOMCanvasRenderingContext2D_Scale},
29127 : {211, 1, nsIDOMCanvasRenderingContext2D_Rotate},
29128 : {218, 2, nsIDOMCanvasRenderingContext2D_Translate},
29129 : {228, 6, nsIDOMCanvasRenderingContext2D_Transform},
29130 : {238, 6, nsIDOMCanvasRenderingContext2D_SetTransform},
29131 : {369, 4, nsIDOMCanvasRenderingContext2D_CreateLinearGradient},
29132 : {390, 6, nsIDOMCanvasRenderingContext2D_CreateRadialGradient},
29133 : {411, 2, nsIDOMCanvasRenderingContext2D_CreatePattern},
29134 : {536, 4, nsIDOMCanvasRenderingContext2D_ClearRect},
29135 : {546, 4, nsIDOMCanvasRenderingContext2D_FillRect},
29136 : {555, 4, nsIDOMCanvasRenderingContext2D_StrokeRect},
29137 : {566, 0, nsIDOMCanvasRenderingContext2D_BeginPath},
29138 : {576, 0, nsIDOMCanvasRenderingContext2D_ClosePath},
29139 : {586, 2, nsIDOMCanvasRenderingContext2D_MoveTo},
29140 : {593, 2, nsIDOMCanvasRenderingContext2D_LineTo},
29141 : {600, 4, nsIDOMCanvasRenderingContext2D_QuadraticCurveTo},
29142 : {617, 6, nsIDOMCanvasRenderingContext2D_BezierCurveTo},
29143 : {631, 5, nsIDOMCanvasRenderingContext2D_ArcTo},
29144 : {637, 6, nsIDOMCanvasRenderingContext2D_Arc},
29145 : {641, 4, nsIDOMCanvasRenderingContext2D_Rect},
29146 : {646, 0, nsIDOMCanvasRenderingContext2D_Fill},
29147 : {651, 0, nsIDOMCanvasRenderingContext2D_Stroke},
29148 : {658, 0, nsIDOMCanvasRenderingContext2D_Clip},
29149 : {691, 4, nsIDOMCanvasRenderingContext2D_FillText},
29150 : {700, 4, nsIDOMCanvasRenderingContext2D_StrokeText},
29151 : {711, 1, nsIDOMCanvasRenderingContext2D_MeasureText},
29152 : {736, 9, nsIDOMCanvasRenderingContext2D_DrawImage},
29153 : {746, 2, nsIDOMCanvasRenderingContext2D_IsPointInPath},
29154 : {760, 0, nsIDOMCanvasRenderingContext2D_GetImageData},
29155 : {773, 0, nsIDOMCanvasRenderingContext2D_PutImageData},
29156 : {786, 0, nsIDOMCanvasRenderingContext2D_CreateImageData},
29157 : {827, 7, nsIDOMCanvasRenderingContext2D_DrawWindow},
29158 : {838, 7, nsIDOMCanvasRenderingContext2D_AsyncDrawXULElement},
29159 : // nsIDOMCanvasGradient (index 41)
29160 : {858, 2, nsIDOMCanvasGradient_AddColorStop},
29161 : // nsIDOMDocument (index 42)
29162 : {907, 1, nsIDOMDocument_GetElementsByTagName},
29163 : {936, 2, nsIDOMDocument_GetElementsByTagNameNS},
29164 : {959, 1, nsIDOMDocument_GetElementById},
29165 : {974, 0, nsIDOMDocument_CreateDocumentFragment},
29166 : {997, 1, nsIDOMDocument_CreateElement},
29167 : {1011, 2, nsIDOMDocument_CreateElementNS},
29168 : {1027, 2, nsIDOMDocument_ImportNode},
29169 : {1038, 1, nsIDOMDocument_CreateTextNode},
29170 : {1065, 1, nsIDOMDocument_AdoptNode},
29171 : {1087, 3, nsIDOMDocument_CreateNodeIterator},
29172 : {1106, 1, nsIDOMDocument_CreateEvent},
29173 : {1118, 1, nsIDOMDocument_GetElementsByClassName},
29174 : {1156, 0, nsIDOMDocument_HasFocus},
29175 : {1165, 2, nsIDOMDocument_ElementFromPoint},
29176 : // nsIDOMElement (index 56)
29177 : {1215, 2, nsIDOMElement_RemoveAttributeNS},
29178 : {1233, 1, nsIDOMElement_RemoveAttribute},
29179 : {1249, 1, nsIDOMElement_GetAttribute},
29180 : {907, 1, nsIDOMElement_GetElementsByTagName},
29181 : {1262, 2, nsIDOMElement_SetAttribute},
29182 : {936, 2, nsIDOMElement_GetElementsByTagNameNS},
29183 : {1275, 2, nsIDOMElement_HasAttributeNS},
29184 : {1298, 3, nsIDOMElement_SetAttributeNS},
29185 : {1313, 1, nsIDOMElement_HasAttribute},
29186 : {1326, 2, nsIDOMElement_GetAttributeNS},
29187 : // nsIDOMNamedNodeMap (index 66)
29188 : {162, 1, nsIDOMNamedNodeMap_Item},
29189 : // nsIDOMNode (index 67)
29190 : {1479, 2, nsIDOMNode_InsertBefore},
29191 : {1492, 2, nsIDOMNode_ReplaceChild},
29192 : {1505, 1, nsIDOMNode_RemoveChild},
29193 : {1517, 1, nsIDOMNode_AppendChild},
29194 : {1529, 0, nsIDOMNode_HasChildNodes},
29195 : {1543, 1, nsIDOMNode_CloneNode},
29196 : {1553, 0, nsIDOMNode_Normalize},
29197 : {1563, 2, nsIDOMNode_IsSupported},
29198 : {1605, 0, nsIDOMNode_HasAttributes},
29199 : {1627, 1, nsIDOMNode_CompareDocumentPosition},
29200 : {1663, 1, nsIDOMNode_LookupPrefix},
29201 : {1676, 1, nsIDOMNode_IsDefaultNamespace},
29202 : {1695, 1, nsIDOMNode_LookupNamespaceURI},
29203 : {1714, 1, nsIDOMNode_IsEqualNode},
29204 : {1726, 3, nsIDOMNode_SetUserData},
29205 : {1738, 1, nsIDOMNode_GetUserData},
29206 : {1750, 1, nsIDOMNode_Contains},
29207 : // nsIDOMNodeList (index 84)
29208 : {162, 1, nsIDOMNodeList_Item},
29209 : // nsIDOMNodeSelector (index 85)
29210 : {1759, 1, nsIDOMNodeSelector_QuerySelector},
29211 : {1773, 1, nsIDOMNodeSelector_QuerySelectorAll},
29212 : // nsIDOMText (index 87)
29213 : {1790, 1, nsIDOMText_SplitText},
29214 : // nsIDOMDOMImplementation (index 88)
29215 : {1800, 2, nsIDOMDOMImplementation_HasFeature},
29216 : {1811, 3, nsIDOMDOMImplementation_CreateDocumentType},
29217 : {1830, 3, nsIDOMDOMImplementation_CreateDocument},
29218 : {1845, 1, nsIDOMDOMImplementation_CreateHTMLDocument},
29219 : // nsIDOMDOMStringList (index 92)
29220 : {162, 1, nsIDOMDOMStringList_Item},
29221 : {1750, 1, nsIDOMDOMStringList_Contains},
29222 : // nsIDOMDOMTokenList (index 94)
29223 : {162, 1, nsIDOMDOMTokenList_Item},
29224 : {1750, 1, nsIDOMDOMTokenList_Contains},
29225 : {1864, 1, nsIDOMDOMTokenList_Add},
29226 : {1868, 1, nsIDOMDOMTokenList_Remove},
29227 : {1875, 1, nsIDOMDOMTokenList_Toggle},
29228 : {1882, 0, nsIDOMDOMTokenList_ToString},
29229 : // nsIDOMXULDocument (index 100)
29230 : {1897, 1, nsIDOMXULDocument_GetBoxObjectFor},
29231 : // nsIDOMNSElement (index 101)
29232 : {1118, 1, nsIDOMNSElement_GetElementsByClassName},
29233 : {1913, 0, nsIDOMNSElement_GetClientRects},
29234 : {1928, 0, nsIDOMNSElement_GetBoundingClientRect},
29235 : {2156, 1, nsIDOMNSElement_SetCapture},
29236 : {2167, 0, nsIDOMNSElement_ReleaseCapture},
29237 : {2182, 1, nsIDOMNSElement_MozMatchesSelector},
29238 : // nsIDOMCSSStyleDeclaration (index 107)
29239 : {5504, 1, nsIDOMCSSStyleDeclaration_GetPropertyValue},
29240 : {5521, 1, nsIDOMCSSStyleDeclaration_GetPropertyCSSValue},
29241 : {5541, 1, nsIDOMCSSStyleDeclaration_RemoveProperty},
29242 : {5556, 1, nsIDOMCSSStyleDeclaration_GetPropertyPriority},
29243 : {5576, 3, nsIDOMCSSStyleDeclaration_SetProperty},
29244 : {162, 1, nsIDOMCSSStyleDeclaration_Item},
29245 : // nsIDOMEventTarget (index 113)
29246 : {5599, 4, nsIDOMEventTarget_AddEventListener},
29247 : {5616, 3, nsIDOMEventTarget_RemoveEventListener},
29248 : {5636, 1, nsIDOMEventTarget_DispatchEvent},
29249 : // nsIDOMEvent (index 116)
29250 : {5716, 0, nsIDOMEvent_StopPropagation},
29251 : {5732, 0, nsIDOMEvent_PreventDefault},
29252 : {5747, 3, nsIDOMEvent_InitEvent},
29253 : {5774, 0, nsIDOMEvent_StopImmediatePropagation},
29254 : // nsIDOMMouseEvent (index 120)
29255 : {5884, 15, nsIDOMMouseEvent_InitMouseEvent},
29256 : {5926, 17, nsIDOMMouseEvent_InitNSMouseEvent},
29257 : // nsIDOMKeyEvent (index 122)
29258 : {5960, 10, nsIDOMKeyEvent_InitKeyEvent},
29259 : // nsIDOMMutationEvent (index 123)
29260 : {6024, 8, nsIDOMMutationEvent_InitMutationEvent},
29261 : // nsIDOMDragEvent (index 124)
29262 : {6055, 16, nsIDOMDragEvent_InitDragEvent},
29263 : // nsIDOMScrollAreaEvent (index 125)
29264 : {6073, 9, nsIDOMScrollAreaEvent_InitScrollAreaEvent},
29265 : // nsIDOMMessageEvent (index 126)
29266 : {6164, 7, nsIDOMMessageEvent_InitMessageEvent},
29267 : // nsIDOMMouseScrollEvent (index 127)
29268 : {6186, 16, nsIDOMMouseScrollEvent_InitMouseScrollEvent},
29269 : // nsIDOMNSEvent (index 128)
29270 : {6252, 0, nsIDOMNSEvent_GetPreventDefault},
29271 : // nsIDOMTouchList (index 129)
29272 : {162, 1, nsIDOMTouchList_Item},
29273 : {6366, 1, nsIDOMTouchList_IdentifiedTouch},
29274 : // nsIDOMTouchEvent (index 131)
29275 : {6419, 12, nsIDOMTouchEvent_InitTouchEvent},
29276 : // nsIDOMHTMLCollection (index 132)
29277 : {162, 1, nsIDOMHTMLCollection_Item},
29278 : // nsIDOMHTMLDocument (index 133)
29279 : {6524, 1, nsIDOMHTMLDocument_GetElementsByName},
29280 : {6580, 1, nsIDOMHTMLDocument_Write},
29281 : {6586, 1, nsIDOMHTMLDocument_Writeln},
29282 : {21, 0, nsIDOMHTMLDocument_GetSelection},
29283 : // nsIDOMHTMLElement (index 137)
29284 : {6654, 0, nsIDOMHTMLElement_Click},
29285 : {6669, 0, nsIDOMHTMLElement_Focus},
29286 : {6675, 0, nsIDOMHTMLElement_Blur},
29287 : {6792, 2, nsIDOMHTMLElement_InsertAdjacentHTML},
29288 : {6811, 1, nsIDOMHTMLElement_ScrollIntoView},
29289 : {6885, 0, nsIDOMHTMLElement_MozRequestFullScreen},
29290 : // nsIDOMHTMLFormElement (index 143)
29291 : {6915, 0, nsIDOMHTMLFormElement_Submit},
29292 : // nsIDOMHTMLInputElement (index 144)
29293 : {6982, 0, nsIDOMHTMLInputElement_Select},
29294 : {7053, 3, nsIDOMHTMLInputElement_SetSelectionRange},
29295 : // nsIDOMHTMLOptionsCollection (index 146)
29296 : {162, 1, nsIDOMHTMLOptionsCollection_Item},
29297 : {1864, 2, nsIDOMHTMLOptionsCollection_Add},
29298 : // nsIDOMHTMLSelectElement (index 148)
29299 : {1864, 2, nsIDOMHTMLSelectElement_Add},
29300 : {1868, 1, nsIDOMHTMLSelectElement_Remove},
29301 : {162, 1, nsIDOMHTMLSelectElement_Item},
29302 : // nsIDOMHTMLTableElement (index 151)
29303 : {7193, 1, nsIDOMHTMLTableElement_DeleteRow},
29304 : {7211, 1, nsIDOMHTMLTableElement_InsertRow},
29305 : // nsIDOMHTMLTableRowElement (index 153)
29306 : {7252, 1, nsIDOMHTMLTableRowElement_DeleteCell},
29307 : {7263, 1, nsIDOMHTMLTableRowElement_InsertCell},
29308 : // nsIDOMHTMLTableSectionElement (index 155)
29309 : {7211, 1, nsIDOMHTMLTableSectionElement_InsertRow},
29310 : {7193, 1, nsIDOMHTMLTableSectionElement_DeleteRow},
29311 : // nsIDOMHTMLTextAreaElement (index 157)
29312 : {6982, 0, nsIDOMHTMLTextAreaElement_Select},
29313 : {7053, 3, nsIDOMHTMLTextAreaElement_SetSelectionRange},
29314 : // nsIDOMHTMLCanvasElement (index 159)
29315 : {7292, 2, nsIDOMHTMLCanvasElement_GetContext},
29316 : {7303, 2, nsIDOMHTMLCanvasElement_ToDataURL},
29317 : // nsIDOMRange (index 161)
29318 : {7397, 2, nsIDOMRange_SetStart},
29319 : {7406, 2, nsIDOMRange_SetEnd},
29320 : {7413, 1, nsIDOMRange_SetStartBefore},
29321 : {7428, 1, nsIDOMRange_SetStartAfter},
29322 : {7442, 1, nsIDOMRange_SetEndBefore},
29323 : {7455, 1, nsIDOMRange_SetEndAfter},
29324 : {7467, 1, nsIDOMRange_Collapse},
29325 : {7476, 1, nsIDOMRange_SelectNode},
29326 : {7487, 1, nsIDOMRange_SelectNodeContents},
29327 : {7506, 2, nsIDOMRange_CompareBoundaryPoints},
29328 : {7528, 0, nsIDOMRange_DeleteContents},
29329 : {7543, 0, nsIDOMRange_ExtractContents},
29330 : {7559, 0, nsIDOMRange_CloneContents},
29331 : {7573, 1, nsIDOMRange_InsertNode},
29332 : {7584, 1, nsIDOMRange_SurroundContents},
29333 : {7601, 0, nsIDOMRange_CloneRange},
29334 : {1882, 0, nsIDOMRange_ToString},
29335 : {7612, 0, nsIDOMRange_Detach},
29336 : {7619, 1, nsIDOMRange_CreateContextualFragment},
29337 : {7644, 2, nsIDOMRange_IsPointInRange},
29338 : {7659, 2, nsIDOMRange_ComparePoint},
29339 : {1913, 0, nsIDOMRange_GetClientRects},
29340 : {1928, 0, nsIDOMRange_GetBoundingClientRect},
29341 : // nsIDOMToString (index 184)
29342 : {1882, 0, nsIDOMToString_ToString},
29343 : // nsIDOMStorage (index 185)
29344 : {7672, 2, nsIDOMStorage_SetItem},
29345 : {7680, 1, nsIDOMStorage_GetItem},
29346 : {7688, 1, nsIDOMStorage_Key},
29347 : {7692, 1, nsIDOMStorage_RemoveItem},
29348 : {2746, 0, nsIDOMStorage_Clear},
29349 : // nsIDOMSVGStylable (index 190)
29350 : {7703, 1, nsIDOMSVGStylable_GetPresentationAttribute},
29351 : // nsIDOMNodeIterator (index 191)
29352 : {7728, 0, nsIDOMNodeIterator_NextNode},
29353 : // nsIDOMXPathEvaluator (index 192)
29354 : {7737, 5, nsIDOMXPathEvaluator_Evaluate},
29355 : {7746, 2, nsIDOMXPathEvaluator_CreateExpression},
29356 : {7763, 1, nsIDOMXPathEvaluator_CreateNSResolver},
29357 : // nsIDOMXPathExpression (index 195)
29358 : {7737, 3, nsIDOMXPathExpression_Evaluate},
29359 : // nsIDOMXPathNSResolver (index 196)
29360 : {1695, 1, nsIDOMXPathNSResolver_LookupNamespaceURI},
29361 : // nsIDOMXPathResult (index 197)
29362 : {7780, 1, nsIDOMXPathResult_SnapshotItem},
29363 : {7793, 0, nsIDOMXPathResult_IterateNext},
29364 : // nsIDOMNSXPathExpression (index 199)
29365 : {7884, 5, nsIDOMNSXPathExpression_EvaluateWithContext},
29366 : // nsIDOMXULElement (index 200)
29367 : {6669, 0, nsIDOMXULElement_Focus},
29368 : {6675, 0, nsIDOMXULElement_Blur},
29369 : {6654, 0, nsIDOMXULElement_Click},
29370 : {8074, 0, nsIDOMXULElement_DoCommand},
29371 : {8084, 2, nsIDOMXULElement_GetElementsByAttribute},
29372 : {8107, 3, nsIDOMXULElement_GetElementsByAttributeNS},
29373 : // nsIDOMFileReader (index 206)
29374 : {8132, 1, nsIDOMFileReader_ReadAsArrayBuffer},
29375 : {8150, 1, nsIDOMFileReader_ReadAsBinaryString},
29376 : {8169, 2, nsIDOMFileReader_ReadAsText},
29377 : {8180, 1, nsIDOMFileReader_ReadAsDataURL},
29378 : {8194, 0, nsIDOMFileReader_Abort},
29379 : // nsIXMLHttpRequest (index 211)
29380 : {8194, 0, nsIXMLHttpRequest_Abort},
29381 : {8334, 5, nsIXMLHttpRequest_Open},
29382 : {8339, 1, nsIXMLHttpRequest_Send},
29383 : {8344, 1, nsIXMLHttpRequest_SendAsBinary},
29384 : // nsIWebSocket (index 215)
29385 : {8339, 1, nsIWebSocket_Send},
29386 : {8487, 2, nsIWebSocket_Close},
29387 : // nsIDOMWebGLRenderingContext (index 217)
29388 : {8493, 1, nsIDOMWebGLRenderingContext_ActiveTexture},
29389 : {8507, 2, nsIDOMWebGLRenderingContext_AttachShader},
29390 : {8520, 3, nsIDOMWebGLRenderingContext_BindAttribLocation},
29391 : {8539, 2, nsIDOMWebGLRenderingContext_BindBuffer},
29392 : {8550, 2, nsIDOMWebGLRenderingContext_BindFramebuffer},
29393 : {8566, 2, nsIDOMWebGLRenderingContext_BindRenderbuffer},
29394 : {8583, 2, nsIDOMWebGLRenderingContext_BindTexture},
29395 : {8595, 4, nsIDOMWebGLRenderingContext_BlendColor},
29396 : {8606, 1, nsIDOMWebGLRenderingContext_BlendEquation},
29397 : {8620, 2, nsIDOMWebGLRenderingContext_BlendEquationSeparate},
29398 : {8642, 2, nsIDOMWebGLRenderingContext_BlendFunc},
29399 : {8652, 4, nsIDOMWebGLRenderingContext_BlendFuncSeparate},
29400 : {8670, 1, nsIDOMWebGLRenderingContext_BufferData},
29401 : {8681, 1, nsIDOMWebGLRenderingContext_BufferSubData},
29402 : {8695, 1, nsIDOMWebGLRenderingContext_CheckFramebufferStatus},
29403 : {2746, 1, nsIDOMWebGLRenderingContext_Clear},
29404 : {8718, 4, nsIDOMWebGLRenderingContext_ClearColor},
29405 : {8729, 1, nsIDOMWebGLRenderingContext_ClearDepth},
29406 : {8740, 1, nsIDOMWebGLRenderingContext_ClearStencil},
29407 : {8753, 4, nsIDOMWebGLRenderingContext_ColorMask},
29408 : {8763, 1, nsIDOMWebGLRenderingContext_CompileShader},
29409 : {8777, 1, nsIDOMWebGLRenderingContext_CompressedTexImage2D},
29410 : {8798, 1, nsIDOMWebGLRenderingContext_CompressedTexSubImage2D},
29411 : {8822, 8, nsIDOMWebGLRenderingContext_CopyTexImage2D},
29412 : {8837, 8, nsIDOMWebGLRenderingContext_CopyTexSubImage2D},
29413 : {8855, 0, nsIDOMWebGLRenderingContext_CreateBuffer},
29414 : {8868, 0, nsIDOMWebGLRenderingContext_CreateProgram},
29415 : {8882, 0, nsIDOMWebGLRenderingContext_CreateFramebuffer},
29416 : {8900, 0, nsIDOMWebGLRenderingContext_CreateRenderbuffer},
29417 : {8919, 1, nsIDOMWebGLRenderingContext_CreateShader},
29418 : {8932, 0, nsIDOMWebGLRenderingContext_CreateTexture},
29419 : {8946, 1, nsIDOMWebGLRenderingContext_CullFace},
29420 : {8955, 1, nsIDOMWebGLRenderingContext_DeleteBuffer},
29421 : {8968, 1, nsIDOMWebGLRenderingContext_DeleteProgram},
29422 : {8982, 1, nsIDOMWebGLRenderingContext_DeleteFramebuffer},
29423 : {9000, 1, nsIDOMWebGLRenderingContext_DeleteRenderbuffer},
29424 : {9019, 1, nsIDOMWebGLRenderingContext_DeleteShader},
29425 : {9032, 1, nsIDOMWebGLRenderingContext_DeleteTexture},
29426 : {9046, 1, nsIDOMWebGLRenderingContext_DepthFunc},
29427 : {9056, 1, nsIDOMWebGLRenderingContext_DepthMask},
29428 : {9066, 2, nsIDOMWebGLRenderingContext_DepthRange},
29429 : {9077, 2, nsIDOMWebGLRenderingContext_DetachShader},
29430 : {9090, 1, nsIDOMWebGLRenderingContext_Disable},
29431 : {9098, 1, nsIDOMWebGLRenderingContext_DisableVertexAttribArray},
29432 : {9123, 3, nsIDOMWebGLRenderingContext_DrawArrays},
29433 : {9134, 4, nsIDOMWebGLRenderingContext_DrawElements},
29434 : {9147, 1, nsIDOMWebGLRenderingContext_Enable},
29435 : {9154, 1, nsIDOMWebGLRenderingContext_EnableVertexAttribArray},
29436 : {9178, 0, nsIDOMWebGLRenderingContext_Finish},
29437 : {9185, 0, nsIDOMWebGLRenderingContext_Flush},
29438 : {9191, 4, nsIDOMWebGLRenderingContext_FramebufferRenderbuffer},
29439 : {9215, 5, nsIDOMWebGLRenderingContext_FramebufferTexture2D},
29440 : {9236, 1, nsIDOMWebGLRenderingContext_FrontFace},
29441 : {9246, 1, nsIDOMWebGLRenderingContext_GenerateMipmap},
29442 : {9261, 2, nsIDOMWebGLRenderingContext_GetActiveAttrib},
29443 : {9277, 2, nsIDOMWebGLRenderingContext_GetActiveUniform},
29444 : {9294, 1, nsIDOMWebGLRenderingContext_GetAttachedShaders},
29445 : {9313, 2, nsIDOMWebGLRenderingContext_GetAttribLocation},
29446 : {9331, 1, nsIDOMWebGLRenderingContext_GetParameter},
29447 : {9344, 2, nsIDOMWebGLRenderingContext_GetBufferParameter},
29448 : {9363, 0, nsIDOMWebGLRenderingContext_GetError},
29449 : {9372, 3, nsIDOMWebGLRenderingContext_GetFramebufferAttachmentParameter},
29450 : {9406, 2, nsIDOMWebGLRenderingContext_GetProgramParameter},
29451 : {9426, 1, nsIDOMWebGLRenderingContext_GetProgramInfoLog},
29452 : {9444, 2, nsIDOMWebGLRenderingContext_GetRenderbufferParameter},
29453 : {9469, 2, nsIDOMWebGLRenderingContext_GetShaderParameter},
29454 : {9488, 1, nsIDOMWebGLRenderingContext_GetShaderInfoLog},
29455 : {9505, 2, nsIDOMWebGLRenderingContext_GetShaderPrecisionFormat},
29456 : {9530, 1, nsIDOMWebGLRenderingContext_GetShaderSource},
29457 : {9546, 2, nsIDOMWebGLRenderingContext_GetTexParameter},
29458 : {9562, 2, nsIDOMWebGLRenderingContext_GetUniform},
29459 : {9573, 2, nsIDOMWebGLRenderingContext_GetUniformLocation},
29460 : {9592, 2, nsIDOMWebGLRenderingContext_GetVertexAttrib},
29461 : {9608, 2, nsIDOMWebGLRenderingContext_GetVertexAttribOffset},
29462 : {9630, 2, nsIDOMWebGLRenderingContext_Hint},
29463 : {9635, 1, nsIDOMWebGLRenderingContext_IsBuffer},
29464 : {9644, 1, nsIDOMWebGLRenderingContext_IsFramebuffer},
29465 : {9658, 1, nsIDOMWebGLRenderingContext_IsProgram},
29466 : {9668, 1, nsIDOMWebGLRenderingContext_IsRenderbuffer},
29467 : {9683, 1, nsIDOMWebGLRenderingContext_IsShader},
29468 : {9692, 1, nsIDOMWebGLRenderingContext_IsTexture},
29469 : {9702, 1, nsIDOMWebGLRenderingContext_IsEnabled},
29470 : {425, 1, nsIDOMWebGLRenderingContext_LineWidth},
29471 : {9712, 1, nsIDOMWebGLRenderingContext_LinkProgram},
29472 : {9724, 2, nsIDOMWebGLRenderingContext_PixelStorei},
29473 : {9736, 2, nsIDOMWebGLRenderingContext_PolygonOffset},
29474 : {9750, 1, nsIDOMWebGLRenderingContext_ReadPixels},
29475 : {9761, 4, nsIDOMWebGLRenderingContext_RenderbufferStorage},
29476 : {9781, 2, nsIDOMWebGLRenderingContext_SampleCoverage},
29477 : {9796, 4, nsIDOMWebGLRenderingContext_Scissor},
29478 : {9804, 2, nsIDOMWebGLRenderingContext_ShaderSource},
29479 : {9817, 3, nsIDOMWebGLRenderingContext_StencilFunc},
29480 : {9829, 4, nsIDOMWebGLRenderingContext_StencilFuncSeparate},
29481 : {9849, 1, nsIDOMWebGLRenderingContext_StencilMask},
29482 : {9861, 2, nsIDOMWebGLRenderingContext_StencilMaskSeparate},
29483 : {9881, 3, nsIDOMWebGLRenderingContext_StencilOp},
29484 : {9891, 4, nsIDOMWebGLRenderingContext_StencilOpSeparate},
29485 : {9909, 1, nsIDOMWebGLRenderingContext_TexImage2D},
29486 : {9920, 1, nsIDOMWebGLRenderingContext_TexSubImage2D},
29487 : {9934, 3, nsIDOMWebGLRenderingContext_TexParameterf},
29488 : {9948, 3, nsIDOMWebGLRenderingContext_TexParameteri},
29489 : {9962, 2, nsIDOMWebGLRenderingContext_Uniform1f},
29490 : {9972, 2, nsIDOMWebGLRenderingContext_Uniform1i},
29491 : {9982, 3, nsIDOMWebGLRenderingContext_Uniform2f},
29492 : {9992, 3, nsIDOMWebGLRenderingContext_Uniform2i},
29493 : {10002, 4, nsIDOMWebGLRenderingContext_Uniform3f},
29494 : {10012, 4, nsIDOMWebGLRenderingContext_Uniform3i},
29495 : {10022, 5, nsIDOMWebGLRenderingContext_Uniform4f},
29496 : {10032, 5, nsIDOMWebGLRenderingContext_Uniform4i},
29497 : {10042, 1, nsIDOMWebGLRenderingContext_Uniform1fv},
29498 : {10053, 1, nsIDOMWebGLRenderingContext_Uniform1iv},
29499 : {10064, 1, nsIDOMWebGLRenderingContext_Uniform2fv},
29500 : {10075, 1, nsIDOMWebGLRenderingContext_Uniform2iv},
29501 : {10086, 1, nsIDOMWebGLRenderingContext_Uniform3fv},
29502 : {10097, 1, nsIDOMWebGLRenderingContext_Uniform3iv},
29503 : {10108, 1, nsIDOMWebGLRenderingContext_Uniform4fv},
29504 : {10119, 1, nsIDOMWebGLRenderingContext_Uniform4iv},
29505 : {10130, 1, nsIDOMWebGLRenderingContext_UniformMatrix2fv},
29506 : {10147, 1, nsIDOMWebGLRenderingContext_UniformMatrix3fv},
29507 : {10164, 1, nsIDOMWebGLRenderingContext_UniformMatrix4fv},
29508 : {10181, 1, nsIDOMWebGLRenderingContext_UseProgram},
29509 : {10192, 1, nsIDOMWebGLRenderingContext_ValidateProgram},
29510 : {10208, 2, nsIDOMWebGLRenderingContext_VertexAttrib1f},
29511 : {10223, 3, nsIDOMWebGLRenderingContext_VertexAttrib2f},
29512 : {10238, 4, nsIDOMWebGLRenderingContext_VertexAttrib3f},
29513 : {10253, 5, nsIDOMWebGLRenderingContext_VertexAttrib4f},
29514 : {10268, 1, nsIDOMWebGLRenderingContext_VertexAttrib1fv},
29515 : {10284, 1, nsIDOMWebGLRenderingContext_VertexAttrib2fv},
29516 : {10300, 1, nsIDOMWebGLRenderingContext_VertexAttrib3fv},
29517 : {10316, 1, nsIDOMWebGLRenderingContext_VertexAttrib4fv},
29518 : {10332, 6, nsIDOMWebGLRenderingContext_VertexAttribPointer},
29519 : {10352, 4, nsIDOMWebGLRenderingContext_Viewport},
29520 : {10361, 1, nsIDOMWebGLRenderingContext_GetExtension},
29521 : {10374, 0, nsIDOMWebGLRenderingContext_GetSupportedExtensions},
29522 : {10397, 0, nsIDOMWebGLRenderingContext_IsContextLost},
29523 : // nsIDOMHTMLAudioElement (index 352)
29524 : {10467, 1, nsIDOMHTMLAudioElement_MozWriteAudio},
29525 : // nsIIDBCursor (index 353)
29526 : {10492, 1, nsIIDBCursor_Continue},
29527 : {10501, 1, nsIIDBCursor_Update},
29528 : {10508, 0, nsIIDBCursor_Delete},
29529 : {10515, 1, nsIIDBCursor_Advance},
29530 : // nsIIDBDatabase (index 357)
29531 : {10548, 2, nsIIDBDatabase_CreateObjectStore},
29532 : {10566, 1, nsIIDBDatabase_DeleteObjectStore},
29533 : {10584, 2, nsIIDBDatabase_Transaction},
29534 : {8487, 0, nsIIDBDatabase_Close},
29535 : // nsIIDBIndex (index 361)
29536 : {10665, 1, nsIIDBIndex_Get},
29537 : {10669, 1, nsIIDBIndex_GetKey},
29538 : {10676, 2, nsIIDBIndex_GetAll},
29539 : {10683, 2, nsIIDBIndex_GetAllKeys},
29540 : {10694, 2, nsIIDBIndex_OpenCursor},
29541 : {10705, 2, nsIIDBIndex_OpenKeyCursor},
29542 : {10719, 1, nsIIDBIndex_Count},
29543 : // nsIIDBObjectStore (index 368)
29544 : {10665, 1, nsIIDBObjectStore_Get},
29545 : {10676, 2, nsIIDBObjectStore_GetAll},
29546 : {1864, 2, nsIIDBObjectStore_Add},
29547 : {10782, 2, nsIIDBObjectStore_Put},
29548 : {10508, 1, nsIIDBObjectStore_Delete},
29549 : {2746, 0, nsIIDBObjectStore_Clear},
29550 : {10694, 2, nsIIDBObjectStore_OpenCursor},
29551 : {10786, 3, nsIIDBObjectStore_CreateIndex},
29552 : {7079, 1, nsIIDBObjectStore_Index},
29553 : {10798, 1, nsIIDBObjectStore_DeleteIndex},
29554 : {10719, 1, nsIIDBObjectStore_Count},
29555 : // nsIIDBTransaction (index 379)
29556 : {10653, 1, nsIIDBTransaction_ObjectStore},
29557 : {8194, 0, nsIIDBTransaction_Abort},
29558 : // nsIIDBFactory (index 381)
29559 : {8334, 2, nsIIDBFactory_Open},
29560 : {10849, 1, nsIIDBFactory_DeleteDatabase},
29561 : {10864, 2, nsIIDBFactory_Cmp},
29562 : // nsIIndexedDatabaseUsageCallback (index 384)
29563 : {10916, 3, nsIIndexedDatabaseUsageCallback_OnUsageResult},
29564 : // nsIIndexedDatabaseManager (index 385)
29565 : {10930, 2, nsIIndexedDatabaseManager_GetUsageForURI},
29566 : {10945, 2, nsIIndexedDatabaseManager_CancelGetUsageForURI},
29567 : {10966, 1, nsIIndexedDatabaseManager_ClearDatabasesForURI},
29568 : {10987, 1, nsIIndexedDatabaseManager_InitWindowless},
29569 : };
29570 :
29571 : static const xpc_qsHashEntry tableData[] = {
29572 : /* nsIIDBRequest */ {{0xfe30ca60, 0xbb90, 0x4d68, {0xaf, 0x2f, 0x47, 0x35, 0xf9, 0x22, 0x8a, 0x54}}, 680, 7, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29573 : /* nsIDOMHTMLInputElement */ {{0x7330cd35, 0xc930, 0x4f45, {0xae, 0x61, 0xf5, 0x38, 0x0c, 0x30, 0x22, 0x2d}}, 490, 13, 144, 2, 123, 180},
29574 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29575 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29576 : /* nsIDOMHTMLStyleElement */ {{0x247fc8c4, 0x92f3, 0x427b, {0xaf, 0x6f, 0x41, 0xb1, 0x3f, 0x28, 0x28, 0x7d}}, 530, 1, 0, 0, 123, XPC_QS_NULL_INDEX},
29577 : /* nsIDOMEventTarget */ {{0x8e375931, 0x298d, 0x4d0a, {0x9c, 0xb4, 0x56, 0x68, 0xf0, 0xcd, 0xc5, 0xa8}}, 0, 0, 113, 3, XPC_QS_NULL_INDEX, 181},
29578 : /* nsIDOMHTMLFrameElement */ {{0x318fdc4a, 0x3fca, 0x4099, {0x94, 0xaa, 0xc9, 0xa1, 0xc3, 0x0c, 0xa2, 0xb9}}, 476, 4, 0, 0, 123, 182},
29579 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29580 : /* nsIDOMHTMLButtonElement */ {{0x79f034f0, 0x5c13, 0x4101, {0x95, 0x98, 0x41, 0x2e, 0x1e, 0xac, 0x19, 0x86}}, 427, 4, 0, 0, 123, XPC_QS_NULL_INDEX},
29581 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29582 : /* nsIDOMNodeList */ {{0x496852ba, 0xe48d, 0x4fa5, {0x98, 0x2e, 0xe0, 0xdc, 0x1b, 0x47, 0x5b, 0xf1}}, 80, 1, 84, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29583 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29584 : /* nsIDOMHTMLBaseElement */ {{0xe55cd224, 0xb603, 0x4976, {0x89, 0x2a, 0x20, 0xb1, 0x1d, 0x46, 0x93, 0x94}}, 425, 2, 0, 0, 123, 183},
29585 : /* nsIDOMDragEvent */ {{0x74fb5f01, 0xe473, 0x4302, {0x93, 0xf5, 0x6f, 0x74, 0xbd, 0xaa, 0xdd, 0xf2}}, 375, 1, 124, 1, 153, XPC_QS_NULL_INDEX},
29586 : /* nsIDOMDOMSettableTokenList */ {{0xcdac274e, 0x6619, 0x4b5f, {0xba, 0x1a, 0xcd, 0x1d, 0xbf, 0xae, 0x44, 0xb8}}, 83, 1, 0, 0, 100, XPC_QS_NULL_INDEX},
29587 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29588 : /* nsIDOMNodeIterator */ {{0x5af83f50, 0xc8d5, 0x4824, {0xbe, 0x29, 0x1a, 0xa9, 0xd6, 0x40, 0xba, 0xcb}}, 0, 0, 191, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29589 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29590 : /* nsIDOMXPathExpression */ {{0x75506f82, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 0, 0, 195, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29591 : /* nsIDOMElement */ {{0x1f249e8b, 0x7b41, 0x44c0, {0xa8, 0xd5, 0x15, 0x29, 0x8c, 0x11, 0x98, 0xcd}}, 59, 3, 56, 10, 161, 184},
29592 : /* nsIDOMDOMImplementation */ {{0x03a6f574, 0x99ec, 0x42f8, {0x9e, 0x6c, 0x81, 0x2a, 0x4a, 0x9b, 0xcb, 0xf7}}, 0, 0, 88, 4, XPC_QS_NULL_INDEX, 185},
29593 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29594 : /* nsIIDBCursorWithValue */ {{0xb6b7e08a, 0x4379, 0x4441, {0xa1, 0x76, 0x44, 0x7c, 0x5c, 0x96, 0xdf, 0x69}}, 657, 1, 0, 0, 170, XPC_QS_NULL_INDEX},
29595 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29596 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29597 : /* nsIDOMCharacterData */ {{0xcb75c251, 0xafc7, 0x444f, {0xb2, 0xd6, 0xb9, 0x63, 0x55, 0x55, 0xf3, 0xed}}, 46, 2, 0, 0, 161, XPC_QS_NULL_INDEX},
29598 : /* nsIDOMProgressEvent */ {{0x2377d8a6, 0x9e27, 0x4eb2, {0xa3, 0x77, 0x99, 0x10, 0x77, 0x2b, 0x33, 0xd3}}, 388, 3, 0, 0, 140, 188},
29599 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29600 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29601 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29602 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29603 : /* nsIDOMHTMLCollection */ {{0xb7ccd7b3, 0x86aa, 0x4322, {0xa5, 0x0c, 0xb9, 0x72, 0x64, 0x3b, 0xb6, 0x62}}, 431, 1, 132, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29604 : /* nsIDOMNSXPathExpression */ {{0xce600ca8, 0xe98a, 0x4419, {0xad, 0x61, 0x2f, 0x6d, 0x0c, 0xb0, 0xec, 0xc8}}, 0, 0, 199, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29605 : /* nsIDOMElementCSSInlineStyle */ {{0x99715845, 0x95fc, 0x4a56, {0xaa, 0x53, 0x21, 0x4b, 0x65, 0xc2, 0x6e, 0x22}}, 99, 1, 0, 0, XPC_QS_NULL_INDEX, 189},
29606 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29607 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29608 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29609 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29610 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29611 : /* nsIDOMWindow */ {{0x17400e2b, 0xf78b, 0x4e69, {0xb5, 0x00, 0xc2, 0xa3, 0x13, 0x5a, 0x40, 0xfd}}, 0, 8, 0, 3, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29612 : /* nsIDOMRange */ {{0xa059eea8, 0xfece, 0x4c14, {0x93, 0xd3, 0x7f, 0x50, 0xa9, 0x44, 0xae, 0x43}}, 562, 6, 161, 23, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29613 : /* nsIDOMMouseScrollEvent */ {{0x159f24b9, 0x2058, 0x40b9, {0xb5, 0xbc, 0x64, 0x77, 0xd1, 0x92, 0x95, 0x5a}}, 387, 1, 127, 1, 153, XPC_QS_NULL_INDEX},
29614 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29615 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29616 : /* nsIDOMText */ {{0x437ed60c, 0xfebd, 0x4bd0, {0x89, 0x2f, 0xcf, 0x35, 0x8a, 0xdc, 0x3c, 0x96}}, 0, 0, 87, 1, 25, 190},
29617 : /* nsIDOMNotifyPaintEvent */ {{0x5e9e91ad, 0x8638, 0x4e1c, {0xbd, 0xed, 0x35, 0xb5, 0x1b, 0x6d, 0xf2, 0x79}}, 380, 3, 0, 0, 140, XPC_QS_NULL_INDEX},
29618 : /* nsIDOMRect */ {{0x71735f62, 0xac5c, 0x4236, {0x9a, 0x1f, 0x5f, 0xfb, 0x28, 0x0d, 0x53, 0x1c}}, 337, 4, 0, 0, XPC_QS_NULL_INDEX, 191},
29619 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29620 : /* nsIIDBKeyRange */ {{0x8aeb8660, 0x76b3, 0x4651, {0xb8, 0xc2, 0x98, 0x94, 0xae, 0x6d, 0xfe, 0x68}}, 671, 4, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29621 : /* nsIWebSocket */ {{0xf463b9b5, 0x1408, 0x4057, {0x92, 0x24, 0xe4, 0xf5, 0xbc, 0x33, 0xf1, 0x7b}}, 638, 10, 215, 2, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29622 : /* nsIDOMJSWindow */ {{0x6652c4d2, 0x6b49, 0x424b, {0xaa, 0xf9, 0x91, 0xf9, 0x10, 0x06, 0xfa, 0xb7}}, 0, 0, 3, 1, XPC_QS_NULL_INDEX, 192},
29623 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29624 : /* nsIDOMCanvasRenderingContext2D */ {{0x274213a8, 0xdf51, 0x4b52, {0xbf, 0xad, 0xd3, 0x06, 0xa1, 0xd5, 0xf6, 0x42}}, 22, 23, 6, 35, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29625 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29626 : /* nsIDOMXULElement */ {{0xa98a4472, 0xa549, 0x4b84, {0xb9, 0xea, 0xe6, 0xeb, 0x67, 0x92, 0x28, 0xdd}}, 578, 34, 200, 6, 19, XPC_QS_NULL_INDEX},
29627 : /* nsIDOMNamedNodeMap */ {{0xa6cf907b, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}, 62, 1, 66, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29628 : /* nsIDOMTextMetrics */ {{0x2d01715c, 0xec7d, 0x424a, {0xab, 0x85, 0xe0, 0xfd, 0x70, 0xc8, 0x66, 0x5c}}, 45, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29629 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29630 : /* nsIIDBDatabase */ {{0xbedee48a, 0xf47f, 0x44f2, {0xba, 0x1e, 0xd8, 0xfe, 0x59, 0x5b, 0xbf, 0xee}}, 658, 6, 357, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29631 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29632 : /* nsIIDBObjectStore */ {{0x43157a3c, 0xbed1, 0x4ce7, {0x98, 0xc0, 0x11, 0x36, 0x5b, 0x85, 0x25, 0x60}}, 675, 5, 368, 11, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29633 : /* nsIDOMFileReader */ {{0xfaed1779, 0xb523, 0x4060, {0x8c, 0x3b, 0x71, 0x99, 0xf3, 0x47, 0xb2, 0x73}}, 618, 9, 206, 5, 5, XPC_QS_NULL_INDEX},
29634 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29635 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29636 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29637 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29638 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29639 : /* nsIDOMScreen */ {{0x4507e43f, 0x097c, 0x452a, {0xbf, 0xc4, 0xdb, 0xb9, 0x97, 0x48, 0xf6, 0xfd}}, 8, 4, 0, 0, XPC_QS_NULL_INDEX, 193},
29640 : /* nsIDOMHTMLTableCellElement */ {{0x4caa7af0, 0xfec4, 0x44c1, {0x9a, 0x81, 0xe1, 0xf1, 0x41, 0x66, 0xe6, 0x0c}}, 531, 8, 0, 0, 123, XPC_QS_NULL_INDEX},
29641 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29642 : /* nsIDOMMutationEvent */ {{0x72b3ddba, 0x6cbb, 0x4011, {0xac, 0x3b, 0x50, 0xbd, 0x90, 0x0b, 0x22, 0x3d}}, 370, 5, 123, 1, 140, XPC_QS_NULL_INDEX},
29643 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29644 : /* nsIDOMMessageEvent */ {{0x3aca4a44, 0x8e5f, 0x4829, {0x9d, 0x59, 0xce, 0x4a, 0xdb, 0xba, 0x2b, 0x12}}, 383, 4, 126, 1, 140, XPC_QS_NULL_INDEX},
29645 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29646 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29647 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29648 : /* nsIDOMStorageItem */ {{0x0cc37c78, 0x4c5f, 0x48e1, {0xad, 0xfc, 0x74, 0x80, 0xb8, 0xfe, 0x9d, 0xc4}}, 569, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29649 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29650 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29651 : /* nsIDOMPaintRequest */ {{0x4802360b, 0xf1c0, 0x4d84, {0xbb, 0x9e, 0x9d, 0x2c, 0xcb, 0x9d, 0xe4, 0x61}}, 19, 2, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29652 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29653 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29654 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29655 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29656 : /* nsIDOMDOMStringList */ {{0x0bbae65c, 0x1dde, 0x11d9, {0x8c, 0x46, 0x00, 0x0a, 0x95, 0xdc, 0x23, 0x4c}}, 81, 1, 92, 2, XPC_QS_NULL_INDEX, 194},
29657 : /* nsIDOMHTMLCanvasElement */ {{0xdbbeeba1, 0x3c20, 0x4d9d, {0xac, 0x82, 0x98, 0xb6, 0x9f, 0xd8, 0x19, 0xa9}}, 560, 2, 159, 2, 123, XPC_QS_NULL_INDEX},
29658 : /* nsIDOMPaintRequestList */ {{0x01627136, 0xfdd8, 0x44b4, {0xaa, 0xc0, 0x7d, 0x61, 0x36, 0x08, 0xa3, 0xd4}}, 21, 1, 5, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29659 : /* nsIDOMHTMLOptionsCollection */ {{0x429b041b, 0x06df, 0x486c, {0x9a, 0x3a, 0xa1, 0xd9, 0x01, 0xcc, 0x76, 0xa2}}, 515, 2, 146, 2, XPC_QS_NULL_INDEX, 195},
29660 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29661 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29662 : /* nsIIDBIndex */ {{0xa859747a, 0x0f05, 0x4dfb, {0x8f, 0x42, 0x05, 0xc6, 0x14, 0x15, 0xd4, 0xe4}}, 665, 6, 361, 7, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29663 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29664 : /* nsIDOMHTMLLinkElement */ {{0x2ece79f4, 0x83d7, 0x499c, {0x94, 0x6f, 0xae, 0x9a, 0xb9, 0x31, 0x47, 0xb7}}, 503, 1, 0, 0, 123, XPC_QS_NULL_INDEX},
29665 : /* nsIDOMClientRectList */ {{0x917da19d, 0x62f5, 0x441d, {0xb4, 0x7e, 0x9e, 0x35, 0xf0, 0x56, 0x39, 0xc9}}, 18, 1, 4, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29666 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29667 : /* nsIDOMNodeSelector */ {{0x7cebc153, 0x168a, 0x416c, {0xba, 0x5a, 0x56, 0xa8, 0xc2, 0xdd, 0xb2, 0xec}}, 0, 0, 85, 2, XPC_QS_NULL_INDEX, 196},
29668 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29669 : /* nsIIDBVersionChangeEvent */ {{0x52e21085, 0xd6cd, 0x4886, {0xa5, 0xeb, 0x19, 0xb4, 0x7d, 0x13, 0xab, 0xf6}}, 695, 2, 0, 0, 140, XPC_QS_NULL_INDEX},
29670 : /* nsIIDBDatabaseException */ {{0x7aad2542, 0xa5cb, 0x4a57, {0xb2, 0x0c, 0xc7, 0xd1, 0x6b, 0x85, 0x82, 0xab}}, 664, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29671 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29672 : /* nsIDOMDOMTokenList */ {{0xc6f1e160, 0xeeeb, 0x404a, {0x98, 0xb0, 0x6f, 0x12, 0x46, 0x52, 0x0b, 0x6e}}, 82, 1, 94, 6, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29673 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29674 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29675 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29676 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29677 : /* nsIDOMTouch */ {{0x98bc0f7d, 0x5bff, 0x4387, {0x9c, 0x42, 0x58, 0xaf, 0x54, 0xb4, 0x8d, 0xd5}}, 398, 12, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29678 : /* nsIDOMHTMLTableSectionElement */ {{0x6acc106e, 0x96a2, 0x4519, {0x8f, 0x3a, 0x14, 0x2e, 0xbb, 0xdc, 0x1b, 0xb1}}, 546, 1, 155, 2, 123, XPC_QS_NULL_INDEX},
29679 : /* nsIDOMHTMLProgressElement */ {{0x9b1d2263, 0xb60f, 0x4d18, {0xb4, 0xd1, 0x66, 0xe8, 0xc3, 0x86, 0x7c, 0x79}}, 517, 4, 0, 0, 123, XPC_QS_NULL_INDEX},
29680 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29681 : /* nsIDOMNSEvent */ {{0x07f905c1, 0x9170, 0x4103, {0x86, 0xca, 0x76, 0x63, 0x74, 0xda, 0x14, 0x9a}}, 391, 1, 128, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29682 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29683 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29684 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29685 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29686 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29687 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29688 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29689 : /* nsIDOMSVGStylable */ {{0xea8a6cb1, 0x9176, 0x45db, {0x98, 0x9d, 0xd0, 0xe8, 0x9f, 0x56, 0x3d, 0x7e}}, 570, 2, 190, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29690 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29691 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29692 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29693 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29694 : /* nsIDOMCSSStyleDeclaration */ {{0xa6cf90be, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}, 341, 3, 107, 6, XPC_QS_NULL_INDEX, 197},
29695 : /* nsIDOMHTMLElement */ {{0x4eccf8a3, 0x8bf5, 0x43f3, {0xa7, 0x28, 0xf5, 0xb6, 0x32, 0xf7, 0xdb, 0x3a}}, 449, 22, 137, 6, 19, XPC_QS_NULL_INDEX},
29696 : /* nsIDOMHTMLSelectElement */ {{0x98f111e0, 0x2b7e, 0x4abd, {0x98, 0x4b, 0x2c, 0xc1, 0xd1, 0x74, 0xfe, 0x44}}, 521, 9, 148, 3, 123, XPC_QS_NULL_INDEX},
29697 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29698 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29699 : /* nsIDOMDOMError */ {{0xe4e28307, 0xd409, 0x4cf7, {0x93, 0xcd, 0x6e, 0xa8, 0xe8, 0x89, 0xf8, 0x7a}}, 697, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29700 : /* nsIDOMHTMLIFrameElement */ {{0x5ef30718, 0xfe45, 0x43a2, {0xa4, 0x78, 0xa9, 0xe3, 0xcb, 0xf3, 0xa1, 0x18}}, 482, 3, 0, 0, 123, 198},
29701 : /* nsIDOMHTMLTextAreaElement */ {{0x16db703d, 0x4816, 0x440c, {0xbc, 0xb3, 0xc1, 0xae, 0x0c, 0xae, 0x65, 0x32}}, 547, 12, 157, 2, 123, XPC_QS_NULL_INDEX},
29702 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29703 : /* nsIIDBFactory */ {{0x885abbb7, 0xcf81, 0x4945, {0xb5, 0xf1, 0x07, 0xfe, 0xd0, 0x7a, 0xda, 0x82}}, 0, 0, 381, 3, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29704 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29705 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29706 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29707 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29708 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29709 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29710 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29711 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29712 : /* nsIDOMEvent */ {{0xe85cff74, 0x951f, 0x45c1, {0xbe, 0x0c, 0x89, 0x44, 0x2e, 0xa2, 0xf5, 0x00}}, 344, 8, 116, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29713 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29714 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29715 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29716 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29717 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29718 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29719 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29720 : /* nsIDOMClientRect */ {{0xb2f824c4, 0xd9d3, 0x499b, {0x8d, 0x3b, 0x45, 0xc8, 0x24, 0x54, 0x97, 0xc6}}, 12, 6, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29721 : /* nsIDOMCanvasGradient */ {{0xbbb20a59, 0x524e, 0x4662, {0x98, 0x1e, 0x5e, 0x14, 0x28, 0x14, 0xb2, 0x0c}}, 0, 0, 41, 1, XPC_QS_NULL_INDEX, 199},
29722 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29723 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29724 : /* nsIIndexedDatabaseUsageCallback */ {{0xef1795ec, 0x7050, 0x4658, {0xb8, 0x0f, 0x0e, 0x48, 0xcb, 0xe1, 0xd6, 0x4b}}, 0, 0, 384, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29725 : /* nsIDOMMouseEvent */ {{0x7f57aa45, 0x6792, 0x4d8b, {0xba, 0x5b, 0x20, 0x15, 0x33, 0xcf, 0x0b, 0x2f}}, 352, 12, 120, 2, 166, XPC_QS_NULL_INDEX},
29726 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29727 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29728 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29729 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29730 : /* nsIDOMHTMLTableColElement */ {{0x9a4d1f6a, 0xfb19, 0x4886, {0xb0, 0xd8, 0xdc, 0xd2, 0x01, 0x56, 0x65, 0x80}}, 539, 2, 0, 0, 123, XPC_QS_NULL_INDEX},
29731 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29732 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29733 : /* nsIDOMNode */ {{0x5e9bcec9, 0x5928, 0x4f77, {0x8a, 0x9c, 0x42, 0x4e, 0xf0, 0x1c, 0x20, 0xe1}}, 63, 17, 67, 17, XPC_QS_NULL_INDEX, 200},
29734 : /* nsIDOMHTMLAudioElement */ {{0x0969143a, 0xfe20, 0x4924, {0xa9, 0x50, 0x55, 0xde, 0xb4, 0xd0, 0xd1, 0xab}}, 0, 0, 352, 1, 123, XPC_QS_NULL_INDEX},
29735 : /* nsIDOMTouchEvent */ {{0x0cc687df, 0x0ed5, 0x4b7f, {0xb8, 0x9d, 0xcb, 0xb9, 0x9b, 0x21, 0xd2, 0x3a}}, 411, 7, 131, 1, 166, XPC_QS_NULL_INDEX},
29736 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29737 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29738 : /* nsIDOMUIEvent */ {{0xaf3f130e, 0x0c22, 0x4613, {0xa1, 0x50, 0x78, 0x0a, 0x46, 0xc2, 0x2e, 0x3a}}, 392, 6, 0, 0, 140, XPC_QS_NULL_INDEX},
29739 : /* nsIDOMKeyEvent */ {{0xdef974c3, 0xb491, 0x481b, {0xbc, 0x67, 0x29, 0x17, 0x4a, 0xf4, 0xb2, 0x6a}}, 364, 6, 122, 1, 166, XPC_QS_NULL_INDEX},
29740 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29741 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29742 : /* nsIIDBCursor */ {{0x01136b3a, 0xd84c, 0x487c, {0xb9, 0x29, 0xf5, 0xd0, 0x12, 0x34, 0x6c, 0x44}}, 653, 4, 353, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29743 : /* nsIDOMTouchList */ {{0x60706eb7, 0xd50d, 0x4379, {0xb0, 0x1c, 0xe7, 0x8e, 0x6a, 0xf8, 0x42, 0x13}}, 410, 1, 129, 2, XPC_QS_NULL_INDEX, 201},
29744 : /* nsIDOMNSElement */ {{0xd894b5d4, 0x44f3, 0x422a, {0xa2, 0x20, 0x77, 0x63, 0xc1, 0x2d, 0x4a, 0x94}}, 84, 15, 101, 6, XPC_QS_NULL_INDEX, 202},
29745 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29746 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29747 : /* nsIDOMCSS2Properties */ {{0xfc30df1b, 0x9b5a, 0x42f6, {0x96, 0x5b, 0xcb, 0xcc, 0x67, 0xac, 0x3c, 0x4c}}, 100, 237, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29748 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29749 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29750 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29751 : /* nsIDOMScrollAreaEvent */ {{0xa382424b, 0x464f, 0x475f, {0x88, 0x80, 0xf4, 0xce, 0xac, 0xa9, 0xfd, 0xe9}}, 376, 4, 125, 1, 166, 203},
29752 : /* nsIDOMStorage */ {{0x43e5edad, 0x1e02, 0x42c4, {0x9d, 0x99, 0xc3, 0xd9, 0xde, 0xe2, 0x2a, 0x20}}, 568, 1, 185, 5, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29753 : /* nsIDOMHTMLFormElement */ {{0xd873b251, 0x6f96, 0x4e70, {0xba, 0xf5, 0xaa, 0xa9, 0x35, 0xaa, 0xbe, 0x59}}, 471, 5, 143, 1, 123, XPC_QS_NULL_INDEX},
29754 : /* nsIIDBOpenDBRequest */ {{0x91010fbe, 0x1dfb, 0x435d, {0x85, 0x2e, 0x28, 0x8d, 0x28, 0x04, 0xc0, 0xa7}}, 693, 2, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29755 : /* nsIDOMHTMLOptionElement */ {{0x7c5bf0ac, 0x6230, 0x4ee0, {0x8b, 0x82, 0xe7, 0xeb, 0xf2, 0x11, 0xaf, 0x03}}, 507, 8, 0, 0, 123, XPC_QS_NULL_INDEX},
29756 : /* nsIDOMXPathNSResolver */ {{0x75506f83, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 0, 0, 196, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29757 : /* nsIDOMHTMLCommandElement */ {{0x13032f74, 0x4150, 0x4768, {0xab, 0x5e, 0x51, 0xf4, 0xde, 0x39, 0xa3, 0x00}}, 432, 7, 0, 0, 123, 186},
29758 : /* nsIDOMXPathResult */ {{0x75506f84, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 572, 6, 197, 2, XPC_QS_NULL_INDEX, 187},
29759 : /* nsIBoxObject */ {{0xce572460, 0xb0f2, 0x4650, {0xa9, 0xe7, 0xc5, 0x3a, 0x99, 0xd3, 0xb6, 0xad}}, 612, 6, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29760 : /* nsIDOMXPathEvaluator */ {{0x75506f8a, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 0, 0, 192, 3, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29761 : /* nsIDOMHTMLFrameSetElement */ {{0x6eefbe6d, 0x182c, 0x42e9, {0x98, 0x50, 0xaf, 0x18, 0x92, 0xb6, 0xf2, 0xe4}}, 480, 2, 0, 0, 123, XPC_QS_NULL_INDEX},
29762 : /* nsIDOMHTMLAnchorElement */ {{0xbcb54394, 0xd9f8, 0x4bcb, {0xbb, 0xbb, 0xec, 0xa9, 0x82, 0x6c, 0xdb, 0xca}}, 418, 7, 0, 0, 123, XPC_QS_NULL_INDEX},
29763 : /* nsIIDBTransaction */ {{0xe4927c76, 0x4f1f, 0x4d7d, {0x80, 0xad, 0x81, 0x86, 0xe1, 0x67, 0x7d, 0xa6}}, 687, 6, 379, 2, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29764 : /* nsIDOMDocument */ {{0xd7cdd08e, 0x1bfd, 0x4bc3, {0x97, 0x42, 0xd6, 0x65, 0x86, 0x78, 0x1e, 0xe2}}, 48, 11, 42, 14, 161, XPC_QS_NULL_INDEX},
29765 : /* nsIDOMToString */ {{0x2a72e20f, 0xe337, 0x4822, {0x89, 0x94, 0x2e, 0x35, 0xb5, 0x55, 0x0d, 0x03}}, 0, 0, 184, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29766 : /* nsIDOMHTMLTableRowElement */ {{0xd24a80d4, 0x491d, 0x4e36, {0x93, 0x49, 0xaf, 0xd3, 0xc6, 0x99, 0x9b, 0x3e}}, 543, 3, 153, 2, 123, XPC_QS_NULL_INDEX},
29767 : /* nsIIndexedDatabaseManager */ {{0x02256aa7, 0x70d8, 0x473f, {0xbf, 0x3b, 0x8c, 0xb3, 0x5d, 0x28, 0xfd, 0x75}}, 0, 0, 385, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29768 : /* nsIDOMXULDocument */ {{0xb16d13c3, 0x837d, 0x445d, {0x8f, 0x56, 0x05, 0xd8, 0x3d, 0x9b, 0x9e, 0xae}}, 0, 0, 100, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29769 : /* nsIXMLHttpRequest */ {{0x88ffc45a, 0x22e2, 0x44f4, {0x9a, 0x6e, 0xf4, 0x58, 0x6f, 0xbd, 0xe3, 0x76}}, 627, 11, 211, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29770 : /* nsIDOMHTMLMenuElement */ {{0x06d48250, 0x45e0, 0x4f26, {0x9a, 0x07, 0xd9, 0xb5, 0xa3, 0xf0, 0x8b, 0xb6}}, 504, 3, 0, 0, 123, XPC_QS_NULL_INDEX},
29771 : /* nsIDOMWebGLRenderingContext */ {{0x020474b1, 0x2d3f, 0x403b, {0xb8, 0x5d, 0x11, 0xd9, 0x08, 0x2c, 0xcd, 0x92}}, 648, 3, 217, 135, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29772 : /* nsIDOMHTMLTitleElement */ {{0xe20fd651, 0x6240, 0x4f20, {0xb8, 0xf0, 0x6c, 0xc2, 0x5c, 0xb6, 0x99, 0xb7}}, 559, 1, 0, 0, 123, XPC_QS_NULL_INDEX},
29773 : /* nsIDOMNotifyAudioAvailableEvent */ {{0xcd362d2f, 0xa9a1, 0x4127, {0x94, 0x0d, 0x47, 0x7b, 0xa0, 0xe8, 0x2b, 0xd6}}, 651, 2, 0, 0, 140, XPC_QS_NULL_INDEX},
29774 : /* nsIDOMHTMLDocument */ {{0xcc1af020, 0x6543, 0x429c, {0x82, 0xd7, 0x84, 0x0c, 0xda, 0x3b, 0xe0, 0xb9}}, 439, 10, 133, 4, 192, XPC_QS_NULL_INDEX},
29775 : /* nsIDOMHTMLImageElement */ {{0x56d9191f, 0x5a94, 0x432f, {0xaf, 0x70, 0x6f, 0xcc, 0xde, 0xaf, 0x61, 0x4b}}, 485, 5, 0, 0, 123, 204},
29776 : /* nsIDOMHTMLTableElement */ {{0x0f809b97, 0x9311, 0x45c4, {0xa4, 0x4e, 0x71, 0x45, 0xf3, 0x54, 0x43, 0x8b}}, 541, 2, 151, 2, 123, XPC_QS_NULL_INDEX}
29777 : };
29778 :
29779 : // Make sure our table indices aren't overflowed
29780 : PR_STATIC_ASSERT((sizeof(tableData) / sizeof(tableData[0])) < (1 << (8 * sizeof(tableData[0].parentInterface))));
29781 : PR_STATIC_ASSERT((sizeof(tableData) / sizeof(tableData[0])) < (1 << (8 * sizeof(tableData[0].chain))));
29782 :
29783 : static const char stringtab[] = {
29784 : /* 0 */ 'n', 'a', 'm', 'e', '\0',
29785 : /* 5 */ 'p', 'a', 'r', 'e', 'n', 't', '\0',
29786 : /* 12 */ 't', 'o', 'p', '\0',
29787 : /* 16 */ 's', 'e', 'l', 'f', '\0',
29788 : /* 21 */ 'g', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', '\0',
29789 : /* 34 */ 's', 'c', 'r', 'o', 'l', 'l', 'B', 'y', 'L', 'i', 'n', 'e', 's', '\0',
29790 : /* 48 */ 'g', 'e', 't', 'C', 'o', 'm', 'p', 'u', 't', 'e', 'd', 'S', 't', 'y', 'l', 'e', '\0',
29791 : /* 65 */ 's', 'e', 's', 's', 'i', 'o', 'n', 'S', 't', 'o', 'r', 'a', 'g', 'e', '\0',
29792 : /* 80 */ 'l', 'o', 'c', 'a', 'l', 'S', 't', 'o', 'r', 'a', 'g', 'e', '\0',
29793 : /* 93 */ 'o', 'n', 'm', 'o', 'u', 's', 'e', 'e', 'n', 't', 'e', 'r', '\0',
29794 : /* 106 */ 'o', 'n', 'm', 'o', 'u', 's', 'e', 'l', 'e', 'a', 'v', 'e', '\0',
29795 : /* 119 */ 'd', 'u', 'm', 'p', '\0',
29796 : /* 124 */ 'h', 'e', 'i', 'g', 'h', 't', '\0',
29797 : /* 131 */ 'w', 'i', 'd', 't', 'h', '\0',
29798 : /* 137 */ 'l', 'e', 'f', 't', '\0',
29799 : /* 142 */ 'r', 'i', 'g', 'h', 't', '\0',
29800 : /* 148 */ 'b', 'o', 't', 't', 'o', 'm', '\0',
29801 : /* 155 */ 'l', 'e', 'n', 'g', 't', 'h', '\0',
29802 : /* 162 */ 'i', 't', 'e', 'm', '\0',
29803 : /* 167 */ 'c', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', '\0',
29804 : /* 178 */ 'r', 'e', 'a', 's', 'o', 'n', '\0',
29805 : /* 185 */ 'c', 'a', 'n', 'v', 'a', 's', '\0',
29806 : /* 192 */ 's', 'a', 'v', 'e', '\0',
29807 : /* 197 */ 'r', 'e', 's', 't', 'o', 'r', 'e', '\0',
29808 : /* 205 */ 's', 'c', 'a', 'l', 'e', '\0',
29809 : /* 211 */ 'r', 'o', 't', 'a', 't', 'e', '\0',
29810 : /* 218 */ 't', 'r', 'a', 'n', 's', 'l', 'a', 't', 'e', '\0',
29811 : /* 228 */ 't', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
29812 : /* 238 */ 's', 'e', 't', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
29813 : /* 251 */ 'm', 'o', 'z', 'C', 'u', 'r', 'r', 'e', 'n', 't', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
29814 : /* 271 */ 'm', 'o', 'z', 'C', 'u', 'r', 'r', 'e', 'n', 't', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'I', 'n', 'v', 'e', 'r', 's', 'e', '\0',
29815 : /* 298 */ 'g', 'l', 'o', 'b', 'a', 'l', 'A', 'l', 'p', 'h', 'a', '\0',
29816 : /* 310 */ 'g', 'l', 'o', 'b', 'a', 'l', 'C', 'o', 'm', 'p', 'o', 's', 'i', 't', 'e', 'O', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', '\0',
29817 : /* 335 */ 's', 't', 'r', 'o', 'k', 'e', 'S', 't', 'y', 'l', 'e', '\0',
29818 : /* 347 */ 'f', 'i', 'l', 'l', 'S', 't', 'y', 'l', 'e', '\0',
29819 : /* 357 */ 'm', 'o', 'z', 'F', 'i', 'l', 'l', 'R', 'u', 'l', 'e', '\0',
29820 : /* 369 */ 'c', 'r', 'e', 'a', 't', 'e', 'L', 'i', 'n', 'e', 'a', 'r', 'G', 'r', 'a', 'd', 'i', 'e', 'n', 't', '\0',
29821 : /* 390 */ 'c', 'r', 'e', 'a', 't', 'e', 'R', 'a', 'd', 'i', 'a', 'l', 'G', 'r', 'a', 'd', 'i', 'e', 'n', 't', '\0',
29822 : /* 411 */ 'c', 'r', 'e', 'a', 't', 'e', 'P', 'a', 't', 't', 'e', 'r', 'n', '\0',
29823 : /* 425 */ 'l', 'i', 'n', 'e', 'W', 'i', 'd', 't', 'h', '\0',
29824 : /* 435 */ 'l', 'i', 'n', 'e', 'C', 'a', 'p', '\0',
29825 : /* 443 */ 'l', 'i', 'n', 'e', 'J', 'o', 'i', 'n', '\0',
29826 : /* 452 */ 'm', 'i', 't', 'e', 'r', 'L', 'i', 'm', 'i', 't', '\0',
29827 : /* 463 */ 'm', 'o', 'z', 'D', 'a', 's', 'h', '\0',
29828 : /* 471 */ 'm', 'o', 'z', 'D', 'a', 's', 'h', 'O', 'f', 'f', 's', 'e', 't', '\0',
29829 : /* 485 */ 's', 'h', 'a', 'd', 'o', 'w', 'O', 'f', 'f', 's', 'e', 't', 'X', '\0',
29830 : /* 499 */ 's', 'h', 'a', 'd', 'o', 'w', 'O', 'f', 'f', 's', 'e', 't', 'Y', '\0',
29831 : /* 513 */ 's', 'h', 'a', 'd', 'o', 'w', 'B', 'l', 'u', 'r', '\0',
29832 : /* 524 */ 's', 'h', 'a', 'd', 'o', 'w', 'C', 'o', 'l', 'o', 'r', '\0',
29833 : /* 536 */ 'c', 'l', 'e', 'a', 'r', 'R', 'e', 'c', 't', '\0',
29834 : /* 546 */ 'f', 'i', 'l', 'l', 'R', 'e', 'c', 't', '\0',
29835 : /* 555 */ 's', 't', 'r', 'o', 'k', 'e', 'R', 'e', 'c', 't', '\0',
29836 : /* 566 */ 'b', 'e', 'g', 'i', 'n', 'P', 'a', 't', 'h', '\0',
29837 : /* 576 */ 'c', 'l', 'o', 's', 'e', 'P', 'a', 't', 'h', '\0',
29838 : /* 586 */ 'm', 'o', 'v', 'e', 'T', 'o', '\0',
29839 : /* 593 */ 'l', 'i', 'n', 'e', 'T', 'o', '\0',
29840 : /* 600 */ 'q', 'u', 'a', 'd', 'r', 'a', 't', 'i', 'c', 'C', 'u', 'r', 'v', 'e', 'T', 'o', '\0',
29841 : /* 617 */ 'b', 'e', 'z', 'i', 'e', 'r', 'C', 'u', 'r', 'v', 'e', 'T', 'o', '\0',
29842 : /* 631 */ 'a', 'r', 'c', 'T', 'o', '\0',
29843 : /* 637 */ 'a', 'r', 'c', '\0',
29844 : /* 641 */ 'r', 'e', 'c', 't', '\0',
29845 : /* 646 */ 'f', 'i', 'l', 'l', '\0',
29846 : /* 651 */ 's', 't', 'r', 'o', 'k', 'e', '\0',
29847 : /* 658 */ 'c', 'l', 'i', 'p', '\0',
29848 : /* 663 */ 'f', 'o', 'n', 't', '\0',
29849 : /* 668 */ 't', 'e', 'x', 't', 'A', 'l', 'i', 'g', 'n', '\0',
29850 : /* 678 */ 't', 'e', 'x', 't', 'B', 'a', 's', 'e', 'l', 'i', 'n', 'e', '\0',
29851 : /* 691 */ 'f', 'i', 'l', 'l', 'T', 'e', 'x', 't', '\0',
29852 : /* 700 */ 's', 't', 'r', 'o', 'k', 'e', 'T', 'e', 'x', 't', '\0',
29853 : /* 711 */ 'm', 'e', 'a', 's', 'u', 'r', 'e', 'T', 'e', 'x', 't', '\0',
29854 : /* 723 */ 'm', 'o', 'z', 'T', 'e', 'x', 't', 'S', 't', 'y', 'l', 'e', '\0',
29855 : /* 736 */ 'd', 'r', 'a', 'w', 'I', 'm', 'a', 'g', 'e', '\0',
29856 : /* 746 */ 'i', 's', 'P', 'o', 'i', 'n', 't', 'I', 'n', 'P', 'a', 't', 'h', '\0',
29857 : /* 760 */ 'g', 'e', 't', 'I', 'm', 'a', 'g', 'e', 'D', 'a', 't', 'a', '\0',
29858 : /* 773 */ 'p', 'u', 't', 'I', 'm', 'a', 'g', 'e', 'D', 'a', 't', 'a', '\0',
29859 : /* 786 */ 'c', 'r', 'e', 'a', 't', 'e', 'I', 'm', 'a', 'g', 'e', 'D', 'a', 't', 'a', '\0',
29860 : /* 802 */ 'm', 'o', 'z', 'I', 'm', 'a', 'g', 'e', 'S', 'm', 'o', 'o', 't', 'h', 'i', 'n', 'g', 'E', 'n', 'a', 'b', 'l', 'e', 'd', '\0',
29861 : /* 827 */ 'd', 'r', 'a', 'w', 'W', 'i', 'n', 'd', 'o', 'w', '\0',
29862 : /* 838 */ 'a', 's', 'y', 'n', 'c', 'D', 'r', 'a', 'w', 'X', 'U', 'L', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29863 : /* 858 */ 'a', 'd', 'd', 'C', 'o', 'l', 'o', 'r', 'S', 't', 'o', 'p', '\0',
29864 : /* 871 */ 'd', 'a', 't', 'a', '\0',
29865 : /* 876 */ 'd', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29866 : /* 892 */ 'i', 'm', 'p', 'l', 'e', 'm', 'e', 'n', 't', 'a', 't', 'i', 'o', 'n', '\0',
29867 : /* 907 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'T', 'a', 'g', 'N', 'a', 'm', 'e', '\0',
29868 : /* 928 */ 'd', 'o', 'c', 't', 'y', 'p', 'e', '\0',
29869 : /* 936 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'T', 'a', 'g', 'N', 'a', 'm', 'e', 'N', 'S', '\0',
29870 : /* 959 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'B', 'y', 'I', 'd', '\0',
29871 : /* 974 */ 'c', 'r', 'e', 'a', 't', 'e', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', '\0',
29872 : /* 997 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29873 : /* 1011 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'N', 'S', '\0',
29874 : /* 1027 */ 'i', 'm', 'p', 'o', 'r', 't', 'N', 'o', 'd', 'e', '\0',
29875 : /* 1038 */ 'c', 'r', 'e', 'a', 't', 'e', 'T', 'e', 'x', 't', 'N', 'o', 'd', 'e', '\0',
29876 : /* 1053 */ 'd', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'U', 'R', 'I', '\0',
29877 : /* 1065 */ 'a', 'd', 'o', 'p', 't', 'N', 'o', 'd', 'e', '\0',
29878 : /* 1075 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'i', 'e', 'w', '\0',
29879 : /* 1087 */ 'c', 'r', 'e', 'a', 't', 'e', 'N', 'o', 'd', 'e', 'I', 't', 'e', 'r', 'a', 't', 'o', 'r', '\0',
29880 : /* 1106 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'v', 'e', 'n', 't', '\0',
29881 : /* 1118 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'C', 'l', 'a', 's', 's', 'N', 'a', 'm', 'e', '\0',
29882 : /* 1141 */ 't', 'i', 't', 'l', 'e', '\0',
29883 : /* 1147 */ 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'r', '\0',
29884 : /* 1156 */ 'h', 'a', 's', 'F', 'o', 'c', 'u', 's', '\0',
29885 : /* 1165 */ 'e', 'l', 'e', 'm', 'e', 'n', 't', 'F', 'r', 'o', 'm', 'P', 'o', 'i', 'n', 't', '\0',
29886 : /* 1182 */ 'a', 'c', 't', 'i', 'v', 'e', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29887 : /* 1196 */ 'o', 'n', 'r', 'e', 'a', 'd', 'y', 's', 't', 'a', 't', 'e', 'c', 'h', 'a', 'n', 'g', 'e', '\0',
29888 : /* 1215 */ 'r', 'e', 'm', 'o', 'v', 'e', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29889 : /* 1233 */ 'r', 'e', 'm', 'o', 'v', 'e', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29890 : /* 1249 */ 'g', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29891 : /* 1262 */ 's', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29892 : /* 1275 */ 'h', 'a', 's', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29893 : /* 1290 */ 't', 'a', 'g', 'N', 'a', 'm', 'e', '\0',
29894 : /* 1298 */ 's', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29895 : /* 1313 */ 'h', 'a', 's', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29896 : /* 1326 */ 'g', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29897 : /* 1341 */ 'n', 'o', 'd', 'e', 'N', 'a', 'm', 'e', '\0',
29898 : /* 1350 */ 'n', 'o', 'd', 'e', 'V', 'a', 'l', 'u', 'e', '\0',
29899 : /* 1360 */ 'n', 'o', 'd', 'e', 'T', 'y', 'p', 'e', '\0',
29900 : /* 1369 */ 'p', 'a', 'r', 'e', 'n', 't', 'N', 'o', 'd', 'e', '\0',
29901 : /* 1380 */ 'p', 'a', 'r', 'e', 'n', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29902 : /* 1394 */ 'c', 'h', 'i', 'l', 'd', 'N', 'o', 'd', 'e', 's', '\0',
29903 : /* 1405 */ 'f', 'i', 'r', 's', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29904 : /* 1416 */ 'l', 'a', 's', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29905 : /* 1426 */ 'p', 'r', 'e', 'v', 'i', 'o', 'u', 's', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29906 : /* 1442 */ 'n', 'e', 'x', 't', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29907 : /* 1454 */ 'a', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 's', '\0',
29908 : /* 1465 */ 'o', 'w', 'n', 'e', 'r', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
29909 : /* 1479 */ 'i', 'n', 's', 'e', 'r', 't', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
29910 : /* 1492 */ 'r', 'e', 'p', 'l', 'a', 'c', 'e', 'C', 'h', 'i', 'l', 'd', '\0',
29911 : /* 1505 */ 'r', 'e', 'm', 'o', 'v', 'e', 'C', 'h', 'i', 'l', 'd', '\0',
29912 : /* 1517 */ 'a', 'p', 'p', 'e', 'n', 'd', 'C', 'h', 'i', 'l', 'd', '\0',
29913 : /* 1529 */ 'h', 'a', 's', 'C', 'h', 'i', 'l', 'd', 'N', 'o', 'd', 'e', 's', '\0',
29914 : /* 1543 */ 'c', 'l', 'o', 'n', 'e', 'N', 'o', 'd', 'e', '\0',
29915 : /* 1553 */ 'n', 'o', 'r', 'm', 'a', 'l', 'i', 'z', 'e', '\0',
29916 : /* 1563 */ 'i', 's', 'S', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', '\0',
29917 : /* 1575 */ 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', 'U', 'R', 'I', '\0',
29918 : /* 1588 */ 'p', 'r', 'e', 'f', 'i', 'x', '\0',
29919 : /* 1595 */ 'l', 'o', 'c', 'a', 'l', 'N', 'a', 'm', 'e', '\0',
29920 : /* 1605 */ 'h', 'a', 's', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 's', '\0',
29921 : /* 1619 */ 'b', 'a', 's', 'e', 'U', 'R', 'I', '\0',
29922 : /* 1627 */ 'c', 'o', 'm', 'p', 'a', 'r', 'e', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'P', 'o', 's', 'i', 't', 'i', 'o', 'n', '\0',
29923 : /* 1651 */ 't', 'e', 'x', 't', 'C', 'o', 'n', 't', 'e', 'n', 't', '\0',
29924 : /* 1663 */ 'l', 'o', 'o', 'k', 'u', 'p', 'P', 'r', 'e', 'f', 'i', 'x', '\0',
29925 : /* 1676 */ 'i', 's', 'D', 'e', 'f', 'a', 'u', 'l', 't', 'N', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\0',
29926 : /* 1695 */ 'l', 'o', 'o', 'k', 'u', 'p', 'N', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', 'U', 'R', 'I', '\0',
29927 : /* 1714 */ 'i', 's', 'E', 'q', 'u', 'a', 'l', 'N', 'o', 'd', 'e', '\0',
29928 : /* 1726 */ 's', 'e', 't', 'U', 's', 'e', 'r', 'D', 'a', 't', 'a', '\0',
29929 : /* 1738 */ 'g', 'e', 't', 'U', 's', 'e', 'r', 'D', 'a', 't', 'a', '\0',
29930 : /* 1750 */ 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\0',
29931 : /* 1759 */ 'q', 'u', 'e', 'r', 'y', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\0',
29932 : /* 1773 */ 'q', 'u', 'e', 'r', 'y', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', 'A', 'l', 'l', '\0',
29933 : /* 1790 */ 's', 'p', 'l', 'i', 't', 'T', 'e', 'x', 't', '\0',
29934 : /* 1800 */ 'h', 'a', 's', 'F', 'e', 'a', 't', 'u', 'r', 'e', '\0',
29935 : /* 1811 */ 'c', 'r', 'e', 'a', 't', 'e', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'T', 'y', 'p', 'e', '\0',
29936 : /* 1830 */ 'c', 'r', 'e', 'a', 't', 'e', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
29937 : /* 1845 */ 'c', 'r', 'e', 'a', 't', 'e', 'H', 'T', 'M', 'L', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
29938 : /* 1864 */ 'a', 'd', 'd', '\0',
29939 : /* 1868 */ 'r', 'e', 'm', 'o', 'v', 'e', '\0',
29940 : /* 1875 */ 't', 'o', 'g', 'g', 'l', 'e', '\0',
29941 : /* 1882 */ 't', 'o', 'S', 't', 'r', 'i', 'n', 'g', '\0',
29942 : /* 1891 */ 'v', 'a', 'l', 'u', 'e', '\0',
29943 : /* 1897 */ 'g', 'e', 't', 'B', 'o', 'x', 'O', 'b', 'j', 'e', 'c', 't', 'F', 'o', 'r', '\0',
29944 : /* 1913 */ 'g', 'e', 't', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', 's', '\0',
29945 : /* 1928 */ 'g', 'e', 't', 'B', 'o', 'u', 'n', 'd', 'i', 'n', 'g', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', '\0',
29946 : /* 1950 */ 's', 'c', 'r', 'o', 'l', 'l', 'T', 'o', 'p', '\0',
29947 : /* 1960 */ 's', 'c', 'r', 'o', 'l', 'l', 'L', 'e', 'f', 't', '\0',
29948 : /* 1971 */ 's', 'c', 'r', 'o', 'l', 'l', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29949 : /* 1984 */ 's', 'c', 'r', 'o', 'l', 'l', 'W', 'i', 'd', 't', 'h', '\0',
29950 : /* 1996 */ 'c', 'l', 'i', 'e', 'n', 't', 'T', 'o', 'p', '\0',
29951 : /* 2006 */ 'c', 'l', 'i', 'e', 'n', 't', 'L', 'e', 'f', 't', '\0',
29952 : /* 2017 */ 'c', 'l', 'i', 'e', 'n', 't', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29953 : /* 2030 */ 'c', 'l', 'i', 'e', 'n', 't', 'W', 'i', 'd', 't', 'h', '\0',
29954 : /* 2042 */ 'f', 'i', 'r', 's', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29955 : /* 2060 */ 'l', 'a', 's', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29956 : /* 2077 */ 'p', 'r', 'e', 'v', 'i', 'o', 'u', 's', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29957 : /* 2100 */ 'n', 'e', 'x', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29958 : /* 2119 */ 'c', 'h', 'i', 'l', 'd', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'C', 'o', 'u', 'n', 't', '\0',
29959 : /* 2137 */ 'c', 'h', 'i', 'l', 'd', 'r', 'e', 'n', '\0',
29960 : /* 2146 */ 'c', 'l', 'a', 's', 's', 'L', 'i', 's', 't', '\0',
29961 : /* 2156 */ 's', 'e', 't', 'C', 'a', 'p', 't', 'u', 'r', 'e', '\0',
29962 : /* 2167 */ 'r', 'e', 'l', 'e', 'a', 's', 'e', 'C', 'a', 'p', 't', 'u', 'r', 'e', '\0',
29963 : /* 2182 */ 'm', 'o', 'z', 'M', 'a', 't', 'c', 'h', 'e', 's', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\0',
29964 : /* 2201 */ 's', 't', 'y', 'l', 'e', '\0',
29965 : /* 2207 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', '\0',
29966 : /* 2218 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'A', 't', 't', 'a', 'c', 'h', 'm', 'e', 'n', 't', '\0',
29967 : /* 2239 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
29968 : /* 2255 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'I', 'm', 'a', 'g', 'e', '\0',
29969 : /* 2271 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'P', 'o', 's', 'i', 't', 'i', 'o', 'n', '\0',
29970 : /* 2290 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'R', 'e', 'p', 'e', 'a', 't', '\0',
29971 : /* 2307 */ 'b', 'o', 'r', 'd', 'e', 'r', '\0',
29972 : /* 2314 */ 'b', 'o', 'r', 'd', 'e', 'r', 'C', 'o', 'l', 'l', 'a', 'p', 's', 'e', '\0',
29973 : /* 2329 */ 'b', 'o', 'r', 'd', 'e', 'r', 'C', 'o', 'l', 'o', 'r', '\0',
29974 : /* 2341 */ 'b', 'o', 'r', 'd', 'e', 'r', 'S', 'p', 'a', 'c', 'i', 'n', 'g', '\0',
29975 : /* 2355 */ 'b', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'y', 'l', 'e', '\0',
29976 : /* 2367 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', '\0',
29977 : /* 2377 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', '\0',
29978 : /* 2389 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', '\0',
29979 : /* 2402 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', '\0',
29980 : /* 2413 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'C', 'o', 'l', 'o', 'r', '\0',
29981 : /* 2428 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'C', 'o', 'l', 'o', 'r', '\0',
29982 : /* 2445 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'C', 'o', 'l', 'o', 'r', '\0',
29983 : /* 2463 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'C', 'o', 'l', 'o', 'r', '\0',
29984 : /* 2479 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'S', 't', 'y', 'l', 'e', '\0',
29985 : /* 2494 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'S', 't', 'y', 'l', 'e', '\0',
29986 : /* 2511 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'S', 't', 'y', 'l', 'e', '\0',
29987 : /* 2529 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'S', 't', 'y', 'l', 'e', '\0',
29988 : /* 2545 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'W', 'i', 'd', 't', 'h', '\0',
29989 : /* 2560 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'W', 'i', 'd', 't', 'h', '\0',
29990 : /* 2577 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'W', 'i', 'd', 't', 'h', '\0',
29991 : /* 2595 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'W', 'i', 'd', 't', 'h', '\0',
29992 : /* 2611 */ 'b', 'o', 'r', 'd', 'e', 'r', 'W', 'i', 'd', 't', 'h', '\0',
29993 : /* 2623 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29994 : /* 2636 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'L', 'e', 'f', 't', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29995 : /* 2656 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'R', 'i', 'g', 'h', 't', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29996 : /* 2677 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'L', 'e', 'f', 't', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29997 : /* 2700 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'R', 'i', 'g', 'h', 't', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29998 : /* 2724 */ 'b', 'o', 'x', 'S', 'h', 'a', 'd', 'o', 'w', '\0',
29999 : /* 2734 */ 'c', 'a', 'p', 't', 'i', 'o', 'n', 'S', 'i', 'd', 'e', '\0',
30000 : /* 2746 */ 'c', 'l', 'e', 'a', 'r', '\0',
30001 : /* 2752 */ 'c', 'o', 'l', 'o', 'r', '\0',
30002 : /* 2758 */ 'c', 'o', 'n', 't', 'e', 'n', 't', '\0',
30003 : /* 2766 */ 'c', 'o', 'u', 'n', 't', 'e', 'r', 'I', 'n', 'c', 'r', 'e', 'm', 'e', 'n', 't', '\0',
30004 : /* 2783 */ 'c', 'o', 'u', 'n', 't', 'e', 'r', 'R', 'e', 's', 'e', 't', '\0',
30005 : /* 2796 */ 'c', 'u', 'r', 's', 'o', 'r', '\0',
30006 : /* 2803 */ 'd', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
30007 : /* 2813 */ 'd', 'i', 's', 'p', 'l', 'a', 'y', '\0',
30008 : /* 2821 */ 'e', 'm', 'p', 't', 'y', 'C', 'e', 'l', 'l', 's', '\0',
30009 : /* 2832 */ 'c', 's', 's', 'F', 'l', 'o', 'a', 't', '\0',
30010 : /* 2841 */ 'f', 'o', 'n', 't', 'F', 'a', 'm', 'i', 'l', 'y', '\0',
30011 : /* 2852 */ 'f', 'o', 'n', 't', 'S', 'i', 'z', 'e', '\0',
30012 : /* 2861 */ 'f', 'o', 'n', 't', 'S', 'i', 'z', 'e', 'A', 'd', 'j', 'u', 's', 't', '\0',
30013 : /* 2876 */ 'f', 'o', 'n', 't', 'S', 't', 'r', 'e', 't', 'c', 'h', '\0',
30014 : /* 2888 */ 'f', 'o', 'n', 't', 'S', 't', 'y', 'l', 'e', '\0',
30015 : /* 2898 */ 'f', 'o', 'n', 't', 'V', 'a', 'r', 'i', 'a', 'n', 't', '\0',
30016 : /* 2910 */ 'f', 'o', 'n', 't', 'W', 'e', 'i', 'g', 'h', 't', '\0',
30017 : /* 2921 */ 'l', 'e', 't', 't', 'e', 'r', 'S', 'p', 'a', 'c', 'i', 'n', 'g', '\0',
30018 : /* 2935 */ 'l', 'i', 'n', 'e', 'H', 'e', 'i', 'g', 'h', 't', '\0',
30019 : /* 2946 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', '\0',
30020 : /* 2956 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', 'I', 'm', 'a', 'g', 'e', '\0',
30021 : /* 2971 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', 'P', 'o', 's', 'i', 't', 'i', 'o', 'n', '\0',
30022 : /* 2989 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', 'T', 'y', 'p', 'e', '\0',
30023 : /* 3003 */ 'm', 'a', 'r', 'g', 'i', 'n', '\0',
30024 : /* 3010 */ 'm', 'a', 'r', 'g', 'i', 'n', 'T', 'o', 'p', '\0',
30025 : /* 3020 */ 'm', 'a', 'r', 'g', 'i', 'n', 'R', 'i', 'g', 'h', 't', '\0',
30026 : /* 3032 */ 'm', 'a', 'r', 'g', 'i', 'n', 'B', 'o', 't', 't', 'o', 'm', '\0',
30027 : /* 3045 */ 'm', 'a', 'r', 'g', 'i', 'n', 'L', 'e', 'f', 't', '\0',
30028 : /* 3056 */ 'm', 'a', 'r', 'k', 'e', 'r', 'O', 'f', 'f', 's', 'e', 't', '\0',
30029 : /* 3069 */ 'm', 'a', 'r', 'k', 's', '\0',
30030 : /* 3075 */ 'm', 'a', 'x', 'H', 'e', 'i', 'g', 'h', 't', '\0',
30031 : /* 3085 */ 'm', 'a', 'x', 'W', 'i', 'd', 't', 'h', '\0',
30032 : /* 3094 */ 'm', 'i', 'n', 'H', 'e', 'i', 'g', 'h', 't', '\0',
30033 : /* 3104 */ 'm', 'i', 'n', 'W', 'i', 'd', 't', 'h', '\0',
30034 : /* 3113 */ 'o', 'r', 'p', 'h', 'a', 'n', 's', '\0',
30035 : /* 3121 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', '\0',
30036 : /* 3129 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'C', 'o', 'l', 'o', 'r', '\0',
30037 : /* 3142 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'S', 't', 'y', 'l', 'e', '\0',
30038 : /* 3155 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'W', 'i', 'd', 't', 'h', '\0',
30039 : /* 3168 */ 'o', 'v', 'e', 'r', 'f', 'l', 'o', 'w', '\0',
30040 : /* 3177 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', '\0',
30041 : /* 3185 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'T', 'o', 'p', '\0',
30042 : /* 3196 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'R', 'i', 'g', 'h', 't', '\0',
30043 : /* 3209 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'B', 'o', 't', 't', 'o', 'm', '\0',
30044 : /* 3223 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'L', 'e', 'f', 't', '\0',
30045 : /* 3235 */ 'p', 'a', 'g', 'e', '\0',
30046 : /* 3240 */ 'p', 'a', 'g', 'e', 'B', 'r', 'e', 'a', 'k', 'A', 'f', 't', 'e', 'r', '\0',
30047 : /* 3255 */ 'p', 'a', 'g', 'e', 'B', 'r', 'e', 'a', 'k', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
30048 : /* 3271 */ 'p', 'a', 'g', 'e', 'B', 'r', 'e', 'a', 'k', 'I', 'n', 's', 'i', 'd', 'e', '\0',
30049 : /* 3287 */ 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '\0',
30050 : /* 3296 */ 'q', 'u', 'o', 't', 'e', 's', '\0',
30051 : /* 3303 */ 's', 'i', 'z', 'e', '\0',
30052 : /* 3308 */ 't', 'a', 'b', 'l', 'e', 'L', 'a', 'y', 'o', 'u', 't', '\0',
30053 : /* 3320 */ 't', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', '\0',
30054 : /* 3335 */ 't', 'e', 'x', 't', 'I', 'n', 'd', 'e', 'n', 't', '\0',
30055 : /* 3346 */ 't', 'e', 'x', 't', 'O', 'v', 'e', 'r', 'f', 'l', 'o', 'w', '\0',
30056 : /* 3359 */ 't', 'e', 'x', 't', 'S', 'h', 'a', 'd', 'o', 'w', '\0',
30057 : /* 3370 */ 't', 'e', 'x', 't', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
30058 : /* 3384 */ 'u', 'n', 'i', 'c', 'o', 'd', 'e', 'B', 'i', 'd', 'i', '\0',
30059 : /* 3396 */ 'v', 'e', 'r', 't', 'i', 'c', 'a', 'l', 'A', 'l', 'i', 'g', 'n', '\0',
30060 : /* 3410 */ 'v', 'i', 's', 'i', 'b', 'i', 'l', 'i', 't', 'y', '\0',
30061 : /* 3421 */ 'w', 'h', 'i', 't', 'e', 'S', 'p', 'a', 'c', 'e', '\0',
30062 : /* 3432 */ 'w', 'i', 'd', 'o', 'w', 's', '\0',
30063 : /* 3439 */ 'w', 'o', 'r', 'd', 'S', 'p', 'a', 'c', 'i', 'n', 'g', '\0',
30064 : /* 3451 */ 'z', 'I', 'n', 'd', 'e', 'x', '\0',
30065 : /* 3458 */ 'c', 'l', 'i', 'p', 'P', 'a', 't', 'h', '\0',
30066 : /* 3467 */ 'c', 'l', 'i', 'p', 'R', 'u', 'l', 'e', '\0',
30067 : /* 3476 */ 'c', 'o', 'l', 'o', 'r', 'I', 'n', 't', 'e', 'r', 'p', 'o', 'l', 'a', 't', 'i', 'o', 'n', '\0',
30068 : /* 3495 */ 'c', 'o', 'l', 'o', 'r', 'I', 'n', 't', 'e', 'r', 'p', 'o', 'l', 'a', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', 's', '\0',
30069 : /* 3521 */ 'd', 'o', 'm', 'i', 'n', 'a', 'n', 't', 'B', 'a', 's', 'e', 'l', 'i', 'n', 'e', '\0',
30070 : /* 3538 */ 'f', 'i', 'l', 'l', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30071 : /* 3550 */ 'f', 'i', 'l', 'l', 'R', 'u', 'l', 'e', '\0',
30072 : /* 3559 */ 'f', 'i', 'l', 't', 'e', 'r', '\0',
30073 : /* 3566 */ 'f', 'l', 'o', 'o', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
30074 : /* 3577 */ 'f', 'l', 'o', 'o', 'd', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30075 : /* 3590 */ 'i', 'm', 'a', 'g', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'i', 'n', 'g', '\0',
30076 : /* 3605 */ 'l', 'i', 'g', 'h', 't', 'i', 'n', 'g', 'C', 'o', 'l', 'o', 'r', '\0',
30077 : /* 3619 */ 'm', 'a', 'r', 'k', 'e', 'r', '\0',
30078 : /* 3626 */ 'm', 'a', 'r', 'k', 'e', 'r', 'E', 'n', 'd', '\0',
30079 : /* 3636 */ 'm', 'a', 'r', 'k', 'e', 'r', 'M', 'i', 'd', '\0',
30080 : /* 3646 */ 'm', 'a', 'r', 'k', 'e', 'r', 'S', 't', 'a', 'r', 't', '\0',
30081 : /* 3658 */ 'm', 'a', 's', 'k', '\0',
30082 : /* 3663 */ 's', 'h', 'a', 'p', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'i', 'n', 'g', '\0',
30083 : /* 3678 */ 's', 't', 'o', 'p', 'C', 'o', 'l', 'o', 'r', '\0',
30084 : /* 3688 */ 's', 't', 'o', 'p', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30085 : /* 3700 */ 's', 't', 'r', 'o', 'k', 'e', 'D', 'a', 's', 'h', 'a', 'r', 'r', 'a', 'y', '\0',
30086 : /* 3716 */ 's', 't', 'r', 'o', 'k', 'e', 'D', 'a', 's', 'h', 'o', 'f', 'f', 's', 'e', 't', '\0',
30087 : /* 3733 */ 's', 't', 'r', 'o', 'k', 'e', 'L', 'i', 'n', 'e', 'c', 'a', 'p', '\0',
30088 : /* 3747 */ 's', 't', 'r', 'o', 'k', 'e', 'L', 'i', 'n', 'e', 'j', 'o', 'i', 'n', '\0',
30089 : /* 3762 */ 's', 't', 'r', 'o', 'k', 'e', 'M', 'i', 't', 'e', 'r', 'l', 'i', 'm', 'i', 't', '\0',
30090 : /* 3779 */ 's', 't', 'r', 'o', 'k', 'e', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30091 : /* 3793 */ 's', 't', 'r', 'o', 'k', 'e', 'W', 'i', 'd', 't', 'h', '\0',
30092 : /* 3805 */ 't', 'e', 'x', 't', 'A', 'n', 'c', 'h', 'o', 'r', '\0',
30093 : /* 3816 */ 't', 'e', 'x', 't', 'R', 'e', 'n', 'd', 'e', 'r', 'i', 'n', 'g', '\0',
30094 : /* 3830 */ 'M', 'o', 'z', 'A', 'p', 'p', 'e', 'a', 'r', 'a', 'n', 'c', 'e', '\0',
30095 : /* 3844 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'C', 'l', 'i', 'p', '\0',
30096 : /* 3859 */ 'M', 'o', 'z', 'B', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'I', 'n', 'l', 'i', 'n', 'e', 'P', 'o', 'l', 'i', 'c', 'y', '\0',
30097 : /* 3885 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'O', 'r', 'i', 'g', 'i', 'n', '\0',
30098 : /* 3902 */ 'M', 'o', 'z', 'B', 'i', 'n', 'd', 'i', 'n', 'g', '\0',
30099 : /* 3913 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30100 : /* 3935 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30101 : /* 3955 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30102 : /* 3976 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30103 : /* 3995 */ 'M', 'o', 'z', 'B', 'o', 'x', 'A', 'l', 'i', 'g', 'n', '\0',
30104 : /* 4007 */ 'M', 'o', 'z', 'B', 'o', 'x', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
30105 : /* 4023 */ 'M', 'o', 'z', 'B', 'o', 'x', 'F', 'l', 'e', 'x', '\0',
30106 : /* 4034 */ 'M', 'o', 'z', 'B', 'o', 'x', 'O', 'r', 'i', 'e', 'n', 't', '\0',
30107 : /* 4047 */ 'M', 'o', 'z', 'B', 'o', 'x', 'O', 'r', 'd', 'i', 'n', 'a', 'l', 'G', 'r', 'o', 'u', 'p', '\0',
30108 : /* 4066 */ 'M', 'o', 'z', 'B', 'o', 'x', 'P', 'a', 'c', 'k', '\0',
30109 : /* 4077 */ 'M', 'o', 'z', 'B', 'o', 'x', 'S', 'i', 'z', 'i', 'n', 'g', '\0',
30110 : /* 4090 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'C', 'o', 'u', 'n', 't', '\0',
30111 : /* 4105 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'W', 'i', 'd', 't', 'h', '\0',
30112 : /* 4120 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'F', 'i', 'l', 'l', '\0',
30113 : /* 4134 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'G', 'a', 'p', '\0',
30114 : /* 4147 */ 'M', 'o', 'z', 'F', 'l', 'o', 'a', 't', 'E', 'd', 'g', 'e', '\0',
30115 : /* 4160 */ 'M', 'o', 'z', 'F', 'o', 'n', 't', 'F', 'e', 'a', 't', 'u', 'r', 'e', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', '\0',
30116 : /* 4183 */ 'M', 'o', 'z', 'F', 'o', 'n', 't', 'L', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 'O', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '\0',
30117 : /* 4207 */ 'M', 'o', 'z', 'F', 'o', 'r', 'c', 'e', 'B', 'r', 'o', 'k', 'e', 'n', 'I', 'm', 'a', 'g', 'e', 'I', 'c', 'o', 'n', '\0',
30118 : /* 4231 */ 'M', 'o', 'z', 'I', 'm', 'a', 'g', 'e', 'R', 'e', 'g', 'i', 'o', 'n', '\0',
30119 : /* 4246 */ 'M', 'o', 'z', 'M', 'a', 'r', 'g', 'i', 'n', 'E', 'n', 'd', '\0',
30120 : /* 4259 */ 'M', 'o', 'z', 'M', 'a', 'r', 'g', 'i', 'n', 'S', 't', 'a', 'r', 't', '\0',
30121 : /* 4274 */ 'M', 'o', 'z', 'O', 'r', 'i', 'e', 'n', 't', '\0',
30122 : /* 4284 */ 'M', 'o', 'z', 'O', 'u', 't', 'l', 'i', 'n', 'e', 'R', 'a', 'd', 'i', 'u', 's', '\0',
30123 : /* 4301 */ 'M', 'o', 'z', 'O', 'u', 't', 'l', 'i', 'n', 'e', 'R', 'a', 'd', 'i', 'u', 's', 'T', 'o', 'p', 'l', 'e', 'f', 't', '\0',
30124 : /* 4325 */ 'M', 'o', 'z', 'O', 'u', 't', 'l', 'i', 'n', 'e', 'R', 'a', 'd', 'i', 'u', 's', 'T', 'o', 'p', 'r', 'i', 'g', 'h', 't', '\0',
30125 : /* 4350 */ 'M', 'o', 'z', 'O', 'u', 't', 'l', 'i', 'n', 'e', 'R', 'a', 'd', 'i', 'u', 's', 'B', 'o', 't', 't', 'o', 'm', 'l', 'e', 'f', 't', '\0',
30126 : /* 4377 */ 'M', 'o', 'z', 'O', 'u', 't', 'l', 'i', 'n', 'e', 'R', 'a', 'd', 'i', 'u', 's', 'B', 'o', 't', 't', 'o', 'm', 'r', 'i', 'g', 'h', 't', '\0',
30127 : /* 4405 */ 'M', 'o', 'z', 'P', 'a', 'd', 'd', 'i', 'n', 'g', 'E', 'n', 'd', '\0',
30128 : /* 4419 */ 'M', 'o', 'z', 'P', 'a', 'd', 'd', 'i', 'n', 'g', 'S', 't', 'a', 'r', 't', '\0',
30129 : /* 4435 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'F', 'o', 'c', 'u', 's', '\0',
30130 : /* 4448 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'I', 'n', 'p', 'u', 't', '\0',
30131 : /* 4461 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'M', 'o', 'd', 'i', 'f', 'y', '\0',
30132 : /* 4475 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'S', 'e', 'l', 'e', 'c', 't', '\0',
30133 : /* 4489 */ 'o', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30134 : /* 4497 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'O', 'f', 'f', 's', 'e', 't', '\0',
30135 : /* 4511 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'A', 'l', 'i', 'g', 'n', 'L', 'a', 's', 't', '\0',
30136 : /* 4528 */ 'o', 'v', 'e', 'r', 'f', 'l', 'o', 'w', 'X', '\0',
30137 : /* 4538 */ 'o', 'v', 'e', 'r', 'f', 'l', 'o', 'w', 'Y', '\0',
30138 : /* 4548 */ 'i', 'm', 'e', 'M', 'o', 'd', 'e', '\0',
30139 : /* 4556 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', '\0',
30140 : /* 4569 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
30141 : /* 4587 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', 'S', 't', 'y', 'l', 'e', '\0',
30142 : /* 4605 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', 'W', 'i', 'd', 't', 'h', '\0',
30143 : /* 4623 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', '\0',
30144 : /* 4638 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', 'C', 'o', 'l', 'o', 'r', '\0',
30145 : /* 4658 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', 'S', 't', 'y', 'l', 'e', '\0',
30146 : /* 4678 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', 'W', 'i', 'd', 't', 'h', '\0',
30147 : /* 4698 */ 'M', 'o', 'z', 'S', 't', 'a', 'c', 'k', 'S', 'i', 'z', 'i', 'n', 'g', '\0',
30148 : /* 4713 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'I', 'm', 'a', 'g', 'e', '\0',
30149 : /* 4728 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 's', '\0',
30150 : /* 4739 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', '\0',
30151 : /* 4753 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', 'W', 'i', 'd', 't', 'h', '\0',
30152 : /* 4772 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', 'S', 't', 'y', 'l', 'e', '\0',
30153 : /* 4791 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', 'C', 'o', 'l', 'o', 'r', '\0',
30154 : /* 4810 */ 'w', 'o', 'r', 'd', 'W', 'r', 'a', 'p', '\0',
30155 : /* 4819 */ 'M', 'o', 'z', 'H', 'y', 'p', 'h', 'e', 'n', 's', '\0',
30156 : /* 4830 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
30157 : /* 4843 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'O', 'r', 'i', 'g', 'i', 'n', '\0',
30158 : /* 4862 */ 'M', 'o', 'z', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', '\0',
30159 : /* 4877 */ 'M', 'o', 'z', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', 'O', 'r', 'i', 'g', 'i', 'n', '\0',
30160 : /* 4898 */ 'M', 'o', 'z', 'B', 'a', 'c', 'k', 'f', 'a', 'c', 'e', 'V', 'i', 's', 'i', 'b', 'i', 'l', 'i', 't', 'y', '\0',
30161 : /* 4920 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'S', 't', 'y', 'l', 'e', '\0',
30162 : /* 4938 */ 'M', 'o', 'z', 'W', 'i', 'n', 'd', 'o', 'w', 'S', 'h', 'a', 'd', 'o', 'w', '\0',
30163 : /* 4954 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'S', 'i', 'z', 'e', '\0',
30164 : /* 4969 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'B', 'l', 'i', 'n', 'k', '\0',
30165 : /* 4982 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'l', 'o', 'r', '\0',
30166 : /* 5005 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', 'L', 'i', 'n', 'e', '\0',
30167 : /* 5027 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', 'S', 't', 'y', 'l', 'e', '\0',
30168 : /* 5050 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', '\0',
30169 : /* 5072 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\0',
30170 : /* 5094 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', 'D', 'e', 'l', 'a', 'y', '\0',
30171 : /* 5113 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', 'T', 'i', 'm', 'i', 'n', 'g', 'F', 'u', 'n', 'c', 't', 'i', 'o', 'n', '\0',
30172 : /* 5141 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', '\0',
30173 : /* 5155 */ 'p', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'v', 'e', 'n', 't', 's', '\0',
30174 : /* 5169 */ 'M', 'o', 'z', 'T', 'a', 'b', 'S', 'i', 'z', 'e', '\0',
30175 : /* 5180 */ 'r', 'e', 's', 'i', 'z', 'e', '\0',
30176 : /* 5187 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'N', 'a', 'm', 'e', '\0',
30177 : /* 5204 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\0',
30178 : /* 5225 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'D', 'e', 'l', 'a', 'y', '\0',
30179 : /* 5243 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'T', 'i', 'm', 'i', 'n', 'g', 'F', 'u', 'n', 'c', 't', 'i', 'o', 'n', '\0',
30180 : /* 5270 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
30181 : /* 5292 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'F', 'i', 'l', 'l', 'M', 'o', 'd', 'e', '\0',
30182 : /* 5313 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'I', 't', 'e', 'r', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'u', 'n', 't', '\0',
30183 : /* 5340 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'P', 'l', 'a', 'y', 'S', 't', 'a', 't', 'e', '\0',
30184 : /* 5362 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', '\0',
30185 : /* 5375 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'S', 'i', 'z', 'e', 'A', 'd', 'j', 'u', 's', 't', '\0',
30186 : /* 5393 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'I', 'm', 'a', 'g', 'e', 'S', 'o', 'u', 'r', 'c', 'e', '\0',
30187 : /* 5414 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'I', 'm', 'a', 'g', 'e', 'S', 'l', 'i', 'c', 'e', '\0',
30188 : /* 5434 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'I', 'm', 'a', 'g', 'e', 'W', 'i', 'd', 't', 'h', '\0',
30189 : /* 5454 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'I', 'm', 'a', 'g', 'e', 'O', 'u', 't', 's', 'e', 't', '\0',
30190 : /* 5475 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'I', 'm', 'a', 'g', 'e', 'R', 'e', 'p', 'e', 'a', 't', '\0',
30191 : /* 5496 */ 'c', 's', 's', 'T', 'e', 'x', 't', '\0',
30192 : /* 5504 */ 'g', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', 'V', 'a', 'l', 'u', 'e', '\0',
30193 : /* 5521 */ 'g', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', 'C', 'S', 'S', 'V', 'a', 'l', 'u', 'e', '\0',
30194 : /* 5541 */ 'r', 'e', 'm', 'o', 'v', 'e', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', '\0',
30195 : /* 5556 */ 'g', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\0',
30196 : /* 5576 */ 's', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', '\0',
30197 : /* 5588 */ 'p', 'a', 'r', 'e', 'n', 't', 'R', 'u', 'l', 'e', '\0',
30198 : /* 5599 */ 'a', 'd', 'd', 'E', 'v', 'e', 'n', 't', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\0',
30199 : /* 5616 */ 'r', 'e', 'm', 'o', 'v', 'e', 'E', 'v', 'e', 'n', 't', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\0',
30200 : /* 5636 */ 'd', 'i', 's', 'p', 'a', 't', 'c', 'h', 'E', 'v', 'e', 'n', 't', '\0',
30201 : /* 5650 */ 't', 'y', 'p', 'e', '\0',
30202 : /* 5655 */ 't', 'a', 'r', 'g', 'e', 't', '\0',
30203 : /* 5662 */ 'c', 'u', 'r', 'r', 'e', 'n', 't', 'T', 'a', 'r', 'g', 'e', 't', '\0',
30204 : /* 5676 */ 'e', 'v', 'e', 'n', 't', 'P', 'h', 'a', 's', 'e', '\0',
30205 : /* 5687 */ 'b', 'u', 'b', 'b', 'l', 'e', 's', '\0',
30206 : /* 5695 */ 'c', 'a', 'n', 'c', 'e', 'l', 'a', 'b', 'l', 'e', '\0',
30207 : /* 5706 */ 't', 'i', 'm', 'e', 'S', 't', 'a', 'm', 'p', '\0',
30208 : /* 5716 */ 's', 't', 'o', 'p', 'P', 'r', 'o', 'p', 'a', 'g', 'a', 't', 'i', 'o', 'n', '\0',
30209 : /* 5732 */ 'p', 'r', 'e', 'v', 'e', 'n', 't', 'D', 'e', 'f', 'a', 'u', 'l', 't', '\0',
30210 : /* 5747 */ 'i', 'n', 'i', 't', 'E', 'v', 'e', 'n', 't', '\0',
30211 : /* 5757 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'P', 'r', 'e', 'v', 'e', 'n', 't', 'e', 'd', '\0',
30212 : /* 5774 */ 's', 't', 'o', 'p', 'I', 'm', 'm', 'e', 'd', 'i', 'a', 't', 'e', 'P', 'r', 'o', 'p', 'a', 'g', 'a', 't', 'i', 'o', 'n', '\0',
30213 : /* 5799 */ 's', 'c', 'r', 'e', 'e', 'n', 'X', '\0',
30214 : /* 5807 */ 's', 'c', 'r', 'e', 'e', 'n', 'Y', '\0',
30215 : /* 5815 */ 'c', 'l', 'i', 'e', 'n', 't', 'X', '\0',
30216 : /* 5823 */ 'c', 'l', 'i', 'e', 'n', 't', 'Y', '\0',
30217 : /* 5831 */ 'c', 't', 'r', 'l', 'K', 'e', 'y', '\0',
30218 : /* 5839 */ 's', 'h', 'i', 'f', 't', 'K', 'e', 'y', '\0',
30219 : /* 5848 */ 'a', 'l', 't', 'K', 'e', 'y', '\0',
30220 : /* 5855 */ 'm', 'e', 't', 'a', 'K', 'e', 'y', '\0',
30221 : /* 5863 */ 'b', 'u', 't', 't', 'o', 'n', '\0',
30222 : /* 5870 */ 'r', 'e', 'l', 'a', 't', 'e', 'd', 'T', 'a', 'r', 'g', 'e', 't', '\0',
30223 : /* 5884 */ 'i', 'n', 'i', 't', 'M', 'o', 'u', 's', 'e', 'E', 'v', 'e', 'n', 't', '\0',
30224 : /* 5899 */ 'm', 'o', 'z', 'P', 'r', 'e', 's', 's', 'u', 'r', 'e', '\0',
30225 : /* 5911 */ 'm', 'o', 'z', 'I', 'n', 'p', 'u', 't', 'S', 'o', 'u', 'r', 'c', 'e', '\0',
30226 : /* 5926 */ 'i', 'n', 'i', 't', 'N', 'S', 'M', 'o', 'u', 's', 'e', 'E', 'v', 'e', 'n', 't', '\0',
30227 : /* 5943 */ 'c', 'h', 'a', 'r', 'C', 'o', 'd', 'e', '\0',
30228 : /* 5952 */ 'k', 'e', 'y', 'C', 'o', 'd', 'e', '\0',
30229 : /* 5960 */ 'i', 'n', 'i', 't', 'K', 'e', 'y', 'E', 'v', 'e', 'n', 't', '\0',
30230 : /* 5973 */ 'r', 'e', 'l', 'a', 't', 'e', 'd', 'N', 'o', 'd', 'e', '\0',
30231 : /* 5985 */ 'p', 'r', 'e', 'v', 'V', 'a', 'l', 'u', 'e', '\0',
30232 : /* 5995 */ 'n', 'e', 'w', 'V', 'a', 'l', 'u', 'e', '\0',
30233 : /* 6004 */ 'a', 't', 't', 'r', 'N', 'a', 'm', 'e', '\0',
30234 : /* 6013 */ 'a', 't', 't', 'r', 'C', 'h', 'a', 'n', 'g', 'e', '\0',
30235 : /* 6024 */ 'i', 'n', 'i', 't', 'M', 'u', 't', 'a', 't', 'i', 'o', 'n', 'E', 'v', 'e', 'n', 't', '\0',
30236 : /* 6042 */ 'd', 'a', 't', 'a', 'T', 'r', 'a', 'n', 's', 'f', 'e', 'r', '\0',
30237 : /* 6055 */ 'i', 'n', 'i', 't', 'D', 'r', 'a', 'g', 'E', 'v', 'e', 'n', 't', '\0',
30238 : /* 6069 */ 'x', '\0',
30239 : /* 6071 */ 'y', '\0',
30240 : /* 6073 */ 'i', 'n', 'i', 't', 'S', 'c', 'r', 'o', 'l', 'l', 'A', 'r', 'e', 'a', 'E', 'v', 'e', 'n', 't', '\0',
30241 : /* 6093 */ 'c', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', 's', '\0',
30242 : /* 6105 */ 'b', 'o', 'u', 'n', 'd', 'i', 'n', 'g', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', '\0',
30243 : /* 6124 */ 'p', 'a', 'i', 'n', 't', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\0',
30244 : /* 6138 */ 'o', 'r', 'i', 'g', 'i', 'n', '\0',
30245 : /* 6145 */ 'l', 'a', 's', 't', 'E', 'v', 'e', 'n', 't', 'I', 'd', '\0',
30246 : /* 6157 */ 's', 'o', 'u', 'r', 'c', 'e', '\0',
30247 : /* 6164 */ 'i', 'n', 'i', 't', 'M', 'e', 's', 's', 'a', 'g', 'e', 'E', 'v', 'e', 'n', 't', '\0',
30248 : /* 6181 */ 'a', 'x', 'i', 's', '\0',
30249 : /* 6186 */ 'i', 'n', 'i', 't', 'M', 'o', 'u', 's', 'e', 'S', 'c', 'r', 'o', 'l', 'l', 'E', 'v', 'e', 'n', 't', '\0',
30250 : /* 6207 */ 'l', 'e', 'n', 'g', 't', 'h', 'C', 'o', 'm', 'p', 'u', 't', 'a', 'b', 'l', 'e', '\0',
30251 : /* 6224 */ 'l', 'o', 'a', 'd', 'e', 'd', '\0',
30252 : /* 6231 */ 't', 'o', 't', 'a', 'l', '\0',
30253 : /* 6237 */ 'o', 'r', 'i', 'g', 'i', 'n', 'a', 'l', 'T', 'a', 'r', 'g', 'e', 't', '\0',
30254 : /* 6252 */ 'g', 'e', 't', 'P', 'r', 'e', 'v', 'e', 'n', 't', 'D', 'e', 'f', 'a', 'u', 'l', 't', '\0',
30255 : /* 6270 */ 'w', 'h', 'i', 'c', 'h', '\0',
30256 : /* 6276 */ 'r', 'a', 'n', 'g', 'e', 'P', 'a', 'r', 'e', 'n', 't', '\0',
30257 : /* 6288 */ 'r', 'a', 'n', 'g', 'e', 'O', 'f', 'f', 's', 'e', 't', '\0',
30258 : /* 6300 */ 'p', 'a', 'g', 'e', 'X', '\0',
30259 : /* 6306 */ 'p', 'a', 'g', 'e', 'Y', '\0',
30260 : /* 6312 */ 'i', 's', 'C', 'h', 'a', 'r', '\0',
30261 : /* 6319 */ 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', '\0',
30262 : /* 6330 */ 'r', 'a', 'd', 'i', 'u', 's', 'X', '\0',
30263 : /* 6338 */ 'r', 'a', 'd', 'i', 'u', 's', 'Y', '\0',
30264 : /* 6346 */ 'r', 'o', 't', 'a', 't', 'i', 'o', 'n', 'A', 'n', 'g', 'l', 'e', '\0',
30265 : /* 6360 */ 'f', 'o', 'r', 'c', 'e', '\0',
30266 : /* 6366 */ 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'd', 'T', 'o', 'u', 'c', 'h', '\0',
30267 : /* 6382 */ 't', 'o', 'u', 'c', 'h', 'e', 's', '\0',
30268 : /* 6390 */ 't', 'a', 'r', 'g', 'e', 't', 'T', 'o', 'u', 'c', 'h', 'e', 's', '\0',
30269 : /* 6404 */ 'c', 'h', 'a', 'n', 'g', 'e', 'd', 'T', 'o', 'u', 'c', 'h', 'e', 's', '\0',
30270 : /* 6419 */ 'i', 'n', 'i', 't', 'T', 'o', 'u', 'c', 'h', 'E', 'v', 'e', 'n', 't', '\0',
30271 : /* 6434 */ 'h', 'r', 'e', 'f', '\0',
30272 : /* 6439 */ 'r', 'e', 'l', '\0',
30273 : /* 6443 */ 't', 'e', 'x', 't', '\0',
30274 : /* 6448 */ 's', 'e', 'a', 'r', 'c', 'h', '\0',
30275 : /* 6455 */ 'h', 'a', 's', 'h', '\0',
30276 : /* 6460 */ 'f', 'o', 'r', 'm', '\0',
30277 : /* 6465 */ 'd', 'i', 's', 'a', 'b', 'l', 'e', 'd', '\0',
30278 : /* 6474 */ 'l', 'a', 'b', 'e', 'l', '\0',
30279 : /* 6480 */ 'i', 'c', 'o', 'n', '\0',
30280 : /* 6485 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'C', 'h', 'e', 'c', 'k', 'e', 'd', '\0',
30281 : /* 6500 */ 'c', 'h', 'e', 'c', 'k', 'e', 'd', '\0',
30282 : /* 6508 */ 'r', 'a', 'd', 'i', 'o', 'g', 'r', 'o', 'u', 'p', '\0',
30283 : /* 6519 */ 'b', 'o', 'd', 'y', '\0',
30284 : /* 6524 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'N', 'a', 'm', 'e', '\0',
30285 : /* 6542 */ 'a', 'n', 'c', 'h', 'o', 'r', 's', '\0',
30286 : /* 6550 */ 'l', 'i', 'n', 'k', 's', '\0',
30287 : /* 6556 */ 'U', 'R', 'L', '\0',
30288 : /* 6560 */ 'f', 'o', 'r', 'm', 's', '\0',
30289 : /* 6566 */ 'c', 'o', 'o', 'k', 'i', 'e', '\0',
30290 : /* 6573 */ 'i', 'm', 'a', 'g', 'e', 's', '\0',
30291 : /* 6580 */ 'w', 'r', 'i', 't', 'e', '\0',
30292 : /* 6586 */ 'w', 'r', 'i', 't', 'e', 'l', 'n', '\0',
30293 : /* 6594 */ 'd', 'o', 'm', 'a', 'i', 'n', '\0',
30294 : /* 6601 */ 'd', 'e', 's', 'i', 'g', 'n', 'M', 'o', 'd', 'e', '\0',
30295 : /* 6612 */ 'h', 'e', 'a', 'd', '\0',
30296 : /* 6617 */ 'i', 'd', '\0',
30297 : /* 6620 */ 'l', 'a', 'n', 'g', '\0',
30298 : /* 6625 */ 'd', 'i', 'r', '\0',
30299 : /* 6629 */ 'c', 'l', 'a', 's', 's', 'N', 'a', 'm', 'e', '\0',
30300 : /* 6639 */ 'd', 'a', 't', 'a', 's', 'e', 't', '\0',
30301 : /* 6647 */ 'h', 'i', 'd', 'd', 'e', 'n', '\0',
30302 : /* 6654 */ 'c', 'l', 'i', 'c', 'k', '\0',
30303 : /* 6660 */ 't', 'a', 'b', 'I', 'n', 'd', 'e', 'x', '\0',
30304 : /* 6669 */ 'f', 'o', 'c', 'u', 's', '\0',
30305 : /* 6675 */ 'b', 'l', 'u', 'r', '\0',
30306 : /* 6680 */ 'a', 'c', 'c', 'e', 's', 's', 'K', 'e', 'y', '\0',
30307 : /* 6690 */ 'a', 'c', 'c', 'e', 's', 's', 'K', 'e', 'y', 'L', 'a', 'b', 'e', 'l', '\0',
30308 : /* 6705 */ 'd', 'r', 'a', 'g', 'g', 'a', 'b', 'l', 'e', '\0',
30309 : /* 6715 */ 'c', 'o', 'n', 't', 'e', 'n', 't', 'E', 'd', 'i', 't', 'a', 'b', 'l', 'e', '\0',
30310 : /* 6731 */ 'i', 's', 'C', 'o', 'n', 't', 'e', 'n', 't', 'E', 'd', 'i', 't', 'a', 'b', 'l', 'e', '\0',
30311 : /* 6749 */ 'c', 'o', 'n', 't', 'e', 'x', 't', 'M', 'e', 'n', 'u', '\0',
30312 : /* 6761 */ 's', 'p', 'e', 'l', 'l', 'c', 'h', 'e', 'c', 'k', '\0',
30313 : /* 6772 */ 'i', 'n', 'n', 'e', 'r', 'H', 'T', 'M', 'L', '\0',
30314 : /* 6782 */ 'o', 'u', 't', 'e', 'r', 'H', 'T', 'M', 'L', '\0',
30315 : /* 6792 */ 'i', 'n', 's', 'e', 'r', 't', 'A', 'd', 'j', 'a', 'c', 'e', 'n', 't', 'H', 'T', 'M', 'L', '\0',
30316 : /* 6811 */ 's', 'c', 'r', 'o', 'l', 'l', 'I', 'n', 't', 'o', 'V', 'i', 'e', 'w', '\0',
30317 : /* 6826 */ 'o', 'f', 'f', 's', 'e', 't', 'P', 'a', 'r', 'e', 'n', 't', '\0',
30318 : /* 6839 */ 'o', 'f', 'f', 's', 'e', 't', 'T', 'o', 'p', '\0',
30319 : /* 6849 */ 'o', 'f', 'f', 's', 'e', 't', 'L', 'e', 'f', 't', '\0',
30320 : /* 6860 */ 'o', 'f', 'f', 's', 'e', 't', 'W', 'i', 'd', 't', 'h', '\0',
30321 : /* 6872 */ 'o', 'f', 'f', 's', 'e', 't', 'H', 'e', 'i', 'g', 'h', 't', '\0',
30322 : /* 6885 */ 'm', 'o', 'z', 'R', 'e', 'q', 'u', 'e', 's', 't', 'F', 'u', 'l', 'l', 'S', 'c', 'r', 'e', 'e', 'n', '\0',
30323 : /* 6906 */ 'e', 'l', 'e', 'm', 'e', 'n', 't', 's', '\0',
30324 : /* 6915 */ 's', 'u', 'b', 'm', 'i', 't', '\0',
30325 : /* 6922 */ 'a', 'c', 't', 'i', 'o', 'n', '\0',
30326 : /* 6929 */ 's', 'r', 'c', '\0',
30327 : /* 6933 */ 'c', 'o', 'n', 't', 'e', 'n', 't', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
30328 : /* 6949 */ 'c', 'o', 'n', 't', 'e', 'n', 't', 'W', 'i', 'n', 'd', 'o', 'w', '\0',
30329 : /* 6963 */ 'r', 'o', 'w', 's', '\0',
30330 : /* 6968 */ 'c', 'o', 'l', 's', '\0',
30331 : /* 6973 */ 'c', 'o', 'm', 'p', 'l', 'e', 't', 'e', '\0',
30332 : /* 6982 */ 's', 'e', 'l', 'e', 'c', 't', '\0',
30333 : /* 6989 */ 'f', 'i', 'l', 'e', 's', '\0',
30334 : /* 6995 */ 't', 'e', 'x', 't', 'L', 'e', 'n', 'g', 't', 'h', '\0',
30335 : /* 7006 */ 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'S', 't', 'a', 'r', 't', '\0',
30336 : /* 7021 */ 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'E', 'n', 'd', '\0',
30337 : /* 7034 */ 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
30338 : /* 7053 */ 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', '\0',
30339 : /* 7071 */ 'c', 'o', 'm', 'p', 'a', 'c', 't', '\0',
30340 : /* 7079 */ 'i', 'n', 'd', 'e', 'x', '\0',
30341 : /* 7085 */ 's', 'e', 'l', 'e', 'c', 't', 'e', 'd', '\0',
30342 : /* 7094 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'S', 'e', 'l', 'e', 'c', 't', 'e', 'd', '\0',
30343 : /* 7110 */ 's', 'e', 'l', 'e', 'c', 't', 'e', 'd', 'I', 'n', 'd', 'e', 'x', '\0',
30344 : /* 7124 */ 'm', 'a', 'x', '\0',
30345 : /* 7128 */ 'o', 'p', 't', 'i', 'o', 'n', 's', '\0',
30346 : /* 7136 */ 'c', 'o', 'l', 'S', 'p', 'a', 'n', '\0',
30347 : /* 7144 */ 'h', 'e', 'a', 'd', 'e', 'r', 's', '\0',
30348 : /* 7152 */ 'c', 'e', 'l', 'l', 'I', 'n', 'd', 'e', 'x', '\0',
30349 : /* 7162 */ 'r', 'o', 'w', 'S', 'p', 'a', 'n', '\0',
30350 : /* 7170 */ 'a', 'b', 'b', 'r', '\0',
30351 : /* 7175 */ 's', 'c', 'o', 'p', 'e', '\0',
30352 : /* 7181 */ 'n', 'o', 'W', 'r', 'a', 'p', '\0',
30353 : /* 7188 */ 's', 'p', 'a', 'n', '\0',
30354 : /* 7193 */ 'd', 'e', 'l', 'e', 't', 'e', 'R', 'o', 'w', '\0',
30355 : /* 7203 */ 's', 'u', 'm', 'm', 'a', 'r', 'y', '\0',
30356 : /* 7211 */ 'i', 'n', 's', 'e', 'r', 't', 'R', 'o', 'w', '\0',
30357 : /* 7221 */ 's', 'e', 'c', 't', 'i', 'o', 'n', 'R', 'o', 'w', 'I', 'n', 'd', 'e', 'x', '\0',
30358 : /* 7237 */ 'r', 'o', 'w', 'I', 'n', 'd', 'e', 'x', '\0',
30359 : /* 7246 */ 'c', 'e', 'l', 'l', 's', '\0',
30360 : /* 7252 */ 'd', 'e', 'l', 'e', 't', 'e', 'C', 'e', 'l', 'l', '\0',
30361 : /* 7263 */ 'i', 'n', 's', 'e', 'r', 't', 'C', 'e', 'l', 'l', '\0',
30362 : /* 7274 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\0',
30363 : /* 7287 */ 'w', 'r', 'a', 'p', '\0',
30364 : /* 7292 */ 'g', 'e', 't', 'C', 'o', 'n', 't', 'e', 'x', 't', '\0',
30365 : /* 7303 */ 't', 'o', 'D', 'a', 't', 'a', 'U', 'R', 'L', '\0',
30366 : /* 7313 */ 's', 't', 'a', 'r', 't', 'C', 'o', 'n', 't', 'a', 'i', 'n', 'e', 'r', '\0',
30367 : /* 7328 */ 's', 't', 'a', 'r', 't', 'O', 'f', 'f', 's', 'e', 't', '\0',
30368 : /* 7340 */ 'e', 'n', 'd', 'C', 'o', 'n', 't', 'a', 'i', 'n', 'e', 'r', '\0',
30369 : /* 7353 */ 'e', 'n', 'd', 'O', 'f', 'f', 's', 'e', 't', '\0',
30370 : /* 7363 */ 'c', 'o', 'l', 'l', 'a', 'p', 's', 'e', 'd', '\0',
30371 : /* 7373 */ 'c', 'o', 'm', 'm', 'o', 'n', 'A', 'n', 'c', 'e', 's', 't', 'o', 'r', 'C', 'o', 'n', 't', 'a', 'i', 'n', 'e', 'r', '\0',
30372 : /* 7397 */ 's', 'e', 't', 'S', 't', 'a', 'r', 't', '\0',
30373 : /* 7406 */ 's', 'e', 't', 'E', 'n', 'd', '\0',
30374 : /* 7413 */ 's', 'e', 't', 'S', 't', 'a', 'r', 't', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
30375 : /* 7428 */ 's', 'e', 't', 'S', 't', 'a', 'r', 't', 'A', 'f', 't', 'e', 'r', '\0',
30376 : /* 7442 */ 's', 'e', 't', 'E', 'n', 'd', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
30377 : /* 7455 */ 's', 'e', 't', 'E', 'n', 'd', 'A', 'f', 't', 'e', 'r', '\0',
30378 : /* 7467 */ 'c', 'o', 'l', 'l', 'a', 'p', 's', 'e', '\0',
30379 : /* 7476 */ 's', 'e', 'l', 'e', 'c', 't', 'N', 'o', 'd', 'e', '\0',
30380 : /* 7487 */ 's', 'e', 'l', 'e', 'c', 't', 'N', 'o', 'd', 'e', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30381 : /* 7506 */ 'c', 'o', 'm', 'p', 'a', 'r', 'e', 'B', 'o', 'u', 'n', 'd', 'a', 'r', 'y', 'P', 'o', 'i', 'n', 't', 's', '\0',
30382 : /* 7528 */ 'd', 'e', 'l', 'e', 't', 'e', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30383 : /* 7543 */ 'e', 'x', 't', 'r', 'a', 'c', 't', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30384 : /* 7559 */ 'c', 'l', 'o', 'n', 'e', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30385 : /* 7573 */ 'i', 'n', 's', 'e', 'r', 't', 'N', 'o', 'd', 'e', '\0',
30386 : /* 7584 */ 's', 'u', 'r', 'r', 'o', 'u', 'n', 'd', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30387 : /* 7601 */ 'c', 'l', 'o', 'n', 'e', 'R', 'a', 'n', 'g', 'e', '\0',
30388 : /* 7612 */ 'd', 'e', 't', 'a', 'c', 'h', '\0',
30389 : /* 7619 */ 'c', 'r', 'e', 'a', 't', 'e', 'C', 'o', 'n', 't', 'e', 'x', 't', 'u', 'a', 'l', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', '\0',
30390 : /* 7644 */ 'i', 's', 'P', 'o', 'i', 'n', 't', 'I', 'n', 'R', 'a', 'n', 'g', 'e', '\0',
30391 : /* 7659 */ 'c', 'o', 'm', 'p', 'a', 'r', 'e', 'P', 'o', 'i', 'n', 't', '\0',
30392 : /* 7672 */ 's', 'e', 't', 'I', 't', 'e', 'm', '\0',
30393 : /* 7680 */ 'g', 'e', 't', 'I', 't', 'e', 'm', '\0',
30394 : /* 7688 */ 'k', 'e', 'y', '\0',
30395 : /* 7692 */ 'r', 'e', 'm', 'o', 'v', 'e', 'I', 't', 'e', 'm', '\0',
30396 : /* 7703 */ 'g', 'e', 't', 'P', 'r', 'e', 's', 'e', 'n', 't', 'a', 't', 'i', 'o', 'n', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
30397 : /* 7728 */ 'n', 'e', 'x', 't', 'N', 'o', 'd', 'e', '\0',
30398 : /* 7737 */ 'e', 'v', 'a', 'l', 'u', 'a', 't', 'e', '\0',
30399 : /* 7746 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'x', 'p', 'r', 'e', 's', 's', 'i', 'o', 'n', '\0',
30400 : /* 7763 */ 'c', 'r', 'e', 'a', 't', 'e', 'N', 'S', 'R', 'e', 's', 'o', 'l', 'v', 'e', 'r', '\0',
30401 : /* 7780 */ 's', 'n', 'a', 'p', 's', 'h', 'o', 't', 'I', 't', 'e', 'm', '\0',
30402 : /* 7793 */ 'i', 't', 'e', 'r', 'a', 't', 'e', 'N', 'e', 'x', 't', '\0',
30403 : /* 7805 */ 's', 'n', 'a', 'p', 's', 'h', 'o', 't', 'L', 'e', 'n', 'g', 't', 'h', '\0',
30404 : /* 7820 */ 'r', 'e', 's', 'u', 'l', 't', 'T', 'y', 'p', 'e', '\0',
30405 : /* 7831 */ 'n', 'u', 'm', 'b', 'e', 'r', 'V', 'a', 'l', 'u', 'e', '\0',
30406 : /* 7843 */ 's', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\0',
30407 : /* 7855 */ 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'V', 'a', 'l', 'u', 'e', '\0',
30408 : /* 7868 */ 's', 'i', 'n', 'g', 'l', 'e', 'N', 'o', 'd', 'e', 'V', 'a', 'l', 'u', 'e', '\0',
30409 : /* 7884 */ 'e', 'v', 'a', 'l', 'u', 'a', 't', 'e', 'W', 'i', 't', 'h', 'C', 'o', 'n', 't', 'e', 'x', 't', '\0',
30410 : /* 7904 */ 'a', 'l', 'i', 'g', 'n', '\0',
30411 : /* 7910 */ 'f', 'l', 'e', 'x', '\0',
30412 : /* 7915 */ 'f', 'l', 'e', 'x', 'G', 'r', 'o', 'u', 'p', '\0',
30413 : /* 7925 */ 'o', 'r', 'd', 'i', 'n', 'a', 'l', '\0',
30414 : /* 7933 */ 'o', 'r', 'i', 'e', 'n', 't', '\0',
30415 : /* 7940 */ 'p', 'a', 'c', 'k', '\0',
30416 : /* 7945 */ 'o', 'b', 's', 'e', 'r', 'v', 'e', 's', '\0',
30417 : /* 7954 */ 'm', 'e', 'n', 'u', '\0',
30418 : /* 7959 */ 't', 'o', 'o', 'l', 't', 'i', 'p', '\0',
30419 : /* 7967 */ 'p', 'e', 'r', 's', 'i', 's', 't', '\0',
30420 : /* 7975 */ 'd', 'a', 't', 'a', 's', 'o', 'u', 'r', 'c', 'e', 's', '\0',
30421 : /* 7987 */ 'r', 'e', 'f', '\0',
30422 : /* 7991 */ 't', 'o', 'o', 'l', 't', 'i', 'p', 'T', 'e', 'x', 't', '\0',
30423 : /* 8003 */ 's', 't', 'a', 't', 'u', 's', 'T', 'e', 'x', 't', '\0',
30424 : /* 8014 */ 'a', 'l', 'l', 'o', 'w', 'E', 'v', 'e', 'n', 't', 's', '\0',
30425 : /* 8026 */ 'd', 'a', 't', 'a', 'b', 'a', 's', 'e', '\0',
30426 : /* 8035 */ 'b', 'u', 'i', 'l', 'd', 'e', 'r', '\0',
30427 : /* 8043 */ 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\0',
30428 : /* 8052 */ 'c', 'o', 'n', 't', 'r', 'o', 'l', 'l', 'e', 'r', 's', '\0',
30429 : /* 8064 */ 'b', 'o', 'x', 'O', 'b', 'j', 'e', 'c', 't', '\0',
30430 : /* 8074 */ 'd', 'o', 'C', 'o', 'm', 'm', 'a', 'n', 'd', '\0',
30431 : /* 8084 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
30432 : /* 8107 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
30433 : /* 8132 */ 'r', 'e', 'a', 'd', 'A', 's', 'A', 'r', 'r', 'a', 'y', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30434 : /* 8150 */ 'r', 'e', 'a', 'd', 'A', 's', 'B', 'i', 'n', 'a', 'r', 'y', 'S', 't', 'r', 'i', 'n', 'g', '\0',
30435 : /* 8169 */ 'r', 'e', 'a', 'd', 'A', 's', 'T', 'e', 'x', 't', '\0',
30436 : /* 8180 */ 'r', 'e', 'a', 'd', 'A', 's', 'D', 'a', 't', 'a', 'U', 'R', 'L', '\0',
30437 : /* 8194 */ 'a', 'b', 'o', 'r', 't', '\0',
30438 : /* 8200 */ 'r', 'e', 'a', 'd', 'y', 'S', 't', 'a', 't', 'e', '\0',
30439 : /* 8211 */ 'r', 'e', 's', 'u', 'l', 't', '\0',
30440 : /* 8218 */ 'e', 'r', 'r', 'o', 'r', '\0',
30441 : /* 8224 */ 'o', 'n', 'l', 'o', 'a', 'd', 's', 't', 'a', 'r', 't', '\0',
30442 : /* 8236 */ 'o', 'n', 'p', 'r', 'o', 'g', 'r', 'e', 's', 's', '\0',
30443 : /* 8247 */ 'o', 'n', 'l', 'o', 'a', 'd', '\0',
30444 : /* 8254 */ 'o', 'n', 'a', 'b', 'o', 'r', 't', '\0',
30445 : /* 8262 */ 'o', 'n', 'e', 'r', 'r', 'o', 'r', '\0',
30446 : /* 8270 */ 'o', 'n', 'l', 'o', 'a', 'd', 'e', 'n', 'd', '\0',
30447 : /* 8280 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'X', 'M', 'L', '\0',
30448 : /* 8292 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'T', 'e', 'x', 't', '\0',
30449 : /* 8305 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'T', 'y', 'p', 'e', '\0',
30450 : /* 8318 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '\0',
30451 : /* 8327 */ 's', 't', 'a', 't', 'u', 's', '\0',
30452 : /* 8334 */ 'o', 'p', 'e', 'n', '\0',
30453 : /* 8339 */ 's', 'e', 'n', 'd', '\0',
30454 : /* 8344 */ 's', 'e', 'n', 'd', 'A', 's', 'B', 'i', 'n', 'a', 'r', 'y', '\0',
30455 : /* 8357 */ 't', 'i', 'm', 'e', 'o', 'u', 't', '\0',
30456 : /* 8365 */ 'm', 'u', 'l', 't', 'i', 'p', 'a', 'r', 't', '\0',
30457 : /* 8375 */ 'm', 'o', 'z', 'B', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'R', 'e', 'q', 'u', 'e', 's', 't', '\0',
30458 : /* 8396 */ 'w', 'i', 't', 'h', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\0',
30459 : /* 8412 */ 'u', 'r', 'l', '\0',
30460 : /* 8416 */ 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '\0',
30461 : /* 8427 */ 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\0',
30462 : /* 8436 */ 'b', 'u', 'f', 'f', 'e', 'r', 'e', 'd', 'A', 'm', 'o', 'u', 'n', 't', '\0',
30463 : /* 8451 */ 'b', 'i', 'n', 'a', 'r', 'y', 'T', 'y', 'p', 'e', '\0',
30464 : /* 8462 */ 'o', 'n', 'o', 'p', 'e', 'n', '\0',
30465 : /* 8469 */ 'o', 'n', 'm', 'e', 's', 's', 'a', 'g', 'e', '\0',
30466 : /* 8479 */ 'o', 'n', 'c', 'l', 'o', 's', 'e', '\0',
30467 : /* 8487 */ 'c', 'l', 'o', 's', 'e', '\0',
30468 : /* 8493 */ 'a', 'c', 't', 'i', 'v', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30469 : /* 8507 */ 'a', 't', 't', 'a', 'c', 'h', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30470 : /* 8520 */ 'b', 'i', 'n', 'd', 'A', 't', 't', 'r', 'i', 'b', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\0',
30471 : /* 8539 */ 'b', 'i', 'n', 'd', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30472 : /* 8550 */ 'b', 'i', 'n', 'd', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30473 : /* 8566 */ 'b', 'i', 'n', 'd', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30474 : /* 8583 */ 'b', 'i', 'n', 'd', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30475 : /* 8595 */ 'b', 'l', 'e', 'n', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
30476 : /* 8606 */ 'b', 'l', 'e', 'n', 'd', 'E', 'q', 'u', 'a', 't', 'i', 'o', 'n', '\0',
30477 : /* 8620 */ 'b', 'l', 'e', 'n', 'd', 'E', 'q', 'u', 'a', 't', 'i', 'o', 'n', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30478 : /* 8642 */ 'b', 'l', 'e', 'n', 'd', 'F', 'u', 'n', 'c', '\0',
30479 : /* 8652 */ 'b', 'l', 'e', 'n', 'd', 'F', 'u', 'n', 'c', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30480 : /* 8670 */ 'b', 'u', 'f', 'f', 'e', 'r', 'D', 'a', 't', 'a', '\0',
30481 : /* 8681 */ 'b', 'u', 'f', 'f', 'e', 'r', 'S', 'u', 'b', 'D', 'a', 't', 'a', '\0',
30482 : /* 8695 */ 'c', 'h', 'e', 'c', 'k', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', 'S', 't', 'a', 't', 'u', 's', '\0',
30483 : /* 8718 */ 'c', 'l', 'e', 'a', 'r', 'C', 'o', 'l', 'o', 'r', '\0',
30484 : /* 8729 */ 'c', 'l', 'e', 'a', 'r', 'D', 'e', 'p', 't', 'h', '\0',
30485 : /* 8740 */ 'c', 'l', 'e', 'a', 'r', 'S', 't', 'e', 'n', 'c', 'i', 'l', '\0',
30486 : /* 8753 */ 'c', 'o', 'l', 'o', 'r', 'M', 'a', 's', 'k', '\0',
30487 : /* 8763 */ 'c', 'o', 'm', 'p', 'i', 'l', 'e', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30488 : /* 8777 */ 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30489 : /* 8798 */ 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30490 : /* 8822 */ 'c', 'o', 'p', 'y', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30491 : /* 8837 */ 'c', 'o', 'p', 'y', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30492 : /* 8855 */ 'c', 'r', 'e', 'a', 't', 'e', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30493 : /* 8868 */ 'c', 'r', 'e', 'a', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30494 : /* 8882 */ 'c', 'r', 'e', 'a', 't', 'e', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30495 : /* 8900 */ 'c', 'r', 'e', 'a', 't', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30496 : /* 8919 */ 'c', 'r', 'e', 'a', 't', 'e', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30497 : /* 8932 */ 'c', 'r', 'e', 'a', 't', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30498 : /* 8946 */ 'c', 'u', 'l', 'l', 'F', 'a', 'c', 'e', '\0',
30499 : /* 8955 */ 'd', 'e', 'l', 'e', 't', 'e', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30500 : /* 8968 */ 'd', 'e', 'l', 'e', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30501 : /* 8982 */ 'd', 'e', 'l', 'e', 't', 'e', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30502 : /* 9000 */ 'd', 'e', 'l', 'e', 't', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30503 : /* 9019 */ 'd', 'e', 'l', 'e', 't', 'e', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30504 : /* 9032 */ 'd', 'e', 'l', 'e', 't', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30505 : /* 9046 */ 'd', 'e', 'p', 't', 'h', 'F', 'u', 'n', 'c', '\0',
30506 : /* 9056 */ 'd', 'e', 'p', 't', 'h', 'M', 'a', 's', 'k', '\0',
30507 : /* 9066 */ 'd', 'e', 'p', 't', 'h', 'R', 'a', 'n', 'g', 'e', '\0',
30508 : /* 9077 */ 'd', 'e', 't', 'a', 'c', 'h', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30509 : /* 9090 */ 'd', 'i', 's', 'a', 'b', 'l', 'e', '\0',
30510 : /* 9098 */ 'd', 'i', 's', 'a', 'b', 'l', 'e', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'A', 'r', 'r', 'a', 'y', '\0',
30511 : /* 9123 */ 'd', 'r', 'a', 'w', 'A', 'r', 'r', 'a', 'y', 's', '\0',
30512 : /* 9134 */ 'd', 'r', 'a', 'w', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', '\0',
30513 : /* 9147 */ 'e', 'n', 'a', 'b', 'l', 'e', '\0',
30514 : /* 9154 */ 'e', 'n', 'a', 'b', 'l', 'e', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'A', 'r', 'r', 'a', 'y', '\0',
30515 : /* 9178 */ 'f', 'i', 'n', 'i', 's', 'h', '\0',
30516 : /* 9185 */ 'f', 'l', 'u', 's', 'h', '\0',
30517 : /* 9191 */ 'f', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30518 : /* 9215 */ 'f', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', 'T', 'e', 'x', 't', 'u', 'r', 'e', '2', 'D', '\0',
30519 : /* 9236 */ 'f', 'r', 'o', 'n', 't', 'F', 'a', 'c', 'e', '\0',
30520 : /* 9246 */ 'g', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'M', 'i', 'p', 'm', 'a', 'p', '\0',
30521 : /* 9261 */ 'g', 'e', 't', 'A', 'c', 't', 'i', 'v', 'e', 'A', 't', 't', 'r', 'i', 'b', '\0',
30522 : /* 9277 */ 'g', 'e', 't', 'A', 'c', 't', 'i', 'v', 'e', 'U', 'n', 'i', 'f', 'o', 'r', 'm', '\0',
30523 : /* 9294 */ 'g', 'e', 't', 'A', 't', 't', 'a', 'c', 'h', 'e', 'd', 'S', 'h', 'a', 'd', 'e', 'r', 's', '\0',
30524 : /* 9313 */ 'g', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\0',
30525 : /* 9331 */ 'g', 'e', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30526 : /* 9344 */ 'g', 'e', 't', 'B', 'u', 'f', 'f', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30527 : /* 9363 */ 'g', 'e', 't', 'E', 'r', 'r', 'o', 'r', '\0',
30528 : /* 9372 */ 'g', 'e', 't', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', 'A', 't', 't', 'a', 'c', 'h', 'm', 'e', 'n', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30529 : /* 9406 */ 'g', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30530 : /* 9426 */ 'g', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'I', 'n', 'f', 'o', 'L', 'o', 'g', '\0',
30531 : /* 9444 */ 'g', 'e', 't', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30532 : /* 9469 */ 'g', 'e', 't', 'S', 'h', 'a', 'd', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30533 : /* 9488 */ 'g', 'e', 't', 'S', 'h', 'a', 'd', 'e', 'r', 'I', 'n', 'f', 'o', 'L', 'o', 'g', '\0',
30534 : /* 9505 */ 'g', 'e', 't', 'S', 'h', 'a', 'd', 'e', 'r', 'P', 'r', 'e', 'c', 'i', 's', 'i', 'o', 'n', 'F', 'o', 'r', 'm', 'a', 't', '\0',
30535 : /* 9530 */ 'g', 'e', 't', 'S', 'h', 'a', 'd', 'e', 'r', 'S', 'o', 'u', 'r', 'c', 'e', '\0',
30536 : /* 9546 */ 'g', 'e', 't', 'T', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30537 : /* 9562 */ 'g', 'e', 't', 'U', 'n', 'i', 'f', 'o', 'r', 'm', '\0',
30538 : /* 9573 */ 'g', 'e', 't', 'U', 'n', 'i', 'f', 'o', 'r', 'm', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\0',
30539 : /* 9592 */ 'g', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '\0',
30540 : /* 9608 */ 'g', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'O', 'f', 'f', 's', 'e', 't', '\0',
30541 : /* 9630 */ 'h', 'i', 'n', 't', '\0',
30542 : /* 9635 */ 'i', 's', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30543 : /* 9644 */ 'i', 's', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30544 : /* 9658 */ 'i', 's', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30545 : /* 9668 */ 'i', 's', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30546 : /* 9683 */ 'i', 's', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30547 : /* 9692 */ 'i', 's', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30548 : /* 9702 */ 'i', 's', 'E', 'n', 'a', 'b', 'l', 'e', 'd', '\0',
30549 : /* 9712 */ 'l', 'i', 'n', 'k', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30550 : /* 9724 */ 'p', 'i', 'x', 'e', 'l', 'S', 't', 'o', 'r', 'e', 'i', '\0',
30551 : /* 9736 */ 'p', 'o', 'l', 'y', 'g', 'o', 'n', 'O', 'f', 'f', 's', 'e', 't', '\0',
30552 : /* 9750 */ 'r', 'e', 'a', 'd', 'P', 'i', 'x', 'e', 'l', 's', '\0',
30553 : /* 9761 */ 'r', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', 'S', 't', 'o', 'r', 'a', 'g', 'e', '\0',
30554 : /* 9781 */ 's', 'a', 'm', 'p', 'l', 'e', 'C', 'o', 'v', 'e', 'r', 'a', 'g', 'e', '\0',
30555 : /* 9796 */ 's', 'c', 'i', 's', 's', 'o', 'r', '\0',
30556 : /* 9804 */ 's', 'h', 'a', 'd', 'e', 'r', 'S', 'o', 'u', 'r', 'c', 'e', '\0',
30557 : /* 9817 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'F', 'u', 'n', 'c', '\0',
30558 : /* 9829 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'F', 'u', 'n', 'c', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30559 : /* 9849 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'M', 'a', 's', 'k', '\0',
30560 : /* 9861 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'M', 'a', 's', 'k', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30561 : /* 9881 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'O', 'p', '\0',
30562 : /* 9891 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'O', 'p', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30563 : /* 9909 */ 't', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30564 : /* 9920 */ 't', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30565 : /* 9934 */ 't', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', '\0',
30566 : /* 9948 */ 't', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', '\0',
30567 : /* 9962 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'f', '\0',
30568 : /* 9972 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'i', '\0',
30569 : /* 9982 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'f', '\0',
30570 : /* 9992 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'i', '\0',
30571 : /* 10002 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'f', '\0',
30572 : /* 10012 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'i', '\0',
30573 : /* 10022 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'f', '\0',
30574 : /* 10032 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'i', '\0',
30575 : /* 10042 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'f', 'v', '\0',
30576 : /* 10053 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'i', 'v', '\0',
30577 : /* 10064 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'f', 'v', '\0',
30578 : /* 10075 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'i', 'v', '\0',
30579 : /* 10086 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'f', 'v', '\0',
30580 : /* 10097 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'i', 'v', '\0',
30581 : /* 10108 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'f', 'v', '\0',
30582 : /* 10119 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'i', 'v', '\0',
30583 : /* 10130 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', 'M', 'a', 't', 'r', 'i', 'x', '2', 'f', 'v', '\0',
30584 : /* 10147 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', 'M', 'a', 't', 'r', 'i', 'x', '3', 'f', 'v', '\0',
30585 : /* 10164 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', 'M', 'a', 't', 'r', 'i', 'x', '4', 'f', 'v', '\0',
30586 : /* 10181 */ 'u', 's', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30587 : /* 10192 */ 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30588 : /* 10208 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'f', '\0',
30589 : /* 10223 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'f', '\0',
30590 : /* 10238 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'f', '\0',
30591 : /* 10253 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'f', '\0',
30592 : /* 10268 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'f', 'v', '\0',
30593 : /* 10284 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'f', 'v', '\0',
30594 : /* 10300 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'f', 'v', '\0',
30595 : /* 10316 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'f', 'v', '\0',
30596 : /* 10332 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'P', 'o', 'i', 'n', 't', 'e', 'r', '\0',
30597 : /* 10352 */ 'v', 'i', 'e', 'w', 'p', 'o', 'r', 't', '\0',
30598 : /* 10361 */ 'g', 'e', 't', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\0',
30599 : /* 10374 */ 'g', 'e', 't', 'S', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '\0',
30600 : /* 10397 */ 'i', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'L', 'o', 's', 't', '\0',
30601 : /* 10411 */ 'd', 'r', 'a', 'w', 'i', 'n', 'g', 'B', 'u', 'f', 'f', 'e', 'r', 'W', 'i', 'd', 't', 'h', '\0',
30602 : /* 10430 */ 'd', 'r', 'a', 'w', 'i', 'n', 'g', 'B', 'u', 'f', 'f', 'e', 'r', 'H', 'e', 'i', 'g', 'h', 't', '\0',
30603 : /* 10450 */ 'f', 'r', 'a', 'm', 'e', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30604 : /* 10462 */ 't', 'i', 'm', 'e', '\0',
30605 : /* 10467 */ 'm', 'o', 'z', 'W', 'r', 'i', 't', 'e', 'A', 'u', 'd', 'i', 'o', '\0',
30606 : /* 10481 */ 'p', 'r', 'i', 'm', 'a', 'r', 'y', 'K', 'e', 'y', '\0',
30607 : /* 10492 */ 'c', 'o', 'n', 't', 'i', 'n', 'u', 'e', '\0',
30608 : /* 10501 */ 'u', 'p', 'd', 'a', 't', 'e', '\0',
30609 : /* 10508 */ 'd', 'e', 'l', 'e', 't', 'e', '\0',
30610 : /* 10515 */ 'a', 'd', 'v', 'a', 'n', 'c', 'e', '\0',
30611 : /* 10523 */ 'v', 'e', 'r', 's', 'i', 'o', 'n', '\0',
30612 : /* 10531 */ 'o', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', 'N', 'a', 'm', 'e', 's', '\0',
30613 : /* 10548 */ 'c', 'r', 'e', 'a', 't', 'e', 'O', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', '\0',
30614 : /* 10566 */ 'd', 'e', 'l', 'e', 't', 'e', 'O', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', '\0',
30615 : /* 10584 */ 't', 'r', 'a', 'n', 's', 'a', 'c', 't', 'i', 'o', 'n', '\0',
30616 : /* 10596 */ 'o', 'n', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'c', 'h', 'a', 'n', 'g', 'e', '\0',
30617 : /* 10612 */ 'c', 'o', 'd', 'e', '\0',
30618 : /* 10617 */ 's', 't', 'o', 'r', 'e', 'N', 'a', 'm', 'e', '\0',
30619 : /* 10627 */ 'k', 'e', 'y', 'P', 'a', 't', 'h', '\0',
30620 : /* 10635 */ 'u', 'n', 'i', 'q', 'u', 'e', '\0',
30621 : /* 10642 */ 'm', 'u', 'l', 't', 'i', 'E', 'n', 't', 'r', 'y', '\0',
30622 : /* 10653 */ 'o', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', '\0',
30623 : /* 10665 */ 'g', 'e', 't', '\0',
30624 : /* 10669 */ 'g', 'e', 't', 'K', 'e', 'y', '\0',
30625 : /* 10676 */ 'g', 'e', 't', 'A', 'l', 'l', '\0',
30626 : /* 10683 */ 'g', 'e', 't', 'A', 'l', 'l', 'K', 'e', 'y', 's', '\0',
30627 : /* 10694 */ 'o', 'p', 'e', 'n', 'C', 'u', 'r', 's', 'o', 'r', '\0',
30628 : /* 10705 */ 'o', 'p', 'e', 'n', 'K', 'e', 'y', 'C', 'u', 'r', 's', 'o', 'r', '\0',
30629 : /* 10719 */ 'c', 'o', 'u', 'n', 't', '\0',
30630 : /* 10725 */ 'l', 'o', 'w', 'e', 'r', '\0',
30631 : /* 10731 */ 'u', 'p', 'p', 'e', 'r', '\0',
30632 : /* 10737 */ 'l', 'o', 'w', 'e', 'r', 'O', 'p', 'e', 'n', '\0',
30633 : /* 10747 */ 'u', 'p', 'p', 'e', 'r', 'O', 'p', 'e', 'n', '\0',
30634 : /* 10757 */ 'i', 'n', 'd', 'e', 'x', 'N', 'a', 'm', 'e', 's', '\0',
30635 : /* 10768 */ 'a', 'u', 't', 'o', 'I', 'n', 'c', 'r', 'e', 'm', 'e', 'n', 't', '\0',
30636 : /* 10782 */ 'p', 'u', 't', '\0',
30637 : /* 10786 */ 'c', 'r', 'e', 'a', 't', 'e', 'I', 'n', 'd', 'e', 'x', '\0',
30638 : /* 10798 */ 'd', 'e', 'l', 'e', 't', 'e', 'I', 'n', 'd', 'e', 'x', '\0',
30639 : /* 10810 */ 'e', 'r', 'r', 'o', 'r', 'C', 'o', 'd', 'e', '\0',
30640 : /* 10820 */ 'o', 'n', 's', 'u', 'c', 'c', 'e', 's', 's', '\0',
30641 : /* 10830 */ 'd', 'b', '\0',
30642 : /* 10833 */ 'm', 'o', 'd', 'e', '\0',
30643 : /* 10838 */ 'o', 'n', 'c', 'o', 'm', 'p', 'l', 'e', 't', 'e', '\0',
30644 : /* 10849 */ 'd', 'e', 'l', 'e', 't', 'e', 'D', 'a', 't', 'a', 'b', 'a', 's', 'e', '\0',
30645 : /* 10864 */ 'c', 'm', 'p', '\0',
30646 : /* 10868 */ 'o', 'n', 'b', 'l', 'o', 'c', 'k', 'e', 'd', '\0',
30647 : /* 10878 */ 'o', 'n', 'u', 'p', 'g', 'r', 'a', 'd', 'e', 'n', 'e', 'e', 'd', 'e', 'd', '\0',
30648 : /* 10894 */ 'o', 'l', 'd', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\0',
30649 : /* 10905 */ 'n', 'e', 'w', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\0',
30650 : /* 10916 */ 'o', 'n', 'U', 's', 'a', 'g', 'e', 'R', 'e', 's', 'u', 'l', 't', '\0',
30651 : /* 10930 */ 'g', 'e', 't', 'U', 's', 'a', 'g', 'e', 'F', 'o', 'r', 'U', 'R', 'I', '\0',
30652 : /* 10945 */ 'c', 'a', 'n', 'c', 'e', 'l', 'G', 'e', 't', 'U', 's', 'a', 'g', 'e', 'F', 'o', 'r', 'U', 'R', 'I', '\0',
30653 : /* 10966 */ 'c', 'l', 'e', 'a', 'r', 'D', 'a', 't', 'a', 'b', 'a', 's', 'e', 's', 'F', 'o', 'r', 'U', 'R', 'I', '\0',
30654 : /* 10987 */ 'i', 'n', 'i', 't', 'W', 'i', 'n', 'd', 'o', 'w', 'l', 'e', 's', 's', '\0' };
30655 :
30656 : PR_STATIC_ASSERT(sizeof(stringtab) < (1 << (8 * sizeof(all_properties[0].name_index))));
30657 : PR_STATIC_ASSERT(sizeof(stringtab) < (1 << (8 * sizeof(all_functions[0].name_index))));
30658 :
30659 2782 : JSBool DOM_DefineQuickStubs(JSContext *cx, JSObject *proto, unsigned flags, PRUint32 count, const nsID **iids)
30660 : {
30661 2782 : return xpc_qsDefineQuickStubs(cx, proto, flags, count, iids, 180, tableData, all_properties, all_functions, stringtab);
30662 : }
30663 :
30664 :
|