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 14728 : void DOM_MarkInterfaces()
157 : {
158 1016232 : for (PRUint32 i = 0; i < 68; ++i)
159 1001504 : if (interfaces[i])
160 3354 : interfaces[i]->Mark();
161 14728 : }
162 2807 : void DOM_ClearInterfaces()
163 : {
164 2807 : memset(interfaces, 0, 68 * sizeof(XPCNativeInterface*));
165 2807 : }
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 1652 : nsIDOMDocument_GetDocumentElement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2974 : {
2975 1652 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2976 1652 : JSObject *callee = nsnull;
2977 : nsDocument *self;
2978 3304 : xpc_qsSelfRef selfref;
2979 3304 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
2980 1652 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
2981 0 : return JS_FALSE;
2982 : nsresult rv;
2983 3304 : nsCOMPtr<nsIDOMElement> result;
2984 1652 : rv = self->GetDocumentElement(getter_AddRefs(result));
2985 1652 : if (NS_FAILED(rv))
2986 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2987 1652 : if (!result) {
2988 0 : *vp = JSVAL_NULL;
2989 0 : return JS_TRUE;
2990 : }
2991 1652 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
2992 1652 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
2993 0 : return JS_TRUE;
2994 : }
2995 : // After this point do not use 'result'!
2996 3304 : qsObjectHelper helper(result, cache);
2997 1652 : 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 165 : nsIDOMDocument_CreateElementNS(JSContext *cx, unsigned argc, jsval *vp)
3238 : {
3239 165 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3240 165 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3241 165 : if (!obj)
3242 0 : return JS_FALSE;
3243 165 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3244 : nsDocument *self;
3245 330 : xpc_qsSelfRef selfref;
3246 330 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3247 165 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3248 0 : return JS_FALSE;
3249 165 : if (argc < 2)
3250 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3251 165 : jsval *argv = JS_ARGV(cx, vp);
3252 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3253 : xpc_qsDOMString::eDefaultNullBehavior,
3254 330 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3255 165 : if (!arg0.IsValid())
3256 0 : return JS_FALSE;
3257 165 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
3258 : xpc_qsDOMString::eDefaultNullBehavior,
3259 495 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3260 165 : if (!arg1.IsValid())
3261 0 : return JS_FALSE;
3262 : nsresult rv;
3263 330 : nsCOMPtr<nsIContent> result;
3264 165 : rv = self->CreateElementNS(arg0, arg1, getter_AddRefs(result));
3265 165 : if (NS_FAILED(rv))
3266 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3267 165 : if (!result) {
3268 0 : *vp = JSVAL_NULL;
3269 0 : return JS_TRUE;
3270 : }
3271 165 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3272 165 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3273 0 : return JS_TRUE;
3274 : }
3275 : // After this point do not use 'result'!
3276 330 : qsObjectHelper helper(result, cache);
3277 165 : 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 1847 : nsIDOMElement_SetAttribute(JSContext *cx, unsigned argc, jsval *vp)
3965 : {
3966 1847 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3967 1847 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3968 1847 : if (!obj)
3969 0 : return JS_FALSE;
3970 : nsGenericElement *self;
3971 3694 : xpc_qsSelfRef selfref;
3972 1847 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
3973 0 : return JS_FALSE;
3974 1847 : if (argc < 2)
3975 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3976 1847 : jsval *argv = JS_ARGV(cx, vp);
3977 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3978 : xpc_qsDOMString::eDefaultNullBehavior,
3979 3694 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3980 1847 : if (!arg0.IsValid())
3981 0 : return JS_FALSE;
3982 1847 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
3983 : xpc_qsDOMString::eDefaultNullBehavior,
3984 5541 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3985 1847 : if (!arg1.IsValid())
3986 0 : return JS_FALSE;
3987 : nsresult rv;
3988 1847 : rv = self->SetAttribute(arg0, arg1);
3989 1847 : if (NS_FAILED(rv))
3990 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3991 1847 : *vp = JSVAL_VOID;
3992 1847 : 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 400 : nsIDOMNode_AppendChild(JSContext *cx, unsigned argc, jsval *vp)
4845 : {
4846 400 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4847 400 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4848 400 : if (!obj)
4849 0 : return JS_FALSE;
4850 400 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4851 : nsINode *self;
4852 800 : xpc_qsSelfRef selfref;
4853 800 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4854 400 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4855 0 : return JS_FALSE;
4856 400 : if (argc < 1)
4857 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4858 400 : jsval *argv = JS_ARGV(cx, vp);
4859 : nsresult rv;
4860 : nsINode *arg0;
4861 800 : xpc_qsSelfRef arg0ref;
4862 400 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
4863 400 : if (NS_FAILED(rv)) {
4864 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
4865 0 : return JS_FALSE;
4866 : }
4867 400 : nsINode *result = self->AppendChild(arg0, &rv);
4868 400 : if(NS_FAILED(rv))
4869 0 : result = nsnull;
4870 400 : if (NS_FAILED(rv))
4871 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4872 400 : if (!result) {
4873 0 : *vp = JSVAL_NULL;
4874 0 : return JS_TRUE;
4875 : }
4876 400 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4877 400 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4878 400 : 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 : // === interface nsIDOMRect
9457 :
9458 : static JSBool
9459 0 : nsIDOMRect_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9460 : {
9461 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9462 0 : JSObject *callee = nsnull;
9463 : nsIDOMRect *self;
9464 0 : xpc_qsSelfRef selfref;
9465 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9466 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9467 0 : return JS_FALSE;
9468 : nsresult rv;
9469 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9470 0 : rv = self->GetTop(getter_AddRefs(result));
9471 0 : if (NS_FAILED(rv))
9472 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9473 0 : if (!result) {
9474 0 : *vp = JSVAL_NULL;
9475 0 : return JS_TRUE;
9476 : }
9477 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9478 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9479 0 : return JS_TRUE;
9480 : }
9481 : // After this point do not use 'result'!
9482 0 : qsObjectHelper helper(result, cache);
9483 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9484 : }
9485 :
9486 : static JSBool
9487 0 : nsIDOMRect_GetRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9488 : {
9489 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9490 0 : JSObject *callee = nsnull;
9491 : nsIDOMRect *self;
9492 0 : xpc_qsSelfRef selfref;
9493 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9494 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9495 0 : return JS_FALSE;
9496 : nsresult rv;
9497 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9498 0 : rv = self->GetRight(getter_AddRefs(result));
9499 0 : if (NS_FAILED(rv))
9500 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9501 0 : if (!result) {
9502 0 : *vp = JSVAL_NULL;
9503 0 : return JS_TRUE;
9504 : }
9505 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9506 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9507 0 : return JS_TRUE;
9508 : }
9509 : // After this point do not use 'result'!
9510 0 : qsObjectHelper helper(result, cache);
9511 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9512 : }
9513 :
9514 : static JSBool
9515 0 : nsIDOMRect_GetBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9516 : {
9517 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9518 0 : JSObject *callee = nsnull;
9519 : nsIDOMRect *self;
9520 0 : xpc_qsSelfRef selfref;
9521 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9522 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9523 0 : return JS_FALSE;
9524 : nsresult rv;
9525 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9526 0 : rv = self->GetBottom(getter_AddRefs(result));
9527 0 : if (NS_FAILED(rv))
9528 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9529 0 : if (!result) {
9530 0 : *vp = JSVAL_NULL;
9531 0 : return JS_TRUE;
9532 : }
9533 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9534 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9535 0 : return JS_TRUE;
9536 : }
9537 : // After this point do not use 'result'!
9538 0 : qsObjectHelper helper(result, cache);
9539 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9540 : }
9541 :
9542 : static JSBool
9543 0 : nsIDOMRect_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9544 : {
9545 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9546 0 : JSObject *callee = nsnull;
9547 : nsIDOMRect *self;
9548 0 : xpc_qsSelfRef selfref;
9549 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9550 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9551 0 : return JS_FALSE;
9552 : nsresult rv;
9553 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9554 0 : rv = self->GetLeft(getter_AddRefs(result));
9555 0 : if (NS_FAILED(rv))
9556 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9557 0 : if (!result) {
9558 0 : *vp = JSVAL_NULL;
9559 0 : return JS_TRUE;
9560 : }
9561 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9562 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9563 0 : return JS_TRUE;
9564 : }
9565 : // After this point do not use 'result'!
9566 0 : qsObjectHelper helper(result, cache);
9567 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9568 : }
9569 :
9570 : // === interface nsIDOMCSSStyleDeclaration
9571 :
9572 : static JSBool
9573 0 : nsIDOMCSSStyleDeclaration_GetCssText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9574 : {
9575 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9576 : nsIDOMCSSStyleDeclaration *self;
9577 0 : xpc_qsSelfRef selfref;
9578 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
9579 0 : return JS_FALSE;
9580 : nsresult rv;
9581 0 : nsString result;
9582 0 : rv = self->GetCssText(result);
9583 0 : if (NS_FAILED(rv))
9584 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9585 0 : return xpc::StringToJsval(cx, result, vp);
9586 : }
9587 :
9588 : static JSBool
9589 0 : nsIDOMCSSStyleDeclaration_SetCssText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9590 : {
9591 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9592 : nsIDOMCSSStyleDeclaration *self;
9593 0 : xpc_qsSelfRef selfref;
9594 0 : JS::AutoValueRooter tvr(cx);
9595 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
9596 0 : return JS_FALSE;
9597 : xpc_qsDOMString arg0(cx, *vp, vp,
9598 : xpc_qsDOMString::eDefaultNullBehavior,
9599 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9600 0 : if (!arg0.IsValid())
9601 0 : return JS_FALSE;
9602 : nsresult rv;
9603 0 : rv = self->SetCssText(arg0);
9604 0 : if (NS_FAILED(rv))
9605 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
9606 0 : return JS_TRUE;
9607 : }
9608 :
9609 : static JSBool
9610 0 : nsIDOMCSSStyleDeclaration_GetPropertyValue(JSContext *cx, unsigned argc, jsval *vp)
9611 : {
9612 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9613 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9614 0 : if (!obj)
9615 0 : return JS_FALSE;
9616 : nsIDOMCSSStyleDeclaration *self;
9617 0 : xpc_qsSelfRef selfref;
9618 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9619 0 : return JS_FALSE;
9620 0 : if (argc < 1)
9621 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9622 0 : jsval *argv = JS_ARGV(cx, vp);
9623 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9624 : xpc_qsDOMString::eDefaultNullBehavior,
9625 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9626 0 : if (!arg0.IsValid())
9627 0 : return JS_FALSE;
9628 : nsresult rv;
9629 0 : nsString result;
9630 0 : rv = self->GetPropertyValue(arg0, result);
9631 0 : if (NS_FAILED(rv))
9632 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9633 0 : return xpc::StringToJsval(cx, result, vp);
9634 : }
9635 :
9636 : static JSBool
9637 0 : nsIDOMCSSStyleDeclaration_GetPropertyCSSValue(JSContext *cx, unsigned argc, jsval *vp)
9638 : {
9639 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9640 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9641 0 : if (!obj)
9642 0 : return JS_FALSE;
9643 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
9644 : nsIDOMCSSStyleDeclaration *self;
9645 0 : xpc_qsSelfRef selfref;
9646 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9647 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
9648 0 : return JS_FALSE;
9649 0 : if (argc < 1)
9650 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9651 0 : jsval *argv = JS_ARGV(cx, vp);
9652 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9653 : xpc_qsDOMString::eDefaultNullBehavior,
9654 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9655 0 : if (!arg0.IsValid())
9656 0 : return JS_FALSE;
9657 : nsresult rv;
9658 0 : nsCOMPtr<nsIDOMCSSValue> result;
9659 0 : rv = self->GetPropertyCSSValue(arg0, getter_AddRefs(result));
9660 0 : if (NS_FAILED(rv))
9661 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9662 0 : if (!result) {
9663 0 : *vp = JSVAL_NULL;
9664 0 : return JS_TRUE;
9665 : }
9666 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9667 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9668 0 : return JS_TRUE;
9669 : }
9670 : // After this point do not use 'result'!
9671 0 : qsObjectHelper helper(result, cache);
9672 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSValue), &interfaces[k_nsIDOMCSSValue], vp);
9673 : }
9674 :
9675 : static JSBool
9676 0 : nsIDOMCSSStyleDeclaration_RemoveProperty(JSContext *cx, unsigned argc, jsval *vp)
9677 : {
9678 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9679 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9680 0 : if (!obj)
9681 0 : return JS_FALSE;
9682 : nsIDOMCSSStyleDeclaration *self;
9683 0 : xpc_qsSelfRef selfref;
9684 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9685 0 : return JS_FALSE;
9686 0 : if (argc < 1)
9687 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9688 0 : jsval *argv = JS_ARGV(cx, vp);
9689 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9690 : xpc_qsDOMString::eDefaultNullBehavior,
9691 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9692 0 : if (!arg0.IsValid())
9693 0 : return JS_FALSE;
9694 : nsresult rv;
9695 0 : nsString result;
9696 0 : rv = self->RemoveProperty(arg0, result);
9697 0 : if (NS_FAILED(rv))
9698 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9699 0 : return xpc::StringToJsval(cx, result, vp);
9700 : }
9701 :
9702 : static JSBool
9703 0 : nsIDOMCSSStyleDeclaration_GetPropertyPriority(JSContext *cx, unsigned argc, jsval *vp)
9704 : {
9705 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9706 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9707 0 : if (!obj)
9708 0 : return JS_FALSE;
9709 : nsIDOMCSSStyleDeclaration *self;
9710 0 : xpc_qsSelfRef selfref;
9711 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9712 0 : return JS_FALSE;
9713 0 : if (argc < 1)
9714 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9715 0 : jsval *argv = JS_ARGV(cx, vp);
9716 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9717 : xpc_qsDOMString::eDefaultNullBehavior,
9718 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9719 0 : if (!arg0.IsValid())
9720 0 : return JS_FALSE;
9721 : nsresult rv;
9722 0 : nsString result;
9723 0 : rv = self->GetPropertyPriority(arg0, result);
9724 0 : if (NS_FAILED(rv))
9725 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9726 0 : return xpc::StringToJsval(cx, result, vp);
9727 : }
9728 :
9729 : static JSBool
9730 0 : nsIDOMCSSStyleDeclaration_SetProperty(JSContext *cx, unsigned argc, jsval *vp)
9731 : {
9732 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9733 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9734 0 : if (!obj)
9735 0 : return JS_FALSE;
9736 : nsIDOMCSSStyleDeclaration *self;
9737 0 : xpc_qsSelfRef selfref;
9738 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9739 0 : return JS_FALSE;
9740 0 : if (argc < 2)
9741 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9742 0 : jsval *argv = JS_ARGV(cx, vp);
9743 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9744 : xpc_qsDOMString::eDefaultNullBehavior,
9745 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9746 0 : if (!arg0.IsValid())
9747 0 : return JS_FALSE;
9748 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
9749 : xpc_qsDOMString::eDefaultNullBehavior,
9750 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9751 0 : if (!arg1.IsValid())
9752 0 : return JS_FALSE;
9753 : xpc_qsDOMString arg2(cx, (2 < argc ? argv[2] : JSVAL_NULL), (2 < argc ? &argv[2] : NULL),
9754 : xpc_qsDOMString::eDefaultNullBehavior,
9755 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9756 0 : if (!arg2.IsValid())
9757 0 : return JS_FALSE;
9758 : nsresult rv;
9759 0 : rv = self->SetProperty(arg0, arg1, arg2);
9760 0 : if (NS_FAILED(rv))
9761 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9762 0 : *vp = JSVAL_VOID;
9763 0 : return JS_TRUE;
9764 : }
9765 :
9766 : static JSBool
9767 0 : nsIDOMCSSStyleDeclaration_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9768 : {
9769 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9770 : nsIDOMCSSStyleDeclaration *self;
9771 0 : xpc_qsSelfRef selfref;
9772 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
9773 0 : return JS_FALSE;
9774 : nsresult rv;
9775 : PRUint32 result;
9776 0 : rv = self->GetLength(&result);
9777 0 : if (NS_FAILED(rv))
9778 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9779 0 : *vp = UINT_TO_JSVAL(result);
9780 0 : return JS_TRUE;
9781 : }
9782 :
9783 : static JSBool
9784 0 : nsIDOMCSSStyleDeclaration_Item(JSContext *cx, unsigned argc, jsval *vp)
9785 : {
9786 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9787 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9788 0 : if (!obj)
9789 0 : return JS_FALSE;
9790 : nsIDOMCSSStyleDeclaration *self;
9791 0 : xpc_qsSelfRef selfref;
9792 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9793 0 : return JS_FALSE;
9794 0 : if (argc < 1)
9795 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9796 0 : jsval *argv = JS_ARGV(cx, vp);
9797 : uint32_t arg0;
9798 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
9799 0 : return JS_FALSE;
9800 : nsresult rv;
9801 0 : nsString result;
9802 0 : rv = self->Item(arg0, result);
9803 0 : if (NS_FAILED(rv))
9804 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9805 0 : return xpc::StringToJsval(cx, result, vp);
9806 : }
9807 :
9808 : static JSBool
9809 0 : nsIDOMCSSStyleDeclaration_GetParentRule(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9810 : {
9811 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9812 0 : JSObject *callee = nsnull;
9813 : nsIDOMCSSStyleDeclaration *self;
9814 0 : xpc_qsSelfRef selfref;
9815 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9816 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9817 0 : return JS_FALSE;
9818 : nsresult rv;
9819 0 : nsCOMPtr<nsIDOMCSSRule> result;
9820 0 : rv = self->GetParentRule(getter_AddRefs(result));
9821 0 : if (NS_FAILED(rv))
9822 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9823 0 : if (!result) {
9824 0 : *vp = JSVAL_NULL;
9825 0 : return JS_TRUE;
9826 : }
9827 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9828 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9829 0 : return JS_TRUE;
9830 : }
9831 : // After this point do not use 'result'!
9832 0 : qsObjectHelper helper(result, cache);
9833 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSRule), &interfaces[k_nsIDOMCSSRule], vp);
9834 : }
9835 :
9836 : // === interface nsIDOMEventTarget
9837 :
9838 : static JSBool
9839 1077 : nsIDOMEventTarget_AddEventListener(JSContext *cx, unsigned argc, jsval *vp)
9840 : {
9841 1077 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9842 1077 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9843 1077 : if (!obj)
9844 0 : return JS_FALSE;
9845 : nsIDOMEventTarget *self;
9846 2154 : xpc_qsSelfRef selfref;
9847 1077 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9848 0 : return JS_FALSE;
9849 1077 : if (argc < 2)
9850 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9851 1077 : jsval *argv = JS_ARGV(cx, vp);
9852 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9853 : xpc_qsDOMString::eDefaultNullBehavior,
9854 2154 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9855 1077 : if (!arg0.IsValid())
9856 0 : return JS_FALSE;
9857 : nsresult rv;
9858 : nsIDOMEventListener *arg1;
9859 2154 : xpc_qsSelfRef arg1ref;
9860 1077 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
9861 1077 : if (NS_FAILED(rv)) {
9862 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
9863 0 : return JS_FALSE;
9864 : }
9865 : JSBool arg2;
9866 1077 : JS_ValueToBoolean(cx, (2 < argc ? argv[2] : JSVAL_NULL), &arg2);
9867 : JSBool arg3;
9868 1077 : JS_ValueToBoolean(cx, (3 < argc ? argv[3] : JSVAL_NULL), &arg3);
9869 1077 : rv = self->AddEventListener(arg0, arg1, arg2, arg3, NS_MIN<PRUint32>(argc, 4) - 2);
9870 1077 : if (NS_FAILED(rv))
9871 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9872 1077 : *vp = JSVAL_VOID;
9873 1077 : return JS_TRUE;
9874 : }
9875 :
9876 : static JSBool
9877 2 : nsIDOMEventTarget_RemoveEventListener(JSContext *cx, unsigned argc, jsval *vp)
9878 : {
9879 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9880 2 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9881 2 : if (!obj)
9882 0 : return JS_FALSE;
9883 : nsIDOMEventTarget *self;
9884 4 : xpc_qsSelfRef selfref;
9885 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9886 0 : return JS_FALSE;
9887 2 : if (argc < 2)
9888 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9889 2 : jsval *argv = JS_ARGV(cx, vp);
9890 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9891 : xpc_qsDOMString::eDefaultNullBehavior,
9892 4 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9893 2 : if (!arg0.IsValid())
9894 0 : return JS_FALSE;
9895 : nsresult rv;
9896 : nsIDOMEventListener *arg1;
9897 4 : xpc_qsSelfRef arg1ref;
9898 2 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
9899 2 : if (NS_FAILED(rv)) {
9900 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
9901 0 : return JS_FALSE;
9902 : }
9903 : JSBool arg2;
9904 2 : JS_ValueToBoolean(cx, (2 < argc ? argv[2] : JSVAL_NULL), &arg2);
9905 2 : rv = self->RemoveEventListener(arg0, arg1, arg2);
9906 2 : if (NS_FAILED(rv))
9907 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9908 2 : *vp = JSVAL_VOID;
9909 2 : return JS_TRUE;
9910 : }
9911 :
9912 : static JSBool
9913 0 : nsIDOMEventTarget_DispatchEvent(JSContext *cx, unsigned argc, jsval *vp)
9914 : {
9915 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9916 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9917 0 : if (!obj)
9918 0 : return JS_FALSE;
9919 : nsIDOMEventTarget *self;
9920 0 : xpc_qsSelfRef selfref;
9921 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9922 0 : return JS_FALSE;
9923 0 : if (argc < 1)
9924 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9925 0 : jsval *argv = JS_ARGV(cx, vp);
9926 : nsresult rv;
9927 : nsIDOMEvent *arg0;
9928 0 : xpc_qsSelfRef arg0ref;
9929 0 : rv = xpc_qsUnwrapArg<nsIDOMEvent>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
9930 0 : if (NS_FAILED(rv)) {
9931 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
9932 0 : return JS_FALSE;
9933 : }
9934 : bool result;
9935 0 : rv = self->DispatchEvent(arg0, &result);
9936 0 : if (NS_FAILED(rv))
9937 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9938 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
9939 0 : return JS_TRUE;
9940 : }
9941 :
9942 : // === interface nsIDOMEvent
9943 :
9944 : static JSBool
9945 148 : nsIDOMEvent_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9946 : {
9947 148 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9948 : nsIDOMEvent *self;
9949 296 : xpc_qsSelfRef selfref;
9950 148 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
9951 0 : return JS_FALSE;
9952 : nsresult rv;
9953 296 : nsString result;
9954 148 : rv = self->GetType(result);
9955 148 : if (NS_FAILED(rv))
9956 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9957 148 : return xpc::StringToJsval(cx, result, vp);
9958 : }
9959 :
9960 : static JSBool
9961 3537 : nsIDOMEvent_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9962 : {
9963 3537 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9964 3537 : JSObject *callee = nsnull;
9965 : nsIDOMEvent *self;
9966 7074 : xpc_qsSelfRef selfref;
9967 7074 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9968 3537 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9969 0 : return JS_FALSE;
9970 : nsresult rv;
9971 7074 : nsCOMPtr<nsIDOMEventTarget> result;
9972 3537 : rv = self->GetTarget(getter_AddRefs(result));
9973 3537 : if (NS_FAILED(rv))
9974 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9975 3537 : if (!result) {
9976 0 : *vp = JSVAL_NULL;
9977 0 : return JS_TRUE;
9978 : }
9979 3537 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9980 3537 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9981 0 : return JS_TRUE;
9982 : }
9983 : // After this point do not use 'result'!
9984 7074 : qsObjectHelper helper(result, cache);
9985 3537 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
9986 : }
9987 :
9988 : static JSBool
9989 0 : nsIDOMEvent_GetCurrentTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9990 : {
9991 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9992 0 : JSObject *callee = nsnull;
9993 : nsIDOMEvent *self;
9994 0 : xpc_qsSelfRef selfref;
9995 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9996 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9997 0 : return JS_FALSE;
9998 : nsresult rv;
9999 0 : nsCOMPtr<nsIDOMEventTarget> result;
10000 0 : rv = self->GetCurrentTarget(getter_AddRefs(result));
10001 0 : if (NS_FAILED(rv))
10002 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10003 0 : if (!result) {
10004 0 : *vp = JSVAL_NULL;
10005 0 : return JS_TRUE;
10006 : }
10007 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10008 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10009 0 : return JS_TRUE;
10010 : }
10011 : // After this point do not use 'result'!
10012 0 : qsObjectHelper helper(result, cache);
10013 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
10014 : }
10015 :
10016 : static JSBool
10017 0 : nsIDOMEvent_GetEventPhase(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10018 : {
10019 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10020 : nsIDOMEvent *self;
10021 0 : xpc_qsSelfRef selfref;
10022 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10023 0 : return JS_FALSE;
10024 : nsresult rv;
10025 : PRUint16 result;
10026 0 : rv = self->GetEventPhase(&result);
10027 0 : if (NS_FAILED(rv))
10028 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10029 0 : *vp = INT_TO_JSVAL((int32_t) result);
10030 0 : return JS_TRUE;
10031 : }
10032 :
10033 : static JSBool
10034 0 : nsIDOMEvent_GetBubbles(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10035 : {
10036 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10037 : nsIDOMEvent *self;
10038 0 : xpc_qsSelfRef selfref;
10039 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10040 0 : return JS_FALSE;
10041 : nsresult rv;
10042 : bool result;
10043 0 : rv = self->GetBubbles(&result);
10044 0 : if (NS_FAILED(rv))
10045 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10046 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10047 0 : return JS_TRUE;
10048 : }
10049 :
10050 : static JSBool
10051 0 : nsIDOMEvent_GetCancelable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10052 : {
10053 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10054 : nsIDOMEvent *self;
10055 0 : xpc_qsSelfRef selfref;
10056 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10057 0 : return JS_FALSE;
10058 : nsresult rv;
10059 : bool result;
10060 0 : rv = self->GetCancelable(&result);
10061 0 : if (NS_FAILED(rv))
10062 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10063 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10064 0 : return JS_TRUE;
10065 : }
10066 :
10067 : static JSBool
10068 0 : nsIDOMEvent_GetTimeStamp(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10069 : {
10070 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10071 : nsIDOMEvent *self;
10072 0 : xpc_qsSelfRef selfref;
10073 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10074 0 : return JS_FALSE;
10075 : nsresult rv;
10076 : DOMTimeStamp result;
10077 0 : rv = self->GetTimeStamp(&result);
10078 0 : if (NS_FAILED(rv))
10079 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10080 0 : return xpc_qsUint64ToJsval(cx, result, vp);
10081 : }
10082 :
10083 : static JSBool
10084 10 : nsIDOMEvent_StopPropagation(JSContext *cx, unsigned argc, jsval *vp)
10085 : {
10086 10 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10087 10 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10088 10 : if (!obj)
10089 0 : return JS_FALSE;
10090 : nsIDOMEvent *self;
10091 20 : xpc_qsSelfRef selfref;
10092 10 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10093 0 : return JS_FALSE;
10094 : nsresult rv;
10095 10 : rv = self->StopPropagation();
10096 10 : if (NS_FAILED(rv))
10097 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10098 10 : *vp = JSVAL_VOID;
10099 10 : return JS_TRUE;
10100 : }
10101 :
10102 : static JSBool
10103 32 : nsIDOMEvent_PreventDefault(JSContext *cx, unsigned argc, jsval *vp)
10104 : {
10105 32 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10106 32 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10107 32 : if (!obj)
10108 0 : return JS_FALSE;
10109 : nsIDOMEvent *self;
10110 64 : xpc_qsSelfRef selfref;
10111 32 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10112 0 : return JS_FALSE;
10113 : nsresult rv;
10114 32 : rv = self->PreventDefault();
10115 32 : if (NS_FAILED(rv))
10116 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10117 32 : *vp = JSVAL_VOID;
10118 32 : return JS_TRUE;
10119 : }
10120 :
10121 : static JSBool
10122 0 : nsIDOMEvent_InitEvent(JSContext *cx, unsigned argc, jsval *vp)
10123 : {
10124 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10125 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10126 0 : if (!obj)
10127 0 : return JS_FALSE;
10128 : nsIDOMEvent *self;
10129 0 : xpc_qsSelfRef selfref;
10130 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10131 0 : return JS_FALSE;
10132 0 : if (argc < 3)
10133 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10134 0 : jsval *argv = JS_ARGV(cx, vp);
10135 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10136 : xpc_qsDOMString::eDefaultNullBehavior,
10137 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10138 0 : if (!arg0.IsValid())
10139 0 : return JS_FALSE;
10140 : JSBool arg1;
10141 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10142 : JSBool arg2;
10143 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10144 : nsresult rv;
10145 0 : rv = self->InitEvent(arg0, arg1, arg2);
10146 0 : if (NS_FAILED(rv))
10147 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10148 0 : *vp = JSVAL_VOID;
10149 0 : return JS_TRUE;
10150 : }
10151 :
10152 : static JSBool
10153 0 : nsIDOMEvent_GetDefaultPrevented(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10154 : {
10155 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10156 : nsIDOMEvent *self;
10157 0 : xpc_qsSelfRef selfref;
10158 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10159 0 : return JS_FALSE;
10160 : nsresult rv;
10161 : bool result;
10162 0 : rv = self->GetDefaultPrevented(&result);
10163 0 : if (NS_FAILED(rv))
10164 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10165 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10166 0 : return JS_TRUE;
10167 : }
10168 :
10169 : static JSBool
10170 0 : nsIDOMEvent_StopImmediatePropagation(JSContext *cx, unsigned argc, jsval *vp)
10171 : {
10172 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10173 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10174 0 : if (!obj)
10175 0 : return JS_FALSE;
10176 : nsIDOMEvent *self;
10177 0 : xpc_qsSelfRef selfref;
10178 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10179 0 : return JS_FALSE;
10180 : nsresult rv;
10181 0 : rv = self->StopImmediatePropagation();
10182 0 : if (NS_FAILED(rv))
10183 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10184 0 : *vp = JSVAL_VOID;
10185 0 : return JS_TRUE;
10186 : }
10187 :
10188 : // === interface nsIDOMMouseEvent
10189 :
10190 : static JSBool
10191 0 : nsIDOMMouseEvent_GetScreenX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10192 : {
10193 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10194 : nsIDOMMouseEvent *self;
10195 0 : xpc_qsSelfRef selfref;
10196 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10197 0 : return JS_FALSE;
10198 : nsresult rv;
10199 : PRInt32 result;
10200 0 : rv = self->GetScreenX(&result);
10201 0 : if (NS_FAILED(rv))
10202 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10203 0 : *vp = INT_TO_JSVAL(result);
10204 0 : return JS_TRUE;
10205 : }
10206 :
10207 : static JSBool
10208 0 : nsIDOMMouseEvent_GetScreenY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10209 : {
10210 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10211 : nsIDOMMouseEvent *self;
10212 0 : xpc_qsSelfRef selfref;
10213 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10214 0 : return JS_FALSE;
10215 : nsresult rv;
10216 : PRInt32 result;
10217 0 : rv = self->GetScreenY(&result);
10218 0 : if (NS_FAILED(rv))
10219 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10220 0 : *vp = INT_TO_JSVAL(result);
10221 0 : return JS_TRUE;
10222 : }
10223 :
10224 : static JSBool
10225 0 : nsIDOMMouseEvent_GetClientX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10226 : {
10227 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10228 : nsIDOMMouseEvent *self;
10229 0 : xpc_qsSelfRef selfref;
10230 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10231 0 : return JS_FALSE;
10232 : nsresult rv;
10233 : PRInt32 result;
10234 0 : rv = self->GetClientX(&result);
10235 0 : if (NS_FAILED(rv))
10236 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10237 0 : *vp = INT_TO_JSVAL(result);
10238 0 : return JS_TRUE;
10239 : }
10240 :
10241 : static JSBool
10242 0 : nsIDOMMouseEvent_GetClientY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10243 : {
10244 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10245 : nsIDOMMouseEvent *self;
10246 0 : xpc_qsSelfRef selfref;
10247 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10248 0 : return JS_FALSE;
10249 : nsresult rv;
10250 : PRInt32 result;
10251 0 : rv = self->GetClientY(&result);
10252 0 : if (NS_FAILED(rv))
10253 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10254 0 : *vp = INT_TO_JSVAL(result);
10255 0 : return JS_TRUE;
10256 : }
10257 :
10258 : static JSBool
10259 0 : nsIDOMMouseEvent_GetCtrlKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10260 : {
10261 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10262 : nsIDOMMouseEvent *self;
10263 0 : xpc_qsSelfRef selfref;
10264 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10265 0 : return JS_FALSE;
10266 : nsresult rv;
10267 : bool result;
10268 0 : rv = self->GetCtrlKey(&result);
10269 0 : if (NS_FAILED(rv))
10270 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10271 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10272 0 : return JS_TRUE;
10273 : }
10274 :
10275 : static JSBool
10276 0 : nsIDOMMouseEvent_GetShiftKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10277 : {
10278 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10279 : nsIDOMMouseEvent *self;
10280 0 : xpc_qsSelfRef selfref;
10281 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10282 0 : return JS_FALSE;
10283 : nsresult rv;
10284 : bool result;
10285 0 : rv = self->GetShiftKey(&result);
10286 0 : if (NS_FAILED(rv))
10287 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10288 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10289 0 : return JS_TRUE;
10290 : }
10291 :
10292 : static JSBool
10293 0 : nsIDOMMouseEvent_GetAltKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10294 : {
10295 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10296 : nsIDOMMouseEvent *self;
10297 0 : xpc_qsSelfRef selfref;
10298 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10299 0 : return JS_FALSE;
10300 : nsresult rv;
10301 : bool result;
10302 0 : rv = self->GetAltKey(&result);
10303 0 : if (NS_FAILED(rv))
10304 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10305 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10306 0 : return JS_TRUE;
10307 : }
10308 :
10309 : static JSBool
10310 0 : nsIDOMMouseEvent_GetMetaKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10311 : {
10312 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10313 : nsIDOMMouseEvent *self;
10314 0 : xpc_qsSelfRef selfref;
10315 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10316 0 : return JS_FALSE;
10317 : nsresult rv;
10318 : bool result;
10319 0 : rv = self->GetMetaKey(&result);
10320 0 : if (NS_FAILED(rv))
10321 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10322 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10323 0 : return JS_TRUE;
10324 : }
10325 :
10326 : static JSBool
10327 0 : nsIDOMMouseEvent_GetButton(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10328 : {
10329 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10330 : nsIDOMMouseEvent *self;
10331 0 : xpc_qsSelfRef selfref;
10332 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10333 0 : return JS_FALSE;
10334 : nsresult rv;
10335 : PRUint16 result;
10336 0 : rv = self->GetButton(&result);
10337 0 : if (NS_FAILED(rv))
10338 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10339 0 : *vp = INT_TO_JSVAL((int32_t) result);
10340 0 : return JS_TRUE;
10341 : }
10342 :
10343 : static JSBool
10344 0 : nsIDOMMouseEvent_GetRelatedTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10345 : {
10346 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10347 0 : JSObject *callee = nsnull;
10348 : nsIDOMMouseEvent *self;
10349 0 : xpc_qsSelfRef selfref;
10350 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10351 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10352 0 : return JS_FALSE;
10353 : nsresult rv;
10354 0 : nsCOMPtr<nsIDOMEventTarget> result;
10355 0 : rv = self->GetRelatedTarget(getter_AddRefs(result));
10356 0 : if (NS_FAILED(rv))
10357 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10358 0 : if (!result) {
10359 0 : *vp = JSVAL_NULL;
10360 0 : return JS_TRUE;
10361 : }
10362 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10363 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10364 0 : return JS_TRUE;
10365 : }
10366 : // After this point do not use 'result'!
10367 0 : qsObjectHelper helper(result, cache);
10368 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
10369 : }
10370 :
10371 : static JSBool
10372 0 : nsIDOMMouseEvent_InitMouseEvent(JSContext *cx, unsigned argc, jsval *vp)
10373 : {
10374 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10375 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10376 0 : if (!obj)
10377 0 : return JS_FALSE;
10378 : nsIDOMMouseEvent *self;
10379 0 : xpc_qsSelfRef selfref;
10380 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10381 0 : return JS_FALSE;
10382 0 : if (argc < 15)
10383 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10384 0 : jsval *argv = JS_ARGV(cx, vp);
10385 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10386 : xpc_qsDOMString::eDefaultNullBehavior,
10387 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10388 0 : if (!arg0.IsValid())
10389 0 : return JS_FALSE;
10390 : JSBool arg1;
10391 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10392 : JSBool arg2;
10393 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10394 : nsresult rv;
10395 : nsIDOMWindow *arg3;
10396 0 : xpc_qsSelfRef arg3ref;
10397 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10398 0 : if (NS_FAILED(rv)) {
10399 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10400 0 : return JS_FALSE;
10401 : }
10402 : int32_t arg4;
10403 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
10404 0 : return JS_FALSE;
10405 : int32_t arg5;
10406 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
10407 0 : return JS_FALSE;
10408 : int32_t arg6;
10409 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
10410 0 : return JS_FALSE;
10411 : int32_t arg7;
10412 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
10413 0 : return JS_FALSE;
10414 : int32_t arg8;
10415 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
10416 0 : return JS_FALSE;
10417 : JSBool arg9;
10418 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
10419 : JSBool arg10;
10420 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
10421 : JSBool arg11;
10422 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
10423 : JSBool arg12;
10424 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
10425 : uint32_t arg13_u32;
10426 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
10427 0 : return JS_FALSE;
10428 0 : uint16_t arg13 = (uint16_t) arg13_u32;
10429 : nsIDOMEventTarget *arg14;
10430 0 : xpc_qsSelfRef arg14ref;
10431 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
10432 0 : if (NS_FAILED(rv)) {
10433 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
10434 0 : return JS_FALSE;
10435 : }
10436 0 : rv = self->InitMouseEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14);
10437 0 : if (NS_FAILED(rv))
10438 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10439 0 : *vp = JSVAL_VOID;
10440 0 : return JS_TRUE;
10441 : }
10442 :
10443 : static JSBool
10444 0 : nsIDOMMouseEvent_GetMozPressure(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10445 : {
10446 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10447 : nsIDOMMouseEvent *self;
10448 0 : xpc_qsSelfRef selfref;
10449 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10450 0 : return JS_FALSE;
10451 : nsresult rv;
10452 : float result;
10453 0 : rv = self->GetMozPressure(&result);
10454 0 : if (NS_FAILED(rv))
10455 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10456 0 : return JS_NewNumberValue(cx, result, vp);
10457 : }
10458 :
10459 : static JSBool
10460 0 : nsIDOMMouseEvent_GetMozInputSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10461 : {
10462 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10463 : nsIDOMMouseEvent *self;
10464 0 : xpc_qsSelfRef selfref;
10465 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10466 0 : return JS_FALSE;
10467 : nsresult rv;
10468 : PRUint16 result;
10469 0 : rv = self->GetMozInputSource(&result);
10470 0 : if (NS_FAILED(rv))
10471 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10472 0 : *vp = INT_TO_JSVAL((int32_t) result);
10473 0 : return JS_TRUE;
10474 : }
10475 :
10476 : static JSBool
10477 0 : nsIDOMMouseEvent_InitNSMouseEvent(JSContext *cx, unsigned argc, jsval *vp)
10478 : {
10479 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10480 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10481 0 : if (!obj)
10482 0 : return JS_FALSE;
10483 : nsIDOMMouseEvent *self;
10484 0 : xpc_qsSelfRef selfref;
10485 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10486 0 : return JS_FALSE;
10487 0 : if (argc < 17)
10488 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10489 0 : jsval *argv = JS_ARGV(cx, vp);
10490 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10491 : xpc_qsDOMString::eDefaultNullBehavior,
10492 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10493 0 : if (!arg0.IsValid())
10494 0 : return JS_FALSE;
10495 : JSBool arg1;
10496 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10497 : JSBool arg2;
10498 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10499 : nsresult rv;
10500 : nsIDOMWindow *arg3;
10501 0 : xpc_qsSelfRef arg3ref;
10502 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10503 0 : if (NS_FAILED(rv)) {
10504 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10505 0 : return JS_FALSE;
10506 : }
10507 : int32_t arg4;
10508 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
10509 0 : return JS_FALSE;
10510 : int32_t arg5;
10511 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
10512 0 : return JS_FALSE;
10513 : int32_t arg6;
10514 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
10515 0 : return JS_FALSE;
10516 : int32_t arg7;
10517 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
10518 0 : return JS_FALSE;
10519 : int32_t arg8;
10520 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
10521 0 : return JS_FALSE;
10522 : JSBool arg9;
10523 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
10524 : JSBool arg10;
10525 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
10526 : JSBool arg11;
10527 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
10528 : JSBool arg12;
10529 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
10530 : uint32_t arg13_u32;
10531 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
10532 0 : return JS_FALSE;
10533 0 : uint16_t arg13 = (uint16_t) arg13_u32;
10534 : nsIDOMEventTarget *arg14;
10535 0 : xpc_qsSelfRef arg14ref;
10536 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
10537 0 : if (NS_FAILED(rv)) {
10538 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
10539 0 : return JS_FALSE;
10540 : }
10541 : double arg15_dbl;
10542 0 : if (!JS_ValueToNumber(cx, argv[15], &arg15_dbl))
10543 0 : return JS_FALSE;
10544 0 : float arg15 = (float) arg15_dbl;
10545 : uint32_t arg16_u32;
10546 0 : if (!JS_ValueToECMAUint32(cx, argv[16], &arg16_u32))
10547 0 : return JS_FALSE;
10548 0 : uint16_t arg16 = (uint16_t) arg16_u32;
10549 0 : rv = self->InitNSMouseEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16);
10550 0 : if (NS_FAILED(rv))
10551 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10552 0 : *vp = JSVAL_VOID;
10553 0 : return JS_TRUE;
10554 : }
10555 :
10556 : // === interface nsIDOMKeyEvent
10557 :
10558 : static JSBool
10559 0 : nsIDOMKeyEvent_GetCharCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10560 : {
10561 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10562 : nsIDOMKeyEvent *self;
10563 0 : xpc_qsSelfRef selfref;
10564 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10565 0 : return JS_FALSE;
10566 : nsresult rv;
10567 : PRUint32 result;
10568 0 : rv = self->GetCharCode(&result);
10569 0 : if (NS_FAILED(rv))
10570 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10571 0 : *vp = UINT_TO_JSVAL(result);
10572 0 : return JS_TRUE;
10573 : }
10574 :
10575 : static JSBool
10576 0 : nsIDOMKeyEvent_GetKeyCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10577 : {
10578 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10579 : nsIDOMKeyEvent *self;
10580 0 : xpc_qsSelfRef selfref;
10581 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10582 0 : return JS_FALSE;
10583 : nsresult rv;
10584 : PRUint32 result;
10585 0 : rv = self->GetKeyCode(&result);
10586 0 : if (NS_FAILED(rv))
10587 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10588 0 : *vp = UINT_TO_JSVAL(result);
10589 0 : return JS_TRUE;
10590 : }
10591 :
10592 : static JSBool
10593 0 : nsIDOMKeyEvent_GetAltKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10594 : {
10595 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10596 : nsIDOMKeyEvent *self;
10597 0 : xpc_qsSelfRef selfref;
10598 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10599 0 : return JS_FALSE;
10600 : nsresult rv;
10601 : bool result;
10602 0 : rv = self->GetAltKey(&result);
10603 0 : if (NS_FAILED(rv))
10604 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10605 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10606 0 : return JS_TRUE;
10607 : }
10608 :
10609 : static JSBool
10610 0 : nsIDOMKeyEvent_GetCtrlKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10611 : {
10612 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10613 : nsIDOMKeyEvent *self;
10614 0 : xpc_qsSelfRef selfref;
10615 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10616 0 : return JS_FALSE;
10617 : nsresult rv;
10618 : bool result;
10619 0 : rv = self->GetCtrlKey(&result);
10620 0 : if (NS_FAILED(rv))
10621 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10622 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10623 0 : return JS_TRUE;
10624 : }
10625 :
10626 : static JSBool
10627 0 : nsIDOMKeyEvent_GetShiftKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10628 : {
10629 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10630 : nsIDOMKeyEvent *self;
10631 0 : xpc_qsSelfRef selfref;
10632 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10633 0 : return JS_FALSE;
10634 : nsresult rv;
10635 : bool result;
10636 0 : rv = self->GetShiftKey(&result);
10637 0 : if (NS_FAILED(rv))
10638 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10639 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10640 0 : return JS_TRUE;
10641 : }
10642 :
10643 : static JSBool
10644 0 : nsIDOMKeyEvent_GetMetaKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10645 : {
10646 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10647 : nsIDOMKeyEvent *self;
10648 0 : xpc_qsSelfRef selfref;
10649 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10650 0 : return JS_FALSE;
10651 : nsresult rv;
10652 : bool result;
10653 0 : rv = self->GetMetaKey(&result);
10654 0 : if (NS_FAILED(rv))
10655 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10656 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10657 0 : return JS_TRUE;
10658 : }
10659 :
10660 : static JSBool
10661 0 : nsIDOMKeyEvent_InitKeyEvent(JSContext *cx, unsigned argc, jsval *vp)
10662 : {
10663 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10664 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10665 0 : if (!obj)
10666 0 : return JS_FALSE;
10667 : nsIDOMKeyEvent *self;
10668 0 : xpc_qsSelfRef selfref;
10669 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10670 0 : return JS_FALSE;
10671 0 : if (argc < 10)
10672 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10673 0 : jsval *argv = JS_ARGV(cx, vp);
10674 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10675 : xpc_qsDOMString::eDefaultNullBehavior,
10676 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10677 0 : if (!arg0.IsValid())
10678 0 : return JS_FALSE;
10679 : JSBool arg1;
10680 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10681 : JSBool arg2;
10682 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10683 : nsresult rv;
10684 : nsIDOMWindow *arg3;
10685 0 : xpc_qsSelfRef arg3ref;
10686 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10687 0 : if (NS_FAILED(rv)) {
10688 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10689 0 : return JS_FALSE;
10690 : }
10691 : JSBool arg4;
10692 0 : JS_ValueToBoolean(cx, argv[4], &arg4);
10693 : JSBool arg5;
10694 0 : JS_ValueToBoolean(cx, argv[5], &arg5);
10695 : JSBool arg6;
10696 0 : JS_ValueToBoolean(cx, argv[6], &arg6);
10697 : JSBool arg7;
10698 0 : JS_ValueToBoolean(cx, argv[7], &arg7);
10699 : uint32_t arg8;
10700 0 : if (!JS_ValueToECMAUint32(cx, argv[8], &arg8))
10701 0 : return JS_FALSE;
10702 : uint32_t arg9;
10703 0 : if (!JS_ValueToECMAUint32(cx, argv[9], &arg9))
10704 0 : return JS_FALSE;
10705 0 : rv = self->InitKeyEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
10706 0 : if (NS_FAILED(rv))
10707 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10708 0 : *vp = JSVAL_VOID;
10709 0 : return JS_TRUE;
10710 : }
10711 :
10712 : // === interface nsIDOMMutationEvent
10713 :
10714 : static JSBool
10715 0 : nsIDOMMutationEvent_GetRelatedNode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10716 : {
10717 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10718 0 : JSObject *callee = nsnull;
10719 : nsIDOMMutationEvent *self;
10720 0 : xpc_qsSelfRef selfref;
10721 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10722 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10723 0 : return JS_FALSE;
10724 : nsresult rv;
10725 0 : nsCOMPtr<nsIDOMNode> result;
10726 0 : rv = self->GetRelatedNode(getter_AddRefs(result));
10727 0 : if (NS_FAILED(rv))
10728 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10729 0 : if (!result) {
10730 0 : *vp = JSVAL_NULL;
10731 0 : return JS_TRUE;
10732 : }
10733 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10734 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10735 0 : return JS_TRUE;
10736 : }
10737 : // After this point do not use 'result'!
10738 0 : qsObjectHelper helper(result, cache);
10739 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
10740 : }
10741 :
10742 : static JSBool
10743 0 : nsIDOMMutationEvent_GetPrevValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10744 : {
10745 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10746 : nsIDOMMutationEvent *self;
10747 0 : xpc_qsSelfRef selfref;
10748 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10749 0 : return JS_FALSE;
10750 : nsresult rv;
10751 0 : nsString result;
10752 0 : rv = self->GetPrevValue(result);
10753 0 : if (NS_FAILED(rv))
10754 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10755 0 : return xpc::StringToJsval(cx, result, vp);
10756 : }
10757 :
10758 : static JSBool
10759 0 : nsIDOMMutationEvent_GetNewValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10760 : {
10761 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10762 : nsIDOMMutationEvent *self;
10763 0 : xpc_qsSelfRef selfref;
10764 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10765 0 : return JS_FALSE;
10766 : nsresult rv;
10767 0 : nsString result;
10768 0 : rv = self->GetNewValue(result);
10769 0 : if (NS_FAILED(rv))
10770 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10771 0 : return xpc::StringToJsval(cx, result, vp);
10772 : }
10773 :
10774 : static JSBool
10775 0 : nsIDOMMutationEvent_GetAttrName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10776 : {
10777 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10778 : nsIDOMMutationEvent *self;
10779 0 : xpc_qsSelfRef selfref;
10780 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10781 0 : return JS_FALSE;
10782 : nsresult rv;
10783 0 : nsString result;
10784 0 : rv = self->GetAttrName(result);
10785 0 : if (NS_FAILED(rv))
10786 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10787 0 : return xpc::StringToJsval(cx, result, vp);
10788 : }
10789 :
10790 : static JSBool
10791 0 : nsIDOMMutationEvent_GetAttrChange(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10792 : {
10793 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10794 : nsIDOMMutationEvent *self;
10795 0 : xpc_qsSelfRef selfref;
10796 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10797 0 : return JS_FALSE;
10798 : nsresult rv;
10799 : PRUint16 result;
10800 0 : rv = self->GetAttrChange(&result);
10801 0 : if (NS_FAILED(rv))
10802 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10803 0 : *vp = INT_TO_JSVAL((int32_t) result);
10804 0 : return JS_TRUE;
10805 : }
10806 :
10807 : static JSBool
10808 0 : nsIDOMMutationEvent_InitMutationEvent(JSContext *cx, unsigned argc, jsval *vp)
10809 : {
10810 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10811 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10812 0 : if (!obj)
10813 0 : return JS_FALSE;
10814 : nsIDOMMutationEvent *self;
10815 0 : xpc_qsSelfRef selfref;
10816 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10817 0 : return JS_FALSE;
10818 0 : if (argc < 8)
10819 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10820 0 : jsval *argv = JS_ARGV(cx, vp);
10821 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10822 : xpc_qsDOMString::eDefaultNullBehavior,
10823 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10824 0 : if (!arg0.IsValid())
10825 0 : return JS_FALSE;
10826 : JSBool arg1;
10827 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10828 : JSBool arg2;
10829 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10830 : nsresult rv;
10831 : nsIDOMNode *arg3;
10832 0 : xpc_qsSelfRef arg3ref;
10833 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10834 0 : if (NS_FAILED(rv)) {
10835 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10836 0 : return JS_FALSE;
10837 : }
10838 0 : xpc_qsDOMString arg4(cx, argv[4], &argv[4],
10839 : xpc_qsDOMString::eDefaultNullBehavior,
10840 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10841 0 : if (!arg4.IsValid())
10842 0 : return JS_FALSE;
10843 0 : xpc_qsDOMString arg5(cx, argv[5], &argv[5],
10844 : xpc_qsDOMString::eDefaultNullBehavior,
10845 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10846 0 : if (!arg5.IsValid())
10847 0 : return JS_FALSE;
10848 0 : xpc_qsDOMString arg6(cx, argv[6], &argv[6],
10849 : xpc_qsDOMString::eDefaultNullBehavior,
10850 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10851 0 : if (!arg6.IsValid())
10852 0 : return JS_FALSE;
10853 : uint32_t arg7_u32;
10854 0 : if (!JS_ValueToECMAUint32(cx, argv[7], &arg7_u32))
10855 0 : return JS_FALSE;
10856 0 : uint16_t arg7 = (uint16_t) arg7_u32;
10857 0 : rv = self->InitMutationEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
10858 0 : if (NS_FAILED(rv))
10859 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10860 0 : *vp = JSVAL_VOID;
10861 0 : return JS_TRUE;
10862 : }
10863 :
10864 : // === interface nsIDOMDragEvent
10865 :
10866 : static JSBool
10867 0 : nsIDOMDragEvent_GetDataTransfer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10868 : {
10869 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10870 0 : JSObject *callee = nsnull;
10871 : nsIDOMDragEvent *self;
10872 0 : xpc_qsSelfRef selfref;
10873 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10874 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10875 0 : return JS_FALSE;
10876 : nsresult rv;
10877 0 : nsCOMPtr<nsIDOMDataTransfer> result;
10878 0 : rv = self->GetDataTransfer(getter_AddRefs(result));
10879 0 : if (NS_FAILED(rv))
10880 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10881 0 : if (!result) {
10882 0 : *vp = JSVAL_NULL;
10883 0 : return JS_TRUE;
10884 : }
10885 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10886 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10887 0 : return JS_TRUE;
10888 : }
10889 : // After this point do not use 'result'!
10890 0 : qsObjectHelper helper(result, cache);
10891 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDataTransfer), &interfaces[k_nsIDOMDataTransfer], vp);
10892 : }
10893 :
10894 : static JSBool
10895 0 : nsIDOMDragEvent_InitDragEvent(JSContext *cx, unsigned argc, jsval *vp)
10896 : {
10897 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10898 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10899 0 : if (!obj)
10900 0 : return JS_FALSE;
10901 : nsIDOMDragEvent *self;
10902 0 : xpc_qsSelfRef selfref;
10903 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10904 0 : return JS_FALSE;
10905 0 : if (argc < 16)
10906 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10907 0 : jsval *argv = JS_ARGV(cx, vp);
10908 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10909 : xpc_qsDOMString::eDefaultNullBehavior,
10910 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10911 0 : if (!arg0.IsValid())
10912 0 : return JS_FALSE;
10913 : JSBool arg1;
10914 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10915 : JSBool arg2;
10916 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10917 : nsresult rv;
10918 : nsIDOMWindow *arg3;
10919 0 : xpc_qsSelfRef arg3ref;
10920 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10921 0 : if (NS_FAILED(rv)) {
10922 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10923 0 : return JS_FALSE;
10924 : }
10925 : int32_t arg4;
10926 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
10927 0 : return JS_FALSE;
10928 : int32_t arg5;
10929 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
10930 0 : return JS_FALSE;
10931 : int32_t arg6;
10932 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
10933 0 : return JS_FALSE;
10934 : int32_t arg7;
10935 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
10936 0 : return JS_FALSE;
10937 : int32_t arg8;
10938 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
10939 0 : return JS_FALSE;
10940 : JSBool arg9;
10941 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
10942 : JSBool arg10;
10943 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
10944 : JSBool arg11;
10945 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
10946 : JSBool arg12;
10947 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
10948 : uint32_t arg13_u32;
10949 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
10950 0 : return JS_FALSE;
10951 0 : uint16_t arg13 = (uint16_t) arg13_u32;
10952 : nsIDOMEventTarget *arg14;
10953 0 : xpc_qsSelfRef arg14ref;
10954 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
10955 0 : if (NS_FAILED(rv)) {
10956 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
10957 0 : return JS_FALSE;
10958 : }
10959 : nsIDOMDataTransfer *arg15;
10960 0 : xpc_qsSelfRef arg15ref;
10961 0 : rv = xpc_qsUnwrapArg<nsIDOMDataTransfer>(cx, argv[15], &arg15, &arg15ref.ptr, &argv[15]);
10962 0 : if (NS_FAILED(rv)) {
10963 0 : xpc_qsThrowBadArg(cx, rv, vp, 15);
10964 0 : return JS_FALSE;
10965 : }
10966 0 : rv = self->InitDragEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15);
10967 0 : if (NS_FAILED(rv))
10968 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10969 0 : *vp = JSVAL_VOID;
10970 0 : return JS_TRUE;
10971 : }
10972 :
10973 : // === interface nsIDOMScrollAreaEvent
10974 :
10975 : static JSBool
10976 0 : nsIDOMScrollAreaEvent_GetX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10977 : {
10978 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10979 : nsIDOMScrollAreaEvent *self;
10980 0 : xpc_qsSelfRef selfref;
10981 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10982 0 : return JS_FALSE;
10983 : nsresult rv;
10984 : float result;
10985 0 : rv = self->GetX(&result);
10986 0 : if (NS_FAILED(rv))
10987 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10988 0 : return JS_NewNumberValue(cx, result, vp);
10989 : }
10990 :
10991 : static JSBool
10992 0 : nsIDOMScrollAreaEvent_GetY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10993 : {
10994 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10995 : nsIDOMScrollAreaEvent *self;
10996 0 : xpc_qsSelfRef selfref;
10997 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10998 0 : return JS_FALSE;
10999 : nsresult rv;
11000 : float result;
11001 0 : rv = self->GetY(&result);
11002 0 : if (NS_FAILED(rv))
11003 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11004 0 : return JS_NewNumberValue(cx, result, vp);
11005 : }
11006 :
11007 : static JSBool
11008 0 : nsIDOMScrollAreaEvent_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11009 : {
11010 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11011 : nsIDOMScrollAreaEvent *self;
11012 0 : xpc_qsSelfRef selfref;
11013 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11014 0 : return JS_FALSE;
11015 : nsresult rv;
11016 : float result;
11017 0 : rv = self->GetWidth(&result);
11018 0 : if (NS_FAILED(rv))
11019 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11020 0 : return JS_NewNumberValue(cx, result, vp);
11021 : }
11022 :
11023 : static JSBool
11024 0 : nsIDOMScrollAreaEvent_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11025 : {
11026 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11027 : nsIDOMScrollAreaEvent *self;
11028 0 : xpc_qsSelfRef selfref;
11029 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11030 0 : return JS_FALSE;
11031 : nsresult rv;
11032 : float result;
11033 0 : rv = self->GetHeight(&result);
11034 0 : if (NS_FAILED(rv))
11035 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11036 0 : return JS_NewNumberValue(cx, result, vp);
11037 : }
11038 :
11039 : static JSBool
11040 0 : nsIDOMScrollAreaEvent_InitScrollAreaEvent(JSContext *cx, unsigned argc, jsval *vp)
11041 : {
11042 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11043 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11044 0 : if (!obj)
11045 0 : return JS_FALSE;
11046 : nsIDOMScrollAreaEvent *self;
11047 0 : xpc_qsSelfRef selfref;
11048 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11049 0 : return JS_FALSE;
11050 0 : if (argc < 9)
11051 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11052 0 : jsval *argv = JS_ARGV(cx, vp);
11053 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
11054 : xpc_qsDOMString::eDefaultNullBehavior,
11055 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11056 0 : if (!arg0.IsValid())
11057 0 : return JS_FALSE;
11058 : JSBool arg1;
11059 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
11060 : JSBool arg2;
11061 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
11062 : nsresult rv;
11063 : nsIDOMWindow *arg3;
11064 0 : xpc_qsSelfRef arg3ref;
11065 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
11066 0 : if (NS_FAILED(rv)) {
11067 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
11068 0 : return JS_FALSE;
11069 : }
11070 : int32_t arg4;
11071 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
11072 0 : return JS_FALSE;
11073 : double arg5_dbl;
11074 0 : if (!JS_ValueToNumber(cx, argv[5], &arg5_dbl))
11075 0 : return JS_FALSE;
11076 0 : float arg5 = (float) arg5_dbl;
11077 : double arg6_dbl;
11078 0 : if (!JS_ValueToNumber(cx, argv[6], &arg6_dbl))
11079 0 : return JS_FALSE;
11080 0 : float arg6 = (float) arg6_dbl;
11081 : double arg7_dbl;
11082 0 : if (!JS_ValueToNumber(cx, argv[7], &arg7_dbl))
11083 0 : return JS_FALSE;
11084 0 : float arg7 = (float) arg7_dbl;
11085 : double arg8_dbl;
11086 0 : if (!JS_ValueToNumber(cx, argv[8], &arg8_dbl))
11087 0 : return JS_FALSE;
11088 0 : float arg8 = (float) arg8_dbl;
11089 0 : rv = self->InitScrollAreaEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
11090 0 : if (NS_FAILED(rv))
11091 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11092 0 : *vp = JSVAL_VOID;
11093 0 : return JS_TRUE;
11094 : }
11095 :
11096 : // === interface nsIDOMNotifyPaintEvent
11097 :
11098 : static JSBool
11099 0 : nsIDOMNotifyPaintEvent_GetClientRects(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11100 : {
11101 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11102 0 : JSObject *callee = nsnull;
11103 : nsIDOMNotifyPaintEvent *self;
11104 0 : xpc_qsSelfRef selfref;
11105 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11106 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11107 0 : return JS_FALSE;
11108 : nsresult rv;
11109 0 : nsCOMPtr<nsIDOMClientRectList> result;
11110 0 : rv = self->GetClientRects(getter_AddRefs(result));
11111 0 : if (NS_FAILED(rv))
11112 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11113 0 : if (!result) {
11114 0 : *vp = JSVAL_NULL;
11115 0 : return JS_TRUE;
11116 : }
11117 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11118 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11119 0 : return JS_TRUE;
11120 : }
11121 : // After this point do not use 'result'!
11122 0 : qsObjectHelper helper(result, cache);
11123 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRectList), &interfaces[k_nsIDOMClientRectList], vp);
11124 : }
11125 :
11126 : static JSBool
11127 0 : nsIDOMNotifyPaintEvent_GetBoundingClientRect(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11128 : {
11129 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11130 0 : JSObject *callee = nsnull;
11131 : nsIDOMNotifyPaintEvent *self;
11132 0 : xpc_qsSelfRef selfref;
11133 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11134 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11135 0 : return JS_FALSE;
11136 : nsresult rv;
11137 0 : nsCOMPtr<nsIDOMClientRect> result;
11138 0 : rv = self->GetBoundingClientRect(getter_AddRefs(result));
11139 0 : if (NS_FAILED(rv))
11140 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11141 0 : if (!result) {
11142 0 : *vp = JSVAL_NULL;
11143 0 : return JS_TRUE;
11144 : }
11145 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11146 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11147 0 : return JS_TRUE;
11148 : }
11149 : // After this point do not use 'result'!
11150 0 : qsObjectHelper helper(result, cache);
11151 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
11152 : }
11153 :
11154 : static JSBool
11155 0 : nsIDOMNotifyPaintEvent_GetPaintRequests(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11156 : {
11157 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11158 0 : JSObject *callee = nsnull;
11159 : nsIDOMNotifyPaintEvent *self;
11160 0 : xpc_qsSelfRef selfref;
11161 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11162 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11163 0 : return JS_FALSE;
11164 : nsresult rv;
11165 0 : nsCOMPtr<nsIDOMPaintRequestList> result;
11166 0 : rv = self->GetPaintRequests(getter_AddRefs(result));
11167 0 : if (NS_FAILED(rv))
11168 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11169 0 : if (!result) {
11170 0 : *vp = JSVAL_NULL;
11171 0 : return JS_TRUE;
11172 : }
11173 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11174 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11175 0 : return JS_TRUE;
11176 : }
11177 : // After this point do not use 'result'!
11178 0 : qsObjectHelper helper(result, cache);
11179 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMPaintRequestList), &interfaces[k_nsIDOMPaintRequestList], vp);
11180 : }
11181 :
11182 : // === interface nsIDOMMessageEvent
11183 :
11184 : static JSBool
11185 0 : nsIDOMMessageEvent_GetData(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11186 : {
11187 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11188 : nsIDOMMessageEvent *self;
11189 0 : xpc_qsSelfRef selfref;
11190 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11191 0 : return JS_FALSE;
11192 : nsresult rv;
11193 0 : rv = self->GetData(cx, vp);
11194 0 : if (NS_FAILED(rv))
11195 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11196 0 : return JS_TRUE;
11197 : }
11198 :
11199 : static JSBool
11200 0 : nsIDOMMessageEvent_GetOrigin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11201 : {
11202 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11203 : nsIDOMMessageEvent *self;
11204 0 : xpc_qsSelfRef selfref;
11205 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11206 0 : return JS_FALSE;
11207 : nsresult rv;
11208 0 : nsString result;
11209 0 : rv = self->GetOrigin(result);
11210 0 : if (NS_FAILED(rv))
11211 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11212 0 : return xpc::StringToJsval(cx, result, vp);
11213 : }
11214 :
11215 : static JSBool
11216 0 : nsIDOMMessageEvent_GetLastEventId(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11217 : {
11218 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11219 : nsIDOMMessageEvent *self;
11220 0 : xpc_qsSelfRef selfref;
11221 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11222 0 : return JS_FALSE;
11223 : nsresult rv;
11224 0 : nsString result;
11225 0 : rv = self->GetLastEventId(result);
11226 0 : if (NS_FAILED(rv))
11227 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11228 0 : return xpc::StringToJsval(cx, result, vp);
11229 : }
11230 :
11231 : static JSBool
11232 0 : nsIDOMMessageEvent_GetSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11233 : {
11234 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11235 0 : JSObject *callee = nsnull;
11236 : nsIDOMMessageEvent *self;
11237 0 : xpc_qsSelfRef selfref;
11238 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11239 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11240 0 : return JS_FALSE;
11241 : nsresult rv;
11242 0 : nsCOMPtr<nsIDOMWindow> result;
11243 0 : rv = self->GetSource(getter_AddRefs(result));
11244 0 : if (NS_FAILED(rv))
11245 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11246 0 : if (!result) {
11247 0 : *vp = JSVAL_NULL;
11248 0 : return JS_TRUE;
11249 : }
11250 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11251 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11252 0 : return JS_TRUE;
11253 : }
11254 : // After this point do not use 'result'!
11255 0 : qsObjectHelper helper(result, cache);
11256 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
11257 : }
11258 :
11259 : static JSBool
11260 0 : nsIDOMMessageEvent_InitMessageEvent(JSContext *cx, unsigned argc, jsval *vp)
11261 : {
11262 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11263 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11264 0 : if (!obj)
11265 0 : return JS_FALSE;
11266 : nsIDOMMessageEvent *self;
11267 0 : xpc_qsSelfRef selfref;
11268 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11269 0 : return JS_FALSE;
11270 0 : if (argc < 7)
11271 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11272 0 : jsval *argv = JS_ARGV(cx, vp);
11273 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
11274 : xpc_qsDOMString::eDefaultNullBehavior,
11275 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11276 0 : if (!arg0.IsValid())
11277 0 : return JS_FALSE;
11278 : JSBool arg1;
11279 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
11280 : JSBool arg2;
11281 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
11282 0 : jsval arg3 = argv[3];
11283 0 : xpc_qsDOMString arg4(cx, argv[4], &argv[4],
11284 : xpc_qsDOMString::eDefaultNullBehavior,
11285 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11286 0 : if (!arg4.IsValid())
11287 0 : return JS_FALSE;
11288 0 : xpc_qsDOMString arg5(cx, argv[5], &argv[5],
11289 : xpc_qsDOMString::eDefaultNullBehavior,
11290 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11291 0 : if (!arg5.IsValid())
11292 0 : return JS_FALSE;
11293 : nsresult rv;
11294 : nsIDOMWindow *arg6;
11295 0 : xpc_qsSelfRef arg6ref;
11296 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[6], &arg6, &arg6ref.ptr, &argv[6]);
11297 0 : if (NS_FAILED(rv)) {
11298 0 : xpc_qsThrowBadArg(cx, rv, vp, 6);
11299 0 : return JS_FALSE;
11300 : }
11301 0 : rv = self->InitMessageEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
11302 0 : if (NS_FAILED(rv))
11303 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11304 0 : *vp = JSVAL_VOID;
11305 0 : return JS_TRUE;
11306 : }
11307 :
11308 : // === interface nsIDOMMouseScrollEvent
11309 :
11310 : static JSBool
11311 0 : nsIDOMMouseScrollEvent_GetAxis(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11312 : {
11313 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11314 : nsIDOMMouseScrollEvent *self;
11315 0 : xpc_qsSelfRef selfref;
11316 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11317 0 : return JS_FALSE;
11318 : nsresult rv;
11319 : PRInt32 result;
11320 0 : rv = self->GetAxis(&result);
11321 0 : if (NS_FAILED(rv))
11322 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11323 0 : *vp = INT_TO_JSVAL(result);
11324 0 : return JS_TRUE;
11325 : }
11326 :
11327 : static JSBool
11328 0 : nsIDOMMouseScrollEvent_InitMouseScrollEvent(JSContext *cx, unsigned argc, jsval *vp)
11329 : {
11330 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11331 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11332 0 : if (!obj)
11333 0 : return JS_FALSE;
11334 : nsIDOMMouseScrollEvent *self;
11335 0 : xpc_qsSelfRef selfref;
11336 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11337 0 : return JS_FALSE;
11338 0 : if (argc < 16)
11339 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11340 0 : jsval *argv = JS_ARGV(cx, vp);
11341 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
11342 : xpc_qsDOMString::eDefaultNullBehavior,
11343 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11344 0 : if (!arg0.IsValid())
11345 0 : return JS_FALSE;
11346 : JSBool arg1;
11347 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
11348 : JSBool arg2;
11349 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
11350 : nsresult rv;
11351 : nsIDOMWindow *arg3;
11352 0 : xpc_qsSelfRef arg3ref;
11353 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
11354 0 : if (NS_FAILED(rv)) {
11355 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
11356 0 : return JS_FALSE;
11357 : }
11358 : int32_t arg4;
11359 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
11360 0 : return JS_FALSE;
11361 : int32_t arg5;
11362 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
11363 0 : return JS_FALSE;
11364 : int32_t arg6;
11365 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
11366 0 : return JS_FALSE;
11367 : int32_t arg7;
11368 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
11369 0 : return JS_FALSE;
11370 : int32_t arg8;
11371 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
11372 0 : return JS_FALSE;
11373 : JSBool arg9;
11374 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
11375 : JSBool arg10;
11376 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
11377 : JSBool arg11;
11378 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
11379 : JSBool arg12;
11380 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
11381 : uint32_t arg13_u32;
11382 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
11383 0 : return JS_FALSE;
11384 0 : uint16_t arg13 = (uint16_t) arg13_u32;
11385 : nsIDOMEventTarget *arg14;
11386 0 : xpc_qsSelfRef arg14ref;
11387 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
11388 0 : if (NS_FAILED(rv)) {
11389 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
11390 0 : return JS_FALSE;
11391 : }
11392 : int32_t arg15;
11393 0 : if (!JS_ValueToECMAInt32(cx, argv[15], &arg15))
11394 0 : return JS_FALSE;
11395 0 : rv = self->InitMouseScrollEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15);
11396 0 : if (NS_FAILED(rv))
11397 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11398 0 : *vp = JSVAL_VOID;
11399 0 : return JS_TRUE;
11400 : }
11401 :
11402 : // === interface nsIDOMProgressEvent
11403 :
11404 : static JSBool
11405 0 : nsIDOMProgressEvent_GetLengthComputable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11406 : {
11407 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11408 : nsIDOMProgressEvent *self;
11409 0 : xpc_qsSelfRef selfref;
11410 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11411 0 : return JS_FALSE;
11412 : nsresult rv;
11413 : bool result;
11414 0 : rv = self->GetLengthComputable(&result);
11415 0 : if (NS_FAILED(rv))
11416 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11417 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
11418 0 : return JS_TRUE;
11419 : }
11420 :
11421 : static JSBool
11422 0 : nsIDOMProgressEvent_GetLoaded(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11423 : {
11424 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11425 : nsIDOMProgressEvent *self;
11426 0 : xpc_qsSelfRef selfref;
11427 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11428 0 : return JS_FALSE;
11429 : nsresult rv;
11430 : PRUint64 result;
11431 0 : rv = self->GetLoaded(&result);
11432 0 : if (NS_FAILED(rv))
11433 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11434 0 : return xpc_qsUint64ToJsval(cx, result, vp);
11435 : }
11436 :
11437 : static JSBool
11438 0 : nsIDOMProgressEvent_GetTotal(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11439 : {
11440 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11441 : nsIDOMProgressEvent *self;
11442 0 : xpc_qsSelfRef selfref;
11443 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11444 0 : return JS_FALSE;
11445 : nsresult rv;
11446 : PRUint64 result;
11447 0 : rv = self->GetTotal(&result);
11448 0 : if (NS_FAILED(rv))
11449 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11450 0 : return xpc_qsUint64ToJsval(cx, result, vp);
11451 : }
11452 :
11453 : // === interface nsIDOMNSEvent
11454 :
11455 : static JSBool
11456 0 : nsIDOMNSEvent_GetOriginalTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11457 : {
11458 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11459 0 : JSObject *callee = nsnull;
11460 : nsIDOMNSEvent *self;
11461 0 : xpc_qsSelfRef selfref;
11462 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11463 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11464 0 : return JS_FALSE;
11465 : nsresult rv;
11466 0 : nsCOMPtr<nsIDOMEventTarget> result;
11467 0 : rv = self->GetOriginalTarget(getter_AddRefs(result));
11468 0 : if (NS_FAILED(rv))
11469 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11470 0 : if (!result) {
11471 0 : *vp = JSVAL_NULL;
11472 0 : return JS_TRUE;
11473 : }
11474 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11475 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11476 0 : return JS_TRUE;
11477 : }
11478 : // After this point do not use 'result'!
11479 0 : qsObjectHelper helper(result, cache);
11480 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
11481 : }
11482 :
11483 : static JSBool
11484 0 : nsIDOMNSEvent_GetPreventDefault(JSContext *cx, unsigned argc, jsval *vp)
11485 : {
11486 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11487 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11488 0 : if (!obj)
11489 0 : return JS_FALSE;
11490 : nsIDOMNSEvent *self;
11491 0 : xpc_qsSelfRef selfref;
11492 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11493 0 : return JS_FALSE;
11494 : nsresult rv;
11495 : bool result;
11496 0 : rv = self->GetPreventDefault(&result);
11497 0 : if (NS_FAILED(rv))
11498 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11499 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
11500 0 : return JS_TRUE;
11501 : }
11502 :
11503 : // === interface nsIDOMUIEvent
11504 :
11505 : static JSBool
11506 0 : nsIDOMUIEvent_GetWhich(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11507 : {
11508 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11509 : nsIDOMUIEvent *self;
11510 0 : xpc_qsSelfRef selfref;
11511 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11512 0 : return JS_FALSE;
11513 : nsresult rv;
11514 : PRUint32 result;
11515 0 : rv = self->GetWhich(&result);
11516 0 : if (NS_FAILED(rv))
11517 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11518 0 : *vp = UINT_TO_JSVAL(result);
11519 0 : return JS_TRUE;
11520 : }
11521 :
11522 : static JSBool
11523 0 : nsIDOMUIEvent_GetRangeParent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11524 : {
11525 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11526 0 : JSObject *callee = nsnull;
11527 : nsIDOMUIEvent *self;
11528 0 : xpc_qsSelfRef selfref;
11529 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11530 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11531 0 : return JS_FALSE;
11532 : nsresult rv;
11533 0 : nsCOMPtr<nsIDOMNode> result;
11534 0 : rv = self->GetRangeParent(getter_AddRefs(result));
11535 0 : if (NS_FAILED(rv))
11536 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11537 0 : if (!result) {
11538 0 : *vp = JSVAL_NULL;
11539 0 : return JS_TRUE;
11540 : }
11541 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11542 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11543 0 : return JS_TRUE;
11544 : }
11545 : // After this point do not use 'result'!
11546 0 : qsObjectHelper helper(result, cache);
11547 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
11548 : }
11549 :
11550 : static JSBool
11551 0 : nsIDOMUIEvent_GetRangeOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11552 : {
11553 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11554 : nsIDOMUIEvent *self;
11555 0 : xpc_qsSelfRef selfref;
11556 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11557 0 : return JS_FALSE;
11558 : nsresult rv;
11559 : PRInt32 result;
11560 0 : rv = self->GetRangeOffset(&result);
11561 0 : if (NS_FAILED(rv))
11562 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11563 0 : *vp = INT_TO_JSVAL(result);
11564 0 : return JS_TRUE;
11565 : }
11566 :
11567 : static JSBool
11568 0 : nsIDOMUIEvent_GetPageX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11569 : {
11570 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11571 : nsIDOMUIEvent *self;
11572 0 : xpc_qsSelfRef selfref;
11573 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11574 0 : return JS_FALSE;
11575 : nsresult rv;
11576 : PRInt32 result;
11577 0 : rv = self->GetPageX(&result);
11578 0 : if (NS_FAILED(rv))
11579 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11580 0 : *vp = INT_TO_JSVAL(result);
11581 0 : return JS_TRUE;
11582 : }
11583 :
11584 : static JSBool
11585 0 : nsIDOMUIEvent_GetPageY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11586 : {
11587 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11588 : nsIDOMUIEvent *self;
11589 0 : xpc_qsSelfRef selfref;
11590 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11591 0 : return JS_FALSE;
11592 : nsresult rv;
11593 : PRInt32 result;
11594 0 : rv = self->GetPageY(&result);
11595 0 : if (NS_FAILED(rv))
11596 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11597 0 : *vp = INT_TO_JSVAL(result);
11598 0 : return JS_TRUE;
11599 : }
11600 :
11601 : static JSBool
11602 0 : nsIDOMUIEvent_GetIsChar(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11603 : {
11604 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11605 : nsIDOMUIEvent *self;
11606 0 : xpc_qsSelfRef selfref;
11607 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11608 0 : return JS_FALSE;
11609 : nsresult rv;
11610 : bool result;
11611 0 : rv = self->GetIsChar(&result);
11612 0 : if (NS_FAILED(rv))
11613 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11614 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
11615 0 : return JS_TRUE;
11616 : }
11617 :
11618 : // === interface nsIDOMTouch
11619 :
11620 : static JSBool
11621 0 : nsIDOMTouch_GetIdentifier(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11622 : {
11623 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11624 : nsIDOMTouch *self;
11625 0 : xpc_qsSelfRef selfref;
11626 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11627 0 : return JS_FALSE;
11628 : nsresult rv;
11629 : PRInt32 result;
11630 0 : rv = self->GetIdentifier(&result);
11631 0 : if (NS_FAILED(rv))
11632 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11633 0 : *vp = INT_TO_JSVAL(result);
11634 0 : return JS_TRUE;
11635 : }
11636 :
11637 : static JSBool
11638 0 : nsIDOMTouch_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11639 : {
11640 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11641 0 : JSObject *callee = nsnull;
11642 : nsIDOMTouch *self;
11643 0 : xpc_qsSelfRef selfref;
11644 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11645 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11646 0 : return JS_FALSE;
11647 : nsresult rv;
11648 0 : nsCOMPtr<nsIDOMEventTarget> result;
11649 0 : rv = self->GetTarget(getter_AddRefs(result));
11650 0 : if (NS_FAILED(rv))
11651 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11652 0 : if (!result) {
11653 0 : *vp = JSVAL_NULL;
11654 0 : return JS_TRUE;
11655 : }
11656 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11657 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11658 0 : return JS_TRUE;
11659 : }
11660 : // After this point do not use 'result'!
11661 0 : qsObjectHelper helper(result, cache);
11662 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
11663 : }
11664 :
11665 : static JSBool
11666 0 : nsIDOMTouch_GetPageX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11667 : {
11668 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11669 : nsIDOMTouch *self;
11670 0 : xpc_qsSelfRef selfref;
11671 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11672 0 : return JS_FALSE;
11673 : nsresult rv;
11674 : PRInt32 result;
11675 0 : rv = self->GetPageX(&result);
11676 0 : if (NS_FAILED(rv))
11677 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11678 0 : *vp = INT_TO_JSVAL(result);
11679 0 : return JS_TRUE;
11680 : }
11681 :
11682 : static JSBool
11683 0 : nsIDOMTouch_GetPageY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11684 : {
11685 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11686 : nsIDOMTouch *self;
11687 0 : xpc_qsSelfRef selfref;
11688 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11689 0 : return JS_FALSE;
11690 : nsresult rv;
11691 : PRInt32 result;
11692 0 : rv = self->GetPageY(&result);
11693 0 : if (NS_FAILED(rv))
11694 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11695 0 : *vp = INT_TO_JSVAL(result);
11696 0 : return JS_TRUE;
11697 : }
11698 :
11699 : static JSBool
11700 0 : nsIDOMTouch_GetScreenX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11701 : {
11702 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11703 : nsIDOMTouch *self;
11704 0 : xpc_qsSelfRef selfref;
11705 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11706 0 : return JS_FALSE;
11707 : nsresult rv;
11708 : PRInt32 result;
11709 0 : rv = self->GetScreenX(&result);
11710 0 : if (NS_FAILED(rv))
11711 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11712 0 : *vp = INT_TO_JSVAL(result);
11713 0 : return JS_TRUE;
11714 : }
11715 :
11716 : static JSBool
11717 0 : nsIDOMTouch_GetScreenY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11718 : {
11719 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11720 : nsIDOMTouch *self;
11721 0 : xpc_qsSelfRef selfref;
11722 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11723 0 : return JS_FALSE;
11724 : nsresult rv;
11725 : PRInt32 result;
11726 0 : rv = self->GetScreenY(&result);
11727 0 : if (NS_FAILED(rv))
11728 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11729 0 : *vp = INT_TO_JSVAL(result);
11730 0 : return JS_TRUE;
11731 : }
11732 :
11733 : static JSBool
11734 0 : nsIDOMTouch_GetClientX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11735 : {
11736 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11737 : nsIDOMTouch *self;
11738 0 : xpc_qsSelfRef selfref;
11739 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11740 0 : return JS_FALSE;
11741 : nsresult rv;
11742 : PRInt32 result;
11743 0 : rv = self->GetClientX(&result);
11744 0 : if (NS_FAILED(rv))
11745 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11746 0 : *vp = INT_TO_JSVAL(result);
11747 0 : return JS_TRUE;
11748 : }
11749 :
11750 : static JSBool
11751 0 : nsIDOMTouch_GetClientY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11752 : {
11753 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11754 : nsIDOMTouch *self;
11755 0 : xpc_qsSelfRef selfref;
11756 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11757 0 : return JS_FALSE;
11758 : nsresult rv;
11759 : PRInt32 result;
11760 0 : rv = self->GetClientY(&result);
11761 0 : if (NS_FAILED(rv))
11762 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11763 0 : *vp = INT_TO_JSVAL(result);
11764 0 : return JS_TRUE;
11765 : }
11766 :
11767 : static JSBool
11768 0 : nsIDOMTouch_GetRadiusX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11769 : {
11770 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11771 : nsIDOMTouch *self;
11772 0 : xpc_qsSelfRef selfref;
11773 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11774 0 : return JS_FALSE;
11775 : nsresult rv;
11776 : PRInt32 result;
11777 0 : rv = self->GetRadiusX(&result);
11778 0 : if (NS_FAILED(rv))
11779 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11780 0 : *vp = INT_TO_JSVAL(result);
11781 0 : return JS_TRUE;
11782 : }
11783 :
11784 : static JSBool
11785 0 : nsIDOMTouch_GetRadiusY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11786 : {
11787 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11788 : nsIDOMTouch *self;
11789 0 : xpc_qsSelfRef selfref;
11790 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11791 0 : return JS_FALSE;
11792 : nsresult rv;
11793 : PRInt32 result;
11794 0 : rv = self->GetRadiusY(&result);
11795 0 : if (NS_FAILED(rv))
11796 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11797 0 : *vp = INT_TO_JSVAL(result);
11798 0 : return JS_TRUE;
11799 : }
11800 :
11801 : static JSBool
11802 0 : nsIDOMTouch_GetRotationAngle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11803 : {
11804 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11805 : nsIDOMTouch *self;
11806 0 : xpc_qsSelfRef selfref;
11807 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11808 0 : return JS_FALSE;
11809 : nsresult rv;
11810 : float result;
11811 0 : rv = self->GetRotationAngle(&result);
11812 0 : if (NS_FAILED(rv))
11813 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11814 0 : return JS_NewNumberValue(cx, result, vp);
11815 : }
11816 :
11817 : static JSBool
11818 0 : nsIDOMTouch_GetForce(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11819 : {
11820 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11821 : nsIDOMTouch *self;
11822 0 : xpc_qsSelfRef selfref;
11823 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11824 0 : return JS_FALSE;
11825 : nsresult rv;
11826 : float result;
11827 0 : rv = self->GetForce(&result);
11828 0 : if (NS_FAILED(rv))
11829 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11830 0 : return JS_NewNumberValue(cx, result, vp);
11831 : }
11832 :
11833 : // === interface nsIDOMTouchList
11834 :
11835 : static JSBool
11836 0 : nsIDOMTouchList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11837 : {
11838 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11839 : nsIDOMTouchList *self;
11840 0 : xpc_qsSelfRef selfref;
11841 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11842 0 : return JS_FALSE;
11843 : nsresult rv;
11844 : PRUint32 result;
11845 0 : rv = self->GetLength(&result);
11846 0 : if (NS_FAILED(rv))
11847 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11848 0 : *vp = UINT_TO_JSVAL(result);
11849 0 : return JS_TRUE;
11850 : }
11851 :
11852 : static JSBool
11853 0 : nsIDOMTouchList_Item(JSContext *cx, unsigned argc, jsval *vp)
11854 : {
11855 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11856 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11857 0 : if (!obj)
11858 0 : return JS_FALSE;
11859 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
11860 : nsIDOMTouchList *self;
11861 0 : xpc_qsSelfRef selfref;
11862 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11863 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
11864 0 : return JS_FALSE;
11865 0 : if (argc < 1)
11866 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11867 0 : jsval *argv = JS_ARGV(cx, vp);
11868 : uint32_t arg0;
11869 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
11870 0 : return JS_FALSE;
11871 : nsresult rv;
11872 0 : nsCOMPtr<nsIDOMTouch> result;
11873 0 : rv = self->Item(arg0, getter_AddRefs(result));
11874 0 : if (NS_FAILED(rv))
11875 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11876 0 : if (!result) {
11877 0 : *vp = JSVAL_NULL;
11878 0 : return JS_TRUE;
11879 : }
11880 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11881 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11882 0 : return JS_TRUE;
11883 : }
11884 : // After this point do not use 'result'!
11885 0 : qsObjectHelper helper(result, cache);
11886 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouch), &interfaces[k_nsIDOMTouch], vp);
11887 : }
11888 :
11889 : static JSBool
11890 0 : nsIDOMTouchList_IdentifiedTouch(JSContext *cx, unsigned argc, jsval *vp)
11891 : {
11892 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11893 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11894 0 : if (!obj)
11895 0 : return JS_FALSE;
11896 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
11897 : nsIDOMTouchList *self;
11898 0 : xpc_qsSelfRef selfref;
11899 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11900 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
11901 0 : return JS_FALSE;
11902 0 : if (argc < 1)
11903 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11904 0 : jsval *argv = JS_ARGV(cx, vp);
11905 : int32_t arg0;
11906 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
11907 0 : return JS_FALSE;
11908 : nsresult rv;
11909 0 : nsCOMPtr<nsIDOMTouch> result;
11910 0 : rv = self->IdentifiedTouch(arg0, getter_AddRefs(result));
11911 0 : if (NS_FAILED(rv))
11912 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11913 0 : if (!result) {
11914 0 : *vp = JSVAL_NULL;
11915 0 : return JS_TRUE;
11916 : }
11917 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11918 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11919 0 : return JS_TRUE;
11920 : }
11921 : // After this point do not use 'result'!
11922 0 : qsObjectHelper helper(result, cache);
11923 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouch), &interfaces[k_nsIDOMTouch], vp);
11924 : }
11925 :
11926 : // === interface nsIDOMTouchEvent
11927 :
11928 : static JSBool
11929 0 : nsIDOMTouchEvent_GetTouches(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11930 : {
11931 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11932 0 : JSObject *callee = nsnull;
11933 : nsIDOMTouchEvent *self;
11934 0 : xpc_qsSelfRef selfref;
11935 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11936 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11937 0 : return JS_FALSE;
11938 : nsresult rv;
11939 0 : nsCOMPtr<nsIDOMTouchList> result;
11940 0 : rv = self->GetTouches(getter_AddRefs(result));
11941 0 : if (NS_FAILED(rv))
11942 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11943 0 : if (!result) {
11944 0 : *vp = JSVAL_NULL;
11945 0 : return JS_TRUE;
11946 : }
11947 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11948 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11949 0 : return JS_TRUE;
11950 : }
11951 : // After this point do not use 'result'!
11952 0 : qsObjectHelper helper(result, cache);
11953 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouchList), &interfaces[k_nsIDOMTouchList], vp);
11954 : }
11955 :
11956 : static JSBool
11957 0 : nsIDOMTouchEvent_GetTargetTouches(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11958 : {
11959 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11960 0 : JSObject *callee = nsnull;
11961 : nsIDOMTouchEvent *self;
11962 0 : xpc_qsSelfRef selfref;
11963 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11964 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11965 0 : return JS_FALSE;
11966 : nsresult rv;
11967 0 : nsCOMPtr<nsIDOMTouchList> result;
11968 0 : rv = self->GetTargetTouches(getter_AddRefs(result));
11969 0 : if (NS_FAILED(rv))
11970 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11971 0 : if (!result) {
11972 0 : *vp = JSVAL_NULL;
11973 0 : return JS_TRUE;
11974 : }
11975 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11976 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11977 0 : return JS_TRUE;
11978 : }
11979 : // After this point do not use 'result'!
11980 0 : qsObjectHelper helper(result, cache);
11981 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouchList), &interfaces[k_nsIDOMTouchList], vp);
11982 : }
11983 :
11984 : static JSBool
11985 0 : nsIDOMTouchEvent_GetChangedTouches(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11986 : {
11987 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11988 0 : JSObject *callee = nsnull;
11989 : nsIDOMTouchEvent *self;
11990 0 : xpc_qsSelfRef selfref;
11991 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11992 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11993 0 : return JS_FALSE;
11994 : nsresult rv;
11995 0 : nsCOMPtr<nsIDOMTouchList> result;
11996 0 : rv = self->GetChangedTouches(getter_AddRefs(result));
11997 0 : if (NS_FAILED(rv))
11998 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11999 0 : if (!result) {
12000 0 : *vp = JSVAL_NULL;
12001 0 : return JS_TRUE;
12002 : }
12003 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12004 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12005 0 : return JS_TRUE;
12006 : }
12007 : // After this point do not use 'result'!
12008 0 : qsObjectHelper helper(result, cache);
12009 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouchList), &interfaces[k_nsIDOMTouchList], vp);
12010 : }
12011 :
12012 : static JSBool
12013 0 : nsIDOMTouchEvent_GetAltKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12014 : {
12015 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12016 : nsIDOMTouchEvent *self;
12017 0 : xpc_qsSelfRef selfref;
12018 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12019 0 : return JS_FALSE;
12020 : nsresult rv;
12021 : bool result;
12022 0 : rv = self->GetAltKey(&result);
12023 0 : if (NS_FAILED(rv))
12024 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12025 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12026 0 : return JS_TRUE;
12027 : }
12028 :
12029 : static JSBool
12030 0 : nsIDOMTouchEvent_GetMetaKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12031 : {
12032 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12033 : nsIDOMTouchEvent *self;
12034 0 : xpc_qsSelfRef selfref;
12035 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12036 0 : return JS_FALSE;
12037 : nsresult rv;
12038 : bool result;
12039 0 : rv = self->GetMetaKey(&result);
12040 0 : if (NS_FAILED(rv))
12041 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12042 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12043 0 : return JS_TRUE;
12044 : }
12045 :
12046 : static JSBool
12047 0 : nsIDOMTouchEvent_GetCtrlKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12048 : {
12049 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12050 : nsIDOMTouchEvent *self;
12051 0 : xpc_qsSelfRef selfref;
12052 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12053 0 : return JS_FALSE;
12054 : nsresult rv;
12055 : bool result;
12056 0 : rv = self->GetCtrlKey(&result);
12057 0 : if (NS_FAILED(rv))
12058 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12059 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12060 0 : return JS_TRUE;
12061 : }
12062 :
12063 : static JSBool
12064 0 : nsIDOMTouchEvent_GetShiftKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12065 : {
12066 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12067 : nsIDOMTouchEvent *self;
12068 0 : xpc_qsSelfRef selfref;
12069 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12070 0 : return JS_FALSE;
12071 : nsresult rv;
12072 : bool result;
12073 0 : rv = self->GetShiftKey(&result);
12074 0 : if (NS_FAILED(rv))
12075 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12076 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12077 0 : return JS_TRUE;
12078 : }
12079 :
12080 : static JSBool
12081 0 : nsIDOMTouchEvent_InitTouchEvent(JSContext *cx, unsigned argc, jsval *vp)
12082 : {
12083 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12084 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
12085 0 : if (!obj)
12086 0 : return JS_FALSE;
12087 : nsIDOMTouchEvent *self;
12088 0 : xpc_qsSelfRef selfref;
12089 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
12090 0 : return JS_FALSE;
12091 0 : if (argc < 12)
12092 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
12093 0 : jsval *argv = JS_ARGV(cx, vp);
12094 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
12095 : xpc_qsDOMString::eDefaultNullBehavior,
12096 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12097 0 : if (!arg0.IsValid())
12098 0 : return JS_FALSE;
12099 : JSBool arg1;
12100 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
12101 : JSBool arg2;
12102 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
12103 : nsresult rv;
12104 : nsIDOMWindow *arg3;
12105 0 : xpc_qsSelfRef arg3ref;
12106 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
12107 0 : if (NS_FAILED(rv)) {
12108 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
12109 0 : return JS_FALSE;
12110 : }
12111 : int32_t arg4;
12112 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
12113 0 : return JS_FALSE;
12114 : JSBool arg5;
12115 0 : JS_ValueToBoolean(cx, argv[5], &arg5);
12116 : JSBool arg6;
12117 0 : JS_ValueToBoolean(cx, argv[6], &arg6);
12118 : JSBool arg7;
12119 0 : JS_ValueToBoolean(cx, argv[7], &arg7);
12120 : JSBool arg8;
12121 0 : JS_ValueToBoolean(cx, argv[8], &arg8);
12122 : nsIDOMTouchList *arg9;
12123 0 : xpc_qsSelfRef arg9ref;
12124 0 : rv = xpc_qsUnwrapArg<nsIDOMTouchList>(cx, argv[9], &arg9, &arg9ref.ptr, &argv[9]);
12125 0 : if (NS_FAILED(rv)) {
12126 0 : xpc_qsThrowBadArg(cx, rv, vp, 9);
12127 0 : return JS_FALSE;
12128 : }
12129 : nsIDOMTouchList *arg10;
12130 0 : xpc_qsSelfRef arg10ref;
12131 0 : rv = xpc_qsUnwrapArg<nsIDOMTouchList>(cx, argv[10], &arg10, &arg10ref.ptr, &argv[10]);
12132 0 : if (NS_FAILED(rv)) {
12133 0 : xpc_qsThrowBadArg(cx, rv, vp, 10);
12134 0 : return JS_FALSE;
12135 : }
12136 : nsIDOMTouchList *arg11;
12137 0 : xpc_qsSelfRef arg11ref;
12138 0 : rv = xpc_qsUnwrapArg<nsIDOMTouchList>(cx, argv[11], &arg11, &arg11ref.ptr, &argv[11]);
12139 0 : if (NS_FAILED(rv)) {
12140 0 : xpc_qsThrowBadArg(cx, rv, vp, 11);
12141 0 : return JS_FALSE;
12142 : }
12143 0 : rv = self->InitTouchEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
12144 0 : if (NS_FAILED(rv))
12145 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
12146 0 : *vp = JSVAL_VOID;
12147 0 : return JS_TRUE;
12148 : }
12149 :
12150 : // === interface nsIDOMHTMLAnchorElement
12151 :
12152 : static JSBool
12153 0 : nsIDOMHTMLAnchorElement_GetHref(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12154 : {
12155 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12156 : nsIDOMHTMLAnchorElement *self;
12157 0 : xpc_qsSelfRef selfref;
12158 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12159 0 : return JS_FALSE;
12160 : nsresult rv;
12161 0 : nsString result;
12162 0 : rv = self->GetHref(result);
12163 0 : if (NS_FAILED(rv))
12164 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12165 0 : return xpc::StringToJsval(cx, result, vp);
12166 : }
12167 :
12168 : static JSBool
12169 0 : nsIDOMHTMLAnchorElement_SetHref(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12170 : {
12171 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12172 : nsIDOMHTMLAnchorElement *self;
12173 0 : xpc_qsSelfRef selfref;
12174 0 : JS::AutoValueRooter tvr(cx);
12175 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12176 0 : return JS_FALSE;
12177 : xpc_qsDOMString arg0(cx, *vp, vp,
12178 : xpc_qsDOMString::eDefaultNullBehavior,
12179 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12180 0 : if (!arg0.IsValid())
12181 0 : return JS_FALSE;
12182 : nsresult rv;
12183 0 : rv = self->SetHref(arg0);
12184 0 : if (NS_FAILED(rv))
12185 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12186 0 : return JS_TRUE;
12187 : }
12188 :
12189 : static JSBool
12190 0 : nsIDOMHTMLAnchorElement_GetRel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12191 : {
12192 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12193 : nsIDOMHTMLAnchorElement *self;
12194 0 : xpc_qsSelfRef selfref;
12195 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12196 0 : return JS_FALSE;
12197 : nsresult rv;
12198 0 : nsString result;
12199 0 : rv = self->GetRel(result);
12200 0 : if (NS_FAILED(rv))
12201 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12202 0 : return xpc::StringToJsval(cx, result, vp);
12203 : }
12204 :
12205 : static JSBool
12206 0 : nsIDOMHTMLAnchorElement_SetRel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12207 : {
12208 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12209 : nsIDOMHTMLAnchorElement *self;
12210 0 : xpc_qsSelfRef selfref;
12211 0 : JS::AutoValueRooter tvr(cx);
12212 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12213 0 : return JS_FALSE;
12214 : xpc_qsDOMString arg0(cx, *vp, vp,
12215 : xpc_qsDOMString::eDefaultNullBehavior,
12216 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12217 0 : if (!arg0.IsValid())
12218 0 : return JS_FALSE;
12219 : nsresult rv;
12220 0 : rv = self->SetRel(arg0);
12221 0 : if (NS_FAILED(rv))
12222 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12223 0 : return JS_TRUE;
12224 : }
12225 :
12226 : static JSBool
12227 0 : nsIDOMHTMLAnchorElement_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12228 : {
12229 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12230 : nsIDOMHTMLAnchorElement *self;
12231 0 : xpc_qsSelfRef selfref;
12232 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12233 0 : return JS_FALSE;
12234 : nsresult rv;
12235 0 : nsString result;
12236 0 : rv = self->GetTarget(result);
12237 0 : if (NS_FAILED(rv))
12238 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12239 0 : return xpc::StringToJsval(cx, result, vp);
12240 : }
12241 :
12242 : static JSBool
12243 0 : nsIDOMHTMLAnchorElement_SetTarget(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12244 : {
12245 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12246 : nsIDOMHTMLAnchorElement *self;
12247 0 : xpc_qsSelfRef selfref;
12248 0 : JS::AutoValueRooter tvr(cx);
12249 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12250 0 : return JS_FALSE;
12251 : xpc_qsDOMString arg0(cx, *vp, vp,
12252 : xpc_qsDOMString::eDefaultNullBehavior,
12253 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12254 0 : if (!arg0.IsValid())
12255 0 : return JS_FALSE;
12256 : nsresult rv;
12257 0 : rv = self->SetTarget(arg0);
12258 0 : if (NS_FAILED(rv))
12259 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12260 0 : return JS_TRUE;
12261 : }
12262 :
12263 : static JSBool
12264 0 : nsIDOMHTMLAnchorElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12265 : {
12266 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12267 : nsIDOMHTMLAnchorElement *self;
12268 0 : xpc_qsSelfRef selfref;
12269 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12270 0 : return JS_FALSE;
12271 : nsresult rv;
12272 0 : nsString result;
12273 0 : rv = self->GetName(result);
12274 0 : if (NS_FAILED(rv))
12275 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12276 0 : return xpc::StringToJsval(cx, result, vp);
12277 : }
12278 :
12279 : static JSBool
12280 0 : nsIDOMHTMLAnchorElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12281 : {
12282 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12283 : nsIDOMHTMLAnchorElement *self;
12284 0 : xpc_qsSelfRef selfref;
12285 0 : JS::AutoValueRooter tvr(cx);
12286 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12287 0 : return JS_FALSE;
12288 : xpc_qsDOMString arg0(cx, *vp, vp,
12289 : xpc_qsDOMString::eDefaultNullBehavior,
12290 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12291 0 : if (!arg0.IsValid())
12292 0 : return JS_FALSE;
12293 : nsresult rv;
12294 0 : rv = self->SetName(arg0);
12295 0 : if (NS_FAILED(rv))
12296 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12297 0 : return JS_TRUE;
12298 : }
12299 :
12300 : static JSBool
12301 0 : nsIDOMHTMLAnchorElement_GetText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12302 : {
12303 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12304 : nsIDOMHTMLAnchorElement *self;
12305 0 : xpc_qsSelfRef selfref;
12306 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12307 0 : return JS_FALSE;
12308 : nsresult rv;
12309 0 : nsString result;
12310 0 : rv = self->GetText(result);
12311 0 : if (NS_FAILED(rv))
12312 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12313 0 : return xpc::StringToJsval(cx, result, vp);
12314 : }
12315 :
12316 : static JSBool
12317 0 : nsIDOMHTMLAnchorElement_SetText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12318 : {
12319 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12320 : nsIDOMHTMLAnchorElement *self;
12321 0 : xpc_qsSelfRef selfref;
12322 0 : JS::AutoValueRooter tvr(cx);
12323 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12324 0 : return JS_FALSE;
12325 : xpc_qsDOMString arg0(cx, *vp, vp,
12326 : xpc_qsDOMString::eStringify,
12327 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12328 0 : if (!arg0.IsValid())
12329 0 : return JS_FALSE;
12330 : nsresult rv;
12331 0 : rv = self->SetText(arg0);
12332 0 : if (NS_FAILED(rv))
12333 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12334 0 : return JS_TRUE;
12335 : }
12336 :
12337 : static JSBool
12338 0 : nsIDOMHTMLAnchorElement_GetSearch(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12339 : {
12340 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12341 : nsIDOMHTMLAnchorElement *self;
12342 0 : xpc_qsSelfRef selfref;
12343 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12344 0 : return JS_FALSE;
12345 : nsresult rv;
12346 0 : nsString result;
12347 0 : rv = self->GetSearch(result);
12348 0 : if (NS_FAILED(rv))
12349 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12350 0 : return xpc::StringToJsval(cx, result, vp);
12351 : }
12352 :
12353 : static JSBool
12354 0 : nsIDOMHTMLAnchorElement_SetSearch(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12355 : {
12356 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12357 : nsIDOMHTMLAnchorElement *self;
12358 0 : xpc_qsSelfRef selfref;
12359 0 : JS::AutoValueRooter tvr(cx);
12360 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12361 0 : return JS_FALSE;
12362 : xpc_qsDOMString arg0(cx, *vp, vp,
12363 : xpc_qsDOMString::eDefaultNullBehavior,
12364 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12365 0 : if (!arg0.IsValid())
12366 0 : return JS_FALSE;
12367 : nsresult rv;
12368 0 : rv = self->SetSearch(arg0);
12369 0 : if (NS_FAILED(rv))
12370 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12371 0 : return JS_TRUE;
12372 : }
12373 :
12374 : static JSBool
12375 0 : nsIDOMHTMLAnchorElement_GetHash(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12376 : {
12377 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12378 : nsIDOMHTMLAnchorElement *self;
12379 0 : xpc_qsSelfRef selfref;
12380 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12381 0 : return JS_FALSE;
12382 : nsresult rv;
12383 0 : nsString result;
12384 0 : rv = self->GetHash(result);
12385 0 : if (NS_FAILED(rv))
12386 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12387 0 : return xpc::StringToJsval(cx, result, vp);
12388 : }
12389 :
12390 : static JSBool
12391 0 : nsIDOMHTMLAnchorElement_SetHash(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12392 : {
12393 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12394 : nsIDOMHTMLAnchorElement *self;
12395 0 : xpc_qsSelfRef selfref;
12396 0 : JS::AutoValueRooter tvr(cx);
12397 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12398 0 : return JS_FALSE;
12399 : xpc_qsDOMString arg0(cx, *vp, vp,
12400 : xpc_qsDOMString::eDefaultNullBehavior,
12401 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12402 0 : if (!arg0.IsValid())
12403 0 : return JS_FALSE;
12404 : nsresult rv;
12405 0 : rv = self->SetHash(arg0);
12406 0 : if (NS_FAILED(rv))
12407 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12408 0 : return JS_TRUE;
12409 : }
12410 :
12411 : // === interface nsIDOMHTMLBaseElement
12412 :
12413 : static JSBool
12414 0 : nsIDOMHTMLBaseElement_GetHref(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12415 : {
12416 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12417 : nsIDOMHTMLBaseElement *self;
12418 0 : xpc_qsSelfRef selfref;
12419 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12420 0 : return JS_FALSE;
12421 : nsresult rv;
12422 0 : nsString result;
12423 0 : rv = self->GetHref(result);
12424 0 : if (NS_FAILED(rv))
12425 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12426 0 : return xpc::StringToJsval(cx, result, vp);
12427 : }
12428 :
12429 : static JSBool
12430 0 : nsIDOMHTMLBaseElement_SetHref(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12431 : {
12432 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12433 : nsIDOMHTMLBaseElement *self;
12434 0 : xpc_qsSelfRef selfref;
12435 0 : JS::AutoValueRooter tvr(cx);
12436 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12437 0 : return JS_FALSE;
12438 : xpc_qsDOMString arg0(cx, *vp, vp,
12439 : xpc_qsDOMString::eDefaultNullBehavior,
12440 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12441 0 : if (!arg0.IsValid())
12442 0 : return JS_FALSE;
12443 : nsresult rv;
12444 0 : rv = self->SetHref(arg0);
12445 0 : if (NS_FAILED(rv))
12446 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12447 0 : return JS_TRUE;
12448 : }
12449 :
12450 : static JSBool
12451 0 : nsIDOMHTMLBaseElement_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12452 : {
12453 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12454 : nsIDOMHTMLBaseElement *self;
12455 0 : xpc_qsSelfRef selfref;
12456 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12457 0 : return JS_FALSE;
12458 : nsresult rv;
12459 0 : nsString result;
12460 0 : rv = self->GetTarget(result);
12461 0 : if (NS_FAILED(rv))
12462 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12463 0 : return xpc::StringToJsval(cx, result, vp);
12464 : }
12465 :
12466 : static JSBool
12467 0 : nsIDOMHTMLBaseElement_SetTarget(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12468 : {
12469 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12470 : nsIDOMHTMLBaseElement *self;
12471 0 : xpc_qsSelfRef selfref;
12472 0 : JS::AutoValueRooter tvr(cx);
12473 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12474 0 : return JS_FALSE;
12475 : xpc_qsDOMString arg0(cx, *vp, vp,
12476 : xpc_qsDOMString::eDefaultNullBehavior,
12477 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12478 0 : if (!arg0.IsValid())
12479 0 : return JS_FALSE;
12480 : nsresult rv;
12481 0 : rv = self->SetTarget(arg0);
12482 0 : if (NS_FAILED(rv))
12483 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12484 0 : return JS_TRUE;
12485 : }
12486 :
12487 : // === interface nsIDOMHTMLButtonElement
12488 :
12489 : static JSBool
12490 0 : nsIDOMHTMLButtonElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12491 : {
12492 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12493 : nsIDOMHTMLButtonElement *self;
12494 0 : xpc_qsSelfRef selfref;
12495 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12496 0 : return JS_FALSE;
12497 : nsresult rv;
12498 0 : nsString result;
12499 0 : rv = self->GetName(result);
12500 0 : if (NS_FAILED(rv))
12501 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12502 0 : return xpc::StringToJsval(cx, result, vp);
12503 : }
12504 :
12505 : static JSBool
12506 0 : nsIDOMHTMLButtonElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12507 : {
12508 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12509 : nsIDOMHTMLButtonElement *self;
12510 0 : xpc_qsSelfRef selfref;
12511 0 : JS::AutoValueRooter tvr(cx);
12512 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12513 0 : return JS_FALSE;
12514 : xpc_qsDOMString arg0(cx, *vp, vp,
12515 : xpc_qsDOMString::eDefaultNullBehavior,
12516 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12517 0 : if (!arg0.IsValid())
12518 0 : return JS_FALSE;
12519 : nsresult rv;
12520 0 : rv = self->SetName(arg0);
12521 0 : if (NS_FAILED(rv))
12522 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12523 0 : return JS_TRUE;
12524 : }
12525 :
12526 : static JSBool
12527 0 : nsIDOMHTMLButtonElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12528 : {
12529 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12530 0 : JSObject *callee = nsnull;
12531 : nsIDOMHTMLButtonElement *self;
12532 0 : xpc_qsSelfRef selfref;
12533 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
12534 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
12535 0 : return JS_FALSE;
12536 : nsresult rv;
12537 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
12538 0 : rv = self->GetForm(getter_AddRefs(result));
12539 0 : if (NS_FAILED(rv))
12540 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12541 0 : if (!result) {
12542 0 : *vp = JSVAL_NULL;
12543 0 : return JS_TRUE;
12544 : }
12545 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12546 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12547 0 : return JS_TRUE;
12548 : }
12549 : // After this point do not use 'result'!
12550 0 : qsObjectHelper helper(result, cache);
12551 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
12552 : }
12553 :
12554 : static JSBool
12555 0 : nsIDOMHTMLButtonElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12556 : {
12557 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12558 : nsIDOMHTMLButtonElement *self;
12559 0 : xpc_qsSelfRef selfref;
12560 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12561 0 : return JS_FALSE;
12562 : nsresult rv;
12563 0 : nsString result;
12564 0 : rv = self->GetValue(result);
12565 0 : if (NS_FAILED(rv))
12566 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12567 0 : return xpc::StringToJsval(cx, result, vp);
12568 : }
12569 :
12570 : static JSBool
12571 0 : nsIDOMHTMLButtonElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12572 : {
12573 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12574 : nsIDOMHTMLButtonElement *self;
12575 0 : xpc_qsSelfRef selfref;
12576 0 : JS::AutoValueRooter tvr(cx);
12577 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12578 0 : return JS_FALSE;
12579 : xpc_qsDOMString arg0(cx, *vp, vp,
12580 : xpc_qsDOMString::eDefaultNullBehavior,
12581 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12582 0 : if (!arg0.IsValid())
12583 0 : return JS_FALSE;
12584 : nsresult rv;
12585 0 : rv = self->SetValue(arg0);
12586 0 : if (NS_FAILED(rv))
12587 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12588 0 : return JS_TRUE;
12589 : }
12590 :
12591 : static JSBool
12592 0 : nsIDOMHTMLButtonElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12593 : {
12594 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12595 : nsIDOMHTMLButtonElement *self;
12596 0 : xpc_qsSelfRef selfref;
12597 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12598 0 : return JS_FALSE;
12599 : nsresult rv;
12600 : bool result;
12601 0 : rv = self->GetDisabled(&result);
12602 0 : if (NS_FAILED(rv))
12603 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12604 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12605 0 : return JS_TRUE;
12606 : }
12607 :
12608 : static JSBool
12609 0 : nsIDOMHTMLButtonElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12610 : {
12611 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12612 : nsIDOMHTMLButtonElement *self;
12613 0 : xpc_qsSelfRef selfref;
12614 0 : JS::AutoValueRooter tvr(cx);
12615 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12616 0 : return JS_FALSE;
12617 : JSBool arg0;
12618 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12619 : nsresult rv;
12620 0 : rv = self->SetDisabled(arg0);
12621 0 : if (NS_FAILED(rv))
12622 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12623 0 : return JS_TRUE;
12624 : }
12625 :
12626 : // === interface nsIDOMHTMLCollection
12627 :
12628 : static JSBool
12629 0 : nsIDOMHTMLCollection_Item(JSContext *cx, unsigned argc, jsval *vp)
12630 : {
12631 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12632 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
12633 0 : if (!obj)
12634 0 : return JS_FALSE;
12635 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
12636 : nsIDOMHTMLCollection *self;
12637 0 : xpc_qsSelfRef selfref;
12638 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
12639 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
12640 0 : return JS_FALSE;
12641 0 : if (argc < 1)
12642 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
12643 0 : jsval *argv = JS_ARGV(cx, vp);
12644 : uint32_t arg0;
12645 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
12646 0 : return JS_FALSE;
12647 : nsresult rv;
12648 0 : nsCOMPtr<nsIDOMNode> result;
12649 0 : rv = self->Item(arg0, getter_AddRefs(result));
12650 0 : if (NS_FAILED(rv))
12651 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
12652 0 : if (!result) {
12653 0 : *vp = JSVAL_NULL;
12654 0 : return JS_TRUE;
12655 : }
12656 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12657 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12658 0 : return JS_TRUE;
12659 : }
12660 : // After this point do not use 'result'!
12661 0 : qsObjectHelper helper(result, cache);
12662 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
12663 : }
12664 :
12665 : static JSBool
12666 0 : nsIDOMHTMLCollection_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12667 : {
12668 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12669 : nsIDOMHTMLCollection *self;
12670 0 : xpc_qsSelfRef selfref;
12671 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12672 0 : return JS_FALSE;
12673 : nsresult rv;
12674 : PRUint32 result;
12675 0 : rv = self->GetLength(&result);
12676 0 : if (NS_FAILED(rv))
12677 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12678 0 : *vp = UINT_TO_JSVAL(result);
12679 0 : return JS_TRUE;
12680 : }
12681 :
12682 : // === interface nsIDOMHTMLCommandElement
12683 :
12684 : static JSBool
12685 0 : nsIDOMHTMLCommandElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12686 : {
12687 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12688 : nsIDOMHTMLCommandElement *self;
12689 0 : xpc_qsSelfRef selfref;
12690 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12691 0 : return JS_FALSE;
12692 : nsresult rv;
12693 0 : nsString result;
12694 0 : rv = self->GetType(result);
12695 0 : if (NS_FAILED(rv))
12696 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12697 0 : return xpc::StringToJsval(cx, result, vp);
12698 : }
12699 :
12700 : static JSBool
12701 0 : nsIDOMHTMLCommandElement_SetType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12702 : {
12703 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12704 : nsIDOMHTMLCommandElement *self;
12705 0 : xpc_qsSelfRef selfref;
12706 0 : JS::AutoValueRooter tvr(cx);
12707 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12708 0 : return JS_FALSE;
12709 : xpc_qsDOMString arg0(cx, *vp, vp,
12710 : xpc_qsDOMString::eDefaultNullBehavior,
12711 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12712 0 : if (!arg0.IsValid())
12713 0 : return JS_FALSE;
12714 : nsresult rv;
12715 0 : rv = self->SetType(arg0);
12716 0 : if (NS_FAILED(rv))
12717 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12718 0 : return JS_TRUE;
12719 : }
12720 :
12721 : static JSBool
12722 0 : nsIDOMHTMLCommandElement_GetLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12723 : {
12724 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12725 : nsIDOMHTMLCommandElement *self;
12726 0 : xpc_qsSelfRef selfref;
12727 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12728 0 : return JS_FALSE;
12729 : nsresult rv;
12730 0 : nsString result;
12731 0 : rv = self->GetLabel(result);
12732 0 : if (NS_FAILED(rv))
12733 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12734 0 : return xpc::StringToJsval(cx, result, vp);
12735 : }
12736 :
12737 : static JSBool
12738 0 : nsIDOMHTMLCommandElement_SetLabel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12739 : {
12740 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12741 : nsIDOMHTMLCommandElement *self;
12742 0 : xpc_qsSelfRef selfref;
12743 0 : JS::AutoValueRooter tvr(cx);
12744 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12745 0 : return JS_FALSE;
12746 : xpc_qsDOMString arg0(cx, *vp, vp,
12747 : xpc_qsDOMString::eDefaultNullBehavior,
12748 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12749 0 : if (!arg0.IsValid())
12750 0 : return JS_FALSE;
12751 : nsresult rv;
12752 0 : rv = self->SetLabel(arg0);
12753 0 : if (NS_FAILED(rv))
12754 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12755 0 : return JS_TRUE;
12756 : }
12757 :
12758 : static JSBool
12759 0 : nsIDOMHTMLCommandElement_GetIcon(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12760 : {
12761 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12762 : nsIDOMHTMLCommandElement *self;
12763 0 : xpc_qsSelfRef selfref;
12764 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12765 0 : return JS_FALSE;
12766 : nsresult rv;
12767 0 : nsString result;
12768 0 : rv = self->GetIcon(result);
12769 0 : if (NS_FAILED(rv))
12770 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12771 0 : return xpc::StringToJsval(cx, result, vp);
12772 : }
12773 :
12774 : static JSBool
12775 0 : nsIDOMHTMLCommandElement_SetIcon(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12776 : {
12777 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12778 : nsIDOMHTMLCommandElement *self;
12779 0 : xpc_qsSelfRef selfref;
12780 0 : JS::AutoValueRooter tvr(cx);
12781 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12782 0 : return JS_FALSE;
12783 : xpc_qsDOMString arg0(cx, *vp, vp,
12784 : xpc_qsDOMString::eDefaultNullBehavior,
12785 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12786 0 : if (!arg0.IsValid())
12787 0 : return JS_FALSE;
12788 : nsresult rv;
12789 0 : rv = self->SetIcon(arg0);
12790 0 : if (NS_FAILED(rv))
12791 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12792 0 : return JS_TRUE;
12793 : }
12794 :
12795 : static JSBool
12796 0 : nsIDOMHTMLCommandElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12797 : {
12798 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12799 : nsIDOMHTMLCommandElement *self;
12800 0 : xpc_qsSelfRef selfref;
12801 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12802 0 : return JS_FALSE;
12803 : nsresult rv;
12804 : bool result;
12805 0 : rv = self->GetDisabled(&result);
12806 0 : if (NS_FAILED(rv))
12807 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12808 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12809 0 : return JS_TRUE;
12810 : }
12811 :
12812 : static JSBool
12813 0 : nsIDOMHTMLCommandElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12814 : {
12815 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12816 : nsIDOMHTMLCommandElement *self;
12817 0 : xpc_qsSelfRef selfref;
12818 0 : JS::AutoValueRooter tvr(cx);
12819 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12820 0 : return JS_FALSE;
12821 : JSBool arg0;
12822 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12823 : nsresult rv;
12824 0 : rv = self->SetDisabled(arg0);
12825 0 : if (NS_FAILED(rv))
12826 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12827 0 : return JS_TRUE;
12828 : }
12829 :
12830 : static JSBool
12831 0 : nsIDOMHTMLCommandElement_GetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12832 : {
12833 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12834 : nsIDOMHTMLCommandElement *self;
12835 0 : xpc_qsSelfRef selfref;
12836 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12837 0 : return JS_FALSE;
12838 : nsresult rv;
12839 : bool result;
12840 0 : rv = self->GetDefaultChecked(&result);
12841 0 : if (NS_FAILED(rv))
12842 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12843 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12844 0 : return JS_TRUE;
12845 : }
12846 :
12847 : static JSBool
12848 0 : nsIDOMHTMLCommandElement_SetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12849 : {
12850 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12851 : nsIDOMHTMLCommandElement *self;
12852 0 : xpc_qsSelfRef selfref;
12853 0 : JS::AutoValueRooter tvr(cx);
12854 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12855 0 : return JS_FALSE;
12856 : JSBool arg0;
12857 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12858 : nsresult rv;
12859 0 : rv = self->SetDefaultChecked(arg0);
12860 0 : if (NS_FAILED(rv))
12861 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12862 0 : return JS_TRUE;
12863 : }
12864 :
12865 : static JSBool
12866 0 : nsIDOMHTMLCommandElement_GetChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12867 : {
12868 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12869 : nsIDOMHTMLCommandElement *self;
12870 0 : xpc_qsSelfRef selfref;
12871 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12872 0 : return JS_FALSE;
12873 : nsresult rv;
12874 : bool result;
12875 0 : rv = self->GetChecked(&result);
12876 0 : if (NS_FAILED(rv))
12877 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12878 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12879 0 : return JS_TRUE;
12880 : }
12881 :
12882 : static JSBool
12883 0 : nsIDOMHTMLCommandElement_SetChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12884 : {
12885 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12886 : nsIDOMHTMLCommandElement *self;
12887 0 : xpc_qsSelfRef selfref;
12888 0 : JS::AutoValueRooter tvr(cx);
12889 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12890 0 : return JS_FALSE;
12891 : JSBool arg0;
12892 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12893 : nsresult rv;
12894 0 : rv = self->SetChecked(arg0);
12895 0 : if (NS_FAILED(rv))
12896 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12897 0 : return JS_TRUE;
12898 : }
12899 :
12900 : static JSBool
12901 0 : nsIDOMHTMLCommandElement_GetRadiogroup(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12902 : {
12903 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12904 : nsIDOMHTMLCommandElement *self;
12905 0 : xpc_qsSelfRef selfref;
12906 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12907 0 : return JS_FALSE;
12908 : nsresult rv;
12909 0 : nsString result;
12910 0 : rv = self->GetRadiogroup(result);
12911 0 : if (NS_FAILED(rv))
12912 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12913 0 : return xpc::StringToJsval(cx, result, vp);
12914 : }
12915 :
12916 : static JSBool
12917 0 : nsIDOMHTMLCommandElement_SetRadiogroup(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12918 : {
12919 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12920 : nsIDOMHTMLCommandElement *self;
12921 0 : xpc_qsSelfRef selfref;
12922 0 : JS::AutoValueRooter tvr(cx);
12923 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12924 0 : return JS_FALSE;
12925 : xpc_qsDOMString arg0(cx, *vp, vp,
12926 : xpc_qsDOMString::eDefaultNullBehavior,
12927 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12928 0 : if (!arg0.IsValid())
12929 0 : return JS_FALSE;
12930 : nsresult rv;
12931 0 : rv = self->SetRadiogroup(arg0);
12932 0 : if (NS_FAILED(rv))
12933 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12934 0 : return JS_TRUE;
12935 : }
12936 :
12937 : // === interface nsIDOMHTMLDocument
12938 :
12939 : static JSBool
12940 0 : nsIDOMHTMLDocument_GetBody(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12941 : {
12942 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12943 0 : JSObject *callee = nsnull;
12944 : nsHTMLDocument *self;
12945 0 : xpc_qsSelfRef selfref;
12946 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
12947 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
12948 0 : return JS_FALSE;
12949 0 : nsIContent *result = self->GetBody();
12950 : #ifdef DEBUG
12951 : nsresult debug_rv;
12952 0 : nsCOMPtr<nsIDOMHTMLDocument> debug_self;
12953 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
12954 0 : nsCOMPtr<nsIDOMHTMLElement> debug_result;
12955 0 : debug_rv = debug_self->GetBody(getter_AddRefs(debug_result));
12956 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
12957 : "Got the wrong answer from the custom method call!");
12958 : #endif
12959 0 : if (!result) {
12960 0 : *vp = JSVAL_NULL;
12961 0 : return JS_TRUE;
12962 : }
12963 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12964 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12965 0 : return JS_TRUE;
12966 : }
12967 : // After this point do not use 'result'!
12968 0 : qsObjectHelper helper(result, cache);
12969 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
12970 : }
12971 :
12972 : static JSBool
12973 0 : nsIDOMHTMLDocument_SetBody(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12974 : {
12975 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12976 : nsHTMLDocument *self;
12977 0 : xpc_qsSelfRef selfref;
12978 0 : JS::AutoValueRooter tvr(cx);
12979 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12980 0 : return JS_FALSE;
12981 : nsresult rv;
12982 : nsIDOMHTMLElement *arg0;
12983 0 : xpc_qsSelfRef arg0ref;
12984 0 : rv = xpc_qsUnwrapArg<nsIDOMHTMLElement>(cx, *vp, &arg0, &arg0ref.ptr, vp);
12985 0 : if (NS_FAILED(rv)) {
12986 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12987 0 : return JS_FALSE;
12988 : }
12989 0 : rv = self->SetBody(arg0);
12990 0 : if (NS_FAILED(rv))
12991 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12992 0 : return JS_TRUE;
12993 : }
12994 :
12995 : static JSBool
12996 0 : nsIDOMHTMLDocument_GetElementsByName(JSContext *cx, unsigned argc, jsval *vp)
12997 : {
12998 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12999 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13000 0 : if (!obj)
13001 0 : return JS_FALSE;
13002 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
13003 : nsHTMLDocument *self;
13004 0 : xpc_qsSelfRef selfref;
13005 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13006 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
13007 0 : return JS_FALSE;
13008 0 : if (argc < 1)
13009 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
13010 0 : jsval *argv = JS_ARGV(cx, vp);
13011 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
13012 : xpc_qsDOMString::eDefaultNullBehavior,
13013 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13014 0 : if (!arg0.IsValid())
13015 0 : return JS_FALSE;
13016 0 : nsRefPtr<nsContentList> result = self->GetElementsByName(arg0);
13017 0 : if (!result) {
13018 0 : *vp = JSVAL_NULL;
13019 0 : return JS_TRUE;
13020 : }
13021 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13022 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13023 0 : return JS_TRUE;
13024 : }
13025 : // After this point do not use 'result'!
13026 0 : qsObjectHelper helper(result, cache);
13027 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
13028 : }
13029 :
13030 : static JSBool
13031 0 : nsIDOMHTMLDocument_GetAnchors(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13032 : {
13033 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13034 0 : JSObject *callee = nsnull;
13035 : nsHTMLDocument *self;
13036 0 : xpc_qsSelfRef selfref;
13037 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13038 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13039 0 : return JS_FALSE;
13040 : nsresult rv;
13041 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13042 0 : rv = self->GetAnchors(getter_AddRefs(result));
13043 0 : if (NS_FAILED(rv))
13044 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13045 0 : if (!result) {
13046 0 : *vp = JSVAL_NULL;
13047 0 : return JS_TRUE;
13048 : }
13049 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13050 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13051 0 : return JS_TRUE;
13052 : }
13053 : // After this point do not use 'result'!
13054 0 : qsObjectHelper helper(result, cache);
13055 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13056 : }
13057 :
13058 : static JSBool
13059 0 : nsIDOMHTMLDocument_GetLinks(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13060 : {
13061 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13062 0 : JSObject *callee = nsnull;
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, &lccx, true))
13067 0 : return JS_FALSE;
13068 : nsresult rv;
13069 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13070 0 : rv = self->GetLinks(getter_AddRefs(result));
13071 0 : if (NS_FAILED(rv))
13072 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13073 0 : if (!result) {
13074 0 : *vp = JSVAL_NULL;
13075 0 : return JS_TRUE;
13076 : }
13077 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13078 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13079 0 : return JS_TRUE;
13080 : }
13081 : // After this point do not use 'result'!
13082 0 : qsObjectHelper helper(result, cache);
13083 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13084 : }
13085 :
13086 : static JSBool
13087 0 : nsIDOMHTMLDocument_GetURL(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13088 : {
13089 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13090 : nsHTMLDocument *self;
13091 0 : xpc_qsSelfRef selfref;
13092 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13093 0 : return JS_FALSE;
13094 : nsresult rv;
13095 0 : nsString result;
13096 0 : rv = self->GetURL(result);
13097 0 : if (NS_FAILED(rv))
13098 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13099 0 : return xpc::StringToJsval(cx, result, vp);
13100 : }
13101 :
13102 : static JSBool
13103 0 : nsIDOMHTMLDocument_GetForms(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13104 : {
13105 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13106 0 : JSObject *callee = nsnull;
13107 : nsHTMLDocument *self;
13108 0 : xpc_qsSelfRef selfref;
13109 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13110 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13111 0 : return JS_FALSE;
13112 : nsresult rv;
13113 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13114 0 : rv = self->GetForms(getter_AddRefs(result));
13115 0 : if (NS_FAILED(rv))
13116 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13117 0 : if (!result) {
13118 0 : *vp = JSVAL_NULL;
13119 0 : return JS_TRUE;
13120 : }
13121 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13122 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13123 0 : return JS_TRUE;
13124 : }
13125 : // After this point do not use 'result'!
13126 0 : qsObjectHelper helper(result, cache);
13127 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13128 : }
13129 :
13130 : static JSBool
13131 0 : nsIDOMHTMLDocument_GetCookie(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13132 : {
13133 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13134 : nsHTMLDocument *self;
13135 0 : xpc_qsSelfRef selfref;
13136 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13137 0 : return JS_FALSE;
13138 : nsresult rv;
13139 0 : nsString result;
13140 0 : rv = self->GetCookie(result);
13141 0 : if (NS_FAILED(rv))
13142 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13143 0 : return xpc::StringToJsval(cx, result, vp);
13144 : }
13145 :
13146 : static JSBool
13147 0 : nsIDOMHTMLDocument_SetCookie(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13148 : {
13149 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13150 : nsHTMLDocument *self;
13151 0 : xpc_qsSelfRef selfref;
13152 0 : JS::AutoValueRooter tvr(cx);
13153 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13154 0 : return JS_FALSE;
13155 : xpc_qsDOMString arg0(cx, *vp, vp,
13156 : xpc_qsDOMString::eDefaultNullBehavior,
13157 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13158 0 : if (!arg0.IsValid())
13159 0 : return JS_FALSE;
13160 : nsresult rv;
13161 0 : rv = self->SetCookie(arg0);
13162 0 : if (NS_FAILED(rv))
13163 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13164 0 : return JS_TRUE;
13165 : }
13166 :
13167 : static JSBool
13168 0 : nsIDOMHTMLDocument_GetImages(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13169 : {
13170 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13171 0 : JSObject *callee = nsnull;
13172 : nsHTMLDocument *self;
13173 0 : xpc_qsSelfRef selfref;
13174 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13175 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13176 0 : return JS_FALSE;
13177 : nsresult rv;
13178 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13179 0 : rv = self->GetImages(getter_AddRefs(result));
13180 0 : if (NS_FAILED(rv))
13181 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13182 0 : if (!result) {
13183 0 : *vp = JSVAL_NULL;
13184 0 : return JS_TRUE;
13185 : }
13186 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13187 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13188 0 : return JS_TRUE;
13189 : }
13190 : // After this point do not use 'result'!
13191 0 : qsObjectHelper helper(result, cache);
13192 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13193 : }
13194 :
13195 : static JSBool
13196 0 : nsIDOMHTMLDocument_Write(JSContext *cx, unsigned argc, jsval *vp)
13197 : {
13198 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13199 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13200 0 : if (!obj)
13201 0 : return JS_FALSE;
13202 : nsHTMLDocument *self;
13203 0 : xpc_qsSelfRef selfref;
13204 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13205 0 : return JS_FALSE;
13206 0 : jsval *argv = JS_ARGV(cx, vp);
13207 : xpc_qsDOMString arg0(cx, (0 < argc ? argv[0] : JSVAL_NULL), (0 < argc ? &argv[0] : NULL),
13208 : xpc_qsDOMString::eStringify,
13209 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13210 0 : if (!arg0.IsValid())
13211 0 : return JS_FALSE;
13212 : nsresult rv;
13213 :
13214 0 : nsAString &str = arg0;
13215 0 : for (unsigned i = 1; i < argc; ++i) {
13216 0 : xpc_qsDOMString next_arg(cx, argv[i], &argv[i],
13217 : xpc_qsDOMString::eStringify,
13218 0 : xpc_qsDOMString::eStringify);
13219 0 : if (!next_arg.IsValid())
13220 0 : return JS_FALSE;
13221 :
13222 0 : str.Append(next_arg);
13223 : }
13224 :
13225 0 : rv = self->Write(arg0, cx);
13226 :
13227 0 : if (NS_FAILED(rv))
13228 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13229 0 : *vp = JSVAL_VOID;
13230 0 : return JS_TRUE;
13231 : }
13232 :
13233 : static JSBool
13234 0 : nsIDOMHTMLDocument_Writeln(JSContext *cx, unsigned argc, jsval *vp)
13235 : {
13236 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13237 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13238 0 : if (!obj)
13239 0 : return JS_FALSE;
13240 : nsHTMLDocument *self;
13241 0 : xpc_qsSelfRef selfref;
13242 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13243 0 : return JS_FALSE;
13244 0 : jsval *argv = JS_ARGV(cx, vp);
13245 : xpc_qsDOMString arg0(cx, (0 < argc ? argv[0] : JSVAL_NULL), (0 < argc ? &argv[0] : NULL),
13246 : xpc_qsDOMString::eStringify,
13247 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13248 0 : if (!arg0.IsValid())
13249 0 : return JS_FALSE;
13250 : nsresult rv;
13251 :
13252 0 : nsAString &str = arg0;
13253 0 : for (unsigned i = 1; i < argc; ++i) {
13254 0 : xpc_qsDOMString next_arg(cx, argv[i], &argv[i],
13255 : xpc_qsDOMString::eStringify,
13256 0 : xpc_qsDOMString::eStringify);
13257 0 : if (!next_arg.IsValid())
13258 0 : return JS_FALSE;
13259 :
13260 0 : str.Append(next_arg);
13261 : }
13262 :
13263 0 : rv = self->Writeln(arg0, cx);
13264 :
13265 0 : if (NS_FAILED(rv))
13266 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13267 0 : *vp = JSVAL_VOID;
13268 0 : return JS_TRUE;
13269 : }
13270 :
13271 : static JSBool
13272 0 : nsIDOMHTMLDocument_GetDomain(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13273 : {
13274 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13275 : nsHTMLDocument *self;
13276 0 : xpc_qsSelfRef selfref;
13277 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13278 0 : return JS_FALSE;
13279 : nsresult rv;
13280 0 : nsString result;
13281 0 : rv = self->GetDomain(result);
13282 0 : if (NS_FAILED(rv))
13283 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13284 0 : return xpc::StringToJsval(cx, result, vp);
13285 : }
13286 :
13287 : static JSBool
13288 0 : nsIDOMHTMLDocument_SetDomain(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13289 : {
13290 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13291 : nsHTMLDocument *self;
13292 0 : xpc_qsSelfRef selfref;
13293 0 : JS::AutoValueRooter tvr(cx);
13294 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13295 0 : return JS_FALSE;
13296 : xpc_qsDOMString arg0(cx, *vp, vp,
13297 : xpc_qsDOMString::eDefaultNullBehavior,
13298 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13299 0 : if (!arg0.IsValid())
13300 0 : return JS_FALSE;
13301 : nsresult rv;
13302 0 : rv = self->SetDomain(arg0);
13303 0 : if (NS_FAILED(rv))
13304 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13305 0 : return JS_TRUE;
13306 : }
13307 :
13308 : static JSBool
13309 0 : nsIDOMHTMLDocument_GetSelection(JSContext *cx, unsigned argc, jsval *vp)
13310 : {
13311 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13312 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13313 0 : if (!obj)
13314 0 : return JS_FALSE;
13315 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
13316 : nsHTMLDocument *self;
13317 0 : xpc_qsSelfRef selfref;
13318 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13319 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
13320 0 : return JS_FALSE;
13321 : nsresult rv;
13322 0 : nsCOMPtr<nsISelection> result;
13323 0 : rv = self->GetSelection(getter_AddRefs(result));
13324 0 : if (NS_FAILED(rv))
13325 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13326 0 : if (!result) {
13327 0 : *vp = JSVAL_NULL;
13328 0 : return JS_TRUE;
13329 : }
13330 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13331 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13332 0 : return JS_TRUE;
13333 : }
13334 : // After this point do not use 'result'!
13335 0 : qsObjectHelper helper(result, cache);
13336 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISelection), &interfaces[k_nsISelection], vp);
13337 : }
13338 :
13339 : static JSBool
13340 0 : nsIDOMHTMLDocument_GetDesignMode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13341 : {
13342 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13343 : nsHTMLDocument *self;
13344 0 : xpc_qsSelfRef selfref;
13345 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13346 0 : return JS_FALSE;
13347 : nsresult rv;
13348 0 : nsString result;
13349 0 : rv = self->GetDesignMode(result);
13350 0 : if (NS_FAILED(rv))
13351 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13352 0 : return xpc::StringToJsval(cx, result, vp);
13353 : }
13354 :
13355 : static JSBool
13356 0 : nsIDOMHTMLDocument_SetDesignMode(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13357 : {
13358 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13359 : nsHTMLDocument *self;
13360 0 : xpc_qsSelfRef selfref;
13361 0 : JS::AutoValueRooter tvr(cx);
13362 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13363 0 : return JS_FALSE;
13364 : xpc_qsDOMString arg0(cx, *vp, vp,
13365 : xpc_qsDOMString::eDefaultNullBehavior,
13366 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13367 0 : if (!arg0.IsValid())
13368 0 : return JS_FALSE;
13369 : nsresult rv;
13370 0 : rv = self->SetDesignMode(arg0);
13371 0 : if (NS_FAILED(rv))
13372 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13373 0 : return JS_TRUE;
13374 : }
13375 :
13376 : static JSBool
13377 0 : nsIDOMHTMLDocument_GetHead(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13378 : {
13379 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13380 0 : JSObject *callee = nsnull;
13381 : nsHTMLDocument *self;
13382 0 : xpc_qsSelfRef selfref;
13383 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13384 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13385 0 : return JS_FALSE;
13386 0 : nsIContent *result = self->GetHead();
13387 : #ifdef DEBUG
13388 : nsresult debug_rv;
13389 0 : nsCOMPtr<nsIDOMHTMLDocument> debug_self;
13390 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
13391 0 : nsCOMPtr<nsIDOMHTMLHeadElement> debug_result;
13392 0 : debug_rv = debug_self->GetHead(getter_AddRefs(debug_result));
13393 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
13394 : "Got the wrong answer from the custom method call!");
13395 : #endif
13396 0 : if (!result) {
13397 0 : *vp = JSVAL_NULL;
13398 0 : return JS_TRUE;
13399 : }
13400 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13401 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13402 0 : return JS_TRUE;
13403 : }
13404 : // After this point do not use 'result'!
13405 0 : qsObjectHelper helper(result, cache);
13406 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLHeadElement), &interfaces[k_nsIDOMHTMLHeadElement], vp);
13407 : }
13408 :
13409 : // === interface nsIDOMHTMLElement
13410 :
13411 : static JSBool
13412 0 : nsIDOMHTMLElement_GetId(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13413 : {
13414 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13415 : nsGenericHTMLElement *self;
13416 0 : xpc_qsSelfRef selfref;
13417 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13418 0 : return JS_FALSE;
13419 : nsresult rv;
13420 0 : nsString result;
13421 0 : rv = self->GetId(result);
13422 0 : if (NS_FAILED(rv))
13423 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13424 0 : return xpc::StringToJsval(cx, result, vp);
13425 : }
13426 :
13427 : static JSBool
13428 0 : nsIDOMHTMLElement_SetId(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13429 : {
13430 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13431 : nsGenericHTMLElement *self;
13432 0 : xpc_qsSelfRef selfref;
13433 0 : JS::AutoValueRooter tvr(cx);
13434 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13435 0 : return JS_FALSE;
13436 : xpc_qsDOMString arg0(cx, *vp, vp,
13437 : xpc_qsDOMString::eDefaultNullBehavior,
13438 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13439 0 : if (!arg0.IsValid())
13440 0 : return JS_FALSE;
13441 : nsresult rv;
13442 0 : rv = self->SetId(arg0);
13443 0 : if (NS_FAILED(rv))
13444 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13445 0 : return JS_TRUE;
13446 : }
13447 :
13448 : static JSBool
13449 0 : nsIDOMHTMLElement_GetTitle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13450 : {
13451 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13452 : nsGenericHTMLElement *self;
13453 0 : xpc_qsSelfRef selfref;
13454 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13455 0 : return JS_FALSE;
13456 : nsresult rv;
13457 0 : nsString result;
13458 0 : rv = self->GetTitle(result);
13459 0 : if (NS_FAILED(rv))
13460 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13461 0 : return xpc::StringToJsval(cx, result, vp);
13462 : }
13463 :
13464 : static JSBool
13465 0 : nsIDOMHTMLElement_SetTitle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13466 : {
13467 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13468 : nsGenericHTMLElement *self;
13469 0 : xpc_qsSelfRef selfref;
13470 0 : JS::AutoValueRooter tvr(cx);
13471 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13472 0 : return JS_FALSE;
13473 : xpc_qsDOMString arg0(cx, *vp, vp,
13474 : xpc_qsDOMString::eDefaultNullBehavior,
13475 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13476 0 : if (!arg0.IsValid())
13477 0 : return JS_FALSE;
13478 : nsresult rv;
13479 0 : rv = self->SetTitle(arg0);
13480 0 : if (NS_FAILED(rv))
13481 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13482 0 : return JS_TRUE;
13483 : }
13484 :
13485 : static JSBool
13486 0 : nsIDOMHTMLElement_GetLang(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13487 : {
13488 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13489 : nsGenericHTMLElement *self;
13490 0 : xpc_qsSelfRef selfref;
13491 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13492 0 : return JS_FALSE;
13493 : nsresult rv;
13494 0 : nsString result;
13495 0 : rv = self->GetLang(result);
13496 0 : if (NS_FAILED(rv))
13497 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13498 0 : return xpc::StringToJsval(cx, result, vp);
13499 : }
13500 :
13501 : static JSBool
13502 0 : nsIDOMHTMLElement_SetLang(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13503 : {
13504 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13505 : nsGenericHTMLElement *self;
13506 0 : xpc_qsSelfRef selfref;
13507 0 : JS::AutoValueRooter tvr(cx);
13508 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13509 0 : return JS_FALSE;
13510 : xpc_qsDOMString arg0(cx, *vp, vp,
13511 : xpc_qsDOMString::eDefaultNullBehavior,
13512 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13513 0 : if (!arg0.IsValid())
13514 0 : return JS_FALSE;
13515 : nsresult rv;
13516 0 : rv = self->SetLang(arg0);
13517 0 : if (NS_FAILED(rv))
13518 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13519 0 : return JS_TRUE;
13520 : }
13521 :
13522 : static JSBool
13523 0 : nsIDOMHTMLElement_GetDir(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13524 : {
13525 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13526 : nsGenericHTMLElement *self;
13527 0 : xpc_qsSelfRef selfref;
13528 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13529 0 : return JS_FALSE;
13530 : nsresult rv;
13531 0 : nsString result;
13532 0 : rv = self->GetDir(result);
13533 0 : if (NS_FAILED(rv))
13534 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13535 0 : return xpc::StringToJsval(cx, result, vp);
13536 : }
13537 :
13538 : static JSBool
13539 0 : nsIDOMHTMLElement_SetDir(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13540 : {
13541 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13542 : nsGenericHTMLElement *self;
13543 0 : xpc_qsSelfRef selfref;
13544 0 : JS::AutoValueRooter tvr(cx);
13545 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13546 0 : return JS_FALSE;
13547 : xpc_qsDOMString arg0(cx, *vp, vp,
13548 : xpc_qsDOMString::eDefaultNullBehavior,
13549 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13550 0 : if (!arg0.IsValid())
13551 0 : return JS_FALSE;
13552 : nsresult rv;
13553 0 : rv = self->SetDir(arg0);
13554 0 : if (NS_FAILED(rv))
13555 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13556 0 : return JS_TRUE;
13557 : }
13558 :
13559 : static JSBool
13560 0 : nsIDOMHTMLElement_GetClassName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13561 : {
13562 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13563 : nsGenericHTMLElement *self;
13564 0 : xpc_qsSelfRef selfref;
13565 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13566 0 : return JS_FALSE;
13567 : nsresult rv;
13568 0 : nsString result;
13569 0 : rv = self->GetClassName(result);
13570 0 : if (NS_FAILED(rv))
13571 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13572 0 : return xpc::StringToJsval(cx, result, vp);
13573 : }
13574 :
13575 : static JSBool
13576 0 : nsIDOMHTMLElement_SetClassName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13577 : {
13578 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13579 : nsGenericHTMLElement *self;
13580 0 : xpc_qsSelfRef selfref;
13581 0 : JS::AutoValueRooter tvr(cx);
13582 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13583 0 : return JS_FALSE;
13584 : xpc_qsDOMString arg0(cx, *vp, vp,
13585 : xpc_qsDOMString::eDefaultNullBehavior,
13586 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13587 0 : if (!arg0.IsValid())
13588 0 : return JS_FALSE;
13589 : nsresult rv;
13590 0 : rv = self->SetClassName(arg0);
13591 0 : if (NS_FAILED(rv))
13592 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13593 0 : return JS_TRUE;
13594 : }
13595 :
13596 : static JSBool
13597 0 : nsIDOMHTMLElement_GetDataset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13598 : {
13599 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13600 0 : JSObject *callee = nsnull;
13601 : nsGenericHTMLElement *self;
13602 0 : xpc_qsSelfRef selfref;
13603 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13604 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13605 0 : return JS_FALSE;
13606 : nsresult rv;
13607 0 : nsCOMPtr<nsIDOMDOMStringMap> result;
13608 0 : rv = self->GetDataset(getter_AddRefs(result));
13609 0 : if (NS_FAILED(rv))
13610 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13611 0 : if (!result) {
13612 0 : *vp = JSVAL_NULL;
13613 0 : return JS_TRUE;
13614 : }
13615 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13616 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13617 0 : return JS_TRUE;
13618 : }
13619 : // After this point do not use 'result'!
13620 0 : qsObjectHelper helper(result, cache);
13621 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringMap), &interfaces[k_nsIDOMDOMStringMap], vp);
13622 : }
13623 :
13624 : static JSBool
13625 0 : nsIDOMHTMLElement_GetHidden(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13626 : {
13627 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13628 : nsGenericHTMLElement *self;
13629 0 : xpc_qsSelfRef selfref;
13630 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13631 0 : return JS_FALSE;
13632 : nsresult rv;
13633 : bool result;
13634 0 : rv = self->GetHidden(&result);
13635 0 : if (NS_FAILED(rv))
13636 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13637 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13638 0 : return JS_TRUE;
13639 : }
13640 :
13641 : static JSBool
13642 0 : nsIDOMHTMLElement_SetHidden(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13643 : {
13644 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13645 : nsGenericHTMLElement *self;
13646 0 : xpc_qsSelfRef selfref;
13647 0 : JS::AutoValueRooter tvr(cx);
13648 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13649 0 : return JS_FALSE;
13650 : JSBool arg0;
13651 0 : JS_ValueToBoolean(cx, *vp, &arg0);
13652 : nsresult rv;
13653 0 : rv = self->SetHidden(arg0);
13654 0 : if (NS_FAILED(rv))
13655 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13656 0 : return JS_TRUE;
13657 : }
13658 :
13659 : static JSBool
13660 0 : nsIDOMHTMLElement_Click(JSContext *cx, unsigned argc, jsval *vp)
13661 : {
13662 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13663 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13664 0 : if (!obj)
13665 0 : return JS_FALSE;
13666 : nsGenericHTMLElement *self;
13667 0 : xpc_qsSelfRef selfref;
13668 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13669 0 : return JS_FALSE;
13670 : nsresult rv;
13671 0 : rv = self->Click();
13672 0 : if (NS_FAILED(rv))
13673 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13674 0 : *vp = JSVAL_VOID;
13675 0 : return JS_TRUE;
13676 : }
13677 :
13678 : static JSBool
13679 0 : nsIDOMHTMLElement_GetTabIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13680 : {
13681 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13682 : nsGenericHTMLElement *self;
13683 0 : xpc_qsSelfRef selfref;
13684 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13685 0 : return JS_FALSE;
13686 : nsresult rv;
13687 : PRInt32 result;
13688 0 : rv = self->GetTabIndex(&result);
13689 0 : if (NS_FAILED(rv))
13690 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13691 0 : *vp = INT_TO_JSVAL(result);
13692 0 : return JS_TRUE;
13693 : }
13694 :
13695 : static JSBool
13696 0 : nsIDOMHTMLElement_SetTabIndex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13697 : {
13698 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13699 : nsGenericHTMLElement *self;
13700 0 : xpc_qsSelfRef selfref;
13701 0 : JS::AutoValueRooter tvr(cx);
13702 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13703 0 : return JS_FALSE;
13704 : int32_t arg0;
13705 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
13706 0 : return JS_FALSE;
13707 : nsresult rv;
13708 0 : rv = self->SetTabIndex(arg0);
13709 0 : if (NS_FAILED(rv))
13710 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13711 0 : return JS_TRUE;
13712 : }
13713 :
13714 : static JSBool
13715 0 : nsIDOMHTMLElement_Focus(JSContext *cx, unsigned argc, jsval *vp)
13716 : {
13717 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13718 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13719 0 : if (!obj)
13720 0 : return JS_FALSE;
13721 : nsGenericHTMLElement *self;
13722 0 : xpc_qsSelfRef selfref;
13723 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13724 0 : return JS_FALSE;
13725 : nsresult rv;
13726 0 : rv = self->Focus();
13727 0 : if (NS_FAILED(rv))
13728 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13729 0 : *vp = JSVAL_VOID;
13730 0 : return JS_TRUE;
13731 : }
13732 :
13733 : static JSBool
13734 0 : nsIDOMHTMLElement_Blur(JSContext *cx, unsigned argc, jsval *vp)
13735 : {
13736 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13737 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13738 0 : if (!obj)
13739 0 : return JS_FALSE;
13740 : nsGenericHTMLElement *self;
13741 0 : xpc_qsSelfRef selfref;
13742 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13743 0 : return JS_FALSE;
13744 : nsresult rv;
13745 0 : rv = self->Blur();
13746 0 : if (NS_FAILED(rv))
13747 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13748 0 : *vp = JSVAL_VOID;
13749 0 : return JS_TRUE;
13750 : }
13751 :
13752 : static JSBool
13753 0 : nsIDOMHTMLElement_GetAccessKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13754 : {
13755 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13756 : nsGenericHTMLElement *self;
13757 0 : xpc_qsSelfRef selfref;
13758 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13759 0 : return JS_FALSE;
13760 : nsresult rv;
13761 0 : nsString result;
13762 0 : rv = self->GetAccessKey(result);
13763 0 : if (NS_FAILED(rv))
13764 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13765 0 : return xpc::StringToJsval(cx, result, vp);
13766 : }
13767 :
13768 : static JSBool
13769 0 : nsIDOMHTMLElement_SetAccessKey(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13770 : {
13771 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13772 : nsGenericHTMLElement *self;
13773 0 : xpc_qsSelfRef selfref;
13774 0 : JS::AutoValueRooter tvr(cx);
13775 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13776 0 : return JS_FALSE;
13777 : xpc_qsDOMString arg0(cx, *vp, vp,
13778 : xpc_qsDOMString::eDefaultNullBehavior,
13779 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13780 0 : if (!arg0.IsValid())
13781 0 : return JS_FALSE;
13782 : nsresult rv;
13783 0 : rv = self->SetAccessKey(arg0);
13784 0 : if (NS_FAILED(rv))
13785 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13786 0 : return JS_TRUE;
13787 : }
13788 :
13789 : static JSBool
13790 0 : nsIDOMHTMLElement_GetAccessKeyLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13791 : {
13792 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13793 : nsGenericHTMLElement *self;
13794 0 : xpc_qsSelfRef selfref;
13795 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13796 0 : return JS_FALSE;
13797 : nsresult rv;
13798 0 : nsString result;
13799 0 : rv = self->GetAccessKeyLabel(result);
13800 0 : if (NS_FAILED(rv))
13801 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13802 0 : return xpc::StringToJsval(cx, result, vp);
13803 : }
13804 :
13805 : static JSBool
13806 0 : nsIDOMHTMLElement_GetDraggable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13807 : {
13808 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13809 : nsGenericHTMLElement *self;
13810 0 : xpc_qsSelfRef selfref;
13811 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13812 0 : return JS_FALSE;
13813 : nsresult rv;
13814 : bool result;
13815 0 : rv = self->GetDraggable(&result);
13816 0 : if (NS_FAILED(rv))
13817 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13818 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13819 0 : return JS_TRUE;
13820 : }
13821 :
13822 : static JSBool
13823 0 : nsIDOMHTMLElement_SetDraggable(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13824 : {
13825 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13826 : nsGenericHTMLElement *self;
13827 0 : xpc_qsSelfRef selfref;
13828 0 : JS::AutoValueRooter tvr(cx);
13829 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13830 0 : return JS_FALSE;
13831 : JSBool arg0;
13832 0 : JS_ValueToBoolean(cx, *vp, &arg0);
13833 : nsresult rv;
13834 0 : rv = self->SetDraggable(arg0);
13835 0 : if (NS_FAILED(rv))
13836 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13837 0 : return JS_TRUE;
13838 : }
13839 :
13840 : static JSBool
13841 0 : nsIDOMHTMLElement_GetContentEditable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13842 : {
13843 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13844 : nsGenericHTMLElement *self;
13845 0 : xpc_qsSelfRef selfref;
13846 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13847 0 : return JS_FALSE;
13848 : nsresult rv;
13849 0 : nsString result;
13850 0 : rv = self->GetContentEditable(result);
13851 0 : if (NS_FAILED(rv))
13852 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13853 0 : return xpc::StringToJsval(cx, result, vp);
13854 : }
13855 :
13856 : static JSBool
13857 0 : nsIDOMHTMLElement_SetContentEditable(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13858 : {
13859 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13860 : nsGenericHTMLElement *self;
13861 0 : xpc_qsSelfRef selfref;
13862 0 : JS::AutoValueRooter tvr(cx);
13863 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13864 0 : return JS_FALSE;
13865 : xpc_qsDOMString arg0(cx, *vp, vp,
13866 : xpc_qsDOMString::eDefaultNullBehavior,
13867 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13868 0 : if (!arg0.IsValid())
13869 0 : return JS_FALSE;
13870 : nsresult rv;
13871 0 : rv = self->SetContentEditable(arg0);
13872 0 : if (NS_FAILED(rv))
13873 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13874 0 : return JS_TRUE;
13875 : }
13876 :
13877 : static JSBool
13878 0 : nsIDOMHTMLElement_GetIsContentEditable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13879 : {
13880 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13881 : nsGenericHTMLElement *self;
13882 0 : xpc_qsSelfRef selfref;
13883 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13884 0 : return JS_FALSE;
13885 : nsresult rv;
13886 : bool result;
13887 0 : rv = self->GetIsContentEditable(&result);
13888 0 : if (NS_FAILED(rv))
13889 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13890 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13891 0 : return JS_TRUE;
13892 : }
13893 :
13894 : static JSBool
13895 0 : nsIDOMHTMLElement_GetContextMenu(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13896 : {
13897 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13898 0 : JSObject *callee = nsnull;
13899 : nsGenericHTMLElement *self;
13900 0 : xpc_qsSelfRef selfref;
13901 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13902 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13903 0 : return JS_FALSE;
13904 : nsresult rv;
13905 0 : nsCOMPtr<nsIDOMHTMLMenuElement> result;
13906 0 : rv = self->GetContextMenu(getter_AddRefs(result));
13907 0 : if (NS_FAILED(rv))
13908 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13909 0 : if (!result) {
13910 0 : *vp = JSVAL_NULL;
13911 0 : return JS_TRUE;
13912 : }
13913 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13914 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13915 0 : return JS_TRUE;
13916 : }
13917 : // After this point do not use 'result'!
13918 0 : qsObjectHelper helper(result, cache);
13919 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLMenuElement), &interfaces[k_nsIDOMHTMLMenuElement], vp);
13920 : }
13921 :
13922 : static JSBool
13923 0 : nsIDOMHTMLElement_GetSpellcheck(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13924 : {
13925 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13926 : nsGenericHTMLElement *self;
13927 0 : xpc_qsSelfRef selfref;
13928 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13929 0 : return JS_FALSE;
13930 : nsresult rv;
13931 : bool result;
13932 0 : rv = self->GetSpellcheck(&result);
13933 0 : if (NS_FAILED(rv))
13934 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13935 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13936 0 : return JS_TRUE;
13937 : }
13938 :
13939 : static JSBool
13940 0 : nsIDOMHTMLElement_SetSpellcheck(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13941 : {
13942 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13943 : nsGenericHTMLElement *self;
13944 0 : xpc_qsSelfRef selfref;
13945 0 : JS::AutoValueRooter tvr(cx);
13946 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13947 0 : return JS_FALSE;
13948 : JSBool arg0;
13949 0 : JS_ValueToBoolean(cx, *vp, &arg0);
13950 : nsresult rv;
13951 0 : rv = self->SetSpellcheck(arg0);
13952 0 : if (NS_FAILED(rv))
13953 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13954 0 : return JS_TRUE;
13955 : }
13956 :
13957 : static JSBool
13958 0 : nsIDOMHTMLElement_GetInnerHTML(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13959 : {
13960 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13961 : nsGenericHTMLElement *self;
13962 0 : xpc_qsSelfRef selfref;
13963 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13964 0 : return JS_FALSE;
13965 : nsresult rv;
13966 0 : nsString result;
13967 0 : rv = self->GetInnerHTML(result);
13968 0 : if (NS_FAILED(rv))
13969 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13970 0 : return xpc::StringToJsval(cx, result, vp);
13971 : }
13972 :
13973 : static JSBool
13974 0 : nsIDOMHTMLElement_SetInnerHTML(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13975 : {
13976 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13977 : nsGenericHTMLElement *self;
13978 0 : xpc_qsSelfRef selfref;
13979 0 : JS::AutoValueRooter tvr(cx);
13980 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13981 0 : return JS_FALSE;
13982 : xpc_qsDOMString arg0(cx, *vp, vp,
13983 : xpc_qsDOMString::eDefaultNullBehavior,
13984 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13985 0 : if (!arg0.IsValid())
13986 0 : return JS_FALSE;
13987 : nsresult rv;
13988 0 : rv = self->SetInnerHTML(arg0);
13989 0 : if (NS_FAILED(rv))
13990 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13991 0 : return JS_TRUE;
13992 : }
13993 :
13994 : static JSBool
13995 0 : nsIDOMHTMLElement_GetOuterHTML(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13996 : {
13997 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13998 : nsGenericHTMLElement *self;
13999 0 : xpc_qsSelfRef selfref;
14000 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14001 0 : return JS_FALSE;
14002 : nsresult rv;
14003 0 : nsString result;
14004 0 : rv = self->GetOuterHTML(result);
14005 0 : if (NS_FAILED(rv))
14006 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14007 0 : return xpc::StringToJsval(cx, result, vp);
14008 : }
14009 :
14010 : static JSBool
14011 0 : nsIDOMHTMLElement_SetOuterHTML(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14012 : {
14013 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14014 : nsGenericHTMLElement *self;
14015 0 : xpc_qsSelfRef selfref;
14016 0 : JS::AutoValueRooter tvr(cx);
14017 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14018 0 : return JS_FALSE;
14019 : xpc_qsDOMString arg0(cx, *vp, vp,
14020 : xpc_qsDOMString::eDefaultNullBehavior,
14021 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14022 0 : if (!arg0.IsValid())
14023 0 : return JS_FALSE;
14024 : nsresult rv;
14025 0 : rv = self->SetOuterHTML(arg0);
14026 0 : if (NS_FAILED(rv))
14027 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14028 0 : return JS_TRUE;
14029 : }
14030 :
14031 : static JSBool
14032 0 : nsIDOMHTMLElement_InsertAdjacentHTML(JSContext *cx, unsigned argc, jsval *vp)
14033 : {
14034 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14035 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14036 0 : if (!obj)
14037 0 : return JS_FALSE;
14038 : nsGenericHTMLElement *self;
14039 0 : xpc_qsSelfRef selfref;
14040 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14041 0 : return JS_FALSE;
14042 0 : if (argc < 2)
14043 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
14044 0 : jsval *argv = JS_ARGV(cx, vp);
14045 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
14046 : xpc_qsDOMString::eDefaultNullBehavior,
14047 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14048 0 : if (!arg0.IsValid())
14049 0 : return JS_FALSE;
14050 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
14051 : xpc_qsDOMString::eDefaultNullBehavior,
14052 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14053 0 : if (!arg1.IsValid())
14054 0 : return JS_FALSE;
14055 : nsresult rv;
14056 0 : rv = self->InsertAdjacentHTML(arg0, arg1);
14057 0 : if (NS_FAILED(rv))
14058 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14059 0 : *vp = JSVAL_VOID;
14060 0 : return JS_TRUE;
14061 : }
14062 :
14063 : static JSBool
14064 0 : nsIDOMHTMLElement_ScrollIntoView(JSContext *cx, unsigned argc, jsval *vp)
14065 : {
14066 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14067 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14068 0 : if (!obj)
14069 0 : return JS_FALSE;
14070 : nsGenericHTMLElement *self;
14071 0 : xpc_qsSelfRef selfref;
14072 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14073 0 : return JS_FALSE;
14074 0 : jsval *argv = JS_ARGV(cx, vp);
14075 : JSBool arg0;
14076 0 : JS_ValueToBoolean(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0);
14077 : nsresult rv;
14078 0 : rv = self->ScrollIntoView(arg0, NS_MIN<PRUint32>(argc, 1) - 0);
14079 0 : if (NS_FAILED(rv))
14080 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14081 0 : *vp = JSVAL_VOID;
14082 0 : return JS_TRUE;
14083 : }
14084 :
14085 : static JSBool
14086 0 : nsIDOMHTMLElement_GetOffsetParent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14087 : {
14088 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14089 0 : JSObject *callee = nsnull;
14090 : nsGenericHTMLElement *self;
14091 0 : xpc_qsSelfRef selfref;
14092 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14093 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14094 0 : return JS_FALSE;
14095 : nsresult rv;
14096 0 : nsCOMPtr<nsIDOMElement> result;
14097 0 : rv = self->GetOffsetParent(getter_AddRefs(result));
14098 0 : if (NS_FAILED(rv))
14099 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14100 0 : if (!result) {
14101 0 : *vp = JSVAL_NULL;
14102 0 : return JS_TRUE;
14103 : }
14104 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14105 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14106 0 : return JS_TRUE;
14107 : }
14108 : // After this point do not use 'result'!
14109 0 : qsObjectHelper helper(result, cache);
14110 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
14111 : }
14112 :
14113 : static JSBool
14114 0 : nsIDOMHTMLElement_GetOffsetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14115 : {
14116 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14117 : nsGenericHTMLElement *self;
14118 0 : xpc_qsSelfRef selfref;
14119 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14120 0 : return JS_FALSE;
14121 : nsresult rv;
14122 : PRInt32 result;
14123 0 : rv = self->GetOffsetTop(&result);
14124 0 : if (NS_FAILED(rv))
14125 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14126 0 : *vp = INT_TO_JSVAL(result);
14127 0 : return JS_TRUE;
14128 : }
14129 :
14130 : static JSBool
14131 0 : nsIDOMHTMLElement_GetOffsetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14132 : {
14133 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14134 : nsGenericHTMLElement *self;
14135 0 : xpc_qsSelfRef selfref;
14136 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14137 0 : return JS_FALSE;
14138 : nsresult rv;
14139 : PRInt32 result;
14140 0 : rv = self->GetOffsetLeft(&result);
14141 0 : if (NS_FAILED(rv))
14142 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14143 0 : *vp = INT_TO_JSVAL(result);
14144 0 : return JS_TRUE;
14145 : }
14146 :
14147 : static JSBool
14148 0 : nsIDOMHTMLElement_GetOffsetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14149 : {
14150 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14151 : nsGenericHTMLElement *self;
14152 0 : xpc_qsSelfRef selfref;
14153 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14154 0 : return JS_FALSE;
14155 : nsresult rv;
14156 : PRInt32 result;
14157 0 : rv = self->GetOffsetWidth(&result);
14158 0 : if (NS_FAILED(rv))
14159 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14160 0 : *vp = INT_TO_JSVAL(result);
14161 0 : return JS_TRUE;
14162 : }
14163 :
14164 : static JSBool
14165 0 : nsIDOMHTMLElement_GetOffsetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14166 : {
14167 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14168 : nsGenericHTMLElement *self;
14169 0 : xpc_qsSelfRef selfref;
14170 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14171 0 : return JS_FALSE;
14172 : nsresult rv;
14173 : PRInt32 result;
14174 0 : rv = self->GetOffsetHeight(&result);
14175 0 : if (NS_FAILED(rv))
14176 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14177 0 : *vp = INT_TO_JSVAL(result);
14178 0 : return JS_TRUE;
14179 : }
14180 :
14181 : static JSBool
14182 0 : nsIDOMHTMLElement_MozRequestFullScreen(JSContext *cx, unsigned argc, jsval *vp)
14183 : {
14184 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14185 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14186 0 : if (!obj)
14187 0 : return JS_FALSE;
14188 : nsGenericHTMLElement *self;
14189 0 : xpc_qsSelfRef selfref;
14190 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14191 0 : return JS_FALSE;
14192 : nsresult rv;
14193 0 : rv = self->MozRequestFullScreen();
14194 0 : if (NS_FAILED(rv))
14195 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14196 0 : *vp = JSVAL_VOID;
14197 0 : return JS_TRUE;
14198 : }
14199 :
14200 : // === interface nsIDOMHTMLFormElement
14201 :
14202 : static JSBool
14203 0 : nsIDOMHTMLFormElement_GetElements(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14204 : {
14205 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14206 0 : JSObject *callee = nsnull;
14207 : nsIDOMHTMLFormElement *self;
14208 0 : xpc_qsSelfRef selfref;
14209 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14210 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14211 0 : return JS_FALSE;
14212 : nsresult rv;
14213 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
14214 0 : rv = self->GetElements(getter_AddRefs(result));
14215 0 : if (NS_FAILED(rv))
14216 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14217 0 : if (!result) {
14218 0 : *vp = JSVAL_NULL;
14219 0 : return JS_TRUE;
14220 : }
14221 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14222 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14223 0 : return JS_TRUE;
14224 : }
14225 : // After this point do not use 'result'!
14226 0 : qsObjectHelper helper(result, cache);
14227 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
14228 : }
14229 :
14230 : static JSBool
14231 0 : nsIDOMHTMLFormElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14232 : {
14233 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14234 : nsIDOMHTMLFormElement *self;
14235 0 : xpc_qsSelfRef selfref;
14236 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14237 0 : return JS_FALSE;
14238 : nsresult rv;
14239 0 : nsString result;
14240 0 : rv = self->GetName(result);
14241 0 : if (NS_FAILED(rv))
14242 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14243 0 : return xpc::StringToJsval(cx, result, vp);
14244 : }
14245 :
14246 : static JSBool
14247 0 : nsIDOMHTMLFormElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14248 : {
14249 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14250 : nsIDOMHTMLFormElement *self;
14251 0 : xpc_qsSelfRef selfref;
14252 0 : JS::AutoValueRooter tvr(cx);
14253 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14254 0 : return JS_FALSE;
14255 : xpc_qsDOMString arg0(cx, *vp, vp,
14256 : xpc_qsDOMString::eDefaultNullBehavior,
14257 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14258 0 : if (!arg0.IsValid())
14259 0 : return JS_FALSE;
14260 : nsresult rv;
14261 0 : rv = self->SetName(arg0);
14262 0 : if (NS_FAILED(rv))
14263 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14264 0 : return JS_TRUE;
14265 : }
14266 :
14267 : static JSBool
14268 0 : nsIDOMHTMLFormElement_Submit(JSContext *cx, unsigned argc, jsval *vp)
14269 : {
14270 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14271 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14272 0 : if (!obj)
14273 0 : return JS_FALSE;
14274 : nsIDOMHTMLFormElement *self;
14275 0 : xpc_qsSelfRef selfref;
14276 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14277 0 : return JS_FALSE;
14278 : nsresult rv;
14279 0 : rv = self->Submit();
14280 0 : if (NS_FAILED(rv))
14281 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14282 0 : *vp = JSVAL_VOID;
14283 0 : return JS_TRUE;
14284 : }
14285 :
14286 : static JSBool
14287 0 : nsIDOMHTMLFormElement_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14288 : {
14289 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14290 : nsIDOMHTMLFormElement *self;
14291 0 : xpc_qsSelfRef selfref;
14292 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14293 0 : return JS_FALSE;
14294 : nsresult rv;
14295 : PRInt32 result;
14296 0 : rv = self->GetLength(&result);
14297 0 : if (NS_FAILED(rv))
14298 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14299 0 : *vp = INT_TO_JSVAL(result);
14300 0 : return JS_TRUE;
14301 : }
14302 :
14303 : static JSBool
14304 0 : nsIDOMHTMLFormElement_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14305 : {
14306 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14307 : nsIDOMHTMLFormElement *self;
14308 0 : xpc_qsSelfRef selfref;
14309 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14310 0 : return JS_FALSE;
14311 : nsresult rv;
14312 0 : nsString result;
14313 0 : rv = self->GetTarget(result);
14314 0 : if (NS_FAILED(rv))
14315 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14316 0 : return xpc::StringToJsval(cx, result, vp);
14317 : }
14318 :
14319 : static JSBool
14320 0 : nsIDOMHTMLFormElement_SetTarget(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14321 : {
14322 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14323 : nsIDOMHTMLFormElement *self;
14324 0 : xpc_qsSelfRef selfref;
14325 0 : JS::AutoValueRooter tvr(cx);
14326 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14327 0 : return JS_FALSE;
14328 : xpc_qsDOMString arg0(cx, *vp, vp,
14329 : xpc_qsDOMString::eDefaultNullBehavior,
14330 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14331 0 : if (!arg0.IsValid())
14332 0 : return JS_FALSE;
14333 : nsresult rv;
14334 0 : rv = self->SetTarget(arg0);
14335 0 : if (NS_FAILED(rv))
14336 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14337 0 : return JS_TRUE;
14338 : }
14339 :
14340 : static JSBool
14341 0 : nsIDOMHTMLFormElement_GetAction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14342 : {
14343 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14344 : nsIDOMHTMLFormElement *self;
14345 0 : xpc_qsSelfRef selfref;
14346 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14347 0 : return JS_FALSE;
14348 : nsresult rv;
14349 0 : nsString result;
14350 0 : rv = self->GetAction(result);
14351 0 : if (NS_FAILED(rv))
14352 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14353 0 : return xpc::StringToJsval(cx, result, vp);
14354 : }
14355 :
14356 : static JSBool
14357 0 : nsIDOMHTMLFormElement_SetAction(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14358 : {
14359 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14360 : nsIDOMHTMLFormElement *self;
14361 0 : xpc_qsSelfRef selfref;
14362 0 : JS::AutoValueRooter tvr(cx);
14363 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14364 0 : return JS_FALSE;
14365 : xpc_qsDOMString arg0(cx, *vp, vp,
14366 : xpc_qsDOMString::eDefaultNullBehavior,
14367 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14368 0 : if (!arg0.IsValid())
14369 0 : return JS_FALSE;
14370 : nsresult rv;
14371 0 : rv = self->SetAction(arg0);
14372 0 : if (NS_FAILED(rv))
14373 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14374 0 : return JS_TRUE;
14375 : }
14376 :
14377 : // === interface nsIDOMHTMLFrameElement
14378 :
14379 : static JSBool
14380 0 : nsIDOMHTMLFrameElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14381 : {
14382 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14383 : nsIDOMHTMLFrameElement *self;
14384 0 : xpc_qsSelfRef selfref;
14385 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14386 0 : return JS_FALSE;
14387 : nsresult rv;
14388 0 : nsString result;
14389 0 : rv = self->GetSrc(result);
14390 0 : if (NS_FAILED(rv))
14391 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14392 0 : return xpc::StringToJsval(cx, result, vp);
14393 : }
14394 :
14395 : static JSBool
14396 0 : nsIDOMHTMLFrameElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14397 : {
14398 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14399 : nsIDOMHTMLFrameElement *self;
14400 0 : xpc_qsSelfRef selfref;
14401 0 : JS::AutoValueRooter tvr(cx);
14402 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14403 0 : return JS_FALSE;
14404 : xpc_qsDOMString arg0(cx, *vp, vp,
14405 : xpc_qsDOMString::eDefaultNullBehavior,
14406 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14407 0 : if (!arg0.IsValid())
14408 0 : return JS_FALSE;
14409 : nsresult rv;
14410 0 : rv = self->SetSrc(arg0);
14411 0 : if (NS_FAILED(rv))
14412 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14413 0 : return JS_TRUE;
14414 : }
14415 :
14416 : static JSBool
14417 0 : nsIDOMHTMLFrameElement_GetContentDocument(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14418 : {
14419 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14420 0 : JSObject *callee = nsnull;
14421 : nsIDOMHTMLFrameElement *self;
14422 0 : xpc_qsSelfRef selfref;
14423 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14424 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14425 0 : return JS_FALSE;
14426 : nsresult rv;
14427 0 : nsCOMPtr<nsIDOMDocument> result;
14428 0 : rv = self->GetContentDocument(getter_AddRefs(result));
14429 0 : if (NS_FAILED(rv))
14430 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14431 0 : if (!result) {
14432 0 : *vp = JSVAL_NULL;
14433 0 : return JS_TRUE;
14434 : }
14435 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14436 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14437 0 : return JS_TRUE;
14438 : }
14439 : // After this point do not use 'result'!
14440 0 : qsObjectHelper helper(result, cache);
14441 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
14442 : }
14443 :
14444 : static JSBool
14445 0 : nsIDOMHTMLFrameElement_GetContentWindow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14446 : {
14447 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14448 0 : JSObject *callee = nsnull;
14449 : nsIDOMHTMLFrameElement *self;
14450 0 : xpc_qsSelfRef selfref;
14451 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14452 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14453 0 : return JS_FALSE;
14454 : nsresult rv;
14455 0 : nsCOMPtr<nsIDOMWindow> result;
14456 0 : rv = self->GetContentWindow(getter_AddRefs(result));
14457 0 : if (NS_FAILED(rv))
14458 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14459 0 : if (!result) {
14460 0 : *vp = JSVAL_NULL;
14461 0 : return JS_TRUE;
14462 : }
14463 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14464 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14465 0 : return JS_TRUE;
14466 : }
14467 : // After this point do not use 'result'!
14468 0 : qsObjectHelper helper(result, cache);
14469 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
14470 : }
14471 :
14472 : static JSBool
14473 0 : nsIDOMHTMLFrameElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14474 : {
14475 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14476 : nsIDOMHTMLFrameElement *self;
14477 0 : xpc_qsSelfRef selfref;
14478 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14479 0 : return JS_FALSE;
14480 : nsresult rv;
14481 0 : nsString result;
14482 0 : rv = self->GetName(result);
14483 0 : if (NS_FAILED(rv))
14484 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14485 0 : return xpc::StringToJsval(cx, result, vp);
14486 : }
14487 :
14488 : static JSBool
14489 0 : nsIDOMHTMLFrameElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14490 : {
14491 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14492 : nsIDOMHTMLFrameElement *self;
14493 0 : xpc_qsSelfRef selfref;
14494 0 : JS::AutoValueRooter tvr(cx);
14495 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14496 0 : return JS_FALSE;
14497 : xpc_qsDOMString arg0(cx, *vp, vp,
14498 : xpc_qsDOMString::eDefaultNullBehavior,
14499 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14500 0 : if (!arg0.IsValid())
14501 0 : return JS_FALSE;
14502 : nsresult rv;
14503 0 : rv = self->SetName(arg0);
14504 0 : if (NS_FAILED(rv))
14505 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14506 0 : return JS_TRUE;
14507 : }
14508 :
14509 : // === interface nsIDOMHTMLFrameSetElement
14510 :
14511 : static JSBool
14512 0 : nsIDOMHTMLFrameSetElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14513 : {
14514 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14515 : nsIDOMHTMLFrameSetElement *self;
14516 0 : xpc_qsSelfRef selfref;
14517 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14518 0 : return JS_FALSE;
14519 : nsresult rv;
14520 0 : nsString result;
14521 0 : rv = self->GetRows(result);
14522 0 : if (NS_FAILED(rv))
14523 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14524 0 : return xpc::StringToJsval(cx, result, vp);
14525 : }
14526 :
14527 : static JSBool
14528 0 : nsIDOMHTMLFrameSetElement_SetRows(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14529 : {
14530 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14531 : nsIDOMHTMLFrameSetElement *self;
14532 0 : xpc_qsSelfRef selfref;
14533 0 : JS::AutoValueRooter tvr(cx);
14534 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14535 0 : return JS_FALSE;
14536 : xpc_qsDOMString arg0(cx, *vp, vp,
14537 : xpc_qsDOMString::eDefaultNullBehavior,
14538 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14539 0 : if (!arg0.IsValid())
14540 0 : return JS_FALSE;
14541 : nsresult rv;
14542 0 : rv = self->SetRows(arg0);
14543 0 : if (NS_FAILED(rv))
14544 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14545 0 : return JS_TRUE;
14546 : }
14547 :
14548 : static JSBool
14549 0 : nsIDOMHTMLFrameSetElement_GetCols(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14550 : {
14551 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14552 : nsIDOMHTMLFrameSetElement *self;
14553 0 : xpc_qsSelfRef selfref;
14554 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14555 0 : return JS_FALSE;
14556 : nsresult rv;
14557 0 : nsString result;
14558 0 : rv = self->GetCols(result);
14559 0 : if (NS_FAILED(rv))
14560 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14561 0 : return xpc::StringToJsval(cx, result, vp);
14562 : }
14563 :
14564 : static JSBool
14565 0 : nsIDOMHTMLFrameSetElement_SetCols(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14566 : {
14567 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14568 : nsIDOMHTMLFrameSetElement *self;
14569 0 : xpc_qsSelfRef selfref;
14570 0 : JS::AutoValueRooter tvr(cx);
14571 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14572 0 : return JS_FALSE;
14573 : xpc_qsDOMString arg0(cx, *vp, vp,
14574 : xpc_qsDOMString::eDefaultNullBehavior,
14575 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14576 0 : if (!arg0.IsValid())
14577 0 : return JS_FALSE;
14578 : nsresult rv;
14579 0 : rv = self->SetCols(arg0);
14580 0 : if (NS_FAILED(rv))
14581 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14582 0 : return JS_TRUE;
14583 : }
14584 :
14585 : // === interface nsIDOMHTMLIFrameElement
14586 :
14587 : static JSBool
14588 0 : nsIDOMHTMLIFrameElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14589 : {
14590 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14591 : nsIDOMHTMLIFrameElement *self;
14592 0 : xpc_qsSelfRef selfref;
14593 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14594 0 : return JS_FALSE;
14595 : nsresult rv;
14596 0 : nsString result;
14597 0 : rv = self->GetSrc(result);
14598 0 : if (NS_FAILED(rv))
14599 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14600 0 : return xpc::StringToJsval(cx, result, vp);
14601 : }
14602 :
14603 : static JSBool
14604 0 : nsIDOMHTMLIFrameElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14605 : {
14606 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14607 : nsIDOMHTMLIFrameElement *self;
14608 0 : xpc_qsSelfRef selfref;
14609 0 : JS::AutoValueRooter tvr(cx);
14610 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14611 0 : return JS_FALSE;
14612 : xpc_qsDOMString arg0(cx, *vp, vp,
14613 : xpc_qsDOMString::eDefaultNullBehavior,
14614 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14615 0 : if (!arg0.IsValid())
14616 0 : return JS_FALSE;
14617 : nsresult rv;
14618 0 : rv = self->SetSrc(arg0);
14619 0 : if (NS_FAILED(rv))
14620 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14621 0 : return JS_TRUE;
14622 : }
14623 :
14624 : static JSBool
14625 0 : nsIDOMHTMLIFrameElement_GetContentDocument(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14626 : {
14627 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14628 0 : JSObject *callee = nsnull;
14629 : nsIDOMHTMLIFrameElement *self;
14630 0 : xpc_qsSelfRef selfref;
14631 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14632 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14633 0 : return JS_FALSE;
14634 : nsresult rv;
14635 0 : nsCOMPtr<nsIDOMDocument> result;
14636 0 : rv = self->GetContentDocument(getter_AddRefs(result));
14637 0 : if (NS_FAILED(rv))
14638 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14639 0 : if (!result) {
14640 0 : *vp = JSVAL_NULL;
14641 0 : return JS_TRUE;
14642 : }
14643 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14644 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14645 0 : return JS_TRUE;
14646 : }
14647 : // After this point do not use 'result'!
14648 0 : qsObjectHelper helper(result, cache);
14649 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
14650 : }
14651 :
14652 : static JSBool
14653 0 : nsIDOMHTMLIFrameElement_GetContentWindow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14654 : {
14655 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14656 0 : JSObject *callee = nsnull;
14657 : nsIDOMHTMLIFrameElement *self;
14658 0 : xpc_qsSelfRef selfref;
14659 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14660 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14661 0 : return JS_FALSE;
14662 : nsresult rv;
14663 0 : nsCOMPtr<nsIDOMWindow> result;
14664 0 : rv = self->GetContentWindow(getter_AddRefs(result));
14665 0 : if (NS_FAILED(rv))
14666 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14667 0 : if (!result) {
14668 0 : *vp = JSVAL_NULL;
14669 0 : return JS_TRUE;
14670 : }
14671 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14672 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14673 0 : return JS_TRUE;
14674 : }
14675 : // After this point do not use 'result'!
14676 0 : qsObjectHelper helper(result, cache);
14677 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
14678 : }
14679 :
14680 : // === interface nsIDOMHTMLImageElement
14681 :
14682 : static JSBool
14683 0 : nsIDOMHTMLImageElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14684 : {
14685 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14686 : nsIDOMHTMLImageElement *self;
14687 0 : xpc_qsSelfRef selfref;
14688 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14689 0 : return JS_FALSE;
14690 : nsresult rv;
14691 0 : nsString result;
14692 0 : rv = self->GetSrc(result);
14693 0 : if (NS_FAILED(rv))
14694 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14695 0 : return xpc::StringToJsval(cx, result, vp);
14696 : }
14697 :
14698 : static JSBool
14699 0 : nsIDOMHTMLImageElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14700 : {
14701 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14702 : nsIDOMHTMLImageElement *self;
14703 0 : xpc_qsSelfRef selfref;
14704 0 : JS::AutoValueRooter tvr(cx);
14705 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14706 0 : return JS_FALSE;
14707 : xpc_qsDOMString arg0(cx, *vp, vp,
14708 : xpc_qsDOMString::eDefaultNullBehavior,
14709 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14710 0 : if (!arg0.IsValid())
14711 0 : return JS_FALSE;
14712 : nsresult rv;
14713 0 : rv = self->SetSrc(arg0);
14714 0 : if (NS_FAILED(rv))
14715 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14716 0 : return JS_TRUE;
14717 : }
14718 :
14719 : static JSBool
14720 0 : nsIDOMHTMLImageElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14721 : {
14722 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14723 : nsIDOMHTMLImageElement *self;
14724 0 : xpc_qsSelfRef selfref;
14725 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14726 0 : return JS_FALSE;
14727 : nsresult rv;
14728 0 : nsString result;
14729 0 : rv = self->GetName(result);
14730 0 : if (NS_FAILED(rv))
14731 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14732 0 : return xpc::StringToJsval(cx, result, vp);
14733 : }
14734 :
14735 : static JSBool
14736 0 : nsIDOMHTMLImageElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14737 : {
14738 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14739 : nsIDOMHTMLImageElement *self;
14740 0 : xpc_qsSelfRef selfref;
14741 0 : JS::AutoValueRooter tvr(cx);
14742 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14743 0 : return JS_FALSE;
14744 : xpc_qsDOMString arg0(cx, *vp, vp,
14745 : xpc_qsDOMString::eDefaultNullBehavior,
14746 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14747 0 : if (!arg0.IsValid())
14748 0 : return JS_FALSE;
14749 : nsresult rv;
14750 0 : rv = self->SetName(arg0);
14751 0 : if (NS_FAILED(rv))
14752 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14753 0 : return JS_TRUE;
14754 : }
14755 :
14756 : static JSBool
14757 0 : nsIDOMHTMLImageElement_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14758 : {
14759 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14760 : nsIDOMHTMLImageElement *self;
14761 0 : xpc_qsSelfRef selfref;
14762 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14763 0 : return JS_FALSE;
14764 : nsresult rv;
14765 : PRUint32 result;
14766 0 : rv = self->GetHeight(&result);
14767 0 : if (NS_FAILED(rv))
14768 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14769 0 : *vp = UINT_TO_JSVAL(result);
14770 0 : return JS_TRUE;
14771 : }
14772 :
14773 : static JSBool
14774 0 : nsIDOMHTMLImageElement_SetHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14775 : {
14776 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14777 : nsIDOMHTMLImageElement *self;
14778 0 : xpc_qsSelfRef selfref;
14779 0 : JS::AutoValueRooter tvr(cx);
14780 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14781 0 : return JS_FALSE;
14782 : uint32_t arg0;
14783 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
14784 0 : return JS_FALSE;
14785 : nsresult rv;
14786 0 : rv = self->SetHeight(arg0);
14787 0 : if (NS_FAILED(rv))
14788 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14789 0 : return JS_TRUE;
14790 : }
14791 :
14792 : static JSBool
14793 0 : nsIDOMHTMLImageElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14794 : {
14795 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14796 : nsIDOMHTMLImageElement *self;
14797 0 : xpc_qsSelfRef selfref;
14798 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14799 0 : return JS_FALSE;
14800 : nsresult rv;
14801 : PRUint32 result;
14802 0 : rv = self->GetWidth(&result);
14803 0 : if (NS_FAILED(rv))
14804 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14805 0 : *vp = UINT_TO_JSVAL(result);
14806 0 : return JS_TRUE;
14807 : }
14808 :
14809 : static JSBool
14810 0 : nsIDOMHTMLImageElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14811 : {
14812 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14813 : nsIDOMHTMLImageElement *self;
14814 0 : xpc_qsSelfRef selfref;
14815 0 : JS::AutoValueRooter tvr(cx);
14816 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14817 0 : return JS_FALSE;
14818 : uint32_t arg0;
14819 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
14820 0 : return JS_FALSE;
14821 : nsresult rv;
14822 0 : rv = self->SetWidth(arg0);
14823 0 : if (NS_FAILED(rv))
14824 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14825 0 : return JS_TRUE;
14826 : }
14827 :
14828 : static JSBool
14829 0 : nsIDOMHTMLImageElement_GetComplete(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14830 : {
14831 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14832 : nsIDOMHTMLImageElement *self;
14833 0 : xpc_qsSelfRef selfref;
14834 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14835 0 : return JS_FALSE;
14836 : nsresult rv;
14837 : bool result;
14838 0 : rv = self->GetComplete(&result);
14839 0 : if (NS_FAILED(rv))
14840 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14841 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
14842 0 : return JS_TRUE;
14843 : }
14844 :
14845 : // === interface nsIDOMHTMLInputElement
14846 :
14847 : static JSBool
14848 0 : nsIDOMHTMLInputElement_GetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14849 : {
14850 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14851 : nsIDOMHTMLInputElement *self;
14852 0 : xpc_qsSelfRef selfref;
14853 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14854 0 : return JS_FALSE;
14855 : nsresult rv;
14856 : bool result;
14857 0 : rv = self->GetDefaultChecked(&result);
14858 0 : if (NS_FAILED(rv))
14859 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14860 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
14861 0 : return JS_TRUE;
14862 : }
14863 :
14864 : static JSBool
14865 0 : nsIDOMHTMLInputElement_SetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14866 : {
14867 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14868 : nsIDOMHTMLInputElement *self;
14869 0 : xpc_qsSelfRef selfref;
14870 0 : JS::AutoValueRooter tvr(cx);
14871 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14872 0 : return JS_FALSE;
14873 : JSBool arg0;
14874 0 : JS_ValueToBoolean(cx, *vp, &arg0);
14875 : nsresult rv;
14876 0 : rv = self->SetDefaultChecked(arg0);
14877 0 : if (NS_FAILED(rv))
14878 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14879 0 : return JS_TRUE;
14880 : }
14881 :
14882 : static JSBool
14883 0 : nsIDOMHTMLInputElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14884 : {
14885 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14886 : nsIDOMHTMLInputElement *self;
14887 0 : xpc_qsSelfRef selfref;
14888 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14889 0 : return JS_FALSE;
14890 : nsresult rv;
14891 : bool result;
14892 0 : rv = self->GetDisabled(&result);
14893 0 : if (NS_FAILED(rv))
14894 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14895 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
14896 0 : return JS_TRUE;
14897 : }
14898 :
14899 : static JSBool
14900 0 : nsIDOMHTMLInputElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14901 : {
14902 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14903 : nsIDOMHTMLInputElement *self;
14904 0 : xpc_qsSelfRef selfref;
14905 0 : JS::AutoValueRooter tvr(cx);
14906 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14907 0 : return JS_FALSE;
14908 : JSBool arg0;
14909 0 : JS_ValueToBoolean(cx, *vp, &arg0);
14910 : nsresult rv;
14911 0 : rv = self->SetDisabled(arg0);
14912 0 : if (NS_FAILED(rv))
14913 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14914 0 : return JS_TRUE;
14915 : }
14916 :
14917 : static JSBool
14918 0 : nsIDOMHTMLInputElement_Select(JSContext *cx, unsigned argc, jsval *vp)
14919 : {
14920 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14921 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14922 0 : if (!obj)
14923 0 : return JS_FALSE;
14924 : nsIDOMHTMLInputElement *self;
14925 0 : xpc_qsSelfRef selfref;
14926 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14927 0 : return JS_FALSE;
14928 : nsresult rv;
14929 0 : rv = self->Select();
14930 0 : if (NS_FAILED(rv))
14931 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14932 0 : *vp = JSVAL_VOID;
14933 0 : return JS_TRUE;
14934 : }
14935 :
14936 : static JSBool
14937 0 : nsIDOMHTMLInputElement_GetChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14938 : {
14939 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14940 : nsIDOMHTMLInputElement *self;
14941 0 : xpc_qsSelfRef selfref;
14942 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14943 0 : return JS_FALSE;
14944 : nsresult rv;
14945 : bool result;
14946 0 : rv = self->GetChecked(&result);
14947 0 : if (NS_FAILED(rv))
14948 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14949 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
14950 0 : return JS_TRUE;
14951 : }
14952 :
14953 : static JSBool
14954 0 : nsIDOMHTMLInputElement_SetChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14955 : {
14956 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14957 : nsIDOMHTMLInputElement *self;
14958 0 : xpc_qsSelfRef selfref;
14959 0 : JS::AutoValueRooter tvr(cx);
14960 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14961 0 : return JS_FALSE;
14962 : JSBool arg0;
14963 0 : JS_ValueToBoolean(cx, *vp, &arg0);
14964 : nsresult rv;
14965 0 : rv = self->SetChecked(arg0);
14966 0 : if (NS_FAILED(rv))
14967 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14968 0 : return JS_TRUE;
14969 : }
14970 :
14971 : static JSBool
14972 0 : nsIDOMHTMLInputElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14973 : {
14974 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14975 : nsIDOMHTMLInputElement *self;
14976 0 : xpc_qsSelfRef selfref;
14977 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14978 0 : return JS_FALSE;
14979 : nsresult rv;
14980 0 : nsString result;
14981 0 : rv = self->GetType(result);
14982 0 : if (NS_FAILED(rv))
14983 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14984 0 : return xpc::StringToJsval(cx, result, vp);
14985 : }
14986 :
14987 : static JSBool
14988 0 : nsIDOMHTMLInputElement_SetType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14989 : {
14990 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14991 : nsIDOMHTMLInputElement *self;
14992 0 : xpc_qsSelfRef selfref;
14993 0 : JS::AutoValueRooter tvr(cx);
14994 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14995 0 : return JS_FALSE;
14996 : xpc_qsDOMString arg0(cx, *vp, vp,
14997 : xpc_qsDOMString::eDefaultNullBehavior,
14998 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14999 0 : if (!arg0.IsValid())
15000 0 : return JS_FALSE;
15001 : nsresult rv;
15002 0 : rv = self->SetType(arg0);
15003 0 : if (NS_FAILED(rv))
15004 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15005 0 : return JS_TRUE;
15006 : }
15007 :
15008 : static JSBool
15009 0 : nsIDOMHTMLInputElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15010 : {
15011 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15012 0 : JSObject *callee = nsnull;
15013 : nsIDOMHTMLInputElement *self;
15014 0 : xpc_qsSelfRef selfref;
15015 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15016 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
15017 0 : return JS_FALSE;
15018 : nsresult rv;
15019 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
15020 0 : rv = self->GetForm(getter_AddRefs(result));
15021 0 : if (NS_FAILED(rv))
15022 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15023 0 : if (!result) {
15024 0 : *vp = JSVAL_NULL;
15025 0 : return JS_TRUE;
15026 : }
15027 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15028 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15029 0 : return JS_TRUE;
15030 : }
15031 : // After this point do not use 'result'!
15032 0 : qsObjectHelper helper(result, cache);
15033 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
15034 : }
15035 :
15036 : static JSBool
15037 0 : nsIDOMHTMLInputElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15038 : {
15039 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15040 : nsIDOMHTMLInputElement *self;
15041 0 : xpc_qsSelfRef selfref;
15042 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15043 0 : return JS_FALSE;
15044 : nsresult rv;
15045 0 : nsString result;
15046 0 : rv = self->GetSrc(result);
15047 0 : if (NS_FAILED(rv))
15048 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15049 0 : return xpc::StringToJsval(cx, result, vp);
15050 : }
15051 :
15052 : static JSBool
15053 0 : nsIDOMHTMLInputElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15054 : {
15055 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15056 : nsIDOMHTMLInputElement *self;
15057 0 : xpc_qsSelfRef selfref;
15058 0 : JS::AutoValueRooter tvr(cx);
15059 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15060 0 : return JS_FALSE;
15061 : xpc_qsDOMString arg0(cx, *vp, vp,
15062 : xpc_qsDOMString::eDefaultNullBehavior,
15063 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15064 0 : if (!arg0.IsValid())
15065 0 : return JS_FALSE;
15066 : nsresult rv;
15067 0 : rv = self->SetSrc(arg0);
15068 0 : if (NS_FAILED(rv))
15069 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15070 0 : return JS_TRUE;
15071 : }
15072 :
15073 : static JSBool
15074 0 : nsIDOMHTMLInputElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15075 : {
15076 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15077 : nsIDOMHTMLInputElement *self;
15078 0 : xpc_qsSelfRef selfref;
15079 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15080 0 : return JS_FALSE;
15081 : nsresult rv;
15082 0 : nsString result;
15083 0 : rv = self->GetName(result);
15084 0 : if (NS_FAILED(rv))
15085 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15086 0 : return xpc::StringToJsval(cx, result, vp);
15087 : }
15088 :
15089 : static JSBool
15090 0 : nsIDOMHTMLInputElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15091 : {
15092 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15093 : nsIDOMHTMLInputElement *self;
15094 0 : xpc_qsSelfRef selfref;
15095 0 : JS::AutoValueRooter tvr(cx);
15096 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15097 0 : return JS_FALSE;
15098 : xpc_qsDOMString arg0(cx, *vp, vp,
15099 : xpc_qsDOMString::eDefaultNullBehavior,
15100 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15101 0 : if (!arg0.IsValid())
15102 0 : return JS_FALSE;
15103 : nsresult rv;
15104 0 : rv = self->SetName(arg0);
15105 0 : if (NS_FAILED(rv))
15106 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15107 0 : return JS_TRUE;
15108 : }
15109 :
15110 : static JSBool
15111 0 : nsIDOMHTMLInputElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15112 : {
15113 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15114 : nsIDOMHTMLInputElement *self;
15115 0 : xpc_qsSelfRef selfref;
15116 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15117 0 : return JS_FALSE;
15118 : nsresult rv;
15119 0 : nsString result;
15120 0 : rv = self->GetValue(result);
15121 0 : if (NS_FAILED(rv))
15122 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15123 0 : return xpc::StringToJsval(cx, result, vp);
15124 : }
15125 :
15126 : static JSBool
15127 0 : nsIDOMHTMLInputElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15128 : {
15129 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15130 : nsIDOMHTMLInputElement *self;
15131 0 : xpc_qsSelfRef selfref;
15132 0 : JS::AutoValueRooter tvr(cx);
15133 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15134 0 : return JS_FALSE;
15135 : xpc_qsDOMString arg0(cx, *vp, vp,
15136 : xpc_qsDOMString::eDefaultNullBehavior,
15137 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15138 0 : if (!arg0.IsValid())
15139 0 : return JS_FALSE;
15140 : nsresult rv;
15141 0 : rv = self->SetValue(arg0);
15142 0 : if (NS_FAILED(rv))
15143 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15144 0 : return JS_TRUE;
15145 : }
15146 :
15147 : static JSBool
15148 0 : nsIDOMHTMLInputElement_GetFiles(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15149 : {
15150 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15151 0 : JSObject *callee = nsnull;
15152 : nsIDOMHTMLInputElement *self;
15153 0 : xpc_qsSelfRef selfref;
15154 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15155 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
15156 0 : return JS_FALSE;
15157 : nsresult rv;
15158 0 : nsCOMPtr<nsIDOMFileList> result;
15159 0 : rv = self->GetFiles(getter_AddRefs(result));
15160 0 : if (NS_FAILED(rv))
15161 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15162 0 : if (!result) {
15163 0 : *vp = JSVAL_NULL;
15164 0 : return JS_TRUE;
15165 : }
15166 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15167 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15168 0 : return JS_TRUE;
15169 : }
15170 : // After this point do not use 'result'!
15171 0 : qsObjectHelper helper(result, cache);
15172 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMFileList), &interfaces[k_nsIDOMFileList], vp);
15173 : }
15174 :
15175 : static JSBool
15176 0 : nsIDOMHTMLInputElement_GetTextLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15177 : {
15178 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15179 : nsIDOMHTMLInputElement *self;
15180 0 : xpc_qsSelfRef selfref;
15181 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15182 0 : return JS_FALSE;
15183 : nsresult rv;
15184 : PRInt32 result;
15185 0 : rv = self->GetTextLength(&result);
15186 0 : if (NS_FAILED(rv))
15187 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15188 0 : *vp = INT_TO_JSVAL(result);
15189 0 : return JS_TRUE;
15190 : }
15191 :
15192 : static JSBool
15193 0 : nsIDOMHTMLInputElement_GetSelectionStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15194 : {
15195 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15196 : nsIDOMHTMLInputElement *self;
15197 0 : xpc_qsSelfRef selfref;
15198 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15199 0 : return JS_FALSE;
15200 : nsresult rv;
15201 : PRInt32 result;
15202 0 : rv = self->GetSelectionStart(&result);
15203 0 : if (NS_FAILED(rv))
15204 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15205 0 : *vp = INT_TO_JSVAL(result);
15206 0 : return JS_TRUE;
15207 : }
15208 :
15209 : static JSBool
15210 0 : nsIDOMHTMLInputElement_SetSelectionStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15211 : {
15212 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15213 : nsIDOMHTMLInputElement *self;
15214 0 : xpc_qsSelfRef selfref;
15215 0 : JS::AutoValueRooter tvr(cx);
15216 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15217 0 : return JS_FALSE;
15218 : int32_t arg0;
15219 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
15220 0 : return JS_FALSE;
15221 : nsresult rv;
15222 0 : rv = self->SetSelectionStart(arg0);
15223 0 : if (NS_FAILED(rv))
15224 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15225 0 : return JS_TRUE;
15226 : }
15227 :
15228 : static JSBool
15229 0 : nsIDOMHTMLInputElement_GetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15230 : {
15231 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15232 : nsIDOMHTMLInputElement *self;
15233 0 : xpc_qsSelfRef selfref;
15234 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15235 0 : return JS_FALSE;
15236 : nsresult rv;
15237 : PRInt32 result;
15238 0 : rv = self->GetSelectionEnd(&result);
15239 0 : if (NS_FAILED(rv))
15240 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15241 0 : *vp = INT_TO_JSVAL(result);
15242 0 : return JS_TRUE;
15243 : }
15244 :
15245 : static JSBool
15246 0 : nsIDOMHTMLInputElement_SetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15247 : {
15248 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15249 : nsIDOMHTMLInputElement *self;
15250 0 : xpc_qsSelfRef selfref;
15251 0 : JS::AutoValueRooter tvr(cx);
15252 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15253 0 : return JS_FALSE;
15254 : int32_t arg0;
15255 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
15256 0 : return JS_FALSE;
15257 : nsresult rv;
15258 0 : rv = self->SetSelectionEnd(arg0);
15259 0 : if (NS_FAILED(rv))
15260 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15261 0 : return JS_TRUE;
15262 : }
15263 :
15264 : static JSBool
15265 0 : nsIDOMHTMLInputElement_GetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15266 : {
15267 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15268 : nsIDOMHTMLInputElement *self;
15269 0 : xpc_qsSelfRef selfref;
15270 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15271 0 : return JS_FALSE;
15272 : nsresult rv;
15273 0 : nsString result;
15274 0 : rv = self->GetSelectionDirection(result);
15275 0 : if (NS_FAILED(rv))
15276 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15277 0 : return xpc::StringToJsval(cx, result, vp);
15278 : }
15279 :
15280 : static JSBool
15281 0 : nsIDOMHTMLInputElement_SetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15282 : {
15283 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15284 : nsIDOMHTMLInputElement *self;
15285 0 : xpc_qsSelfRef selfref;
15286 0 : JS::AutoValueRooter tvr(cx);
15287 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15288 0 : return JS_FALSE;
15289 : xpc_qsDOMString arg0(cx, *vp, vp,
15290 : xpc_qsDOMString::eDefaultNullBehavior,
15291 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15292 0 : if (!arg0.IsValid())
15293 0 : return JS_FALSE;
15294 : nsresult rv;
15295 0 : rv = self->SetSelectionDirection(arg0);
15296 0 : if (NS_FAILED(rv))
15297 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15298 0 : return JS_TRUE;
15299 : }
15300 :
15301 : static JSBool
15302 0 : nsIDOMHTMLInputElement_SetSelectionRange(JSContext *cx, unsigned argc, jsval *vp)
15303 : {
15304 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15305 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
15306 0 : if (!obj)
15307 0 : return JS_FALSE;
15308 : nsIDOMHTMLInputElement *self;
15309 0 : xpc_qsSelfRef selfref;
15310 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
15311 0 : return JS_FALSE;
15312 0 : if (argc < 2)
15313 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
15314 0 : jsval *argv = JS_ARGV(cx, vp);
15315 : int32_t arg0;
15316 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
15317 0 : return JS_FALSE;
15318 : int32_t arg1;
15319 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
15320 0 : return JS_FALSE;
15321 : xpc_qsDOMString arg2(cx, (2 < argc ? argv[2] : JSVAL_NULL), (2 < argc ? &argv[2] : NULL),
15322 : xpc_qsDOMString::eDefaultNullBehavior,
15323 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15324 0 : if (!arg2.IsValid())
15325 0 : return JS_FALSE;
15326 : nsresult rv;
15327 0 : rv = self->SetSelectionRange(arg0, arg1, arg2);
15328 0 : if (NS_FAILED(rv))
15329 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
15330 0 : *vp = JSVAL_VOID;
15331 0 : return JS_TRUE;
15332 : }
15333 :
15334 : // === interface nsIDOMHTMLLinkElement
15335 :
15336 : static JSBool
15337 0 : nsIDOMHTMLLinkElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15338 : {
15339 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15340 : nsIDOMHTMLLinkElement *self;
15341 0 : xpc_qsSelfRef selfref;
15342 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15343 0 : return JS_FALSE;
15344 : nsresult rv;
15345 : bool result;
15346 0 : rv = self->GetDisabled(&result);
15347 0 : if (NS_FAILED(rv))
15348 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15349 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15350 0 : return JS_TRUE;
15351 : }
15352 :
15353 : static JSBool
15354 0 : nsIDOMHTMLLinkElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15355 : {
15356 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15357 : nsIDOMHTMLLinkElement *self;
15358 0 : xpc_qsSelfRef selfref;
15359 0 : JS::AutoValueRooter tvr(cx);
15360 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15361 0 : return JS_FALSE;
15362 : JSBool arg0;
15363 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15364 : nsresult rv;
15365 0 : rv = self->SetDisabled(arg0);
15366 0 : if (NS_FAILED(rv))
15367 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15368 0 : return JS_TRUE;
15369 : }
15370 :
15371 : // === interface nsIDOMHTMLMenuElement
15372 :
15373 : static JSBool
15374 0 : nsIDOMHTMLMenuElement_GetCompact(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15375 : {
15376 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15377 : nsIDOMHTMLMenuElement *self;
15378 0 : xpc_qsSelfRef selfref;
15379 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15380 0 : return JS_FALSE;
15381 : nsresult rv;
15382 : bool result;
15383 0 : rv = self->GetCompact(&result);
15384 0 : if (NS_FAILED(rv))
15385 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15386 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15387 0 : return JS_TRUE;
15388 : }
15389 :
15390 : static JSBool
15391 0 : nsIDOMHTMLMenuElement_SetCompact(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15392 : {
15393 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15394 : nsIDOMHTMLMenuElement *self;
15395 0 : xpc_qsSelfRef selfref;
15396 0 : JS::AutoValueRooter tvr(cx);
15397 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15398 0 : return JS_FALSE;
15399 : JSBool arg0;
15400 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15401 : nsresult rv;
15402 0 : rv = self->SetCompact(arg0);
15403 0 : if (NS_FAILED(rv))
15404 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15405 0 : return JS_TRUE;
15406 : }
15407 :
15408 : static JSBool
15409 0 : nsIDOMHTMLMenuElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15410 : {
15411 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15412 : nsIDOMHTMLMenuElement *self;
15413 0 : xpc_qsSelfRef selfref;
15414 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15415 0 : return JS_FALSE;
15416 : nsresult rv;
15417 0 : nsString result;
15418 0 : rv = self->GetType(result);
15419 0 : if (NS_FAILED(rv))
15420 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15421 0 : return xpc::StringToJsval(cx, result, vp);
15422 : }
15423 :
15424 : static JSBool
15425 0 : nsIDOMHTMLMenuElement_SetType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15426 : {
15427 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15428 : nsIDOMHTMLMenuElement *self;
15429 0 : xpc_qsSelfRef selfref;
15430 0 : JS::AutoValueRooter tvr(cx);
15431 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15432 0 : return JS_FALSE;
15433 : xpc_qsDOMString arg0(cx, *vp, vp,
15434 : xpc_qsDOMString::eDefaultNullBehavior,
15435 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15436 0 : if (!arg0.IsValid())
15437 0 : return JS_FALSE;
15438 : nsresult rv;
15439 0 : rv = self->SetType(arg0);
15440 0 : if (NS_FAILED(rv))
15441 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15442 0 : return JS_TRUE;
15443 : }
15444 :
15445 : static JSBool
15446 0 : nsIDOMHTMLMenuElement_GetLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15447 : {
15448 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15449 : nsIDOMHTMLMenuElement *self;
15450 0 : xpc_qsSelfRef selfref;
15451 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15452 0 : return JS_FALSE;
15453 : nsresult rv;
15454 0 : nsString result;
15455 0 : rv = self->GetLabel(result);
15456 0 : if (NS_FAILED(rv))
15457 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15458 0 : return xpc::StringToJsval(cx, result, vp);
15459 : }
15460 :
15461 : static JSBool
15462 0 : nsIDOMHTMLMenuElement_SetLabel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15463 : {
15464 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15465 : nsIDOMHTMLMenuElement *self;
15466 0 : xpc_qsSelfRef selfref;
15467 0 : JS::AutoValueRooter tvr(cx);
15468 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15469 0 : return JS_FALSE;
15470 : xpc_qsDOMString arg0(cx, *vp, vp,
15471 : xpc_qsDOMString::eDefaultNullBehavior,
15472 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15473 0 : if (!arg0.IsValid())
15474 0 : return JS_FALSE;
15475 : nsresult rv;
15476 0 : rv = self->SetLabel(arg0);
15477 0 : if (NS_FAILED(rv))
15478 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15479 0 : return JS_TRUE;
15480 : }
15481 :
15482 : // === interface nsIDOMHTMLMenuItemElement
15483 :
15484 : // === interface nsIDOMHTMLOptionElement
15485 :
15486 : static JSBool
15487 0 : nsIDOMHTMLOptionElement_GetIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15488 : {
15489 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15490 : nsIDOMHTMLOptionElement *self;
15491 0 : xpc_qsSelfRef selfref;
15492 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15493 0 : return JS_FALSE;
15494 : nsresult rv;
15495 : PRInt32 result;
15496 0 : rv = self->GetIndex(&result);
15497 0 : if (NS_FAILED(rv))
15498 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15499 0 : *vp = INT_TO_JSVAL(result);
15500 0 : return JS_TRUE;
15501 : }
15502 :
15503 : static JSBool
15504 0 : nsIDOMHTMLOptionElement_GetSelected(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15505 : {
15506 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15507 : nsIDOMHTMLOptionElement *self;
15508 0 : xpc_qsSelfRef selfref;
15509 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15510 0 : return JS_FALSE;
15511 : nsresult rv;
15512 : bool result;
15513 0 : rv = self->GetSelected(&result);
15514 0 : if (NS_FAILED(rv))
15515 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15516 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15517 0 : return JS_TRUE;
15518 : }
15519 :
15520 : static JSBool
15521 0 : nsIDOMHTMLOptionElement_SetSelected(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15522 : {
15523 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15524 : nsIDOMHTMLOptionElement *self;
15525 0 : xpc_qsSelfRef selfref;
15526 0 : JS::AutoValueRooter tvr(cx);
15527 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15528 0 : return JS_FALSE;
15529 : JSBool arg0;
15530 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15531 : nsresult rv;
15532 0 : rv = self->SetSelected(arg0);
15533 0 : if (NS_FAILED(rv))
15534 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15535 0 : return JS_TRUE;
15536 : }
15537 :
15538 : static JSBool
15539 0 : nsIDOMHTMLOptionElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15540 : {
15541 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15542 0 : JSObject *callee = nsnull;
15543 : nsIDOMHTMLOptionElement *self;
15544 0 : xpc_qsSelfRef selfref;
15545 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15546 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
15547 0 : return JS_FALSE;
15548 : nsresult rv;
15549 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
15550 0 : rv = self->GetForm(getter_AddRefs(result));
15551 0 : if (NS_FAILED(rv))
15552 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15553 0 : if (!result) {
15554 0 : *vp = JSVAL_NULL;
15555 0 : return JS_TRUE;
15556 : }
15557 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15558 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15559 0 : return JS_TRUE;
15560 : }
15561 : // After this point do not use 'result'!
15562 0 : qsObjectHelper helper(result, cache);
15563 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
15564 : }
15565 :
15566 : static JSBool
15567 0 : nsIDOMHTMLOptionElement_GetText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15568 : {
15569 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15570 : nsIDOMHTMLOptionElement *self;
15571 0 : xpc_qsSelfRef selfref;
15572 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15573 0 : return JS_FALSE;
15574 : nsresult rv;
15575 0 : nsString result;
15576 0 : rv = self->GetText(result);
15577 0 : if (NS_FAILED(rv))
15578 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15579 0 : return xpc::StringToJsval(cx, result, vp);
15580 : }
15581 :
15582 : static JSBool
15583 0 : nsIDOMHTMLOptionElement_SetText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15584 : {
15585 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15586 : nsIDOMHTMLOptionElement *self;
15587 0 : xpc_qsSelfRef selfref;
15588 0 : JS::AutoValueRooter tvr(cx);
15589 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15590 0 : return JS_FALSE;
15591 : xpc_qsDOMString arg0(cx, *vp, vp,
15592 : xpc_qsDOMString::eDefaultNullBehavior,
15593 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15594 0 : if (!arg0.IsValid())
15595 0 : return JS_FALSE;
15596 : nsresult rv;
15597 0 : rv = self->SetText(arg0);
15598 0 : if (NS_FAILED(rv))
15599 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15600 0 : return JS_TRUE;
15601 : }
15602 :
15603 : static JSBool
15604 0 : nsIDOMHTMLOptionElement_GetDefaultSelected(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15605 : {
15606 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15607 : nsIDOMHTMLOptionElement *self;
15608 0 : xpc_qsSelfRef selfref;
15609 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15610 0 : return JS_FALSE;
15611 : nsresult rv;
15612 : bool result;
15613 0 : rv = self->GetDefaultSelected(&result);
15614 0 : if (NS_FAILED(rv))
15615 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15616 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15617 0 : return JS_TRUE;
15618 : }
15619 :
15620 : static JSBool
15621 0 : nsIDOMHTMLOptionElement_SetDefaultSelected(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15622 : {
15623 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15624 : nsIDOMHTMLOptionElement *self;
15625 0 : xpc_qsSelfRef selfref;
15626 0 : JS::AutoValueRooter tvr(cx);
15627 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15628 0 : return JS_FALSE;
15629 : JSBool arg0;
15630 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15631 : nsresult rv;
15632 0 : rv = self->SetDefaultSelected(arg0);
15633 0 : if (NS_FAILED(rv))
15634 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15635 0 : return JS_TRUE;
15636 : }
15637 :
15638 : static JSBool
15639 0 : nsIDOMHTMLOptionElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15640 : {
15641 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15642 : nsIDOMHTMLOptionElement *self;
15643 0 : xpc_qsSelfRef selfref;
15644 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15645 0 : return JS_FALSE;
15646 : nsresult rv;
15647 0 : nsString result;
15648 0 : rv = self->GetValue(result);
15649 0 : if (NS_FAILED(rv))
15650 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15651 0 : return xpc::StringToJsval(cx, result, vp);
15652 : }
15653 :
15654 : static JSBool
15655 0 : nsIDOMHTMLOptionElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15656 : {
15657 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15658 : nsIDOMHTMLOptionElement *self;
15659 0 : xpc_qsSelfRef selfref;
15660 0 : JS::AutoValueRooter tvr(cx);
15661 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15662 0 : return JS_FALSE;
15663 : xpc_qsDOMString arg0(cx, *vp, vp,
15664 : xpc_qsDOMString::eDefaultNullBehavior,
15665 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15666 0 : if (!arg0.IsValid())
15667 0 : return JS_FALSE;
15668 : nsresult rv;
15669 0 : rv = self->SetValue(arg0);
15670 0 : if (NS_FAILED(rv))
15671 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15672 0 : return JS_TRUE;
15673 : }
15674 :
15675 : static JSBool
15676 0 : nsIDOMHTMLOptionElement_GetLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15677 : {
15678 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15679 : nsIDOMHTMLOptionElement *self;
15680 0 : xpc_qsSelfRef selfref;
15681 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15682 0 : return JS_FALSE;
15683 : nsresult rv;
15684 0 : nsString result;
15685 0 : rv = self->GetLabel(result);
15686 0 : if (NS_FAILED(rv))
15687 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15688 0 : return xpc::StringToJsval(cx, result, vp);
15689 : }
15690 :
15691 : static JSBool
15692 0 : nsIDOMHTMLOptionElement_SetLabel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15693 : {
15694 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15695 : nsIDOMHTMLOptionElement *self;
15696 0 : xpc_qsSelfRef selfref;
15697 0 : JS::AutoValueRooter tvr(cx);
15698 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15699 0 : return JS_FALSE;
15700 : xpc_qsDOMString arg0(cx, *vp, vp,
15701 : xpc_qsDOMString::eDefaultNullBehavior,
15702 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15703 0 : if (!arg0.IsValid())
15704 0 : return JS_FALSE;
15705 : nsresult rv;
15706 0 : rv = self->SetLabel(arg0);
15707 0 : if (NS_FAILED(rv))
15708 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15709 0 : return JS_TRUE;
15710 : }
15711 :
15712 : static JSBool
15713 0 : nsIDOMHTMLOptionElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15714 : {
15715 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15716 : nsIDOMHTMLOptionElement *self;
15717 0 : xpc_qsSelfRef selfref;
15718 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15719 0 : return JS_FALSE;
15720 : nsresult rv;
15721 : bool result;
15722 0 : rv = self->GetDisabled(&result);
15723 0 : if (NS_FAILED(rv))
15724 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15725 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15726 0 : return JS_TRUE;
15727 : }
15728 :
15729 : static JSBool
15730 0 : nsIDOMHTMLOptionElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15731 : {
15732 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15733 : nsIDOMHTMLOptionElement *self;
15734 0 : xpc_qsSelfRef selfref;
15735 0 : JS::AutoValueRooter tvr(cx);
15736 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15737 0 : return JS_FALSE;
15738 : JSBool arg0;
15739 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15740 : nsresult rv;
15741 0 : rv = self->SetDisabled(arg0);
15742 0 : if (NS_FAILED(rv))
15743 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15744 0 : return JS_TRUE;
15745 : }
15746 :
15747 : // === interface nsIDOMHTMLOptionsCollection
15748 :
15749 : static JSBool
15750 0 : nsIDOMHTMLOptionsCollection_Item(JSContext *cx, unsigned argc, jsval *vp)
15751 : {
15752 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15753 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
15754 0 : if (!obj)
15755 0 : return JS_FALSE;
15756 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
15757 : nsIDOMHTMLOptionsCollection *self;
15758 0 : xpc_qsSelfRef selfref;
15759 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15760 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
15761 0 : return JS_FALSE;
15762 0 : if (argc < 1)
15763 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
15764 0 : jsval *argv = JS_ARGV(cx, vp);
15765 : uint32_t arg0;
15766 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
15767 0 : return JS_FALSE;
15768 : nsresult rv;
15769 0 : nsCOMPtr<nsIDOMNode> result;
15770 0 : rv = self->Item(arg0, getter_AddRefs(result));
15771 0 : if (NS_FAILED(rv))
15772 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
15773 0 : if (!result) {
15774 0 : *vp = JSVAL_NULL;
15775 0 : return JS_TRUE;
15776 : }
15777 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15778 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15779 0 : return JS_TRUE;
15780 : }
15781 : // After this point do not use 'result'!
15782 0 : qsObjectHelper helper(result, cache);
15783 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
15784 : }
15785 :
15786 : static JSBool
15787 0 : nsIDOMHTMLOptionsCollection_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15788 : {
15789 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15790 : nsIDOMHTMLOptionsCollection *self;
15791 0 : xpc_qsSelfRef selfref;
15792 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15793 0 : return JS_FALSE;
15794 : nsresult rv;
15795 : PRUint32 result;
15796 0 : rv = self->GetLength(&result);
15797 0 : if (NS_FAILED(rv))
15798 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15799 0 : *vp = UINT_TO_JSVAL(result);
15800 0 : return JS_TRUE;
15801 : }
15802 :
15803 : static JSBool
15804 0 : nsIDOMHTMLOptionsCollection_SetLength(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15805 : {
15806 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15807 : nsIDOMHTMLOptionsCollection *self;
15808 0 : xpc_qsSelfRef selfref;
15809 0 : JS::AutoValueRooter tvr(cx);
15810 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15811 0 : return JS_FALSE;
15812 : uint32_t arg0;
15813 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
15814 0 : return JS_FALSE;
15815 : nsresult rv;
15816 0 : rv = self->SetLength(arg0);
15817 0 : if (NS_FAILED(rv))
15818 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15819 0 : return JS_TRUE;
15820 : }
15821 :
15822 : static JSBool
15823 0 : nsIDOMHTMLOptionsCollection_GetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15824 : {
15825 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15826 : nsIDOMHTMLOptionsCollection *self;
15827 0 : xpc_qsSelfRef selfref;
15828 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15829 0 : return JS_FALSE;
15830 : nsresult rv;
15831 : PRInt32 result;
15832 0 : rv = self->GetSelectedIndex(&result);
15833 0 : if (NS_FAILED(rv))
15834 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15835 0 : *vp = INT_TO_JSVAL(result);
15836 0 : return JS_TRUE;
15837 : }
15838 :
15839 : static JSBool
15840 0 : nsIDOMHTMLOptionsCollection_SetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15841 : {
15842 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15843 : nsIDOMHTMLOptionsCollection *self;
15844 0 : xpc_qsSelfRef selfref;
15845 0 : JS::AutoValueRooter tvr(cx);
15846 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15847 0 : return JS_FALSE;
15848 : int32_t arg0;
15849 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
15850 0 : return JS_FALSE;
15851 : nsresult rv;
15852 0 : rv = self->SetSelectedIndex(arg0);
15853 0 : if (NS_FAILED(rv))
15854 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15855 0 : return JS_TRUE;
15856 : }
15857 :
15858 : static JSBool
15859 0 : nsIDOMHTMLOptionsCollection_Add(JSContext *cx, unsigned argc, jsval *vp)
15860 : {
15861 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15862 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
15863 0 : if (!obj)
15864 0 : return JS_FALSE;
15865 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
15866 : nsIDOMHTMLOptionsCollection *self;
15867 0 : xpc_qsSelfRef selfref;
15868 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
15869 0 : return JS_FALSE;
15870 0 : if (argc < 1)
15871 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
15872 0 : jsval *argv = JS_ARGV(cx, vp);
15873 : nsresult rv;
15874 : nsIDOMHTMLOptionElement *arg0;
15875 0 : xpc_qsSelfRef arg0ref;
15876 0 : rv = xpc_qsUnwrapArg<nsIDOMHTMLOptionElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
15877 0 : if (NS_FAILED(rv)) {
15878 0 : xpc_qsThrowBadArgWithCcx(ccx, rv, 0);
15879 0 : return JS_FALSE;
15880 : }
15881 0 : nsCOMPtr<nsIVariant> arg1(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (1 < argc ? argv[1] : JSVAL_NULL))));
15882 0 : if (!arg1) {
15883 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 1);
15884 0 : return JS_FALSE;
15885 0 : } rv = self->Add(arg0, arg1);
15886 0 : if (NS_FAILED(rv))
15887 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
15888 0 : *vp = JSVAL_VOID;
15889 0 : return JS_TRUE;
15890 : }
15891 :
15892 : // === interface nsIDOMHTMLProgressElement
15893 :
15894 : static JSBool
15895 0 : nsIDOMHTMLProgressElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15896 : {
15897 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15898 : nsIDOMHTMLProgressElement *self;
15899 0 : xpc_qsSelfRef selfref;
15900 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15901 0 : return JS_FALSE;
15902 : nsresult rv;
15903 : double result;
15904 0 : rv = self->GetValue(&result);
15905 0 : if (NS_FAILED(rv))
15906 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15907 0 : return JS_NewNumberValue(cx, result, vp);
15908 : }
15909 :
15910 : static JSBool
15911 0 : nsIDOMHTMLProgressElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15912 : {
15913 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15914 : nsIDOMHTMLProgressElement *self;
15915 0 : xpc_qsSelfRef selfref;
15916 0 : JS::AutoValueRooter tvr(cx);
15917 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15918 0 : return JS_FALSE;
15919 : double arg0;
15920 0 : if (!JS_ValueToNumber(cx, *vp, &arg0))
15921 0 : return JS_FALSE;
15922 : nsresult rv;
15923 0 : rv = self->SetValue(arg0);
15924 0 : if (NS_FAILED(rv))
15925 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15926 0 : return JS_TRUE;
15927 : }
15928 :
15929 : static JSBool
15930 0 : nsIDOMHTMLProgressElement_GetMax(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15931 : {
15932 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15933 : nsIDOMHTMLProgressElement *self;
15934 0 : xpc_qsSelfRef selfref;
15935 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15936 0 : return JS_FALSE;
15937 : nsresult rv;
15938 : double result;
15939 0 : rv = self->GetMax(&result);
15940 0 : if (NS_FAILED(rv))
15941 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15942 0 : return JS_NewNumberValue(cx, result, vp);
15943 : }
15944 :
15945 : static JSBool
15946 0 : nsIDOMHTMLProgressElement_SetMax(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15947 : {
15948 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15949 : nsIDOMHTMLProgressElement *self;
15950 0 : xpc_qsSelfRef selfref;
15951 0 : JS::AutoValueRooter tvr(cx);
15952 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15953 0 : return JS_FALSE;
15954 : double arg0;
15955 0 : if (!JS_ValueToNumber(cx, *vp, &arg0))
15956 0 : return JS_FALSE;
15957 : nsresult rv;
15958 0 : rv = self->SetMax(arg0);
15959 0 : if (NS_FAILED(rv))
15960 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15961 0 : return JS_TRUE;
15962 : }
15963 :
15964 : static JSBool
15965 0 : nsIDOMHTMLProgressElement_GetPosition(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15966 : {
15967 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15968 : nsIDOMHTMLProgressElement *self;
15969 0 : xpc_qsSelfRef selfref;
15970 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15971 0 : return JS_FALSE;
15972 : nsresult rv;
15973 : double result;
15974 0 : rv = self->GetPosition(&result);
15975 0 : if (NS_FAILED(rv))
15976 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15977 0 : return JS_NewNumberValue(cx, result, vp);
15978 : }
15979 :
15980 : static JSBool
15981 0 : nsIDOMHTMLProgressElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15982 : {
15983 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15984 0 : JSObject *callee = nsnull;
15985 : nsIDOMHTMLProgressElement *self;
15986 0 : xpc_qsSelfRef selfref;
15987 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15988 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
15989 0 : return JS_FALSE;
15990 : nsresult rv;
15991 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
15992 0 : rv = self->GetForm(getter_AddRefs(result));
15993 0 : if (NS_FAILED(rv))
15994 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15995 0 : if (!result) {
15996 0 : *vp = JSVAL_NULL;
15997 0 : return JS_TRUE;
15998 : }
15999 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16000 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16001 0 : return JS_TRUE;
16002 : }
16003 : // After this point do not use 'result'!
16004 0 : qsObjectHelper helper(result, cache);
16005 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
16006 : }
16007 :
16008 : // === interface nsIDOMHTMLSelectElement
16009 :
16010 : static JSBool
16011 0 : nsIDOMHTMLSelectElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16012 : {
16013 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16014 : nsIDOMHTMLSelectElement *self;
16015 0 : xpc_qsSelfRef selfref;
16016 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16017 0 : return JS_FALSE;
16018 : nsresult rv;
16019 0 : nsString result;
16020 0 : rv = self->GetName(result);
16021 0 : if (NS_FAILED(rv))
16022 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16023 0 : return xpc::StringToJsval(cx, result, vp);
16024 : }
16025 :
16026 : static JSBool
16027 0 : nsIDOMHTMLSelectElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16028 : {
16029 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16030 : nsIDOMHTMLSelectElement *self;
16031 0 : xpc_qsSelfRef selfref;
16032 0 : JS::AutoValueRooter tvr(cx);
16033 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16034 0 : return JS_FALSE;
16035 : xpc_qsDOMString arg0(cx, *vp, vp,
16036 : xpc_qsDOMString::eDefaultNullBehavior,
16037 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16038 0 : if (!arg0.IsValid())
16039 0 : return JS_FALSE;
16040 : nsresult rv;
16041 0 : rv = self->SetName(arg0);
16042 0 : if (NS_FAILED(rv))
16043 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16044 0 : return JS_TRUE;
16045 : }
16046 :
16047 : static JSBool
16048 0 : nsIDOMHTMLSelectElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16049 : {
16050 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16051 0 : JSObject *callee = nsnull;
16052 : nsIDOMHTMLSelectElement *self;
16053 0 : xpc_qsSelfRef selfref;
16054 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16055 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16056 0 : return JS_FALSE;
16057 : nsresult rv;
16058 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
16059 0 : rv = self->GetForm(getter_AddRefs(result));
16060 0 : if (NS_FAILED(rv))
16061 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16062 0 : if (!result) {
16063 0 : *vp = JSVAL_NULL;
16064 0 : return JS_TRUE;
16065 : }
16066 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16067 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16068 0 : return JS_TRUE;
16069 : }
16070 : // After this point do not use 'result'!
16071 0 : qsObjectHelper helper(result, cache);
16072 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
16073 : }
16074 :
16075 : static JSBool
16076 0 : nsIDOMHTMLSelectElement_Add(JSContext *cx, unsigned argc, jsval *vp)
16077 : {
16078 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16079 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16080 0 : if (!obj)
16081 0 : return JS_FALSE;
16082 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
16083 : nsIDOMHTMLSelectElement *self;
16084 0 : xpc_qsSelfRef selfref;
16085 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
16086 0 : return JS_FALSE;
16087 0 : if (argc < 1)
16088 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16089 0 : jsval *argv = JS_ARGV(cx, vp);
16090 : nsresult rv;
16091 : nsIDOMHTMLElement *arg0;
16092 0 : xpc_qsSelfRef arg0ref;
16093 0 : rv = xpc_qsUnwrapArg<nsIDOMHTMLElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
16094 0 : if (NS_FAILED(rv)) {
16095 0 : xpc_qsThrowBadArgWithCcx(ccx, rv, 0);
16096 0 : return JS_FALSE;
16097 : }
16098 0 : nsCOMPtr<nsIVariant> arg1(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (1 < argc ? argv[1] : JSVAL_NULL))));
16099 0 : if (!arg1) {
16100 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 1);
16101 0 : return JS_FALSE;
16102 0 : } rv = self->Add(arg0, arg1);
16103 0 : if (NS_FAILED(rv))
16104 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
16105 0 : *vp = JSVAL_VOID;
16106 0 : return JS_TRUE;
16107 : }
16108 :
16109 : static JSBool
16110 0 : nsIDOMHTMLSelectElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16111 : {
16112 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16113 : nsIDOMHTMLSelectElement *self;
16114 0 : xpc_qsSelfRef selfref;
16115 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16116 0 : return JS_FALSE;
16117 : nsresult rv;
16118 0 : nsString result;
16119 0 : rv = self->GetValue(result);
16120 0 : if (NS_FAILED(rv))
16121 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16122 0 : return xpc::StringToJsval(cx, result, vp);
16123 : }
16124 :
16125 : static JSBool
16126 0 : nsIDOMHTMLSelectElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16127 : {
16128 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16129 : nsIDOMHTMLSelectElement *self;
16130 0 : xpc_qsSelfRef selfref;
16131 0 : JS::AutoValueRooter tvr(cx);
16132 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16133 0 : return JS_FALSE;
16134 : xpc_qsDOMString arg0(cx, *vp, vp,
16135 : xpc_qsDOMString::eDefaultNullBehavior,
16136 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16137 0 : if (!arg0.IsValid())
16138 0 : return JS_FALSE;
16139 : nsresult rv;
16140 0 : rv = self->SetValue(arg0);
16141 0 : if (NS_FAILED(rv))
16142 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16143 0 : return JS_TRUE;
16144 : }
16145 :
16146 : static JSBool
16147 0 : nsIDOMHTMLSelectElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16148 : {
16149 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16150 : nsIDOMHTMLSelectElement *self;
16151 0 : xpc_qsSelfRef selfref;
16152 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16153 0 : return JS_FALSE;
16154 : nsresult rv;
16155 : bool result;
16156 0 : rv = self->GetDisabled(&result);
16157 0 : if (NS_FAILED(rv))
16158 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16159 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
16160 0 : return JS_TRUE;
16161 : }
16162 :
16163 : static JSBool
16164 0 : nsIDOMHTMLSelectElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16165 : {
16166 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16167 : nsIDOMHTMLSelectElement *self;
16168 0 : xpc_qsSelfRef selfref;
16169 0 : JS::AutoValueRooter tvr(cx);
16170 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16171 0 : return JS_FALSE;
16172 : JSBool arg0;
16173 0 : JS_ValueToBoolean(cx, *vp, &arg0);
16174 : nsresult rv;
16175 0 : rv = self->SetDisabled(arg0);
16176 0 : if (NS_FAILED(rv))
16177 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16178 0 : return JS_TRUE;
16179 : }
16180 :
16181 : static JSBool
16182 0 : nsIDOMHTMLSelectElement_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16183 : {
16184 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16185 : nsIDOMHTMLSelectElement *self;
16186 0 : xpc_qsSelfRef selfref;
16187 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16188 0 : return JS_FALSE;
16189 : nsresult rv;
16190 : PRUint32 result;
16191 0 : rv = self->GetLength(&result);
16192 0 : if (NS_FAILED(rv))
16193 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16194 0 : *vp = UINT_TO_JSVAL(result);
16195 0 : return JS_TRUE;
16196 : }
16197 :
16198 : static JSBool
16199 0 : nsIDOMHTMLSelectElement_SetLength(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16200 : {
16201 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16202 : nsIDOMHTMLSelectElement *self;
16203 0 : xpc_qsSelfRef selfref;
16204 0 : JS::AutoValueRooter tvr(cx);
16205 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16206 0 : return JS_FALSE;
16207 : uint32_t arg0;
16208 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
16209 0 : return JS_FALSE;
16210 : nsresult rv;
16211 0 : rv = self->SetLength(arg0);
16212 0 : if (NS_FAILED(rv))
16213 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16214 0 : return JS_TRUE;
16215 : }
16216 :
16217 : static JSBool
16218 0 : nsIDOMHTMLSelectElement_Remove(JSContext *cx, unsigned argc, jsval *vp)
16219 : {
16220 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16221 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16222 0 : if (!obj)
16223 0 : return JS_FALSE;
16224 : nsIDOMHTMLSelectElement *self;
16225 0 : xpc_qsSelfRef selfref;
16226 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
16227 0 : return JS_FALSE;
16228 0 : if (argc < 1)
16229 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16230 0 : jsval *argv = JS_ARGV(cx, vp);
16231 : int32_t arg0;
16232 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
16233 0 : return JS_FALSE;
16234 : nsresult rv;
16235 0 : rv = self->Remove(arg0);
16236 0 : if (NS_FAILED(rv))
16237 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16238 0 : *vp = JSVAL_VOID;
16239 0 : return JS_TRUE;
16240 : }
16241 :
16242 : static JSBool
16243 0 : nsIDOMHTMLSelectElement_GetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16244 : {
16245 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16246 : nsIDOMHTMLSelectElement *self;
16247 0 : xpc_qsSelfRef selfref;
16248 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16249 0 : return JS_FALSE;
16250 : nsresult rv;
16251 : PRInt32 result;
16252 0 : rv = self->GetSelectedIndex(&result);
16253 0 : if (NS_FAILED(rv))
16254 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16255 0 : *vp = INT_TO_JSVAL(result);
16256 0 : return JS_TRUE;
16257 : }
16258 :
16259 : static JSBool
16260 0 : nsIDOMHTMLSelectElement_SetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16261 : {
16262 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16263 : nsIDOMHTMLSelectElement *self;
16264 0 : xpc_qsSelfRef selfref;
16265 0 : JS::AutoValueRooter tvr(cx);
16266 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16267 0 : return JS_FALSE;
16268 : int32_t arg0;
16269 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16270 0 : return JS_FALSE;
16271 : nsresult rv;
16272 0 : rv = self->SetSelectedIndex(arg0);
16273 0 : if (NS_FAILED(rv))
16274 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16275 0 : return JS_TRUE;
16276 : }
16277 :
16278 : static JSBool
16279 0 : nsIDOMHTMLSelectElement_Item(JSContext *cx, unsigned argc, jsval *vp)
16280 : {
16281 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16282 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16283 0 : if (!obj)
16284 0 : return JS_FALSE;
16285 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
16286 : nsIDOMHTMLSelectElement *self;
16287 0 : xpc_qsSelfRef selfref;
16288 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16289 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
16290 0 : return JS_FALSE;
16291 0 : if (argc < 1)
16292 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16293 0 : jsval *argv = JS_ARGV(cx, vp);
16294 : uint32_t arg0;
16295 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
16296 0 : return JS_FALSE;
16297 : nsresult rv;
16298 0 : nsCOMPtr<nsIDOMNode> result;
16299 0 : rv = self->Item(arg0, getter_AddRefs(result));
16300 0 : if (NS_FAILED(rv))
16301 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16302 0 : if (!result) {
16303 0 : *vp = JSVAL_NULL;
16304 0 : return JS_TRUE;
16305 : }
16306 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16307 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16308 0 : return JS_TRUE;
16309 : }
16310 : // After this point do not use 'result'!
16311 0 : qsObjectHelper helper(result, cache);
16312 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
16313 : }
16314 :
16315 : static JSBool
16316 0 : nsIDOMHTMLSelectElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16317 : {
16318 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16319 : nsIDOMHTMLSelectElement *self;
16320 0 : xpc_qsSelfRef selfref;
16321 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16322 0 : return JS_FALSE;
16323 : nsresult rv;
16324 0 : nsString result;
16325 0 : rv = self->GetType(result);
16326 0 : if (NS_FAILED(rv))
16327 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16328 0 : return xpc::StringToJsval(cx, result, vp);
16329 : }
16330 :
16331 : static JSBool
16332 0 : nsIDOMHTMLSelectElement_GetOptions(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16333 : {
16334 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16335 0 : JSObject *callee = nsnull;
16336 : nsIDOMHTMLSelectElement *self;
16337 0 : xpc_qsSelfRef selfref;
16338 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16339 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16340 0 : return JS_FALSE;
16341 : nsresult rv;
16342 0 : nsCOMPtr<nsIDOMHTMLOptionsCollection> result;
16343 0 : rv = self->GetOptions(getter_AddRefs(result));
16344 0 : if (NS_FAILED(rv))
16345 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16346 0 : if (!result) {
16347 0 : *vp = JSVAL_NULL;
16348 0 : return JS_TRUE;
16349 : }
16350 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16351 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16352 0 : return JS_TRUE;
16353 : }
16354 : // After this point do not use 'result'!
16355 0 : qsObjectHelper helper(result, cache);
16356 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLOptionsCollection), &interfaces[k_nsIDOMHTMLOptionsCollection], vp);
16357 : }
16358 :
16359 : static JSBool
16360 0 : nsIDOMHTMLSelectElement_GetSize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16361 : {
16362 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16363 : nsIDOMHTMLSelectElement *self;
16364 0 : xpc_qsSelfRef selfref;
16365 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16366 0 : return JS_FALSE;
16367 : nsresult rv;
16368 : PRInt32 result;
16369 0 : rv = self->GetSize(&result);
16370 0 : if (NS_FAILED(rv))
16371 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16372 0 : *vp = INT_TO_JSVAL(result);
16373 0 : return JS_TRUE;
16374 : }
16375 :
16376 : static JSBool
16377 0 : nsIDOMHTMLSelectElement_SetSize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16378 : {
16379 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16380 : nsIDOMHTMLSelectElement *self;
16381 0 : xpc_qsSelfRef selfref;
16382 0 : JS::AutoValueRooter tvr(cx);
16383 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16384 0 : return JS_FALSE;
16385 : int32_t arg0;
16386 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16387 0 : return JS_FALSE;
16388 : nsresult rv;
16389 0 : rv = self->SetSize(arg0);
16390 0 : if (NS_FAILED(rv))
16391 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16392 0 : return JS_TRUE;
16393 : }
16394 :
16395 : // === interface nsIDOMHTMLStyleElement
16396 :
16397 : static JSBool
16398 0 : nsIDOMHTMLStyleElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16399 : {
16400 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16401 : nsIDOMHTMLStyleElement *self;
16402 0 : xpc_qsSelfRef selfref;
16403 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16404 0 : return JS_FALSE;
16405 : nsresult rv;
16406 : bool result;
16407 0 : rv = self->GetDisabled(&result);
16408 0 : if (NS_FAILED(rv))
16409 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16410 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
16411 0 : return JS_TRUE;
16412 : }
16413 :
16414 : static JSBool
16415 0 : nsIDOMHTMLStyleElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16416 : {
16417 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16418 : nsIDOMHTMLStyleElement *self;
16419 0 : xpc_qsSelfRef selfref;
16420 0 : JS::AutoValueRooter tvr(cx);
16421 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16422 0 : return JS_FALSE;
16423 : JSBool arg0;
16424 0 : JS_ValueToBoolean(cx, *vp, &arg0);
16425 : nsresult rv;
16426 0 : rv = self->SetDisabled(arg0);
16427 0 : if (NS_FAILED(rv))
16428 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16429 0 : return JS_TRUE;
16430 : }
16431 :
16432 : // === interface nsIDOMHTMLTableCellElement
16433 :
16434 : static JSBool
16435 0 : nsIDOMHTMLTableCellElement_GetColSpan(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16436 : {
16437 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16438 : nsIDOMHTMLTableCellElement *self;
16439 0 : xpc_qsSelfRef selfref;
16440 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16441 0 : return JS_FALSE;
16442 : nsresult rv;
16443 : PRInt32 result;
16444 0 : rv = self->GetColSpan(&result);
16445 0 : if (NS_FAILED(rv))
16446 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16447 0 : *vp = INT_TO_JSVAL(result);
16448 0 : return JS_TRUE;
16449 : }
16450 :
16451 : static JSBool
16452 0 : nsIDOMHTMLTableCellElement_SetColSpan(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16453 : {
16454 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16455 : nsIDOMHTMLTableCellElement *self;
16456 0 : xpc_qsSelfRef selfref;
16457 0 : JS::AutoValueRooter tvr(cx);
16458 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16459 0 : return JS_FALSE;
16460 : int32_t arg0;
16461 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16462 0 : return JS_FALSE;
16463 : nsresult rv;
16464 0 : rv = self->SetColSpan(arg0);
16465 0 : if (NS_FAILED(rv))
16466 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16467 0 : return JS_TRUE;
16468 : }
16469 :
16470 : static JSBool
16471 0 : nsIDOMHTMLTableCellElement_GetHeaders(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16472 : {
16473 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16474 : nsIDOMHTMLTableCellElement *self;
16475 0 : xpc_qsSelfRef selfref;
16476 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16477 0 : return JS_FALSE;
16478 : nsresult rv;
16479 0 : nsString result;
16480 0 : rv = self->GetHeaders(result);
16481 0 : if (NS_FAILED(rv))
16482 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16483 0 : return xpc::StringToJsval(cx, result, vp);
16484 : }
16485 :
16486 : static JSBool
16487 0 : nsIDOMHTMLTableCellElement_SetHeaders(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16488 : {
16489 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16490 : nsIDOMHTMLTableCellElement *self;
16491 0 : xpc_qsSelfRef selfref;
16492 0 : JS::AutoValueRooter tvr(cx);
16493 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16494 0 : return JS_FALSE;
16495 : xpc_qsDOMString arg0(cx, *vp, vp,
16496 : xpc_qsDOMString::eDefaultNullBehavior,
16497 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16498 0 : if (!arg0.IsValid())
16499 0 : return JS_FALSE;
16500 : nsresult rv;
16501 0 : rv = self->SetHeaders(arg0);
16502 0 : if (NS_FAILED(rv))
16503 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16504 0 : return JS_TRUE;
16505 : }
16506 :
16507 : static JSBool
16508 0 : nsIDOMHTMLTableCellElement_GetCellIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16509 : {
16510 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16511 : nsIDOMHTMLTableCellElement *self;
16512 0 : xpc_qsSelfRef selfref;
16513 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16514 0 : return JS_FALSE;
16515 : nsresult rv;
16516 : PRInt32 result;
16517 0 : rv = self->GetCellIndex(&result);
16518 0 : if (NS_FAILED(rv))
16519 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16520 0 : *vp = INT_TO_JSVAL(result);
16521 0 : return JS_TRUE;
16522 : }
16523 :
16524 : static JSBool
16525 0 : nsIDOMHTMLTableCellElement_GetRowSpan(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16526 : {
16527 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16528 : nsIDOMHTMLTableCellElement *self;
16529 0 : xpc_qsSelfRef selfref;
16530 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16531 0 : return JS_FALSE;
16532 : nsresult rv;
16533 : PRInt32 result;
16534 0 : rv = self->GetRowSpan(&result);
16535 0 : if (NS_FAILED(rv))
16536 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16537 0 : *vp = INT_TO_JSVAL(result);
16538 0 : return JS_TRUE;
16539 : }
16540 :
16541 : static JSBool
16542 0 : nsIDOMHTMLTableCellElement_SetRowSpan(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16543 : {
16544 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16545 : nsIDOMHTMLTableCellElement *self;
16546 0 : xpc_qsSelfRef selfref;
16547 0 : JS::AutoValueRooter tvr(cx);
16548 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16549 0 : return JS_FALSE;
16550 : int32_t arg0;
16551 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16552 0 : return JS_FALSE;
16553 : nsresult rv;
16554 0 : rv = self->SetRowSpan(arg0);
16555 0 : if (NS_FAILED(rv))
16556 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16557 0 : return JS_TRUE;
16558 : }
16559 :
16560 : static JSBool
16561 0 : nsIDOMHTMLTableCellElement_GetAbbr(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16562 : {
16563 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16564 : nsIDOMHTMLTableCellElement *self;
16565 0 : xpc_qsSelfRef selfref;
16566 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16567 0 : return JS_FALSE;
16568 : nsresult rv;
16569 0 : nsString result;
16570 0 : rv = self->GetAbbr(result);
16571 0 : if (NS_FAILED(rv))
16572 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16573 0 : return xpc::StringToJsval(cx, result, vp);
16574 : }
16575 :
16576 : static JSBool
16577 0 : nsIDOMHTMLTableCellElement_SetAbbr(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16578 : {
16579 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16580 : nsIDOMHTMLTableCellElement *self;
16581 0 : xpc_qsSelfRef selfref;
16582 0 : JS::AutoValueRooter tvr(cx);
16583 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16584 0 : return JS_FALSE;
16585 : xpc_qsDOMString arg0(cx, *vp, vp,
16586 : xpc_qsDOMString::eDefaultNullBehavior,
16587 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16588 0 : if (!arg0.IsValid())
16589 0 : return JS_FALSE;
16590 : nsresult rv;
16591 0 : rv = self->SetAbbr(arg0);
16592 0 : if (NS_FAILED(rv))
16593 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16594 0 : return JS_TRUE;
16595 : }
16596 :
16597 : static JSBool
16598 0 : nsIDOMHTMLTableCellElement_GetScope(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16599 : {
16600 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16601 : nsIDOMHTMLTableCellElement *self;
16602 0 : xpc_qsSelfRef selfref;
16603 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16604 0 : return JS_FALSE;
16605 : nsresult rv;
16606 0 : nsString result;
16607 0 : rv = self->GetScope(result);
16608 0 : if (NS_FAILED(rv))
16609 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16610 0 : return xpc::StringToJsval(cx, result, vp);
16611 : }
16612 :
16613 : static JSBool
16614 0 : nsIDOMHTMLTableCellElement_SetScope(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16615 : {
16616 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16617 : nsIDOMHTMLTableCellElement *self;
16618 0 : xpc_qsSelfRef selfref;
16619 0 : JS::AutoValueRooter tvr(cx);
16620 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16621 0 : return JS_FALSE;
16622 : xpc_qsDOMString arg0(cx, *vp, vp,
16623 : xpc_qsDOMString::eDefaultNullBehavior,
16624 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16625 0 : if (!arg0.IsValid())
16626 0 : return JS_FALSE;
16627 : nsresult rv;
16628 0 : rv = self->SetScope(arg0);
16629 0 : if (NS_FAILED(rv))
16630 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16631 0 : return JS_TRUE;
16632 : }
16633 :
16634 : static JSBool
16635 0 : nsIDOMHTMLTableCellElement_GetNoWrap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16636 : {
16637 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16638 : nsIDOMHTMLTableCellElement *self;
16639 0 : xpc_qsSelfRef selfref;
16640 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16641 0 : return JS_FALSE;
16642 : nsresult rv;
16643 : bool result;
16644 0 : rv = self->GetNoWrap(&result);
16645 0 : if (NS_FAILED(rv))
16646 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16647 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
16648 0 : return JS_TRUE;
16649 : }
16650 :
16651 : static JSBool
16652 0 : nsIDOMHTMLTableCellElement_SetNoWrap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16653 : {
16654 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16655 : nsIDOMHTMLTableCellElement *self;
16656 0 : xpc_qsSelfRef selfref;
16657 0 : JS::AutoValueRooter tvr(cx);
16658 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16659 0 : return JS_FALSE;
16660 : JSBool arg0;
16661 0 : JS_ValueToBoolean(cx, *vp, &arg0);
16662 : nsresult rv;
16663 0 : rv = self->SetNoWrap(arg0);
16664 0 : if (NS_FAILED(rv))
16665 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16666 0 : return JS_TRUE;
16667 : }
16668 :
16669 : static JSBool
16670 0 : nsIDOMHTMLTableCellElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16671 : {
16672 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16673 : nsIDOMHTMLTableCellElement *self;
16674 0 : xpc_qsSelfRef selfref;
16675 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16676 0 : return JS_FALSE;
16677 : nsresult rv;
16678 0 : nsString result;
16679 0 : rv = self->GetWidth(result);
16680 0 : if (NS_FAILED(rv))
16681 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16682 0 : return xpc::StringToJsval(cx, result, vp);
16683 : }
16684 :
16685 : static JSBool
16686 0 : nsIDOMHTMLTableCellElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16687 : {
16688 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16689 : nsIDOMHTMLTableCellElement *self;
16690 0 : xpc_qsSelfRef selfref;
16691 0 : JS::AutoValueRooter tvr(cx);
16692 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16693 0 : return JS_FALSE;
16694 : xpc_qsDOMString arg0(cx, *vp, vp,
16695 : xpc_qsDOMString::eDefaultNullBehavior,
16696 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16697 0 : if (!arg0.IsValid())
16698 0 : return JS_FALSE;
16699 : nsresult rv;
16700 0 : rv = self->SetWidth(arg0);
16701 0 : if (NS_FAILED(rv))
16702 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16703 0 : return JS_TRUE;
16704 : }
16705 :
16706 : // === interface nsIDOMHTMLTableColElement
16707 :
16708 : static JSBool
16709 0 : nsIDOMHTMLTableColElement_GetSpan(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16710 : {
16711 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16712 : nsIDOMHTMLTableColElement *self;
16713 0 : xpc_qsSelfRef selfref;
16714 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16715 0 : return JS_FALSE;
16716 : nsresult rv;
16717 : PRInt32 result;
16718 0 : rv = self->GetSpan(&result);
16719 0 : if (NS_FAILED(rv))
16720 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16721 0 : *vp = INT_TO_JSVAL(result);
16722 0 : return JS_TRUE;
16723 : }
16724 :
16725 : static JSBool
16726 0 : nsIDOMHTMLTableColElement_SetSpan(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16727 : {
16728 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16729 : nsIDOMHTMLTableColElement *self;
16730 0 : xpc_qsSelfRef selfref;
16731 0 : JS::AutoValueRooter tvr(cx);
16732 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16733 0 : return JS_FALSE;
16734 : int32_t arg0;
16735 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16736 0 : return JS_FALSE;
16737 : nsresult rv;
16738 0 : rv = self->SetSpan(arg0);
16739 0 : if (NS_FAILED(rv))
16740 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16741 0 : return JS_TRUE;
16742 : }
16743 :
16744 : static JSBool
16745 0 : nsIDOMHTMLTableColElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16746 : {
16747 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16748 : nsIDOMHTMLTableColElement *self;
16749 0 : xpc_qsSelfRef selfref;
16750 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16751 0 : return JS_FALSE;
16752 : nsresult rv;
16753 0 : nsString result;
16754 0 : rv = self->GetWidth(result);
16755 0 : if (NS_FAILED(rv))
16756 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16757 0 : return xpc::StringToJsval(cx, result, vp);
16758 : }
16759 :
16760 : static JSBool
16761 0 : nsIDOMHTMLTableColElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16762 : {
16763 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16764 : nsIDOMHTMLTableColElement *self;
16765 0 : xpc_qsSelfRef selfref;
16766 0 : JS::AutoValueRooter tvr(cx);
16767 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16768 0 : return JS_FALSE;
16769 : xpc_qsDOMString arg0(cx, *vp, vp,
16770 : xpc_qsDOMString::eDefaultNullBehavior,
16771 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16772 0 : if (!arg0.IsValid())
16773 0 : return JS_FALSE;
16774 : nsresult rv;
16775 0 : rv = self->SetWidth(arg0);
16776 0 : if (NS_FAILED(rv))
16777 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16778 0 : return JS_TRUE;
16779 : }
16780 :
16781 : // === interface nsIDOMHTMLTableElement
16782 :
16783 : static JSBool
16784 0 : nsIDOMHTMLTableElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16785 : {
16786 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16787 0 : JSObject *callee = nsnull;
16788 : nsIDOMHTMLTableElement *self;
16789 0 : xpc_qsSelfRef selfref;
16790 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16791 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16792 0 : return JS_FALSE;
16793 : nsresult rv;
16794 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
16795 0 : rv = self->GetRows(getter_AddRefs(result));
16796 0 : if (NS_FAILED(rv))
16797 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16798 0 : if (!result) {
16799 0 : *vp = JSVAL_NULL;
16800 0 : return JS_TRUE;
16801 : }
16802 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16803 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16804 0 : return JS_TRUE;
16805 : }
16806 : // After this point do not use 'result'!
16807 0 : qsObjectHelper helper(result, cache);
16808 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
16809 : }
16810 :
16811 : static JSBool
16812 0 : nsIDOMHTMLTableElement_DeleteRow(JSContext *cx, unsigned argc, jsval *vp)
16813 : {
16814 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16815 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16816 0 : if (!obj)
16817 0 : return JS_FALSE;
16818 : nsIDOMHTMLTableElement *self;
16819 0 : xpc_qsSelfRef selfref;
16820 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
16821 0 : return JS_FALSE;
16822 0 : if (argc < 1)
16823 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16824 0 : jsval *argv = JS_ARGV(cx, vp);
16825 : int32_t arg0;
16826 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
16827 0 : return JS_FALSE;
16828 : nsresult rv;
16829 0 : rv = self->DeleteRow(arg0);
16830 0 : if (NS_FAILED(rv))
16831 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16832 0 : *vp = JSVAL_VOID;
16833 0 : return JS_TRUE;
16834 : }
16835 :
16836 : static JSBool
16837 0 : nsIDOMHTMLTableElement_GetSummary(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16838 : {
16839 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16840 : nsIDOMHTMLTableElement *self;
16841 0 : xpc_qsSelfRef selfref;
16842 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16843 0 : return JS_FALSE;
16844 : nsresult rv;
16845 0 : nsString result;
16846 0 : rv = self->GetSummary(result);
16847 0 : if (NS_FAILED(rv))
16848 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16849 0 : return xpc::StringToJsval(cx, result, vp);
16850 : }
16851 :
16852 : static JSBool
16853 0 : nsIDOMHTMLTableElement_SetSummary(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16854 : {
16855 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16856 : nsIDOMHTMLTableElement *self;
16857 0 : xpc_qsSelfRef selfref;
16858 0 : JS::AutoValueRooter tvr(cx);
16859 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16860 0 : return JS_FALSE;
16861 : xpc_qsDOMString arg0(cx, *vp, vp,
16862 : xpc_qsDOMString::eDefaultNullBehavior,
16863 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16864 0 : if (!arg0.IsValid())
16865 0 : return JS_FALSE;
16866 : nsresult rv;
16867 0 : rv = self->SetSummary(arg0);
16868 0 : if (NS_FAILED(rv))
16869 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16870 0 : return JS_TRUE;
16871 : }
16872 :
16873 : static JSBool
16874 0 : nsIDOMHTMLTableElement_InsertRow(JSContext *cx, unsigned argc, jsval *vp)
16875 : {
16876 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16877 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16878 0 : if (!obj)
16879 0 : return JS_FALSE;
16880 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
16881 : nsIDOMHTMLTableElement *self;
16882 0 : xpc_qsSelfRef selfref;
16883 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16884 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
16885 0 : return JS_FALSE;
16886 0 : if (argc < 1)
16887 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16888 0 : jsval *argv = JS_ARGV(cx, vp);
16889 : int32_t arg0;
16890 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
16891 0 : return JS_FALSE;
16892 : nsresult rv;
16893 0 : nsCOMPtr<nsIDOMHTMLElement> result;
16894 0 : rv = self->InsertRow(arg0, getter_AddRefs(result));
16895 0 : if (NS_FAILED(rv))
16896 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16897 0 : if (!result) {
16898 0 : *vp = JSVAL_NULL;
16899 0 : return JS_TRUE;
16900 : }
16901 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16902 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16903 0 : return JS_TRUE;
16904 : }
16905 : // After this point do not use 'result'!
16906 0 : qsObjectHelper helper(result, cache);
16907 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
16908 : }
16909 :
16910 : // === interface nsIDOMHTMLTableRowElement
16911 :
16912 : static JSBool
16913 0 : nsIDOMHTMLTableRowElement_GetSectionRowIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16914 : {
16915 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16916 : nsIDOMHTMLTableRowElement *self;
16917 0 : xpc_qsSelfRef selfref;
16918 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16919 0 : return JS_FALSE;
16920 : nsresult rv;
16921 : PRInt32 result;
16922 0 : rv = self->GetSectionRowIndex(&result);
16923 0 : if (NS_FAILED(rv))
16924 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16925 0 : *vp = INT_TO_JSVAL(result);
16926 0 : return JS_TRUE;
16927 : }
16928 :
16929 : static JSBool
16930 0 : nsIDOMHTMLTableRowElement_GetRowIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16931 : {
16932 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16933 : nsIDOMHTMLTableRowElement *self;
16934 0 : xpc_qsSelfRef selfref;
16935 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16936 0 : return JS_FALSE;
16937 : nsresult rv;
16938 : PRInt32 result;
16939 0 : rv = self->GetRowIndex(&result);
16940 0 : if (NS_FAILED(rv))
16941 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16942 0 : *vp = INT_TO_JSVAL(result);
16943 0 : return JS_TRUE;
16944 : }
16945 :
16946 : static JSBool
16947 0 : nsIDOMHTMLTableRowElement_GetCells(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16948 : {
16949 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16950 0 : JSObject *callee = nsnull;
16951 : nsIDOMHTMLTableRowElement *self;
16952 0 : xpc_qsSelfRef selfref;
16953 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16954 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16955 0 : return JS_FALSE;
16956 : nsresult rv;
16957 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
16958 0 : rv = self->GetCells(getter_AddRefs(result));
16959 0 : if (NS_FAILED(rv))
16960 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16961 0 : if (!result) {
16962 0 : *vp = JSVAL_NULL;
16963 0 : return JS_TRUE;
16964 : }
16965 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16966 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16967 0 : return JS_TRUE;
16968 : }
16969 : // After this point do not use 'result'!
16970 0 : qsObjectHelper helper(result, cache);
16971 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
16972 : }
16973 :
16974 : static JSBool
16975 0 : nsIDOMHTMLTableRowElement_DeleteCell(JSContext *cx, unsigned argc, jsval *vp)
16976 : {
16977 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16978 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16979 0 : if (!obj)
16980 0 : return JS_FALSE;
16981 : nsIDOMHTMLTableRowElement *self;
16982 0 : xpc_qsSelfRef selfref;
16983 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
16984 0 : return JS_FALSE;
16985 0 : if (argc < 1)
16986 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16987 0 : jsval *argv = JS_ARGV(cx, vp);
16988 : int32_t arg0;
16989 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
16990 0 : return JS_FALSE;
16991 : nsresult rv;
16992 0 : rv = self->DeleteCell(arg0);
16993 0 : if (NS_FAILED(rv))
16994 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16995 0 : *vp = JSVAL_VOID;
16996 0 : return JS_TRUE;
16997 : }
16998 :
16999 : static JSBool
17000 0 : nsIDOMHTMLTableRowElement_InsertCell(JSContext *cx, unsigned argc, jsval *vp)
17001 : {
17002 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17003 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17004 0 : if (!obj)
17005 0 : return JS_FALSE;
17006 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
17007 : nsIDOMHTMLTableRowElement *self;
17008 0 : xpc_qsSelfRef selfref;
17009 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17010 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
17011 0 : return JS_FALSE;
17012 0 : if (argc < 1)
17013 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17014 0 : jsval *argv = JS_ARGV(cx, vp);
17015 : int32_t arg0;
17016 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17017 0 : return JS_FALSE;
17018 : nsresult rv;
17019 0 : nsCOMPtr<nsIDOMHTMLElement> result;
17020 0 : rv = self->InsertCell(arg0, getter_AddRefs(result));
17021 0 : if (NS_FAILED(rv))
17022 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17023 0 : if (!result) {
17024 0 : *vp = JSVAL_NULL;
17025 0 : return JS_TRUE;
17026 : }
17027 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17028 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17029 0 : return JS_TRUE;
17030 : }
17031 : // After this point do not use 'result'!
17032 0 : qsObjectHelper helper(result, cache);
17033 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
17034 : }
17035 :
17036 : // === interface nsIDOMHTMLTableSectionElement
17037 :
17038 : static JSBool
17039 0 : nsIDOMHTMLTableSectionElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17040 : {
17041 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17042 0 : JSObject *callee = nsnull;
17043 : nsIDOMHTMLTableSectionElement *self;
17044 0 : xpc_qsSelfRef selfref;
17045 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17046 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17047 0 : return JS_FALSE;
17048 : nsresult rv;
17049 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
17050 0 : rv = self->GetRows(getter_AddRefs(result));
17051 0 : if (NS_FAILED(rv))
17052 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17053 0 : if (!result) {
17054 0 : *vp = JSVAL_NULL;
17055 0 : return JS_TRUE;
17056 : }
17057 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17058 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17059 0 : return JS_TRUE;
17060 : }
17061 : // After this point do not use 'result'!
17062 0 : qsObjectHelper helper(result, cache);
17063 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
17064 : }
17065 :
17066 : static JSBool
17067 0 : nsIDOMHTMLTableSectionElement_InsertRow(JSContext *cx, unsigned argc, jsval *vp)
17068 : {
17069 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17070 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17071 0 : if (!obj)
17072 0 : return JS_FALSE;
17073 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
17074 : nsIDOMHTMLTableSectionElement *self;
17075 0 : xpc_qsSelfRef selfref;
17076 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17077 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
17078 0 : return JS_FALSE;
17079 0 : if (argc < 1)
17080 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17081 0 : jsval *argv = JS_ARGV(cx, vp);
17082 : int32_t arg0;
17083 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17084 0 : return JS_FALSE;
17085 : nsresult rv;
17086 0 : nsCOMPtr<nsIDOMHTMLElement> result;
17087 0 : rv = self->InsertRow(arg0, getter_AddRefs(result));
17088 0 : if (NS_FAILED(rv))
17089 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17090 0 : if (!result) {
17091 0 : *vp = JSVAL_NULL;
17092 0 : return JS_TRUE;
17093 : }
17094 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17095 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17096 0 : return JS_TRUE;
17097 : }
17098 : // After this point do not use 'result'!
17099 0 : qsObjectHelper helper(result, cache);
17100 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
17101 : }
17102 :
17103 : static JSBool
17104 0 : nsIDOMHTMLTableSectionElement_DeleteRow(JSContext *cx, unsigned argc, jsval *vp)
17105 : {
17106 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17107 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17108 0 : if (!obj)
17109 0 : return JS_FALSE;
17110 : nsIDOMHTMLTableSectionElement *self;
17111 0 : xpc_qsSelfRef selfref;
17112 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17113 0 : return JS_FALSE;
17114 0 : if (argc < 1)
17115 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17116 0 : jsval *argv = JS_ARGV(cx, vp);
17117 : int32_t arg0;
17118 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17119 0 : return JS_FALSE;
17120 : nsresult rv;
17121 0 : rv = self->DeleteRow(arg0);
17122 0 : if (NS_FAILED(rv))
17123 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17124 0 : *vp = JSVAL_VOID;
17125 0 : return JS_TRUE;
17126 : }
17127 :
17128 : // === interface nsIDOMHTMLTextAreaElement
17129 :
17130 : static JSBool
17131 0 : nsIDOMHTMLTextAreaElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17132 : {
17133 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17134 : nsIDOMHTMLTextAreaElement *self;
17135 0 : xpc_qsSelfRef selfref;
17136 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17137 0 : return JS_FALSE;
17138 : nsresult rv;
17139 : PRUint32 result;
17140 0 : rv = self->GetRows(&result);
17141 0 : if (NS_FAILED(rv))
17142 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17143 0 : *vp = UINT_TO_JSVAL(result);
17144 0 : return JS_TRUE;
17145 : }
17146 :
17147 : static JSBool
17148 0 : nsIDOMHTMLTextAreaElement_SetRows(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17149 : {
17150 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17151 : nsIDOMHTMLTextAreaElement *self;
17152 0 : xpc_qsSelfRef selfref;
17153 0 : JS::AutoValueRooter tvr(cx);
17154 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17155 0 : return JS_FALSE;
17156 : uint32_t arg0;
17157 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17158 0 : return JS_FALSE;
17159 : nsresult rv;
17160 0 : rv = self->SetRows(arg0);
17161 0 : if (NS_FAILED(rv))
17162 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17163 0 : return JS_TRUE;
17164 : }
17165 :
17166 : static JSBool
17167 0 : nsIDOMHTMLTextAreaElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17168 : {
17169 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17170 : nsIDOMHTMLTextAreaElement *self;
17171 0 : xpc_qsSelfRef selfref;
17172 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17173 0 : return JS_FALSE;
17174 : nsresult rv;
17175 0 : nsString result;
17176 0 : rv = self->GetName(result);
17177 0 : if (NS_FAILED(rv))
17178 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17179 0 : return xpc::StringToJsval(cx, result, vp);
17180 : }
17181 :
17182 : static JSBool
17183 0 : nsIDOMHTMLTextAreaElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17184 : {
17185 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17186 : nsIDOMHTMLTextAreaElement *self;
17187 0 : xpc_qsSelfRef selfref;
17188 0 : JS::AutoValueRooter tvr(cx);
17189 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17190 0 : return JS_FALSE;
17191 : xpc_qsDOMString arg0(cx, *vp, vp,
17192 : xpc_qsDOMString::eDefaultNullBehavior,
17193 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17194 0 : if (!arg0.IsValid())
17195 0 : return JS_FALSE;
17196 : nsresult rv;
17197 0 : rv = self->SetName(arg0);
17198 0 : if (NS_FAILED(rv))
17199 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17200 0 : return JS_TRUE;
17201 : }
17202 :
17203 : static JSBool
17204 0 : nsIDOMHTMLTextAreaElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17205 : {
17206 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17207 0 : JSObject *callee = nsnull;
17208 : nsIDOMHTMLTextAreaElement *self;
17209 0 : xpc_qsSelfRef selfref;
17210 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17211 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17212 0 : return JS_FALSE;
17213 : nsresult rv;
17214 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
17215 0 : rv = self->GetForm(getter_AddRefs(result));
17216 0 : if (NS_FAILED(rv))
17217 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17218 0 : if (!result) {
17219 0 : *vp = JSVAL_NULL;
17220 0 : return JS_TRUE;
17221 : }
17222 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17223 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17224 0 : return JS_TRUE;
17225 : }
17226 : // After this point do not use 'result'!
17227 0 : qsObjectHelper helper(result, cache);
17228 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
17229 : }
17230 :
17231 : static JSBool
17232 0 : nsIDOMHTMLTextAreaElement_GetDefaultValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17233 : {
17234 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17235 : nsIDOMHTMLTextAreaElement *self;
17236 0 : xpc_qsSelfRef selfref;
17237 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17238 0 : return JS_FALSE;
17239 : nsresult rv;
17240 0 : nsString result;
17241 0 : rv = self->GetDefaultValue(result);
17242 0 : if (NS_FAILED(rv))
17243 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17244 0 : return xpc::StringToJsval(cx, result, vp);
17245 : }
17246 :
17247 : static JSBool
17248 0 : nsIDOMHTMLTextAreaElement_SetDefaultValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17249 : {
17250 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17251 : nsIDOMHTMLTextAreaElement *self;
17252 0 : xpc_qsSelfRef selfref;
17253 0 : JS::AutoValueRooter tvr(cx);
17254 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17255 0 : return JS_FALSE;
17256 : xpc_qsDOMString arg0(cx, *vp, vp,
17257 : xpc_qsDOMString::eDefaultNullBehavior,
17258 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17259 0 : if (!arg0.IsValid())
17260 0 : return JS_FALSE;
17261 : nsresult rv;
17262 0 : rv = self->SetDefaultValue(arg0);
17263 0 : if (NS_FAILED(rv))
17264 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17265 0 : return JS_TRUE;
17266 : }
17267 :
17268 : static JSBool
17269 0 : nsIDOMHTMLTextAreaElement_GetCols(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17270 : {
17271 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17272 : nsIDOMHTMLTextAreaElement *self;
17273 0 : xpc_qsSelfRef selfref;
17274 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17275 0 : return JS_FALSE;
17276 : nsresult rv;
17277 : PRUint32 result;
17278 0 : rv = self->GetCols(&result);
17279 0 : if (NS_FAILED(rv))
17280 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17281 0 : *vp = UINT_TO_JSVAL(result);
17282 0 : return JS_TRUE;
17283 : }
17284 :
17285 : static JSBool
17286 0 : nsIDOMHTMLTextAreaElement_SetCols(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17287 : {
17288 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17289 : nsIDOMHTMLTextAreaElement *self;
17290 0 : xpc_qsSelfRef selfref;
17291 0 : JS::AutoValueRooter tvr(cx);
17292 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17293 0 : return JS_FALSE;
17294 : uint32_t arg0;
17295 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17296 0 : return JS_FALSE;
17297 : nsresult rv;
17298 0 : rv = self->SetCols(arg0);
17299 0 : if (NS_FAILED(rv))
17300 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17301 0 : return JS_TRUE;
17302 : }
17303 :
17304 : static JSBool
17305 0 : nsIDOMHTMLTextAreaElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17306 : {
17307 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17308 : nsIDOMHTMLTextAreaElement *self;
17309 0 : xpc_qsSelfRef selfref;
17310 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17311 0 : return JS_FALSE;
17312 : nsresult rv;
17313 0 : nsString result;
17314 0 : rv = self->GetValue(result);
17315 0 : if (NS_FAILED(rv))
17316 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17317 0 : return xpc::StringToJsval(cx, result, vp);
17318 : }
17319 :
17320 : static JSBool
17321 0 : nsIDOMHTMLTextAreaElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17322 : {
17323 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17324 : nsIDOMHTMLTextAreaElement *self;
17325 0 : xpc_qsSelfRef selfref;
17326 0 : JS::AutoValueRooter tvr(cx);
17327 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17328 0 : return JS_FALSE;
17329 : xpc_qsDOMString arg0(cx, *vp, vp,
17330 : xpc_qsDOMString::eDefaultNullBehavior,
17331 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17332 0 : if (!arg0.IsValid())
17333 0 : return JS_FALSE;
17334 : nsresult rv;
17335 0 : rv = self->SetValue(arg0);
17336 0 : if (NS_FAILED(rv))
17337 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17338 0 : return JS_TRUE;
17339 : }
17340 :
17341 : static JSBool
17342 0 : nsIDOMHTMLTextAreaElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17343 : {
17344 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17345 : nsIDOMHTMLTextAreaElement *self;
17346 0 : xpc_qsSelfRef selfref;
17347 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17348 0 : return JS_FALSE;
17349 : nsresult rv;
17350 0 : nsString result;
17351 0 : rv = self->GetType(result);
17352 0 : if (NS_FAILED(rv))
17353 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17354 0 : return xpc::StringToJsval(cx, result, vp);
17355 : }
17356 :
17357 : static JSBool
17358 0 : nsIDOMHTMLTextAreaElement_Select(JSContext *cx, unsigned argc, jsval *vp)
17359 : {
17360 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17361 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17362 0 : if (!obj)
17363 0 : return JS_FALSE;
17364 : nsIDOMHTMLTextAreaElement *self;
17365 0 : xpc_qsSelfRef selfref;
17366 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17367 0 : return JS_FALSE;
17368 : nsresult rv;
17369 0 : rv = self->Select();
17370 0 : if (NS_FAILED(rv))
17371 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17372 0 : *vp = JSVAL_VOID;
17373 0 : return JS_TRUE;
17374 : }
17375 :
17376 : static JSBool
17377 0 : nsIDOMHTMLTextAreaElement_SetSelectionRange(JSContext *cx, unsigned argc, jsval *vp)
17378 : {
17379 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17380 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17381 0 : if (!obj)
17382 0 : return JS_FALSE;
17383 : nsIDOMHTMLTextAreaElement *self;
17384 0 : xpc_qsSelfRef selfref;
17385 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17386 0 : return JS_FALSE;
17387 0 : if (argc < 2)
17388 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17389 0 : jsval *argv = JS_ARGV(cx, vp);
17390 : int32_t arg0;
17391 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17392 0 : return JS_FALSE;
17393 : int32_t arg1;
17394 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
17395 0 : return JS_FALSE;
17396 : xpc_qsDOMString arg2(cx, (2 < argc ? argv[2] : JSVAL_NULL), (2 < argc ? &argv[2] : NULL),
17397 : xpc_qsDOMString::eDefaultNullBehavior,
17398 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17399 0 : if (!arg2.IsValid())
17400 0 : return JS_FALSE;
17401 : nsresult rv;
17402 0 : rv = self->SetSelectionRange(arg0, arg1, arg2);
17403 0 : if (NS_FAILED(rv))
17404 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17405 0 : *vp = JSVAL_VOID;
17406 0 : return JS_TRUE;
17407 : }
17408 :
17409 : static JSBool
17410 0 : nsIDOMHTMLTextAreaElement_GetSelectionStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17411 : {
17412 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17413 : nsIDOMHTMLTextAreaElement *self;
17414 0 : xpc_qsSelfRef selfref;
17415 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17416 0 : return JS_FALSE;
17417 : nsresult rv;
17418 : PRInt32 result;
17419 0 : rv = self->GetSelectionStart(&result);
17420 0 : if (NS_FAILED(rv))
17421 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17422 0 : *vp = INT_TO_JSVAL(result);
17423 0 : return JS_TRUE;
17424 : }
17425 :
17426 : static JSBool
17427 0 : nsIDOMHTMLTextAreaElement_SetSelectionStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17428 : {
17429 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17430 : nsIDOMHTMLTextAreaElement *self;
17431 0 : xpc_qsSelfRef selfref;
17432 0 : JS::AutoValueRooter tvr(cx);
17433 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17434 0 : return JS_FALSE;
17435 : int32_t arg0;
17436 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
17437 0 : return JS_FALSE;
17438 : nsresult rv;
17439 0 : rv = self->SetSelectionStart(arg0);
17440 0 : if (NS_FAILED(rv))
17441 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17442 0 : return JS_TRUE;
17443 : }
17444 :
17445 : static JSBool
17446 0 : nsIDOMHTMLTextAreaElement_GetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17447 : {
17448 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17449 : nsIDOMHTMLTextAreaElement *self;
17450 0 : xpc_qsSelfRef selfref;
17451 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17452 0 : return JS_FALSE;
17453 : nsresult rv;
17454 : PRInt32 result;
17455 0 : rv = self->GetSelectionEnd(&result);
17456 0 : if (NS_FAILED(rv))
17457 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17458 0 : *vp = INT_TO_JSVAL(result);
17459 0 : return JS_TRUE;
17460 : }
17461 :
17462 : static JSBool
17463 0 : nsIDOMHTMLTextAreaElement_SetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17464 : {
17465 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17466 : nsIDOMHTMLTextAreaElement *self;
17467 0 : xpc_qsSelfRef selfref;
17468 0 : JS::AutoValueRooter tvr(cx);
17469 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17470 0 : return JS_FALSE;
17471 : int32_t arg0;
17472 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
17473 0 : return JS_FALSE;
17474 : nsresult rv;
17475 0 : rv = self->SetSelectionEnd(arg0);
17476 0 : if (NS_FAILED(rv))
17477 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17478 0 : return JS_TRUE;
17479 : }
17480 :
17481 : static JSBool
17482 0 : nsIDOMHTMLTextAreaElement_GetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17483 : {
17484 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17485 : nsIDOMHTMLTextAreaElement *self;
17486 0 : xpc_qsSelfRef selfref;
17487 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17488 0 : return JS_FALSE;
17489 : nsresult rv;
17490 0 : nsString result;
17491 0 : rv = self->GetSelectionDirection(result);
17492 0 : if (NS_FAILED(rv))
17493 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17494 0 : return xpc::StringToJsval(cx, result, vp);
17495 : }
17496 :
17497 : static JSBool
17498 0 : nsIDOMHTMLTextAreaElement_SetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17499 : {
17500 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17501 : nsIDOMHTMLTextAreaElement *self;
17502 0 : xpc_qsSelfRef selfref;
17503 0 : JS::AutoValueRooter tvr(cx);
17504 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17505 0 : return JS_FALSE;
17506 : xpc_qsDOMString arg0(cx, *vp, vp,
17507 : xpc_qsDOMString::eDefaultNullBehavior,
17508 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17509 0 : if (!arg0.IsValid())
17510 0 : return JS_FALSE;
17511 : nsresult rv;
17512 0 : rv = self->SetSelectionDirection(arg0);
17513 0 : if (NS_FAILED(rv))
17514 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17515 0 : return JS_TRUE;
17516 : }
17517 :
17518 : static JSBool
17519 0 : nsIDOMHTMLTextAreaElement_GetTextLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17520 : {
17521 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17522 : nsIDOMHTMLTextAreaElement *self;
17523 0 : xpc_qsSelfRef selfref;
17524 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17525 0 : return JS_FALSE;
17526 : nsresult rv;
17527 : PRInt32 result;
17528 0 : rv = self->GetTextLength(&result);
17529 0 : if (NS_FAILED(rv))
17530 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17531 0 : *vp = INT_TO_JSVAL(result);
17532 0 : return JS_TRUE;
17533 : }
17534 :
17535 : static JSBool
17536 0 : nsIDOMHTMLTextAreaElement_GetWrap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17537 : {
17538 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17539 : nsIDOMHTMLTextAreaElement *self;
17540 0 : xpc_qsSelfRef selfref;
17541 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17542 0 : return JS_FALSE;
17543 : nsresult rv;
17544 0 : nsString result;
17545 0 : rv = self->GetWrap(result);
17546 0 : if (NS_FAILED(rv))
17547 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17548 0 : return xpc::StringToJsval(cx, result, vp);
17549 : }
17550 :
17551 : static JSBool
17552 0 : nsIDOMHTMLTextAreaElement_SetWrap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17553 : {
17554 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17555 : nsIDOMHTMLTextAreaElement *self;
17556 0 : xpc_qsSelfRef selfref;
17557 0 : JS::AutoValueRooter tvr(cx);
17558 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17559 0 : return JS_FALSE;
17560 : xpc_qsDOMString arg0(cx, *vp, vp,
17561 : xpc_qsDOMString::eStringify,
17562 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17563 0 : if (!arg0.IsValid())
17564 0 : return JS_FALSE;
17565 : nsresult rv;
17566 0 : rv = self->SetWrap(arg0);
17567 0 : if (NS_FAILED(rv))
17568 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17569 0 : return JS_TRUE;
17570 : }
17571 :
17572 : // === interface nsIDOMHTMLTitleElement
17573 :
17574 : static JSBool
17575 0 : nsIDOMHTMLTitleElement_GetText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17576 : {
17577 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17578 : nsIDOMHTMLTitleElement *self;
17579 0 : xpc_qsSelfRef selfref;
17580 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17581 0 : return JS_FALSE;
17582 : nsresult rv;
17583 0 : nsString result;
17584 0 : rv = self->GetText(result);
17585 0 : if (NS_FAILED(rv))
17586 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17587 0 : return xpc::StringToJsval(cx, result, vp);
17588 : }
17589 :
17590 : static JSBool
17591 0 : nsIDOMHTMLTitleElement_SetText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17592 : {
17593 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17594 : nsIDOMHTMLTitleElement *self;
17595 0 : xpc_qsSelfRef selfref;
17596 0 : JS::AutoValueRooter tvr(cx);
17597 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17598 0 : return JS_FALSE;
17599 : xpc_qsDOMString arg0(cx, *vp, vp,
17600 : xpc_qsDOMString::eDefaultNullBehavior,
17601 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17602 0 : if (!arg0.IsValid())
17603 0 : return JS_FALSE;
17604 : nsresult rv;
17605 0 : rv = self->SetText(arg0);
17606 0 : if (NS_FAILED(rv))
17607 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17608 0 : return JS_TRUE;
17609 : }
17610 :
17611 : // === interface nsIDOMHTMLCanvasElement
17612 :
17613 : static JSBool
17614 0 : nsIDOMHTMLCanvasElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17615 : {
17616 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17617 : nsIDOMHTMLCanvasElement *self;
17618 0 : xpc_qsSelfRef selfref;
17619 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17620 0 : return JS_FALSE;
17621 : nsresult rv;
17622 : PRUint32 result;
17623 0 : rv = self->GetWidth(&result);
17624 0 : if (NS_FAILED(rv))
17625 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17626 0 : *vp = UINT_TO_JSVAL(result);
17627 0 : return JS_TRUE;
17628 : }
17629 :
17630 : static JSBool
17631 0 : nsIDOMHTMLCanvasElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17632 : {
17633 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17634 : nsIDOMHTMLCanvasElement *self;
17635 0 : xpc_qsSelfRef selfref;
17636 0 : JS::AutoValueRooter tvr(cx);
17637 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17638 0 : return JS_FALSE;
17639 : uint32_t arg0;
17640 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17641 0 : return JS_FALSE;
17642 : nsresult rv;
17643 0 : rv = self->SetWidth(arg0);
17644 0 : if (NS_FAILED(rv))
17645 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17646 0 : return JS_TRUE;
17647 : }
17648 :
17649 : static JSBool
17650 0 : nsIDOMHTMLCanvasElement_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17651 : {
17652 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17653 : nsIDOMHTMLCanvasElement *self;
17654 0 : xpc_qsSelfRef selfref;
17655 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17656 0 : return JS_FALSE;
17657 : nsresult rv;
17658 : PRUint32 result;
17659 0 : rv = self->GetHeight(&result);
17660 0 : if (NS_FAILED(rv))
17661 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17662 0 : *vp = UINT_TO_JSVAL(result);
17663 0 : return JS_TRUE;
17664 : }
17665 :
17666 : static JSBool
17667 0 : nsIDOMHTMLCanvasElement_SetHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17668 : {
17669 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17670 : nsIDOMHTMLCanvasElement *self;
17671 0 : xpc_qsSelfRef selfref;
17672 0 : JS::AutoValueRooter tvr(cx);
17673 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17674 0 : return JS_FALSE;
17675 : uint32_t arg0;
17676 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17677 0 : return JS_FALSE;
17678 : nsresult rv;
17679 0 : rv = self->SetHeight(arg0);
17680 0 : if (NS_FAILED(rv))
17681 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17682 0 : return JS_TRUE;
17683 : }
17684 :
17685 : static JSBool
17686 0 : nsIDOMHTMLCanvasElement_GetContext(JSContext *cx, unsigned argc, jsval *vp)
17687 : {
17688 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17689 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17690 0 : if (!obj)
17691 0 : return JS_FALSE;
17692 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
17693 : nsIDOMHTMLCanvasElement *self;
17694 0 : xpc_qsSelfRef selfref;
17695 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17696 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
17697 0 : return JS_FALSE;
17698 0 : if (argc < 1)
17699 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17700 0 : jsval *argv = JS_ARGV(cx, vp);
17701 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
17702 : xpc_qsDOMString::eDefaultNullBehavior,
17703 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17704 0 : if (!arg0.IsValid())
17705 0 : return JS_FALSE;
17706 0 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
17707 : nsresult rv;
17708 0 : nsCOMPtr<nsISupports> result;
17709 0 : rv = self->GetContext(arg0, arg1, getter_AddRefs(result));
17710 0 : if (NS_FAILED(rv))
17711 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17712 0 : if (!result) {
17713 0 : *vp = JSVAL_NULL;
17714 0 : return JS_TRUE;
17715 : }
17716 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17717 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17718 0 : return JS_TRUE;
17719 : }
17720 : // After this point do not use 'result'!
17721 0 : qsObjectHelper helper(result, cache);
17722 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
17723 : }
17724 :
17725 : static JSBool
17726 0 : nsIDOMHTMLCanvasElement_ToDataURL(JSContext *cx, unsigned argc, jsval *vp)
17727 : {
17728 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17729 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17730 0 : if (!obj)
17731 0 : return JS_FALSE;
17732 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
17733 : nsIDOMHTMLCanvasElement *self;
17734 0 : xpc_qsSelfRef selfref;
17735 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
17736 0 : return JS_FALSE;
17737 0 : jsval *argv = JS_ARGV(cx, vp);
17738 : xpc_qsDOMString arg0(cx, (0 < argc ? argv[0] : JSVAL_NULL), (0 < argc ? &argv[0] : NULL),
17739 : xpc_qsDOMString::eDefaultNullBehavior,
17740 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17741 0 : if (!arg0.IsValid())
17742 0 : return JS_FALSE;
17743 0 : nsCOMPtr<nsIVariant> arg1(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (1 < argc ? argv[1] : JSVAL_NULL))));
17744 0 : if (!arg1) {
17745 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 1);
17746 0 : return JS_FALSE;
17747 : } nsresult rv;
17748 0 : nsString result;
17749 0 : rv = self->ToDataURL(arg0, arg1, NS_MIN<PRUint32>(argc, 2) - 0, result);
17750 0 : if (NS_FAILED(rv))
17751 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
17752 0 : return xpc::StringToJsval(cx, result, vp);
17753 : }
17754 :
17755 : // === interface nsIDOMRange
17756 :
17757 : static JSBool
17758 23 : nsIDOMRange_GetStartContainer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17759 : {
17760 23 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17761 23 : JSObject *callee = nsnull;
17762 : nsIDOMRange *self;
17763 46 : xpc_qsSelfRef selfref;
17764 46 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17765 23 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17766 0 : return JS_FALSE;
17767 : nsresult rv;
17768 46 : nsCOMPtr<nsIDOMNode> result;
17769 23 : rv = self->GetStartContainer(getter_AddRefs(result));
17770 23 : if (NS_FAILED(rv))
17771 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17772 23 : if (!result) {
17773 0 : *vp = JSVAL_NULL;
17774 0 : return JS_TRUE;
17775 : }
17776 23 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17777 23 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17778 0 : return JS_TRUE;
17779 : }
17780 : // After this point do not use 'result'!
17781 46 : qsObjectHelper helper(result, cache);
17782 23 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
17783 : }
17784 :
17785 : static JSBool
17786 5 : nsIDOMRange_GetStartOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17787 : {
17788 5 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17789 : nsIDOMRange *self;
17790 10 : xpc_qsSelfRef selfref;
17791 5 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17792 0 : return JS_FALSE;
17793 : nsresult rv;
17794 : PRInt32 result;
17795 5 : rv = self->GetStartOffset(&result);
17796 5 : if (NS_FAILED(rv))
17797 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17798 5 : *vp = INT_TO_JSVAL(result);
17799 5 : return JS_TRUE;
17800 : }
17801 :
17802 : static JSBool
17803 24 : nsIDOMRange_GetEndContainer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17804 : {
17805 24 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17806 24 : JSObject *callee = nsnull;
17807 : nsIDOMRange *self;
17808 48 : xpc_qsSelfRef selfref;
17809 48 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17810 24 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17811 0 : return JS_FALSE;
17812 : nsresult rv;
17813 48 : nsCOMPtr<nsIDOMNode> result;
17814 24 : rv = self->GetEndContainer(getter_AddRefs(result));
17815 24 : if (NS_FAILED(rv))
17816 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17817 24 : if (!result) {
17818 0 : *vp = JSVAL_NULL;
17819 0 : return JS_TRUE;
17820 : }
17821 24 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17822 24 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17823 0 : return JS_TRUE;
17824 : }
17825 : // After this point do not use 'result'!
17826 48 : qsObjectHelper helper(result, cache);
17827 24 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
17828 : }
17829 :
17830 : static JSBool
17831 2 : nsIDOMRange_GetEndOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17832 : {
17833 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17834 : nsIDOMRange *self;
17835 4 : xpc_qsSelfRef selfref;
17836 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17837 0 : return JS_FALSE;
17838 : nsresult rv;
17839 : PRInt32 result;
17840 2 : rv = self->GetEndOffset(&result);
17841 2 : if (NS_FAILED(rv))
17842 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17843 2 : *vp = INT_TO_JSVAL(result);
17844 2 : return JS_TRUE;
17845 : }
17846 :
17847 : static JSBool
17848 3 : nsIDOMRange_GetCollapsed(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17849 : {
17850 3 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17851 : nsIDOMRange *self;
17852 6 : xpc_qsSelfRef selfref;
17853 3 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17854 0 : return JS_FALSE;
17855 : nsresult rv;
17856 : bool result;
17857 3 : rv = self->GetCollapsed(&result);
17858 3 : if (NS_FAILED(rv))
17859 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17860 3 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
17861 3 : return JS_TRUE;
17862 : }
17863 :
17864 : static JSBool
17865 0 : nsIDOMRange_GetCommonAncestorContainer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17866 : {
17867 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17868 0 : JSObject *callee = nsnull;
17869 : nsIDOMRange *self;
17870 0 : xpc_qsSelfRef selfref;
17871 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17872 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17873 0 : return JS_FALSE;
17874 : nsresult rv;
17875 0 : nsCOMPtr<nsIDOMNode> result;
17876 0 : rv = self->GetCommonAncestorContainer(getter_AddRefs(result));
17877 0 : if (NS_FAILED(rv))
17878 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17879 0 : if (!result) {
17880 0 : *vp = JSVAL_NULL;
17881 0 : return JS_TRUE;
17882 : }
17883 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17884 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17885 0 : return JS_TRUE;
17886 : }
17887 : // After this point do not use 'result'!
17888 0 : qsObjectHelper helper(result, cache);
17889 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
17890 : }
17891 :
17892 : static JSBool
17893 36 : nsIDOMRange_SetStart(JSContext *cx, unsigned argc, jsval *vp)
17894 : {
17895 36 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17896 36 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17897 36 : if (!obj)
17898 0 : return JS_FALSE;
17899 : nsIDOMRange *self;
17900 72 : xpc_qsSelfRef selfref;
17901 36 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17902 0 : return JS_FALSE;
17903 36 : if (argc < 2)
17904 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17905 36 : jsval *argv = JS_ARGV(cx, vp);
17906 : nsresult rv;
17907 : nsIDOMNode *arg0;
17908 72 : xpc_qsSelfRef arg0ref;
17909 36 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
17910 36 : if (NS_FAILED(rv)) {
17911 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
17912 0 : return JS_FALSE;
17913 : }
17914 : int32_t arg1;
17915 36 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
17916 0 : return JS_FALSE;
17917 36 : rv = self->SetStart(arg0, arg1);
17918 36 : if (NS_FAILED(rv))
17919 4 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17920 32 : *vp = JSVAL_VOID;
17921 32 : return JS_TRUE;
17922 : }
17923 :
17924 : static JSBool
17925 33 : nsIDOMRange_SetEnd(JSContext *cx, unsigned argc, jsval *vp)
17926 : {
17927 33 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17928 33 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17929 33 : if (!obj)
17930 0 : return JS_FALSE;
17931 : nsIDOMRange *self;
17932 66 : xpc_qsSelfRef selfref;
17933 33 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17934 0 : return JS_FALSE;
17935 33 : if (argc < 2)
17936 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17937 33 : jsval *argv = JS_ARGV(cx, vp);
17938 : nsresult rv;
17939 : nsIDOMNode *arg0;
17940 66 : xpc_qsSelfRef arg0ref;
17941 33 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
17942 33 : if (NS_FAILED(rv)) {
17943 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
17944 0 : return JS_FALSE;
17945 : }
17946 : int32_t arg1;
17947 33 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
17948 0 : return JS_FALSE;
17949 33 : rv = self->SetEnd(arg0, arg1);
17950 33 : if (NS_FAILED(rv))
17951 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17952 33 : *vp = JSVAL_VOID;
17953 33 : return JS_TRUE;
17954 : }
17955 :
17956 : static JSBool
17957 0 : nsIDOMRange_SetStartBefore(JSContext *cx, unsigned argc, jsval *vp)
17958 : {
17959 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17960 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17961 0 : if (!obj)
17962 0 : return JS_FALSE;
17963 : nsIDOMRange *self;
17964 0 : xpc_qsSelfRef selfref;
17965 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17966 0 : return JS_FALSE;
17967 0 : if (argc < 1)
17968 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17969 0 : jsval *argv = JS_ARGV(cx, vp);
17970 : nsresult rv;
17971 : nsIDOMNode *arg0;
17972 0 : xpc_qsSelfRef arg0ref;
17973 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
17974 0 : if (NS_FAILED(rv)) {
17975 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
17976 0 : return JS_FALSE;
17977 : }
17978 0 : rv = self->SetStartBefore(arg0);
17979 0 : if (NS_FAILED(rv))
17980 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17981 0 : *vp = JSVAL_VOID;
17982 0 : return JS_TRUE;
17983 : }
17984 :
17985 : static JSBool
17986 0 : nsIDOMRange_SetStartAfter(JSContext *cx, unsigned argc, jsval *vp)
17987 : {
17988 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17989 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17990 0 : if (!obj)
17991 0 : return JS_FALSE;
17992 : nsIDOMRange *self;
17993 0 : xpc_qsSelfRef selfref;
17994 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17995 0 : return JS_FALSE;
17996 0 : if (argc < 1)
17997 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17998 0 : jsval *argv = JS_ARGV(cx, vp);
17999 : nsresult rv;
18000 : nsIDOMNode *arg0;
18001 0 : xpc_qsSelfRef arg0ref;
18002 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18003 0 : if (NS_FAILED(rv)) {
18004 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18005 0 : return JS_FALSE;
18006 : }
18007 0 : rv = self->SetStartAfter(arg0);
18008 0 : if (NS_FAILED(rv))
18009 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18010 0 : *vp = JSVAL_VOID;
18011 0 : return JS_TRUE;
18012 : }
18013 :
18014 : static JSBool
18015 0 : nsIDOMRange_SetEndBefore(JSContext *cx, unsigned argc, jsval *vp)
18016 : {
18017 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18018 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18019 0 : if (!obj)
18020 0 : return JS_FALSE;
18021 : nsIDOMRange *self;
18022 0 : xpc_qsSelfRef selfref;
18023 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18024 0 : return JS_FALSE;
18025 0 : if (argc < 1)
18026 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18027 0 : jsval *argv = JS_ARGV(cx, vp);
18028 : nsresult rv;
18029 : nsIDOMNode *arg0;
18030 0 : xpc_qsSelfRef arg0ref;
18031 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18032 0 : if (NS_FAILED(rv)) {
18033 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18034 0 : return JS_FALSE;
18035 : }
18036 0 : rv = self->SetEndBefore(arg0);
18037 0 : if (NS_FAILED(rv))
18038 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18039 0 : *vp = JSVAL_VOID;
18040 0 : return JS_TRUE;
18041 : }
18042 :
18043 : static JSBool
18044 0 : nsIDOMRange_SetEndAfter(JSContext *cx, unsigned argc, jsval *vp)
18045 : {
18046 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18047 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18048 0 : if (!obj)
18049 0 : return JS_FALSE;
18050 : nsIDOMRange *self;
18051 0 : xpc_qsSelfRef selfref;
18052 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18053 0 : return JS_FALSE;
18054 0 : if (argc < 1)
18055 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18056 0 : jsval *argv = JS_ARGV(cx, vp);
18057 : nsresult rv;
18058 : nsIDOMNode *arg0;
18059 0 : xpc_qsSelfRef arg0ref;
18060 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18061 0 : if (NS_FAILED(rv)) {
18062 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18063 0 : return JS_FALSE;
18064 : }
18065 0 : rv = self->SetEndAfter(arg0);
18066 0 : if (NS_FAILED(rv))
18067 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18068 0 : *vp = JSVAL_VOID;
18069 0 : return JS_TRUE;
18070 : }
18071 :
18072 : static JSBool
18073 0 : nsIDOMRange_Collapse(JSContext *cx, unsigned argc, jsval *vp)
18074 : {
18075 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18076 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18077 0 : if (!obj)
18078 0 : return JS_FALSE;
18079 : nsIDOMRange *self;
18080 0 : xpc_qsSelfRef selfref;
18081 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18082 0 : return JS_FALSE;
18083 0 : if (argc < 1)
18084 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18085 0 : jsval *argv = JS_ARGV(cx, vp);
18086 : JSBool arg0;
18087 0 : JS_ValueToBoolean(cx, argv[0], &arg0);
18088 : nsresult rv;
18089 0 : rv = self->Collapse(arg0);
18090 0 : if (NS_FAILED(rv))
18091 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18092 0 : *vp = JSVAL_VOID;
18093 0 : return JS_TRUE;
18094 : }
18095 :
18096 : static JSBool
18097 0 : nsIDOMRange_SelectNode(JSContext *cx, unsigned argc, jsval *vp)
18098 : {
18099 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18100 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18101 0 : if (!obj)
18102 0 : return JS_FALSE;
18103 : nsIDOMRange *self;
18104 0 : xpc_qsSelfRef selfref;
18105 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18106 0 : return JS_FALSE;
18107 0 : if (argc < 1)
18108 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18109 0 : jsval *argv = JS_ARGV(cx, vp);
18110 : nsresult rv;
18111 : nsIDOMNode *arg0;
18112 0 : xpc_qsSelfRef arg0ref;
18113 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18114 0 : if (NS_FAILED(rv)) {
18115 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18116 0 : return JS_FALSE;
18117 : }
18118 0 : rv = self->SelectNode(arg0);
18119 0 : if (NS_FAILED(rv))
18120 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18121 0 : *vp = JSVAL_VOID;
18122 0 : return JS_TRUE;
18123 : }
18124 :
18125 : static JSBool
18126 0 : nsIDOMRange_SelectNodeContents(JSContext *cx, unsigned argc, jsval *vp)
18127 : {
18128 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18129 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18130 0 : if (!obj)
18131 0 : return JS_FALSE;
18132 : nsIDOMRange *self;
18133 0 : xpc_qsSelfRef selfref;
18134 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18135 0 : return JS_FALSE;
18136 0 : if (argc < 1)
18137 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18138 0 : jsval *argv = JS_ARGV(cx, vp);
18139 : nsresult rv;
18140 : nsIDOMNode *arg0;
18141 0 : xpc_qsSelfRef arg0ref;
18142 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18143 0 : if (NS_FAILED(rv)) {
18144 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18145 0 : return JS_FALSE;
18146 : }
18147 0 : rv = self->SelectNodeContents(arg0);
18148 0 : if (NS_FAILED(rv))
18149 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18150 0 : *vp = JSVAL_VOID;
18151 0 : return JS_TRUE;
18152 : }
18153 :
18154 : static JSBool
18155 0 : nsIDOMRange_CompareBoundaryPoints(JSContext *cx, unsigned argc, jsval *vp)
18156 : {
18157 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18158 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18159 0 : if (!obj)
18160 0 : return JS_FALSE;
18161 : nsIDOMRange *self;
18162 0 : xpc_qsSelfRef selfref;
18163 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18164 0 : return JS_FALSE;
18165 0 : if (argc < 2)
18166 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18167 0 : jsval *argv = JS_ARGV(cx, vp);
18168 : uint32_t arg0_u32;
18169 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0_u32))
18170 0 : return JS_FALSE;
18171 0 : uint16_t arg0 = (uint16_t) arg0_u32;
18172 : nsresult rv;
18173 : nsIDOMRange *arg1;
18174 0 : xpc_qsSelfRef arg1ref;
18175 0 : rv = xpc_qsUnwrapArg<nsIDOMRange>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
18176 0 : if (NS_FAILED(rv)) {
18177 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
18178 0 : return JS_FALSE;
18179 : }
18180 : PRInt16 result;
18181 0 : rv = self->CompareBoundaryPoints(arg0, arg1, &result);
18182 0 : if (NS_FAILED(rv))
18183 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18184 0 : *vp = INT_TO_JSVAL((int32_t) result);
18185 0 : return JS_TRUE;
18186 : }
18187 :
18188 : static JSBool
18189 18 : nsIDOMRange_DeleteContents(JSContext *cx, unsigned argc, jsval *vp)
18190 : {
18191 18 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18192 18 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18193 18 : if (!obj)
18194 0 : return JS_FALSE;
18195 : nsIDOMRange *self;
18196 36 : xpc_qsSelfRef selfref;
18197 18 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18198 0 : return JS_FALSE;
18199 : nsresult rv;
18200 18 : rv = self->DeleteContents();
18201 18 : if (NS_FAILED(rv))
18202 9 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18203 9 : *vp = JSVAL_VOID;
18204 9 : return JS_TRUE;
18205 : }
18206 :
18207 : static JSBool
18208 19 : nsIDOMRange_ExtractContents(JSContext *cx, unsigned argc, jsval *vp)
18209 : {
18210 19 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18211 19 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18212 19 : if (!obj)
18213 0 : return JS_FALSE;
18214 19 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18215 : nsIDOMRange *self;
18216 38 : xpc_qsSelfRef selfref;
18217 38 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18218 19 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18219 0 : return JS_FALSE;
18220 : nsresult rv;
18221 38 : nsCOMPtr<nsIDOMDocumentFragment> result;
18222 19 : rv = self->ExtractContents(getter_AddRefs(result));
18223 19 : if (NS_FAILED(rv))
18224 9 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18225 10 : if (!result) {
18226 0 : *vp = JSVAL_NULL;
18227 0 : return JS_TRUE;
18228 : }
18229 10 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18230 10 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18231 0 : return JS_TRUE;
18232 : }
18233 : // After this point do not use 'result'!
18234 20 : qsObjectHelper helper(result, cache);
18235 10 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentFragment), &interfaces[k_nsIDOMDocumentFragment], vp);
18236 : }
18237 :
18238 : static JSBool
18239 0 : nsIDOMRange_CloneContents(JSContext *cx, unsigned argc, jsval *vp)
18240 : {
18241 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18242 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18243 0 : if (!obj)
18244 0 : return JS_FALSE;
18245 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18246 : nsIDOMRange *self;
18247 0 : xpc_qsSelfRef selfref;
18248 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18249 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18250 0 : return JS_FALSE;
18251 : nsresult rv;
18252 0 : nsCOMPtr<nsIDOMDocumentFragment> result;
18253 0 : rv = self->CloneContents(getter_AddRefs(result));
18254 0 : if (NS_FAILED(rv))
18255 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18256 0 : if (!result) {
18257 0 : *vp = JSVAL_NULL;
18258 0 : return JS_TRUE;
18259 : }
18260 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18261 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18262 0 : return JS_TRUE;
18263 : }
18264 : // After this point do not use 'result'!
18265 0 : qsObjectHelper helper(result, cache);
18266 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentFragment), &interfaces[k_nsIDOMDocumentFragment], vp);
18267 : }
18268 :
18269 : static JSBool
18270 0 : nsIDOMRange_InsertNode(JSContext *cx, unsigned argc, jsval *vp)
18271 : {
18272 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18273 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18274 0 : if (!obj)
18275 0 : return JS_FALSE;
18276 : nsIDOMRange *self;
18277 0 : xpc_qsSelfRef selfref;
18278 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18279 0 : return JS_FALSE;
18280 0 : if (argc < 1)
18281 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18282 0 : jsval *argv = JS_ARGV(cx, vp);
18283 : nsresult rv;
18284 : nsIDOMNode *arg0;
18285 0 : xpc_qsSelfRef arg0ref;
18286 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18287 0 : if (NS_FAILED(rv)) {
18288 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18289 0 : return JS_FALSE;
18290 : }
18291 0 : rv = self->InsertNode(arg0);
18292 0 : if (NS_FAILED(rv))
18293 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18294 0 : *vp = JSVAL_VOID;
18295 0 : return JS_TRUE;
18296 : }
18297 :
18298 : static JSBool
18299 0 : nsIDOMRange_SurroundContents(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 : nsIDOMRange *self;
18306 0 : xpc_qsSelfRef selfref;
18307 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18308 0 : return JS_FALSE;
18309 0 : if (argc < 1)
18310 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18311 0 : jsval *argv = JS_ARGV(cx, vp);
18312 : nsresult rv;
18313 : nsIDOMNode *arg0;
18314 0 : xpc_qsSelfRef arg0ref;
18315 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18316 0 : if (NS_FAILED(rv)) {
18317 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18318 0 : return JS_FALSE;
18319 : }
18320 0 : rv = self->SurroundContents(arg0);
18321 0 : if (NS_FAILED(rv))
18322 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18323 0 : *vp = JSVAL_VOID;
18324 0 : return JS_TRUE;
18325 : }
18326 :
18327 : static JSBool
18328 0 : nsIDOMRange_CloneRange(JSContext *cx, unsigned argc, jsval *vp)
18329 : {
18330 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18331 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18332 0 : if (!obj)
18333 0 : return JS_FALSE;
18334 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18335 : nsIDOMRange *self;
18336 0 : xpc_qsSelfRef selfref;
18337 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18338 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18339 0 : return JS_FALSE;
18340 : nsresult rv;
18341 0 : nsCOMPtr<nsIDOMRange> result;
18342 0 : rv = self->CloneRange(getter_AddRefs(result));
18343 0 : if (NS_FAILED(rv))
18344 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18345 0 : if (!result) {
18346 0 : *vp = JSVAL_NULL;
18347 0 : return JS_TRUE;
18348 : }
18349 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18350 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18351 0 : return JS_TRUE;
18352 : }
18353 : // After this point do not use 'result'!
18354 0 : qsObjectHelper helper(result, cache);
18355 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMRange), &interfaces[k_nsIDOMRange], vp);
18356 : }
18357 :
18358 : static JSBool
18359 0 : nsIDOMRange_ToString(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 : nsresult rv;
18370 0 : nsString result;
18371 0 : rv = self->ToString(result);
18372 0 : if (NS_FAILED(rv))
18373 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18374 0 : return xpc::StringToJsval(cx, result, vp);
18375 : }
18376 :
18377 : static JSBool
18378 9 : nsIDOMRange_Detach(JSContext *cx, unsigned argc, jsval *vp)
18379 : {
18380 9 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18381 9 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18382 9 : if (!obj)
18383 0 : return JS_FALSE;
18384 : nsIDOMRange *self;
18385 18 : xpc_qsSelfRef selfref;
18386 9 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18387 0 : return JS_FALSE;
18388 : nsresult rv;
18389 9 : rv = self->Detach();
18390 9 : if (NS_FAILED(rv))
18391 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18392 9 : *vp = JSVAL_VOID;
18393 9 : return JS_TRUE;
18394 : }
18395 :
18396 : static JSBool
18397 0 : nsIDOMRange_CreateContextualFragment(JSContext *cx, unsigned argc, jsval *vp)
18398 : {
18399 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18400 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18401 0 : if (!obj)
18402 0 : return JS_FALSE;
18403 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18404 : nsIDOMRange *self;
18405 0 : xpc_qsSelfRef selfref;
18406 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18407 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18408 0 : return JS_FALSE;
18409 0 : if (argc < 1)
18410 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18411 0 : jsval *argv = JS_ARGV(cx, vp);
18412 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18413 : xpc_qsDOMString::eDefaultNullBehavior,
18414 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18415 0 : if (!arg0.IsValid())
18416 0 : return JS_FALSE;
18417 : nsresult rv;
18418 0 : nsCOMPtr<nsIDOMDocumentFragment> result;
18419 0 : rv = self->CreateContextualFragment(arg0, getter_AddRefs(result));
18420 0 : if (NS_FAILED(rv))
18421 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18422 0 : if (!result) {
18423 0 : *vp = JSVAL_NULL;
18424 0 : return JS_TRUE;
18425 : }
18426 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18427 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18428 0 : return JS_TRUE;
18429 : }
18430 : // After this point do not use 'result'!
18431 0 : qsObjectHelper helper(result, cache);
18432 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentFragment), &interfaces[k_nsIDOMDocumentFragment], vp);
18433 : }
18434 :
18435 : static JSBool
18436 0 : nsIDOMRange_IsPointInRange(JSContext *cx, unsigned argc, jsval *vp)
18437 : {
18438 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18439 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18440 0 : if (!obj)
18441 0 : return JS_FALSE;
18442 : nsIDOMRange *self;
18443 0 : xpc_qsSelfRef selfref;
18444 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18445 0 : return JS_FALSE;
18446 0 : if (argc < 2)
18447 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18448 0 : jsval *argv = JS_ARGV(cx, vp);
18449 : nsresult rv;
18450 : nsIDOMNode *arg0;
18451 0 : xpc_qsSelfRef arg0ref;
18452 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18453 0 : if (NS_FAILED(rv)) {
18454 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18455 0 : return JS_FALSE;
18456 : }
18457 : int32_t arg1;
18458 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
18459 0 : return JS_FALSE;
18460 : bool result;
18461 0 : rv = self->IsPointInRange(arg0, arg1, &result);
18462 0 : if (NS_FAILED(rv))
18463 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18464 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
18465 0 : return JS_TRUE;
18466 : }
18467 :
18468 : static JSBool
18469 0 : nsIDOMRange_ComparePoint(JSContext *cx, unsigned argc, jsval *vp)
18470 : {
18471 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18472 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18473 0 : if (!obj)
18474 0 : return JS_FALSE;
18475 : nsIDOMRange *self;
18476 0 : xpc_qsSelfRef selfref;
18477 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18478 0 : return JS_FALSE;
18479 0 : if (argc < 2)
18480 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18481 0 : jsval *argv = JS_ARGV(cx, vp);
18482 : nsresult rv;
18483 : nsIDOMNode *arg0;
18484 0 : xpc_qsSelfRef arg0ref;
18485 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18486 0 : if (NS_FAILED(rv)) {
18487 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18488 0 : return JS_FALSE;
18489 : }
18490 : int32_t arg1;
18491 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
18492 0 : return JS_FALSE;
18493 : PRInt16 result;
18494 0 : rv = self->ComparePoint(arg0, arg1, &result);
18495 0 : if (NS_FAILED(rv))
18496 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18497 0 : *vp = INT_TO_JSVAL((int32_t) result);
18498 0 : return JS_TRUE;
18499 : }
18500 :
18501 : static JSBool
18502 0 : nsIDOMRange_GetClientRects(JSContext *cx, unsigned argc, jsval *vp)
18503 : {
18504 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18505 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18506 0 : if (!obj)
18507 0 : return JS_FALSE;
18508 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18509 : nsIDOMRange *self;
18510 0 : xpc_qsSelfRef selfref;
18511 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18512 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18513 0 : return JS_FALSE;
18514 : nsresult rv;
18515 0 : nsCOMPtr<nsIDOMClientRectList> result;
18516 0 : rv = self->GetClientRects(getter_AddRefs(result));
18517 0 : if (NS_FAILED(rv))
18518 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18519 0 : if (!result) {
18520 0 : *vp = JSVAL_NULL;
18521 0 : return JS_TRUE;
18522 : }
18523 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18524 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18525 0 : return JS_TRUE;
18526 : }
18527 : // After this point do not use 'result'!
18528 0 : qsObjectHelper helper(result, cache);
18529 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRectList), &interfaces[k_nsIDOMClientRectList], vp);
18530 : }
18531 :
18532 : static JSBool
18533 0 : nsIDOMRange_GetBoundingClientRect(JSContext *cx, unsigned argc, jsval *vp)
18534 : {
18535 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18536 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18537 0 : if (!obj)
18538 0 : return JS_FALSE;
18539 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18540 : nsIDOMRange *self;
18541 0 : xpc_qsSelfRef selfref;
18542 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18543 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18544 0 : return JS_FALSE;
18545 : nsresult rv;
18546 0 : nsCOMPtr<nsIDOMClientRect> result;
18547 0 : rv = self->GetBoundingClientRect(getter_AddRefs(result));
18548 0 : if (NS_FAILED(rv))
18549 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18550 0 : if (!result) {
18551 0 : *vp = JSVAL_NULL;
18552 0 : return JS_TRUE;
18553 : }
18554 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18555 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18556 0 : return JS_TRUE;
18557 : }
18558 : // After this point do not use 'result'!
18559 0 : qsObjectHelper helper(result, cache);
18560 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
18561 : }
18562 :
18563 : // === interface nsIDOMToString
18564 :
18565 : static JSBool
18566 0 : nsIDOMToString_ToString(JSContext *cx, unsigned argc, jsval *vp)
18567 : {
18568 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18569 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18570 0 : if (!obj)
18571 0 : return JS_FALSE;
18572 : nsIDOMToString *self;
18573 0 : xpc_qsSelfRef selfref;
18574 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18575 0 : return JS_FALSE;
18576 : nsresult rv;
18577 0 : nsString result;
18578 0 : rv = self->ToString(result);
18579 0 : if (NS_FAILED(rv))
18580 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18581 0 : return xpc::StringToJsval(cx, result, vp);
18582 : }
18583 :
18584 : // === interface nsIDOMStorage
18585 :
18586 : static JSBool
18587 18 : nsIDOMStorage_SetItem(JSContext *cx, unsigned argc, jsval *vp)
18588 : {
18589 18 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18590 18 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18591 18 : if (!obj)
18592 0 : return JS_FALSE;
18593 : nsIDOMStorage *self;
18594 36 : xpc_qsSelfRef selfref;
18595 18 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18596 0 : return JS_FALSE;
18597 18 : if (argc < 2)
18598 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18599 18 : jsval *argv = JS_ARGV(cx, vp);
18600 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18601 : xpc_qsDOMString::eDefaultNullBehavior,
18602 36 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18603 18 : if (!arg0.IsValid())
18604 0 : return JS_FALSE;
18605 18 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
18606 : xpc_qsDOMString::eDefaultNullBehavior,
18607 54 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18608 18 : if (!arg1.IsValid())
18609 0 : return JS_FALSE;
18610 : nsresult rv;
18611 18 : rv = self->SetItem(arg0, arg1);
18612 18 : if (NS_FAILED(rv))
18613 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18614 18 : *vp = JSVAL_VOID;
18615 18 : return JS_TRUE;
18616 : }
18617 :
18618 : static JSBool
18619 44 : nsIDOMStorage_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18620 : {
18621 44 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18622 : nsIDOMStorage *self;
18623 88 : xpc_qsSelfRef selfref;
18624 44 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
18625 0 : return JS_FALSE;
18626 : nsresult rv;
18627 : PRUint32 result;
18628 44 : rv = self->GetLength(&result);
18629 44 : if (NS_FAILED(rv))
18630 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18631 44 : *vp = UINT_TO_JSVAL(result);
18632 44 : return JS_TRUE;
18633 : }
18634 :
18635 : static JSBool
18636 44 : nsIDOMStorage_GetItem(JSContext *cx, unsigned argc, jsval *vp)
18637 : {
18638 44 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18639 44 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18640 44 : if (!obj)
18641 0 : return JS_FALSE;
18642 : nsIDOMStorage *self;
18643 88 : xpc_qsSelfRef selfref;
18644 44 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18645 0 : return JS_FALSE;
18646 44 : if (argc < 1)
18647 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18648 44 : jsval *argv = JS_ARGV(cx, vp);
18649 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18650 : xpc_qsDOMString::eDefaultNullBehavior,
18651 88 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18652 44 : if (!arg0.IsValid())
18653 0 : return JS_FALSE;
18654 : nsresult rv;
18655 88 : nsString result;
18656 44 : rv = self->GetItem(arg0, result);
18657 44 : if (NS_FAILED(rv))
18658 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18659 44 : return xpc::StringToJsval(cx, result, vp);
18660 : }
18661 :
18662 : static JSBool
18663 24 : nsIDOMStorage_Key(JSContext *cx, unsigned argc, jsval *vp)
18664 : {
18665 24 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18666 24 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18667 24 : if (!obj)
18668 0 : return JS_FALSE;
18669 : nsIDOMStorage *self;
18670 48 : xpc_qsSelfRef selfref;
18671 24 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18672 0 : return JS_FALSE;
18673 24 : if (argc < 1)
18674 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18675 24 : jsval *argv = JS_ARGV(cx, vp);
18676 : uint32_t arg0;
18677 24 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
18678 0 : return JS_FALSE;
18679 : nsresult rv;
18680 48 : nsString result;
18681 24 : rv = self->Key(arg0, result);
18682 24 : if (NS_FAILED(rv))
18683 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18684 24 : return xpc::StringToJsval(cx, result, vp);
18685 : }
18686 :
18687 : static JSBool
18688 6 : nsIDOMStorage_RemoveItem(JSContext *cx, unsigned argc, jsval *vp)
18689 : {
18690 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18691 6 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18692 6 : if (!obj)
18693 0 : return JS_FALSE;
18694 : nsIDOMStorage *self;
18695 12 : xpc_qsSelfRef selfref;
18696 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18697 0 : return JS_FALSE;
18698 6 : if (argc < 1)
18699 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18700 6 : jsval *argv = JS_ARGV(cx, vp);
18701 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18702 : xpc_qsDOMString::eDefaultNullBehavior,
18703 12 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18704 6 : if (!arg0.IsValid())
18705 0 : return JS_FALSE;
18706 : nsresult rv;
18707 6 : rv = self->RemoveItem(arg0);
18708 6 : if (NS_FAILED(rv))
18709 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18710 6 : *vp = JSVAL_VOID;
18711 6 : return JS_TRUE;
18712 : }
18713 :
18714 : static JSBool
18715 6 : nsIDOMStorage_Clear(JSContext *cx, unsigned argc, jsval *vp)
18716 : {
18717 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18718 6 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18719 6 : if (!obj)
18720 0 : return JS_FALSE;
18721 : nsIDOMStorage *self;
18722 12 : xpc_qsSelfRef selfref;
18723 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18724 0 : return JS_FALSE;
18725 : nsresult rv;
18726 :
18727 6 : rv = self->Clear();
18728 6 : if (NS_SUCCEEDED(rv))
18729 6 : JS_ClearScope(cx, obj);
18730 :
18731 6 : if (NS_FAILED(rv))
18732 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18733 6 : *vp = JSVAL_VOID;
18734 6 : return JS_TRUE;
18735 : }
18736 :
18737 : // === interface nsIDOMStorageItem
18738 :
18739 : static JSBool
18740 0 : nsIDOMStorageItem_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18741 : {
18742 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18743 : nsIDOMStorageItem *self;
18744 0 : xpc_qsSelfRef selfref;
18745 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
18746 0 : return JS_FALSE;
18747 : nsresult rv;
18748 0 : nsString result;
18749 0 : rv = self->GetValue(result);
18750 0 : if (NS_FAILED(rv))
18751 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18752 0 : return xpc::StringToJsval(cx, result, vp);
18753 : }
18754 :
18755 : static JSBool
18756 0 : nsIDOMStorageItem_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
18757 : {
18758 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18759 : nsIDOMStorageItem *self;
18760 0 : xpc_qsSelfRef selfref;
18761 0 : JS::AutoValueRooter tvr(cx);
18762 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
18763 0 : return JS_FALSE;
18764 : xpc_qsDOMString arg0(cx, *vp, vp,
18765 : xpc_qsDOMString::eDefaultNullBehavior,
18766 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18767 0 : if (!arg0.IsValid())
18768 0 : return JS_FALSE;
18769 : nsresult rv;
18770 0 : rv = self->SetValue(arg0);
18771 0 : if (NS_FAILED(rv))
18772 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
18773 0 : return JS_TRUE;
18774 : }
18775 :
18776 : // === interface nsIDOMSVGStylable
18777 :
18778 : static JSBool
18779 0 : nsIDOMSVGStylable_GetClassName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18780 : {
18781 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18782 0 : JSObject *callee = nsnull;
18783 : nsIDOMSVGStylable *self;
18784 0 : xpc_qsSelfRef selfref;
18785 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18786 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
18787 0 : return JS_FALSE;
18788 : nsresult rv;
18789 0 : nsCOMPtr<nsIDOMSVGAnimatedString> result;
18790 0 : rv = self->GetClassName(getter_AddRefs(result));
18791 0 : if (NS_FAILED(rv))
18792 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18793 0 : if (!result) {
18794 0 : *vp = JSVAL_NULL;
18795 0 : return JS_TRUE;
18796 : }
18797 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18798 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18799 0 : return JS_TRUE;
18800 : }
18801 : // After this point do not use 'result'!
18802 0 : qsObjectHelper helper(result, cache);
18803 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMSVGAnimatedString), &interfaces[k_nsIDOMSVGAnimatedString], vp);
18804 : }
18805 :
18806 : static JSBool
18807 0 : nsIDOMSVGStylable_GetStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18808 : {
18809 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18810 0 : JSObject *callee = nsnull;
18811 : nsSVGStylableElement *self;
18812 0 : xpc_qsSelfRef selfref;
18813 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18814 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
18815 0 : return JS_FALSE;
18816 : nsresult rv;
18817 0 : nsIDOMCSSStyleDeclaration* result = self->GetStyle(&rv);
18818 : #ifdef DEBUG
18819 : nsresult debug_rv;
18820 0 : nsCOMPtr<nsIDOMSVGStylable> debug_self;
18821 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
18822 0 : nsCOMPtr<nsIDOMCSSStyleDeclaration> debug_result;
18823 0 : debug_rv = debug_self->GetStyle(getter_AddRefs(debug_result));
18824 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) == NS_SUCCEEDED(rv) && xpc_qsSameResult(debug_result, result),
18825 : "Got the wrong answer from the custom method call!");
18826 : #endif
18827 0 : if (NS_FAILED(rv))
18828 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18829 0 : if (!result) {
18830 0 : *vp = JSVAL_NULL;
18831 0 : return JS_TRUE;
18832 : }
18833 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18834 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18835 0 : return JS_TRUE;
18836 : }
18837 : // After this point do not use 'result'!
18838 0 : qsObjectHelper helper(result, cache);
18839 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSStyleDeclaration), &interfaces[k_nsIDOMCSSStyleDeclaration], vp);
18840 : }
18841 :
18842 : static JSBool
18843 0 : nsIDOMSVGStylable_GetPresentationAttribute(JSContext *cx, unsigned argc, jsval *vp)
18844 : {
18845 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18846 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18847 0 : if (!obj)
18848 0 : return JS_FALSE;
18849 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18850 : nsIDOMSVGStylable *self;
18851 0 : xpc_qsSelfRef selfref;
18852 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18853 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18854 0 : return JS_FALSE;
18855 0 : if (argc < 1)
18856 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18857 0 : jsval *argv = JS_ARGV(cx, vp);
18858 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18859 : xpc_qsDOMString::eDefaultNullBehavior,
18860 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18861 0 : if (!arg0.IsValid())
18862 0 : return JS_FALSE;
18863 : nsresult rv;
18864 0 : nsCOMPtr<nsIDOMCSSValue> result;
18865 0 : rv = self->GetPresentationAttribute(arg0, getter_AddRefs(result));
18866 0 : if (NS_FAILED(rv))
18867 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18868 0 : if (!result) {
18869 0 : *vp = JSVAL_NULL;
18870 0 : return JS_TRUE;
18871 : }
18872 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18873 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18874 0 : return JS_TRUE;
18875 : }
18876 : // After this point do not use 'result'!
18877 0 : qsObjectHelper helper(result, cache);
18878 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSValue), &interfaces[k_nsIDOMCSSValue], vp);
18879 : }
18880 :
18881 : // === interface nsIDOMNodeIterator
18882 :
18883 : static JSBool
18884 0 : nsIDOMNodeIterator_NextNode(JSContext *cx, unsigned argc, jsval *vp)
18885 : {
18886 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18887 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18888 0 : if (!obj)
18889 0 : return JS_FALSE;
18890 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18891 : nsIDOMNodeIterator *self;
18892 0 : xpc_qsSelfRef selfref;
18893 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18894 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18895 0 : return JS_FALSE;
18896 : nsresult rv;
18897 0 : nsCOMPtr<nsIDOMNode> result;
18898 0 : rv = self->NextNode(getter_AddRefs(result));
18899 0 : if (NS_FAILED(rv))
18900 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18901 0 : if (!result) {
18902 0 : *vp = JSVAL_NULL;
18903 0 : return JS_TRUE;
18904 : }
18905 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18906 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18907 0 : return JS_TRUE;
18908 : }
18909 : // After this point do not use 'result'!
18910 0 : qsObjectHelper helper(result, cache);
18911 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
18912 : }
18913 :
18914 : // === interface nsIDOMXPathEvaluator
18915 :
18916 : static JSBool
18917 0 : nsIDOMXPathEvaluator_Evaluate(JSContext *cx, unsigned argc, jsval *vp)
18918 : {
18919 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18920 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18921 0 : if (!obj)
18922 0 : return JS_FALSE;
18923 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18924 : nsIDOMXPathEvaluator *self;
18925 0 : xpc_qsSelfRef selfref;
18926 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18927 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18928 0 : return JS_FALSE;
18929 0 : if (argc < 5)
18930 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18931 0 : jsval *argv = JS_ARGV(cx, vp);
18932 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18933 : xpc_qsDOMString::eDefaultNullBehavior,
18934 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18935 0 : if (!arg0.IsValid())
18936 0 : return JS_FALSE;
18937 : nsresult rv;
18938 : nsIDOMNode *arg1;
18939 0 : xpc_qsSelfRef arg1ref;
18940 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
18941 0 : if (NS_FAILED(rv)) {
18942 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
18943 0 : return JS_FALSE;
18944 : }
18945 : nsIDOMXPathNSResolver *arg2;
18946 0 : xpc_qsSelfRef arg2ref;
18947 0 : rv = xpc_qsUnwrapArg<nsIDOMXPathNSResolver>(cx, argv[2], &arg2, &arg2ref.ptr, &argv[2]);
18948 0 : if (NS_FAILED(rv)) {
18949 0 : xpc_qsThrowBadArg(cx, rv, vp, 2);
18950 0 : return JS_FALSE;
18951 : }
18952 : uint32_t arg3_u32;
18953 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3_u32))
18954 0 : return JS_FALSE;
18955 0 : uint16_t arg3 = (uint16_t) arg3_u32;
18956 : nsISupports *arg4;
18957 0 : xpc_qsSelfRef arg4ref;
18958 0 : rv = xpc_qsUnwrapArg<nsISupports>(cx, argv[4], &arg4, &arg4ref.ptr, &argv[4]);
18959 0 : if (NS_FAILED(rv)) {
18960 0 : xpc_qsThrowBadArg(cx, rv, vp, 4);
18961 0 : return JS_FALSE;
18962 : }
18963 0 : nsCOMPtr<nsISupports> result;
18964 0 : rv = self->Evaluate(arg0, arg1, arg2, arg3, arg4, getter_AddRefs(result));
18965 0 : if (NS_FAILED(rv))
18966 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18967 0 : if (!result) {
18968 0 : *vp = JSVAL_NULL;
18969 0 : return JS_TRUE;
18970 : }
18971 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18972 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18973 0 : return JS_TRUE;
18974 : }
18975 : // After this point do not use 'result'!
18976 0 : qsObjectHelper helper(result, cache);
18977 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
18978 : }
18979 :
18980 : static JSBool
18981 42 : nsIDOMXPathEvaluator_CreateExpression(JSContext *cx, unsigned argc, jsval *vp)
18982 : {
18983 42 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18984 42 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18985 42 : if (!obj)
18986 0 : return JS_FALSE;
18987 42 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18988 : nsIDOMXPathEvaluator *self;
18989 84 : xpc_qsSelfRef selfref;
18990 84 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18991 42 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18992 0 : return JS_FALSE;
18993 42 : if (argc < 2)
18994 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18995 42 : jsval *argv = JS_ARGV(cx, vp);
18996 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18997 : xpc_qsDOMString::eDefaultNullBehavior,
18998 84 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18999 42 : if (!arg0.IsValid())
19000 0 : return JS_FALSE;
19001 : nsresult rv;
19002 : nsIDOMXPathNSResolver *arg1;
19003 84 : xpc_qsSelfRef arg1ref;
19004 42 : rv = xpc_qsUnwrapArg<nsIDOMXPathNSResolver>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
19005 42 : if (NS_FAILED(rv)) {
19006 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
19007 0 : return JS_FALSE;
19008 : }
19009 84 : nsCOMPtr<nsIDOMXPathExpression> result;
19010 42 : rv = self->CreateExpression(arg0, arg1, getter_AddRefs(result));
19011 42 : if (NS_FAILED(rv))
19012 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19013 42 : if (!result) {
19014 0 : *vp = JSVAL_NULL;
19015 0 : return JS_TRUE;
19016 : }
19017 42 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19018 42 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19019 0 : return JS_TRUE;
19020 : }
19021 : // After this point do not use 'result'!
19022 84 : qsObjectHelper helper(result, cache);
19023 42 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMXPathExpression), &interfaces[k_nsIDOMXPathExpression], vp);
19024 : }
19025 :
19026 : static JSBool
19027 0 : nsIDOMXPathEvaluator_CreateNSResolver(JSContext *cx, unsigned argc, jsval *vp)
19028 : {
19029 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19030 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19031 0 : if (!obj)
19032 0 : return JS_FALSE;
19033 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19034 : nsIDOMXPathEvaluator *self;
19035 0 : xpc_qsSelfRef selfref;
19036 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19037 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19038 0 : return JS_FALSE;
19039 0 : if (argc < 1)
19040 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19041 0 : jsval *argv = JS_ARGV(cx, vp);
19042 : nsresult rv;
19043 : nsIDOMNode *arg0;
19044 0 : xpc_qsSelfRef arg0ref;
19045 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
19046 0 : if (NS_FAILED(rv)) {
19047 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
19048 0 : return JS_FALSE;
19049 : }
19050 0 : nsCOMPtr<nsIDOMXPathNSResolver> result;
19051 0 : rv = self->CreateNSResolver(arg0, getter_AddRefs(result));
19052 0 : if (NS_FAILED(rv))
19053 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19054 0 : if (!result) {
19055 0 : *vp = JSVAL_NULL;
19056 0 : return JS_TRUE;
19057 : }
19058 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19059 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19060 0 : return JS_TRUE;
19061 : }
19062 : // After this point do not use 'result'!
19063 0 : qsObjectHelper helper(result, cache);
19064 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMXPathNSResolver), &interfaces[k_nsIDOMXPathNSResolver], vp);
19065 : }
19066 :
19067 : // === interface nsIDOMXPathExpression
19068 :
19069 : static JSBool
19070 42 : nsIDOMXPathExpression_Evaluate(JSContext *cx, unsigned argc, jsval *vp)
19071 : {
19072 42 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19073 42 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19074 42 : if (!obj)
19075 0 : return JS_FALSE;
19076 42 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19077 : nsIDOMXPathExpression *self;
19078 84 : xpc_qsSelfRef selfref;
19079 84 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19080 42 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19081 0 : return JS_FALSE;
19082 42 : if (argc < 3)
19083 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19084 42 : jsval *argv = JS_ARGV(cx, vp);
19085 : nsresult rv;
19086 : nsIDOMNode *arg0;
19087 84 : xpc_qsSelfRef arg0ref;
19088 42 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
19089 42 : if (NS_FAILED(rv)) {
19090 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
19091 0 : return JS_FALSE;
19092 : }
19093 : uint32_t arg1_u32;
19094 42 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1_u32))
19095 0 : return JS_FALSE;
19096 42 : uint16_t arg1 = (uint16_t) arg1_u32;
19097 : nsISupports *arg2;
19098 84 : xpc_qsSelfRef arg2ref;
19099 42 : rv = xpc_qsUnwrapArg<nsISupports>(cx, argv[2], &arg2, &arg2ref.ptr, &argv[2]);
19100 42 : if (NS_FAILED(rv)) {
19101 0 : xpc_qsThrowBadArg(cx, rv, vp, 2);
19102 0 : return JS_FALSE;
19103 : }
19104 84 : nsCOMPtr<nsISupports> result;
19105 42 : rv = self->Evaluate(arg0, arg1, arg2, getter_AddRefs(result));
19106 42 : if (NS_FAILED(rv))
19107 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19108 42 : if (!result) {
19109 0 : *vp = JSVAL_NULL;
19110 0 : return JS_TRUE;
19111 : }
19112 42 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19113 42 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19114 0 : return JS_TRUE;
19115 : }
19116 : // After this point do not use 'result'!
19117 84 : qsObjectHelper helper(result, cache);
19118 42 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
19119 : }
19120 :
19121 : // === interface nsIDOMXPathNSResolver
19122 :
19123 : static JSBool
19124 0 : nsIDOMXPathNSResolver_LookupNamespaceURI(JSContext *cx, unsigned argc, jsval *vp)
19125 : {
19126 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19127 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19128 0 : if (!obj)
19129 0 : return JS_FALSE;
19130 : nsIDOMXPathNSResolver *self;
19131 0 : xpc_qsSelfRef selfref;
19132 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
19133 0 : return JS_FALSE;
19134 0 : if (argc < 1)
19135 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19136 0 : jsval *argv = JS_ARGV(cx, vp);
19137 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
19138 : xpc_qsDOMString::eDefaultNullBehavior,
19139 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19140 0 : if (!arg0.IsValid())
19141 0 : return JS_FALSE;
19142 : nsresult rv;
19143 0 : nsString result;
19144 0 : rv = self->LookupNamespaceURI(arg0, result);
19145 0 : if (NS_FAILED(rv))
19146 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19147 0 : return xpc::StringToJsval(cx, result, vp);
19148 : }
19149 :
19150 : // === interface nsIDOMXPathResult
19151 :
19152 : static JSBool
19153 0 : nsIDOMXPathResult_SnapshotItem(JSContext *cx, unsigned argc, jsval *vp)
19154 : {
19155 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19156 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19157 0 : if (!obj)
19158 0 : return JS_FALSE;
19159 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19160 : nsIDOMXPathResult *self;
19161 0 : xpc_qsSelfRef selfref;
19162 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19163 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19164 0 : return JS_FALSE;
19165 0 : if (argc < 1)
19166 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19167 0 : jsval *argv = JS_ARGV(cx, vp);
19168 : uint32_t arg0;
19169 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
19170 0 : return JS_FALSE;
19171 : nsresult rv;
19172 0 : nsCOMPtr<nsIDOMNode> result;
19173 0 : rv = self->SnapshotItem(arg0, getter_AddRefs(result));
19174 0 : if (NS_FAILED(rv))
19175 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19176 0 : if (!result) {
19177 0 : *vp = JSVAL_NULL;
19178 0 : return JS_TRUE;
19179 : }
19180 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19181 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19182 0 : return JS_TRUE;
19183 : }
19184 : // After this point do not use 'result'!
19185 0 : qsObjectHelper helper(result, cache);
19186 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
19187 : }
19188 :
19189 : static JSBool
19190 0 : nsIDOMXPathResult_IterateNext(JSContext *cx, unsigned argc, jsval *vp)
19191 : {
19192 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19193 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19194 0 : if (!obj)
19195 0 : return JS_FALSE;
19196 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19197 : nsIDOMXPathResult *self;
19198 0 : xpc_qsSelfRef selfref;
19199 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19200 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19201 0 : return JS_FALSE;
19202 : nsresult rv;
19203 0 : nsCOMPtr<nsIDOMNode> result;
19204 0 : rv = self->IterateNext(getter_AddRefs(result));
19205 0 : if (NS_FAILED(rv))
19206 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19207 0 : if (!result) {
19208 0 : *vp = JSVAL_NULL;
19209 0 : return JS_TRUE;
19210 : }
19211 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19212 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19213 0 : return JS_TRUE;
19214 : }
19215 : // After this point do not use 'result'!
19216 0 : qsObjectHelper helper(result, cache);
19217 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
19218 : }
19219 :
19220 : static JSBool
19221 0 : nsIDOMXPathResult_GetSnapshotLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19222 : {
19223 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19224 : nsIDOMXPathResult *self;
19225 0 : xpc_qsSelfRef selfref;
19226 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19227 0 : return JS_FALSE;
19228 : nsresult rv;
19229 : PRUint32 result;
19230 0 : rv = self->GetSnapshotLength(&result);
19231 0 : if (NS_FAILED(rv))
19232 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19233 0 : *vp = UINT_TO_JSVAL(result);
19234 0 : return JS_TRUE;
19235 : }
19236 :
19237 : static JSBool
19238 0 : nsIDOMXPathResult_GetResultType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19239 : {
19240 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19241 : nsIDOMXPathResult *self;
19242 0 : xpc_qsSelfRef selfref;
19243 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19244 0 : return JS_FALSE;
19245 : nsresult rv;
19246 : PRUint16 result;
19247 0 : rv = self->GetResultType(&result);
19248 0 : if (NS_FAILED(rv))
19249 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19250 0 : *vp = INT_TO_JSVAL((int32_t) result);
19251 0 : return JS_TRUE;
19252 : }
19253 :
19254 : static JSBool
19255 0 : nsIDOMXPathResult_GetNumberValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19256 : {
19257 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19258 : nsIDOMXPathResult *self;
19259 0 : xpc_qsSelfRef selfref;
19260 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19261 0 : return JS_FALSE;
19262 : nsresult rv;
19263 : double result;
19264 0 : rv = self->GetNumberValue(&result);
19265 0 : if (NS_FAILED(rv))
19266 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19267 0 : return JS_NewNumberValue(cx, result, vp);
19268 : }
19269 :
19270 : static JSBool
19271 0 : nsIDOMXPathResult_GetStringValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19272 : {
19273 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19274 : nsIDOMXPathResult *self;
19275 0 : xpc_qsSelfRef selfref;
19276 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19277 0 : return JS_FALSE;
19278 : nsresult rv;
19279 0 : nsString result;
19280 0 : rv = self->GetStringValue(result);
19281 0 : if (NS_FAILED(rv))
19282 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19283 0 : return xpc::StringToJsval(cx, result, vp);
19284 : }
19285 :
19286 : static JSBool
19287 0 : nsIDOMXPathResult_GetBooleanValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19288 : {
19289 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19290 : nsIDOMXPathResult *self;
19291 0 : xpc_qsSelfRef selfref;
19292 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19293 0 : return JS_FALSE;
19294 : nsresult rv;
19295 : bool result;
19296 0 : rv = self->GetBooleanValue(&result);
19297 0 : if (NS_FAILED(rv))
19298 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19299 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
19300 0 : return JS_TRUE;
19301 : }
19302 :
19303 : static JSBool
19304 42 : nsIDOMXPathResult_GetSingleNodeValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19305 : {
19306 42 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19307 42 : JSObject *callee = nsnull;
19308 : nsIDOMXPathResult *self;
19309 84 : xpc_qsSelfRef selfref;
19310 84 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19311 42 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
19312 0 : return JS_FALSE;
19313 : nsresult rv;
19314 84 : nsCOMPtr<nsIDOMNode> result;
19315 42 : rv = self->GetSingleNodeValue(getter_AddRefs(result));
19316 42 : if (NS_FAILED(rv))
19317 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19318 42 : if (!result) {
19319 0 : *vp = JSVAL_NULL;
19320 0 : return JS_TRUE;
19321 : }
19322 42 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19323 42 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19324 0 : return JS_TRUE;
19325 : }
19326 : // After this point do not use 'result'!
19327 84 : qsObjectHelper helper(result, cache);
19328 42 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
19329 : }
19330 :
19331 : // === interface nsIDOMNSXPathExpression
19332 :
19333 : static JSBool
19334 0 : nsIDOMNSXPathExpression_EvaluateWithContext(JSContext *cx, unsigned argc, jsval *vp)
19335 : {
19336 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19337 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19338 0 : if (!obj)
19339 0 : return JS_FALSE;
19340 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19341 : nsIDOMNSXPathExpression *self;
19342 0 : xpc_qsSelfRef selfref;
19343 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19344 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19345 0 : return JS_FALSE;
19346 0 : if (argc < 5)
19347 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19348 0 : jsval *argv = JS_ARGV(cx, vp);
19349 : nsresult rv;
19350 : nsIDOMNode *arg0;
19351 0 : xpc_qsSelfRef arg0ref;
19352 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
19353 0 : if (NS_FAILED(rv)) {
19354 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
19355 0 : return JS_FALSE;
19356 : }
19357 : uint32_t arg1;
19358 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
19359 0 : return JS_FALSE;
19360 : uint32_t arg2;
19361 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
19362 0 : return JS_FALSE;
19363 : uint32_t arg3_u32;
19364 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3_u32))
19365 0 : return JS_FALSE;
19366 0 : uint16_t arg3 = (uint16_t) arg3_u32;
19367 : nsISupports *arg4;
19368 0 : xpc_qsSelfRef arg4ref;
19369 0 : rv = xpc_qsUnwrapArg<nsISupports>(cx, argv[4], &arg4, &arg4ref.ptr, &argv[4]);
19370 0 : if (NS_FAILED(rv)) {
19371 0 : xpc_qsThrowBadArg(cx, rv, vp, 4);
19372 0 : return JS_FALSE;
19373 : }
19374 0 : nsCOMPtr<nsISupports> result;
19375 0 : rv = self->EvaluateWithContext(arg0, arg1, arg2, arg3, arg4, getter_AddRefs(result));
19376 0 : if (NS_FAILED(rv))
19377 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19378 0 : if (!result) {
19379 0 : *vp = JSVAL_NULL;
19380 0 : return JS_TRUE;
19381 : }
19382 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19383 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19384 0 : return JS_TRUE;
19385 : }
19386 : // After this point do not use 'result'!
19387 0 : qsObjectHelper helper(result, cache);
19388 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
19389 : }
19390 :
19391 : // === interface nsIDOMXULElement
19392 :
19393 : static JSBool
19394 0 : nsIDOMXULElement_GetId(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19395 : {
19396 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19397 : nsIDOMXULElement *self;
19398 0 : xpc_qsSelfRef selfref;
19399 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19400 0 : return JS_FALSE;
19401 : nsresult rv;
19402 0 : nsString result;
19403 0 : rv = self->GetId(result);
19404 0 : if (NS_FAILED(rv))
19405 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19406 0 : return xpc::StringToJsval(cx, result, vp);
19407 : }
19408 :
19409 : static JSBool
19410 0 : nsIDOMXULElement_SetId(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19411 : {
19412 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19413 : nsIDOMXULElement *self;
19414 0 : xpc_qsSelfRef selfref;
19415 0 : JS::AutoValueRooter tvr(cx);
19416 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19417 0 : return JS_FALSE;
19418 : xpc_qsDOMString arg0(cx, *vp, vp,
19419 : xpc_qsDOMString::eDefaultNullBehavior,
19420 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19421 0 : if (!arg0.IsValid())
19422 0 : return JS_FALSE;
19423 : nsresult rv;
19424 0 : rv = self->SetId(arg0);
19425 0 : if (NS_FAILED(rv))
19426 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19427 0 : return JS_TRUE;
19428 : }
19429 :
19430 : static JSBool
19431 0 : nsIDOMXULElement_GetClassName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19432 : {
19433 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19434 : nsIDOMXULElement *self;
19435 0 : xpc_qsSelfRef selfref;
19436 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19437 0 : return JS_FALSE;
19438 : nsresult rv;
19439 0 : nsString result;
19440 0 : rv = self->GetClassName(result);
19441 0 : if (NS_FAILED(rv))
19442 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19443 0 : return xpc::StringToJsval(cx, result, vp);
19444 : }
19445 :
19446 : static JSBool
19447 0 : nsIDOMXULElement_SetClassName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19448 : {
19449 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19450 : nsIDOMXULElement *self;
19451 0 : xpc_qsSelfRef selfref;
19452 0 : JS::AutoValueRooter tvr(cx);
19453 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19454 0 : return JS_FALSE;
19455 : xpc_qsDOMString arg0(cx, *vp, vp,
19456 : xpc_qsDOMString::eDefaultNullBehavior,
19457 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19458 0 : if (!arg0.IsValid())
19459 0 : return JS_FALSE;
19460 : nsresult rv;
19461 0 : rv = self->SetClassName(arg0);
19462 0 : if (NS_FAILED(rv))
19463 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19464 0 : return JS_TRUE;
19465 : }
19466 :
19467 : static JSBool
19468 0 : nsIDOMXULElement_GetAlign(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19469 : {
19470 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19471 : nsIDOMXULElement *self;
19472 0 : xpc_qsSelfRef selfref;
19473 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19474 0 : return JS_FALSE;
19475 : nsresult rv;
19476 0 : nsString result;
19477 0 : rv = self->GetAlign(result);
19478 0 : if (NS_FAILED(rv))
19479 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19480 0 : return xpc::StringToJsval(cx, result, vp);
19481 : }
19482 :
19483 : static JSBool
19484 0 : nsIDOMXULElement_SetAlign(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19485 : {
19486 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19487 : nsIDOMXULElement *self;
19488 0 : xpc_qsSelfRef selfref;
19489 0 : JS::AutoValueRooter tvr(cx);
19490 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19491 0 : return JS_FALSE;
19492 : xpc_qsDOMString arg0(cx, *vp, vp,
19493 : xpc_qsDOMString::eDefaultNullBehavior,
19494 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19495 0 : if (!arg0.IsValid())
19496 0 : return JS_FALSE;
19497 : nsresult rv;
19498 0 : rv = self->SetAlign(arg0);
19499 0 : if (NS_FAILED(rv))
19500 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19501 0 : return JS_TRUE;
19502 : }
19503 :
19504 : static JSBool
19505 0 : nsIDOMXULElement_GetDir(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19506 : {
19507 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19508 : nsIDOMXULElement *self;
19509 0 : xpc_qsSelfRef selfref;
19510 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19511 0 : return JS_FALSE;
19512 : nsresult rv;
19513 0 : nsString result;
19514 0 : rv = self->GetDir(result);
19515 0 : if (NS_FAILED(rv))
19516 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19517 0 : return xpc::StringToJsval(cx, result, vp);
19518 : }
19519 :
19520 : static JSBool
19521 0 : nsIDOMXULElement_SetDir(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19522 : {
19523 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19524 : nsIDOMXULElement *self;
19525 0 : xpc_qsSelfRef selfref;
19526 0 : JS::AutoValueRooter tvr(cx);
19527 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19528 0 : return JS_FALSE;
19529 : xpc_qsDOMString arg0(cx, *vp, vp,
19530 : xpc_qsDOMString::eDefaultNullBehavior,
19531 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19532 0 : if (!arg0.IsValid())
19533 0 : return JS_FALSE;
19534 : nsresult rv;
19535 0 : rv = self->SetDir(arg0);
19536 0 : if (NS_FAILED(rv))
19537 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19538 0 : return JS_TRUE;
19539 : }
19540 :
19541 : static JSBool
19542 0 : nsIDOMXULElement_GetFlex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19543 : {
19544 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19545 : nsIDOMXULElement *self;
19546 0 : xpc_qsSelfRef selfref;
19547 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19548 0 : return JS_FALSE;
19549 : nsresult rv;
19550 0 : nsString result;
19551 0 : rv = self->GetFlex(result);
19552 0 : if (NS_FAILED(rv))
19553 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19554 0 : return xpc::StringToJsval(cx, result, vp);
19555 : }
19556 :
19557 : static JSBool
19558 0 : nsIDOMXULElement_SetFlex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19559 : {
19560 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19561 : nsIDOMXULElement *self;
19562 0 : xpc_qsSelfRef selfref;
19563 0 : JS::AutoValueRooter tvr(cx);
19564 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19565 0 : return JS_FALSE;
19566 : xpc_qsDOMString arg0(cx, *vp, vp,
19567 : xpc_qsDOMString::eDefaultNullBehavior,
19568 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19569 0 : if (!arg0.IsValid())
19570 0 : return JS_FALSE;
19571 : nsresult rv;
19572 0 : rv = self->SetFlex(arg0);
19573 0 : if (NS_FAILED(rv))
19574 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19575 0 : return JS_TRUE;
19576 : }
19577 :
19578 : static JSBool
19579 0 : nsIDOMXULElement_GetFlexGroup(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19580 : {
19581 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19582 : nsIDOMXULElement *self;
19583 0 : xpc_qsSelfRef selfref;
19584 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19585 0 : return JS_FALSE;
19586 : nsresult rv;
19587 0 : nsString result;
19588 0 : rv = self->GetFlexGroup(result);
19589 0 : if (NS_FAILED(rv))
19590 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19591 0 : return xpc::StringToJsval(cx, result, vp);
19592 : }
19593 :
19594 : static JSBool
19595 0 : nsIDOMXULElement_SetFlexGroup(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19596 : {
19597 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19598 : nsIDOMXULElement *self;
19599 0 : xpc_qsSelfRef selfref;
19600 0 : JS::AutoValueRooter tvr(cx);
19601 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19602 0 : return JS_FALSE;
19603 : xpc_qsDOMString arg0(cx, *vp, vp,
19604 : xpc_qsDOMString::eDefaultNullBehavior,
19605 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19606 0 : if (!arg0.IsValid())
19607 0 : return JS_FALSE;
19608 : nsresult rv;
19609 0 : rv = self->SetFlexGroup(arg0);
19610 0 : if (NS_FAILED(rv))
19611 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19612 0 : return JS_TRUE;
19613 : }
19614 :
19615 : static JSBool
19616 0 : nsIDOMXULElement_GetOrdinal(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19617 : {
19618 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19619 : nsIDOMXULElement *self;
19620 0 : xpc_qsSelfRef selfref;
19621 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19622 0 : return JS_FALSE;
19623 : nsresult rv;
19624 0 : nsString result;
19625 0 : rv = self->GetOrdinal(result);
19626 0 : if (NS_FAILED(rv))
19627 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19628 0 : return xpc::StringToJsval(cx, result, vp);
19629 : }
19630 :
19631 : static JSBool
19632 0 : nsIDOMXULElement_SetOrdinal(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19633 : {
19634 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19635 : nsIDOMXULElement *self;
19636 0 : xpc_qsSelfRef selfref;
19637 0 : JS::AutoValueRooter tvr(cx);
19638 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19639 0 : return JS_FALSE;
19640 : xpc_qsDOMString arg0(cx, *vp, vp,
19641 : xpc_qsDOMString::eDefaultNullBehavior,
19642 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19643 0 : if (!arg0.IsValid())
19644 0 : return JS_FALSE;
19645 : nsresult rv;
19646 0 : rv = self->SetOrdinal(arg0);
19647 0 : if (NS_FAILED(rv))
19648 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19649 0 : return JS_TRUE;
19650 : }
19651 :
19652 : static JSBool
19653 0 : nsIDOMXULElement_GetOrient(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19654 : {
19655 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19656 : nsIDOMXULElement *self;
19657 0 : xpc_qsSelfRef selfref;
19658 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19659 0 : return JS_FALSE;
19660 : nsresult rv;
19661 0 : nsString result;
19662 0 : rv = self->GetOrient(result);
19663 0 : if (NS_FAILED(rv))
19664 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19665 0 : return xpc::StringToJsval(cx, result, vp);
19666 : }
19667 :
19668 : static JSBool
19669 0 : nsIDOMXULElement_SetOrient(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19670 : {
19671 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19672 : nsIDOMXULElement *self;
19673 0 : xpc_qsSelfRef selfref;
19674 0 : JS::AutoValueRooter tvr(cx);
19675 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19676 0 : return JS_FALSE;
19677 : xpc_qsDOMString arg0(cx, *vp, vp,
19678 : xpc_qsDOMString::eDefaultNullBehavior,
19679 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19680 0 : if (!arg0.IsValid())
19681 0 : return JS_FALSE;
19682 : nsresult rv;
19683 0 : rv = self->SetOrient(arg0);
19684 0 : if (NS_FAILED(rv))
19685 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19686 0 : return JS_TRUE;
19687 : }
19688 :
19689 : static JSBool
19690 0 : nsIDOMXULElement_GetPack(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19691 : {
19692 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19693 : nsIDOMXULElement *self;
19694 0 : xpc_qsSelfRef selfref;
19695 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19696 0 : return JS_FALSE;
19697 : nsresult rv;
19698 0 : nsString result;
19699 0 : rv = self->GetPack(result);
19700 0 : if (NS_FAILED(rv))
19701 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19702 0 : return xpc::StringToJsval(cx, result, vp);
19703 : }
19704 :
19705 : static JSBool
19706 0 : nsIDOMXULElement_SetPack(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19707 : {
19708 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19709 : nsIDOMXULElement *self;
19710 0 : xpc_qsSelfRef selfref;
19711 0 : JS::AutoValueRooter tvr(cx);
19712 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19713 0 : return JS_FALSE;
19714 : xpc_qsDOMString arg0(cx, *vp, vp,
19715 : xpc_qsDOMString::eDefaultNullBehavior,
19716 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19717 0 : if (!arg0.IsValid())
19718 0 : return JS_FALSE;
19719 : nsresult rv;
19720 0 : rv = self->SetPack(arg0);
19721 0 : if (NS_FAILED(rv))
19722 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19723 0 : return JS_TRUE;
19724 : }
19725 :
19726 : static JSBool
19727 0 : nsIDOMXULElement_GetHidden(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19728 : {
19729 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19730 : nsIDOMXULElement *self;
19731 0 : xpc_qsSelfRef selfref;
19732 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19733 0 : return JS_FALSE;
19734 : nsresult rv;
19735 : bool result;
19736 0 : rv = self->GetHidden(&result);
19737 0 : if (NS_FAILED(rv))
19738 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19739 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
19740 0 : return JS_TRUE;
19741 : }
19742 :
19743 : static JSBool
19744 0 : nsIDOMXULElement_SetHidden(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19745 : {
19746 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19747 : nsIDOMXULElement *self;
19748 0 : xpc_qsSelfRef selfref;
19749 0 : JS::AutoValueRooter tvr(cx);
19750 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19751 0 : return JS_FALSE;
19752 : JSBool arg0;
19753 0 : JS_ValueToBoolean(cx, *vp, &arg0);
19754 : nsresult rv;
19755 0 : rv = self->SetHidden(arg0);
19756 0 : if (NS_FAILED(rv))
19757 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19758 0 : return JS_TRUE;
19759 : }
19760 :
19761 : static JSBool
19762 0 : nsIDOMXULElement_GetCollapsed(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19763 : {
19764 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19765 : nsIDOMXULElement *self;
19766 0 : xpc_qsSelfRef selfref;
19767 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19768 0 : return JS_FALSE;
19769 : nsresult rv;
19770 : bool result;
19771 0 : rv = self->GetCollapsed(&result);
19772 0 : if (NS_FAILED(rv))
19773 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19774 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
19775 0 : return JS_TRUE;
19776 : }
19777 :
19778 : static JSBool
19779 0 : nsIDOMXULElement_SetCollapsed(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19780 : {
19781 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19782 : nsIDOMXULElement *self;
19783 0 : xpc_qsSelfRef selfref;
19784 0 : JS::AutoValueRooter tvr(cx);
19785 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19786 0 : return JS_FALSE;
19787 : JSBool arg0;
19788 0 : JS_ValueToBoolean(cx, *vp, &arg0);
19789 : nsresult rv;
19790 0 : rv = self->SetCollapsed(arg0);
19791 0 : if (NS_FAILED(rv))
19792 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19793 0 : return JS_TRUE;
19794 : }
19795 :
19796 : static JSBool
19797 0 : nsIDOMXULElement_GetObserves(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19798 : {
19799 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19800 : nsIDOMXULElement *self;
19801 0 : xpc_qsSelfRef selfref;
19802 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19803 0 : return JS_FALSE;
19804 : nsresult rv;
19805 0 : nsString result;
19806 0 : rv = self->GetObserves(result);
19807 0 : if (NS_FAILED(rv))
19808 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19809 0 : return xpc::StringToJsval(cx, result, vp);
19810 : }
19811 :
19812 : static JSBool
19813 0 : nsIDOMXULElement_SetObserves(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19814 : {
19815 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19816 : nsIDOMXULElement *self;
19817 0 : xpc_qsSelfRef selfref;
19818 0 : JS::AutoValueRooter tvr(cx);
19819 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19820 0 : return JS_FALSE;
19821 : xpc_qsDOMString arg0(cx, *vp, vp,
19822 : xpc_qsDOMString::eDefaultNullBehavior,
19823 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19824 0 : if (!arg0.IsValid())
19825 0 : return JS_FALSE;
19826 : nsresult rv;
19827 0 : rv = self->SetObserves(arg0);
19828 0 : if (NS_FAILED(rv))
19829 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19830 0 : return JS_TRUE;
19831 : }
19832 :
19833 : static JSBool
19834 0 : nsIDOMXULElement_GetMenu(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19835 : {
19836 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19837 : nsIDOMXULElement *self;
19838 0 : xpc_qsSelfRef selfref;
19839 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19840 0 : return JS_FALSE;
19841 : nsresult rv;
19842 0 : nsString result;
19843 0 : rv = self->GetMenu(result);
19844 0 : if (NS_FAILED(rv))
19845 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19846 0 : return xpc::StringToJsval(cx, result, vp);
19847 : }
19848 :
19849 : static JSBool
19850 0 : nsIDOMXULElement_SetMenu(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19851 : {
19852 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19853 : nsIDOMXULElement *self;
19854 0 : xpc_qsSelfRef selfref;
19855 0 : JS::AutoValueRooter tvr(cx);
19856 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19857 0 : return JS_FALSE;
19858 : xpc_qsDOMString arg0(cx, *vp, vp,
19859 : xpc_qsDOMString::eDefaultNullBehavior,
19860 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19861 0 : if (!arg0.IsValid())
19862 0 : return JS_FALSE;
19863 : nsresult rv;
19864 0 : rv = self->SetMenu(arg0);
19865 0 : if (NS_FAILED(rv))
19866 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19867 0 : return JS_TRUE;
19868 : }
19869 :
19870 : static JSBool
19871 0 : nsIDOMXULElement_GetContextMenu(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19872 : {
19873 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19874 : nsIDOMXULElement *self;
19875 0 : xpc_qsSelfRef selfref;
19876 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19877 0 : return JS_FALSE;
19878 : nsresult rv;
19879 0 : nsString result;
19880 0 : rv = self->GetContextMenu(result);
19881 0 : if (NS_FAILED(rv))
19882 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19883 0 : return xpc::StringToJsval(cx, result, vp);
19884 : }
19885 :
19886 : static JSBool
19887 0 : nsIDOMXULElement_SetContextMenu(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19888 : {
19889 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19890 : nsIDOMXULElement *self;
19891 0 : xpc_qsSelfRef selfref;
19892 0 : JS::AutoValueRooter tvr(cx);
19893 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19894 0 : return JS_FALSE;
19895 : xpc_qsDOMString arg0(cx, *vp, vp,
19896 : xpc_qsDOMString::eDefaultNullBehavior,
19897 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19898 0 : if (!arg0.IsValid())
19899 0 : return JS_FALSE;
19900 : nsresult rv;
19901 0 : rv = self->SetContextMenu(arg0);
19902 0 : if (NS_FAILED(rv))
19903 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19904 0 : return JS_TRUE;
19905 : }
19906 :
19907 : static JSBool
19908 0 : nsIDOMXULElement_GetTooltip(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19909 : {
19910 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19911 : nsIDOMXULElement *self;
19912 0 : xpc_qsSelfRef selfref;
19913 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19914 0 : return JS_FALSE;
19915 : nsresult rv;
19916 0 : nsString result;
19917 0 : rv = self->GetTooltip(result);
19918 0 : if (NS_FAILED(rv))
19919 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19920 0 : return xpc::StringToJsval(cx, result, vp);
19921 : }
19922 :
19923 : static JSBool
19924 0 : nsIDOMXULElement_SetTooltip(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19925 : {
19926 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19927 : nsIDOMXULElement *self;
19928 0 : xpc_qsSelfRef selfref;
19929 0 : JS::AutoValueRooter tvr(cx);
19930 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19931 0 : return JS_FALSE;
19932 : xpc_qsDOMString arg0(cx, *vp, vp,
19933 : xpc_qsDOMString::eDefaultNullBehavior,
19934 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19935 0 : if (!arg0.IsValid())
19936 0 : return JS_FALSE;
19937 : nsresult rv;
19938 0 : rv = self->SetTooltip(arg0);
19939 0 : if (NS_FAILED(rv))
19940 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19941 0 : return JS_TRUE;
19942 : }
19943 :
19944 : static JSBool
19945 0 : nsIDOMXULElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19946 : {
19947 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19948 : nsIDOMXULElement *self;
19949 0 : xpc_qsSelfRef selfref;
19950 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19951 0 : return JS_FALSE;
19952 : nsresult rv;
19953 0 : nsString result;
19954 0 : rv = self->GetWidth(result);
19955 0 : if (NS_FAILED(rv))
19956 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19957 0 : return xpc::StringToJsval(cx, result, vp);
19958 : }
19959 :
19960 : static JSBool
19961 0 : nsIDOMXULElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19962 : {
19963 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19964 : nsIDOMXULElement *self;
19965 0 : xpc_qsSelfRef selfref;
19966 0 : JS::AutoValueRooter tvr(cx);
19967 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19968 0 : return JS_FALSE;
19969 : xpc_qsDOMString arg0(cx, *vp, vp,
19970 : xpc_qsDOMString::eDefaultNullBehavior,
19971 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19972 0 : if (!arg0.IsValid())
19973 0 : return JS_FALSE;
19974 : nsresult rv;
19975 0 : rv = self->SetWidth(arg0);
19976 0 : if (NS_FAILED(rv))
19977 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19978 0 : return JS_TRUE;
19979 : }
19980 :
19981 : static JSBool
19982 0 : nsIDOMXULElement_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19983 : {
19984 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19985 : nsIDOMXULElement *self;
19986 0 : xpc_qsSelfRef selfref;
19987 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19988 0 : return JS_FALSE;
19989 : nsresult rv;
19990 0 : nsString result;
19991 0 : rv = self->GetHeight(result);
19992 0 : if (NS_FAILED(rv))
19993 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19994 0 : return xpc::StringToJsval(cx, result, vp);
19995 : }
19996 :
19997 : static JSBool
19998 0 : nsIDOMXULElement_SetHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19999 : {
20000 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20001 : nsIDOMXULElement *self;
20002 0 : xpc_qsSelfRef selfref;
20003 0 : JS::AutoValueRooter tvr(cx);
20004 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20005 0 : return JS_FALSE;
20006 : xpc_qsDOMString arg0(cx, *vp, vp,
20007 : xpc_qsDOMString::eDefaultNullBehavior,
20008 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20009 0 : if (!arg0.IsValid())
20010 0 : return JS_FALSE;
20011 : nsresult rv;
20012 0 : rv = self->SetHeight(arg0);
20013 0 : if (NS_FAILED(rv))
20014 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20015 0 : return JS_TRUE;
20016 : }
20017 :
20018 : static JSBool
20019 0 : nsIDOMXULElement_GetMinWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20020 : {
20021 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20022 : nsIDOMXULElement *self;
20023 0 : xpc_qsSelfRef selfref;
20024 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20025 0 : return JS_FALSE;
20026 : nsresult rv;
20027 0 : nsString result;
20028 0 : rv = self->GetMinWidth(result);
20029 0 : if (NS_FAILED(rv))
20030 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20031 0 : return xpc::StringToJsval(cx, result, vp);
20032 : }
20033 :
20034 : static JSBool
20035 0 : nsIDOMXULElement_SetMinWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20036 : {
20037 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20038 : nsIDOMXULElement *self;
20039 0 : xpc_qsSelfRef selfref;
20040 0 : JS::AutoValueRooter tvr(cx);
20041 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20042 0 : return JS_FALSE;
20043 : xpc_qsDOMString arg0(cx, *vp, vp,
20044 : xpc_qsDOMString::eDefaultNullBehavior,
20045 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20046 0 : if (!arg0.IsValid())
20047 0 : return JS_FALSE;
20048 : nsresult rv;
20049 0 : rv = self->SetMinWidth(arg0);
20050 0 : if (NS_FAILED(rv))
20051 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20052 0 : return JS_TRUE;
20053 : }
20054 :
20055 : static JSBool
20056 0 : nsIDOMXULElement_GetMinHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20057 : {
20058 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20059 : nsIDOMXULElement *self;
20060 0 : xpc_qsSelfRef selfref;
20061 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20062 0 : return JS_FALSE;
20063 : nsresult rv;
20064 0 : nsString result;
20065 0 : rv = self->GetMinHeight(result);
20066 0 : if (NS_FAILED(rv))
20067 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20068 0 : return xpc::StringToJsval(cx, result, vp);
20069 : }
20070 :
20071 : static JSBool
20072 0 : nsIDOMXULElement_SetMinHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20073 : {
20074 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20075 : nsIDOMXULElement *self;
20076 0 : xpc_qsSelfRef selfref;
20077 0 : JS::AutoValueRooter tvr(cx);
20078 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20079 0 : return JS_FALSE;
20080 : xpc_qsDOMString arg0(cx, *vp, vp,
20081 : xpc_qsDOMString::eDefaultNullBehavior,
20082 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20083 0 : if (!arg0.IsValid())
20084 0 : return JS_FALSE;
20085 : nsresult rv;
20086 0 : rv = self->SetMinHeight(arg0);
20087 0 : if (NS_FAILED(rv))
20088 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20089 0 : return JS_TRUE;
20090 : }
20091 :
20092 : static JSBool
20093 0 : nsIDOMXULElement_GetMaxWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20094 : {
20095 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20096 : nsIDOMXULElement *self;
20097 0 : xpc_qsSelfRef selfref;
20098 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20099 0 : return JS_FALSE;
20100 : nsresult rv;
20101 0 : nsString result;
20102 0 : rv = self->GetMaxWidth(result);
20103 0 : if (NS_FAILED(rv))
20104 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20105 0 : return xpc::StringToJsval(cx, result, vp);
20106 : }
20107 :
20108 : static JSBool
20109 0 : nsIDOMXULElement_SetMaxWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20110 : {
20111 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20112 : nsIDOMXULElement *self;
20113 0 : xpc_qsSelfRef selfref;
20114 0 : JS::AutoValueRooter tvr(cx);
20115 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20116 0 : return JS_FALSE;
20117 : xpc_qsDOMString arg0(cx, *vp, vp,
20118 : xpc_qsDOMString::eDefaultNullBehavior,
20119 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20120 0 : if (!arg0.IsValid())
20121 0 : return JS_FALSE;
20122 : nsresult rv;
20123 0 : rv = self->SetMaxWidth(arg0);
20124 0 : if (NS_FAILED(rv))
20125 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20126 0 : return JS_TRUE;
20127 : }
20128 :
20129 : static JSBool
20130 0 : nsIDOMXULElement_GetMaxHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20131 : {
20132 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20133 : nsIDOMXULElement *self;
20134 0 : xpc_qsSelfRef selfref;
20135 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20136 0 : return JS_FALSE;
20137 : nsresult rv;
20138 0 : nsString result;
20139 0 : rv = self->GetMaxHeight(result);
20140 0 : if (NS_FAILED(rv))
20141 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20142 0 : return xpc::StringToJsval(cx, result, vp);
20143 : }
20144 :
20145 : static JSBool
20146 0 : nsIDOMXULElement_SetMaxHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20147 : {
20148 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20149 : nsIDOMXULElement *self;
20150 0 : xpc_qsSelfRef selfref;
20151 0 : JS::AutoValueRooter tvr(cx);
20152 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20153 0 : return JS_FALSE;
20154 : xpc_qsDOMString arg0(cx, *vp, vp,
20155 : xpc_qsDOMString::eDefaultNullBehavior,
20156 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20157 0 : if (!arg0.IsValid())
20158 0 : return JS_FALSE;
20159 : nsresult rv;
20160 0 : rv = self->SetMaxHeight(arg0);
20161 0 : if (NS_FAILED(rv))
20162 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20163 0 : return JS_TRUE;
20164 : }
20165 :
20166 : static JSBool
20167 0 : nsIDOMXULElement_GetPersist(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20168 : {
20169 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20170 : nsIDOMXULElement *self;
20171 0 : xpc_qsSelfRef selfref;
20172 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20173 0 : return JS_FALSE;
20174 : nsresult rv;
20175 0 : nsString result;
20176 0 : rv = self->GetPersist(result);
20177 0 : if (NS_FAILED(rv))
20178 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20179 0 : return xpc::StringToJsval(cx, result, vp);
20180 : }
20181 :
20182 : static JSBool
20183 0 : nsIDOMXULElement_SetPersist(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20184 : {
20185 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20186 : nsIDOMXULElement *self;
20187 0 : xpc_qsSelfRef selfref;
20188 0 : JS::AutoValueRooter tvr(cx);
20189 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20190 0 : return JS_FALSE;
20191 : xpc_qsDOMString arg0(cx, *vp, vp,
20192 : xpc_qsDOMString::eDefaultNullBehavior,
20193 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20194 0 : if (!arg0.IsValid())
20195 0 : return JS_FALSE;
20196 : nsresult rv;
20197 0 : rv = self->SetPersist(arg0);
20198 0 : if (NS_FAILED(rv))
20199 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20200 0 : return JS_TRUE;
20201 : }
20202 :
20203 : static JSBool
20204 0 : nsIDOMXULElement_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20205 : {
20206 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20207 : nsIDOMXULElement *self;
20208 0 : xpc_qsSelfRef selfref;
20209 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20210 0 : return JS_FALSE;
20211 : nsresult rv;
20212 0 : nsString result;
20213 0 : rv = self->GetLeft(result);
20214 0 : if (NS_FAILED(rv))
20215 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20216 0 : return xpc::StringToJsval(cx, result, vp);
20217 : }
20218 :
20219 : static JSBool
20220 0 : nsIDOMXULElement_SetLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20221 : {
20222 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20223 : nsIDOMXULElement *self;
20224 0 : xpc_qsSelfRef selfref;
20225 0 : JS::AutoValueRooter tvr(cx);
20226 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20227 0 : return JS_FALSE;
20228 : xpc_qsDOMString arg0(cx, *vp, vp,
20229 : xpc_qsDOMString::eDefaultNullBehavior,
20230 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20231 0 : if (!arg0.IsValid())
20232 0 : return JS_FALSE;
20233 : nsresult rv;
20234 0 : rv = self->SetLeft(arg0);
20235 0 : if (NS_FAILED(rv))
20236 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20237 0 : return JS_TRUE;
20238 : }
20239 :
20240 : static JSBool
20241 0 : nsIDOMXULElement_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20242 : {
20243 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20244 : nsIDOMXULElement *self;
20245 0 : xpc_qsSelfRef selfref;
20246 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20247 0 : return JS_FALSE;
20248 : nsresult rv;
20249 0 : nsString result;
20250 0 : rv = self->GetTop(result);
20251 0 : if (NS_FAILED(rv))
20252 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20253 0 : return xpc::StringToJsval(cx, result, vp);
20254 : }
20255 :
20256 : static JSBool
20257 0 : nsIDOMXULElement_SetTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20258 : {
20259 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20260 : nsIDOMXULElement *self;
20261 0 : xpc_qsSelfRef selfref;
20262 0 : JS::AutoValueRooter tvr(cx);
20263 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20264 0 : return JS_FALSE;
20265 : xpc_qsDOMString arg0(cx, *vp, vp,
20266 : xpc_qsDOMString::eDefaultNullBehavior,
20267 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20268 0 : if (!arg0.IsValid())
20269 0 : return JS_FALSE;
20270 : nsresult rv;
20271 0 : rv = self->SetTop(arg0);
20272 0 : if (NS_FAILED(rv))
20273 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20274 0 : return JS_TRUE;
20275 : }
20276 :
20277 : static JSBool
20278 0 : nsIDOMXULElement_GetDatasources(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20279 : {
20280 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20281 : nsIDOMXULElement *self;
20282 0 : xpc_qsSelfRef selfref;
20283 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20284 0 : return JS_FALSE;
20285 : nsresult rv;
20286 0 : nsString result;
20287 0 : rv = self->GetDatasources(result);
20288 0 : if (NS_FAILED(rv))
20289 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20290 0 : return xpc::StringToJsval(cx, result, vp);
20291 : }
20292 :
20293 : static JSBool
20294 0 : nsIDOMXULElement_SetDatasources(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20295 : {
20296 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20297 : nsIDOMXULElement *self;
20298 0 : xpc_qsSelfRef selfref;
20299 0 : JS::AutoValueRooter tvr(cx);
20300 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20301 0 : return JS_FALSE;
20302 : xpc_qsDOMString arg0(cx, *vp, vp,
20303 : xpc_qsDOMString::eDefaultNullBehavior,
20304 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20305 0 : if (!arg0.IsValid())
20306 0 : return JS_FALSE;
20307 : nsresult rv;
20308 0 : rv = self->SetDatasources(arg0);
20309 0 : if (NS_FAILED(rv))
20310 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20311 0 : return JS_TRUE;
20312 : }
20313 :
20314 : static JSBool
20315 0 : nsIDOMXULElement_GetRef(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20316 : {
20317 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20318 : nsIDOMXULElement *self;
20319 0 : xpc_qsSelfRef selfref;
20320 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20321 0 : return JS_FALSE;
20322 : nsresult rv;
20323 0 : nsString result;
20324 0 : rv = self->GetRef(result);
20325 0 : if (NS_FAILED(rv))
20326 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20327 0 : return xpc::StringToJsval(cx, result, vp);
20328 : }
20329 :
20330 : static JSBool
20331 0 : nsIDOMXULElement_SetRef(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20332 : {
20333 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20334 : nsIDOMXULElement *self;
20335 0 : xpc_qsSelfRef selfref;
20336 0 : JS::AutoValueRooter tvr(cx);
20337 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20338 0 : return JS_FALSE;
20339 : xpc_qsDOMString arg0(cx, *vp, vp,
20340 : xpc_qsDOMString::eDefaultNullBehavior,
20341 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20342 0 : if (!arg0.IsValid())
20343 0 : return JS_FALSE;
20344 : nsresult rv;
20345 0 : rv = self->SetRef(arg0);
20346 0 : if (NS_FAILED(rv))
20347 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20348 0 : return JS_TRUE;
20349 : }
20350 :
20351 : static JSBool
20352 0 : nsIDOMXULElement_GetTooltipText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20353 : {
20354 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20355 : nsIDOMXULElement *self;
20356 0 : xpc_qsSelfRef selfref;
20357 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20358 0 : return JS_FALSE;
20359 : nsresult rv;
20360 0 : nsString result;
20361 0 : rv = self->GetTooltipText(result);
20362 0 : if (NS_FAILED(rv))
20363 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20364 0 : return xpc::StringToJsval(cx, result, vp);
20365 : }
20366 :
20367 : static JSBool
20368 0 : nsIDOMXULElement_SetTooltipText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20369 : {
20370 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20371 : nsIDOMXULElement *self;
20372 0 : xpc_qsSelfRef selfref;
20373 0 : JS::AutoValueRooter tvr(cx);
20374 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20375 0 : return JS_FALSE;
20376 : xpc_qsDOMString arg0(cx, *vp, vp,
20377 : xpc_qsDOMString::eDefaultNullBehavior,
20378 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20379 0 : if (!arg0.IsValid())
20380 0 : return JS_FALSE;
20381 : nsresult rv;
20382 0 : rv = self->SetTooltipText(arg0);
20383 0 : if (NS_FAILED(rv))
20384 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20385 0 : return JS_TRUE;
20386 : }
20387 :
20388 : static JSBool
20389 0 : nsIDOMXULElement_GetStatusText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20390 : {
20391 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20392 : nsIDOMXULElement *self;
20393 0 : xpc_qsSelfRef selfref;
20394 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20395 0 : return JS_FALSE;
20396 : nsresult rv;
20397 0 : nsString result;
20398 0 : rv = self->GetStatusText(result);
20399 0 : if (NS_FAILED(rv))
20400 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20401 0 : return xpc::StringToJsval(cx, result, vp);
20402 : }
20403 :
20404 : static JSBool
20405 0 : nsIDOMXULElement_SetStatusText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20406 : {
20407 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20408 : nsIDOMXULElement *self;
20409 0 : xpc_qsSelfRef selfref;
20410 0 : JS::AutoValueRooter tvr(cx);
20411 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20412 0 : return JS_FALSE;
20413 : xpc_qsDOMString arg0(cx, *vp, vp,
20414 : xpc_qsDOMString::eDefaultNullBehavior,
20415 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20416 0 : if (!arg0.IsValid())
20417 0 : return JS_FALSE;
20418 : nsresult rv;
20419 0 : rv = self->SetStatusText(arg0);
20420 0 : if (NS_FAILED(rv))
20421 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20422 0 : return JS_TRUE;
20423 : }
20424 :
20425 : static JSBool
20426 0 : nsIDOMXULElement_GetAllowEvents(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20427 : {
20428 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20429 : nsIDOMXULElement *self;
20430 0 : xpc_qsSelfRef selfref;
20431 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20432 0 : return JS_FALSE;
20433 : nsresult rv;
20434 : bool result;
20435 0 : rv = self->GetAllowEvents(&result);
20436 0 : if (NS_FAILED(rv))
20437 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20438 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
20439 0 : return JS_TRUE;
20440 : }
20441 :
20442 : static JSBool
20443 0 : nsIDOMXULElement_SetAllowEvents(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20444 : {
20445 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20446 : nsIDOMXULElement *self;
20447 0 : xpc_qsSelfRef selfref;
20448 0 : JS::AutoValueRooter tvr(cx);
20449 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20450 0 : return JS_FALSE;
20451 : JSBool arg0;
20452 0 : JS_ValueToBoolean(cx, *vp, &arg0);
20453 : nsresult rv;
20454 0 : rv = self->SetAllowEvents(arg0);
20455 0 : if (NS_FAILED(rv))
20456 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20457 0 : return JS_TRUE;
20458 : }
20459 :
20460 : static JSBool
20461 0 : nsIDOMXULElement_GetDatabase(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20462 : {
20463 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20464 0 : JSObject *callee = nsnull;
20465 : nsIDOMXULElement *self;
20466 0 : xpc_qsSelfRef selfref;
20467 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20468 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20469 0 : return JS_FALSE;
20470 : nsresult rv;
20471 0 : nsCOMPtr<nsIRDFCompositeDataSource> result;
20472 0 : rv = self->GetDatabase(getter_AddRefs(result));
20473 0 : if (NS_FAILED(rv))
20474 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20475 0 : if (!result) {
20476 0 : *vp = JSVAL_NULL;
20477 0 : return JS_TRUE;
20478 : }
20479 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20480 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20481 0 : return JS_TRUE;
20482 : }
20483 : // After this point do not use 'result'!
20484 0 : qsObjectHelper helper(result, cache);
20485 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIRDFCompositeDataSource), &interfaces[k_nsIRDFCompositeDataSource], vp);
20486 : }
20487 :
20488 : static JSBool
20489 0 : nsIDOMXULElement_GetBuilder(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20490 : {
20491 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20492 0 : JSObject *callee = nsnull;
20493 : nsIDOMXULElement *self;
20494 0 : xpc_qsSelfRef selfref;
20495 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20496 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20497 0 : return JS_FALSE;
20498 : nsresult rv;
20499 0 : nsCOMPtr<nsIXULTemplateBuilder> result;
20500 0 : rv = self->GetBuilder(getter_AddRefs(result));
20501 0 : if (NS_FAILED(rv))
20502 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20503 0 : if (!result) {
20504 0 : *vp = JSVAL_NULL;
20505 0 : return JS_TRUE;
20506 : }
20507 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20508 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20509 0 : return JS_TRUE;
20510 : }
20511 : // After this point do not use 'result'!
20512 0 : qsObjectHelper helper(result, cache);
20513 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIXULTemplateBuilder), &interfaces[k_nsIXULTemplateBuilder], vp);
20514 : }
20515 :
20516 : static JSBool
20517 0 : nsIDOMXULElement_GetResource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20518 : {
20519 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20520 0 : JSObject *callee = nsnull;
20521 : nsIDOMXULElement *self;
20522 0 : xpc_qsSelfRef selfref;
20523 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20524 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20525 0 : return JS_FALSE;
20526 : nsresult rv;
20527 0 : nsCOMPtr<nsIRDFResource> result;
20528 0 : rv = self->GetResource(getter_AddRefs(result));
20529 0 : if (NS_FAILED(rv))
20530 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20531 0 : if (!result) {
20532 0 : *vp = JSVAL_NULL;
20533 0 : return JS_TRUE;
20534 : }
20535 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20536 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20537 0 : return JS_TRUE;
20538 : }
20539 : // After this point do not use 'result'!
20540 0 : qsObjectHelper helper(result, cache);
20541 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIRDFResource), &interfaces[k_nsIRDFResource], vp);
20542 : }
20543 :
20544 : static JSBool
20545 0 : nsIDOMXULElement_GetControllers(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20546 : {
20547 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20548 0 : JSObject *callee = nsnull;
20549 : nsIDOMXULElement *self;
20550 0 : xpc_qsSelfRef selfref;
20551 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20552 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20553 0 : return JS_FALSE;
20554 : nsresult rv;
20555 0 : nsCOMPtr<nsIControllers> result;
20556 0 : rv = self->GetControllers(getter_AddRefs(result));
20557 0 : if (NS_FAILED(rv))
20558 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20559 0 : if (!result) {
20560 0 : *vp = JSVAL_NULL;
20561 0 : return JS_TRUE;
20562 : }
20563 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20564 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20565 0 : return JS_TRUE;
20566 : }
20567 : // After this point do not use 'result'!
20568 0 : qsObjectHelper helper(result, cache);
20569 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIControllers), &interfaces[k_nsIControllers], vp);
20570 : }
20571 :
20572 : static JSBool
20573 0 : nsIDOMXULElement_GetBoxObject(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20574 : {
20575 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20576 0 : JSObject *callee = nsnull;
20577 : nsIDOMXULElement *self;
20578 0 : xpc_qsSelfRef selfref;
20579 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20580 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20581 0 : return JS_FALSE;
20582 : nsresult rv;
20583 0 : nsCOMPtr<nsIBoxObject> result;
20584 0 : rv = self->GetBoxObject(getter_AddRefs(result));
20585 0 : if (NS_FAILED(rv))
20586 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20587 0 : if (!result) {
20588 0 : *vp = JSVAL_NULL;
20589 0 : return JS_TRUE;
20590 : }
20591 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20592 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20593 0 : return JS_TRUE;
20594 : }
20595 : // After this point do not use 'result'!
20596 0 : qsObjectHelper helper(result, cache);
20597 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIBoxObject), &interfaces[k_nsIBoxObject], vp);
20598 : }
20599 :
20600 : static JSBool
20601 0 : nsIDOMXULElement_Focus(JSContext *cx, unsigned argc, jsval *vp)
20602 : {
20603 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20604 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20605 0 : if (!obj)
20606 0 : return JS_FALSE;
20607 : nsIDOMXULElement *self;
20608 0 : xpc_qsSelfRef selfref;
20609 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20610 0 : return JS_FALSE;
20611 : nsresult rv;
20612 0 : rv = self->Focus();
20613 0 : if (NS_FAILED(rv))
20614 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20615 0 : *vp = JSVAL_VOID;
20616 0 : return JS_TRUE;
20617 : }
20618 :
20619 : static JSBool
20620 0 : nsIDOMXULElement_Blur(JSContext *cx, unsigned argc, jsval *vp)
20621 : {
20622 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20623 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20624 0 : if (!obj)
20625 0 : return JS_FALSE;
20626 : nsIDOMXULElement *self;
20627 0 : xpc_qsSelfRef selfref;
20628 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20629 0 : return JS_FALSE;
20630 : nsresult rv;
20631 0 : rv = self->Blur();
20632 0 : if (NS_FAILED(rv))
20633 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20634 0 : *vp = JSVAL_VOID;
20635 0 : return JS_TRUE;
20636 : }
20637 :
20638 : static JSBool
20639 0 : nsIDOMXULElement_Click(JSContext *cx, unsigned argc, jsval *vp)
20640 : {
20641 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20642 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20643 0 : if (!obj)
20644 0 : return JS_FALSE;
20645 : nsIDOMXULElement *self;
20646 0 : xpc_qsSelfRef selfref;
20647 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20648 0 : return JS_FALSE;
20649 : nsresult rv;
20650 0 : rv = self->Click();
20651 0 : if (NS_FAILED(rv))
20652 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20653 0 : *vp = JSVAL_VOID;
20654 0 : return JS_TRUE;
20655 : }
20656 :
20657 : static JSBool
20658 0 : nsIDOMXULElement_DoCommand(JSContext *cx, unsigned argc, jsval *vp)
20659 : {
20660 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20661 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20662 0 : if (!obj)
20663 0 : return JS_FALSE;
20664 : nsIDOMXULElement *self;
20665 0 : xpc_qsSelfRef selfref;
20666 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20667 0 : return JS_FALSE;
20668 : nsresult rv;
20669 0 : rv = self->DoCommand();
20670 0 : if (NS_FAILED(rv))
20671 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20672 0 : *vp = JSVAL_VOID;
20673 0 : return JS_TRUE;
20674 : }
20675 :
20676 : static JSBool
20677 45 : nsIDOMXULElement_GetElementsByAttribute(JSContext *cx, unsigned argc, jsval *vp)
20678 : {
20679 45 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20680 45 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20681 45 : if (!obj)
20682 0 : return JS_FALSE;
20683 45 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
20684 : nsIDOMXULElement *self;
20685 90 : xpc_qsSelfRef selfref;
20686 90 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20687 45 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
20688 0 : return JS_FALSE;
20689 45 : if (argc < 2)
20690 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20691 45 : jsval *argv = JS_ARGV(cx, vp);
20692 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
20693 : xpc_qsDOMString::eDefaultNullBehavior,
20694 90 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20695 45 : if (!arg0.IsValid())
20696 0 : return JS_FALSE;
20697 45 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
20698 : xpc_qsDOMString::eDefaultNullBehavior,
20699 135 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20700 45 : if (!arg1.IsValid())
20701 0 : return JS_FALSE;
20702 : nsresult rv;
20703 90 : nsCOMPtr<nsIDOMNodeList> result;
20704 45 : rv = self->GetElementsByAttribute(arg0, arg1, getter_AddRefs(result));
20705 45 : if (NS_FAILED(rv))
20706 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20707 45 : if (!result) {
20708 0 : *vp = JSVAL_NULL;
20709 0 : return JS_TRUE;
20710 : }
20711 45 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20712 45 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20713 0 : return JS_TRUE;
20714 : }
20715 : // After this point do not use 'result'!
20716 90 : qsObjectHelper helper(result, cache);
20717 45 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
20718 : }
20719 :
20720 : static JSBool
20721 37 : nsIDOMXULElement_GetElementsByAttributeNS(JSContext *cx, unsigned argc, jsval *vp)
20722 : {
20723 37 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20724 37 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20725 37 : if (!obj)
20726 0 : return JS_FALSE;
20727 37 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
20728 : nsIDOMXULElement *self;
20729 74 : xpc_qsSelfRef selfref;
20730 74 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20731 37 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
20732 0 : return JS_FALSE;
20733 37 : if (argc < 3)
20734 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20735 37 : jsval *argv = JS_ARGV(cx, vp);
20736 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
20737 : xpc_qsDOMString::eDefaultNullBehavior,
20738 74 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20739 37 : if (!arg0.IsValid())
20740 0 : return JS_FALSE;
20741 37 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
20742 : xpc_qsDOMString::eDefaultNullBehavior,
20743 111 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20744 37 : if (!arg1.IsValid())
20745 0 : return JS_FALSE;
20746 37 : xpc_qsDOMString arg2(cx, argv[2], &argv[2],
20747 : xpc_qsDOMString::eDefaultNullBehavior,
20748 111 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20749 37 : if (!arg2.IsValid())
20750 0 : return JS_FALSE;
20751 : nsresult rv;
20752 74 : nsCOMPtr<nsIDOMNodeList> result;
20753 37 : rv = self->GetElementsByAttributeNS(arg0, arg1, arg2, getter_AddRefs(result));
20754 37 : if (NS_FAILED(rv))
20755 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20756 37 : if (!result) {
20757 0 : *vp = JSVAL_NULL;
20758 0 : return JS_TRUE;
20759 : }
20760 37 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20761 37 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20762 0 : return JS_TRUE;
20763 : }
20764 : // After this point do not use 'result'!
20765 74 : qsObjectHelper helper(result, cache);
20766 37 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
20767 : }
20768 :
20769 : // === interface nsIBoxObject
20770 :
20771 : static JSBool
20772 0 : nsIBoxObject_GetX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20773 : {
20774 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20775 : nsIBoxObject *self;
20776 0 : xpc_qsSelfRef selfref;
20777 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20778 0 : return JS_FALSE;
20779 : nsresult rv;
20780 : PRInt32 result;
20781 0 : rv = self->GetX(&result);
20782 0 : if (NS_FAILED(rv))
20783 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20784 0 : *vp = INT_TO_JSVAL(result);
20785 0 : return JS_TRUE;
20786 : }
20787 :
20788 : static JSBool
20789 0 : nsIBoxObject_GetY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20790 : {
20791 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20792 : nsIBoxObject *self;
20793 0 : xpc_qsSelfRef selfref;
20794 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20795 0 : return JS_FALSE;
20796 : nsresult rv;
20797 : PRInt32 result;
20798 0 : rv = self->GetY(&result);
20799 0 : if (NS_FAILED(rv))
20800 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20801 0 : *vp = INT_TO_JSVAL(result);
20802 0 : return JS_TRUE;
20803 : }
20804 :
20805 : static JSBool
20806 0 : nsIBoxObject_GetScreenX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20807 : {
20808 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20809 : nsIBoxObject *self;
20810 0 : xpc_qsSelfRef selfref;
20811 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20812 0 : return JS_FALSE;
20813 : nsresult rv;
20814 : PRInt32 result;
20815 0 : rv = self->GetScreenX(&result);
20816 0 : if (NS_FAILED(rv))
20817 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20818 0 : *vp = INT_TO_JSVAL(result);
20819 0 : return JS_TRUE;
20820 : }
20821 :
20822 : static JSBool
20823 0 : nsIBoxObject_GetScreenY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20824 : {
20825 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20826 : nsIBoxObject *self;
20827 0 : xpc_qsSelfRef selfref;
20828 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20829 0 : return JS_FALSE;
20830 : nsresult rv;
20831 : PRInt32 result;
20832 0 : rv = self->GetScreenY(&result);
20833 0 : if (NS_FAILED(rv))
20834 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20835 0 : *vp = INT_TO_JSVAL(result);
20836 0 : return JS_TRUE;
20837 : }
20838 :
20839 : static JSBool
20840 0 : nsIBoxObject_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20841 : {
20842 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20843 : nsIBoxObject *self;
20844 0 : xpc_qsSelfRef selfref;
20845 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20846 0 : return JS_FALSE;
20847 : nsresult rv;
20848 : PRInt32 result;
20849 0 : rv = self->GetWidth(&result);
20850 0 : if (NS_FAILED(rv))
20851 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20852 0 : *vp = INT_TO_JSVAL(result);
20853 0 : return JS_TRUE;
20854 : }
20855 :
20856 : static JSBool
20857 0 : nsIBoxObject_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20858 : {
20859 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20860 : nsIBoxObject *self;
20861 0 : xpc_qsSelfRef selfref;
20862 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20863 0 : return JS_FALSE;
20864 : nsresult rv;
20865 : PRInt32 result;
20866 0 : rv = self->GetHeight(&result);
20867 0 : if (NS_FAILED(rv))
20868 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20869 0 : *vp = INT_TO_JSVAL(result);
20870 0 : return JS_TRUE;
20871 : }
20872 :
20873 : // === interface nsIDOMFileReader
20874 :
20875 : static JSBool
20876 2 : nsIDOMFileReader_ReadAsArrayBuffer(JSContext *cx, unsigned argc, jsval *vp)
20877 : {
20878 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20879 2 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20880 2 : if (!obj)
20881 0 : return JS_FALSE;
20882 : nsIDOMFileReader *self;
20883 4 : xpc_qsSelfRef selfref;
20884 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20885 0 : return JS_FALSE;
20886 2 : if (argc < 1)
20887 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20888 2 : jsval *argv = JS_ARGV(cx, vp);
20889 : nsresult rv;
20890 : nsIDOMBlob *arg0;
20891 4 : xpc_qsSelfRef arg0ref;
20892 2 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
20893 2 : if (NS_FAILED(rv)) {
20894 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
20895 0 : return JS_FALSE;
20896 : }
20897 2 : rv = self->ReadAsArrayBuffer(arg0, cx);
20898 2 : if (NS_FAILED(rv))
20899 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20900 2 : *vp = JSVAL_VOID;
20901 2 : return JS_TRUE;
20902 : }
20903 :
20904 : static JSBool
20905 0 : nsIDOMFileReader_ReadAsBinaryString(JSContext *cx, unsigned argc, jsval *vp)
20906 : {
20907 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20908 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20909 0 : if (!obj)
20910 0 : return JS_FALSE;
20911 : nsIDOMFileReader *self;
20912 0 : xpc_qsSelfRef selfref;
20913 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20914 0 : return JS_FALSE;
20915 0 : if (argc < 1)
20916 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20917 0 : jsval *argv = JS_ARGV(cx, vp);
20918 : nsresult rv;
20919 : nsIDOMBlob *arg0;
20920 0 : xpc_qsSelfRef arg0ref;
20921 0 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
20922 0 : if (NS_FAILED(rv)) {
20923 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
20924 0 : return JS_FALSE;
20925 : }
20926 0 : rv = self->ReadAsBinaryString(arg0);
20927 0 : if (NS_FAILED(rv))
20928 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20929 0 : *vp = JSVAL_VOID;
20930 0 : return JS_TRUE;
20931 : }
20932 :
20933 : static JSBool
20934 0 : nsIDOMFileReader_ReadAsText(JSContext *cx, unsigned argc, jsval *vp)
20935 : {
20936 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20937 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20938 0 : if (!obj)
20939 0 : return JS_FALSE;
20940 : nsIDOMFileReader *self;
20941 0 : xpc_qsSelfRef selfref;
20942 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20943 0 : return JS_FALSE;
20944 0 : if (argc < 1)
20945 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20946 0 : jsval *argv = JS_ARGV(cx, vp);
20947 : nsresult rv;
20948 : nsIDOMBlob *arg0;
20949 0 : xpc_qsSelfRef arg0ref;
20950 0 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
20951 0 : if (NS_FAILED(rv)) {
20952 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
20953 0 : return JS_FALSE;
20954 : }
20955 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
20956 : xpc_qsDOMString::eDefaultNullBehavior,
20957 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20958 0 : if (!arg1.IsValid())
20959 0 : return JS_FALSE;
20960 0 : rv = self->ReadAsText(arg0, arg1);
20961 0 : if (NS_FAILED(rv))
20962 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20963 0 : *vp = JSVAL_VOID;
20964 0 : return JS_TRUE;
20965 : }
20966 :
20967 : static JSBool
20968 0 : nsIDOMFileReader_ReadAsDataURL(JSContext *cx, unsigned argc, jsval *vp)
20969 : {
20970 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20971 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20972 0 : if (!obj)
20973 0 : return JS_FALSE;
20974 : nsIDOMFileReader *self;
20975 0 : xpc_qsSelfRef selfref;
20976 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20977 0 : return JS_FALSE;
20978 0 : if (argc < 1)
20979 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20980 0 : jsval *argv = JS_ARGV(cx, vp);
20981 : nsresult rv;
20982 : nsIDOMBlob *arg0;
20983 0 : xpc_qsSelfRef arg0ref;
20984 0 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
20985 0 : if (NS_FAILED(rv)) {
20986 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
20987 0 : return JS_FALSE;
20988 : }
20989 0 : rv = self->ReadAsDataURL(arg0);
20990 0 : if (NS_FAILED(rv))
20991 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20992 0 : *vp = JSVAL_VOID;
20993 0 : return JS_TRUE;
20994 : }
20995 :
20996 : static JSBool
20997 0 : nsIDOMFileReader_Abort(JSContext *cx, unsigned argc, jsval *vp)
20998 : {
20999 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21000 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21001 0 : if (!obj)
21002 0 : return JS_FALSE;
21003 : nsIDOMFileReader *self;
21004 0 : xpc_qsSelfRef selfref;
21005 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21006 0 : return JS_FALSE;
21007 : nsresult rv;
21008 0 : rv = self->Abort();
21009 0 : if (NS_FAILED(rv))
21010 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21011 0 : *vp = JSVAL_VOID;
21012 0 : return JS_TRUE;
21013 : }
21014 :
21015 : static JSBool
21016 2 : nsIDOMFileReader_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21017 : {
21018 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21019 : nsIDOMFileReader *self;
21020 4 : xpc_qsSelfRef selfref;
21021 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21022 0 : return JS_FALSE;
21023 : nsresult rv;
21024 : PRUint16 result;
21025 2 : rv = self->GetReadyState(&result);
21026 2 : if (NS_FAILED(rv))
21027 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21028 2 : *vp = INT_TO_JSVAL((int32_t) result);
21029 2 : return JS_TRUE;
21030 : }
21031 :
21032 : static JSBool
21033 2 : nsIDOMFileReader_GetResult(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21034 : {
21035 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21036 : nsIDOMFileReader *self;
21037 4 : xpc_qsSelfRef selfref;
21038 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21039 0 : return JS_FALSE;
21040 : nsresult rv;
21041 2 : rv = self->GetResult(cx, vp);
21042 2 : if (NS_FAILED(rv))
21043 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21044 2 : return JS_TRUE;
21045 : }
21046 :
21047 : static JSBool
21048 0 : nsIDOMFileReader_GetError(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21049 : {
21050 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21051 0 : JSObject *callee = nsnull;
21052 : nsIDOMFileReader *self;
21053 0 : xpc_qsSelfRef selfref;
21054 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21055 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21056 0 : return JS_FALSE;
21057 : nsresult rv;
21058 0 : nsCOMPtr<nsIDOMDOMError> result;
21059 0 : rv = self->GetError(getter_AddRefs(result));
21060 0 : if (NS_FAILED(rv))
21061 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21062 0 : if (!result) {
21063 0 : *vp = JSVAL_NULL;
21064 0 : return JS_TRUE;
21065 : }
21066 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21067 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21068 0 : return JS_TRUE;
21069 : }
21070 : // After this point do not use 'result'!
21071 0 : qsObjectHelper helper(result, cache);
21072 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMError), &interfaces[k_nsIDOMDOMError], vp);
21073 : }
21074 :
21075 : static JSBool
21076 0 : nsIDOMFileReader_GetOnloadstart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21077 : {
21078 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21079 0 : JSObject *callee = nsnull;
21080 : nsIDOMFileReader *self;
21081 0 : xpc_qsSelfRef selfref;
21082 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21083 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21084 0 : return JS_FALSE;
21085 : nsresult rv;
21086 0 : nsCOMPtr<nsIDOMEventListener> result;
21087 0 : rv = self->GetOnloadstart(getter_AddRefs(result));
21088 0 : if (NS_FAILED(rv))
21089 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21090 0 : if (!result) {
21091 0 : *vp = JSVAL_NULL;
21092 0 : return JS_TRUE;
21093 : }
21094 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21095 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21096 0 : return JS_TRUE;
21097 : }
21098 : // After this point do not use 'result'!
21099 0 : qsObjectHelper helper(result, cache);
21100 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21101 : }
21102 :
21103 : static JSBool
21104 0 : nsIDOMFileReader_SetOnloadstart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21105 : {
21106 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21107 : nsIDOMFileReader *self;
21108 0 : xpc_qsSelfRef selfref;
21109 0 : JS::AutoValueRooter tvr(cx);
21110 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21111 0 : return JS_FALSE;
21112 : nsresult rv;
21113 : nsIDOMEventListener *arg0;
21114 0 : xpc_qsSelfRef arg0ref;
21115 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21116 0 : if (NS_FAILED(rv)) {
21117 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21118 0 : return JS_FALSE;
21119 : }
21120 0 : rv = self->SetOnloadstart(arg0);
21121 0 : if (NS_FAILED(rv))
21122 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21123 0 : return JS_TRUE;
21124 : }
21125 :
21126 : static JSBool
21127 0 : nsIDOMFileReader_GetOnprogress(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21128 : {
21129 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21130 0 : JSObject *callee = nsnull;
21131 : nsIDOMFileReader *self;
21132 0 : xpc_qsSelfRef selfref;
21133 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21134 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21135 0 : return JS_FALSE;
21136 : nsresult rv;
21137 0 : nsCOMPtr<nsIDOMEventListener> result;
21138 0 : rv = self->GetOnprogress(getter_AddRefs(result));
21139 0 : if (NS_FAILED(rv))
21140 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21141 0 : if (!result) {
21142 0 : *vp = JSVAL_NULL;
21143 0 : return JS_TRUE;
21144 : }
21145 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21146 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21147 0 : return JS_TRUE;
21148 : }
21149 : // After this point do not use 'result'!
21150 0 : qsObjectHelper helper(result, cache);
21151 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21152 : }
21153 :
21154 : static JSBool
21155 0 : nsIDOMFileReader_SetOnprogress(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21156 : {
21157 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21158 : nsIDOMFileReader *self;
21159 0 : xpc_qsSelfRef selfref;
21160 0 : JS::AutoValueRooter tvr(cx);
21161 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21162 0 : return JS_FALSE;
21163 : nsresult rv;
21164 : nsIDOMEventListener *arg0;
21165 0 : xpc_qsSelfRef arg0ref;
21166 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21167 0 : if (NS_FAILED(rv)) {
21168 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21169 0 : return JS_FALSE;
21170 : }
21171 0 : rv = self->SetOnprogress(arg0);
21172 0 : if (NS_FAILED(rv))
21173 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21174 0 : return JS_TRUE;
21175 : }
21176 :
21177 : static JSBool
21178 0 : nsIDOMFileReader_GetOnload(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21179 : {
21180 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21181 0 : JSObject *callee = nsnull;
21182 : nsIDOMFileReader *self;
21183 0 : xpc_qsSelfRef selfref;
21184 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21185 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21186 0 : return JS_FALSE;
21187 : nsresult rv;
21188 0 : nsCOMPtr<nsIDOMEventListener> result;
21189 0 : rv = self->GetOnload(getter_AddRefs(result));
21190 0 : if (NS_FAILED(rv))
21191 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21192 0 : if (!result) {
21193 0 : *vp = JSVAL_NULL;
21194 0 : return JS_TRUE;
21195 : }
21196 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21197 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21198 0 : return JS_TRUE;
21199 : }
21200 : // After this point do not use 'result'!
21201 0 : qsObjectHelper helper(result, cache);
21202 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21203 : }
21204 :
21205 : static JSBool
21206 0 : nsIDOMFileReader_SetOnload(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21207 : {
21208 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21209 : nsIDOMFileReader *self;
21210 0 : xpc_qsSelfRef selfref;
21211 0 : JS::AutoValueRooter tvr(cx);
21212 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21213 0 : return JS_FALSE;
21214 : nsresult rv;
21215 : nsIDOMEventListener *arg0;
21216 0 : xpc_qsSelfRef arg0ref;
21217 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21218 0 : if (NS_FAILED(rv)) {
21219 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21220 0 : return JS_FALSE;
21221 : }
21222 0 : rv = self->SetOnload(arg0);
21223 0 : if (NS_FAILED(rv))
21224 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21225 0 : return JS_TRUE;
21226 : }
21227 :
21228 : static JSBool
21229 0 : nsIDOMFileReader_GetOnabort(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21230 : {
21231 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21232 0 : JSObject *callee = nsnull;
21233 : nsIDOMFileReader *self;
21234 0 : xpc_qsSelfRef selfref;
21235 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21236 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21237 0 : return JS_FALSE;
21238 : nsresult rv;
21239 0 : nsCOMPtr<nsIDOMEventListener> result;
21240 0 : rv = self->GetOnabort(getter_AddRefs(result));
21241 0 : if (NS_FAILED(rv))
21242 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21243 0 : if (!result) {
21244 0 : *vp = JSVAL_NULL;
21245 0 : return JS_TRUE;
21246 : }
21247 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21248 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21249 0 : return JS_TRUE;
21250 : }
21251 : // After this point do not use 'result'!
21252 0 : qsObjectHelper helper(result, cache);
21253 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21254 : }
21255 :
21256 : static JSBool
21257 0 : nsIDOMFileReader_SetOnabort(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21258 : {
21259 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21260 : nsIDOMFileReader *self;
21261 0 : xpc_qsSelfRef selfref;
21262 0 : JS::AutoValueRooter tvr(cx);
21263 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21264 0 : return JS_FALSE;
21265 : nsresult rv;
21266 : nsIDOMEventListener *arg0;
21267 0 : xpc_qsSelfRef arg0ref;
21268 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21269 0 : if (NS_FAILED(rv)) {
21270 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21271 0 : return JS_FALSE;
21272 : }
21273 0 : rv = self->SetOnabort(arg0);
21274 0 : if (NS_FAILED(rv))
21275 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21276 0 : return JS_TRUE;
21277 : }
21278 :
21279 : static JSBool
21280 0 : nsIDOMFileReader_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21281 : {
21282 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21283 0 : JSObject *callee = nsnull;
21284 : nsIDOMFileReader *self;
21285 0 : xpc_qsSelfRef selfref;
21286 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21287 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21288 0 : return JS_FALSE;
21289 : nsresult rv;
21290 0 : nsCOMPtr<nsIDOMEventListener> result;
21291 0 : rv = self->GetOnerror(getter_AddRefs(result));
21292 0 : if (NS_FAILED(rv))
21293 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21294 0 : if (!result) {
21295 0 : *vp = JSVAL_NULL;
21296 0 : return JS_TRUE;
21297 : }
21298 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21299 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21300 0 : return JS_TRUE;
21301 : }
21302 : // After this point do not use 'result'!
21303 0 : qsObjectHelper helper(result, cache);
21304 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21305 : }
21306 :
21307 : static JSBool
21308 0 : nsIDOMFileReader_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21309 : {
21310 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21311 : nsIDOMFileReader *self;
21312 0 : xpc_qsSelfRef selfref;
21313 0 : JS::AutoValueRooter tvr(cx);
21314 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21315 0 : return JS_FALSE;
21316 : nsresult rv;
21317 : nsIDOMEventListener *arg0;
21318 0 : xpc_qsSelfRef arg0ref;
21319 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21320 0 : if (NS_FAILED(rv)) {
21321 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21322 0 : return JS_FALSE;
21323 : }
21324 0 : rv = self->SetOnerror(arg0);
21325 0 : if (NS_FAILED(rv))
21326 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21327 0 : return JS_TRUE;
21328 : }
21329 :
21330 : static JSBool
21331 0 : nsIDOMFileReader_GetOnloadend(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21332 : {
21333 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21334 0 : JSObject *callee = nsnull;
21335 : nsIDOMFileReader *self;
21336 0 : xpc_qsSelfRef selfref;
21337 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21338 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21339 0 : return JS_FALSE;
21340 : nsresult rv;
21341 0 : nsCOMPtr<nsIDOMEventListener> result;
21342 0 : rv = self->GetOnloadend(getter_AddRefs(result));
21343 0 : if (NS_FAILED(rv))
21344 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21345 0 : if (!result) {
21346 0 : *vp = JSVAL_NULL;
21347 0 : return JS_TRUE;
21348 : }
21349 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21350 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21351 0 : return JS_TRUE;
21352 : }
21353 : // After this point do not use 'result'!
21354 0 : qsObjectHelper helper(result, cache);
21355 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21356 : }
21357 :
21358 : static JSBool
21359 0 : nsIDOMFileReader_SetOnloadend(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21360 : {
21361 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21362 : nsIDOMFileReader *self;
21363 0 : xpc_qsSelfRef selfref;
21364 0 : JS::AutoValueRooter tvr(cx);
21365 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21366 0 : return JS_FALSE;
21367 : nsresult rv;
21368 : nsIDOMEventListener *arg0;
21369 0 : xpc_qsSelfRef arg0ref;
21370 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21371 0 : if (NS_FAILED(rv)) {
21372 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21373 0 : return JS_FALSE;
21374 : }
21375 0 : rv = self->SetOnloadend(arg0);
21376 0 : if (NS_FAILED(rv))
21377 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21378 0 : return JS_TRUE;
21379 : }
21380 :
21381 : // === interface nsIXMLHttpRequest
21382 :
21383 : static JSBool
21384 392 : nsIXMLHttpRequest_GetResponseXML(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21385 : {
21386 392 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21387 392 : JSObject *callee = nsnull;
21388 : nsIXMLHttpRequest *self;
21389 784 : xpc_qsSelfRef selfref;
21390 784 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21391 392 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21392 0 : return JS_FALSE;
21393 : nsresult rv;
21394 784 : nsCOMPtr<nsIDOMDocument> result;
21395 392 : rv = self->GetResponseXML(getter_AddRefs(result));
21396 392 : if (NS_FAILED(rv))
21397 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21398 392 : if (!result) {
21399 0 : *vp = JSVAL_NULL;
21400 0 : return JS_TRUE;
21401 : }
21402 392 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21403 392 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21404 0 : return JS_TRUE;
21405 : }
21406 : // After this point do not use 'result'!
21407 784 : qsObjectHelper helper(result, cache);
21408 392 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
21409 : }
21410 :
21411 : static JSBool
21412 351 : nsIXMLHttpRequest_GetResponseText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21413 : {
21414 351 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21415 : nsIXMLHttpRequest *self;
21416 702 : xpc_qsSelfRef selfref;
21417 351 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21418 0 : return JS_FALSE;
21419 : nsresult rv;
21420 702 : nsString result;
21421 351 : rv = self->GetResponseText(result);
21422 351 : if (NS_FAILED(rv))
21423 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21424 351 : return xpc::StringToJsval(cx, result, vp);
21425 : }
21426 :
21427 : static JSBool
21428 0 : nsIXMLHttpRequest_GetResponseType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21429 : {
21430 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21431 : nsIXMLHttpRequest *self;
21432 0 : xpc_qsSelfRef selfref;
21433 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21434 0 : return JS_FALSE;
21435 : nsresult rv;
21436 0 : nsString result;
21437 0 : rv = self->GetResponseType(result);
21438 0 : if (NS_FAILED(rv))
21439 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21440 0 : return xpc::StringToJsval(cx, result, vp);
21441 : }
21442 :
21443 : static JSBool
21444 1 : nsIXMLHttpRequest_SetResponseType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21445 : {
21446 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21447 : nsIXMLHttpRequest *self;
21448 2 : xpc_qsSelfRef selfref;
21449 2 : JS::AutoValueRooter tvr(cx);
21450 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21451 0 : return JS_FALSE;
21452 2 : xpc_qsAString arg0(cx, *vp, vp);
21453 1 : if (!arg0.IsValid())
21454 0 : return JS_FALSE;
21455 : nsresult rv;
21456 1 : rv = self->SetResponseType(arg0);
21457 1 : if (NS_FAILED(rv))
21458 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21459 1 : return JS_TRUE;
21460 : }
21461 :
21462 : static JSBool
21463 0 : nsIXMLHttpRequest_GetResponse(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21464 : {
21465 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21466 : nsIXMLHttpRequest *self;
21467 0 : xpc_qsSelfRef selfref;
21468 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21469 0 : return JS_FALSE;
21470 : nsresult rv;
21471 0 : rv = self->GetResponse(cx, vp);
21472 0 : if (NS_FAILED(rv))
21473 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21474 0 : return JS_TRUE;
21475 : }
21476 :
21477 : static JSBool
21478 538 : nsIXMLHttpRequest_GetStatus(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21479 : {
21480 538 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21481 : nsIXMLHttpRequest *self;
21482 1076 : xpc_qsSelfRef selfref;
21483 538 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21484 0 : return JS_FALSE;
21485 : nsresult rv;
21486 : PRUint32 result;
21487 538 : rv = self->GetStatus(&result);
21488 538 : if (NS_FAILED(rv))
21489 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21490 538 : *vp = UINT_TO_JSVAL(result);
21491 538 : return JS_TRUE;
21492 : }
21493 :
21494 : static JSBool
21495 12 : nsIXMLHttpRequest_Abort(JSContext *cx, unsigned argc, jsval *vp)
21496 : {
21497 12 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21498 12 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21499 12 : if (!obj)
21500 0 : return JS_FALSE;
21501 : nsIXMLHttpRequest *self;
21502 24 : xpc_qsSelfRef selfref;
21503 12 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21504 0 : return JS_FALSE;
21505 : nsresult rv;
21506 12 : rv = self->Abort();
21507 12 : if (NS_FAILED(rv))
21508 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21509 12 : *vp = JSVAL_VOID;
21510 12 : return JS_TRUE;
21511 : }
21512 :
21513 : static JSBool
21514 597 : nsIXMLHttpRequest_Open(JSContext *cx, unsigned argc, jsval *vp)
21515 : {
21516 597 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21517 597 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21518 597 : if (!obj)
21519 0 : return JS_FALSE;
21520 : nsIXMLHttpRequest *self;
21521 1194 : xpc_qsSelfRef selfref;
21522 597 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21523 0 : return JS_FALSE;
21524 597 : if (argc < 2)
21525 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
21526 597 : jsval *argv = JS_ARGV(cx, vp);
21527 1194 : xpc_qsAUTF8String arg0(cx, argv[0], &argv[0]);
21528 597 : if (!arg0.IsValid())
21529 0 : return JS_FALSE;
21530 1194 : xpc_qsAUTF8String arg1(cx, argv[1], &argv[1]);
21531 597 : if (!arg1.IsValid())
21532 0 : return JS_FALSE;
21533 : JSBool arg2;
21534 597 : JS_ValueToBoolean(cx, (2 < argc ? argv[2] : JSVAL_NULL), &arg2);
21535 : xpc_qsDOMString arg3(cx, (3 < argc ? argv[3] : JSVAL_NULL), (3 < argc ? &argv[3] : NULL),
21536 : xpc_qsDOMString::eDefaultNullBehavior,
21537 1194 : xpc_qsDOMString::eEmpty);
21538 597 : if (!arg3.IsValid())
21539 0 : return JS_FALSE;
21540 : xpc_qsDOMString arg4(cx, (4 < argc ? argv[4] : JSVAL_NULL), (4 < argc ? &argv[4] : NULL),
21541 : xpc_qsDOMString::eDefaultNullBehavior,
21542 1194 : xpc_qsDOMString::eEmpty);
21543 597 : if (!arg4.IsValid())
21544 0 : return JS_FALSE;
21545 : nsresult rv;
21546 597 : rv = self->Open(arg0, arg1, arg2, arg3, arg4, NS_MIN<PRUint32>(argc, 5) - 2);
21547 597 : if (NS_FAILED(rv))
21548 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21549 597 : *vp = JSVAL_VOID;
21550 597 : return JS_TRUE;
21551 : }
21552 :
21553 : static JSBool
21554 596 : nsIXMLHttpRequest_Send(JSContext *cx, unsigned argc, jsval *vp)
21555 : {
21556 596 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21557 596 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21558 596 : if (!obj)
21559 0 : return JS_FALSE;
21560 1192 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
21561 : nsIXMLHttpRequest *self;
21562 1192 : xpc_qsSelfRef selfref;
21563 596 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
21564 0 : return JS_FALSE;
21565 596 : jsval *argv = JS_ARGV(cx, vp);
21566 1192 : nsCOMPtr<nsIVariant> arg0(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (0 < argc ? argv[0] : JSVAL_NULL))));
21567 596 : if (!arg0) {
21568 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 0);
21569 0 : return JS_FALSE;
21570 : } nsresult rv;
21571 596 : rv = self->Send(arg0);
21572 596 : if (NS_FAILED(rv))
21573 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
21574 596 : *vp = JSVAL_VOID;
21575 596 : return JS_TRUE;
21576 : }
21577 :
21578 : static JSBool
21579 0 : nsIXMLHttpRequest_SendAsBinary(JSContext *cx, unsigned argc, jsval *vp)
21580 : {
21581 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21582 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21583 0 : if (!obj)
21584 0 : return JS_FALSE;
21585 : nsIXMLHttpRequest *self;
21586 0 : xpc_qsSelfRef selfref;
21587 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21588 0 : return JS_FALSE;
21589 0 : if (argc < 1)
21590 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
21591 0 : jsval *argv = JS_ARGV(cx, vp);
21592 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
21593 : xpc_qsDOMString::eDefaultNullBehavior,
21594 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
21595 0 : if (!arg0.IsValid())
21596 0 : return JS_FALSE;
21597 : nsresult rv;
21598 0 : rv = self->SendAsBinary(arg0);
21599 0 : if (NS_FAILED(rv))
21600 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21601 0 : *vp = JSVAL_VOID;
21602 0 : return JS_TRUE;
21603 : }
21604 :
21605 : static JSBool
21606 0 : nsIXMLHttpRequest_GetTimeout(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21607 : {
21608 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21609 : nsIXMLHttpRequest *self;
21610 0 : xpc_qsSelfRef selfref;
21611 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21612 0 : return JS_FALSE;
21613 : nsresult rv;
21614 : PRUint32 result;
21615 0 : rv = self->GetTimeout(&result);
21616 0 : if (NS_FAILED(rv))
21617 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21618 0 : *vp = UINT_TO_JSVAL(result);
21619 0 : return JS_TRUE;
21620 : }
21621 :
21622 : static JSBool
21623 0 : nsIXMLHttpRequest_SetTimeout(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21624 : {
21625 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21626 : nsIXMLHttpRequest *self;
21627 0 : xpc_qsSelfRef selfref;
21628 0 : JS::AutoValueRooter tvr(cx);
21629 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21630 0 : return JS_FALSE;
21631 : uint32_t arg0;
21632 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
21633 0 : return JS_FALSE;
21634 : nsresult rv;
21635 0 : rv = self->SetTimeout(arg0);
21636 0 : if (NS_FAILED(rv))
21637 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21638 0 : return JS_TRUE;
21639 : }
21640 :
21641 : static JSBool
21642 56 : nsIXMLHttpRequest_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21643 : {
21644 56 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21645 : nsIXMLHttpRequest *self;
21646 112 : xpc_qsSelfRef selfref;
21647 56 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21648 0 : return JS_FALSE;
21649 : nsresult rv;
21650 : PRUint16 result;
21651 56 : rv = self->GetReadyState(&result);
21652 56 : if (NS_FAILED(rv))
21653 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21654 56 : *vp = INT_TO_JSVAL((int32_t) result);
21655 56 : return JS_TRUE;
21656 : }
21657 :
21658 : static JSBool
21659 0 : nsIXMLHttpRequest_GetMultipart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21660 : {
21661 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21662 : nsIXMLHttpRequest *self;
21663 0 : xpc_qsSelfRef selfref;
21664 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21665 0 : return JS_FALSE;
21666 : nsresult rv;
21667 : bool result;
21668 0 : rv = self->GetMultipart(&result);
21669 0 : if (NS_FAILED(rv))
21670 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21671 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
21672 0 : return JS_TRUE;
21673 : }
21674 :
21675 : static JSBool
21676 0 : nsIXMLHttpRequest_SetMultipart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21677 : {
21678 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21679 : nsIXMLHttpRequest *self;
21680 0 : xpc_qsSelfRef selfref;
21681 0 : JS::AutoValueRooter tvr(cx);
21682 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21683 0 : return JS_FALSE;
21684 : JSBool arg0;
21685 0 : JS_ValueToBoolean(cx, *vp, &arg0);
21686 : nsresult rv;
21687 0 : rv = self->SetMultipart(arg0);
21688 0 : if (NS_FAILED(rv))
21689 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21690 0 : return JS_TRUE;
21691 : }
21692 :
21693 : static JSBool
21694 0 : nsIXMLHttpRequest_GetMozBackgroundRequest(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21695 : {
21696 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21697 : nsIXMLHttpRequest *self;
21698 0 : xpc_qsSelfRef selfref;
21699 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21700 0 : return JS_FALSE;
21701 : nsresult rv;
21702 : bool result;
21703 0 : rv = self->GetMozBackgroundRequest(&result);
21704 0 : if (NS_FAILED(rv))
21705 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21706 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
21707 0 : return JS_TRUE;
21708 : }
21709 :
21710 : static JSBool
21711 87 : nsIXMLHttpRequest_SetMozBackgroundRequest(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21712 : {
21713 87 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21714 : nsIXMLHttpRequest *self;
21715 174 : xpc_qsSelfRef selfref;
21716 174 : JS::AutoValueRooter tvr(cx);
21717 87 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21718 0 : return JS_FALSE;
21719 : JSBool arg0;
21720 87 : JS_ValueToBoolean(cx, *vp, &arg0);
21721 : nsresult rv;
21722 87 : rv = self->SetMozBackgroundRequest(arg0);
21723 87 : if (NS_FAILED(rv))
21724 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21725 87 : return JS_TRUE;
21726 : }
21727 :
21728 : static JSBool
21729 0 : nsIXMLHttpRequest_GetWithCredentials(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21730 : {
21731 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21732 : nsIXMLHttpRequest *self;
21733 0 : xpc_qsSelfRef selfref;
21734 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21735 0 : return JS_FALSE;
21736 : nsresult rv;
21737 : bool result;
21738 0 : rv = self->GetWithCredentials(&result);
21739 0 : if (NS_FAILED(rv))
21740 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21741 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
21742 0 : return JS_TRUE;
21743 : }
21744 :
21745 : static JSBool
21746 1 : nsIXMLHttpRequest_SetWithCredentials(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21747 : {
21748 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21749 : nsIXMLHttpRequest *self;
21750 2 : xpc_qsSelfRef selfref;
21751 2 : JS::AutoValueRooter tvr(cx);
21752 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21753 0 : return JS_FALSE;
21754 : JSBool arg0;
21755 1 : JS_ValueToBoolean(cx, *vp, &arg0);
21756 : nsresult rv;
21757 1 : rv = self->SetWithCredentials(arg0);
21758 1 : if (NS_FAILED(rv))
21759 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21760 1 : return JS_TRUE;
21761 : }
21762 :
21763 : static JSBool
21764 0 : nsIXMLHttpRequest_GetOnreadystatechange(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21765 : {
21766 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21767 0 : JSObject *callee = nsnull;
21768 : nsIXMLHttpRequest *self;
21769 0 : xpc_qsSelfRef selfref;
21770 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21771 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21772 0 : return JS_FALSE;
21773 : nsresult rv;
21774 0 : nsCOMPtr<nsIDOMEventListener> result;
21775 0 : rv = self->GetOnreadystatechange(getter_AddRefs(result));
21776 0 : if (NS_FAILED(rv))
21777 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21778 0 : if (!result) {
21779 0 : *vp = JSVAL_NULL;
21780 0 : return JS_TRUE;
21781 : }
21782 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21783 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21784 0 : return JS_TRUE;
21785 : }
21786 : // After this point do not use 'result'!
21787 0 : qsObjectHelper helper(result, cache);
21788 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21789 : }
21790 :
21791 : static JSBool
21792 0 : nsIXMLHttpRequest_SetOnreadystatechange(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21793 : {
21794 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21795 : nsIXMLHttpRequest *self;
21796 0 : xpc_qsSelfRef selfref;
21797 0 : JS::AutoValueRooter tvr(cx);
21798 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21799 0 : return JS_FALSE;
21800 : nsresult rv;
21801 : nsIDOMEventListener *arg0;
21802 0 : xpc_qsSelfRef arg0ref;
21803 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21804 0 : if (NS_FAILED(rv)) {
21805 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21806 0 : return JS_FALSE;
21807 : }
21808 0 : rv = self->SetOnreadystatechange(arg0);
21809 0 : if (NS_FAILED(rv))
21810 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21811 0 : return JS_TRUE;
21812 : }
21813 :
21814 : // === interface nsIWebSocket
21815 :
21816 : static JSBool
21817 0 : nsIWebSocket_GetUrl(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21818 : {
21819 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21820 : nsIWebSocket *self;
21821 0 : xpc_qsSelfRef selfref;
21822 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21823 0 : return JS_FALSE;
21824 : nsresult rv;
21825 0 : nsString result;
21826 0 : rv = self->GetUrl(result);
21827 0 : if (NS_FAILED(rv))
21828 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21829 0 : return xpc::StringToJsval(cx, result, vp);
21830 : }
21831 :
21832 : static JSBool
21833 0 : nsIWebSocket_GetExtensions(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21834 : {
21835 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21836 : nsIWebSocket *self;
21837 0 : xpc_qsSelfRef selfref;
21838 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21839 0 : return JS_FALSE;
21840 : nsresult rv;
21841 0 : nsString result;
21842 0 : rv = self->GetExtensions(result);
21843 0 : if (NS_FAILED(rv))
21844 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21845 0 : return xpc::StringToJsval(cx, result, vp);
21846 : }
21847 :
21848 : static JSBool
21849 0 : nsIWebSocket_GetProtocol(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21850 : {
21851 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21852 : nsIWebSocket *self;
21853 0 : xpc_qsSelfRef selfref;
21854 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21855 0 : return JS_FALSE;
21856 : nsresult rv;
21857 0 : nsString result;
21858 0 : rv = self->GetProtocol(result);
21859 0 : if (NS_FAILED(rv))
21860 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21861 0 : return xpc::StringToJsval(cx, result, vp);
21862 : }
21863 :
21864 : static JSBool
21865 0 : nsIWebSocket_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21866 : {
21867 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21868 : nsIWebSocket *self;
21869 0 : xpc_qsSelfRef selfref;
21870 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21871 0 : return JS_FALSE;
21872 : nsresult rv;
21873 : PRUint16 result;
21874 0 : rv = self->GetReadyState(&result);
21875 0 : if (NS_FAILED(rv))
21876 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21877 0 : *vp = INT_TO_JSVAL((int32_t) result);
21878 0 : return JS_TRUE;
21879 : }
21880 :
21881 : static JSBool
21882 0 : nsIWebSocket_GetBufferedAmount(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21883 : {
21884 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21885 : nsIWebSocket *self;
21886 0 : xpc_qsSelfRef selfref;
21887 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21888 0 : return JS_FALSE;
21889 : nsresult rv;
21890 : PRUint32 result;
21891 0 : rv = self->GetBufferedAmount(&result);
21892 0 : if (NS_FAILED(rv))
21893 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21894 0 : *vp = UINT_TO_JSVAL(result);
21895 0 : return JS_TRUE;
21896 : }
21897 :
21898 : static JSBool
21899 0 : nsIWebSocket_GetBinaryType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21900 : {
21901 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21902 : nsIWebSocket *self;
21903 0 : xpc_qsSelfRef selfref;
21904 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21905 0 : return JS_FALSE;
21906 : nsresult rv;
21907 0 : nsString result;
21908 0 : rv = self->GetBinaryType(result);
21909 0 : if (NS_FAILED(rv))
21910 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21911 0 : return xpc::StringToJsval(cx, result, vp);
21912 : }
21913 :
21914 : static JSBool
21915 0 : nsIWebSocket_SetBinaryType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21916 : {
21917 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21918 : nsIWebSocket *self;
21919 0 : xpc_qsSelfRef selfref;
21920 0 : JS::AutoValueRooter tvr(cx);
21921 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21922 0 : return JS_FALSE;
21923 : xpc_qsDOMString arg0(cx, *vp, vp,
21924 : xpc_qsDOMString::eDefaultNullBehavior,
21925 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
21926 0 : if (!arg0.IsValid())
21927 0 : return JS_FALSE;
21928 : nsresult rv;
21929 0 : rv = self->SetBinaryType(arg0);
21930 0 : if (NS_FAILED(rv))
21931 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21932 0 : return JS_TRUE;
21933 : }
21934 :
21935 : static JSBool
21936 0 : nsIWebSocket_GetOnopen(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21937 : {
21938 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21939 0 : JSObject *callee = nsnull;
21940 : nsIWebSocket *self;
21941 0 : xpc_qsSelfRef selfref;
21942 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21943 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21944 0 : return JS_FALSE;
21945 : nsresult rv;
21946 0 : nsCOMPtr<nsIDOMEventListener> result;
21947 0 : rv = self->GetOnopen(getter_AddRefs(result));
21948 0 : if (NS_FAILED(rv))
21949 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21950 0 : if (!result) {
21951 0 : *vp = JSVAL_NULL;
21952 0 : return JS_TRUE;
21953 : }
21954 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21955 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21956 0 : return JS_TRUE;
21957 : }
21958 : // After this point do not use 'result'!
21959 0 : qsObjectHelper helper(result, cache);
21960 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21961 : }
21962 :
21963 : static JSBool
21964 0 : nsIWebSocket_SetOnopen(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21965 : {
21966 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21967 : nsIWebSocket *self;
21968 0 : xpc_qsSelfRef selfref;
21969 0 : JS::AutoValueRooter tvr(cx);
21970 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21971 0 : return JS_FALSE;
21972 : nsresult rv;
21973 : nsIDOMEventListener *arg0;
21974 0 : xpc_qsSelfRef arg0ref;
21975 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21976 0 : if (NS_FAILED(rv)) {
21977 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21978 0 : return JS_FALSE;
21979 : }
21980 0 : rv = self->SetOnopen(arg0);
21981 0 : if (NS_FAILED(rv))
21982 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21983 0 : return JS_TRUE;
21984 : }
21985 :
21986 : static JSBool
21987 0 : nsIWebSocket_GetOnmessage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21988 : {
21989 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21990 0 : JSObject *callee = nsnull;
21991 : nsIWebSocket *self;
21992 0 : xpc_qsSelfRef selfref;
21993 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21994 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21995 0 : return JS_FALSE;
21996 : nsresult rv;
21997 0 : nsCOMPtr<nsIDOMEventListener> result;
21998 0 : rv = self->GetOnmessage(getter_AddRefs(result));
21999 0 : if (NS_FAILED(rv))
22000 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22001 0 : if (!result) {
22002 0 : *vp = JSVAL_NULL;
22003 0 : return JS_TRUE;
22004 : }
22005 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22006 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22007 0 : return JS_TRUE;
22008 : }
22009 : // After this point do not use 'result'!
22010 0 : qsObjectHelper helper(result, cache);
22011 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
22012 : }
22013 :
22014 : static JSBool
22015 0 : nsIWebSocket_SetOnmessage(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
22016 : {
22017 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22018 : nsIWebSocket *self;
22019 0 : xpc_qsSelfRef selfref;
22020 0 : JS::AutoValueRooter tvr(cx);
22021 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
22022 0 : return JS_FALSE;
22023 : nsresult rv;
22024 : nsIDOMEventListener *arg0;
22025 0 : xpc_qsSelfRef arg0ref;
22026 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
22027 0 : if (NS_FAILED(rv)) {
22028 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22029 0 : return JS_FALSE;
22030 : }
22031 0 : rv = self->SetOnmessage(arg0);
22032 0 : if (NS_FAILED(rv))
22033 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22034 0 : return JS_TRUE;
22035 : }
22036 :
22037 : static JSBool
22038 0 : nsIWebSocket_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
22039 : {
22040 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22041 0 : JSObject *callee = nsnull;
22042 : nsIWebSocket *self;
22043 0 : xpc_qsSelfRef selfref;
22044 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22045 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22046 0 : return JS_FALSE;
22047 : nsresult rv;
22048 0 : nsCOMPtr<nsIDOMEventListener> result;
22049 0 : rv = self->GetOnerror(getter_AddRefs(result));
22050 0 : if (NS_FAILED(rv))
22051 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22052 0 : if (!result) {
22053 0 : *vp = JSVAL_NULL;
22054 0 : return JS_TRUE;
22055 : }
22056 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22057 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22058 0 : return JS_TRUE;
22059 : }
22060 : // After this point do not use 'result'!
22061 0 : qsObjectHelper helper(result, cache);
22062 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
22063 : }
22064 :
22065 : static JSBool
22066 0 : nsIWebSocket_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
22067 : {
22068 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22069 : nsIWebSocket *self;
22070 0 : xpc_qsSelfRef selfref;
22071 0 : JS::AutoValueRooter tvr(cx);
22072 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
22073 0 : return JS_FALSE;
22074 : nsresult rv;
22075 : nsIDOMEventListener *arg0;
22076 0 : xpc_qsSelfRef arg0ref;
22077 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
22078 0 : if (NS_FAILED(rv)) {
22079 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22080 0 : return JS_FALSE;
22081 : }
22082 0 : rv = self->SetOnerror(arg0);
22083 0 : if (NS_FAILED(rv))
22084 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22085 0 : return JS_TRUE;
22086 : }
22087 :
22088 : static JSBool
22089 0 : nsIWebSocket_GetOnclose(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
22090 : {
22091 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22092 0 : JSObject *callee = nsnull;
22093 : nsIWebSocket *self;
22094 0 : xpc_qsSelfRef selfref;
22095 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22096 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22097 0 : return JS_FALSE;
22098 : nsresult rv;
22099 0 : nsCOMPtr<nsIDOMEventListener> result;
22100 0 : rv = self->GetOnclose(getter_AddRefs(result));
22101 0 : if (NS_FAILED(rv))
22102 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22103 0 : if (!result) {
22104 0 : *vp = JSVAL_NULL;
22105 0 : return JS_TRUE;
22106 : }
22107 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22108 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22109 0 : return JS_TRUE;
22110 : }
22111 : // After this point do not use 'result'!
22112 0 : qsObjectHelper helper(result, cache);
22113 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
22114 : }
22115 :
22116 : static JSBool
22117 0 : nsIWebSocket_SetOnclose(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
22118 : {
22119 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22120 : nsIWebSocket *self;
22121 0 : xpc_qsSelfRef selfref;
22122 0 : JS::AutoValueRooter tvr(cx);
22123 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
22124 0 : return JS_FALSE;
22125 : nsresult rv;
22126 : nsIDOMEventListener *arg0;
22127 0 : xpc_qsSelfRef arg0ref;
22128 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
22129 0 : if (NS_FAILED(rv)) {
22130 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22131 0 : return JS_FALSE;
22132 : }
22133 0 : rv = self->SetOnclose(arg0);
22134 0 : if (NS_FAILED(rv))
22135 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22136 0 : return JS_TRUE;
22137 : }
22138 :
22139 : static JSBool
22140 0 : nsIWebSocket_Send(JSContext *cx, unsigned argc, jsval *vp)
22141 : {
22142 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22143 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22144 0 : if (!obj)
22145 0 : return JS_FALSE;
22146 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
22147 : nsIWebSocket *self;
22148 0 : xpc_qsSelfRef selfref;
22149 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
22150 0 : return JS_FALSE;
22151 0 : if (argc < 1)
22152 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22153 0 : jsval *argv = JS_ARGV(cx, vp);
22154 0 : nsCOMPtr<nsIVariant> arg0(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, argv[0])));
22155 0 : if (!arg0) {
22156 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 0);
22157 0 : return JS_FALSE;
22158 : } nsresult rv;
22159 0 : rv = self->Send(arg0);
22160 0 : if (NS_FAILED(rv))
22161 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
22162 0 : *vp = JSVAL_VOID;
22163 0 : return JS_TRUE;
22164 : }
22165 :
22166 : static JSBool
22167 0 : nsIWebSocket_Close(JSContext *cx, unsigned argc, jsval *vp)
22168 : {
22169 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22170 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22171 0 : if (!obj)
22172 0 : return JS_FALSE;
22173 : nsIWebSocket *self;
22174 0 : xpc_qsSelfRef selfref;
22175 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22176 0 : return JS_FALSE;
22177 0 : jsval *argv = JS_ARGV(cx, vp);
22178 : uint32_t arg0_u32;
22179 0 : if (!JS_ValueToECMAUint32(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0_u32))
22180 0 : return JS_FALSE;
22181 0 : uint16_t arg0 = (uint16_t) arg0_u32;
22182 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
22183 : xpc_qsDOMString::eDefaultNullBehavior,
22184 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
22185 0 : if (!arg1.IsValid())
22186 0 : return JS_FALSE;
22187 : nsresult rv;
22188 0 : rv = self->Close(arg0, arg1, NS_MIN<PRUint32>(argc, 2) - 0);
22189 0 : if (NS_FAILED(rv))
22190 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22191 0 : *vp = JSVAL_VOID;
22192 0 : return JS_TRUE;
22193 : }
22194 :
22195 : // === interface nsIDOMWebGLRenderingContext
22196 :
22197 : static JSBool
22198 0 : nsIDOMWebGLRenderingContext_GetCanvas(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
22199 : {
22200 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22201 0 : JSObject *callee = nsnull;
22202 : nsIDOMWebGLRenderingContext *self;
22203 0 : xpc_qsSelfRef selfref;
22204 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22205 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22206 0 : return JS_FALSE;
22207 : nsresult rv;
22208 0 : nsCOMPtr<nsIDOMHTMLCanvasElement> result;
22209 0 : rv = self->GetCanvas(getter_AddRefs(result));
22210 0 : if (NS_FAILED(rv))
22211 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22212 0 : if (!result) {
22213 0 : *vp = JSVAL_NULL;
22214 0 : return JS_TRUE;
22215 : }
22216 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22217 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22218 0 : return JS_TRUE;
22219 : }
22220 : // After this point do not use 'result'!
22221 0 : qsObjectHelper helper(result, cache);
22222 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCanvasElement), &interfaces[k_nsIDOMHTMLCanvasElement], vp);
22223 : }
22224 :
22225 : static JSBool
22226 0 : nsIDOMWebGLRenderingContext_ActiveTexture(JSContext *cx, unsigned argc, jsval *vp)
22227 : {
22228 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22229 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22230 0 : if (!obj)
22231 0 : return JS_FALSE;
22232 : nsIDOMWebGLRenderingContext *self;
22233 0 : xpc_qsSelfRef selfref;
22234 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22235 0 : return JS_FALSE;
22236 0 : if (argc < 1)
22237 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22238 0 : jsval *argv = JS_ARGV(cx, vp);
22239 : uint32_t arg0;
22240 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22241 0 : return JS_FALSE;
22242 : nsresult rv;
22243 0 : rv = self->ActiveTexture(arg0);
22244 0 : if (NS_FAILED(rv))
22245 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22246 0 : *vp = JSVAL_VOID;
22247 0 : return JS_TRUE;
22248 : }
22249 :
22250 : static JSBool
22251 0 : nsIDOMWebGLRenderingContext_AttachShader(JSContext *cx, unsigned argc, jsval *vp)
22252 : {
22253 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22254 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22255 0 : if (!obj)
22256 0 : return JS_FALSE;
22257 : nsIDOMWebGLRenderingContext *self;
22258 0 : xpc_qsSelfRef selfref;
22259 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22260 0 : return JS_FALSE;
22261 0 : jsval *argv = JS_ARGV(cx, vp);
22262 : nsresult rv;
22263 : nsIWebGLProgram *arg0;
22264 0 : xpc_qsSelfRef arg0ref;
22265 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
22266 0 : if (NS_FAILED(rv)) {
22267 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
22268 0 : return JS_FALSE;
22269 : }
22270 : nsIWebGLShader *arg1;
22271 0 : xpc_qsSelfRef arg1ref;
22272 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1, &arg1ref.ptr, (1 < argc ? &argv[1] : NULL));
22273 0 : if (NS_FAILED(rv)) {
22274 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22275 0 : return JS_FALSE;
22276 : }
22277 0 : rv = self->AttachShader(arg0, arg1);
22278 0 : if (NS_FAILED(rv))
22279 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22280 0 : *vp = JSVAL_VOID;
22281 0 : return JS_TRUE;
22282 : }
22283 :
22284 : static JSBool
22285 0 : nsIDOMWebGLRenderingContext_BindAttribLocation(JSContext *cx, unsigned argc, jsval *vp)
22286 : {
22287 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22288 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22289 0 : if (!obj)
22290 0 : return JS_FALSE;
22291 : nsIDOMWebGLRenderingContext *self;
22292 0 : xpc_qsSelfRef selfref;
22293 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22294 0 : return JS_FALSE;
22295 0 : if (argc < 3)
22296 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22297 0 : jsval *argv = JS_ARGV(cx, vp);
22298 : nsresult rv;
22299 : nsIWebGLProgram *arg0;
22300 0 : xpc_qsSelfRef arg0ref;
22301 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
22302 0 : if (NS_FAILED(rv)) {
22303 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
22304 0 : return JS_FALSE;
22305 : }
22306 : uint32_t arg1;
22307 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22308 0 : return JS_FALSE;
22309 0 : xpc_qsDOMString arg2(cx, argv[2], &argv[2],
22310 : xpc_qsDOMString::eDefaultNullBehavior,
22311 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
22312 0 : if (!arg2.IsValid())
22313 0 : return JS_FALSE;
22314 0 : rv = self->BindAttribLocation(arg0, arg1, arg2);
22315 0 : if (NS_FAILED(rv))
22316 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22317 0 : *vp = JSVAL_VOID;
22318 0 : return JS_TRUE;
22319 : }
22320 :
22321 : static JSBool
22322 0 : nsIDOMWebGLRenderingContext_BindBuffer(JSContext *cx, unsigned argc, jsval *vp)
22323 : {
22324 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22325 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22326 0 : if (!obj)
22327 0 : return JS_FALSE;
22328 : nsIDOMWebGLRenderingContext *self;
22329 0 : xpc_qsSelfRef selfref;
22330 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22331 0 : return JS_FALSE;
22332 0 : if (argc < 2)
22333 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22334 0 : jsval *argv = JS_ARGV(cx, vp);
22335 : uint32_t arg0;
22336 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22337 0 : return JS_FALSE;
22338 : nsresult rv;
22339 : nsIWebGLBuffer *arg1;
22340 0 : xpc_qsSelfRef arg1ref;
22341 0 : rv = xpc_qsUnwrapArg<nsIWebGLBuffer>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22342 0 : if (NS_FAILED(rv)) {
22343 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22344 0 : return JS_FALSE;
22345 : }
22346 0 : rv = self->BindBuffer(arg0, arg1);
22347 0 : if (NS_FAILED(rv))
22348 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22349 0 : *vp = JSVAL_VOID;
22350 0 : return JS_TRUE;
22351 : }
22352 :
22353 : static JSBool
22354 0 : nsIDOMWebGLRenderingContext_BindFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
22355 : {
22356 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22357 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22358 0 : if (!obj)
22359 0 : return JS_FALSE;
22360 : nsIDOMWebGLRenderingContext *self;
22361 0 : xpc_qsSelfRef selfref;
22362 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22363 0 : return JS_FALSE;
22364 0 : if (argc < 2)
22365 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22366 0 : jsval *argv = JS_ARGV(cx, vp);
22367 : uint32_t arg0;
22368 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22369 0 : return JS_FALSE;
22370 : nsresult rv;
22371 : nsIWebGLFramebuffer *arg1;
22372 0 : xpc_qsSelfRef arg1ref;
22373 0 : rv = xpc_qsUnwrapArg<nsIWebGLFramebuffer>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22374 0 : if (NS_FAILED(rv)) {
22375 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22376 0 : return JS_FALSE;
22377 : }
22378 0 : rv = self->BindFramebuffer(arg0, arg1);
22379 0 : if (NS_FAILED(rv))
22380 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22381 0 : *vp = JSVAL_VOID;
22382 0 : return JS_TRUE;
22383 : }
22384 :
22385 : static JSBool
22386 0 : nsIDOMWebGLRenderingContext_BindRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
22387 : {
22388 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22389 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22390 0 : if (!obj)
22391 0 : return JS_FALSE;
22392 : nsIDOMWebGLRenderingContext *self;
22393 0 : xpc_qsSelfRef selfref;
22394 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22395 0 : return JS_FALSE;
22396 0 : if (argc < 2)
22397 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22398 0 : jsval *argv = JS_ARGV(cx, vp);
22399 : uint32_t arg0;
22400 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22401 0 : return JS_FALSE;
22402 : nsresult rv;
22403 : nsIWebGLRenderbuffer *arg1;
22404 0 : xpc_qsSelfRef arg1ref;
22405 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22406 0 : if (NS_FAILED(rv)) {
22407 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22408 0 : return JS_FALSE;
22409 : }
22410 0 : rv = self->BindRenderbuffer(arg0, arg1);
22411 0 : if (NS_FAILED(rv))
22412 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22413 0 : *vp = JSVAL_VOID;
22414 0 : return JS_TRUE;
22415 : }
22416 :
22417 : static JSBool
22418 0 : nsIDOMWebGLRenderingContext_BindTexture(JSContext *cx, unsigned argc, jsval *vp)
22419 : {
22420 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22421 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22422 0 : if (!obj)
22423 0 : return JS_FALSE;
22424 : nsIDOMWebGLRenderingContext *self;
22425 0 : xpc_qsSelfRef selfref;
22426 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22427 0 : return JS_FALSE;
22428 0 : if (argc < 2)
22429 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22430 0 : jsval *argv = JS_ARGV(cx, vp);
22431 : uint32_t arg0;
22432 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22433 0 : return JS_FALSE;
22434 : nsresult rv;
22435 : nsIWebGLTexture *arg1;
22436 0 : xpc_qsSelfRef arg1ref;
22437 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22438 0 : if (NS_FAILED(rv)) {
22439 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22440 0 : return JS_FALSE;
22441 : }
22442 0 : rv = self->BindTexture(arg0, arg1);
22443 0 : if (NS_FAILED(rv))
22444 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22445 0 : *vp = JSVAL_VOID;
22446 0 : return JS_TRUE;
22447 : }
22448 :
22449 : static JSBool
22450 0 : nsIDOMWebGLRenderingContext_BlendColor(JSContext *cx, unsigned argc, jsval *vp)
22451 : {
22452 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22453 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22454 0 : if (!obj)
22455 0 : return JS_FALSE;
22456 : nsIDOMWebGLRenderingContext *self;
22457 0 : xpc_qsSelfRef selfref;
22458 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22459 0 : return JS_FALSE;
22460 0 : if (argc < 4)
22461 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22462 0 : jsval *argv = JS_ARGV(cx, vp);
22463 : double arg0_dbl;
22464 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
22465 0 : return JS_FALSE;
22466 0 : float arg0 = (float) arg0_dbl;
22467 : double arg1_dbl;
22468 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
22469 0 : return JS_FALSE;
22470 0 : float arg1 = (float) arg1_dbl;
22471 : double arg2_dbl;
22472 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
22473 0 : return JS_FALSE;
22474 0 : float arg2 = (float) arg2_dbl;
22475 : double arg3_dbl;
22476 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
22477 0 : return JS_FALSE;
22478 0 : float arg3 = (float) arg3_dbl;
22479 : nsresult rv;
22480 0 : rv = self->BlendColor(arg0, arg1, arg2, arg3);
22481 0 : if (NS_FAILED(rv))
22482 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22483 0 : *vp = JSVAL_VOID;
22484 0 : return JS_TRUE;
22485 : }
22486 :
22487 : static JSBool
22488 0 : nsIDOMWebGLRenderingContext_BlendEquation(JSContext *cx, unsigned argc, jsval *vp)
22489 : {
22490 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22491 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22492 0 : if (!obj)
22493 0 : return JS_FALSE;
22494 : nsIDOMWebGLRenderingContext *self;
22495 0 : xpc_qsSelfRef selfref;
22496 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22497 0 : return JS_FALSE;
22498 0 : if (argc < 1)
22499 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22500 0 : jsval *argv = JS_ARGV(cx, vp);
22501 : uint32_t arg0;
22502 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22503 0 : return JS_FALSE;
22504 : nsresult rv;
22505 0 : rv = self->BlendEquation(arg0);
22506 0 : if (NS_FAILED(rv))
22507 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22508 0 : *vp = JSVAL_VOID;
22509 0 : return JS_TRUE;
22510 : }
22511 :
22512 : static JSBool
22513 0 : nsIDOMWebGLRenderingContext_BlendEquationSeparate(JSContext *cx, unsigned argc, jsval *vp)
22514 : {
22515 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22516 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22517 0 : if (!obj)
22518 0 : return JS_FALSE;
22519 : nsIDOMWebGLRenderingContext *self;
22520 0 : xpc_qsSelfRef selfref;
22521 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22522 0 : return JS_FALSE;
22523 0 : if (argc < 2)
22524 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22525 0 : jsval *argv = JS_ARGV(cx, vp);
22526 : uint32_t arg0;
22527 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22528 0 : return JS_FALSE;
22529 : uint32_t arg1;
22530 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22531 0 : return JS_FALSE;
22532 : nsresult rv;
22533 0 : rv = self->BlendEquationSeparate(arg0, arg1);
22534 0 : if (NS_FAILED(rv))
22535 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22536 0 : *vp = JSVAL_VOID;
22537 0 : return JS_TRUE;
22538 : }
22539 :
22540 : static JSBool
22541 0 : nsIDOMWebGLRenderingContext_BlendFunc(JSContext *cx, unsigned argc, jsval *vp)
22542 : {
22543 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22544 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22545 0 : if (!obj)
22546 0 : return JS_FALSE;
22547 : nsIDOMWebGLRenderingContext *self;
22548 0 : xpc_qsSelfRef selfref;
22549 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22550 0 : return JS_FALSE;
22551 0 : if (argc < 2)
22552 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22553 0 : jsval *argv = JS_ARGV(cx, vp);
22554 : uint32_t arg0;
22555 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22556 0 : return JS_FALSE;
22557 : uint32_t arg1;
22558 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22559 0 : return JS_FALSE;
22560 : nsresult rv;
22561 0 : rv = self->BlendFunc(arg0, arg1);
22562 0 : if (NS_FAILED(rv))
22563 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22564 0 : *vp = JSVAL_VOID;
22565 0 : return JS_TRUE;
22566 : }
22567 :
22568 : static JSBool
22569 0 : nsIDOMWebGLRenderingContext_BlendFuncSeparate(JSContext *cx, unsigned argc, jsval *vp)
22570 : {
22571 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22572 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22573 0 : if (!obj)
22574 0 : return JS_FALSE;
22575 : nsIDOMWebGLRenderingContext *self;
22576 0 : xpc_qsSelfRef selfref;
22577 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22578 0 : return JS_FALSE;
22579 0 : if (argc < 4)
22580 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22581 0 : jsval *argv = JS_ARGV(cx, vp);
22582 : uint32_t arg0;
22583 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22584 0 : return JS_FALSE;
22585 : uint32_t arg1;
22586 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22587 0 : return JS_FALSE;
22588 : uint32_t arg2;
22589 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
22590 0 : return JS_FALSE;
22591 : uint32_t arg3;
22592 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3))
22593 0 : return JS_FALSE;
22594 : nsresult rv;
22595 0 : rv = self->BlendFuncSeparate(arg0, arg1, arg2, arg3);
22596 0 : if (NS_FAILED(rv))
22597 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22598 0 : *vp = JSVAL_VOID;
22599 0 : return JS_TRUE;
22600 : }
22601 :
22602 : static JSBool
22603 0 : nsIDOMWebGLRenderingContext_CheckFramebufferStatus(JSContext *cx, unsigned argc, jsval *vp)
22604 : {
22605 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22606 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22607 0 : if (!obj)
22608 0 : return JS_FALSE;
22609 : nsIDOMWebGLRenderingContext *self;
22610 0 : xpc_qsSelfRef selfref;
22611 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22612 0 : return JS_FALSE;
22613 0 : if (argc < 1)
22614 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22615 0 : jsval *argv = JS_ARGV(cx, vp);
22616 : uint32_t arg0;
22617 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22618 0 : return JS_FALSE;
22619 : nsresult rv;
22620 : WebGLenum result;
22621 0 : rv = self->CheckFramebufferStatus(arg0, &result);
22622 0 : if (NS_FAILED(rv))
22623 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22624 0 : *vp = UINT_TO_JSVAL(result);
22625 0 : return JS_TRUE;
22626 : }
22627 :
22628 : static JSBool
22629 0 : nsIDOMWebGLRenderingContext_Clear(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 < 1)
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 : nsresult rv;
22646 0 : rv = self->Clear(arg0);
22647 0 : if (NS_FAILED(rv))
22648 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22649 0 : *vp = JSVAL_VOID;
22650 0 : return JS_TRUE;
22651 : }
22652 :
22653 : static JSBool
22654 0 : nsIDOMWebGLRenderingContext_ClearColor(JSContext *cx, unsigned argc, jsval *vp)
22655 : {
22656 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22657 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22658 0 : if (!obj)
22659 0 : return JS_FALSE;
22660 : nsIDOMWebGLRenderingContext *self;
22661 0 : xpc_qsSelfRef selfref;
22662 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22663 0 : return JS_FALSE;
22664 0 : if (argc < 4)
22665 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22666 0 : jsval *argv = JS_ARGV(cx, vp);
22667 : double arg0_dbl;
22668 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
22669 0 : return JS_FALSE;
22670 0 : float arg0 = (float) arg0_dbl;
22671 : double arg1_dbl;
22672 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
22673 0 : return JS_FALSE;
22674 0 : float arg1 = (float) arg1_dbl;
22675 : double arg2_dbl;
22676 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
22677 0 : return JS_FALSE;
22678 0 : float arg2 = (float) arg2_dbl;
22679 : double arg3_dbl;
22680 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
22681 0 : return JS_FALSE;
22682 0 : float arg3 = (float) arg3_dbl;
22683 : nsresult rv;
22684 0 : rv = self->ClearColor(arg0, arg1, arg2, arg3);
22685 0 : if (NS_FAILED(rv))
22686 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22687 0 : *vp = JSVAL_VOID;
22688 0 : return JS_TRUE;
22689 : }
22690 :
22691 : static JSBool
22692 0 : nsIDOMWebGLRenderingContext_ClearDepth(JSContext *cx, unsigned argc, jsval *vp)
22693 : {
22694 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22695 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22696 0 : if (!obj)
22697 0 : return JS_FALSE;
22698 : nsIDOMWebGLRenderingContext *self;
22699 0 : xpc_qsSelfRef selfref;
22700 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22701 0 : return JS_FALSE;
22702 0 : if (argc < 1)
22703 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22704 0 : jsval *argv = JS_ARGV(cx, vp);
22705 : double arg0_dbl;
22706 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
22707 0 : return JS_FALSE;
22708 0 : float arg0 = (float) arg0_dbl;
22709 : nsresult rv;
22710 0 : rv = self->ClearDepth(arg0);
22711 0 : if (NS_FAILED(rv))
22712 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22713 0 : *vp = JSVAL_VOID;
22714 0 : return JS_TRUE;
22715 : }
22716 :
22717 : static JSBool
22718 0 : nsIDOMWebGLRenderingContext_ClearStencil(JSContext *cx, unsigned argc, jsval *vp)
22719 : {
22720 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22721 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22722 0 : if (!obj)
22723 0 : return JS_FALSE;
22724 : nsIDOMWebGLRenderingContext *self;
22725 0 : xpc_qsSelfRef selfref;
22726 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22727 0 : return JS_FALSE;
22728 0 : if (argc < 1)
22729 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22730 0 : jsval *argv = JS_ARGV(cx, vp);
22731 : int32_t arg0;
22732 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
22733 0 : return JS_FALSE;
22734 : nsresult rv;
22735 0 : rv = self->ClearStencil(arg0);
22736 0 : if (NS_FAILED(rv))
22737 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22738 0 : *vp = JSVAL_VOID;
22739 0 : return JS_TRUE;
22740 : }
22741 :
22742 : static JSBool
22743 0 : nsIDOMWebGLRenderingContext_ColorMask(JSContext *cx, unsigned argc, jsval *vp)
22744 : {
22745 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22746 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22747 0 : if (!obj)
22748 0 : return JS_FALSE;
22749 : nsIDOMWebGLRenderingContext *self;
22750 0 : xpc_qsSelfRef selfref;
22751 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22752 0 : return JS_FALSE;
22753 0 : if (argc < 4)
22754 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22755 0 : jsval *argv = JS_ARGV(cx, vp);
22756 : JSBool arg0;
22757 0 : JS_ValueToBoolean(cx, argv[0], &arg0);
22758 : JSBool arg1;
22759 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
22760 : JSBool arg2;
22761 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
22762 : JSBool arg3;
22763 0 : JS_ValueToBoolean(cx, argv[3], &arg3);
22764 : nsresult rv;
22765 0 : rv = self->ColorMask(arg0, arg1, arg2, arg3);
22766 0 : if (NS_FAILED(rv))
22767 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22768 0 : *vp = JSVAL_VOID;
22769 0 : return JS_TRUE;
22770 : }
22771 :
22772 : static JSBool
22773 0 : nsIDOMWebGLRenderingContext_CompileShader(JSContext *cx, unsigned argc, jsval *vp)
22774 : {
22775 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22776 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22777 0 : if (!obj)
22778 0 : return JS_FALSE;
22779 : nsIDOMWebGLRenderingContext *self;
22780 0 : xpc_qsSelfRef selfref;
22781 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22782 0 : return JS_FALSE;
22783 0 : jsval *argv = JS_ARGV(cx, vp);
22784 : nsresult rv;
22785 : nsIWebGLShader *arg0;
22786 0 : xpc_qsSelfRef arg0ref;
22787 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
22788 0 : if (NS_FAILED(rv)) {
22789 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
22790 0 : return JS_FALSE;
22791 : }
22792 0 : rv = self->CompileShader(arg0);
22793 0 : if (NS_FAILED(rv))
22794 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22795 0 : *vp = JSVAL_VOID;
22796 0 : return JS_TRUE;
22797 : }
22798 :
22799 : static JSBool
22800 0 : nsIDOMWebGLRenderingContext_CopyTexImage2D(JSContext *cx, unsigned argc, jsval *vp)
22801 : {
22802 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22803 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22804 0 : if (!obj)
22805 0 : return JS_FALSE;
22806 : nsIDOMWebGLRenderingContext *self;
22807 0 : xpc_qsSelfRef selfref;
22808 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22809 0 : return JS_FALSE;
22810 0 : if (argc < 8)
22811 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22812 0 : jsval *argv = JS_ARGV(cx, vp);
22813 : uint32_t arg0;
22814 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22815 0 : return JS_FALSE;
22816 : int32_t arg1;
22817 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
22818 0 : return JS_FALSE;
22819 : uint32_t arg2;
22820 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
22821 0 : return JS_FALSE;
22822 : int32_t arg3;
22823 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
22824 0 : return JS_FALSE;
22825 : int32_t arg4;
22826 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
22827 0 : return JS_FALSE;
22828 : int32_t arg5;
22829 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
22830 0 : return JS_FALSE;
22831 : int32_t arg6;
22832 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
22833 0 : return JS_FALSE;
22834 : int32_t arg7;
22835 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
22836 0 : return JS_FALSE;
22837 : nsresult rv;
22838 0 : rv = self->CopyTexImage2D(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
22839 0 : if (NS_FAILED(rv))
22840 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22841 0 : *vp = JSVAL_VOID;
22842 0 : return JS_TRUE;
22843 : }
22844 :
22845 : static JSBool
22846 0 : nsIDOMWebGLRenderingContext_CopyTexSubImage2D(JSContext *cx, unsigned argc, jsval *vp)
22847 : {
22848 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22849 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22850 0 : if (!obj)
22851 0 : return JS_FALSE;
22852 : nsIDOMWebGLRenderingContext *self;
22853 0 : xpc_qsSelfRef selfref;
22854 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22855 0 : return JS_FALSE;
22856 0 : if (argc < 8)
22857 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22858 0 : jsval *argv = JS_ARGV(cx, vp);
22859 : uint32_t arg0;
22860 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22861 0 : return JS_FALSE;
22862 : int32_t arg1;
22863 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
22864 0 : return JS_FALSE;
22865 : int32_t arg2;
22866 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
22867 0 : return JS_FALSE;
22868 : int32_t arg3;
22869 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
22870 0 : return JS_FALSE;
22871 : int32_t arg4;
22872 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
22873 0 : return JS_FALSE;
22874 : int32_t arg5;
22875 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
22876 0 : return JS_FALSE;
22877 : int32_t arg6;
22878 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
22879 0 : return JS_FALSE;
22880 : int32_t arg7;
22881 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
22882 0 : return JS_FALSE;
22883 : nsresult rv;
22884 0 : rv = self->CopyTexSubImage2D(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
22885 0 : if (NS_FAILED(rv))
22886 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22887 0 : *vp = JSVAL_VOID;
22888 0 : return JS_TRUE;
22889 : }
22890 :
22891 : static JSBool
22892 0 : nsIDOMWebGLRenderingContext_CreateBuffer(JSContext *cx, unsigned argc, jsval *vp)
22893 : {
22894 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22895 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22896 0 : if (!obj)
22897 0 : return JS_FALSE;
22898 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
22899 : nsIDOMWebGLRenderingContext *self;
22900 0 : xpc_qsSelfRef selfref;
22901 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22902 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
22903 0 : return JS_FALSE;
22904 : nsresult rv;
22905 0 : nsCOMPtr<nsIWebGLBuffer> result;
22906 0 : rv = self->CreateBuffer(getter_AddRefs(result));
22907 0 : if (NS_FAILED(rv))
22908 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22909 0 : if (!result) {
22910 0 : *vp = JSVAL_NULL;
22911 0 : return JS_TRUE;
22912 : }
22913 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22914 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22915 0 : return JS_TRUE;
22916 : }
22917 : // After this point do not use 'result'!
22918 0 : qsObjectHelper helper(result, cache);
22919 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLBuffer), &interfaces[k_nsIWebGLBuffer], vp);
22920 : }
22921 :
22922 : static JSBool
22923 0 : nsIDOMWebGLRenderingContext_CreateProgram(JSContext *cx, unsigned argc, jsval *vp)
22924 : {
22925 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22926 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22927 0 : if (!obj)
22928 0 : return JS_FALSE;
22929 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
22930 : nsIDOMWebGLRenderingContext *self;
22931 0 : xpc_qsSelfRef selfref;
22932 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22933 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
22934 0 : return JS_FALSE;
22935 : nsresult rv;
22936 0 : nsCOMPtr<nsIWebGLProgram> result;
22937 0 : rv = self->CreateProgram(getter_AddRefs(result));
22938 0 : if (NS_FAILED(rv))
22939 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22940 0 : if (!result) {
22941 0 : *vp = JSVAL_NULL;
22942 0 : return JS_TRUE;
22943 : }
22944 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22945 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22946 0 : return JS_TRUE;
22947 : }
22948 : // After this point do not use 'result'!
22949 0 : qsObjectHelper helper(result, cache);
22950 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLProgram), &interfaces[k_nsIWebGLProgram], vp);
22951 : }
22952 :
22953 : static JSBool
22954 0 : nsIDOMWebGLRenderingContext_CreateFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
22955 : {
22956 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22957 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22958 0 : if (!obj)
22959 0 : return JS_FALSE;
22960 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
22961 : nsIDOMWebGLRenderingContext *self;
22962 0 : xpc_qsSelfRef selfref;
22963 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22964 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
22965 0 : return JS_FALSE;
22966 : nsresult rv;
22967 0 : nsCOMPtr<nsIWebGLFramebuffer> result;
22968 0 : rv = self->CreateFramebuffer(getter_AddRefs(result));
22969 0 : if (NS_FAILED(rv))
22970 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22971 0 : if (!result) {
22972 0 : *vp = JSVAL_NULL;
22973 0 : return JS_TRUE;
22974 : }
22975 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22976 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22977 0 : return JS_TRUE;
22978 : }
22979 : // After this point do not use 'result'!
22980 0 : qsObjectHelper helper(result, cache);
22981 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLFramebuffer), &interfaces[k_nsIWebGLFramebuffer], vp);
22982 : }
22983 :
22984 : static JSBool
22985 0 : nsIDOMWebGLRenderingContext_CreateRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
22986 : {
22987 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22988 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22989 0 : if (!obj)
22990 0 : return JS_FALSE;
22991 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
22992 : nsIDOMWebGLRenderingContext *self;
22993 0 : xpc_qsSelfRef selfref;
22994 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22995 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
22996 0 : return JS_FALSE;
22997 : nsresult rv;
22998 0 : nsCOMPtr<nsIWebGLRenderbuffer> result;
22999 0 : rv = self->CreateRenderbuffer(getter_AddRefs(result));
23000 0 : if (NS_FAILED(rv))
23001 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23002 0 : if (!result) {
23003 0 : *vp = JSVAL_NULL;
23004 0 : return JS_TRUE;
23005 : }
23006 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23007 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23008 0 : return JS_TRUE;
23009 : }
23010 : // After this point do not use 'result'!
23011 0 : qsObjectHelper helper(result, cache);
23012 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLRenderbuffer), &interfaces[k_nsIWebGLRenderbuffer], vp);
23013 : }
23014 :
23015 : static JSBool
23016 0 : nsIDOMWebGLRenderingContext_CreateShader(JSContext *cx, unsigned argc, jsval *vp)
23017 : {
23018 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23019 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23020 0 : if (!obj)
23021 0 : return JS_FALSE;
23022 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23023 : nsIDOMWebGLRenderingContext *self;
23024 0 : xpc_qsSelfRef selfref;
23025 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23026 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23027 0 : return JS_FALSE;
23028 0 : if (argc < 1)
23029 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23030 0 : jsval *argv = JS_ARGV(cx, vp);
23031 : uint32_t arg0;
23032 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23033 0 : return JS_FALSE;
23034 : nsresult rv;
23035 0 : nsCOMPtr<nsIWebGLShader> result;
23036 0 : rv = self->CreateShader(arg0, getter_AddRefs(result));
23037 0 : if (NS_FAILED(rv))
23038 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23039 0 : if (!result) {
23040 0 : *vp = JSVAL_NULL;
23041 0 : return JS_TRUE;
23042 : }
23043 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23044 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23045 0 : return JS_TRUE;
23046 : }
23047 : // After this point do not use 'result'!
23048 0 : qsObjectHelper helper(result, cache);
23049 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLShader), &interfaces[k_nsIWebGLShader], vp);
23050 : }
23051 :
23052 : static JSBool
23053 0 : nsIDOMWebGLRenderingContext_CreateTexture(JSContext *cx, unsigned argc, jsval *vp)
23054 : {
23055 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23056 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23057 0 : if (!obj)
23058 0 : return JS_FALSE;
23059 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23060 : nsIDOMWebGLRenderingContext *self;
23061 0 : xpc_qsSelfRef selfref;
23062 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23063 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23064 0 : return JS_FALSE;
23065 : nsresult rv;
23066 0 : nsCOMPtr<nsIWebGLTexture> result;
23067 0 : rv = self->CreateTexture(getter_AddRefs(result));
23068 0 : if (NS_FAILED(rv))
23069 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23070 0 : if (!result) {
23071 0 : *vp = JSVAL_NULL;
23072 0 : return JS_TRUE;
23073 : }
23074 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23075 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23076 0 : return JS_TRUE;
23077 : }
23078 : // After this point do not use 'result'!
23079 0 : qsObjectHelper helper(result, cache);
23080 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLTexture), &interfaces[k_nsIWebGLTexture], vp);
23081 : }
23082 :
23083 : static JSBool
23084 0 : nsIDOMWebGLRenderingContext_CullFace(JSContext *cx, unsigned argc, jsval *vp)
23085 : {
23086 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23087 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23088 0 : if (!obj)
23089 0 : return JS_FALSE;
23090 : nsIDOMWebGLRenderingContext *self;
23091 0 : xpc_qsSelfRef selfref;
23092 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23093 0 : return JS_FALSE;
23094 0 : if (argc < 1)
23095 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23096 0 : jsval *argv = JS_ARGV(cx, vp);
23097 : uint32_t arg0;
23098 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23099 0 : return JS_FALSE;
23100 : nsresult rv;
23101 0 : rv = self->CullFace(arg0);
23102 0 : if (NS_FAILED(rv))
23103 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23104 0 : *vp = JSVAL_VOID;
23105 0 : return JS_TRUE;
23106 : }
23107 :
23108 : static JSBool
23109 0 : nsIDOMWebGLRenderingContext_DeleteBuffer(JSContext *cx, unsigned argc, jsval *vp)
23110 : {
23111 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23112 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23113 0 : if (!obj)
23114 0 : return JS_FALSE;
23115 : nsIDOMWebGLRenderingContext *self;
23116 0 : xpc_qsSelfRef selfref;
23117 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23118 0 : return JS_FALSE;
23119 0 : if (argc < 1)
23120 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23121 0 : jsval *argv = JS_ARGV(cx, vp);
23122 : nsresult rv;
23123 : nsIWebGLBuffer *arg0;
23124 0 : xpc_qsSelfRef arg0ref;
23125 0 : rv = xpc_qsUnwrapArg<nsIWebGLBuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23126 0 : if (NS_FAILED(rv)) {
23127 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23128 0 : return JS_FALSE;
23129 : }
23130 0 : rv = self->DeleteBuffer(arg0);
23131 0 : if (NS_FAILED(rv))
23132 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23133 0 : *vp = JSVAL_VOID;
23134 0 : return JS_TRUE;
23135 : }
23136 :
23137 : static JSBool
23138 0 : nsIDOMWebGLRenderingContext_DeleteProgram(JSContext *cx, unsigned argc, jsval *vp)
23139 : {
23140 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23141 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23142 0 : if (!obj)
23143 0 : return JS_FALSE;
23144 : nsIDOMWebGLRenderingContext *self;
23145 0 : xpc_qsSelfRef selfref;
23146 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23147 0 : return JS_FALSE;
23148 0 : if (argc < 1)
23149 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23150 0 : jsval *argv = JS_ARGV(cx, vp);
23151 : nsresult rv;
23152 : nsIWebGLProgram *arg0;
23153 0 : xpc_qsSelfRef arg0ref;
23154 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23155 0 : if (NS_FAILED(rv)) {
23156 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23157 0 : return JS_FALSE;
23158 : }
23159 0 : rv = self->DeleteProgram(arg0);
23160 0 : if (NS_FAILED(rv))
23161 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23162 0 : *vp = JSVAL_VOID;
23163 0 : return JS_TRUE;
23164 : }
23165 :
23166 : static JSBool
23167 0 : nsIDOMWebGLRenderingContext_DeleteFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
23168 : {
23169 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23170 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23171 0 : if (!obj)
23172 0 : return JS_FALSE;
23173 : nsIDOMWebGLRenderingContext *self;
23174 0 : xpc_qsSelfRef selfref;
23175 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23176 0 : return JS_FALSE;
23177 0 : if (argc < 1)
23178 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23179 0 : jsval *argv = JS_ARGV(cx, vp);
23180 : nsresult rv;
23181 : nsIWebGLFramebuffer *arg0;
23182 0 : xpc_qsSelfRef arg0ref;
23183 0 : rv = xpc_qsUnwrapArg<nsIWebGLFramebuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23184 0 : if (NS_FAILED(rv)) {
23185 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23186 0 : return JS_FALSE;
23187 : }
23188 0 : rv = self->DeleteFramebuffer(arg0);
23189 0 : if (NS_FAILED(rv))
23190 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23191 0 : *vp = JSVAL_VOID;
23192 0 : return JS_TRUE;
23193 : }
23194 :
23195 : static JSBool
23196 0 : nsIDOMWebGLRenderingContext_DeleteRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
23197 : {
23198 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23199 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23200 0 : if (!obj)
23201 0 : return JS_FALSE;
23202 : nsIDOMWebGLRenderingContext *self;
23203 0 : xpc_qsSelfRef selfref;
23204 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23205 0 : return JS_FALSE;
23206 0 : if (argc < 1)
23207 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23208 0 : jsval *argv = JS_ARGV(cx, vp);
23209 : nsresult rv;
23210 : nsIWebGLRenderbuffer *arg0;
23211 0 : xpc_qsSelfRef arg0ref;
23212 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23213 0 : if (NS_FAILED(rv)) {
23214 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23215 0 : return JS_FALSE;
23216 : }
23217 0 : rv = self->DeleteRenderbuffer(arg0);
23218 0 : if (NS_FAILED(rv))
23219 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23220 0 : *vp = JSVAL_VOID;
23221 0 : return JS_TRUE;
23222 : }
23223 :
23224 : static JSBool
23225 0 : nsIDOMWebGLRenderingContext_DeleteShader(JSContext *cx, unsigned argc, jsval *vp)
23226 : {
23227 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23228 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23229 0 : if (!obj)
23230 0 : return JS_FALSE;
23231 : nsIDOMWebGLRenderingContext *self;
23232 0 : xpc_qsSelfRef selfref;
23233 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23234 0 : return JS_FALSE;
23235 0 : if (argc < 1)
23236 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23237 0 : jsval *argv = JS_ARGV(cx, vp);
23238 : nsresult rv;
23239 : nsIWebGLShader *arg0;
23240 0 : xpc_qsSelfRef arg0ref;
23241 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23242 0 : if (NS_FAILED(rv)) {
23243 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23244 0 : return JS_FALSE;
23245 : }
23246 0 : rv = self->DeleteShader(arg0);
23247 0 : if (NS_FAILED(rv))
23248 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23249 0 : *vp = JSVAL_VOID;
23250 0 : return JS_TRUE;
23251 : }
23252 :
23253 : static JSBool
23254 0 : nsIDOMWebGLRenderingContext_DeleteTexture(JSContext *cx, unsigned argc, jsval *vp)
23255 : {
23256 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23257 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23258 0 : if (!obj)
23259 0 : return JS_FALSE;
23260 : nsIDOMWebGLRenderingContext *self;
23261 0 : xpc_qsSelfRef selfref;
23262 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23263 0 : return JS_FALSE;
23264 0 : if (argc < 1)
23265 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23266 0 : jsval *argv = JS_ARGV(cx, vp);
23267 : nsresult rv;
23268 : nsIWebGLTexture *arg0;
23269 0 : xpc_qsSelfRef arg0ref;
23270 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23271 0 : if (NS_FAILED(rv)) {
23272 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23273 0 : return JS_FALSE;
23274 : }
23275 0 : rv = self->DeleteTexture(arg0);
23276 0 : if (NS_FAILED(rv))
23277 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23278 0 : *vp = JSVAL_VOID;
23279 0 : return JS_TRUE;
23280 : }
23281 :
23282 : static JSBool
23283 0 : nsIDOMWebGLRenderingContext_DepthFunc(JSContext *cx, unsigned argc, jsval *vp)
23284 : {
23285 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23286 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23287 0 : if (!obj)
23288 0 : return JS_FALSE;
23289 : nsIDOMWebGLRenderingContext *self;
23290 0 : xpc_qsSelfRef selfref;
23291 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23292 0 : return JS_FALSE;
23293 0 : if (argc < 1)
23294 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23295 0 : jsval *argv = JS_ARGV(cx, vp);
23296 : uint32_t arg0;
23297 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23298 0 : return JS_FALSE;
23299 : nsresult rv;
23300 0 : rv = self->DepthFunc(arg0);
23301 0 : if (NS_FAILED(rv))
23302 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23303 0 : *vp = JSVAL_VOID;
23304 0 : return JS_TRUE;
23305 : }
23306 :
23307 : static JSBool
23308 0 : nsIDOMWebGLRenderingContext_DepthMask(JSContext *cx, unsigned argc, jsval *vp)
23309 : {
23310 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23311 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23312 0 : if (!obj)
23313 0 : return JS_FALSE;
23314 : nsIDOMWebGLRenderingContext *self;
23315 0 : xpc_qsSelfRef selfref;
23316 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23317 0 : return JS_FALSE;
23318 0 : if (argc < 1)
23319 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23320 0 : jsval *argv = JS_ARGV(cx, vp);
23321 : JSBool arg0;
23322 0 : JS_ValueToBoolean(cx, argv[0], &arg0);
23323 : nsresult rv;
23324 0 : rv = self->DepthMask(arg0);
23325 0 : if (NS_FAILED(rv))
23326 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23327 0 : *vp = JSVAL_VOID;
23328 0 : return JS_TRUE;
23329 : }
23330 :
23331 : static JSBool
23332 0 : nsIDOMWebGLRenderingContext_DepthRange(JSContext *cx, unsigned argc, jsval *vp)
23333 : {
23334 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23335 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23336 0 : if (!obj)
23337 0 : return JS_FALSE;
23338 : nsIDOMWebGLRenderingContext *self;
23339 0 : xpc_qsSelfRef selfref;
23340 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23341 0 : return JS_FALSE;
23342 0 : if (argc < 2)
23343 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23344 0 : jsval *argv = JS_ARGV(cx, vp);
23345 : double arg0_dbl;
23346 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
23347 0 : return JS_FALSE;
23348 0 : float arg0 = (float) arg0_dbl;
23349 : double arg1_dbl;
23350 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
23351 0 : return JS_FALSE;
23352 0 : float arg1 = (float) arg1_dbl;
23353 : nsresult rv;
23354 0 : rv = self->DepthRange(arg0, arg1);
23355 0 : if (NS_FAILED(rv))
23356 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23357 0 : *vp = JSVAL_VOID;
23358 0 : return JS_TRUE;
23359 : }
23360 :
23361 : static JSBool
23362 0 : nsIDOMWebGLRenderingContext_DetachShader(JSContext *cx, unsigned argc, jsval *vp)
23363 : {
23364 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23365 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23366 0 : if (!obj)
23367 0 : return JS_FALSE;
23368 : nsIDOMWebGLRenderingContext *self;
23369 0 : xpc_qsSelfRef selfref;
23370 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23371 0 : return JS_FALSE;
23372 0 : if (argc < 2)
23373 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23374 0 : jsval *argv = JS_ARGV(cx, vp);
23375 : nsresult rv;
23376 : nsIWebGLProgram *arg0;
23377 0 : xpc_qsSelfRef arg0ref;
23378 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23379 0 : if (NS_FAILED(rv)) {
23380 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23381 0 : return JS_FALSE;
23382 : }
23383 : nsIWebGLShader *arg1;
23384 0 : xpc_qsSelfRef arg1ref;
23385 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
23386 0 : if (NS_FAILED(rv)) {
23387 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
23388 0 : return JS_FALSE;
23389 : }
23390 0 : rv = self->DetachShader(arg0, arg1);
23391 0 : if (NS_FAILED(rv))
23392 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23393 0 : *vp = JSVAL_VOID;
23394 0 : return JS_TRUE;
23395 : }
23396 :
23397 : static JSBool
23398 0 : nsIDOMWebGLRenderingContext_Disable(JSContext *cx, unsigned argc, jsval *vp)
23399 : {
23400 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23401 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23402 0 : if (!obj)
23403 0 : return JS_FALSE;
23404 : nsIDOMWebGLRenderingContext *self;
23405 0 : xpc_qsSelfRef selfref;
23406 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23407 0 : return JS_FALSE;
23408 0 : if (argc < 1)
23409 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23410 0 : jsval *argv = JS_ARGV(cx, vp);
23411 : uint32_t arg0;
23412 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23413 0 : return JS_FALSE;
23414 : nsresult rv;
23415 0 : rv = self->Disable(arg0);
23416 0 : if (NS_FAILED(rv))
23417 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23418 0 : *vp = JSVAL_VOID;
23419 0 : return JS_TRUE;
23420 : }
23421 :
23422 : static JSBool
23423 0 : nsIDOMWebGLRenderingContext_DisableVertexAttribArray(JSContext *cx, unsigned argc, jsval *vp)
23424 : {
23425 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23426 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23427 0 : if (!obj)
23428 0 : return JS_FALSE;
23429 : nsIDOMWebGLRenderingContext *self;
23430 0 : xpc_qsSelfRef selfref;
23431 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23432 0 : return JS_FALSE;
23433 0 : if (argc < 1)
23434 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23435 0 : jsval *argv = JS_ARGV(cx, vp);
23436 : uint32_t arg0;
23437 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23438 0 : return JS_FALSE;
23439 : nsresult rv;
23440 0 : rv = self->DisableVertexAttribArray(arg0);
23441 0 : if (NS_FAILED(rv))
23442 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23443 0 : *vp = JSVAL_VOID;
23444 0 : return JS_TRUE;
23445 : }
23446 :
23447 : static JSBool
23448 0 : nsIDOMWebGLRenderingContext_DrawArrays(JSContext *cx, unsigned argc, jsval *vp)
23449 : {
23450 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23451 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23452 0 : if (!obj)
23453 0 : return JS_FALSE;
23454 : nsIDOMWebGLRenderingContext *self;
23455 0 : xpc_qsSelfRef selfref;
23456 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23457 0 : return JS_FALSE;
23458 0 : if (argc < 3)
23459 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23460 0 : jsval *argv = JS_ARGV(cx, vp);
23461 : uint32_t arg0;
23462 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23463 0 : return JS_FALSE;
23464 : int32_t arg1;
23465 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
23466 0 : return JS_FALSE;
23467 : int32_t arg2;
23468 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
23469 0 : return JS_FALSE;
23470 : nsresult rv;
23471 0 : rv = self->DrawArrays(arg0, arg1, arg2);
23472 0 : if (NS_FAILED(rv))
23473 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23474 0 : *vp = JSVAL_VOID;
23475 0 : return JS_TRUE;
23476 : }
23477 :
23478 : static JSBool
23479 0 : nsIDOMWebGLRenderingContext_DrawElements(JSContext *cx, unsigned argc, jsval *vp)
23480 : {
23481 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23482 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23483 0 : if (!obj)
23484 0 : return JS_FALSE;
23485 : nsIDOMWebGLRenderingContext *self;
23486 0 : xpc_qsSelfRef selfref;
23487 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23488 0 : return JS_FALSE;
23489 0 : if (argc < 4)
23490 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23491 0 : jsval *argv = JS_ARGV(cx, vp);
23492 : uint32_t arg0;
23493 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23494 0 : return JS_FALSE;
23495 : int32_t arg1;
23496 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
23497 0 : return JS_FALSE;
23498 : uint32_t arg2;
23499 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
23500 0 : return JS_FALSE;
23501 : int32_t arg3;
23502 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
23503 0 : return JS_FALSE;
23504 : nsresult rv;
23505 0 : rv = self->DrawElements(arg0, arg1, arg2, arg3);
23506 0 : if (NS_FAILED(rv))
23507 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23508 0 : *vp = JSVAL_VOID;
23509 0 : return JS_TRUE;
23510 : }
23511 :
23512 : static JSBool
23513 0 : nsIDOMWebGLRenderingContext_Enable(JSContext *cx, unsigned argc, jsval *vp)
23514 : {
23515 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23516 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23517 0 : if (!obj)
23518 0 : return JS_FALSE;
23519 : nsIDOMWebGLRenderingContext *self;
23520 0 : xpc_qsSelfRef selfref;
23521 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23522 0 : return JS_FALSE;
23523 0 : if (argc < 1)
23524 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23525 0 : jsval *argv = JS_ARGV(cx, vp);
23526 : uint32_t arg0;
23527 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23528 0 : return JS_FALSE;
23529 : nsresult rv;
23530 0 : rv = self->Enable(arg0);
23531 0 : if (NS_FAILED(rv))
23532 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23533 0 : *vp = JSVAL_VOID;
23534 0 : return JS_TRUE;
23535 : }
23536 :
23537 : static JSBool
23538 0 : nsIDOMWebGLRenderingContext_EnableVertexAttribArray(JSContext *cx, unsigned argc, jsval *vp)
23539 : {
23540 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23541 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23542 0 : if (!obj)
23543 0 : return JS_FALSE;
23544 : nsIDOMWebGLRenderingContext *self;
23545 0 : xpc_qsSelfRef selfref;
23546 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23547 0 : return JS_FALSE;
23548 0 : if (argc < 1)
23549 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23550 0 : jsval *argv = JS_ARGV(cx, vp);
23551 : uint32_t arg0;
23552 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23553 0 : return JS_FALSE;
23554 : nsresult rv;
23555 0 : rv = self->EnableVertexAttribArray(arg0);
23556 0 : if (NS_FAILED(rv))
23557 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23558 0 : *vp = JSVAL_VOID;
23559 0 : return JS_TRUE;
23560 : }
23561 :
23562 : static JSBool
23563 0 : nsIDOMWebGLRenderingContext_Finish(JSContext *cx, unsigned argc, jsval *vp)
23564 : {
23565 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23566 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23567 0 : if (!obj)
23568 0 : return JS_FALSE;
23569 : nsIDOMWebGLRenderingContext *self;
23570 0 : xpc_qsSelfRef selfref;
23571 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23572 0 : return JS_FALSE;
23573 : nsresult rv;
23574 0 : rv = self->Finish();
23575 0 : if (NS_FAILED(rv))
23576 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23577 0 : *vp = JSVAL_VOID;
23578 0 : return JS_TRUE;
23579 : }
23580 :
23581 : static JSBool
23582 0 : nsIDOMWebGLRenderingContext_Flush(JSContext *cx, unsigned argc, jsval *vp)
23583 : {
23584 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23585 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23586 0 : if (!obj)
23587 0 : return JS_FALSE;
23588 : nsIDOMWebGLRenderingContext *self;
23589 0 : xpc_qsSelfRef selfref;
23590 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23591 0 : return JS_FALSE;
23592 : nsresult rv;
23593 0 : rv = self->Flush();
23594 0 : if (NS_FAILED(rv))
23595 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23596 0 : *vp = JSVAL_VOID;
23597 0 : return JS_TRUE;
23598 : }
23599 :
23600 : static JSBool
23601 0 : nsIDOMWebGLRenderingContext_FramebufferRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
23602 : {
23603 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23604 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23605 0 : if (!obj)
23606 0 : return JS_FALSE;
23607 : nsIDOMWebGLRenderingContext *self;
23608 0 : xpc_qsSelfRef selfref;
23609 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23610 0 : return JS_FALSE;
23611 0 : if (argc < 4)
23612 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23613 0 : jsval *argv = JS_ARGV(cx, vp);
23614 : uint32_t arg0;
23615 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23616 0 : return JS_FALSE;
23617 : uint32_t arg1;
23618 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23619 0 : return JS_FALSE;
23620 : uint32_t arg2;
23621 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
23622 0 : return JS_FALSE;
23623 : nsresult rv;
23624 : nsIWebGLRenderbuffer *arg3;
23625 0 : xpc_qsSelfRef arg3ref;
23626 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
23627 0 : if (NS_FAILED(rv)) {
23628 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
23629 0 : return JS_FALSE;
23630 : }
23631 0 : rv = self->FramebufferRenderbuffer(arg0, arg1, arg2, arg3);
23632 0 : if (NS_FAILED(rv))
23633 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23634 0 : *vp = JSVAL_VOID;
23635 0 : return JS_TRUE;
23636 : }
23637 :
23638 : static JSBool
23639 0 : nsIDOMWebGLRenderingContext_FramebufferTexture2D(JSContext *cx, unsigned argc, jsval *vp)
23640 : {
23641 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23642 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23643 0 : if (!obj)
23644 0 : return JS_FALSE;
23645 : nsIDOMWebGLRenderingContext *self;
23646 0 : xpc_qsSelfRef selfref;
23647 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23648 0 : return JS_FALSE;
23649 0 : if (argc < 5)
23650 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23651 0 : jsval *argv = JS_ARGV(cx, vp);
23652 : uint32_t arg0;
23653 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23654 0 : return JS_FALSE;
23655 : uint32_t arg1;
23656 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23657 0 : return JS_FALSE;
23658 : uint32_t arg2;
23659 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
23660 0 : return JS_FALSE;
23661 : nsresult rv;
23662 : nsIWebGLTexture *arg3;
23663 0 : xpc_qsSelfRef arg3ref;
23664 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
23665 0 : if (NS_FAILED(rv)) {
23666 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
23667 0 : return JS_FALSE;
23668 : }
23669 : int32_t arg4;
23670 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
23671 0 : return JS_FALSE;
23672 0 : rv = self->FramebufferTexture2D(arg0, arg1, arg2, arg3, arg4);
23673 0 : if (NS_FAILED(rv))
23674 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23675 0 : *vp = JSVAL_VOID;
23676 0 : return JS_TRUE;
23677 : }
23678 :
23679 : static JSBool
23680 0 : nsIDOMWebGLRenderingContext_FrontFace(JSContext *cx, unsigned argc, jsval *vp)
23681 : {
23682 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23683 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23684 0 : if (!obj)
23685 0 : return JS_FALSE;
23686 : nsIDOMWebGLRenderingContext *self;
23687 0 : xpc_qsSelfRef selfref;
23688 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23689 0 : return JS_FALSE;
23690 0 : if (argc < 1)
23691 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23692 0 : jsval *argv = JS_ARGV(cx, vp);
23693 : uint32_t arg0;
23694 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23695 0 : return JS_FALSE;
23696 : nsresult rv;
23697 0 : rv = self->FrontFace(arg0);
23698 0 : if (NS_FAILED(rv))
23699 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23700 0 : *vp = JSVAL_VOID;
23701 0 : return JS_TRUE;
23702 : }
23703 :
23704 : static JSBool
23705 0 : nsIDOMWebGLRenderingContext_GenerateMipmap(JSContext *cx, unsigned argc, jsval *vp)
23706 : {
23707 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23708 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23709 0 : if (!obj)
23710 0 : return JS_FALSE;
23711 : nsIDOMWebGLRenderingContext *self;
23712 0 : xpc_qsSelfRef selfref;
23713 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23714 0 : return JS_FALSE;
23715 0 : if (argc < 1)
23716 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23717 0 : jsval *argv = JS_ARGV(cx, vp);
23718 : uint32_t arg0;
23719 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23720 0 : return JS_FALSE;
23721 : nsresult rv;
23722 0 : rv = self->GenerateMipmap(arg0);
23723 0 : if (NS_FAILED(rv))
23724 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23725 0 : *vp = JSVAL_VOID;
23726 0 : return JS_TRUE;
23727 : }
23728 :
23729 : static JSBool
23730 0 : nsIDOMWebGLRenderingContext_GetActiveAttrib(JSContext *cx, unsigned argc, jsval *vp)
23731 : {
23732 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23733 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23734 0 : if (!obj)
23735 0 : return JS_FALSE;
23736 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23737 : nsIDOMWebGLRenderingContext *self;
23738 0 : xpc_qsSelfRef selfref;
23739 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23740 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23741 0 : return JS_FALSE;
23742 0 : if (argc < 2)
23743 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23744 0 : jsval *argv = JS_ARGV(cx, vp);
23745 : nsresult rv;
23746 : nsIWebGLProgram *arg0;
23747 0 : xpc_qsSelfRef arg0ref;
23748 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23749 0 : if (NS_FAILED(rv)) {
23750 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23751 0 : return JS_FALSE;
23752 : }
23753 : uint32_t arg1;
23754 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23755 0 : return JS_FALSE;
23756 0 : nsCOMPtr<nsIWebGLActiveInfo> result;
23757 0 : rv = self->GetActiveAttrib(arg0, arg1, getter_AddRefs(result));
23758 0 : if (NS_FAILED(rv))
23759 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23760 0 : if (!result) {
23761 0 : *vp = JSVAL_NULL;
23762 0 : return JS_TRUE;
23763 : }
23764 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23765 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23766 0 : return JS_TRUE;
23767 : }
23768 : // After this point do not use 'result'!
23769 0 : qsObjectHelper helper(result, cache);
23770 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLActiveInfo), &interfaces[k_nsIWebGLActiveInfo], vp);
23771 : }
23772 :
23773 : static JSBool
23774 0 : nsIDOMWebGLRenderingContext_GetActiveUniform(JSContext *cx, unsigned argc, jsval *vp)
23775 : {
23776 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23777 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23778 0 : if (!obj)
23779 0 : return JS_FALSE;
23780 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23781 : nsIDOMWebGLRenderingContext *self;
23782 0 : xpc_qsSelfRef selfref;
23783 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23784 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23785 0 : return JS_FALSE;
23786 0 : if (argc < 2)
23787 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23788 0 : jsval *argv = JS_ARGV(cx, vp);
23789 : nsresult rv;
23790 : nsIWebGLProgram *arg0;
23791 0 : xpc_qsSelfRef arg0ref;
23792 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23793 0 : if (NS_FAILED(rv)) {
23794 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23795 0 : return JS_FALSE;
23796 : }
23797 : uint32_t arg1;
23798 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23799 0 : return JS_FALSE;
23800 0 : nsCOMPtr<nsIWebGLActiveInfo> result;
23801 0 : rv = self->GetActiveUniform(arg0, arg1, getter_AddRefs(result));
23802 0 : if (NS_FAILED(rv))
23803 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23804 0 : if (!result) {
23805 0 : *vp = JSVAL_NULL;
23806 0 : return JS_TRUE;
23807 : }
23808 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23809 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23810 0 : return JS_TRUE;
23811 : }
23812 : // After this point do not use 'result'!
23813 0 : qsObjectHelper helper(result, cache);
23814 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLActiveInfo), &interfaces[k_nsIWebGLActiveInfo], vp);
23815 : }
23816 :
23817 : static JSBool
23818 0 : nsIDOMWebGLRenderingContext_GetAttachedShaders(JSContext *cx, unsigned argc, jsval *vp)
23819 : {
23820 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23821 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23822 0 : if (!obj)
23823 0 : return JS_FALSE;
23824 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23825 : nsIDOMWebGLRenderingContext *self;
23826 0 : xpc_qsSelfRef selfref;
23827 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23828 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23829 0 : return JS_FALSE;
23830 0 : if (argc < 1)
23831 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23832 0 : jsval *argv = JS_ARGV(cx, vp);
23833 : nsresult rv;
23834 : nsIWebGLProgram *arg0;
23835 0 : xpc_qsSelfRef arg0ref;
23836 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23837 0 : if (NS_FAILED(rv)) {
23838 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23839 0 : return JS_FALSE;
23840 : }
23841 0 : nsCOMPtr<nsIVariant> result;
23842 0 : rv = self->GetAttachedShaders(arg0, getter_AddRefs(result));
23843 0 : if (NS_FAILED(rv))
23844 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23845 0 : return xpc_qsVariantToJsval(lccx, result, vp);
23846 : }
23847 :
23848 : static JSBool
23849 0 : nsIDOMWebGLRenderingContext_GetAttribLocation(JSContext *cx, unsigned argc, jsval *vp)
23850 : {
23851 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23852 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23853 0 : if (!obj)
23854 0 : return JS_FALSE;
23855 : nsIDOMWebGLRenderingContext *self;
23856 0 : xpc_qsSelfRef selfref;
23857 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23858 0 : return JS_FALSE;
23859 0 : if (argc < 2)
23860 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23861 0 : jsval *argv = JS_ARGV(cx, vp);
23862 : nsresult rv;
23863 : nsIWebGLProgram *arg0;
23864 0 : xpc_qsSelfRef arg0ref;
23865 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23866 0 : if (NS_FAILED(rv)) {
23867 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23868 0 : return JS_FALSE;
23869 : }
23870 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
23871 : xpc_qsDOMString::eDefaultNullBehavior,
23872 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
23873 0 : if (!arg1.IsValid())
23874 0 : return JS_FALSE;
23875 : WebGLint result;
23876 0 : rv = self->GetAttribLocation(arg0, arg1, &result);
23877 0 : if (NS_FAILED(rv))
23878 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23879 0 : *vp = INT_TO_JSVAL(result);
23880 0 : return JS_TRUE;
23881 : }
23882 :
23883 : static JSBool
23884 0 : nsIDOMWebGLRenderingContext_GetParameter(JSContext *cx, unsigned argc, jsval *vp)
23885 : {
23886 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23887 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23888 0 : if (!obj)
23889 0 : return JS_FALSE;
23890 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23891 : nsIDOMWebGLRenderingContext *self;
23892 0 : xpc_qsSelfRef selfref;
23893 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23894 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23895 0 : return JS_FALSE;
23896 0 : if (argc < 1)
23897 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23898 0 : jsval *argv = JS_ARGV(cx, vp);
23899 : uint32_t arg0;
23900 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23901 0 : return JS_FALSE;
23902 : nsresult rv;
23903 0 : nsCOMPtr<nsIVariant> result;
23904 0 : rv = self->GetParameter(arg0, getter_AddRefs(result));
23905 0 : if (NS_FAILED(rv))
23906 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23907 0 : return xpc_qsVariantToJsval(lccx, result, vp);
23908 : }
23909 :
23910 : static JSBool
23911 0 : nsIDOMWebGLRenderingContext_GetBufferParameter(JSContext *cx, unsigned argc, jsval *vp)
23912 : {
23913 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23914 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23915 0 : if (!obj)
23916 0 : return JS_FALSE;
23917 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23918 : nsIDOMWebGLRenderingContext *self;
23919 0 : xpc_qsSelfRef selfref;
23920 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23921 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23922 0 : return JS_FALSE;
23923 0 : if (argc < 2)
23924 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23925 0 : jsval *argv = JS_ARGV(cx, vp);
23926 : uint32_t arg0;
23927 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23928 0 : return JS_FALSE;
23929 : uint32_t arg1;
23930 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23931 0 : return JS_FALSE;
23932 : nsresult rv;
23933 0 : nsCOMPtr<nsIVariant> result;
23934 0 : rv = self->GetBufferParameter(arg0, arg1, getter_AddRefs(result));
23935 0 : if (NS_FAILED(rv))
23936 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23937 0 : return xpc_qsVariantToJsval(lccx, result, vp);
23938 : }
23939 :
23940 : static JSBool
23941 0 : nsIDOMWebGLRenderingContext_GetError(JSContext *cx, unsigned argc, jsval *vp)
23942 : {
23943 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23944 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23945 0 : if (!obj)
23946 0 : return JS_FALSE;
23947 : nsIDOMWebGLRenderingContext *self;
23948 0 : xpc_qsSelfRef selfref;
23949 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23950 0 : return JS_FALSE;
23951 : nsresult rv;
23952 : WebGLenum result;
23953 0 : rv = self->GetError(&result);
23954 0 : if (NS_FAILED(rv))
23955 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23956 0 : *vp = UINT_TO_JSVAL(result);
23957 0 : return JS_TRUE;
23958 : }
23959 :
23960 : static JSBool
23961 0 : nsIDOMWebGLRenderingContext_GetFramebufferAttachmentParameter(JSContext *cx, unsigned argc, jsval *vp)
23962 : {
23963 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23964 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23965 0 : if (!obj)
23966 0 : return JS_FALSE;
23967 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23968 : nsIDOMWebGLRenderingContext *self;
23969 0 : xpc_qsSelfRef selfref;
23970 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23971 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23972 0 : return JS_FALSE;
23973 0 : if (argc < 3)
23974 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23975 0 : jsval *argv = JS_ARGV(cx, vp);
23976 : uint32_t arg0;
23977 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23978 0 : return JS_FALSE;
23979 : uint32_t arg1;
23980 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23981 0 : return JS_FALSE;
23982 : uint32_t arg2;
23983 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
23984 0 : return JS_FALSE;
23985 : nsresult rv;
23986 0 : nsCOMPtr<nsIVariant> result;
23987 0 : rv = self->GetFramebufferAttachmentParameter(arg0, arg1, arg2, getter_AddRefs(result));
23988 0 : if (NS_FAILED(rv))
23989 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23990 0 : return xpc_qsVariantToJsval(lccx, result, vp);
23991 : }
23992 :
23993 : static JSBool
23994 0 : nsIDOMWebGLRenderingContext_GetProgramParameter(JSContext *cx, unsigned argc, jsval *vp)
23995 : {
23996 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23997 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23998 0 : if (!obj)
23999 0 : return JS_FALSE;
24000 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24001 : nsIDOMWebGLRenderingContext *self;
24002 0 : xpc_qsSelfRef selfref;
24003 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24004 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24005 0 : return JS_FALSE;
24006 0 : if (argc < 2)
24007 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24008 0 : jsval *argv = JS_ARGV(cx, vp);
24009 : nsresult rv;
24010 : nsIWebGLProgram *arg0;
24011 0 : xpc_qsSelfRef arg0ref;
24012 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24013 0 : if (NS_FAILED(rv)) {
24014 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24015 0 : return JS_FALSE;
24016 : }
24017 : uint32_t arg1;
24018 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24019 0 : return JS_FALSE;
24020 0 : nsCOMPtr<nsIVariant> result;
24021 0 : rv = self->GetProgramParameter(arg0, arg1, getter_AddRefs(result));
24022 0 : if (NS_FAILED(rv))
24023 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24024 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24025 : }
24026 :
24027 : static JSBool
24028 0 : nsIDOMWebGLRenderingContext_GetProgramInfoLog(JSContext *cx, unsigned argc, jsval *vp)
24029 : {
24030 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24031 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24032 0 : if (!obj)
24033 0 : return JS_FALSE;
24034 : nsIDOMWebGLRenderingContext *self;
24035 0 : xpc_qsSelfRef selfref;
24036 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24037 0 : return JS_FALSE;
24038 0 : if (argc < 1)
24039 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24040 0 : jsval *argv = JS_ARGV(cx, vp);
24041 : nsresult rv;
24042 : nsIWebGLProgram *arg0;
24043 0 : xpc_qsSelfRef arg0ref;
24044 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24045 0 : if (NS_FAILED(rv)) {
24046 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24047 0 : return JS_FALSE;
24048 : }
24049 0 : nsString result;
24050 0 : rv = self->GetProgramInfoLog(arg0, result);
24051 0 : if (NS_FAILED(rv))
24052 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24053 0 : return xpc::StringToJsval(cx, result, vp);
24054 : }
24055 :
24056 : static JSBool
24057 0 : nsIDOMWebGLRenderingContext_GetRenderbufferParameter(JSContext *cx, unsigned argc, jsval *vp)
24058 : {
24059 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24060 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24061 0 : if (!obj)
24062 0 : return JS_FALSE;
24063 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24064 : nsIDOMWebGLRenderingContext *self;
24065 0 : xpc_qsSelfRef selfref;
24066 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24067 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24068 0 : return JS_FALSE;
24069 0 : if (argc < 2)
24070 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24071 0 : jsval *argv = JS_ARGV(cx, vp);
24072 : uint32_t arg0;
24073 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24074 0 : return JS_FALSE;
24075 : uint32_t arg1;
24076 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24077 0 : return JS_FALSE;
24078 : nsresult rv;
24079 0 : nsCOMPtr<nsIVariant> result;
24080 0 : rv = self->GetRenderbufferParameter(arg0, arg1, getter_AddRefs(result));
24081 0 : if (NS_FAILED(rv))
24082 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24083 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24084 : }
24085 :
24086 : static JSBool
24087 0 : nsIDOMWebGLRenderingContext_GetShaderParameter(JSContext *cx, unsigned argc, jsval *vp)
24088 : {
24089 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24090 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24091 0 : if (!obj)
24092 0 : return JS_FALSE;
24093 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24094 : nsIDOMWebGLRenderingContext *self;
24095 0 : xpc_qsSelfRef selfref;
24096 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24097 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24098 0 : return JS_FALSE;
24099 0 : if (argc < 2)
24100 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24101 0 : jsval *argv = JS_ARGV(cx, vp);
24102 : nsresult rv;
24103 : nsIWebGLShader *arg0;
24104 0 : xpc_qsSelfRef arg0ref;
24105 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24106 0 : if (NS_FAILED(rv)) {
24107 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24108 0 : return JS_FALSE;
24109 : }
24110 : uint32_t arg1;
24111 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24112 0 : return JS_FALSE;
24113 0 : nsCOMPtr<nsIVariant> result;
24114 0 : rv = self->GetShaderParameter(arg0, arg1, getter_AddRefs(result));
24115 0 : if (NS_FAILED(rv))
24116 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24117 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24118 : }
24119 :
24120 : static JSBool
24121 0 : nsIDOMWebGLRenderingContext_GetShaderInfoLog(JSContext *cx, unsigned argc, jsval *vp)
24122 : {
24123 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24124 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24125 0 : if (!obj)
24126 0 : return JS_FALSE;
24127 : nsIDOMWebGLRenderingContext *self;
24128 0 : xpc_qsSelfRef selfref;
24129 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24130 0 : return JS_FALSE;
24131 0 : if (argc < 1)
24132 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24133 0 : jsval *argv = JS_ARGV(cx, vp);
24134 : nsresult rv;
24135 : nsIWebGLShader *arg0;
24136 0 : xpc_qsSelfRef arg0ref;
24137 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24138 0 : if (NS_FAILED(rv)) {
24139 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24140 0 : return JS_FALSE;
24141 : }
24142 0 : nsString result;
24143 0 : rv = self->GetShaderInfoLog(arg0, result);
24144 0 : if (NS_FAILED(rv))
24145 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24146 0 : return xpc::StringToJsval(cx, result, vp);
24147 : }
24148 :
24149 : static JSBool
24150 0 : nsIDOMWebGLRenderingContext_GetShaderPrecisionFormat(JSContext *cx, unsigned argc, jsval *vp)
24151 : {
24152 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24153 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24154 0 : if (!obj)
24155 0 : return JS_FALSE;
24156 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24157 : nsIDOMWebGLRenderingContext *self;
24158 0 : xpc_qsSelfRef selfref;
24159 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24160 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24161 0 : return JS_FALSE;
24162 0 : if (argc < 2)
24163 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24164 0 : jsval *argv = JS_ARGV(cx, vp);
24165 : uint32_t arg0;
24166 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24167 0 : return JS_FALSE;
24168 : uint32_t arg1;
24169 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24170 0 : return JS_FALSE;
24171 : nsresult rv;
24172 0 : nsCOMPtr<nsIWebGLShaderPrecisionFormat> result;
24173 0 : rv = self->GetShaderPrecisionFormat(arg0, arg1, getter_AddRefs(result));
24174 0 : if (NS_FAILED(rv))
24175 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24176 0 : if (!result) {
24177 0 : *vp = JSVAL_NULL;
24178 0 : return JS_TRUE;
24179 : }
24180 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
24181 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
24182 0 : return JS_TRUE;
24183 : }
24184 : // After this point do not use 'result'!
24185 0 : qsObjectHelper helper(result, cache);
24186 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLShaderPrecisionFormat), &interfaces[k_nsIWebGLShaderPrecisionFormat], vp);
24187 : }
24188 :
24189 : static JSBool
24190 0 : nsIDOMWebGLRenderingContext_GetShaderSource(JSContext *cx, unsigned argc, jsval *vp)
24191 : {
24192 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24193 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24194 0 : if (!obj)
24195 0 : return JS_FALSE;
24196 : nsIDOMWebGLRenderingContext *self;
24197 0 : xpc_qsSelfRef selfref;
24198 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24199 0 : return JS_FALSE;
24200 0 : if (argc < 1)
24201 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24202 0 : jsval *argv = JS_ARGV(cx, vp);
24203 : nsresult rv;
24204 : nsIWebGLShader *arg0;
24205 0 : xpc_qsSelfRef arg0ref;
24206 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24207 0 : if (NS_FAILED(rv)) {
24208 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24209 0 : return JS_FALSE;
24210 : }
24211 0 : nsString result;
24212 0 : rv = self->GetShaderSource(arg0, result);
24213 0 : if (NS_FAILED(rv))
24214 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24215 0 : return xpc::StringToJsval(cx, result, vp);
24216 : }
24217 :
24218 : static JSBool
24219 0 : nsIDOMWebGLRenderingContext_GetTexParameter(JSContext *cx, unsigned argc, jsval *vp)
24220 : {
24221 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24222 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24223 0 : if (!obj)
24224 0 : return JS_FALSE;
24225 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24226 : nsIDOMWebGLRenderingContext *self;
24227 0 : xpc_qsSelfRef selfref;
24228 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24229 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24230 0 : return JS_FALSE;
24231 0 : if (argc < 2)
24232 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24233 0 : jsval *argv = JS_ARGV(cx, vp);
24234 : uint32_t arg0;
24235 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24236 0 : return JS_FALSE;
24237 : uint32_t arg1;
24238 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24239 0 : return JS_FALSE;
24240 : nsresult rv;
24241 0 : nsCOMPtr<nsIVariant> result;
24242 0 : rv = self->GetTexParameter(arg0, arg1, getter_AddRefs(result));
24243 0 : if (NS_FAILED(rv))
24244 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24245 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24246 : }
24247 :
24248 : static JSBool
24249 0 : nsIDOMWebGLRenderingContext_GetUniform(JSContext *cx, unsigned argc, jsval *vp)
24250 : {
24251 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24252 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24253 0 : if (!obj)
24254 0 : return JS_FALSE;
24255 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24256 : nsIDOMWebGLRenderingContext *self;
24257 0 : xpc_qsSelfRef selfref;
24258 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24259 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24260 0 : return JS_FALSE;
24261 0 : if (argc < 2)
24262 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24263 0 : jsval *argv = JS_ARGV(cx, vp);
24264 : nsresult rv;
24265 : nsIWebGLProgram *arg0;
24266 0 : xpc_qsSelfRef arg0ref;
24267 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24268 0 : if (NS_FAILED(rv)) {
24269 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24270 0 : return JS_FALSE;
24271 : }
24272 : nsIWebGLUniformLocation *arg1;
24273 0 : xpc_qsSelfRef arg1ref;
24274 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
24275 0 : if (NS_FAILED(rv)) {
24276 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
24277 0 : return JS_FALSE;
24278 : }
24279 0 : nsCOMPtr<nsIVariant> result;
24280 0 : rv = self->GetUniform(arg0, arg1, getter_AddRefs(result));
24281 0 : if (NS_FAILED(rv))
24282 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24283 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24284 : }
24285 :
24286 : static JSBool
24287 0 : nsIDOMWebGLRenderingContext_GetUniformLocation(JSContext *cx, unsigned argc, jsval *vp)
24288 : {
24289 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24290 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24291 0 : if (!obj)
24292 0 : return JS_FALSE;
24293 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24294 : nsIDOMWebGLRenderingContext *self;
24295 0 : xpc_qsSelfRef selfref;
24296 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24297 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24298 0 : return JS_FALSE;
24299 0 : if (argc < 2)
24300 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24301 0 : jsval *argv = JS_ARGV(cx, vp);
24302 : nsresult rv;
24303 : nsIWebGLProgram *arg0;
24304 0 : xpc_qsSelfRef arg0ref;
24305 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24306 0 : if (NS_FAILED(rv)) {
24307 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24308 0 : return JS_FALSE;
24309 : }
24310 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
24311 : xpc_qsDOMString::eDefaultNullBehavior,
24312 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
24313 0 : if (!arg1.IsValid())
24314 0 : return JS_FALSE;
24315 0 : nsCOMPtr<nsIWebGLUniformLocation> result;
24316 0 : rv = self->GetUniformLocation(arg0, arg1, getter_AddRefs(result));
24317 0 : if (NS_FAILED(rv))
24318 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24319 0 : if (!result) {
24320 0 : *vp = JSVAL_NULL;
24321 0 : return JS_TRUE;
24322 : }
24323 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
24324 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
24325 0 : return JS_TRUE;
24326 : }
24327 : // After this point do not use 'result'!
24328 0 : qsObjectHelper helper(result, cache);
24329 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLUniformLocation), &interfaces[k_nsIWebGLUniformLocation], vp);
24330 : }
24331 :
24332 : static JSBool
24333 0 : nsIDOMWebGLRenderingContext_GetVertexAttrib(JSContext *cx, unsigned argc, jsval *vp)
24334 : {
24335 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24336 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24337 0 : if (!obj)
24338 0 : return JS_FALSE;
24339 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24340 : nsIDOMWebGLRenderingContext *self;
24341 0 : xpc_qsSelfRef selfref;
24342 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24343 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24344 0 : return JS_FALSE;
24345 0 : if (argc < 2)
24346 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24347 0 : jsval *argv = JS_ARGV(cx, vp);
24348 : uint32_t arg0;
24349 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24350 0 : return JS_FALSE;
24351 : uint32_t arg1;
24352 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24353 0 : return JS_FALSE;
24354 : nsresult rv;
24355 0 : nsCOMPtr<nsIVariant> result;
24356 0 : rv = self->GetVertexAttrib(arg0, arg1, getter_AddRefs(result));
24357 0 : if (NS_FAILED(rv))
24358 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24359 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24360 : }
24361 :
24362 : static JSBool
24363 0 : nsIDOMWebGLRenderingContext_GetVertexAttribOffset(JSContext *cx, unsigned argc, jsval *vp)
24364 : {
24365 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24366 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24367 0 : if (!obj)
24368 0 : return JS_FALSE;
24369 : nsIDOMWebGLRenderingContext *self;
24370 0 : xpc_qsSelfRef selfref;
24371 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24372 0 : return JS_FALSE;
24373 0 : if (argc < 2)
24374 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24375 0 : jsval *argv = JS_ARGV(cx, vp);
24376 : uint32_t arg0;
24377 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24378 0 : return JS_FALSE;
24379 : uint32_t arg1;
24380 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24381 0 : return JS_FALSE;
24382 : nsresult rv;
24383 : WebGLuint result;
24384 0 : rv = self->GetVertexAttribOffset(arg0, arg1, &result);
24385 0 : if (NS_FAILED(rv))
24386 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24387 0 : *vp = UINT_TO_JSVAL(result);
24388 0 : return JS_TRUE;
24389 : }
24390 :
24391 : static JSBool
24392 0 : nsIDOMWebGLRenderingContext_Hint(JSContext *cx, unsigned argc, jsval *vp)
24393 : {
24394 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24395 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24396 0 : if (!obj)
24397 0 : return JS_FALSE;
24398 : nsIDOMWebGLRenderingContext *self;
24399 0 : xpc_qsSelfRef selfref;
24400 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24401 0 : return JS_FALSE;
24402 0 : if (argc < 2)
24403 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24404 0 : jsval *argv = JS_ARGV(cx, vp);
24405 : uint32_t arg0;
24406 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24407 0 : return JS_FALSE;
24408 : uint32_t arg1;
24409 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24410 0 : return JS_FALSE;
24411 : nsresult rv;
24412 0 : rv = self->Hint(arg0, arg1);
24413 0 : if (NS_FAILED(rv))
24414 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24415 0 : *vp = JSVAL_VOID;
24416 0 : return JS_TRUE;
24417 : }
24418 :
24419 : static JSBool
24420 0 : nsIDOMWebGLRenderingContext_IsBuffer(JSContext *cx, unsigned argc, jsval *vp)
24421 : {
24422 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24423 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24424 0 : if (!obj)
24425 0 : return JS_FALSE;
24426 : nsIDOMWebGLRenderingContext *self;
24427 0 : xpc_qsSelfRef selfref;
24428 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24429 0 : return JS_FALSE;
24430 0 : if (argc < 1)
24431 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24432 0 : jsval *argv = JS_ARGV(cx, vp);
24433 : nsresult rv;
24434 : nsIWebGLBuffer *arg0;
24435 0 : xpc_qsSelfRef arg0ref;
24436 0 : rv = xpc_qsUnwrapArg<nsIWebGLBuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24437 0 : if (NS_FAILED(rv)) {
24438 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24439 0 : return JS_FALSE;
24440 : }
24441 : WebGLboolean result;
24442 0 : rv = self->IsBuffer(arg0, &result);
24443 0 : if (NS_FAILED(rv))
24444 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24445 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24446 0 : return JS_TRUE;
24447 : }
24448 :
24449 : static JSBool
24450 0 : nsIDOMWebGLRenderingContext_IsFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
24451 : {
24452 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24453 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24454 0 : if (!obj)
24455 0 : return JS_FALSE;
24456 : nsIDOMWebGLRenderingContext *self;
24457 0 : xpc_qsSelfRef selfref;
24458 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24459 0 : return JS_FALSE;
24460 0 : if (argc < 1)
24461 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24462 0 : jsval *argv = JS_ARGV(cx, vp);
24463 : nsresult rv;
24464 : nsIWebGLFramebuffer *arg0;
24465 0 : xpc_qsSelfRef arg0ref;
24466 0 : rv = xpc_qsUnwrapArg<nsIWebGLFramebuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24467 0 : if (NS_FAILED(rv)) {
24468 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24469 0 : return JS_FALSE;
24470 : }
24471 : WebGLboolean result;
24472 0 : rv = self->IsFramebuffer(arg0, &result);
24473 0 : if (NS_FAILED(rv))
24474 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24475 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24476 0 : return JS_TRUE;
24477 : }
24478 :
24479 : static JSBool
24480 0 : nsIDOMWebGLRenderingContext_IsProgram(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 : nsIWebGLProgram *arg0;
24495 0 : xpc_qsSelfRef arg0ref;
24496 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(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->IsProgram(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_IsRenderbuffer(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 : nsIWebGLRenderbuffer *arg0;
24525 0 : xpc_qsSelfRef arg0ref;
24526 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(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->IsRenderbuffer(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_IsShader(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 : nsIWebGLShader *arg0;
24555 0 : xpc_qsSelfRef arg0ref;
24556 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(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->IsShader(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_IsTexture(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 : nsIWebGLTexture *arg0;
24585 0 : xpc_qsSelfRef arg0ref;
24586 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(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->IsTexture(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_IsEnabled(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 : uint32_t arg0;
24614 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24615 0 : return JS_FALSE;
24616 : nsresult rv;
24617 : WebGLboolean result;
24618 0 : rv = self->IsEnabled(arg0, &result);
24619 0 : if (NS_FAILED(rv))
24620 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24621 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24622 0 : return JS_TRUE;
24623 : }
24624 :
24625 : static JSBool
24626 0 : nsIDOMWebGLRenderingContext_LineWidth(JSContext *cx, unsigned argc, jsval *vp)
24627 : {
24628 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24629 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24630 0 : if (!obj)
24631 0 : return JS_FALSE;
24632 : nsIDOMWebGLRenderingContext *self;
24633 0 : xpc_qsSelfRef selfref;
24634 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24635 0 : return JS_FALSE;
24636 0 : if (argc < 1)
24637 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24638 0 : jsval *argv = JS_ARGV(cx, vp);
24639 : double arg0_dbl;
24640 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
24641 0 : return JS_FALSE;
24642 0 : float arg0 = (float) arg0_dbl;
24643 : nsresult rv;
24644 0 : rv = self->LineWidth(arg0);
24645 0 : if (NS_FAILED(rv))
24646 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24647 0 : *vp = JSVAL_VOID;
24648 0 : return JS_TRUE;
24649 : }
24650 :
24651 : static JSBool
24652 0 : nsIDOMWebGLRenderingContext_LinkProgram(JSContext *cx, unsigned argc, jsval *vp)
24653 : {
24654 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24655 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24656 0 : if (!obj)
24657 0 : return JS_FALSE;
24658 : nsIDOMWebGLRenderingContext *self;
24659 0 : xpc_qsSelfRef selfref;
24660 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24661 0 : return JS_FALSE;
24662 0 : jsval *argv = JS_ARGV(cx, vp);
24663 : nsresult rv;
24664 : nsIWebGLProgram *arg0;
24665 0 : xpc_qsSelfRef arg0ref;
24666 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
24667 0 : if (NS_FAILED(rv)) {
24668 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24669 0 : return JS_FALSE;
24670 : }
24671 0 : rv = self->LinkProgram(arg0);
24672 0 : if (NS_FAILED(rv))
24673 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24674 0 : *vp = JSVAL_VOID;
24675 0 : return JS_TRUE;
24676 : }
24677 :
24678 : static JSBool
24679 0 : nsIDOMWebGLRenderingContext_PixelStorei(JSContext *cx, unsigned argc, jsval *vp)
24680 : {
24681 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24682 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24683 0 : if (!obj)
24684 0 : return JS_FALSE;
24685 : nsIDOMWebGLRenderingContext *self;
24686 0 : xpc_qsSelfRef selfref;
24687 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24688 0 : return JS_FALSE;
24689 0 : if (argc < 2)
24690 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24691 0 : jsval *argv = JS_ARGV(cx, vp);
24692 : uint32_t arg0;
24693 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24694 0 : return JS_FALSE;
24695 : int32_t arg1;
24696 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
24697 0 : return JS_FALSE;
24698 : nsresult rv;
24699 0 : rv = self->PixelStorei(arg0, arg1);
24700 0 : if (NS_FAILED(rv))
24701 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24702 0 : *vp = JSVAL_VOID;
24703 0 : return JS_TRUE;
24704 : }
24705 :
24706 : static JSBool
24707 0 : nsIDOMWebGLRenderingContext_PolygonOffset(JSContext *cx, unsigned argc, jsval *vp)
24708 : {
24709 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24710 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24711 0 : if (!obj)
24712 0 : return JS_FALSE;
24713 : nsIDOMWebGLRenderingContext *self;
24714 0 : xpc_qsSelfRef selfref;
24715 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24716 0 : return JS_FALSE;
24717 0 : if (argc < 2)
24718 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24719 0 : jsval *argv = JS_ARGV(cx, vp);
24720 : double arg0_dbl;
24721 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
24722 0 : return JS_FALSE;
24723 0 : float arg0 = (float) arg0_dbl;
24724 : double arg1_dbl;
24725 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
24726 0 : return JS_FALSE;
24727 0 : float arg1 = (float) arg1_dbl;
24728 : nsresult rv;
24729 0 : rv = self->PolygonOffset(arg0, arg1);
24730 0 : if (NS_FAILED(rv))
24731 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24732 0 : *vp = JSVAL_VOID;
24733 0 : return JS_TRUE;
24734 : }
24735 :
24736 : static JSBool
24737 0 : nsIDOMWebGLRenderingContext_RenderbufferStorage(JSContext *cx, unsigned argc, jsval *vp)
24738 : {
24739 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24740 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24741 0 : if (!obj)
24742 0 : return JS_FALSE;
24743 : nsIDOMWebGLRenderingContext *self;
24744 0 : xpc_qsSelfRef selfref;
24745 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24746 0 : return JS_FALSE;
24747 0 : if (argc < 4)
24748 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24749 0 : jsval *argv = JS_ARGV(cx, vp);
24750 : uint32_t arg0;
24751 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24752 0 : return JS_FALSE;
24753 : uint32_t arg1;
24754 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24755 0 : return JS_FALSE;
24756 : int32_t arg2;
24757 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
24758 0 : return JS_FALSE;
24759 : int32_t arg3;
24760 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
24761 0 : return JS_FALSE;
24762 : nsresult rv;
24763 0 : rv = self->RenderbufferStorage(arg0, arg1, arg2, arg3);
24764 0 : if (NS_FAILED(rv))
24765 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24766 0 : *vp = JSVAL_VOID;
24767 0 : return JS_TRUE;
24768 : }
24769 :
24770 : static JSBool
24771 0 : nsIDOMWebGLRenderingContext_SampleCoverage(JSContext *cx, unsigned argc, jsval *vp)
24772 : {
24773 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24774 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24775 0 : if (!obj)
24776 0 : return JS_FALSE;
24777 : nsIDOMWebGLRenderingContext *self;
24778 0 : xpc_qsSelfRef selfref;
24779 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24780 0 : return JS_FALSE;
24781 0 : if (argc < 2)
24782 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24783 0 : jsval *argv = JS_ARGV(cx, vp);
24784 : double arg0_dbl;
24785 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
24786 0 : return JS_FALSE;
24787 0 : float arg0 = (float) arg0_dbl;
24788 : JSBool arg1;
24789 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
24790 : nsresult rv;
24791 0 : rv = self->SampleCoverage(arg0, arg1);
24792 0 : if (NS_FAILED(rv))
24793 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24794 0 : *vp = JSVAL_VOID;
24795 0 : return JS_TRUE;
24796 : }
24797 :
24798 : static JSBool
24799 0 : nsIDOMWebGLRenderingContext_Scissor(JSContext *cx, unsigned argc, jsval *vp)
24800 : {
24801 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24802 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24803 0 : if (!obj)
24804 0 : return JS_FALSE;
24805 : nsIDOMWebGLRenderingContext *self;
24806 0 : xpc_qsSelfRef selfref;
24807 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24808 0 : return JS_FALSE;
24809 0 : if (argc < 4)
24810 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24811 0 : jsval *argv = JS_ARGV(cx, vp);
24812 : int32_t arg0;
24813 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
24814 0 : return JS_FALSE;
24815 : int32_t arg1;
24816 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
24817 0 : return JS_FALSE;
24818 : int32_t arg2;
24819 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
24820 0 : return JS_FALSE;
24821 : int32_t arg3;
24822 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
24823 0 : return JS_FALSE;
24824 : nsresult rv;
24825 0 : rv = self->Scissor(arg0, arg1, arg2, arg3);
24826 0 : if (NS_FAILED(rv))
24827 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24828 0 : *vp = JSVAL_VOID;
24829 0 : return JS_TRUE;
24830 : }
24831 :
24832 : static JSBool
24833 0 : nsIDOMWebGLRenderingContext_ShaderSource(JSContext *cx, unsigned argc, jsval *vp)
24834 : {
24835 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24836 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24837 0 : if (!obj)
24838 0 : return JS_FALSE;
24839 : nsIDOMWebGLRenderingContext *self;
24840 0 : xpc_qsSelfRef selfref;
24841 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24842 0 : return JS_FALSE;
24843 0 : jsval *argv = JS_ARGV(cx, vp);
24844 : nsresult rv;
24845 : nsIWebGLShader *arg0;
24846 0 : xpc_qsSelfRef arg0ref;
24847 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
24848 0 : if (NS_FAILED(rv)) {
24849 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24850 0 : return JS_FALSE;
24851 : }
24852 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
24853 : xpc_qsDOMString::eDefaultNullBehavior,
24854 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
24855 0 : if (!arg1.IsValid())
24856 0 : return JS_FALSE;
24857 0 : rv = self->ShaderSource(arg0, arg1);
24858 0 : if (NS_FAILED(rv))
24859 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24860 0 : *vp = JSVAL_VOID;
24861 0 : return JS_TRUE;
24862 : }
24863 :
24864 : static JSBool
24865 0 : nsIDOMWebGLRenderingContext_StencilFunc(JSContext *cx, unsigned argc, jsval *vp)
24866 : {
24867 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24868 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24869 0 : if (!obj)
24870 0 : return JS_FALSE;
24871 : nsIDOMWebGLRenderingContext *self;
24872 0 : xpc_qsSelfRef selfref;
24873 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24874 0 : return JS_FALSE;
24875 0 : if (argc < 3)
24876 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24877 0 : jsval *argv = JS_ARGV(cx, vp);
24878 : uint32_t arg0;
24879 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24880 0 : return JS_FALSE;
24881 : int32_t arg1;
24882 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
24883 0 : return JS_FALSE;
24884 : uint32_t arg2;
24885 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
24886 0 : return JS_FALSE;
24887 : nsresult rv;
24888 0 : rv = self->StencilFunc(arg0, arg1, arg2);
24889 0 : if (NS_FAILED(rv))
24890 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24891 0 : *vp = JSVAL_VOID;
24892 0 : return JS_TRUE;
24893 : }
24894 :
24895 : static JSBool
24896 0 : nsIDOMWebGLRenderingContext_StencilFuncSeparate(JSContext *cx, unsigned argc, jsval *vp)
24897 : {
24898 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24899 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24900 0 : if (!obj)
24901 0 : return JS_FALSE;
24902 : nsIDOMWebGLRenderingContext *self;
24903 0 : xpc_qsSelfRef selfref;
24904 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24905 0 : return JS_FALSE;
24906 0 : if (argc < 4)
24907 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24908 0 : jsval *argv = JS_ARGV(cx, vp);
24909 : uint32_t arg0;
24910 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24911 0 : return JS_FALSE;
24912 : uint32_t arg1;
24913 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24914 0 : return JS_FALSE;
24915 : int32_t arg2;
24916 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
24917 0 : return JS_FALSE;
24918 : uint32_t arg3;
24919 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3))
24920 0 : return JS_FALSE;
24921 : nsresult rv;
24922 0 : rv = self->StencilFuncSeparate(arg0, arg1, arg2, arg3);
24923 0 : if (NS_FAILED(rv))
24924 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24925 0 : *vp = JSVAL_VOID;
24926 0 : return JS_TRUE;
24927 : }
24928 :
24929 : static JSBool
24930 0 : nsIDOMWebGLRenderingContext_StencilMask(JSContext *cx, unsigned argc, jsval *vp)
24931 : {
24932 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24933 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24934 0 : if (!obj)
24935 0 : return JS_FALSE;
24936 : nsIDOMWebGLRenderingContext *self;
24937 0 : xpc_qsSelfRef selfref;
24938 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24939 0 : return JS_FALSE;
24940 0 : if (argc < 1)
24941 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24942 0 : jsval *argv = JS_ARGV(cx, vp);
24943 : uint32_t arg0;
24944 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24945 0 : return JS_FALSE;
24946 : nsresult rv;
24947 0 : rv = self->StencilMask(arg0);
24948 0 : if (NS_FAILED(rv))
24949 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24950 0 : *vp = JSVAL_VOID;
24951 0 : return JS_TRUE;
24952 : }
24953 :
24954 : static JSBool
24955 0 : nsIDOMWebGLRenderingContext_StencilMaskSeparate(JSContext *cx, unsigned argc, jsval *vp)
24956 : {
24957 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24958 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24959 0 : if (!obj)
24960 0 : return JS_FALSE;
24961 : nsIDOMWebGLRenderingContext *self;
24962 0 : xpc_qsSelfRef selfref;
24963 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24964 0 : return JS_FALSE;
24965 0 : if (argc < 2)
24966 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24967 0 : jsval *argv = JS_ARGV(cx, vp);
24968 : uint32_t arg0;
24969 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24970 0 : return JS_FALSE;
24971 : uint32_t arg1;
24972 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24973 0 : return JS_FALSE;
24974 : nsresult rv;
24975 0 : rv = self->StencilMaskSeparate(arg0, arg1);
24976 0 : if (NS_FAILED(rv))
24977 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24978 0 : *vp = JSVAL_VOID;
24979 0 : return JS_TRUE;
24980 : }
24981 :
24982 : static JSBool
24983 0 : nsIDOMWebGLRenderingContext_StencilOp(JSContext *cx, unsigned argc, jsval *vp)
24984 : {
24985 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24986 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24987 0 : if (!obj)
24988 0 : return JS_FALSE;
24989 : nsIDOMWebGLRenderingContext *self;
24990 0 : xpc_qsSelfRef selfref;
24991 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24992 0 : return JS_FALSE;
24993 0 : if (argc < 3)
24994 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24995 0 : jsval *argv = JS_ARGV(cx, vp);
24996 : uint32_t arg0;
24997 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24998 0 : return JS_FALSE;
24999 : uint32_t arg1;
25000 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25001 0 : return JS_FALSE;
25002 : uint32_t arg2;
25003 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
25004 0 : return JS_FALSE;
25005 : nsresult rv;
25006 0 : rv = self->StencilOp(arg0, arg1, arg2);
25007 0 : if (NS_FAILED(rv))
25008 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25009 0 : *vp = JSVAL_VOID;
25010 0 : return JS_TRUE;
25011 : }
25012 :
25013 : static JSBool
25014 0 : nsIDOMWebGLRenderingContext_StencilOpSeparate(JSContext *cx, unsigned argc, jsval *vp)
25015 : {
25016 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25017 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25018 0 : if (!obj)
25019 0 : return JS_FALSE;
25020 : nsIDOMWebGLRenderingContext *self;
25021 0 : xpc_qsSelfRef selfref;
25022 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25023 0 : return JS_FALSE;
25024 0 : if (argc < 4)
25025 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25026 0 : jsval *argv = JS_ARGV(cx, vp);
25027 : uint32_t arg0;
25028 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25029 0 : return JS_FALSE;
25030 : uint32_t arg1;
25031 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25032 0 : return JS_FALSE;
25033 : uint32_t arg2;
25034 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
25035 0 : return JS_FALSE;
25036 : uint32_t arg3;
25037 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3))
25038 0 : return JS_FALSE;
25039 : nsresult rv;
25040 0 : rv = self->StencilOpSeparate(arg0, arg1, arg2, arg3);
25041 0 : if (NS_FAILED(rv))
25042 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25043 0 : *vp = JSVAL_VOID;
25044 0 : return JS_TRUE;
25045 : }
25046 :
25047 : static JSBool
25048 0 : nsIDOMWebGLRenderingContext_TexParameterf(JSContext *cx, unsigned argc, jsval *vp)
25049 : {
25050 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25051 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25052 0 : if (!obj)
25053 0 : return JS_FALSE;
25054 : nsIDOMWebGLRenderingContext *self;
25055 0 : xpc_qsSelfRef selfref;
25056 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25057 0 : return JS_FALSE;
25058 0 : if (argc < 3)
25059 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25060 0 : jsval *argv = JS_ARGV(cx, vp);
25061 : uint32_t arg0;
25062 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25063 0 : return JS_FALSE;
25064 : uint32_t arg1;
25065 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25066 0 : return JS_FALSE;
25067 : double arg2_dbl;
25068 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25069 0 : return JS_FALSE;
25070 0 : float arg2 = (float) arg2_dbl;
25071 : nsresult rv;
25072 0 : rv = self->TexParameterf(arg0, arg1, arg2);
25073 0 : if (NS_FAILED(rv))
25074 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25075 0 : *vp = JSVAL_VOID;
25076 0 : return JS_TRUE;
25077 : }
25078 :
25079 : static JSBool
25080 0 : nsIDOMWebGLRenderingContext_TexParameteri(JSContext *cx, unsigned argc, jsval *vp)
25081 : {
25082 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25083 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25084 0 : if (!obj)
25085 0 : return JS_FALSE;
25086 : nsIDOMWebGLRenderingContext *self;
25087 0 : xpc_qsSelfRef selfref;
25088 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25089 0 : return JS_FALSE;
25090 0 : if (argc < 3)
25091 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25092 0 : jsval *argv = JS_ARGV(cx, vp);
25093 : uint32_t arg0;
25094 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25095 0 : return JS_FALSE;
25096 : uint32_t arg1;
25097 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25098 0 : return JS_FALSE;
25099 : int32_t arg2;
25100 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25101 0 : return JS_FALSE;
25102 : nsresult rv;
25103 0 : rv = self->TexParameteri(arg0, arg1, arg2);
25104 0 : if (NS_FAILED(rv))
25105 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25106 0 : *vp = JSVAL_VOID;
25107 0 : return JS_TRUE;
25108 : }
25109 :
25110 : static JSBool
25111 0 : nsIDOMWebGLRenderingContext_Uniform1f(JSContext *cx, unsigned argc, jsval *vp)
25112 : {
25113 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25114 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25115 0 : if (!obj)
25116 0 : return JS_FALSE;
25117 : nsIDOMWebGLRenderingContext *self;
25118 0 : xpc_qsSelfRef selfref;
25119 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25120 0 : return JS_FALSE;
25121 0 : if (argc < 2)
25122 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25123 0 : jsval *argv = JS_ARGV(cx, vp);
25124 : nsresult rv;
25125 : nsIWebGLUniformLocation *arg0;
25126 0 : xpc_qsSelfRef arg0ref;
25127 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25128 0 : if (NS_FAILED(rv)) {
25129 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25130 0 : return JS_FALSE;
25131 : }
25132 : double arg1_dbl;
25133 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25134 0 : return JS_FALSE;
25135 0 : float arg1 = (float) arg1_dbl;
25136 0 : rv = self->Uniform1f(arg0, arg1);
25137 0 : if (NS_FAILED(rv))
25138 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25139 0 : *vp = JSVAL_VOID;
25140 0 : return JS_TRUE;
25141 : }
25142 :
25143 : static JSBool
25144 0 : nsIDOMWebGLRenderingContext_Uniform1i(JSContext *cx, unsigned argc, jsval *vp)
25145 : {
25146 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25147 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25148 0 : if (!obj)
25149 0 : return JS_FALSE;
25150 : nsIDOMWebGLRenderingContext *self;
25151 0 : xpc_qsSelfRef selfref;
25152 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25153 0 : return JS_FALSE;
25154 0 : if (argc < 2)
25155 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25156 0 : jsval *argv = JS_ARGV(cx, vp);
25157 : nsresult rv;
25158 : nsIWebGLUniformLocation *arg0;
25159 0 : xpc_qsSelfRef arg0ref;
25160 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25161 0 : if (NS_FAILED(rv)) {
25162 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25163 0 : return JS_FALSE;
25164 : }
25165 : int32_t arg1;
25166 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25167 0 : return JS_FALSE;
25168 0 : rv = self->Uniform1i(arg0, arg1);
25169 0 : if (NS_FAILED(rv))
25170 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25171 0 : *vp = JSVAL_VOID;
25172 0 : return JS_TRUE;
25173 : }
25174 :
25175 : static JSBool
25176 0 : nsIDOMWebGLRenderingContext_Uniform2f(JSContext *cx, unsigned argc, jsval *vp)
25177 : {
25178 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25179 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25180 0 : if (!obj)
25181 0 : return JS_FALSE;
25182 : nsIDOMWebGLRenderingContext *self;
25183 0 : xpc_qsSelfRef selfref;
25184 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25185 0 : return JS_FALSE;
25186 0 : if (argc < 3)
25187 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25188 0 : jsval *argv = JS_ARGV(cx, vp);
25189 : nsresult rv;
25190 : nsIWebGLUniformLocation *arg0;
25191 0 : xpc_qsSelfRef arg0ref;
25192 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25193 0 : if (NS_FAILED(rv)) {
25194 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25195 0 : return JS_FALSE;
25196 : }
25197 : double arg1_dbl;
25198 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25199 0 : return JS_FALSE;
25200 0 : float arg1 = (float) arg1_dbl;
25201 : double arg2_dbl;
25202 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25203 0 : return JS_FALSE;
25204 0 : float arg2 = (float) arg2_dbl;
25205 0 : rv = self->Uniform2f(arg0, arg1, arg2);
25206 0 : if (NS_FAILED(rv))
25207 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25208 0 : *vp = JSVAL_VOID;
25209 0 : return JS_TRUE;
25210 : }
25211 :
25212 : static JSBool
25213 0 : nsIDOMWebGLRenderingContext_Uniform2i(JSContext *cx, unsigned argc, jsval *vp)
25214 : {
25215 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25216 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25217 0 : if (!obj)
25218 0 : return JS_FALSE;
25219 : nsIDOMWebGLRenderingContext *self;
25220 0 : xpc_qsSelfRef selfref;
25221 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25222 0 : return JS_FALSE;
25223 0 : if (argc < 3)
25224 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25225 0 : jsval *argv = JS_ARGV(cx, vp);
25226 : nsresult rv;
25227 : nsIWebGLUniformLocation *arg0;
25228 0 : xpc_qsSelfRef arg0ref;
25229 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25230 0 : if (NS_FAILED(rv)) {
25231 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25232 0 : return JS_FALSE;
25233 : }
25234 : int32_t arg1;
25235 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25236 0 : return JS_FALSE;
25237 : int32_t arg2;
25238 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25239 0 : return JS_FALSE;
25240 0 : rv = self->Uniform2i(arg0, arg1, arg2);
25241 0 : if (NS_FAILED(rv))
25242 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25243 0 : *vp = JSVAL_VOID;
25244 0 : return JS_TRUE;
25245 : }
25246 :
25247 : static JSBool
25248 0 : nsIDOMWebGLRenderingContext_Uniform3f(JSContext *cx, unsigned argc, jsval *vp)
25249 : {
25250 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25251 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25252 0 : if (!obj)
25253 0 : return JS_FALSE;
25254 : nsIDOMWebGLRenderingContext *self;
25255 0 : xpc_qsSelfRef selfref;
25256 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25257 0 : return JS_FALSE;
25258 0 : if (argc < 4)
25259 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25260 0 : jsval *argv = JS_ARGV(cx, vp);
25261 : nsresult rv;
25262 : nsIWebGLUniformLocation *arg0;
25263 0 : xpc_qsSelfRef arg0ref;
25264 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25265 0 : if (NS_FAILED(rv)) {
25266 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25267 0 : return JS_FALSE;
25268 : }
25269 : double arg1_dbl;
25270 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25271 0 : return JS_FALSE;
25272 0 : float arg1 = (float) arg1_dbl;
25273 : double arg2_dbl;
25274 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25275 0 : return JS_FALSE;
25276 0 : float arg2 = (float) arg2_dbl;
25277 : double arg3_dbl;
25278 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25279 0 : return JS_FALSE;
25280 0 : float arg3 = (float) arg3_dbl;
25281 0 : rv = self->Uniform3f(arg0, arg1, arg2, arg3);
25282 0 : if (NS_FAILED(rv))
25283 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25284 0 : *vp = JSVAL_VOID;
25285 0 : return JS_TRUE;
25286 : }
25287 :
25288 : static JSBool
25289 0 : nsIDOMWebGLRenderingContext_Uniform3i(JSContext *cx, unsigned argc, jsval *vp)
25290 : {
25291 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25292 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25293 0 : if (!obj)
25294 0 : return JS_FALSE;
25295 : nsIDOMWebGLRenderingContext *self;
25296 0 : xpc_qsSelfRef selfref;
25297 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25298 0 : return JS_FALSE;
25299 0 : if (argc < 4)
25300 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25301 0 : jsval *argv = JS_ARGV(cx, vp);
25302 : nsresult rv;
25303 : nsIWebGLUniformLocation *arg0;
25304 0 : xpc_qsSelfRef arg0ref;
25305 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25306 0 : if (NS_FAILED(rv)) {
25307 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25308 0 : return JS_FALSE;
25309 : }
25310 : int32_t arg1;
25311 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25312 0 : return JS_FALSE;
25313 : int32_t arg2;
25314 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25315 0 : return JS_FALSE;
25316 : int32_t arg3;
25317 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
25318 0 : return JS_FALSE;
25319 0 : rv = self->Uniform3i(arg0, arg1, arg2, arg3);
25320 0 : if (NS_FAILED(rv))
25321 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25322 0 : *vp = JSVAL_VOID;
25323 0 : return JS_TRUE;
25324 : }
25325 :
25326 : static JSBool
25327 0 : nsIDOMWebGLRenderingContext_Uniform4f(JSContext *cx, unsigned argc, jsval *vp)
25328 : {
25329 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25330 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25331 0 : if (!obj)
25332 0 : return JS_FALSE;
25333 : nsIDOMWebGLRenderingContext *self;
25334 0 : xpc_qsSelfRef selfref;
25335 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25336 0 : return JS_FALSE;
25337 0 : if (argc < 5)
25338 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25339 0 : jsval *argv = JS_ARGV(cx, vp);
25340 : nsresult rv;
25341 : nsIWebGLUniformLocation *arg0;
25342 0 : xpc_qsSelfRef arg0ref;
25343 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25344 0 : if (NS_FAILED(rv)) {
25345 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25346 0 : return JS_FALSE;
25347 : }
25348 : double arg1_dbl;
25349 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25350 0 : return JS_FALSE;
25351 0 : float arg1 = (float) arg1_dbl;
25352 : double arg2_dbl;
25353 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25354 0 : return JS_FALSE;
25355 0 : float arg2 = (float) arg2_dbl;
25356 : double arg3_dbl;
25357 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25358 0 : return JS_FALSE;
25359 0 : float arg3 = (float) arg3_dbl;
25360 : double arg4_dbl;
25361 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
25362 0 : return JS_FALSE;
25363 0 : float arg4 = (float) arg4_dbl;
25364 0 : rv = self->Uniform4f(arg0, arg1, arg2, arg3, arg4);
25365 0 : if (NS_FAILED(rv))
25366 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25367 0 : *vp = JSVAL_VOID;
25368 0 : return JS_TRUE;
25369 : }
25370 :
25371 : static JSBool
25372 0 : nsIDOMWebGLRenderingContext_Uniform4i(JSContext *cx, unsigned argc, jsval *vp)
25373 : {
25374 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25375 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25376 0 : if (!obj)
25377 0 : return JS_FALSE;
25378 : nsIDOMWebGLRenderingContext *self;
25379 0 : xpc_qsSelfRef selfref;
25380 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25381 0 : return JS_FALSE;
25382 0 : if (argc < 5)
25383 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25384 0 : jsval *argv = JS_ARGV(cx, vp);
25385 : nsresult rv;
25386 : nsIWebGLUniformLocation *arg0;
25387 0 : xpc_qsSelfRef arg0ref;
25388 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25389 0 : if (NS_FAILED(rv)) {
25390 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25391 0 : return JS_FALSE;
25392 : }
25393 : int32_t arg1;
25394 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25395 0 : return JS_FALSE;
25396 : int32_t arg2;
25397 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25398 0 : return JS_FALSE;
25399 : int32_t arg3;
25400 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
25401 0 : return JS_FALSE;
25402 : int32_t arg4;
25403 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
25404 0 : return JS_FALSE;
25405 0 : rv = self->Uniform4i(arg0, arg1, arg2, arg3, arg4);
25406 0 : if (NS_FAILED(rv))
25407 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25408 0 : *vp = JSVAL_VOID;
25409 0 : return JS_TRUE;
25410 : }
25411 :
25412 : static JSBool
25413 0 : nsIDOMWebGLRenderingContext_UseProgram(JSContext *cx, unsigned argc, jsval *vp)
25414 : {
25415 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25416 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25417 0 : if (!obj)
25418 0 : return JS_FALSE;
25419 : nsIDOMWebGLRenderingContext *self;
25420 0 : xpc_qsSelfRef selfref;
25421 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25422 0 : return JS_FALSE;
25423 0 : if (argc < 1)
25424 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25425 0 : jsval *argv = JS_ARGV(cx, vp);
25426 : nsresult rv;
25427 : nsIWebGLProgram *arg0;
25428 0 : xpc_qsSelfRef arg0ref;
25429 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25430 0 : if (NS_FAILED(rv)) {
25431 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25432 0 : return JS_FALSE;
25433 : }
25434 0 : rv = self->UseProgram(arg0);
25435 0 : if (NS_FAILED(rv))
25436 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25437 0 : *vp = JSVAL_VOID;
25438 0 : return JS_TRUE;
25439 : }
25440 :
25441 : static JSBool
25442 0 : nsIDOMWebGLRenderingContext_ValidateProgram(JSContext *cx, unsigned argc, jsval *vp)
25443 : {
25444 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25445 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25446 0 : if (!obj)
25447 0 : return JS_FALSE;
25448 : nsIDOMWebGLRenderingContext *self;
25449 0 : xpc_qsSelfRef selfref;
25450 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25451 0 : return JS_FALSE;
25452 0 : if (argc < 1)
25453 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25454 0 : jsval *argv = JS_ARGV(cx, vp);
25455 : nsresult rv;
25456 : nsIWebGLProgram *arg0;
25457 0 : xpc_qsSelfRef arg0ref;
25458 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25459 0 : if (NS_FAILED(rv)) {
25460 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25461 0 : return JS_FALSE;
25462 : }
25463 0 : rv = self->ValidateProgram(arg0);
25464 0 : if (NS_FAILED(rv))
25465 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25466 0 : *vp = JSVAL_VOID;
25467 0 : return JS_TRUE;
25468 : }
25469 :
25470 : static JSBool
25471 0 : nsIDOMWebGLRenderingContext_VertexAttrib1f(JSContext *cx, unsigned argc, jsval *vp)
25472 : {
25473 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25474 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25475 0 : if (!obj)
25476 0 : return JS_FALSE;
25477 : nsIDOMWebGLRenderingContext *self;
25478 0 : xpc_qsSelfRef selfref;
25479 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25480 0 : return JS_FALSE;
25481 0 : if (argc < 2)
25482 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25483 0 : jsval *argv = JS_ARGV(cx, vp);
25484 : uint32_t arg0;
25485 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25486 0 : return JS_FALSE;
25487 : double arg1_dbl;
25488 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25489 0 : return JS_FALSE;
25490 0 : float arg1 = (float) arg1_dbl;
25491 : nsresult rv;
25492 0 : rv = self->VertexAttrib1f(arg0, arg1);
25493 0 : if (NS_FAILED(rv))
25494 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25495 0 : *vp = JSVAL_VOID;
25496 0 : return JS_TRUE;
25497 : }
25498 :
25499 : static JSBool
25500 0 : nsIDOMWebGLRenderingContext_VertexAttrib2f(JSContext *cx, unsigned argc, jsval *vp)
25501 : {
25502 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25503 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25504 0 : if (!obj)
25505 0 : return JS_FALSE;
25506 : nsIDOMWebGLRenderingContext *self;
25507 0 : xpc_qsSelfRef selfref;
25508 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25509 0 : return JS_FALSE;
25510 0 : if (argc < 3)
25511 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25512 0 : jsval *argv = JS_ARGV(cx, vp);
25513 : uint32_t arg0;
25514 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25515 0 : return JS_FALSE;
25516 : double arg1_dbl;
25517 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25518 0 : return JS_FALSE;
25519 0 : float arg1 = (float) arg1_dbl;
25520 : double arg2_dbl;
25521 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25522 0 : return JS_FALSE;
25523 0 : float arg2 = (float) arg2_dbl;
25524 : nsresult rv;
25525 0 : rv = self->VertexAttrib2f(arg0, arg1, arg2);
25526 0 : if (NS_FAILED(rv))
25527 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25528 0 : *vp = JSVAL_VOID;
25529 0 : return JS_TRUE;
25530 : }
25531 :
25532 : static JSBool
25533 0 : nsIDOMWebGLRenderingContext_VertexAttrib3f(JSContext *cx, unsigned argc, jsval *vp)
25534 : {
25535 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25536 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25537 0 : if (!obj)
25538 0 : return JS_FALSE;
25539 : nsIDOMWebGLRenderingContext *self;
25540 0 : xpc_qsSelfRef selfref;
25541 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25542 0 : return JS_FALSE;
25543 0 : if (argc < 4)
25544 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25545 0 : jsval *argv = JS_ARGV(cx, vp);
25546 : uint32_t arg0;
25547 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25548 0 : return JS_FALSE;
25549 : double arg1_dbl;
25550 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25551 0 : return JS_FALSE;
25552 0 : float arg1 = (float) arg1_dbl;
25553 : double arg2_dbl;
25554 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25555 0 : return JS_FALSE;
25556 0 : float arg2 = (float) arg2_dbl;
25557 : double arg3_dbl;
25558 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25559 0 : return JS_FALSE;
25560 0 : float arg3 = (float) arg3_dbl;
25561 : nsresult rv;
25562 0 : rv = self->VertexAttrib3f(arg0, arg1, arg2, arg3);
25563 0 : if (NS_FAILED(rv))
25564 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25565 0 : *vp = JSVAL_VOID;
25566 0 : return JS_TRUE;
25567 : }
25568 :
25569 : static JSBool
25570 0 : nsIDOMWebGLRenderingContext_VertexAttrib4f(JSContext *cx, unsigned argc, jsval *vp)
25571 : {
25572 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25573 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25574 0 : if (!obj)
25575 0 : return JS_FALSE;
25576 : nsIDOMWebGLRenderingContext *self;
25577 0 : xpc_qsSelfRef selfref;
25578 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25579 0 : return JS_FALSE;
25580 0 : if (argc < 5)
25581 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25582 0 : jsval *argv = JS_ARGV(cx, vp);
25583 : uint32_t arg0;
25584 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25585 0 : return JS_FALSE;
25586 : double arg1_dbl;
25587 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25588 0 : return JS_FALSE;
25589 0 : float arg1 = (float) arg1_dbl;
25590 : double arg2_dbl;
25591 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25592 0 : return JS_FALSE;
25593 0 : float arg2 = (float) arg2_dbl;
25594 : double arg3_dbl;
25595 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25596 0 : return JS_FALSE;
25597 0 : float arg3 = (float) arg3_dbl;
25598 : double arg4_dbl;
25599 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
25600 0 : return JS_FALSE;
25601 0 : float arg4 = (float) arg4_dbl;
25602 : nsresult rv;
25603 0 : rv = self->VertexAttrib4f(arg0, arg1, arg2, arg3, arg4);
25604 0 : if (NS_FAILED(rv))
25605 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25606 0 : *vp = JSVAL_VOID;
25607 0 : return JS_TRUE;
25608 : }
25609 :
25610 : static JSBool
25611 0 : nsIDOMWebGLRenderingContext_VertexAttribPointer(JSContext *cx, unsigned argc, jsval *vp)
25612 : {
25613 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25614 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25615 0 : if (!obj)
25616 0 : return JS_FALSE;
25617 : nsIDOMWebGLRenderingContext *self;
25618 0 : xpc_qsSelfRef selfref;
25619 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25620 0 : return JS_FALSE;
25621 0 : if (argc < 6)
25622 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25623 0 : jsval *argv = JS_ARGV(cx, vp);
25624 : uint32_t arg0;
25625 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25626 0 : return JS_FALSE;
25627 : int32_t arg1;
25628 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25629 0 : return JS_FALSE;
25630 : uint32_t arg2;
25631 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
25632 0 : return JS_FALSE;
25633 : JSBool arg3;
25634 0 : JS_ValueToBoolean(cx, argv[3], &arg3);
25635 : int32_t arg4;
25636 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
25637 0 : return JS_FALSE;
25638 : int32_t arg5;
25639 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
25640 0 : return JS_FALSE;
25641 : nsresult rv;
25642 0 : rv = self->VertexAttribPointer(arg0, arg1, arg2, arg3, arg4, arg5);
25643 0 : if (NS_FAILED(rv))
25644 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25645 0 : *vp = JSVAL_VOID;
25646 0 : return JS_TRUE;
25647 : }
25648 :
25649 : static JSBool
25650 0 : nsIDOMWebGLRenderingContext_Viewport(JSContext *cx, unsigned argc, jsval *vp)
25651 : {
25652 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25653 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25654 0 : if (!obj)
25655 0 : return JS_FALSE;
25656 : nsIDOMWebGLRenderingContext *self;
25657 0 : xpc_qsSelfRef selfref;
25658 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25659 0 : return JS_FALSE;
25660 0 : if (argc < 4)
25661 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25662 0 : jsval *argv = JS_ARGV(cx, vp);
25663 : int32_t arg0;
25664 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
25665 0 : return JS_FALSE;
25666 : int32_t arg1;
25667 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25668 0 : return JS_FALSE;
25669 : int32_t arg2;
25670 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25671 0 : return JS_FALSE;
25672 : int32_t arg3;
25673 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
25674 0 : return JS_FALSE;
25675 : nsresult rv;
25676 0 : rv = self->Viewport(arg0, arg1, arg2, arg3);
25677 0 : if (NS_FAILED(rv))
25678 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25679 0 : *vp = JSVAL_VOID;
25680 0 : return JS_TRUE;
25681 : }
25682 :
25683 : static JSBool
25684 0 : nsIDOMWebGLRenderingContext_GetExtension(JSContext *cx, unsigned argc, jsval *vp)
25685 : {
25686 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25687 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25688 0 : if (!obj)
25689 0 : return JS_FALSE;
25690 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
25691 : nsIDOMWebGLRenderingContext *self;
25692 0 : xpc_qsSelfRef selfref;
25693 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25694 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
25695 0 : return JS_FALSE;
25696 0 : if (argc < 1)
25697 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25698 0 : jsval *argv = JS_ARGV(cx, vp);
25699 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
25700 : xpc_qsDOMString::eDefaultNullBehavior,
25701 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
25702 0 : if (!arg0.IsValid())
25703 0 : return JS_FALSE;
25704 : nsresult rv;
25705 0 : nsCOMPtr<nsIWebGLExtension> result;
25706 0 : rv = self->GetExtension(arg0, getter_AddRefs(result));
25707 0 : if (NS_FAILED(rv))
25708 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25709 0 : if (!result) {
25710 0 : *vp = JSVAL_NULL;
25711 0 : return JS_TRUE;
25712 : }
25713 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
25714 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
25715 0 : return JS_TRUE;
25716 : }
25717 : // After this point do not use 'result'!
25718 0 : qsObjectHelper helper(result, cache);
25719 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLExtension), &interfaces[k_nsIWebGLExtension], vp);
25720 : }
25721 :
25722 : static JSBool
25723 0 : nsIDOMWebGLRenderingContext_GetSupportedExtensions(JSContext *cx, unsigned argc, jsval *vp)
25724 : {
25725 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25726 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25727 0 : if (!obj)
25728 0 : return JS_FALSE;
25729 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
25730 : nsIDOMWebGLRenderingContext *self;
25731 0 : xpc_qsSelfRef selfref;
25732 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25733 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
25734 0 : return JS_FALSE;
25735 : nsresult rv;
25736 0 : nsCOMPtr<nsIVariant> result;
25737 0 : rv = self->GetSupportedExtensions(getter_AddRefs(result));
25738 0 : if (NS_FAILED(rv))
25739 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25740 0 : return xpc_qsVariantToJsval(lccx, result, vp);
25741 : }
25742 :
25743 : static JSBool
25744 0 : nsIDOMWebGLRenderingContext_IsContextLost(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 : nsIDOMWebGLRenderingContext *self;
25751 0 : xpc_qsSelfRef selfref;
25752 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25753 0 : return JS_FALSE;
25754 : nsresult rv;
25755 : WebGLboolean result;
25756 0 : rv = self->IsContextLost(&result);
25757 0 : if (NS_FAILED(rv))
25758 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25759 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
25760 0 : return JS_TRUE;
25761 : }
25762 :
25763 : static JSBool
25764 0 : nsIDOMWebGLRenderingContext_GetDrawingBufferWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25765 : {
25766 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25767 : nsIDOMWebGLRenderingContext *self;
25768 0 : xpc_qsSelfRef selfref;
25769 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25770 0 : return JS_FALSE;
25771 : nsresult rv;
25772 : WebGLsizei result;
25773 0 : rv = self->GetDrawingBufferWidth(&result);
25774 0 : if (NS_FAILED(rv))
25775 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25776 0 : *vp = INT_TO_JSVAL(result);
25777 0 : return JS_TRUE;
25778 : }
25779 :
25780 : static JSBool
25781 0 : nsIDOMWebGLRenderingContext_GetDrawingBufferHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25782 : {
25783 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25784 : nsIDOMWebGLRenderingContext *self;
25785 0 : xpc_qsSelfRef selfref;
25786 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25787 0 : return JS_FALSE;
25788 : nsresult rv;
25789 : WebGLsizei result;
25790 0 : rv = self->GetDrawingBufferHeight(&result);
25791 0 : if (NS_FAILED(rv))
25792 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25793 0 : *vp = INT_TO_JSVAL(result);
25794 0 : return JS_TRUE;
25795 : }
25796 :
25797 : // === interface nsIDOMNotifyAudioAvailableEvent
25798 :
25799 : static JSBool
25800 0 : nsIDOMNotifyAudioAvailableEvent_GetFrameBuffer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25801 : {
25802 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25803 : nsIDOMNotifyAudioAvailableEvent *self;
25804 0 : xpc_qsSelfRef selfref;
25805 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25806 0 : return JS_FALSE;
25807 : nsresult rv;
25808 0 : rv = self->GetFrameBuffer(cx, vp);
25809 0 : if (NS_FAILED(rv))
25810 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25811 0 : return JS_TRUE;
25812 : }
25813 :
25814 : static JSBool
25815 0 : nsIDOMNotifyAudioAvailableEvent_GetTime(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25816 : {
25817 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25818 : nsIDOMNotifyAudioAvailableEvent *self;
25819 0 : xpc_qsSelfRef selfref;
25820 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25821 0 : return JS_FALSE;
25822 : nsresult rv;
25823 : float result;
25824 0 : rv = self->GetTime(&result);
25825 0 : if (NS_FAILED(rv))
25826 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25827 0 : return JS_NewNumberValue(cx, result, vp);
25828 : }
25829 :
25830 : // === interface nsIDOMHTMLAudioElement
25831 :
25832 : static JSBool
25833 0 : nsIDOMHTMLAudioElement_MozWriteAudio(JSContext *cx, unsigned argc, jsval *vp)
25834 : {
25835 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25836 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25837 0 : if (!obj)
25838 0 : return JS_FALSE;
25839 : nsIDOMHTMLAudioElement *self;
25840 0 : xpc_qsSelfRef selfref;
25841 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25842 0 : return JS_FALSE;
25843 0 : if (argc < 1)
25844 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25845 0 : jsval *argv = JS_ARGV(cx, vp);
25846 0 : jsval arg0 = argv[0];
25847 : nsresult rv;
25848 : PRUint32 result;
25849 0 : rv = self->MozWriteAudio(arg0, cx, &result);
25850 0 : if (NS_FAILED(rv))
25851 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25852 0 : *vp = UINT_TO_JSVAL(result);
25853 0 : return JS_TRUE;
25854 : }
25855 :
25856 : // === interface nsIIDBCursor
25857 :
25858 : static JSBool
25859 0 : nsIIDBCursor_GetDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25860 : {
25861 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25862 : nsIIDBCursor *self;
25863 0 : xpc_qsSelfRef selfref;
25864 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25865 0 : return JS_FALSE;
25866 : nsresult rv;
25867 0 : nsString result;
25868 0 : rv = self->GetDirection(result);
25869 0 : if (NS_FAILED(rv))
25870 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25871 0 : return xpc::StringToJsval(cx, result, vp);
25872 : }
25873 :
25874 : static JSBool
25875 0 : nsIIDBCursor_GetSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25876 : {
25877 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25878 0 : JSObject *callee = nsnull;
25879 : nsIIDBCursor *self;
25880 0 : xpc_qsSelfRef selfref;
25881 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25882 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
25883 0 : return JS_FALSE;
25884 : nsresult rv;
25885 0 : nsCOMPtr<nsISupports> result;
25886 0 : rv = self->GetSource(getter_AddRefs(result));
25887 0 : if (NS_FAILED(rv))
25888 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25889 0 : if (!result) {
25890 0 : *vp = JSVAL_NULL;
25891 0 : return JS_TRUE;
25892 : }
25893 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
25894 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
25895 0 : return JS_TRUE;
25896 : }
25897 : // After this point do not use 'result'!
25898 0 : qsObjectHelper helper(result, cache);
25899 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
25900 : }
25901 :
25902 : static JSBool
25903 659 : nsIIDBCursor_GetKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25904 : {
25905 659 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25906 : nsIIDBCursor *self;
25907 1318 : xpc_qsSelfRef selfref;
25908 659 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25909 0 : return JS_FALSE;
25910 : nsresult rv;
25911 659 : rv = self->GetKey(cx, vp);
25912 659 : if (NS_FAILED(rv))
25913 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25914 659 : return JS_TRUE;
25915 : }
25916 :
25917 : static JSBool
25918 469 : nsIIDBCursor_GetPrimaryKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25919 : {
25920 469 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25921 : nsIIDBCursor *self;
25922 938 : xpc_qsSelfRef selfref;
25923 469 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25924 0 : return JS_FALSE;
25925 : nsresult rv;
25926 469 : rv = self->GetPrimaryKey(cx, vp);
25927 469 : if (NS_FAILED(rv))
25928 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25929 469 : return JS_TRUE;
25930 : }
25931 :
25932 : static JSBool
25933 1782 : nsIIDBCursor_Continue(JSContext *cx, unsigned argc, jsval *vp)
25934 : {
25935 1782 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25936 1782 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25937 1782 : if (!obj)
25938 0 : return JS_FALSE;
25939 : nsIIDBCursor *self;
25940 3564 : xpc_qsSelfRef selfref;
25941 1782 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25942 0 : return JS_FALSE;
25943 1782 : jsval *argv = JS_ARGV(cx, vp);
25944 1782 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
25945 : nsresult rv;
25946 1782 : rv = self->Continue(arg0, cx);
25947 1782 : if (NS_FAILED(rv))
25948 10 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25949 1772 : *vp = JSVAL_VOID;
25950 1772 : return JS_TRUE;
25951 : }
25952 :
25953 : static JSBool
25954 21 : nsIIDBCursor_Update(JSContext *cx, unsigned argc, jsval *vp)
25955 : {
25956 21 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25957 21 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25958 21 : if (!obj)
25959 0 : return JS_FALSE;
25960 21 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
25961 : nsIIDBCursor *self;
25962 42 : xpc_qsSelfRef selfref;
25963 42 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25964 21 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
25965 0 : return JS_FALSE;
25966 21 : if (argc < 1)
25967 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25968 21 : jsval *argv = JS_ARGV(cx, vp);
25969 21 : jsval arg0 = argv[0];
25970 : nsresult rv;
25971 42 : nsCOMPtr<nsIIDBRequest> result;
25972 21 : rv = self->Update(arg0, cx, getter_AddRefs(result));
25973 21 : if (NS_FAILED(rv))
25974 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25975 21 : if (!result) {
25976 0 : *vp = JSVAL_NULL;
25977 0 : return JS_TRUE;
25978 : }
25979 21 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
25980 21 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
25981 0 : return JS_TRUE;
25982 : }
25983 : // After this point do not use 'result'!
25984 42 : qsObjectHelper helper(result, cache);
25985 21 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
25986 : }
25987 :
25988 : static JSBool
25989 9 : nsIIDBCursor_Delete(JSContext *cx, unsigned argc, jsval *vp)
25990 : {
25991 9 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25992 9 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25993 9 : if (!obj)
25994 0 : return JS_FALSE;
25995 9 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
25996 : nsIIDBCursor *self;
25997 18 : xpc_qsSelfRef selfref;
25998 18 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25999 9 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26000 0 : return JS_FALSE;
26001 : nsresult rv;
26002 18 : nsCOMPtr<nsIIDBRequest> result;
26003 9 : rv = self->Delete(cx, getter_AddRefs(result));
26004 9 : if (NS_FAILED(rv))
26005 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26006 9 : if (!result) {
26007 0 : *vp = JSVAL_NULL;
26008 0 : return JS_TRUE;
26009 : }
26010 9 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26011 9 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26012 0 : return JS_TRUE;
26013 : }
26014 : // After this point do not use 'result'!
26015 18 : qsObjectHelper helper(result, cache);
26016 9 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26017 : }
26018 :
26019 : static JSBool
26020 6 : nsIIDBCursor_Advance(JSContext *cx, unsigned argc, jsval *vp)
26021 : {
26022 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26023 6 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26024 6 : if (!obj)
26025 0 : return JS_FALSE;
26026 : nsIIDBCursor *self;
26027 12 : xpc_qsSelfRef selfref;
26028 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
26029 0 : return JS_FALSE;
26030 6 : if (argc < 1)
26031 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26032 6 : jsval *argv = JS_ARGV(cx, vp);
26033 : int32_t arg0;
26034 6 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
26035 0 : return JS_FALSE;
26036 : nsresult rv;
26037 6 : rv = self->Advance(arg0);
26038 6 : if (NS_FAILED(rv))
26039 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26040 6 : *vp = JSVAL_VOID;
26041 6 : return JS_TRUE;
26042 : }
26043 :
26044 : // === interface nsIIDBCursorWithValue
26045 :
26046 : static JSBool
26047 697 : nsIIDBCursorWithValue_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26048 : {
26049 697 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26050 : nsIIDBCursorWithValue *self;
26051 1394 : xpc_qsSelfRef selfref;
26052 697 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26053 0 : return JS_FALSE;
26054 : nsresult rv;
26055 697 : rv = self->GetValue(cx, vp);
26056 697 : if (NS_FAILED(rv))
26057 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26058 697 : return JS_TRUE;
26059 : }
26060 :
26061 : // === interface nsIIDBDatabase
26062 :
26063 : static JSBool
26064 9 : nsIIDBDatabase_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26065 : {
26066 9 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26067 : nsIIDBDatabase *self;
26068 18 : xpc_qsSelfRef selfref;
26069 9 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26070 0 : return JS_FALSE;
26071 : nsresult rv;
26072 18 : nsString result;
26073 9 : rv = self->GetName(result);
26074 9 : if (NS_FAILED(rv))
26075 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26076 9 : return xpc::StringToJsval(cx, result, vp);
26077 : }
26078 :
26079 : static JSBool
26080 24 : nsIIDBDatabase_GetVersion(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26081 : {
26082 24 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26083 : nsIIDBDatabase *self;
26084 48 : xpc_qsSelfRef selfref;
26085 24 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26086 0 : return JS_FALSE;
26087 : nsresult rv;
26088 : PRUint64 result;
26089 24 : rv = self->GetVersion(&result);
26090 24 : if (NS_FAILED(rv))
26091 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26092 24 : return xpc_qsUint64ToJsval(cx, result, vp);
26093 : }
26094 :
26095 : static JSBool
26096 219 : nsIIDBDatabase_GetObjectStoreNames(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26097 : {
26098 219 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26099 219 : JSObject *callee = nsnull;
26100 : nsIIDBDatabase *self;
26101 438 : xpc_qsSelfRef selfref;
26102 438 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26103 219 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26104 0 : return JS_FALSE;
26105 : nsresult rv;
26106 438 : nsCOMPtr<nsIDOMDOMStringList> result;
26107 219 : rv = self->GetObjectStoreNames(getter_AddRefs(result));
26108 219 : if (NS_FAILED(rv))
26109 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26110 219 : if (!result) {
26111 0 : *vp = JSVAL_NULL;
26112 0 : return JS_TRUE;
26113 : }
26114 219 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26115 219 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26116 0 : return JS_TRUE;
26117 : }
26118 : // After this point do not use 'result'!
26119 438 : qsObjectHelper helper(result, cache);
26120 219 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringList), &interfaces[k_nsIDOMDOMStringList], vp);
26121 : }
26122 :
26123 : static JSBool
26124 202 : nsIIDBDatabase_CreateObjectStore(JSContext *cx, unsigned argc, jsval *vp)
26125 : {
26126 202 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26127 202 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26128 202 : if (!obj)
26129 0 : return JS_FALSE;
26130 202 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26131 : nsIIDBDatabase *self;
26132 404 : xpc_qsSelfRef selfref;
26133 404 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26134 202 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26135 0 : return JS_FALSE;
26136 202 : if (argc < 1)
26137 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26138 202 : jsval *argv = JS_ARGV(cx, vp);
26139 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
26140 : xpc_qsDOMString::eStringify,
26141 404 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26142 202 : if (!arg0.IsValid())
26143 0 : return JS_FALSE;
26144 202 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
26145 : nsresult rv;
26146 404 : nsCOMPtr<nsIIDBObjectStore> result;
26147 202 : rv = self->CreateObjectStore(arg0, arg1, cx, getter_AddRefs(result));
26148 202 : if (NS_FAILED(rv))
26149 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26150 201 : if (!result) {
26151 0 : *vp = JSVAL_NULL;
26152 0 : return JS_TRUE;
26153 : }
26154 201 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26155 201 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26156 0 : return JS_TRUE;
26157 : }
26158 : // After this point do not use 'result'!
26159 402 : qsObjectHelper helper(result, cache);
26160 201 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBObjectStore), &interfaces[k_nsIIDBObjectStore], vp);
26161 : }
26162 :
26163 : static JSBool
26164 123 : nsIIDBDatabase_DeleteObjectStore(JSContext *cx, unsigned argc, jsval *vp)
26165 : {
26166 123 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26167 123 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26168 123 : if (!obj)
26169 0 : return JS_FALSE;
26170 : nsIIDBDatabase *self;
26171 246 : xpc_qsSelfRef selfref;
26172 123 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
26173 0 : return JS_FALSE;
26174 123 : if (argc < 1)
26175 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26176 123 : jsval *argv = JS_ARGV(cx, vp);
26177 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
26178 : xpc_qsDOMString::eStringify,
26179 246 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26180 123 : if (!arg0.IsValid())
26181 0 : return JS_FALSE;
26182 : nsresult rv;
26183 123 : rv = self->DeleteObjectStore(arg0);
26184 123 : if (NS_FAILED(rv))
26185 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26186 123 : *vp = JSVAL_VOID;
26187 123 : return JS_TRUE;
26188 : }
26189 :
26190 : static JSBool
26191 471 : nsIIDBDatabase_Transaction(JSContext *cx, unsigned argc, jsval *vp)
26192 : {
26193 471 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26194 471 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26195 471 : if (!obj)
26196 0 : return JS_FALSE;
26197 471 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26198 : nsIIDBDatabase *self;
26199 942 : xpc_qsSelfRef selfref;
26200 942 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26201 471 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26202 0 : return JS_FALSE;
26203 471 : if (argc < 1)
26204 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26205 471 : jsval *argv = JS_ARGV(cx, vp);
26206 471 : jsval arg0 = argv[0];
26207 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
26208 : xpc_qsDOMString::eDefaultNullBehavior,
26209 942 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26210 471 : if (!arg1.IsValid())
26211 0 : return JS_FALSE;
26212 : nsresult rv;
26213 942 : nsCOMPtr<nsIIDBTransaction> result;
26214 471 : rv = self->Transaction(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
26215 471 : if (NS_FAILED(rv))
26216 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26217 469 : if (!result) {
26218 0 : *vp = JSVAL_NULL;
26219 0 : return JS_TRUE;
26220 : }
26221 469 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26222 469 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26223 0 : return JS_TRUE;
26224 : }
26225 : // After this point do not use 'result'!
26226 938 : qsObjectHelper helper(result, cache);
26227 469 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBTransaction), &interfaces[k_nsIIDBTransaction], vp);
26228 : }
26229 :
26230 : static JSBool
26231 25 : nsIIDBDatabase_Close(JSContext *cx, unsigned argc, jsval *vp)
26232 : {
26233 25 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26234 25 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26235 25 : if (!obj)
26236 0 : return JS_FALSE;
26237 : nsIIDBDatabase *self;
26238 50 : xpc_qsSelfRef selfref;
26239 25 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
26240 0 : return JS_FALSE;
26241 : nsresult rv;
26242 25 : rv = self->Close();
26243 25 : if (NS_FAILED(rv))
26244 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26245 25 : *vp = JSVAL_VOID;
26246 25 : return JS_TRUE;
26247 : }
26248 :
26249 : static JSBool
26250 0 : nsIIDBDatabase_GetOnabort(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26251 : {
26252 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26253 0 : JSObject *callee = nsnull;
26254 : nsIIDBDatabase *self;
26255 0 : xpc_qsSelfRef selfref;
26256 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26257 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26258 0 : return JS_FALSE;
26259 : nsresult rv;
26260 0 : nsCOMPtr<nsIDOMEventListener> result;
26261 0 : rv = self->GetOnabort(getter_AddRefs(result));
26262 0 : if (NS_FAILED(rv))
26263 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26264 0 : if (!result) {
26265 0 : *vp = JSVAL_NULL;
26266 0 : return JS_TRUE;
26267 : }
26268 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26269 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26270 0 : return JS_TRUE;
26271 : }
26272 : // After this point do not use 'result'!
26273 0 : qsObjectHelper helper(result, cache);
26274 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
26275 : }
26276 :
26277 : static JSBool
26278 1 : nsIIDBDatabase_SetOnabort(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
26279 : {
26280 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26281 : nsIIDBDatabase *self;
26282 2 : xpc_qsSelfRef selfref;
26283 2 : JS::AutoValueRooter tvr(cx);
26284 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
26285 0 : return JS_FALSE;
26286 : nsresult rv;
26287 : nsIDOMEventListener *arg0;
26288 2 : xpc_qsSelfRef arg0ref;
26289 1 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
26290 1 : if (NS_FAILED(rv)) {
26291 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26292 0 : return JS_FALSE;
26293 : }
26294 1 : rv = self->SetOnabort(arg0);
26295 1 : if (NS_FAILED(rv))
26296 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26297 1 : return JS_TRUE;
26298 : }
26299 :
26300 : static JSBool
26301 0 : nsIIDBDatabase_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26302 : {
26303 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26304 0 : JSObject *callee = nsnull;
26305 : nsIIDBDatabase *self;
26306 0 : xpc_qsSelfRef selfref;
26307 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26308 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26309 0 : return JS_FALSE;
26310 : nsresult rv;
26311 0 : nsCOMPtr<nsIDOMEventListener> result;
26312 0 : rv = self->GetOnerror(getter_AddRefs(result));
26313 0 : if (NS_FAILED(rv))
26314 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26315 0 : if (!result) {
26316 0 : *vp = JSVAL_NULL;
26317 0 : return JS_TRUE;
26318 : }
26319 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26320 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26321 0 : return JS_TRUE;
26322 : }
26323 : // After this point do not use 'result'!
26324 0 : qsObjectHelper helper(result, cache);
26325 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
26326 : }
26327 :
26328 : static JSBool
26329 13 : nsIIDBDatabase_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
26330 : {
26331 13 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26332 : nsIIDBDatabase *self;
26333 26 : xpc_qsSelfRef selfref;
26334 26 : JS::AutoValueRooter tvr(cx);
26335 13 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
26336 0 : return JS_FALSE;
26337 : nsresult rv;
26338 : nsIDOMEventListener *arg0;
26339 26 : xpc_qsSelfRef arg0ref;
26340 13 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
26341 13 : if (NS_FAILED(rv)) {
26342 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26343 0 : return JS_FALSE;
26344 : }
26345 13 : rv = self->SetOnerror(arg0);
26346 13 : if (NS_FAILED(rv))
26347 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26348 13 : return JS_TRUE;
26349 : }
26350 :
26351 : static JSBool
26352 0 : nsIIDBDatabase_GetOnversionchange(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26353 : {
26354 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26355 0 : JSObject *callee = nsnull;
26356 : nsIIDBDatabase *self;
26357 0 : xpc_qsSelfRef selfref;
26358 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26359 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26360 0 : return JS_FALSE;
26361 : nsresult rv;
26362 0 : nsCOMPtr<nsIDOMEventListener> result;
26363 0 : rv = self->GetOnversionchange(getter_AddRefs(result));
26364 0 : if (NS_FAILED(rv))
26365 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26366 0 : if (!result) {
26367 0 : *vp = JSVAL_NULL;
26368 0 : return JS_TRUE;
26369 : }
26370 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26371 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26372 0 : return JS_TRUE;
26373 : }
26374 : // After this point do not use 'result'!
26375 0 : qsObjectHelper helper(result, cache);
26376 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
26377 : }
26378 :
26379 : static JSBool
26380 1 : nsIIDBDatabase_SetOnversionchange(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
26381 : {
26382 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26383 : nsIIDBDatabase *self;
26384 2 : xpc_qsSelfRef selfref;
26385 2 : JS::AutoValueRooter tvr(cx);
26386 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
26387 0 : return JS_FALSE;
26388 : nsresult rv;
26389 : nsIDOMEventListener *arg0;
26390 2 : xpc_qsSelfRef arg0ref;
26391 1 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
26392 1 : if (NS_FAILED(rv)) {
26393 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26394 0 : return JS_FALSE;
26395 : }
26396 1 : rv = self->SetOnversionchange(arg0);
26397 1 : if (NS_FAILED(rv))
26398 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26399 1 : return JS_TRUE;
26400 : }
26401 :
26402 : // === interface nsIIDBDatabaseException
26403 :
26404 : static JSBool
26405 170 : nsIIDBDatabaseException_GetCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26406 : {
26407 170 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26408 : nsIIDBDatabaseException *self;
26409 340 : xpc_qsSelfRef selfref;
26410 170 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26411 0 : return JS_FALSE;
26412 : nsresult rv;
26413 : PRUint16 result;
26414 170 : rv = self->GetCode(&result);
26415 170 : if (NS_FAILED(rv))
26416 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26417 170 : *vp = INT_TO_JSVAL((int32_t) result);
26418 170 : return JS_TRUE;
26419 : }
26420 :
26421 : // === interface nsIIDBIndex
26422 :
26423 : static JSBool
26424 15 : nsIIDBIndex_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26425 : {
26426 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26427 : nsIIDBIndex *self;
26428 30 : xpc_qsSelfRef selfref;
26429 15 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26430 0 : return JS_FALSE;
26431 : nsresult rv;
26432 30 : nsString result;
26433 15 : rv = self->GetName(result);
26434 15 : if (NS_FAILED(rv))
26435 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26436 15 : return xpc::StringToJsval(cx, result, vp);
26437 : }
26438 :
26439 : static JSBool
26440 3 : nsIIDBIndex_GetStoreName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26441 : {
26442 3 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26443 : nsIIDBIndex *self;
26444 6 : xpc_qsSelfRef selfref;
26445 3 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26446 0 : return JS_FALSE;
26447 : nsresult rv;
26448 6 : nsString result;
26449 3 : rv = self->GetStoreName(result);
26450 3 : if (NS_FAILED(rv))
26451 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26452 3 : return xpc::StringToJsval(cx, result, vp);
26453 : }
26454 :
26455 : static JSBool
26456 15 : nsIIDBIndex_GetKeyPath(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26457 : {
26458 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26459 : nsIIDBIndex *self;
26460 30 : xpc_qsSelfRef selfref;
26461 15 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26462 0 : return JS_FALSE;
26463 : nsresult rv;
26464 15 : rv = self->GetKeyPath(cx, vp);
26465 15 : if (NS_FAILED(rv))
26466 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26467 15 : return JS_TRUE;
26468 : }
26469 :
26470 : static JSBool
26471 15 : nsIIDBIndex_GetUnique(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26472 : {
26473 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26474 : nsIIDBIndex *self;
26475 30 : xpc_qsSelfRef selfref;
26476 15 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26477 0 : return JS_FALSE;
26478 : nsresult rv;
26479 : bool result;
26480 15 : rv = self->GetUnique(&result);
26481 15 : if (NS_FAILED(rv))
26482 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26483 15 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26484 15 : return JS_TRUE;
26485 : }
26486 :
26487 : static JSBool
26488 3 : nsIIDBIndex_GetMultiEntry(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26489 : {
26490 3 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26491 : nsIIDBIndex *self;
26492 6 : xpc_qsSelfRef selfref;
26493 3 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26494 0 : return JS_FALSE;
26495 : nsresult rv;
26496 : bool result;
26497 3 : rv = self->GetMultiEntry(&result);
26498 3 : if (NS_FAILED(rv))
26499 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26500 3 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26501 3 : return JS_TRUE;
26502 : }
26503 :
26504 : static JSBool
26505 0 : nsIIDBIndex_GetObjectStore(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26506 : {
26507 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26508 0 : JSObject *callee = nsnull;
26509 : nsIIDBIndex *self;
26510 0 : xpc_qsSelfRef selfref;
26511 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26512 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26513 0 : return JS_FALSE;
26514 : nsresult rv;
26515 0 : nsCOMPtr<nsIIDBObjectStore> result;
26516 0 : rv = self->GetObjectStore(getter_AddRefs(result));
26517 0 : if (NS_FAILED(rv))
26518 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26519 0 : if (!result) {
26520 0 : *vp = JSVAL_NULL;
26521 0 : return JS_TRUE;
26522 : }
26523 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26524 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26525 0 : return JS_TRUE;
26526 : }
26527 : // After this point do not use 'result'!
26528 0 : qsObjectHelper helper(result, cache);
26529 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBObjectStore), &interfaces[k_nsIIDBObjectStore], vp);
26530 : }
26531 :
26532 : static JSBool
26533 28 : nsIIDBIndex_Get(JSContext *cx, unsigned argc, jsval *vp)
26534 : {
26535 28 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26536 28 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26537 28 : if (!obj)
26538 0 : return JS_FALSE;
26539 28 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26540 : nsIIDBIndex *self;
26541 56 : xpc_qsSelfRef selfref;
26542 56 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26543 28 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26544 0 : return JS_FALSE;
26545 28 : if (argc < 1)
26546 1 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26547 27 : jsval *argv = JS_ARGV(cx, vp);
26548 27 : jsval arg0 = argv[0];
26549 : nsresult rv;
26550 54 : nsCOMPtr<nsIIDBRequest> result;
26551 27 : rv = self->Get(arg0, cx, getter_AddRefs(result));
26552 27 : if (NS_FAILED(rv))
26553 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26554 25 : if (!result) {
26555 0 : *vp = JSVAL_NULL;
26556 0 : return JS_TRUE;
26557 : }
26558 25 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26559 25 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26560 0 : return JS_TRUE;
26561 : }
26562 : // After this point do not use 'result'!
26563 50 : qsObjectHelper helper(result, cache);
26564 25 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26565 : }
26566 :
26567 : static JSBool
26568 15 : nsIIDBIndex_GetKey(JSContext *cx, unsigned argc, jsval *vp)
26569 : {
26570 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26571 15 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26572 15 : if (!obj)
26573 0 : return JS_FALSE;
26574 15 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26575 : nsIIDBIndex *self;
26576 30 : xpc_qsSelfRef selfref;
26577 30 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26578 15 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26579 0 : return JS_FALSE;
26580 15 : if (argc < 1)
26581 1 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26582 14 : jsval *argv = JS_ARGV(cx, vp);
26583 14 : jsval arg0 = argv[0];
26584 : nsresult rv;
26585 28 : nsCOMPtr<nsIIDBRequest> result;
26586 14 : rv = self->GetKey(arg0, cx, getter_AddRefs(result));
26587 14 : if (NS_FAILED(rv))
26588 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26589 12 : if (!result) {
26590 0 : *vp = JSVAL_NULL;
26591 0 : return JS_TRUE;
26592 : }
26593 12 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26594 12 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26595 0 : return JS_TRUE;
26596 : }
26597 : // After this point do not use 'result'!
26598 24 : qsObjectHelper helper(result, cache);
26599 12 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26600 : }
26601 :
26602 : static JSBool
26603 12 : nsIIDBIndex_GetAll(JSContext *cx, unsigned argc, jsval *vp)
26604 : {
26605 12 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26606 12 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26607 12 : if (!obj)
26608 0 : return JS_FALSE;
26609 12 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26610 : nsIIDBIndex *self;
26611 24 : xpc_qsSelfRef selfref;
26612 24 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26613 12 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26614 0 : return JS_FALSE;
26615 12 : jsval *argv = JS_ARGV(cx, vp);
26616 12 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26617 : uint32_t arg1;
26618 12 : if (!JS_ValueToECMAUint32(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
26619 0 : return JS_FALSE;
26620 : nsresult rv;
26621 24 : nsCOMPtr<nsIIDBRequest> result;
26622 12 : rv = self->GetAll(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26623 12 : if (NS_FAILED(rv))
26624 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26625 12 : if (!result) {
26626 0 : *vp = JSVAL_NULL;
26627 0 : return JS_TRUE;
26628 : }
26629 12 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26630 12 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26631 0 : return JS_TRUE;
26632 : }
26633 : // After this point do not use 'result'!
26634 24 : qsObjectHelper helper(result, cache);
26635 12 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26636 : }
26637 :
26638 : static JSBool
26639 12 : nsIIDBIndex_GetAllKeys(JSContext *cx, unsigned argc, jsval *vp)
26640 : {
26641 12 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26642 12 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26643 12 : if (!obj)
26644 0 : return JS_FALSE;
26645 12 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26646 : nsIIDBIndex *self;
26647 24 : xpc_qsSelfRef selfref;
26648 24 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26649 12 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26650 0 : return JS_FALSE;
26651 12 : jsval *argv = JS_ARGV(cx, vp);
26652 12 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26653 : uint32_t arg1;
26654 12 : if (!JS_ValueToECMAUint32(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
26655 0 : return JS_FALSE;
26656 : nsresult rv;
26657 24 : nsCOMPtr<nsIIDBRequest> result;
26658 12 : rv = self->GetAllKeys(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26659 12 : if (NS_FAILED(rv))
26660 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26661 12 : if (!result) {
26662 0 : *vp = JSVAL_NULL;
26663 0 : return JS_TRUE;
26664 : }
26665 12 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26666 12 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26667 0 : return JS_TRUE;
26668 : }
26669 : // After this point do not use 'result'!
26670 24 : qsObjectHelper helper(result, cache);
26671 12 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26672 : }
26673 :
26674 : static JSBool
26675 57 : nsIIDBIndex_OpenCursor(JSContext *cx, unsigned argc, jsval *vp)
26676 : {
26677 57 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26678 57 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26679 57 : if (!obj)
26680 0 : return JS_FALSE;
26681 57 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26682 : nsIIDBIndex *self;
26683 114 : xpc_qsSelfRef selfref;
26684 114 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26685 57 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26686 0 : return JS_FALSE;
26687 57 : jsval *argv = JS_ARGV(cx, vp);
26688 57 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26689 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
26690 : xpc_qsDOMString::eDefaultNullBehavior,
26691 114 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26692 57 : if (!arg1.IsValid())
26693 0 : return JS_FALSE;
26694 : nsresult rv;
26695 114 : nsCOMPtr<nsIIDBRequest> result;
26696 57 : rv = self->OpenCursor(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26697 57 : if (NS_FAILED(rv))
26698 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26699 57 : if (!result) {
26700 0 : *vp = JSVAL_NULL;
26701 0 : return JS_TRUE;
26702 : }
26703 57 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26704 57 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26705 0 : return JS_TRUE;
26706 : }
26707 : // After this point do not use 'result'!
26708 114 : qsObjectHelper helper(result, cache);
26709 57 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26710 : }
26711 :
26712 : static JSBool
26713 89 : nsIIDBIndex_OpenKeyCursor(JSContext *cx, unsigned argc, jsval *vp)
26714 : {
26715 89 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26716 89 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26717 89 : if (!obj)
26718 0 : return JS_FALSE;
26719 89 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26720 : nsIIDBIndex *self;
26721 178 : xpc_qsSelfRef selfref;
26722 178 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26723 89 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26724 0 : return JS_FALSE;
26725 89 : jsval *argv = JS_ARGV(cx, vp);
26726 89 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26727 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
26728 : xpc_qsDOMString::eDefaultNullBehavior,
26729 178 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26730 89 : if (!arg1.IsValid())
26731 0 : return JS_FALSE;
26732 : nsresult rv;
26733 178 : nsCOMPtr<nsIIDBRequest> result;
26734 89 : rv = self->OpenKeyCursor(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26735 89 : if (NS_FAILED(rv))
26736 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26737 89 : if (!result) {
26738 0 : *vp = JSVAL_NULL;
26739 0 : return JS_TRUE;
26740 : }
26741 89 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26742 89 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26743 0 : return JS_TRUE;
26744 : }
26745 : // After this point do not use 'result'!
26746 178 : qsObjectHelper helper(result, cache);
26747 89 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26748 : }
26749 :
26750 : static JSBool
26751 39 : nsIIDBIndex_Count(JSContext *cx, unsigned argc, jsval *vp)
26752 : {
26753 39 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26754 39 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26755 39 : if (!obj)
26756 0 : return JS_FALSE;
26757 39 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26758 : nsIIDBIndex *self;
26759 78 : xpc_qsSelfRef selfref;
26760 78 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26761 39 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26762 0 : return JS_FALSE;
26763 39 : jsval *argv = JS_ARGV(cx, vp);
26764 39 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26765 : nsresult rv;
26766 78 : nsCOMPtr<nsIIDBRequest> result;
26767 39 : rv = self->Count(arg0, cx, NS_MIN<PRUint32>(argc, 1) - 0, getter_AddRefs(result));
26768 39 : if (NS_FAILED(rv))
26769 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26770 39 : if (!result) {
26771 0 : *vp = JSVAL_NULL;
26772 0 : return JS_TRUE;
26773 : }
26774 39 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26775 39 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26776 0 : return JS_TRUE;
26777 : }
26778 : // After this point do not use 'result'!
26779 78 : qsObjectHelper helper(result, cache);
26780 39 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26781 : }
26782 :
26783 : // === interface nsIIDBKeyRange
26784 :
26785 : static JSBool
26786 0 : nsIIDBKeyRange_GetLower(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26787 : {
26788 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26789 : nsIIDBKeyRange *self;
26790 0 : xpc_qsSelfRef selfref;
26791 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26792 0 : return JS_FALSE;
26793 : nsresult rv;
26794 0 : rv = self->GetLower(cx, vp);
26795 0 : if (NS_FAILED(rv))
26796 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26797 0 : return JS_TRUE;
26798 : }
26799 :
26800 : static JSBool
26801 0 : nsIIDBKeyRange_GetUpper(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26802 : {
26803 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26804 : nsIIDBKeyRange *self;
26805 0 : xpc_qsSelfRef selfref;
26806 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26807 0 : return JS_FALSE;
26808 : nsresult rv;
26809 0 : rv = self->GetUpper(cx, vp);
26810 0 : if (NS_FAILED(rv))
26811 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26812 0 : return JS_TRUE;
26813 : }
26814 :
26815 : static JSBool
26816 0 : nsIIDBKeyRange_GetLowerOpen(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26817 : {
26818 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26819 : nsIIDBKeyRange *self;
26820 0 : xpc_qsSelfRef selfref;
26821 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26822 0 : return JS_FALSE;
26823 : nsresult rv;
26824 : bool result;
26825 0 : rv = self->GetLowerOpen(&result);
26826 0 : if (NS_FAILED(rv))
26827 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26828 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26829 0 : return JS_TRUE;
26830 : }
26831 :
26832 : static JSBool
26833 0 : nsIIDBKeyRange_GetUpperOpen(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26834 : {
26835 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26836 : nsIIDBKeyRange *self;
26837 0 : xpc_qsSelfRef selfref;
26838 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26839 0 : return JS_FALSE;
26840 : nsresult rv;
26841 : bool result;
26842 0 : rv = self->GetUpperOpen(&result);
26843 0 : if (NS_FAILED(rv))
26844 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26845 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26846 0 : return JS_TRUE;
26847 : }
26848 :
26849 : // === interface nsIIDBObjectStore
26850 :
26851 : static JSBool
26852 25 : nsIIDBObjectStore_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26853 : {
26854 25 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26855 : nsIIDBObjectStore *self;
26856 50 : xpc_qsSelfRef selfref;
26857 25 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26858 0 : return JS_FALSE;
26859 : nsresult rv;
26860 50 : nsString result;
26861 25 : rv = self->GetName(result);
26862 25 : if (NS_FAILED(rv))
26863 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26864 25 : return xpc::StringToJsval(cx, result, vp);
26865 : }
26866 :
26867 : static JSBool
26868 20 : nsIIDBObjectStore_GetKeyPath(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26869 : {
26870 20 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26871 : nsIIDBObjectStore *self;
26872 40 : xpc_qsSelfRef selfref;
26873 20 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26874 0 : return JS_FALSE;
26875 : nsresult rv;
26876 20 : rv = self->GetKeyPath(cx, vp);
26877 20 : if (NS_FAILED(rv))
26878 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26879 20 : return JS_TRUE;
26880 : }
26881 :
26882 : static JSBool
26883 150 : nsIIDBObjectStore_GetIndexNames(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26884 : {
26885 150 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26886 150 : JSObject *callee = nsnull;
26887 : nsIIDBObjectStore *self;
26888 300 : xpc_qsSelfRef selfref;
26889 300 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26890 150 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26891 0 : return JS_FALSE;
26892 : nsresult rv;
26893 300 : nsCOMPtr<nsIDOMDOMStringList> result;
26894 150 : rv = self->GetIndexNames(getter_AddRefs(result));
26895 150 : if (NS_FAILED(rv))
26896 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26897 150 : if (!result) {
26898 0 : *vp = JSVAL_NULL;
26899 0 : return JS_TRUE;
26900 : }
26901 150 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26902 150 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26903 0 : return JS_TRUE;
26904 : }
26905 : // After this point do not use 'result'!
26906 300 : qsObjectHelper helper(result, cache);
26907 150 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringList), &interfaces[k_nsIDOMDOMStringList], vp);
26908 : }
26909 :
26910 : static JSBool
26911 1 : nsIIDBObjectStore_GetTransaction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26912 : {
26913 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26914 1 : JSObject *callee = nsnull;
26915 : nsIIDBObjectStore *self;
26916 2 : xpc_qsSelfRef selfref;
26917 2 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26918 1 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26919 0 : return JS_FALSE;
26920 : nsresult rv;
26921 2 : nsCOMPtr<nsIIDBTransaction> result;
26922 1 : rv = self->GetTransaction(getter_AddRefs(result));
26923 1 : if (NS_FAILED(rv))
26924 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26925 1 : if (!result) {
26926 0 : *vp = JSVAL_NULL;
26927 0 : return JS_TRUE;
26928 : }
26929 1 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26930 1 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26931 0 : return JS_TRUE;
26932 : }
26933 : // After this point do not use 'result'!
26934 2 : qsObjectHelper helper(result, cache);
26935 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBTransaction), &interfaces[k_nsIIDBTransaction], vp);
26936 : }
26937 :
26938 : static JSBool
26939 0 : nsIIDBObjectStore_GetAutoIncrement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26940 : {
26941 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26942 : nsIIDBObjectStore *self;
26943 0 : xpc_qsSelfRef selfref;
26944 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26945 0 : return JS_FALSE;
26946 : nsresult rv;
26947 : bool result;
26948 0 : rv = self->GetAutoIncrement(&result);
26949 0 : if (NS_FAILED(rv))
26950 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26951 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26952 0 : return JS_TRUE;
26953 : }
26954 :
26955 : static JSBool
26956 177 : nsIIDBObjectStore_Get(JSContext *cx, unsigned argc, jsval *vp)
26957 : {
26958 177 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26959 177 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26960 177 : if (!obj)
26961 0 : return JS_FALSE;
26962 177 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26963 : nsIIDBObjectStore *self;
26964 354 : xpc_qsSelfRef selfref;
26965 354 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26966 177 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26967 0 : return JS_FALSE;
26968 177 : if (argc < 1)
26969 1 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26970 176 : jsval *argv = JS_ARGV(cx, vp);
26971 176 : jsval arg0 = argv[0];
26972 : nsresult rv;
26973 352 : nsCOMPtr<nsIIDBRequest> result;
26974 176 : rv = self->Get(arg0, cx, getter_AddRefs(result));
26975 176 : if (NS_FAILED(rv))
26976 3 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26977 173 : if (!result) {
26978 0 : *vp = JSVAL_NULL;
26979 0 : return JS_TRUE;
26980 : }
26981 173 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26982 173 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26983 0 : return JS_TRUE;
26984 : }
26985 : // After this point do not use 'result'!
26986 346 : qsObjectHelper helper(result, cache);
26987 173 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26988 : }
26989 :
26990 : static JSBool
26991 18 : nsIIDBObjectStore_GetAll(JSContext *cx, unsigned argc, jsval *vp)
26992 : {
26993 18 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26994 18 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26995 18 : if (!obj)
26996 0 : return JS_FALSE;
26997 18 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26998 : nsIIDBObjectStore *self;
26999 36 : xpc_qsSelfRef selfref;
27000 36 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27001 18 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27002 0 : return JS_FALSE;
27003 18 : jsval *argv = JS_ARGV(cx, vp);
27004 18 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
27005 : uint32_t arg1;
27006 18 : if (!JS_ValueToECMAUint32(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
27007 0 : return JS_FALSE;
27008 : nsresult rv;
27009 36 : nsCOMPtr<nsIIDBRequest> result;
27010 18 : rv = self->GetAll(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
27011 18 : if (NS_FAILED(rv))
27012 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27013 17 : if (!result) {
27014 0 : *vp = JSVAL_NULL;
27015 0 : return JS_TRUE;
27016 : }
27017 17 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27018 17 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27019 0 : return JS_TRUE;
27020 : }
27021 : // After this point do not use 'result'!
27022 34 : qsObjectHelper helper(result, cache);
27023 17 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27024 : }
27025 :
27026 : static JSBool
27027 1827 : nsIIDBObjectStore_Add(JSContext *cx, unsigned argc, jsval *vp)
27028 : {
27029 1827 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27030 1827 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27031 1827 : if (!obj)
27032 0 : return JS_FALSE;
27033 1827 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27034 : nsIIDBObjectStore *self;
27035 3654 : xpc_qsSelfRef selfref;
27036 3654 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27037 1827 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27038 0 : return JS_FALSE;
27039 1827 : if (argc < 1)
27040 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27041 1827 : jsval *argv = JS_ARGV(cx, vp);
27042 1827 : jsval arg0 = argv[0];
27043 1827 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
27044 : nsresult rv;
27045 3654 : nsCOMPtr<nsIIDBRequest> result;
27046 1827 : rv = self->Add(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
27047 1827 : if (NS_FAILED(rv))
27048 50 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27049 1777 : if (!result) {
27050 0 : *vp = JSVAL_NULL;
27051 0 : return JS_TRUE;
27052 : }
27053 1777 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27054 1777 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27055 0 : return JS_TRUE;
27056 : }
27057 : // After this point do not use 'result'!
27058 3554 : qsObjectHelper helper(result, cache);
27059 1777 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27060 : }
27061 :
27062 : static JSBool
27063 111 : nsIIDBObjectStore_Put(JSContext *cx, unsigned argc, jsval *vp)
27064 : {
27065 111 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27066 111 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27067 111 : if (!obj)
27068 0 : return JS_FALSE;
27069 111 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27070 : nsIIDBObjectStore *self;
27071 222 : xpc_qsSelfRef selfref;
27072 222 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27073 111 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27074 0 : return JS_FALSE;
27075 111 : if (argc < 1)
27076 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27077 111 : jsval *argv = JS_ARGV(cx, vp);
27078 111 : jsval arg0 = argv[0];
27079 111 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
27080 : nsresult rv;
27081 222 : nsCOMPtr<nsIIDBRequest> result;
27082 111 : rv = self->Put(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
27083 111 : if (NS_FAILED(rv))
27084 72 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27085 39 : if (!result) {
27086 0 : *vp = JSVAL_NULL;
27087 0 : return JS_TRUE;
27088 : }
27089 39 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27090 39 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27091 0 : return JS_TRUE;
27092 : }
27093 : // After this point do not use 'result'!
27094 78 : qsObjectHelper helper(result, cache);
27095 39 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27096 : }
27097 :
27098 : static JSBool
27099 26 : nsIIDBObjectStore_Delete(JSContext *cx, unsigned argc, jsval *vp)
27100 : {
27101 26 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27102 26 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27103 26 : if (!obj)
27104 0 : return JS_FALSE;
27105 26 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27106 : nsIIDBObjectStore *self;
27107 52 : xpc_qsSelfRef selfref;
27108 52 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27109 26 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27110 0 : return JS_FALSE;
27111 26 : if (argc < 1)
27112 5 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27113 21 : jsval *argv = JS_ARGV(cx, vp);
27114 21 : jsval arg0 = argv[0];
27115 : nsresult rv;
27116 42 : nsCOMPtr<nsIIDBRequest> result;
27117 21 : rv = self->Delete(arg0, cx, getter_AddRefs(result));
27118 21 : if (NS_FAILED(rv))
27119 4 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27120 17 : if (!result) {
27121 0 : *vp = JSVAL_NULL;
27122 0 : return JS_TRUE;
27123 : }
27124 17 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27125 17 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27126 0 : return JS_TRUE;
27127 : }
27128 : // After this point do not use 'result'!
27129 34 : qsObjectHelper helper(result, cache);
27130 17 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27131 : }
27132 :
27133 : static JSBool
27134 11 : nsIIDBObjectStore_Clear(JSContext *cx, unsigned argc, jsval *vp)
27135 : {
27136 11 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27137 11 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27138 11 : if (!obj)
27139 0 : return JS_FALSE;
27140 11 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27141 : nsIIDBObjectStore *self;
27142 22 : xpc_qsSelfRef selfref;
27143 22 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27144 11 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27145 0 : return JS_FALSE;
27146 : nsresult rv;
27147 22 : nsCOMPtr<nsIIDBRequest> result;
27148 11 : rv = self->Clear(getter_AddRefs(result));
27149 11 : if (NS_FAILED(rv))
27150 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27151 10 : if (!result) {
27152 0 : *vp = JSVAL_NULL;
27153 0 : return JS_TRUE;
27154 : }
27155 10 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27156 10 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27157 0 : return JS_TRUE;
27158 : }
27159 : // After this point do not use 'result'!
27160 20 : qsObjectHelper helper(result, cache);
27161 10 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27162 : }
27163 :
27164 : static JSBool
27165 48 : nsIIDBObjectStore_OpenCursor(JSContext *cx, unsigned argc, jsval *vp)
27166 : {
27167 48 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27168 48 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27169 48 : if (!obj)
27170 0 : return JS_FALSE;
27171 48 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27172 : nsIIDBObjectStore *self;
27173 96 : xpc_qsSelfRef selfref;
27174 96 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27175 48 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27176 0 : return JS_FALSE;
27177 48 : jsval *argv = JS_ARGV(cx, vp);
27178 48 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
27179 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
27180 : xpc_qsDOMString::eDefaultNullBehavior,
27181 96 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27182 48 : if (!arg1.IsValid())
27183 0 : return JS_FALSE;
27184 : nsresult rv;
27185 96 : nsCOMPtr<nsIIDBRequest> result;
27186 48 : rv = self->OpenCursor(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
27187 48 : if (NS_FAILED(rv))
27188 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27189 47 : if (!result) {
27190 0 : *vp = JSVAL_NULL;
27191 0 : return JS_TRUE;
27192 : }
27193 47 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27194 47 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27195 0 : return JS_TRUE;
27196 : }
27197 : // After this point do not use 'result'!
27198 94 : qsObjectHelper helper(result, cache);
27199 47 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27200 : }
27201 :
27202 : static JSBool
27203 94 : nsIIDBObjectStore_CreateIndex(JSContext *cx, unsigned argc, jsval *vp)
27204 : {
27205 94 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27206 94 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27207 94 : if (!obj)
27208 0 : return JS_FALSE;
27209 94 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27210 : nsIIDBObjectStore *self;
27211 188 : xpc_qsSelfRef selfref;
27212 188 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27213 94 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27214 0 : return JS_FALSE;
27215 94 : if (argc < 2)
27216 2 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27217 92 : jsval *argv = JS_ARGV(cx, vp);
27218 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27219 : xpc_qsDOMString::eStringify,
27220 184 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27221 92 : if (!arg0.IsValid())
27222 0 : return JS_FALSE;
27223 92 : jsval arg1 = argv[1];
27224 92 : jsval arg2 = (2 < argc ? argv[2] : JSVAL_VOID);
27225 : nsresult rv;
27226 184 : nsCOMPtr<nsIIDBIndex> result;
27227 92 : rv = self->CreateIndex(arg0, arg1, arg2, cx, getter_AddRefs(result));
27228 92 : if (NS_FAILED(rv))
27229 7 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27230 85 : if (!result) {
27231 0 : *vp = JSVAL_NULL;
27232 0 : return JS_TRUE;
27233 : }
27234 85 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27235 85 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27236 0 : return JS_TRUE;
27237 : }
27238 : // After this point do not use 'result'!
27239 170 : qsObjectHelper helper(result, cache);
27240 85 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBIndex), &interfaces[k_nsIIDBIndex], vp);
27241 : }
27242 :
27243 : static JSBool
27244 94 : nsIIDBObjectStore_Index(JSContext *cx, unsigned argc, jsval *vp)
27245 : {
27246 94 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27247 94 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27248 94 : if (!obj)
27249 0 : return JS_FALSE;
27250 94 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27251 : nsIIDBObjectStore *self;
27252 188 : xpc_qsSelfRef selfref;
27253 188 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27254 94 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27255 0 : return JS_FALSE;
27256 94 : if (argc < 1)
27257 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27258 94 : jsval *argv = JS_ARGV(cx, vp);
27259 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27260 : xpc_qsDOMString::eStringify,
27261 188 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27262 94 : if (!arg0.IsValid())
27263 0 : return JS_FALSE;
27264 : nsresult rv;
27265 188 : nsCOMPtr<nsIIDBIndex> result;
27266 94 : rv = self->Index(arg0, getter_AddRefs(result));
27267 94 : if (NS_FAILED(rv))
27268 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27269 92 : if (!result) {
27270 0 : *vp = JSVAL_NULL;
27271 0 : return JS_TRUE;
27272 : }
27273 92 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27274 92 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27275 0 : return JS_TRUE;
27276 : }
27277 : // After this point do not use 'result'!
27278 184 : qsObjectHelper helper(result, cache);
27279 92 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBIndex), &interfaces[k_nsIIDBIndex], vp);
27280 : }
27281 :
27282 : static JSBool
27283 25 : nsIIDBObjectStore_DeleteIndex(JSContext *cx, unsigned argc, jsval *vp)
27284 : {
27285 25 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27286 25 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27287 25 : if (!obj)
27288 0 : return JS_FALSE;
27289 : nsIIDBObjectStore *self;
27290 50 : xpc_qsSelfRef selfref;
27291 25 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
27292 0 : return JS_FALSE;
27293 25 : if (argc < 1)
27294 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27295 25 : jsval *argv = JS_ARGV(cx, vp);
27296 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27297 : xpc_qsDOMString::eStringify,
27298 50 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27299 25 : if (!arg0.IsValid())
27300 0 : return JS_FALSE;
27301 : nsresult rv;
27302 25 : rv = self->DeleteIndex(arg0);
27303 25 : if (NS_FAILED(rv))
27304 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27305 24 : *vp = JSVAL_VOID;
27306 24 : return JS_TRUE;
27307 : }
27308 :
27309 : static JSBool
27310 32 : nsIIDBObjectStore_Count(JSContext *cx, unsigned argc, jsval *vp)
27311 : {
27312 32 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27313 32 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27314 32 : if (!obj)
27315 0 : return JS_FALSE;
27316 32 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27317 : nsIIDBObjectStore *self;
27318 64 : xpc_qsSelfRef selfref;
27319 64 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27320 32 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27321 0 : return JS_FALSE;
27322 32 : jsval *argv = JS_ARGV(cx, vp);
27323 32 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
27324 : nsresult rv;
27325 64 : nsCOMPtr<nsIIDBRequest> result;
27326 32 : rv = self->Count(arg0, cx, NS_MIN<PRUint32>(argc, 1) - 0, getter_AddRefs(result));
27327 32 : if (NS_FAILED(rv))
27328 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27329 32 : if (!result) {
27330 0 : *vp = JSVAL_NULL;
27331 0 : return JS_TRUE;
27332 : }
27333 32 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27334 32 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27335 0 : return JS_TRUE;
27336 : }
27337 : // After this point do not use 'result'!
27338 64 : qsObjectHelper helper(result, cache);
27339 32 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27340 : }
27341 :
27342 : // === interface nsIIDBRequest
27343 :
27344 : static JSBool
27345 6 : nsIIDBRequest_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27346 : {
27347 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27348 : nsIIDBRequest *self;
27349 12 : xpc_qsSelfRef selfref;
27350 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27351 0 : return JS_FALSE;
27352 : nsresult rv;
27353 12 : nsString result;
27354 6 : rv = self->GetReadyState(result);
27355 6 : if (NS_FAILED(rv))
27356 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27357 6 : return xpc::StringToJsval(cx, result, vp);
27358 : }
27359 :
27360 : static JSBool
27361 4 : nsIIDBRequest_GetSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27362 : {
27363 4 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27364 4 : JSObject *callee = nsnull;
27365 : nsIIDBRequest *self;
27366 8 : xpc_qsSelfRef selfref;
27367 8 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27368 4 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27369 0 : return JS_FALSE;
27370 : nsresult rv;
27371 8 : nsCOMPtr<nsISupports> result;
27372 4 : rv = self->GetSource(getter_AddRefs(result));
27373 4 : if (NS_FAILED(rv))
27374 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27375 4 : if (!result) {
27376 3 : *vp = JSVAL_NULL;
27377 3 : return JS_TRUE;
27378 : }
27379 1 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27380 1 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27381 0 : return JS_TRUE;
27382 : }
27383 : // After this point do not use 'result'!
27384 2 : qsObjectHelper helper(result, cache);
27385 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
27386 : }
27387 :
27388 : static JSBool
27389 588 : nsIIDBRequest_GetTransaction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27390 : {
27391 588 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27392 588 : JSObject *callee = nsnull;
27393 : nsIIDBRequest *self;
27394 1176 : xpc_qsSelfRef selfref;
27395 1176 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27396 588 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27397 0 : return JS_FALSE;
27398 : nsresult rv;
27399 1176 : nsCOMPtr<nsIIDBTransaction> result;
27400 588 : rv = self->GetTransaction(getter_AddRefs(result));
27401 588 : if (NS_FAILED(rv))
27402 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27403 588 : if (!result) {
27404 1 : *vp = JSVAL_NULL;
27405 1 : return JS_TRUE;
27406 : }
27407 587 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27408 587 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27409 0 : return JS_TRUE;
27410 : }
27411 : // After this point do not use 'result'!
27412 1174 : qsObjectHelper helper(result, cache);
27413 587 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBTransaction), &interfaces[k_nsIIDBTransaction], vp);
27414 : }
27415 :
27416 : static JSBool
27417 3099 : nsIIDBRequest_GetResult(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27418 : {
27419 3099 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27420 : nsIIDBRequest *self;
27421 6198 : xpc_qsSelfRef selfref;
27422 3099 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27423 0 : return JS_FALSE;
27424 : nsresult rv;
27425 3099 : rv = self->GetResult(vp);
27426 3099 : if (NS_FAILED(rv))
27427 1 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27428 3098 : return JS_TRUE;
27429 : }
27430 :
27431 : static JSBool
27432 19 : nsIIDBRequest_GetErrorCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27433 : {
27434 19 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27435 : nsIIDBRequest *self;
27436 38 : xpc_qsSelfRef selfref;
27437 19 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27438 0 : return JS_FALSE;
27439 : nsresult rv;
27440 : PRUint16 result;
27441 19 : rv = self->GetErrorCode(&result);
27442 19 : if (NS_FAILED(rv))
27443 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27444 19 : *vp = INT_TO_JSVAL((int32_t) result);
27445 19 : return JS_TRUE;
27446 : }
27447 :
27448 : static JSBool
27449 0 : nsIIDBRequest_GetOnsuccess(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27450 : {
27451 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27452 0 : JSObject *callee = nsnull;
27453 : nsIIDBRequest *self;
27454 0 : xpc_qsSelfRef selfref;
27455 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27456 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27457 0 : return JS_FALSE;
27458 : nsresult rv;
27459 0 : nsCOMPtr<nsIDOMEventListener> result;
27460 0 : rv = self->GetOnsuccess(getter_AddRefs(result));
27461 0 : if (NS_FAILED(rv))
27462 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27463 0 : if (!result) {
27464 0 : *vp = JSVAL_NULL;
27465 0 : return JS_TRUE;
27466 : }
27467 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27468 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27469 0 : return JS_TRUE;
27470 : }
27471 : // After this point do not use 'result'!
27472 0 : qsObjectHelper helper(result, cache);
27473 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27474 : }
27475 :
27476 : static JSBool
27477 1319 : nsIIDBRequest_SetOnsuccess(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27478 : {
27479 1319 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27480 : nsIIDBRequest *self;
27481 2638 : xpc_qsSelfRef selfref;
27482 2638 : JS::AutoValueRooter tvr(cx);
27483 1319 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27484 0 : return JS_FALSE;
27485 : nsresult rv;
27486 : nsIDOMEventListener *arg0;
27487 2638 : xpc_qsSelfRef arg0ref;
27488 1319 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27489 1319 : if (NS_FAILED(rv)) {
27490 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27491 0 : return JS_FALSE;
27492 : }
27493 1319 : rv = self->SetOnsuccess(arg0);
27494 1319 : if (NS_FAILED(rv))
27495 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27496 1319 : return JS_TRUE;
27497 : }
27498 :
27499 : static JSBool
27500 0 : nsIIDBRequest_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27501 : {
27502 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27503 0 : JSObject *callee = nsnull;
27504 : nsIIDBRequest *self;
27505 0 : xpc_qsSelfRef selfref;
27506 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27507 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27508 0 : return JS_FALSE;
27509 : nsresult rv;
27510 0 : nsCOMPtr<nsIDOMEventListener> result;
27511 0 : rv = self->GetOnerror(getter_AddRefs(result));
27512 0 : if (NS_FAILED(rv))
27513 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27514 0 : if (!result) {
27515 0 : *vp = JSVAL_NULL;
27516 0 : return JS_TRUE;
27517 : }
27518 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27519 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27520 0 : return JS_TRUE;
27521 : }
27522 : // After this point do not use 'result'!
27523 0 : qsObjectHelper helper(result, cache);
27524 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27525 : }
27526 :
27527 : static JSBool
27528 1814 : nsIIDBRequest_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27529 : {
27530 1814 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27531 : nsIIDBRequest *self;
27532 3628 : xpc_qsSelfRef selfref;
27533 3628 : JS::AutoValueRooter tvr(cx);
27534 1814 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27535 0 : return JS_FALSE;
27536 : nsresult rv;
27537 : nsIDOMEventListener *arg0;
27538 3628 : xpc_qsSelfRef arg0ref;
27539 1814 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27540 1814 : if (NS_FAILED(rv)) {
27541 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27542 0 : return JS_FALSE;
27543 : }
27544 1814 : rv = self->SetOnerror(arg0);
27545 1814 : if (NS_FAILED(rv))
27546 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27547 1814 : return JS_TRUE;
27548 : }
27549 :
27550 : // === interface nsIIDBTransaction
27551 :
27552 : static JSBool
27553 28 : nsIIDBTransaction_GetDb(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27554 : {
27555 28 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27556 28 : JSObject *callee = nsnull;
27557 : nsIIDBTransaction *self;
27558 56 : xpc_qsSelfRef selfref;
27559 56 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27560 28 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27561 0 : return JS_FALSE;
27562 : nsresult rv;
27563 56 : nsCOMPtr<nsIIDBDatabase> result;
27564 28 : rv = self->GetDb(getter_AddRefs(result));
27565 28 : if (NS_FAILED(rv))
27566 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27567 28 : if (!result) {
27568 0 : *vp = JSVAL_NULL;
27569 0 : return JS_TRUE;
27570 : }
27571 28 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27572 28 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27573 0 : return JS_TRUE;
27574 : }
27575 : // After this point do not use 'result'!
27576 56 : qsObjectHelper helper(result, cache);
27577 28 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBDatabase), &interfaces[k_nsIIDBDatabase], vp);
27578 : }
27579 :
27580 : static JSBool
27581 118 : nsIIDBTransaction_GetMode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27582 : {
27583 118 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27584 : nsIIDBTransaction *self;
27585 236 : xpc_qsSelfRef selfref;
27586 118 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27587 0 : return JS_FALSE;
27588 : nsresult rv;
27589 236 : nsString result;
27590 118 : rv = self->GetMode(result);
27591 118 : if (NS_FAILED(rv))
27592 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27593 118 : return xpc::StringToJsval(cx, result, vp);
27594 : }
27595 :
27596 : static JSBool
27597 142 : nsIIDBTransaction_GetObjectStoreNames(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27598 : {
27599 142 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27600 142 : JSObject *callee = nsnull;
27601 : nsIIDBTransaction *self;
27602 284 : xpc_qsSelfRef selfref;
27603 284 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27604 142 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27605 0 : return JS_FALSE;
27606 : nsresult rv;
27607 284 : nsCOMPtr<nsIDOMDOMStringList> result;
27608 142 : rv = self->GetObjectStoreNames(getter_AddRefs(result));
27609 142 : if (NS_FAILED(rv))
27610 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27611 142 : if (!result) {
27612 0 : *vp = JSVAL_NULL;
27613 0 : return JS_TRUE;
27614 : }
27615 142 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27616 142 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27617 0 : return JS_TRUE;
27618 : }
27619 : // After this point do not use 'result'!
27620 284 : qsObjectHelper helper(result, cache);
27621 142 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringList), &interfaces[k_nsIDOMDOMStringList], vp);
27622 : }
27623 :
27624 : static JSBool
27625 481 : nsIIDBTransaction_ObjectStore(JSContext *cx, unsigned argc, jsval *vp)
27626 : {
27627 481 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27628 481 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27629 481 : if (!obj)
27630 0 : return JS_FALSE;
27631 481 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27632 : nsIIDBTransaction *self;
27633 962 : xpc_qsSelfRef selfref;
27634 962 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27635 481 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27636 0 : return JS_FALSE;
27637 481 : if (argc < 1)
27638 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27639 481 : jsval *argv = JS_ARGV(cx, vp);
27640 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27641 : xpc_qsDOMString::eStringify,
27642 962 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27643 481 : if (!arg0.IsValid())
27644 0 : return JS_FALSE;
27645 : nsresult rv;
27646 962 : nsCOMPtr<nsIIDBObjectStore> result;
27647 481 : rv = self->ObjectStore(arg0, getter_AddRefs(result));
27648 481 : if (NS_FAILED(rv))
27649 3 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27650 478 : if (!result) {
27651 0 : *vp = JSVAL_NULL;
27652 0 : return JS_TRUE;
27653 : }
27654 478 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27655 478 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27656 0 : return JS_TRUE;
27657 : }
27658 : // After this point do not use 'result'!
27659 956 : qsObjectHelper helper(result, cache);
27660 478 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBObjectStore), &interfaces[k_nsIIDBObjectStore], vp);
27661 : }
27662 :
27663 : static JSBool
27664 14 : nsIIDBTransaction_Abort(JSContext *cx, unsigned argc, jsval *vp)
27665 : {
27666 14 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27667 14 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27668 14 : if (!obj)
27669 0 : return JS_FALSE;
27670 : nsIIDBTransaction *self;
27671 28 : xpc_qsSelfRef selfref;
27672 14 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
27673 0 : return JS_FALSE;
27674 : nsresult rv;
27675 14 : rv = self->Abort();
27676 14 : if (NS_FAILED(rv))
27677 4 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27678 10 : *vp = JSVAL_VOID;
27679 10 : return JS_TRUE;
27680 : }
27681 :
27682 : static JSBool
27683 0 : nsIIDBTransaction_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27684 : {
27685 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27686 0 : JSObject *callee = nsnull;
27687 : nsIIDBTransaction *self;
27688 0 : xpc_qsSelfRef selfref;
27689 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27690 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27691 0 : return JS_FALSE;
27692 : nsresult rv;
27693 0 : nsCOMPtr<nsIDOMEventListener> result;
27694 0 : rv = self->GetOnerror(getter_AddRefs(result));
27695 0 : if (NS_FAILED(rv))
27696 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27697 0 : if (!result) {
27698 0 : *vp = JSVAL_NULL;
27699 0 : return JS_TRUE;
27700 : }
27701 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27702 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27703 0 : return JS_TRUE;
27704 : }
27705 : // After this point do not use 'result'!
27706 0 : qsObjectHelper helper(result, cache);
27707 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27708 : }
27709 :
27710 : static JSBool
27711 0 : nsIIDBTransaction_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27712 : {
27713 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27714 : nsIIDBTransaction *self;
27715 0 : xpc_qsSelfRef selfref;
27716 0 : JS::AutoValueRooter tvr(cx);
27717 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27718 0 : return JS_FALSE;
27719 : nsresult rv;
27720 : nsIDOMEventListener *arg0;
27721 0 : xpc_qsSelfRef arg0ref;
27722 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27723 0 : if (NS_FAILED(rv)) {
27724 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27725 0 : return JS_FALSE;
27726 : }
27727 0 : rv = self->SetOnerror(arg0);
27728 0 : if (NS_FAILED(rv))
27729 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27730 0 : return JS_TRUE;
27731 : }
27732 :
27733 : static JSBool
27734 1 : nsIIDBTransaction_GetOncomplete(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27735 : {
27736 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27737 1 : JSObject *callee = nsnull;
27738 : nsIIDBTransaction *self;
27739 2 : xpc_qsSelfRef selfref;
27740 2 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27741 1 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27742 0 : return JS_FALSE;
27743 : nsresult rv;
27744 2 : nsCOMPtr<nsIDOMEventListener> result;
27745 1 : rv = self->GetOncomplete(getter_AddRefs(result));
27746 1 : if (NS_FAILED(rv))
27747 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27748 1 : if (!result) {
27749 1 : *vp = JSVAL_NULL;
27750 1 : return JS_TRUE;
27751 : }
27752 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27753 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27754 0 : return JS_TRUE;
27755 : }
27756 : // After this point do not use 'result'!
27757 0 : qsObjectHelper helper(result, cache);
27758 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27759 : }
27760 :
27761 : static JSBool
27762 277 : nsIIDBTransaction_SetOncomplete(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27763 : {
27764 277 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27765 : nsIIDBTransaction *self;
27766 554 : xpc_qsSelfRef selfref;
27767 554 : JS::AutoValueRooter tvr(cx);
27768 277 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27769 0 : return JS_FALSE;
27770 : nsresult rv;
27771 : nsIDOMEventListener *arg0;
27772 554 : xpc_qsSelfRef arg0ref;
27773 277 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27774 277 : if (NS_FAILED(rv)) {
27775 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27776 0 : return JS_FALSE;
27777 : }
27778 277 : rv = self->SetOncomplete(arg0);
27779 277 : if (NS_FAILED(rv))
27780 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27781 277 : return JS_TRUE;
27782 : }
27783 :
27784 : static JSBool
27785 2 : nsIIDBTransaction_GetOnabort(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27786 : {
27787 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27788 2 : JSObject *callee = nsnull;
27789 : nsIIDBTransaction *self;
27790 4 : xpc_qsSelfRef selfref;
27791 4 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27792 2 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27793 0 : return JS_FALSE;
27794 : nsresult rv;
27795 4 : nsCOMPtr<nsIDOMEventListener> result;
27796 2 : rv = self->GetOnabort(getter_AddRefs(result));
27797 2 : if (NS_FAILED(rv))
27798 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27799 2 : if (!result) {
27800 2 : *vp = JSVAL_NULL;
27801 2 : return JS_TRUE;
27802 : }
27803 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27804 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27805 0 : return JS_TRUE;
27806 : }
27807 : // After this point do not use 'result'!
27808 0 : qsObjectHelper helper(result, cache);
27809 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27810 : }
27811 :
27812 : static JSBool
27813 6 : nsIIDBTransaction_SetOnabort(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27814 : {
27815 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27816 : nsIIDBTransaction *self;
27817 12 : xpc_qsSelfRef selfref;
27818 12 : JS::AutoValueRooter tvr(cx);
27819 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27820 0 : return JS_FALSE;
27821 : nsresult rv;
27822 : nsIDOMEventListener *arg0;
27823 12 : xpc_qsSelfRef arg0ref;
27824 6 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27825 6 : if (NS_FAILED(rv)) {
27826 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27827 0 : return JS_FALSE;
27828 : }
27829 6 : rv = self->SetOnabort(arg0);
27830 6 : if (NS_FAILED(rv))
27831 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27832 6 : return JS_TRUE;
27833 : }
27834 :
27835 : // === interface nsIIDBFactory
27836 :
27837 : static JSBool
27838 76 : nsIIDBFactory_Open(JSContext *cx, unsigned argc, jsval *vp)
27839 : {
27840 76 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27841 76 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27842 76 : if (!obj)
27843 0 : return JS_FALSE;
27844 76 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27845 : nsIIDBFactory *self;
27846 152 : xpc_qsSelfRef selfref;
27847 152 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27848 76 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27849 0 : return JS_FALSE;
27850 76 : if (argc < 1)
27851 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27852 76 : jsval *argv = JS_ARGV(cx, vp);
27853 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27854 : xpc_qsDOMString::eStringify,
27855 152 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27856 76 : if (!arg0.IsValid())
27857 0 : return JS_FALSE;
27858 : PRInt64 arg1;
27859 76 : if (!xpc_qsValueToInt64(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
27860 0 : return JS_FALSE;
27861 : nsresult rv;
27862 152 : nsCOMPtr<nsIIDBOpenDBRequest> result;
27863 76 : rv = self->Open(arg0, arg1, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
27864 76 : if (NS_FAILED(rv))
27865 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27866 76 : if (!result) {
27867 0 : *vp = JSVAL_NULL;
27868 0 : return JS_TRUE;
27869 : }
27870 76 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27871 76 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27872 0 : return JS_TRUE;
27873 : }
27874 : // After this point do not use 'result'!
27875 152 : qsObjectHelper helper(result, cache);
27876 76 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBOpenDBRequest), &interfaces[k_nsIIDBOpenDBRequest], vp);
27877 : }
27878 :
27879 : static JSBool
27880 0 : nsIIDBFactory_DeleteDatabase(JSContext *cx, unsigned argc, jsval *vp)
27881 : {
27882 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27883 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27884 0 : if (!obj)
27885 0 : return JS_FALSE;
27886 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27887 : nsIIDBFactory *self;
27888 0 : xpc_qsSelfRef selfref;
27889 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27890 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27891 0 : return JS_FALSE;
27892 0 : if (argc < 1)
27893 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27894 0 : jsval *argv = JS_ARGV(cx, vp);
27895 0 : xpc_qsAString arg0(cx, argv[0], &argv[0]);
27896 0 : if (!arg0.IsValid())
27897 0 : return JS_FALSE;
27898 : nsresult rv;
27899 0 : nsCOMPtr<nsIIDBOpenDBRequest> result;
27900 0 : rv = self->DeleteDatabase(arg0, getter_AddRefs(result));
27901 0 : if (NS_FAILED(rv))
27902 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27903 0 : if (!result) {
27904 0 : *vp = JSVAL_NULL;
27905 0 : return JS_TRUE;
27906 : }
27907 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27908 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27909 0 : return JS_TRUE;
27910 : }
27911 : // After this point do not use 'result'!
27912 0 : qsObjectHelper helper(result, cache);
27913 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBOpenDBRequest), &interfaces[k_nsIIDBOpenDBRequest], vp);
27914 : }
27915 :
27916 : static JSBool
27917 2864 : nsIIDBFactory_Cmp(JSContext *cx, unsigned argc, jsval *vp)
27918 : {
27919 2864 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27920 2864 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27921 2864 : if (!obj)
27922 0 : return JS_FALSE;
27923 : nsIIDBFactory *self;
27924 5728 : xpc_qsSelfRef selfref;
27925 2864 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
27926 0 : return JS_FALSE;
27927 2864 : if (argc < 2)
27928 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27929 2864 : jsval *argv = JS_ARGV(cx, vp);
27930 2864 : jsval arg0 = argv[0];
27931 2864 : jsval arg1 = argv[1];
27932 : nsresult rv;
27933 : PRInt16 result;
27934 2864 : rv = self->Cmp(arg0, arg1, cx, &result);
27935 2864 : if (NS_FAILED(rv))
27936 40 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27937 2824 : *vp = INT_TO_JSVAL((int32_t) result);
27938 2824 : return JS_TRUE;
27939 : }
27940 :
27941 : // === interface nsIIDBOpenDBRequest
27942 :
27943 : static JSBool
27944 0 : nsIIDBOpenDBRequest_GetOnblocked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27945 : {
27946 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27947 0 : JSObject *callee = nsnull;
27948 : nsIIDBOpenDBRequest *self;
27949 0 : xpc_qsSelfRef selfref;
27950 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27951 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27952 0 : return JS_FALSE;
27953 : nsresult rv;
27954 0 : nsCOMPtr<nsIDOMEventListener> result;
27955 0 : rv = self->GetOnblocked(getter_AddRefs(result));
27956 0 : if (NS_FAILED(rv))
27957 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27958 0 : if (!result) {
27959 0 : *vp = JSVAL_NULL;
27960 0 : return JS_TRUE;
27961 : }
27962 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27963 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27964 0 : return JS_TRUE;
27965 : }
27966 : // After this point do not use 'result'!
27967 0 : qsObjectHelper helper(result, cache);
27968 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27969 : }
27970 :
27971 : static JSBool
27972 4 : nsIIDBOpenDBRequest_SetOnblocked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27973 : {
27974 4 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27975 : nsIIDBOpenDBRequest *self;
27976 8 : xpc_qsSelfRef selfref;
27977 8 : JS::AutoValueRooter tvr(cx);
27978 4 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27979 0 : return JS_FALSE;
27980 : nsresult rv;
27981 : nsIDOMEventListener *arg0;
27982 8 : xpc_qsSelfRef arg0ref;
27983 4 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27984 4 : if (NS_FAILED(rv)) {
27985 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27986 0 : return JS_FALSE;
27987 : }
27988 4 : rv = self->SetOnblocked(arg0);
27989 4 : if (NS_FAILED(rv))
27990 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27991 4 : return JS_TRUE;
27992 : }
27993 :
27994 : static JSBool
27995 0 : nsIIDBOpenDBRequest_GetOnupgradeneeded(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27996 : {
27997 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27998 0 : JSObject *callee = nsnull;
27999 : nsIIDBOpenDBRequest *self;
28000 0 : xpc_qsSelfRef selfref;
28001 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
28002 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
28003 0 : return JS_FALSE;
28004 : nsresult rv;
28005 0 : nsCOMPtr<nsIDOMEventListener> result;
28006 0 : rv = self->GetOnupgradeneeded(getter_AddRefs(result));
28007 0 : if (NS_FAILED(rv))
28008 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28009 0 : if (!result) {
28010 0 : *vp = JSVAL_NULL;
28011 0 : return JS_TRUE;
28012 : }
28013 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
28014 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
28015 0 : return JS_TRUE;
28016 : }
28017 : // After this point do not use 'result'!
28018 0 : qsObjectHelper helper(result, cache);
28019 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
28020 : }
28021 :
28022 : static JSBool
28023 73 : nsIIDBOpenDBRequest_SetOnupgradeneeded(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
28024 : {
28025 73 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28026 : nsIIDBOpenDBRequest *self;
28027 146 : xpc_qsSelfRef selfref;
28028 146 : JS::AutoValueRooter tvr(cx);
28029 73 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
28030 0 : return JS_FALSE;
28031 : nsresult rv;
28032 : nsIDOMEventListener *arg0;
28033 146 : xpc_qsSelfRef arg0ref;
28034 73 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
28035 73 : if (NS_FAILED(rv)) {
28036 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
28037 0 : return JS_FALSE;
28038 : }
28039 73 : rv = self->SetOnupgradeneeded(arg0);
28040 73 : if (NS_FAILED(rv))
28041 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
28042 73 : return JS_TRUE;
28043 : }
28044 :
28045 : // === interface nsIIDBVersionChangeEvent
28046 :
28047 : static JSBool
28048 5 : nsIIDBVersionChangeEvent_GetOldVersion(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28049 : {
28050 5 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28051 : nsIIDBVersionChangeEvent *self;
28052 10 : xpc_qsSelfRef selfref;
28053 5 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
28054 0 : return JS_FALSE;
28055 : nsresult rv;
28056 : PRUint64 result;
28057 5 : rv = self->GetOldVersion(&result);
28058 5 : if (NS_FAILED(rv))
28059 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28060 5 : return xpc_qsUint64ToJsval(cx, result, vp);
28061 : }
28062 :
28063 : static JSBool
28064 5 : nsIIDBVersionChangeEvent_GetNewVersion(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28065 : {
28066 5 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28067 : nsIIDBVersionChangeEvent *self;
28068 10 : xpc_qsSelfRef selfref;
28069 5 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
28070 0 : return JS_FALSE;
28071 : nsresult rv;
28072 : PRUint64 result;
28073 5 : rv = self->GetNewVersion(&result);
28074 5 : if (NS_FAILED(rv))
28075 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28076 5 : return xpc_qsUint64ToJsval(cx, result, vp);
28077 : }
28078 :
28079 : // === interface nsIIndexedDatabaseUsageCallback
28080 :
28081 : static JSBool
28082 0 : nsIIndexedDatabaseUsageCallback_OnUsageResult(JSContext *cx, unsigned argc, jsval *vp)
28083 : {
28084 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28085 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28086 0 : if (!obj)
28087 0 : return JS_FALSE;
28088 : nsIIndexedDatabaseUsageCallback *self;
28089 0 : xpc_qsSelfRef selfref;
28090 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28091 0 : return JS_FALSE;
28092 0 : if (argc < 3)
28093 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28094 0 : jsval *argv = JS_ARGV(cx, vp);
28095 : nsresult rv;
28096 : nsIURI *arg0;
28097 0 : xpc_qsSelfRef arg0ref;
28098 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28099 0 : if (NS_FAILED(rv)) {
28100 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28101 0 : return JS_FALSE;
28102 : }
28103 : PRUint64 arg1;
28104 0 : if (!xpc_qsValueToUint64(cx, argv[1], &arg1))
28105 0 : return JS_FALSE;
28106 : PRUint64 arg2;
28107 0 : if (!xpc_qsValueToUint64(cx, argv[2], &arg2))
28108 0 : return JS_FALSE;
28109 0 : rv = self->OnUsageResult(arg0, arg1, arg2);
28110 0 : if (NS_FAILED(rv))
28111 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28112 0 : *vp = JSVAL_VOID;
28113 0 : return JS_TRUE;
28114 : }
28115 :
28116 : // === interface nsIIndexedDatabaseManager
28117 :
28118 : static JSBool
28119 0 : nsIIndexedDatabaseManager_GetUsageForURI(JSContext *cx, unsigned argc, jsval *vp)
28120 : {
28121 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28122 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28123 0 : if (!obj)
28124 0 : return JS_FALSE;
28125 : nsIIndexedDatabaseManager *self;
28126 0 : xpc_qsSelfRef selfref;
28127 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28128 0 : return JS_FALSE;
28129 0 : if (argc < 2)
28130 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28131 0 : jsval *argv = JS_ARGV(cx, vp);
28132 : nsresult rv;
28133 : nsIURI *arg0;
28134 0 : xpc_qsSelfRef arg0ref;
28135 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28136 0 : if (NS_FAILED(rv)) {
28137 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28138 0 : return JS_FALSE;
28139 : }
28140 : nsIIndexedDatabaseUsageCallback *arg1;
28141 0 : xpc_qsSelfRef arg1ref;
28142 0 : rv = xpc_qsUnwrapArg<nsIIndexedDatabaseUsageCallback>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
28143 0 : if (NS_FAILED(rv)) {
28144 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
28145 0 : return JS_FALSE;
28146 : }
28147 0 : rv = self->GetUsageForURI(arg0, arg1);
28148 0 : if (NS_FAILED(rv))
28149 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28150 0 : *vp = JSVAL_VOID;
28151 0 : return JS_TRUE;
28152 : }
28153 :
28154 : static JSBool
28155 0 : nsIIndexedDatabaseManager_CancelGetUsageForURI(JSContext *cx, unsigned argc, jsval *vp)
28156 : {
28157 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28158 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28159 0 : if (!obj)
28160 0 : return JS_FALSE;
28161 : nsIIndexedDatabaseManager *self;
28162 0 : xpc_qsSelfRef selfref;
28163 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28164 0 : return JS_FALSE;
28165 0 : if (argc < 2)
28166 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28167 0 : jsval *argv = JS_ARGV(cx, vp);
28168 : nsresult rv;
28169 : nsIURI *arg0;
28170 0 : xpc_qsSelfRef arg0ref;
28171 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28172 0 : if (NS_FAILED(rv)) {
28173 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28174 0 : return JS_FALSE;
28175 : }
28176 : nsIIndexedDatabaseUsageCallback *arg1;
28177 0 : xpc_qsSelfRef arg1ref;
28178 0 : rv = xpc_qsUnwrapArg<nsIIndexedDatabaseUsageCallback>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
28179 0 : if (NS_FAILED(rv)) {
28180 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
28181 0 : return JS_FALSE;
28182 : }
28183 0 : rv = self->CancelGetUsageForURI(arg0, arg1);
28184 0 : if (NS_FAILED(rv))
28185 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28186 0 : *vp = JSVAL_VOID;
28187 0 : return JS_TRUE;
28188 : }
28189 :
28190 : static JSBool
28191 0 : nsIIndexedDatabaseManager_ClearDatabasesForURI(JSContext *cx, unsigned argc, jsval *vp)
28192 : {
28193 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28194 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28195 0 : if (!obj)
28196 0 : return JS_FALSE;
28197 : nsIIndexedDatabaseManager *self;
28198 0 : xpc_qsSelfRef selfref;
28199 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28200 0 : return JS_FALSE;
28201 0 : if (argc < 1)
28202 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28203 0 : jsval *argv = JS_ARGV(cx, vp);
28204 : nsresult rv;
28205 : nsIURI *arg0;
28206 0 : xpc_qsSelfRef arg0ref;
28207 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28208 0 : if (NS_FAILED(rv)) {
28209 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28210 0 : return JS_FALSE;
28211 : }
28212 0 : rv = self->ClearDatabasesForURI(arg0);
28213 0 : if (NS_FAILED(rv))
28214 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28215 0 : *vp = JSVAL_VOID;
28216 0 : return JS_TRUE;
28217 : }
28218 :
28219 : static JSBool
28220 0 : nsIIndexedDatabaseManager_InitWindowless(JSContext *cx, unsigned argc, jsval *vp)
28221 : {
28222 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28223 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28224 0 : if (!obj)
28225 0 : return JS_FALSE;
28226 : nsIIndexedDatabaseManager *self;
28227 0 : xpc_qsSelfRef selfref;
28228 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28229 0 : return JS_FALSE;
28230 0 : if (argc < 1)
28231 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28232 0 : jsval *argv = JS_ARGV(cx, vp);
28233 0 : jsval arg0 = argv[0];
28234 : nsresult rv;
28235 0 : rv = self->InitWindowless(arg0, cx);
28236 0 : if (NS_FAILED(rv))
28237 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28238 0 : *vp = JSVAL_VOID;
28239 0 : return JS_TRUE;
28240 : }
28241 :
28242 : // === interface nsIDOMDOMError
28243 :
28244 : static JSBool
28245 0 : nsIDOMDOMError_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28246 : {
28247 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28248 : nsIDOMDOMError *self;
28249 0 : xpc_qsSelfRef selfref;
28250 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
28251 0 : return JS_FALSE;
28252 : nsresult rv;
28253 0 : nsString result;
28254 0 : rv = self->GetName(result);
28255 0 : if (NS_FAILED(rv))
28256 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28257 0 : return xpc::StringToJsval(cx, result, vp);
28258 : }
28259 :
28260 : // === Definer
28261 :
28262 : static const xpc_qsPropertySpec all_properties[] = {
28263 : // nsIDOMWindow (index 0)
28264 : {0, nsIDOMWindow_GetName, nsIDOMWindow_SetName},
28265 : {5, nsIDOMWindow_GetScriptableParent, xpc_qsGetterOnlyPropertyStub},
28266 : {12, nsIDOMWindow_GetScriptableTop, xpc_qsGetterOnlyPropertyStub},
28267 : {16, nsIDOMWindow_GetSelf, xpc_qsGetterOnlyPropertyStub},
28268 : {65, nsIDOMWindow_GetSessionStorage, xpc_qsGetterOnlyPropertyStub},
28269 : {80, nsIDOMWindow_GetLocalStorage, xpc_qsGetterOnlyPropertyStub},
28270 : {93, nsIDOMWindow_GetOnmouseenter, nsIDOMWindow_SetOnmouseenter},
28271 : {106, nsIDOMWindow_GetOnmouseleave, nsIDOMWindow_SetOnmouseleave},
28272 : // nsIDOMScreen (index 8)
28273 : {12, nsIDOMScreen_GetTop, xpc_qsGetterOnlyPropertyStub},
28274 : {124, nsIDOMScreen_GetHeight, xpc_qsGetterOnlyPropertyStub},
28275 : {131, nsIDOMScreen_GetWidth, xpc_qsGetterOnlyPropertyStub},
28276 : {137, nsIDOMScreen_GetLeft, xpc_qsGetterOnlyPropertyStub},
28277 : // nsIDOMClientRect (index 12)
28278 : {137, nsIDOMClientRect_GetLeft, xpc_qsGetterOnlyPropertyStub},
28279 : {12, nsIDOMClientRect_GetTop, xpc_qsGetterOnlyPropertyStub},
28280 : {142, nsIDOMClientRect_GetRight, xpc_qsGetterOnlyPropertyStub},
28281 : {148, nsIDOMClientRect_GetBottom, xpc_qsGetterOnlyPropertyStub},
28282 : {131, nsIDOMClientRect_GetWidth, xpc_qsGetterOnlyPropertyStub},
28283 : {124, nsIDOMClientRect_GetHeight, xpc_qsGetterOnlyPropertyStub},
28284 : // nsIDOMClientRectList (index 18)
28285 : {155, nsIDOMClientRectList_GetLength, xpc_qsGetterOnlyPropertyStub},
28286 : // nsIDOMPaintRequest (index 19)
28287 : {167, nsIDOMPaintRequest_GetClientRect, xpc_qsGetterOnlyPropertyStub},
28288 : {178, nsIDOMPaintRequest_GetReason, xpc_qsGetterOnlyPropertyStub},
28289 : // nsIDOMPaintRequestList (index 21)
28290 : {155, nsIDOMPaintRequestList_GetLength, xpc_qsGetterOnlyPropertyStub},
28291 : // nsIDOMCanvasRenderingContext2D (index 22)
28292 : {185, nsIDOMCanvasRenderingContext2D_GetCanvas, xpc_qsGetterOnlyPropertyStub},
28293 : {251, nsIDOMCanvasRenderingContext2D_GetMozCurrentTransform, nsIDOMCanvasRenderingContext2D_SetMozCurrentTransform},
28294 : {271, nsIDOMCanvasRenderingContext2D_GetMozCurrentTransformInverse, nsIDOMCanvasRenderingContext2D_SetMozCurrentTransformInverse},
28295 : {298, nsIDOMCanvasRenderingContext2D_GetGlobalAlpha, nsIDOMCanvasRenderingContext2D_SetGlobalAlpha},
28296 : {310, nsIDOMCanvasRenderingContext2D_GetGlobalCompositeOperation, nsIDOMCanvasRenderingContext2D_SetGlobalCompositeOperation},
28297 : {335, nsIDOMCanvasRenderingContext2D_GetStrokeStyle, nsIDOMCanvasRenderingContext2D_SetStrokeStyle},
28298 : {347, nsIDOMCanvasRenderingContext2D_GetFillStyle, nsIDOMCanvasRenderingContext2D_SetFillStyle},
28299 : {357, nsIDOMCanvasRenderingContext2D_GetMozFillRule, nsIDOMCanvasRenderingContext2D_SetMozFillRule},
28300 : {425, nsIDOMCanvasRenderingContext2D_GetLineWidth, nsIDOMCanvasRenderingContext2D_SetLineWidth},
28301 : {435, nsIDOMCanvasRenderingContext2D_GetLineCap, nsIDOMCanvasRenderingContext2D_SetLineCap},
28302 : {443, nsIDOMCanvasRenderingContext2D_GetLineJoin, nsIDOMCanvasRenderingContext2D_SetLineJoin},
28303 : {452, nsIDOMCanvasRenderingContext2D_GetMiterLimit, nsIDOMCanvasRenderingContext2D_SetMiterLimit},
28304 : {463, nsIDOMCanvasRenderingContext2D_GetMozDash, nsIDOMCanvasRenderingContext2D_SetMozDash},
28305 : {471, nsIDOMCanvasRenderingContext2D_GetMozDashOffset, nsIDOMCanvasRenderingContext2D_SetMozDashOffset},
28306 : {485, nsIDOMCanvasRenderingContext2D_GetShadowOffsetX, nsIDOMCanvasRenderingContext2D_SetShadowOffsetX},
28307 : {499, nsIDOMCanvasRenderingContext2D_GetShadowOffsetY, nsIDOMCanvasRenderingContext2D_SetShadowOffsetY},
28308 : {513, nsIDOMCanvasRenderingContext2D_GetShadowBlur, nsIDOMCanvasRenderingContext2D_SetShadowBlur},
28309 : {524, nsIDOMCanvasRenderingContext2D_GetShadowColor, nsIDOMCanvasRenderingContext2D_SetShadowColor},
28310 : {663, nsIDOMCanvasRenderingContext2D_GetFont, nsIDOMCanvasRenderingContext2D_SetFont},
28311 : {668, nsIDOMCanvasRenderingContext2D_GetTextAlign, nsIDOMCanvasRenderingContext2D_SetTextAlign},
28312 : {678, nsIDOMCanvasRenderingContext2D_GetTextBaseline, nsIDOMCanvasRenderingContext2D_SetTextBaseline},
28313 : {723, nsIDOMCanvasRenderingContext2D_GetMozTextStyle, nsIDOMCanvasRenderingContext2D_SetMozTextStyle},
28314 : {802, nsIDOMCanvasRenderingContext2D_GetMozImageSmoothingEnabled, nsIDOMCanvasRenderingContext2D_SetMozImageSmoothingEnabled},
28315 : // nsIDOMTextMetrics (index 45)
28316 : {131, nsIDOMTextMetrics_GetWidth, xpc_qsGetterOnlyPropertyStub},
28317 : // nsIDOMCharacterData (index 46)
28318 : {871, nsIDOMCharacterData_GetData, nsIDOMCharacterData_SetData},
28319 : {155, nsIDOMCharacterData_GetLength, xpc_qsGetterOnlyPropertyStub},
28320 : // nsIDOMDocument (index 48)
28321 : {876, nsIDOMDocument_GetDocumentElement, xpc_qsGetterOnlyPropertyStub},
28322 : {892, nsIDOMDocument_GetImplementation, xpc_qsGetterOnlyPropertyStub},
28323 : {928, nsIDOMDocument_GetDoctype, xpc_qsGetterOnlyPropertyStub},
28324 : {1053, nsIDOMDocument_GetDocumentURI, xpc_qsGetterOnlyPropertyStub},
28325 : {1075, nsIDOMDocument_GetDefaultView, xpc_qsGetterOnlyPropertyStub},
28326 : {1141, nsIDOMDocument_GetTitle, nsIDOMDocument_SetTitle},
28327 : {1147, nsIDOMDocument_GetReferrer, xpc_qsGetterOnlyPropertyStub},
28328 : {1182, nsIDOMDocument_GetActiveElement, xpc_qsGetterOnlyPropertyStub},
28329 : {1196, nsIDOMDocument_GetOnreadystatechange, nsIDOMDocument_SetOnreadystatechange},
28330 : {93, nsIDOMDocument_GetOnmouseenter, nsIDOMDocument_SetOnmouseenter},
28331 : {106, nsIDOMDocument_GetOnmouseleave, nsIDOMDocument_SetOnmouseleave},
28332 : // nsIDOMElement (index 59)
28333 : {1290, nsIDOMElement_GetTagName, xpc_qsGetterOnlyPropertyStub},
28334 : {93, nsIDOMElement_GetOnmouseenter, nsIDOMElement_SetOnmouseenter},
28335 : {106, nsIDOMElement_GetOnmouseleave, nsIDOMElement_SetOnmouseleave},
28336 : // nsIDOMNamedNodeMap (index 62)
28337 : {155, nsIDOMNamedNodeMap_GetLength, xpc_qsGetterOnlyPropertyStub},
28338 : // nsIDOMNode (index 63)
28339 : {1341, nsIDOMNode_GetNodeName, xpc_qsGetterOnlyPropertyStub},
28340 : {1350, nsIDOMNode_GetNodeValue, nsIDOMNode_SetNodeValue},
28341 : {1360, nsIDOMNode_GetNodeType, xpc_qsGetterOnlyPropertyStub},
28342 : {1369, nsIDOMNode_GetParentNode, xpc_qsGetterOnlyPropertyStub},
28343 : {1380, nsIDOMNode_GetParentElement, xpc_qsGetterOnlyPropertyStub},
28344 : {1394, nsIDOMNode_GetChildNodes, xpc_qsGetterOnlyPropertyStub},
28345 : {1405, nsIDOMNode_GetFirstChild, xpc_qsGetterOnlyPropertyStub},
28346 : {1416, nsIDOMNode_GetLastChild, xpc_qsGetterOnlyPropertyStub},
28347 : {1426, nsIDOMNode_GetPreviousSibling, xpc_qsGetterOnlyPropertyStub},
28348 : {1442, nsIDOMNode_GetNextSibling, xpc_qsGetterOnlyPropertyStub},
28349 : {1454, nsIDOMNode_GetAttributes, xpc_qsGetterOnlyPropertyStub},
28350 : {1465, nsIDOMNode_GetOwnerDocument, xpc_qsGetterOnlyPropertyStub},
28351 : {1575, nsIDOMNode_GetNamespaceURI, xpc_qsGetterOnlyPropertyStub},
28352 : {1588, nsIDOMNode_GetPrefix, xpc_qsGetterOnlyPropertyStub},
28353 : {1595, nsIDOMNode_GetLocalName, xpc_qsGetterOnlyPropertyStub},
28354 : {1619, nsIDOMNode_GetDOMBaseURI, xpc_qsGetterOnlyPropertyStub},
28355 : {1651, nsIDOMNode_GetTextContent, nsIDOMNode_SetTextContent},
28356 : // nsIDOMNodeList (index 80)
28357 : {155, nsIDOMNodeList_GetLength, xpc_qsGetterOnlyPropertyStub},
28358 : // nsIDOMDOMStringList (index 81)
28359 : {155, nsIDOMDOMStringList_GetLength, xpc_qsGetterOnlyPropertyStub},
28360 : // nsIDOMDOMTokenList (index 82)
28361 : {155, nsIDOMDOMTokenList_GetLength, xpc_qsGetterOnlyPropertyStub},
28362 : // nsIDOMDOMSettableTokenList (index 83)
28363 : {1891, nsIDOMDOMSettableTokenList_GetValue, nsIDOMDOMSettableTokenList_SetValue},
28364 : // nsIDOMNSElement (index 84)
28365 : {1950, nsIDOMNSElement_GetScrollTop, nsIDOMNSElement_SetScrollTop},
28366 : {1960, nsIDOMNSElement_GetScrollLeft, nsIDOMNSElement_SetScrollLeft},
28367 : {1971, nsIDOMNSElement_GetScrollHeight, xpc_qsGetterOnlyPropertyStub},
28368 : {1984, nsIDOMNSElement_GetScrollWidth, xpc_qsGetterOnlyPropertyStub},
28369 : {1996, nsIDOMNSElement_GetClientTop, xpc_qsGetterOnlyPropertyStub},
28370 : {2006, nsIDOMNSElement_GetClientLeft, xpc_qsGetterOnlyPropertyStub},
28371 : {2017, nsIDOMNSElement_GetClientHeight, xpc_qsGetterOnlyPropertyStub},
28372 : {2030, nsIDOMNSElement_GetClientWidth, xpc_qsGetterOnlyPropertyStub},
28373 : {2042, nsIDOMNSElement_GetFirstElementChild, xpc_qsGetterOnlyPropertyStub},
28374 : {2060, nsIDOMNSElement_GetLastElementChild, xpc_qsGetterOnlyPropertyStub},
28375 : {2077, nsIDOMNSElement_GetPreviousElementSibling, xpc_qsGetterOnlyPropertyStub},
28376 : {2100, nsIDOMNSElement_GetNextElementSibling, xpc_qsGetterOnlyPropertyStub},
28377 : {2119, nsIDOMNSElement_GetChildElementCount, xpc_qsGetterOnlyPropertyStub},
28378 : {2137, nsIDOMNSElement_GetChildren, xpc_qsGetterOnlyPropertyStub},
28379 : {2146, nsIDOMNSElement_GetClassList, xpc_qsGetterOnlyPropertyStub},
28380 : // nsIDOMElementCSSInlineStyle (index 99)
28381 : {2201, nsIDOMElementCSSInlineStyle_GetStyle, xpc_qsGetterOnlyPropertyStub},
28382 : // nsIDOMCSS2Properties (index 100)
28383 : {2207, nsIDOMCSS2Properties_GetBackground, nsIDOMCSS2Properties_SetBackground},
28384 : {2218, nsIDOMCSS2Properties_GetBackgroundAttachment, nsIDOMCSS2Properties_SetBackgroundAttachment},
28385 : {2239, nsIDOMCSS2Properties_GetBackgroundColor, nsIDOMCSS2Properties_SetBackgroundColor},
28386 : {2255, nsIDOMCSS2Properties_GetBackgroundImage, nsIDOMCSS2Properties_SetBackgroundImage},
28387 : {2271, nsIDOMCSS2Properties_GetBackgroundPosition, nsIDOMCSS2Properties_SetBackgroundPosition},
28388 : {2290, nsIDOMCSS2Properties_GetBackgroundRepeat, nsIDOMCSS2Properties_SetBackgroundRepeat},
28389 : {2307, nsIDOMCSS2Properties_GetBorder, nsIDOMCSS2Properties_SetBorder},
28390 : {2314, nsIDOMCSS2Properties_GetBorderCollapse, nsIDOMCSS2Properties_SetBorderCollapse},
28391 : {2329, nsIDOMCSS2Properties_GetBorderColor, nsIDOMCSS2Properties_SetBorderColor},
28392 : {2341, nsIDOMCSS2Properties_GetBorderSpacing, nsIDOMCSS2Properties_SetBorderSpacing},
28393 : {2355, nsIDOMCSS2Properties_GetBorderStyle, nsIDOMCSS2Properties_SetBorderStyle},
28394 : {2367, nsIDOMCSS2Properties_GetBorderTop, nsIDOMCSS2Properties_SetBorderTop},
28395 : {2377, nsIDOMCSS2Properties_GetBorderRight, nsIDOMCSS2Properties_SetBorderRight},
28396 : {2389, nsIDOMCSS2Properties_GetBorderBottom, nsIDOMCSS2Properties_SetBorderBottom},
28397 : {2402, nsIDOMCSS2Properties_GetBorderLeft, nsIDOMCSS2Properties_SetBorderLeft},
28398 : {2413, nsIDOMCSS2Properties_GetBorderTopColor, nsIDOMCSS2Properties_SetBorderTopColor},
28399 : {2428, nsIDOMCSS2Properties_GetBorderRightColor, nsIDOMCSS2Properties_SetBorderRightColor},
28400 : {2445, nsIDOMCSS2Properties_GetBorderBottomColor, nsIDOMCSS2Properties_SetBorderBottomColor},
28401 : {2463, nsIDOMCSS2Properties_GetBorderLeftColor, nsIDOMCSS2Properties_SetBorderLeftColor},
28402 : {2479, nsIDOMCSS2Properties_GetBorderTopStyle, nsIDOMCSS2Properties_SetBorderTopStyle},
28403 : {2494, nsIDOMCSS2Properties_GetBorderRightStyle, nsIDOMCSS2Properties_SetBorderRightStyle},
28404 : {2511, nsIDOMCSS2Properties_GetBorderBottomStyle, nsIDOMCSS2Properties_SetBorderBottomStyle},
28405 : {2529, nsIDOMCSS2Properties_GetBorderLeftStyle, nsIDOMCSS2Properties_SetBorderLeftStyle},
28406 : {2545, nsIDOMCSS2Properties_GetBorderTopWidth, nsIDOMCSS2Properties_SetBorderTopWidth},
28407 : {2560, nsIDOMCSS2Properties_GetBorderRightWidth, nsIDOMCSS2Properties_SetBorderRightWidth},
28408 : {2577, nsIDOMCSS2Properties_GetBorderBottomWidth, nsIDOMCSS2Properties_SetBorderBottomWidth},
28409 : {2595, nsIDOMCSS2Properties_GetBorderLeftWidth, nsIDOMCSS2Properties_SetBorderLeftWidth},
28410 : {2611, nsIDOMCSS2Properties_GetBorderWidth, nsIDOMCSS2Properties_SetBorderWidth},
28411 : {2623, nsIDOMCSS2Properties_GetBorderRadius, nsIDOMCSS2Properties_SetBorderRadius},
28412 : {2636, nsIDOMCSS2Properties_GetBorderTopLeftRadius, nsIDOMCSS2Properties_SetBorderTopLeftRadius},
28413 : {2656, nsIDOMCSS2Properties_GetBorderTopRightRadius, nsIDOMCSS2Properties_SetBorderTopRightRadius},
28414 : {2677, nsIDOMCSS2Properties_GetBorderBottomLeftRadius, nsIDOMCSS2Properties_SetBorderBottomLeftRadius},
28415 : {2700, nsIDOMCSS2Properties_GetBorderBottomRightRadius, nsIDOMCSS2Properties_SetBorderBottomRightRadius},
28416 : {148, nsIDOMCSS2Properties_GetBottom, nsIDOMCSS2Properties_SetBottom},
28417 : {2724, nsIDOMCSS2Properties_GetBoxShadow, nsIDOMCSS2Properties_SetBoxShadow},
28418 : {2734, nsIDOMCSS2Properties_GetCaptionSide, nsIDOMCSS2Properties_SetCaptionSide},
28419 : {2746, nsIDOMCSS2Properties_GetClear, nsIDOMCSS2Properties_SetClear},
28420 : {658, nsIDOMCSS2Properties_GetClip, nsIDOMCSS2Properties_SetClip},
28421 : {2752, nsIDOMCSS2Properties_GetColor, nsIDOMCSS2Properties_SetColor},
28422 : {2758, nsIDOMCSS2Properties_GetContent, nsIDOMCSS2Properties_SetContent},
28423 : {2766, nsIDOMCSS2Properties_GetCounterIncrement, nsIDOMCSS2Properties_SetCounterIncrement},
28424 : {2783, nsIDOMCSS2Properties_GetCounterReset, nsIDOMCSS2Properties_SetCounterReset},
28425 : {2796, nsIDOMCSS2Properties_GetCursor, nsIDOMCSS2Properties_SetCursor},
28426 : {2803, nsIDOMCSS2Properties_GetDirection, nsIDOMCSS2Properties_SetDirection},
28427 : {2813, nsIDOMCSS2Properties_GetDisplay, nsIDOMCSS2Properties_SetDisplay},
28428 : {2821, nsIDOMCSS2Properties_GetEmptyCells, nsIDOMCSS2Properties_SetEmptyCells},
28429 : {2832, nsIDOMCSS2Properties_GetCssFloat, nsIDOMCSS2Properties_SetCssFloat},
28430 : {663, nsIDOMCSS2Properties_GetFont, nsIDOMCSS2Properties_SetFont},
28431 : {2841, nsIDOMCSS2Properties_GetFontFamily, nsIDOMCSS2Properties_SetFontFamily},
28432 : {2852, nsIDOMCSS2Properties_GetFontSize, nsIDOMCSS2Properties_SetFontSize},
28433 : {2861, nsIDOMCSS2Properties_GetFontSizeAdjust, nsIDOMCSS2Properties_SetFontSizeAdjust},
28434 : {2876, nsIDOMCSS2Properties_GetFontStretch, nsIDOMCSS2Properties_SetFontStretch},
28435 : {2888, nsIDOMCSS2Properties_GetFontStyle, nsIDOMCSS2Properties_SetFontStyle},
28436 : {2898, nsIDOMCSS2Properties_GetFontVariant, nsIDOMCSS2Properties_SetFontVariant},
28437 : {2910, nsIDOMCSS2Properties_GetFontWeight, nsIDOMCSS2Properties_SetFontWeight},
28438 : {124, nsIDOMCSS2Properties_GetHeight, nsIDOMCSS2Properties_SetHeight},
28439 : {137, nsIDOMCSS2Properties_GetLeft, nsIDOMCSS2Properties_SetLeft},
28440 : {2921, nsIDOMCSS2Properties_GetLetterSpacing, nsIDOMCSS2Properties_SetLetterSpacing},
28441 : {2935, nsIDOMCSS2Properties_GetLineHeight, nsIDOMCSS2Properties_SetLineHeight},
28442 : {2946, nsIDOMCSS2Properties_GetListStyle, nsIDOMCSS2Properties_SetListStyle},
28443 : {2956, nsIDOMCSS2Properties_GetListStyleImage, nsIDOMCSS2Properties_SetListStyleImage},
28444 : {2971, nsIDOMCSS2Properties_GetListStylePosition, nsIDOMCSS2Properties_SetListStylePosition},
28445 : {2989, nsIDOMCSS2Properties_GetListStyleType, nsIDOMCSS2Properties_SetListStyleType},
28446 : {3003, nsIDOMCSS2Properties_GetMargin, nsIDOMCSS2Properties_SetMargin},
28447 : {3010, nsIDOMCSS2Properties_GetMarginTop, nsIDOMCSS2Properties_SetMarginTop},
28448 : {3020, nsIDOMCSS2Properties_GetMarginRight, nsIDOMCSS2Properties_SetMarginRight},
28449 : {3032, nsIDOMCSS2Properties_GetMarginBottom, nsIDOMCSS2Properties_SetMarginBottom},
28450 : {3045, nsIDOMCSS2Properties_GetMarginLeft, nsIDOMCSS2Properties_SetMarginLeft},
28451 : {3056, nsIDOMCSS2Properties_GetMarkerOffset, nsIDOMCSS2Properties_SetMarkerOffset},
28452 : {3069, nsIDOMCSS2Properties_GetMarks, nsIDOMCSS2Properties_SetMarks},
28453 : {3075, nsIDOMCSS2Properties_GetMaxHeight, nsIDOMCSS2Properties_SetMaxHeight},
28454 : {3085, nsIDOMCSS2Properties_GetMaxWidth, nsIDOMCSS2Properties_SetMaxWidth},
28455 : {3094, nsIDOMCSS2Properties_GetMinHeight, nsIDOMCSS2Properties_SetMinHeight},
28456 : {3104, nsIDOMCSS2Properties_GetMinWidth, nsIDOMCSS2Properties_SetMinWidth},
28457 : {3113, nsIDOMCSS2Properties_GetOrphans, nsIDOMCSS2Properties_SetOrphans},
28458 : {3121, nsIDOMCSS2Properties_GetOutline, nsIDOMCSS2Properties_SetOutline},
28459 : {3129, nsIDOMCSS2Properties_GetOutlineColor, nsIDOMCSS2Properties_SetOutlineColor},
28460 : {3142, nsIDOMCSS2Properties_GetOutlineStyle, nsIDOMCSS2Properties_SetOutlineStyle},
28461 : {3155, nsIDOMCSS2Properties_GetOutlineWidth, nsIDOMCSS2Properties_SetOutlineWidth},
28462 : {3168, nsIDOMCSS2Properties_GetOverflow, nsIDOMCSS2Properties_SetOverflow},
28463 : {3177, nsIDOMCSS2Properties_GetPadding, nsIDOMCSS2Properties_SetPadding},
28464 : {3185, nsIDOMCSS2Properties_GetPaddingTop, nsIDOMCSS2Properties_SetPaddingTop},
28465 : {3196, nsIDOMCSS2Properties_GetPaddingRight, nsIDOMCSS2Properties_SetPaddingRight},
28466 : {3209, nsIDOMCSS2Properties_GetPaddingBottom, nsIDOMCSS2Properties_SetPaddingBottom},
28467 : {3223, nsIDOMCSS2Properties_GetPaddingLeft, nsIDOMCSS2Properties_SetPaddingLeft},
28468 : {3235, nsIDOMCSS2Properties_GetPage, nsIDOMCSS2Properties_SetPage},
28469 : {3240, nsIDOMCSS2Properties_GetPageBreakAfter, nsIDOMCSS2Properties_SetPageBreakAfter},
28470 : {3255, nsIDOMCSS2Properties_GetPageBreakBefore, nsIDOMCSS2Properties_SetPageBreakBefore},
28471 : {3271, nsIDOMCSS2Properties_GetPageBreakInside, nsIDOMCSS2Properties_SetPageBreakInside},
28472 : {3287, nsIDOMCSS2Properties_GetPosition, nsIDOMCSS2Properties_SetPosition},
28473 : {3296, nsIDOMCSS2Properties_GetQuotes, nsIDOMCSS2Properties_SetQuotes},
28474 : {142, nsIDOMCSS2Properties_GetRight, nsIDOMCSS2Properties_SetRight},
28475 : {3303, nsIDOMCSS2Properties_GetSize, nsIDOMCSS2Properties_SetSize},
28476 : {3308, nsIDOMCSS2Properties_GetTableLayout, nsIDOMCSS2Properties_SetTableLayout},
28477 : {668, nsIDOMCSS2Properties_GetTextAlign, nsIDOMCSS2Properties_SetTextAlign},
28478 : {3320, nsIDOMCSS2Properties_GetTextDecoration, nsIDOMCSS2Properties_SetTextDecoration},
28479 : {3335, nsIDOMCSS2Properties_GetTextIndent, nsIDOMCSS2Properties_SetTextIndent},
28480 : {3346, nsIDOMCSS2Properties_GetTextOverflow, nsIDOMCSS2Properties_SetTextOverflow},
28481 : {3359, nsIDOMCSS2Properties_GetTextShadow, nsIDOMCSS2Properties_SetTextShadow},
28482 : {3370, nsIDOMCSS2Properties_GetTextTransform, nsIDOMCSS2Properties_SetTextTransform},
28483 : {12, nsIDOMCSS2Properties_GetTop, nsIDOMCSS2Properties_SetTop},
28484 : {3384, nsIDOMCSS2Properties_GetUnicodeBidi, nsIDOMCSS2Properties_SetUnicodeBidi},
28485 : {3396, nsIDOMCSS2Properties_GetVerticalAlign, nsIDOMCSS2Properties_SetVerticalAlign},
28486 : {3410, nsIDOMCSS2Properties_GetVisibility, nsIDOMCSS2Properties_SetVisibility},
28487 : {3421, nsIDOMCSS2Properties_GetWhiteSpace, nsIDOMCSS2Properties_SetWhiteSpace},
28488 : {3432, nsIDOMCSS2Properties_GetWidows, nsIDOMCSS2Properties_SetWidows},
28489 : {131, nsIDOMCSS2Properties_GetWidth, nsIDOMCSS2Properties_SetWidth},
28490 : {3439, nsIDOMCSS2Properties_GetWordSpacing, nsIDOMCSS2Properties_SetWordSpacing},
28491 : {3451, nsIDOMCSS2Properties_GetZIndex, nsIDOMCSS2Properties_SetZIndex},
28492 : {3458, nsIDOMCSS2Properties_GetClipPath, nsIDOMCSS2Properties_SetClipPath},
28493 : {3467, nsIDOMCSS2Properties_GetClipRule, nsIDOMCSS2Properties_SetClipRule},
28494 : {3476, nsIDOMCSS2Properties_GetColorInterpolation, nsIDOMCSS2Properties_SetColorInterpolation},
28495 : {3495, nsIDOMCSS2Properties_GetColorInterpolationFilters, nsIDOMCSS2Properties_SetColorInterpolationFilters},
28496 : {3521, nsIDOMCSS2Properties_GetDominantBaseline, nsIDOMCSS2Properties_SetDominantBaseline},
28497 : {646, nsIDOMCSS2Properties_GetFill, nsIDOMCSS2Properties_SetFill},
28498 : {3538, nsIDOMCSS2Properties_GetFillOpacity, nsIDOMCSS2Properties_SetFillOpacity},
28499 : {3550, nsIDOMCSS2Properties_GetFillRule, nsIDOMCSS2Properties_SetFillRule},
28500 : {3559, nsIDOMCSS2Properties_GetFilter, nsIDOMCSS2Properties_SetFilter},
28501 : {3566, nsIDOMCSS2Properties_GetFloodColor, nsIDOMCSS2Properties_SetFloodColor},
28502 : {3577, nsIDOMCSS2Properties_GetFloodOpacity, nsIDOMCSS2Properties_SetFloodOpacity},
28503 : {3590, nsIDOMCSS2Properties_GetImageRendering, nsIDOMCSS2Properties_SetImageRendering},
28504 : {3605, nsIDOMCSS2Properties_GetLightingColor, nsIDOMCSS2Properties_SetLightingColor},
28505 : {3619, nsIDOMCSS2Properties_GetMarker, nsIDOMCSS2Properties_SetMarker},
28506 : {3626, nsIDOMCSS2Properties_GetMarkerEnd, nsIDOMCSS2Properties_SetMarkerEnd},
28507 : {3636, nsIDOMCSS2Properties_GetMarkerMid, nsIDOMCSS2Properties_SetMarkerMid},
28508 : {3646, nsIDOMCSS2Properties_GetMarkerStart, nsIDOMCSS2Properties_SetMarkerStart},
28509 : {3658, nsIDOMCSS2Properties_GetMask, nsIDOMCSS2Properties_SetMask},
28510 : {3663, nsIDOMCSS2Properties_GetShapeRendering, nsIDOMCSS2Properties_SetShapeRendering},
28511 : {3678, nsIDOMCSS2Properties_GetStopColor, nsIDOMCSS2Properties_SetStopColor},
28512 : {3688, nsIDOMCSS2Properties_GetStopOpacity, nsIDOMCSS2Properties_SetStopOpacity},
28513 : {651, nsIDOMCSS2Properties_GetStroke, nsIDOMCSS2Properties_SetStroke},
28514 : {3700, nsIDOMCSS2Properties_GetStrokeDasharray, nsIDOMCSS2Properties_SetStrokeDasharray},
28515 : {3716, nsIDOMCSS2Properties_GetStrokeDashoffset, nsIDOMCSS2Properties_SetStrokeDashoffset},
28516 : {3733, nsIDOMCSS2Properties_GetStrokeLinecap, nsIDOMCSS2Properties_SetStrokeLinecap},
28517 : {3747, nsIDOMCSS2Properties_GetStrokeLinejoin, nsIDOMCSS2Properties_SetStrokeLinejoin},
28518 : {3762, nsIDOMCSS2Properties_GetStrokeMiterlimit, nsIDOMCSS2Properties_SetStrokeMiterlimit},
28519 : {3779, nsIDOMCSS2Properties_GetStrokeOpacity, nsIDOMCSS2Properties_SetStrokeOpacity},
28520 : {3793, nsIDOMCSS2Properties_GetStrokeWidth, nsIDOMCSS2Properties_SetStrokeWidth},
28521 : {3805, nsIDOMCSS2Properties_GetTextAnchor, nsIDOMCSS2Properties_SetTextAnchor},
28522 : {3816, nsIDOMCSS2Properties_GetTextRendering, nsIDOMCSS2Properties_SetTextRendering},
28523 : {3830, nsIDOMCSS2Properties_GetMozAppearance, nsIDOMCSS2Properties_SetMozAppearance},
28524 : {3844, nsIDOMCSS2Properties_GetBackgroundClip, nsIDOMCSS2Properties_SetBackgroundClip},
28525 : {3859, nsIDOMCSS2Properties_GetMozBackgroundInlinePolicy, nsIDOMCSS2Properties_SetMozBackgroundInlinePolicy},
28526 : {3885, nsIDOMCSS2Properties_GetBackgroundOrigin, nsIDOMCSS2Properties_SetBackgroundOrigin},
28527 : {3902, nsIDOMCSS2Properties_GetMozBinding, nsIDOMCSS2Properties_SetMozBinding},
28528 : {3913, nsIDOMCSS2Properties_GetMozBorderBottomColors, nsIDOMCSS2Properties_SetMozBorderBottomColors},
28529 : {3935, nsIDOMCSS2Properties_GetMozBorderLeftColors, nsIDOMCSS2Properties_SetMozBorderLeftColors},
28530 : {3955, nsIDOMCSS2Properties_GetMozBorderRightColors, nsIDOMCSS2Properties_SetMozBorderRightColors},
28531 : {3976, nsIDOMCSS2Properties_GetMozBorderTopColors, nsIDOMCSS2Properties_SetMozBorderTopColors},
28532 : {3995, nsIDOMCSS2Properties_GetMozBoxAlign, nsIDOMCSS2Properties_SetMozBoxAlign},
28533 : {4007, nsIDOMCSS2Properties_GetMozBoxDirection, nsIDOMCSS2Properties_SetMozBoxDirection},
28534 : {4023, nsIDOMCSS2Properties_GetMozBoxFlex, nsIDOMCSS2Properties_SetMozBoxFlex},
28535 : {4034, nsIDOMCSS2Properties_GetMozBoxOrient, nsIDOMCSS2Properties_SetMozBoxOrient},
28536 : {4047, nsIDOMCSS2Properties_GetMozBoxOrdinalGroup, nsIDOMCSS2Properties_SetMozBoxOrdinalGroup},
28537 : {4066, nsIDOMCSS2Properties_GetMozBoxPack, nsIDOMCSS2Properties_SetMozBoxPack},
28538 : {4077, nsIDOMCSS2Properties_GetMozBoxSizing, nsIDOMCSS2Properties_SetMozBoxSizing},
28539 : {4090, nsIDOMCSS2Properties_GetMozColumnCount, nsIDOMCSS2Properties_SetMozColumnCount},
28540 : {4105, nsIDOMCSS2Properties_GetMozColumnWidth, nsIDOMCSS2Properties_SetMozColumnWidth},
28541 : {4120, nsIDOMCSS2Properties_GetMozColumnFill, nsIDOMCSS2Properties_SetMozColumnFill},
28542 : {4134, nsIDOMCSS2Properties_GetMozColumnGap, nsIDOMCSS2Properties_SetMozColumnGap},
28543 : {4147, nsIDOMCSS2Properties_GetMozFloatEdge, nsIDOMCSS2Properties_SetMozFloatEdge},
28544 : {4160, nsIDOMCSS2Properties_GetMozFontFeatureSettings, nsIDOMCSS2Properties_SetMozFontFeatureSettings},
28545 : {4183, nsIDOMCSS2Properties_GetMozFontLanguageOverride, nsIDOMCSS2Properties_SetMozFontLanguageOverride},
28546 : {4207, nsIDOMCSS2Properties_GetMozForceBrokenImageIcon, nsIDOMCSS2Properties_SetMozForceBrokenImageIcon},
28547 : {4231, nsIDOMCSS2Properties_GetMozImageRegion, nsIDOMCSS2Properties_SetMozImageRegion},
28548 : {4246, nsIDOMCSS2Properties_GetMozMarginEnd, nsIDOMCSS2Properties_SetMozMarginEnd},
28549 : {4259, nsIDOMCSS2Properties_GetMozMarginStart, nsIDOMCSS2Properties_SetMozMarginStart},
28550 : {4274, nsIDOMCSS2Properties_GetMozOrient, nsIDOMCSS2Properties_SetMozOrient},
28551 : {4284, nsIDOMCSS2Properties_GetMozOutlineRadius, nsIDOMCSS2Properties_SetMozOutlineRadius},
28552 : {4301, nsIDOMCSS2Properties_GetMozOutlineRadiusTopleft, nsIDOMCSS2Properties_SetMozOutlineRadiusTopleft},
28553 : {4325, nsIDOMCSS2Properties_GetMozOutlineRadiusTopright, nsIDOMCSS2Properties_SetMozOutlineRadiusTopright},
28554 : {4350, nsIDOMCSS2Properties_GetMozOutlineRadiusBottomleft, nsIDOMCSS2Properties_SetMozOutlineRadiusBottomleft},
28555 : {4377, nsIDOMCSS2Properties_GetMozOutlineRadiusBottomright, nsIDOMCSS2Properties_SetMozOutlineRadiusBottomright},
28556 : {4405, nsIDOMCSS2Properties_GetMozPaddingEnd, nsIDOMCSS2Properties_SetMozPaddingEnd},
28557 : {4419, nsIDOMCSS2Properties_GetMozPaddingStart, nsIDOMCSS2Properties_SetMozPaddingStart},
28558 : {4435, nsIDOMCSS2Properties_GetMozUserFocus, nsIDOMCSS2Properties_SetMozUserFocus},
28559 : {4448, nsIDOMCSS2Properties_GetMozUserInput, nsIDOMCSS2Properties_SetMozUserInput},
28560 : {4461, nsIDOMCSS2Properties_GetMozUserModify, nsIDOMCSS2Properties_SetMozUserModify},
28561 : {4475, nsIDOMCSS2Properties_GetMozUserSelect, nsIDOMCSS2Properties_SetMozUserSelect},
28562 : {4489, nsIDOMCSS2Properties_GetOpacity, nsIDOMCSS2Properties_SetOpacity},
28563 : {4497, nsIDOMCSS2Properties_GetOutlineOffset, nsIDOMCSS2Properties_SetOutlineOffset},
28564 : {4511, nsIDOMCSS2Properties_GetMozTextAlignLast, nsIDOMCSS2Properties_SetMozTextAlignLast},
28565 : {4528, nsIDOMCSS2Properties_GetOverflowX, nsIDOMCSS2Properties_SetOverflowX},
28566 : {4538, nsIDOMCSS2Properties_GetOverflowY, nsIDOMCSS2Properties_SetOverflowY},
28567 : {4548, nsIDOMCSS2Properties_GetImeMode, nsIDOMCSS2Properties_SetImeMode},
28568 : {4556, nsIDOMCSS2Properties_GetMozBorderEnd, nsIDOMCSS2Properties_SetMozBorderEnd},
28569 : {4569, nsIDOMCSS2Properties_GetMozBorderEndColor, nsIDOMCSS2Properties_SetMozBorderEndColor},
28570 : {4587, nsIDOMCSS2Properties_GetMozBorderEndStyle, nsIDOMCSS2Properties_SetMozBorderEndStyle},
28571 : {4605, nsIDOMCSS2Properties_GetMozBorderEndWidth, nsIDOMCSS2Properties_SetMozBorderEndWidth},
28572 : {4623, nsIDOMCSS2Properties_GetMozBorderStart, nsIDOMCSS2Properties_SetMozBorderStart},
28573 : {4638, nsIDOMCSS2Properties_GetMozBorderStartColor, nsIDOMCSS2Properties_SetMozBorderStartColor},
28574 : {4658, nsIDOMCSS2Properties_GetMozBorderStartStyle, nsIDOMCSS2Properties_SetMozBorderStartStyle},
28575 : {4678, nsIDOMCSS2Properties_GetMozBorderStartWidth, nsIDOMCSS2Properties_SetMozBorderStartWidth},
28576 : {4698, nsIDOMCSS2Properties_GetMozStackSizing, nsIDOMCSS2Properties_SetMozStackSizing},
28577 : {4713, nsIDOMCSS2Properties_GetMozBorderImage, nsIDOMCSS2Properties_SetMozBorderImage},
28578 : {4728, nsIDOMCSS2Properties_GetMozColumns, nsIDOMCSS2Properties_SetMozColumns},
28579 : {4739, nsIDOMCSS2Properties_GetMozColumnRule, nsIDOMCSS2Properties_SetMozColumnRule},
28580 : {4753, nsIDOMCSS2Properties_GetMozColumnRuleWidth, nsIDOMCSS2Properties_SetMozColumnRuleWidth},
28581 : {4772, nsIDOMCSS2Properties_GetMozColumnRuleStyle, nsIDOMCSS2Properties_SetMozColumnRuleStyle},
28582 : {4791, nsIDOMCSS2Properties_GetMozColumnRuleColor, nsIDOMCSS2Properties_SetMozColumnRuleColor},
28583 : {4810, nsIDOMCSS2Properties_GetWordWrap, nsIDOMCSS2Properties_SetWordWrap},
28584 : {4819, nsIDOMCSS2Properties_GetMozHyphens, nsIDOMCSS2Properties_SetMozHyphens},
28585 : {4830, nsIDOMCSS2Properties_GetMozTransform, nsIDOMCSS2Properties_SetMozTransform},
28586 : {4843, nsIDOMCSS2Properties_GetMozTransformOrigin, nsIDOMCSS2Properties_SetMozTransformOrigin},
28587 : {4862, nsIDOMCSS2Properties_GetMozPerspective, nsIDOMCSS2Properties_SetMozPerspective},
28588 : {4877, nsIDOMCSS2Properties_GetMozPerspectiveOrigin, nsIDOMCSS2Properties_SetMozPerspectiveOrigin},
28589 : {4898, nsIDOMCSS2Properties_GetMozBackfaceVisibility, nsIDOMCSS2Properties_SetMozBackfaceVisibility},
28590 : {4920, nsIDOMCSS2Properties_GetMozTransformStyle, nsIDOMCSS2Properties_SetMozTransformStyle},
28591 : {4938, nsIDOMCSS2Properties_GetMozWindowShadow, nsIDOMCSS2Properties_SetMozWindowShadow},
28592 : {4954, nsIDOMCSS2Properties_GetBackgroundSize, nsIDOMCSS2Properties_SetBackgroundSize},
28593 : {4969, nsIDOMCSS2Properties_GetMozTextBlink, nsIDOMCSS2Properties_SetMozTextBlink},
28594 : {4982, nsIDOMCSS2Properties_GetMozTextDecorationColor, nsIDOMCSS2Properties_SetMozTextDecorationColor},
28595 : {5005, nsIDOMCSS2Properties_GetMozTextDecorationLine, nsIDOMCSS2Properties_SetMozTextDecorationLine},
28596 : {5027, nsIDOMCSS2Properties_GetMozTextDecorationStyle, nsIDOMCSS2Properties_SetMozTextDecorationStyle},
28597 : {5050, nsIDOMCSS2Properties_GetMozTransitionProperty, nsIDOMCSS2Properties_SetMozTransitionProperty},
28598 : {5072, nsIDOMCSS2Properties_GetMozTransitionDuration, nsIDOMCSS2Properties_SetMozTransitionDuration},
28599 : {5094, nsIDOMCSS2Properties_GetMozTransitionDelay, nsIDOMCSS2Properties_SetMozTransitionDelay},
28600 : {5113, nsIDOMCSS2Properties_GetMozTransitionTimingFunction, nsIDOMCSS2Properties_SetMozTransitionTimingFunction},
28601 : {5141, nsIDOMCSS2Properties_GetMozTransition, nsIDOMCSS2Properties_SetMozTransition},
28602 : {5155, nsIDOMCSS2Properties_GetPointerEvents, nsIDOMCSS2Properties_SetPointerEvents},
28603 : {5169, nsIDOMCSS2Properties_GetMozTabSize, nsIDOMCSS2Properties_SetMozTabSize},
28604 : {5180, nsIDOMCSS2Properties_GetResize, nsIDOMCSS2Properties_SetResize},
28605 : {5187, nsIDOMCSS2Properties_GetMozAnimationName, nsIDOMCSS2Properties_SetMozAnimationName},
28606 : {5204, nsIDOMCSS2Properties_GetMozAnimationDuration, nsIDOMCSS2Properties_SetMozAnimationDuration},
28607 : {5225, nsIDOMCSS2Properties_GetMozAnimationDelay, nsIDOMCSS2Properties_SetMozAnimationDelay},
28608 : {5243, nsIDOMCSS2Properties_GetMozAnimationTimingFunction, nsIDOMCSS2Properties_SetMozAnimationTimingFunction},
28609 : {5270, nsIDOMCSS2Properties_GetMozAnimationDirection, nsIDOMCSS2Properties_SetMozAnimationDirection},
28610 : {5292, nsIDOMCSS2Properties_GetMozAnimationFillMode, nsIDOMCSS2Properties_SetMozAnimationFillMode},
28611 : {5313, nsIDOMCSS2Properties_GetMozAnimationIterationCount, nsIDOMCSS2Properties_SetMozAnimationIterationCount},
28612 : {5340, nsIDOMCSS2Properties_GetMozAnimationPlayState, nsIDOMCSS2Properties_SetMozAnimationPlayState},
28613 : {5362, nsIDOMCSS2Properties_GetMozAnimation, nsIDOMCSS2Properties_SetMozAnimation},
28614 : {5375, nsIDOMCSS2Properties_GetMozTextSizeAdjust, nsIDOMCSS2Properties_SetMozTextSizeAdjust},
28615 : // nsIDOMRect (index 332)
28616 : {12, nsIDOMRect_GetTop, xpc_qsGetterOnlyPropertyStub},
28617 : {142, nsIDOMRect_GetRight, xpc_qsGetterOnlyPropertyStub},
28618 : {148, nsIDOMRect_GetBottom, xpc_qsGetterOnlyPropertyStub},
28619 : {137, nsIDOMRect_GetLeft, xpc_qsGetterOnlyPropertyStub},
28620 : // nsIDOMCSSStyleDeclaration (index 336)
28621 : {5393, nsIDOMCSSStyleDeclaration_GetCssText, nsIDOMCSSStyleDeclaration_SetCssText},
28622 : {155, nsIDOMCSSStyleDeclaration_GetLength, xpc_qsGetterOnlyPropertyStub},
28623 : {5485, nsIDOMCSSStyleDeclaration_GetParentRule, xpc_qsGetterOnlyPropertyStub},
28624 : // nsIDOMEvent (index 339)
28625 : {5547, nsIDOMEvent_GetType, xpc_qsGetterOnlyPropertyStub},
28626 : {5552, nsIDOMEvent_GetTarget, xpc_qsGetterOnlyPropertyStub},
28627 : {5559, nsIDOMEvent_GetCurrentTarget, xpc_qsGetterOnlyPropertyStub},
28628 : {5573, nsIDOMEvent_GetEventPhase, xpc_qsGetterOnlyPropertyStub},
28629 : {5584, nsIDOMEvent_GetBubbles, xpc_qsGetterOnlyPropertyStub},
28630 : {5592, nsIDOMEvent_GetCancelable, xpc_qsGetterOnlyPropertyStub},
28631 : {5603, nsIDOMEvent_GetTimeStamp, xpc_qsGetterOnlyPropertyStub},
28632 : {5654, nsIDOMEvent_GetDefaultPrevented, xpc_qsGetterOnlyPropertyStub},
28633 : // nsIDOMMouseEvent (index 347)
28634 : {5696, nsIDOMMouseEvent_GetScreenX, xpc_qsGetterOnlyPropertyStub},
28635 : {5704, nsIDOMMouseEvent_GetScreenY, xpc_qsGetterOnlyPropertyStub},
28636 : {5712, nsIDOMMouseEvent_GetClientX, xpc_qsGetterOnlyPropertyStub},
28637 : {5720, nsIDOMMouseEvent_GetClientY, xpc_qsGetterOnlyPropertyStub},
28638 : {5728, nsIDOMMouseEvent_GetCtrlKey, xpc_qsGetterOnlyPropertyStub},
28639 : {5736, nsIDOMMouseEvent_GetShiftKey, xpc_qsGetterOnlyPropertyStub},
28640 : {5745, nsIDOMMouseEvent_GetAltKey, xpc_qsGetterOnlyPropertyStub},
28641 : {5752, nsIDOMMouseEvent_GetMetaKey, xpc_qsGetterOnlyPropertyStub},
28642 : {5760, nsIDOMMouseEvent_GetButton, xpc_qsGetterOnlyPropertyStub},
28643 : {5767, nsIDOMMouseEvent_GetRelatedTarget, xpc_qsGetterOnlyPropertyStub},
28644 : {5796, nsIDOMMouseEvent_GetMozPressure, xpc_qsGetterOnlyPropertyStub},
28645 : {5808, nsIDOMMouseEvent_GetMozInputSource, xpc_qsGetterOnlyPropertyStub},
28646 : // nsIDOMKeyEvent (index 359)
28647 : {5840, nsIDOMKeyEvent_GetCharCode, xpc_qsGetterOnlyPropertyStub},
28648 : {5849, nsIDOMKeyEvent_GetKeyCode, xpc_qsGetterOnlyPropertyStub},
28649 : {5745, nsIDOMKeyEvent_GetAltKey, xpc_qsGetterOnlyPropertyStub},
28650 : {5728, nsIDOMKeyEvent_GetCtrlKey, xpc_qsGetterOnlyPropertyStub},
28651 : {5736, nsIDOMKeyEvent_GetShiftKey, xpc_qsGetterOnlyPropertyStub},
28652 : {5752, nsIDOMKeyEvent_GetMetaKey, xpc_qsGetterOnlyPropertyStub},
28653 : // nsIDOMMutationEvent (index 365)
28654 : {5870, nsIDOMMutationEvent_GetRelatedNode, xpc_qsGetterOnlyPropertyStub},
28655 : {5882, nsIDOMMutationEvent_GetPrevValue, xpc_qsGetterOnlyPropertyStub},
28656 : {5892, nsIDOMMutationEvent_GetNewValue, xpc_qsGetterOnlyPropertyStub},
28657 : {5901, nsIDOMMutationEvent_GetAttrName, xpc_qsGetterOnlyPropertyStub},
28658 : {5910, nsIDOMMutationEvent_GetAttrChange, xpc_qsGetterOnlyPropertyStub},
28659 : // nsIDOMDragEvent (index 370)
28660 : {5939, nsIDOMDragEvent_GetDataTransfer, xpc_qsGetterOnlyPropertyStub},
28661 : // nsIDOMScrollAreaEvent (index 371)
28662 : {5966, nsIDOMScrollAreaEvent_GetX, xpc_qsGetterOnlyPropertyStub},
28663 : {5968, nsIDOMScrollAreaEvent_GetY, xpc_qsGetterOnlyPropertyStub},
28664 : {131, nsIDOMScrollAreaEvent_GetWidth, xpc_qsGetterOnlyPropertyStub},
28665 : {124, nsIDOMScrollAreaEvent_GetHeight, xpc_qsGetterOnlyPropertyStub},
28666 : // nsIDOMNotifyPaintEvent (index 375)
28667 : {5990, nsIDOMNotifyPaintEvent_GetClientRects, xpc_qsGetterOnlyPropertyStub},
28668 : {6002, nsIDOMNotifyPaintEvent_GetBoundingClientRect, xpc_qsGetterOnlyPropertyStub},
28669 : {6021, nsIDOMNotifyPaintEvent_GetPaintRequests, xpc_qsGetterOnlyPropertyStub},
28670 : // nsIDOMMessageEvent (index 378)
28671 : {871, nsIDOMMessageEvent_GetData, xpc_qsGetterOnlyPropertyStub},
28672 : {6035, nsIDOMMessageEvent_GetOrigin, xpc_qsGetterOnlyPropertyStub},
28673 : {6042, nsIDOMMessageEvent_GetLastEventId, xpc_qsGetterOnlyPropertyStub},
28674 : {6054, nsIDOMMessageEvent_GetSource, xpc_qsGetterOnlyPropertyStub},
28675 : // nsIDOMMouseScrollEvent (index 382)
28676 : {6078, nsIDOMMouseScrollEvent_GetAxis, xpc_qsGetterOnlyPropertyStub},
28677 : // nsIDOMProgressEvent (index 383)
28678 : {6104, nsIDOMProgressEvent_GetLengthComputable, xpc_qsGetterOnlyPropertyStub},
28679 : {6121, nsIDOMProgressEvent_GetLoaded, xpc_qsGetterOnlyPropertyStub},
28680 : {6128, nsIDOMProgressEvent_GetTotal, xpc_qsGetterOnlyPropertyStub},
28681 : // nsIDOMNSEvent (index 386)
28682 : {6134, nsIDOMNSEvent_GetOriginalTarget, xpc_qsGetterOnlyPropertyStub},
28683 : // nsIDOMUIEvent (index 387)
28684 : {6167, nsIDOMUIEvent_GetWhich, xpc_qsGetterOnlyPropertyStub},
28685 : {6173, nsIDOMUIEvent_GetRangeParent, xpc_qsGetterOnlyPropertyStub},
28686 : {6185, nsIDOMUIEvent_GetRangeOffset, xpc_qsGetterOnlyPropertyStub},
28687 : {6197, nsIDOMUIEvent_GetPageX, xpc_qsGetterOnlyPropertyStub},
28688 : {6203, nsIDOMUIEvent_GetPageY, xpc_qsGetterOnlyPropertyStub},
28689 : {6209, nsIDOMUIEvent_GetIsChar, xpc_qsGetterOnlyPropertyStub},
28690 : // nsIDOMTouch (index 393)
28691 : {6216, nsIDOMTouch_GetIdentifier, xpc_qsGetterOnlyPropertyStub},
28692 : {5552, nsIDOMTouch_GetTarget, xpc_qsGetterOnlyPropertyStub},
28693 : {6197, nsIDOMTouch_GetPageX, xpc_qsGetterOnlyPropertyStub},
28694 : {6203, nsIDOMTouch_GetPageY, xpc_qsGetterOnlyPropertyStub},
28695 : {5696, nsIDOMTouch_GetScreenX, xpc_qsGetterOnlyPropertyStub},
28696 : {5704, nsIDOMTouch_GetScreenY, xpc_qsGetterOnlyPropertyStub},
28697 : {5712, nsIDOMTouch_GetClientX, xpc_qsGetterOnlyPropertyStub},
28698 : {5720, nsIDOMTouch_GetClientY, xpc_qsGetterOnlyPropertyStub},
28699 : {6227, nsIDOMTouch_GetRadiusX, xpc_qsGetterOnlyPropertyStub},
28700 : {6235, nsIDOMTouch_GetRadiusY, xpc_qsGetterOnlyPropertyStub},
28701 : {6243, nsIDOMTouch_GetRotationAngle, xpc_qsGetterOnlyPropertyStub},
28702 : {6257, nsIDOMTouch_GetForce, xpc_qsGetterOnlyPropertyStub},
28703 : // nsIDOMTouchList (index 405)
28704 : {155, nsIDOMTouchList_GetLength, xpc_qsGetterOnlyPropertyStub},
28705 : // nsIDOMTouchEvent (index 406)
28706 : {6279, nsIDOMTouchEvent_GetTouches, xpc_qsGetterOnlyPropertyStub},
28707 : {6287, nsIDOMTouchEvent_GetTargetTouches, xpc_qsGetterOnlyPropertyStub},
28708 : {6301, nsIDOMTouchEvent_GetChangedTouches, xpc_qsGetterOnlyPropertyStub},
28709 : {5745, nsIDOMTouchEvent_GetAltKey, xpc_qsGetterOnlyPropertyStub},
28710 : {5752, nsIDOMTouchEvent_GetMetaKey, xpc_qsGetterOnlyPropertyStub},
28711 : {5728, nsIDOMTouchEvent_GetCtrlKey, xpc_qsGetterOnlyPropertyStub},
28712 : {5736, nsIDOMTouchEvent_GetShiftKey, xpc_qsGetterOnlyPropertyStub},
28713 : // nsIDOMHTMLAnchorElement (index 413)
28714 : {6331, nsIDOMHTMLAnchorElement_GetHref, nsIDOMHTMLAnchorElement_SetHref},
28715 : {6336, nsIDOMHTMLAnchorElement_GetRel, nsIDOMHTMLAnchorElement_SetRel},
28716 : {5552, nsIDOMHTMLAnchorElement_GetTarget, nsIDOMHTMLAnchorElement_SetTarget},
28717 : {0, nsIDOMHTMLAnchorElement_GetName, nsIDOMHTMLAnchorElement_SetName},
28718 : {6340, nsIDOMHTMLAnchorElement_GetText, nsIDOMHTMLAnchorElement_SetText},
28719 : {6345, nsIDOMHTMLAnchorElement_GetSearch, nsIDOMHTMLAnchorElement_SetSearch},
28720 : {6352, nsIDOMHTMLAnchorElement_GetHash, nsIDOMHTMLAnchorElement_SetHash},
28721 : // nsIDOMHTMLBaseElement (index 420)
28722 : {6331, nsIDOMHTMLBaseElement_GetHref, nsIDOMHTMLBaseElement_SetHref},
28723 : {5552, nsIDOMHTMLBaseElement_GetTarget, nsIDOMHTMLBaseElement_SetTarget},
28724 : // nsIDOMHTMLButtonElement (index 422)
28725 : {0, nsIDOMHTMLButtonElement_GetName, nsIDOMHTMLButtonElement_SetName},
28726 : {6357, nsIDOMHTMLButtonElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28727 : {1891, nsIDOMHTMLButtonElement_GetValue, nsIDOMHTMLButtonElement_SetValue},
28728 : {6362, nsIDOMHTMLButtonElement_GetDisabled, nsIDOMHTMLButtonElement_SetDisabled},
28729 : // nsIDOMHTMLCollection (index 426)
28730 : {155, nsIDOMHTMLCollection_GetLength, xpc_qsGetterOnlyPropertyStub},
28731 : // nsIDOMHTMLCommandElement (index 427)
28732 : {5547, nsIDOMHTMLCommandElement_GetType, nsIDOMHTMLCommandElement_SetType},
28733 : {6371, nsIDOMHTMLCommandElement_GetLabel, nsIDOMHTMLCommandElement_SetLabel},
28734 : {6377, nsIDOMHTMLCommandElement_GetIcon, nsIDOMHTMLCommandElement_SetIcon},
28735 : {6362, nsIDOMHTMLCommandElement_GetDisabled, nsIDOMHTMLCommandElement_SetDisabled},
28736 : {6382, nsIDOMHTMLCommandElement_GetDefaultChecked, nsIDOMHTMLCommandElement_SetDefaultChecked},
28737 : {6397, nsIDOMHTMLCommandElement_GetChecked, nsIDOMHTMLCommandElement_SetChecked},
28738 : {6405, nsIDOMHTMLCommandElement_GetRadiogroup, nsIDOMHTMLCommandElement_SetRadiogroup},
28739 : // nsIDOMHTMLDocument (index 434)
28740 : {6416, nsIDOMHTMLDocument_GetBody, nsIDOMHTMLDocument_SetBody},
28741 : {6439, nsIDOMHTMLDocument_GetAnchors, xpc_qsGetterOnlyPropertyStub},
28742 : {6447, nsIDOMHTMLDocument_GetLinks, xpc_qsGetterOnlyPropertyStub},
28743 : {6453, nsIDOMHTMLDocument_GetURL, xpc_qsGetterOnlyPropertyStub},
28744 : {6457, nsIDOMHTMLDocument_GetForms, xpc_qsGetterOnlyPropertyStub},
28745 : {6463, nsIDOMHTMLDocument_GetCookie, nsIDOMHTMLDocument_SetCookie},
28746 : {6470, nsIDOMHTMLDocument_GetImages, xpc_qsGetterOnlyPropertyStub},
28747 : {6491, nsIDOMHTMLDocument_GetDomain, nsIDOMHTMLDocument_SetDomain},
28748 : {6498, nsIDOMHTMLDocument_GetDesignMode, nsIDOMHTMLDocument_SetDesignMode},
28749 : {6509, nsIDOMHTMLDocument_GetHead, xpc_qsGetterOnlyPropertyStub},
28750 : // nsIDOMHTMLElement (index 444)
28751 : {6514, nsIDOMHTMLElement_GetId, nsIDOMHTMLElement_SetId},
28752 : {1141, nsIDOMHTMLElement_GetTitle, nsIDOMHTMLElement_SetTitle},
28753 : {6517, nsIDOMHTMLElement_GetLang, nsIDOMHTMLElement_SetLang},
28754 : {6522, nsIDOMHTMLElement_GetDir, nsIDOMHTMLElement_SetDir},
28755 : {6526, nsIDOMHTMLElement_GetClassName, nsIDOMHTMLElement_SetClassName},
28756 : {6536, nsIDOMHTMLElement_GetDataset, xpc_qsGetterOnlyPropertyStub},
28757 : {6544, nsIDOMHTMLElement_GetHidden, nsIDOMHTMLElement_SetHidden},
28758 : {6557, nsIDOMHTMLElement_GetTabIndex, nsIDOMHTMLElement_SetTabIndex},
28759 : {6577, nsIDOMHTMLElement_GetAccessKey, nsIDOMHTMLElement_SetAccessKey},
28760 : {6587, nsIDOMHTMLElement_GetAccessKeyLabel, xpc_qsGetterOnlyPropertyStub},
28761 : {6602, nsIDOMHTMLElement_GetDraggable, nsIDOMHTMLElement_SetDraggable},
28762 : {6612, nsIDOMHTMLElement_GetContentEditable, nsIDOMHTMLElement_SetContentEditable},
28763 : {6628, nsIDOMHTMLElement_GetIsContentEditable, xpc_qsGetterOnlyPropertyStub},
28764 : {6646, nsIDOMHTMLElement_GetContextMenu, xpc_qsGetterOnlyPropertyStub},
28765 : {6658, nsIDOMHTMLElement_GetSpellcheck, nsIDOMHTMLElement_SetSpellcheck},
28766 : {6669, nsIDOMHTMLElement_GetInnerHTML, nsIDOMHTMLElement_SetInnerHTML},
28767 : {6679, nsIDOMHTMLElement_GetOuterHTML, nsIDOMHTMLElement_SetOuterHTML},
28768 : {6723, nsIDOMHTMLElement_GetOffsetParent, xpc_qsGetterOnlyPropertyStub},
28769 : {6736, nsIDOMHTMLElement_GetOffsetTop, xpc_qsGetterOnlyPropertyStub},
28770 : {6746, nsIDOMHTMLElement_GetOffsetLeft, xpc_qsGetterOnlyPropertyStub},
28771 : {6757, nsIDOMHTMLElement_GetOffsetWidth, xpc_qsGetterOnlyPropertyStub},
28772 : {6769, nsIDOMHTMLElement_GetOffsetHeight, xpc_qsGetterOnlyPropertyStub},
28773 : // nsIDOMHTMLFormElement (index 466)
28774 : {6803, nsIDOMHTMLFormElement_GetElements, xpc_qsGetterOnlyPropertyStub},
28775 : {0, nsIDOMHTMLFormElement_GetName, nsIDOMHTMLFormElement_SetName},
28776 : {155, nsIDOMHTMLFormElement_GetLength, xpc_qsGetterOnlyPropertyStub},
28777 : {5552, nsIDOMHTMLFormElement_GetTarget, nsIDOMHTMLFormElement_SetTarget},
28778 : {6819, nsIDOMHTMLFormElement_GetAction, nsIDOMHTMLFormElement_SetAction},
28779 : // nsIDOMHTMLFrameElement (index 471)
28780 : {6826, nsIDOMHTMLFrameElement_GetSrc, nsIDOMHTMLFrameElement_SetSrc},
28781 : {6830, nsIDOMHTMLFrameElement_GetContentDocument, xpc_qsGetterOnlyPropertyStub},
28782 : {6846, nsIDOMHTMLFrameElement_GetContentWindow, xpc_qsGetterOnlyPropertyStub},
28783 : {0, nsIDOMHTMLFrameElement_GetName, nsIDOMHTMLFrameElement_SetName},
28784 : // nsIDOMHTMLFrameSetElement (index 475)
28785 : {6860, nsIDOMHTMLFrameSetElement_GetRows, nsIDOMHTMLFrameSetElement_SetRows},
28786 : {6865, nsIDOMHTMLFrameSetElement_GetCols, nsIDOMHTMLFrameSetElement_SetCols},
28787 : // nsIDOMHTMLIFrameElement (index 477)
28788 : {6826, nsIDOMHTMLIFrameElement_GetSrc, nsIDOMHTMLIFrameElement_SetSrc},
28789 : {6830, nsIDOMHTMLIFrameElement_GetContentDocument, xpc_qsGetterOnlyPropertyStub},
28790 : {6846, nsIDOMHTMLIFrameElement_GetContentWindow, xpc_qsGetterOnlyPropertyStub},
28791 : // nsIDOMHTMLImageElement (index 480)
28792 : {6826, nsIDOMHTMLImageElement_GetSrc, nsIDOMHTMLImageElement_SetSrc},
28793 : {0, nsIDOMHTMLImageElement_GetName, nsIDOMHTMLImageElement_SetName},
28794 : {124, nsIDOMHTMLImageElement_GetHeight, nsIDOMHTMLImageElement_SetHeight},
28795 : {131, nsIDOMHTMLImageElement_GetWidth, nsIDOMHTMLImageElement_SetWidth},
28796 : {6870, nsIDOMHTMLImageElement_GetComplete, xpc_qsGetterOnlyPropertyStub},
28797 : // nsIDOMHTMLInputElement (index 485)
28798 : {6382, nsIDOMHTMLInputElement_GetDefaultChecked, nsIDOMHTMLInputElement_SetDefaultChecked},
28799 : {6362, nsIDOMHTMLInputElement_GetDisabled, nsIDOMHTMLInputElement_SetDisabled},
28800 : {6397, nsIDOMHTMLInputElement_GetChecked, nsIDOMHTMLInputElement_SetChecked},
28801 : {5547, nsIDOMHTMLInputElement_GetType, nsIDOMHTMLInputElement_SetType},
28802 : {6357, nsIDOMHTMLInputElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28803 : {6826, nsIDOMHTMLInputElement_GetSrc, nsIDOMHTMLInputElement_SetSrc},
28804 : {0, nsIDOMHTMLInputElement_GetName, nsIDOMHTMLInputElement_SetName},
28805 : {1891, nsIDOMHTMLInputElement_GetValue, nsIDOMHTMLInputElement_SetValue},
28806 : {6886, nsIDOMHTMLInputElement_GetFiles, xpc_qsGetterOnlyPropertyStub},
28807 : {6892, nsIDOMHTMLInputElement_GetTextLength, xpc_qsGetterOnlyPropertyStub},
28808 : {6903, nsIDOMHTMLInputElement_GetSelectionStart, nsIDOMHTMLInputElement_SetSelectionStart},
28809 : {6918, nsIDOMHTMLInputElement_GetSelectionEnd, nsIDOMHTMLInputElement_SetSelectionEnd},
28810 : {6931, nsIDOMHTMLInputElement_GetSelectionDirection, nsIDOMHTMLInputElement_SetSelectionDirection},
28811 : // nsIDOMHTMLLinkElement (index 498)
28812 : {6362, nsIDOMHTMLLinkElement_GetDisabled, nsIDOMHTMLLinkElement_SetDisabled},
28813 : // nsIDOMHTMLMenuElement (index 499)
28814 : {6968, nsIDOMHTMLMenuElement_GetCompact, nsIDOMHTMLMenuElement_SetCompact},
28815 : {5547, nsIDOMHTMLMenuElement_GetType, nsIDOMHTMLMenuElement_SetType},
28816 : {6371, nsIDOMHTMLMenuElement_GetLabel, nsIDOMHTMLMenuElement_SetLabel},
28817 : // nsIDOMHTMLOptionElement (index 502)
28818 : {6976, nsIDOMHTMLOptionElement_GetIndex, xpc_qsGetterOnlyPropertyStub},
28819 : {6982, nsIDOMHTMLOptionElement_GetSelected, nsIDOMHTMLOptionElement_SetSelected},
28820 : {6357, nsIDOMHTMLOptionElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28821 : {6340, nsIDOMHTMLOptionElement_GetText, nsIDOMHTMLOptionElement_SetText},
28822 : {6991, nsIDOMHTMLOptionElement_GetDefaultSelected, nsIDOMHTMLOptionElement_SetDefaultSelected},
28823 : {1891, nsIDOMHTMLOptionElement_GetValue, nsIDOMHTMLOptionElement_SetValue},
28824 : {6371, nsIDOMHTMLOptionElement_GetLabel, nsIDOMHTMLOptionElement_SetLabel},
28825 : {6362, nsIDOMHTMLOptionElement_GetDisabled, nsIDOMHTMLOptionElement_SetDisabled},
28826 : // nsIDOMHTMLOptionsCollection (index 510)
28827 : {155, nsIDOMHTMLOptionsCollection_GetLength, nsIDOMHTMLOptionsCollection_SetLength},
28828 : {7007, nsIDOMHTMLOptionsCollection_GetSelectedIndex, nsIDOMHTMLOptionsCollection_SetSelectedIndex},
28829 : // nsIDOMHTMLProgressElement (index 512)
28830 : {1891, nsIDOMHTMLProgressElement_GetValue, nsIDOMHTMLProgressElement_SetValue},
28831 : {7021, nsIDOMHTMLProgressElement_GetMax, nsIDOMHTMLProgressElement_SetMax},
28832 : {3287, nsIDOMHTMLProgressElement_GetPosition, xpc_qsGetterOnlyPropertyStub},
28833 : {6357, nsIDOMHTMLProgressElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28834 : // nsIDOMHTMLSelectElement (index 516)
28835 : {0, nsIDOMHTMLSelectElement_GetName, nsIDOMHTMLSelectElement_SetName},
28836 : {6357, nsIDOMHTMLSelectElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28837 : {1891, nsIDOMHTMLSelectElement_GetValue, nsIDOMHTMLSelectElement_SetValue},
28838 : {6362, nsIDOMHTMLSelectElement_GetDisabled, nsIDOMHTMLSelectElement_SetDisabled},
28839 : {155, nsIDOMHTMLSelectElement_GetLength, nsIDOMHTMLSelectElement_SetLength},
28840 : {7007, nsIDOMHTMLSelectElement_GetSelectedIndex, nsIDOMHTMLSelectElement_SetSelectedIndex},
28841 : {5547, nsIDOMHTMLSelectElement_GetType, xpc_qsGetterOnlyPropertyStub},
28842 : {7025, nsIDOMHTMLSelectElement_GetOptions, xpc_qsGetterOnlyPropertyStub},
28843 : {3303, nsIDOMHTMLSelectElement_GetSize, nsIDOMHTMLSelectElement_SetSize},
28844 : // nsIDOMHTMLStyleElement (index 525)
28845 : {6362, nsIDOMHTMLStyleElement_GetDisabled, nsIDOMHTMLStyleElement_SetDisabled},
28846 : // nsIDOMHTMLTableCellElement (index 526)
28847 : {7033, nsIDOMHTMLTableCellElement_GetColSpan, nsIDOMHTMLTableCellElement_SetColSpan},
28848 : {7041, nsIDOMHTMLTableCellElement_GetHeaders, nsIDOMHTMLTableCellElement_SetHeaders},
28849 : {7049, nsIDOMHTMLTableCellElement_GetCellIndex, xpc_qsGetterOnlyPropertyStub},
28850 : {7059, nsIDOMHTMLTableCellElement_GetRowSpan, nsIDOMHTMLTableCellElement_SetRowSpan},
28851 : {7067, nsIDOMHTMLTableCellElement_GetAbbr, nsIDOMHTMLTableCellElement_SetAbbr},
28852 : {7072, nsIDOMHTMLTableCellElement_GetScope, nsIDOMHTMLTableCellElement_SetScope},
28853 : {7078, nsIDOMHTMLTableCellElement_GetNoWrap, nsIDOMHTMLTableCellElement_SetNoWrap},
28854 : {131, nsIDOMHTMLTableCellElement_GetWidth, nsIDOMHTMLTableCellElement_SetWidth},
28855 : // nsIDOMHTMLTableColElement (index 534)
28856 : {7085, nsIDOMHTMLTableColElement_GetSpan, nsIDOMHTMLTableColElement_SetSpan},
28857 : {131, nsIDOMHTMLTableColElement_GetWidth, nsIDOMHTMLTableColElement_SetWidth},
28858 : // nsIDOMHTMLTableElement (index 536)
28859 : {6860, nsIDOMHTMLTableElement_GetRows, xpc_qsGetterOnlyPropertyStub},
28860 : {7100, nsIDOMHTMLTableElement_GetSummary, nsIDOMHTMLTableElement_SetSummary},
28861 : // nsIDOMHTMLTableRowElement (index 538)
28862 : {7118, nsIDOMHTMLTableRowElement_GetSectionRowIndex, xpc_qsGetterOnlyPropertyStub},
28863 : {7134, nsIDOMHTMLTableRowElement_GetRowIndex, xpc_qsGetterOnlyPropertyStub},
28864 : {7143, nsIDOMHTMLTableRowElement_GetCells, xpc_qsGetterOnlyPropertyStub},
28865 : // nsIDOMHTMLTableSectionElement (index 541)
28866 : {6860, nsIDOMHTMLTableSectionElement_GetRows, xpc_qsGetterOnlyPropertyStub},
28867 : // nsIDOMHTMLTextAreaElement (index 542)
28868 : {6860, nsIDOMHTMLTextAreaElement_GetRows, nsIDOMHTMLTextAreaElement_SetRows},
28869 : {0, nsIDOMHTMLTextAreaElement_GetName, nsIDOMHTMLTextAreaElement_SetName},
28870 : {6357, nsIDOMHTMLTextAreaElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28871 : {7171, nsIDOMHTMLTextAreaElement_GetDefaultValue, nsIDOMHTMLTextAreaElement_SetDefaultValue},
28872 : {6865, nsIDOMHTMLTextAreaElement_GetCols, nsIDOMHTMLTextAreaElement_SetCols},
28873 : {1891, nsIDOMHTMLTextAreaElement_GetValue, nsIDOMHTMLTextAreaElement_SetValue},
28874 : {5547, nsIDOMHTMLTextAreaElement_GetType, xpc_qsGetterOnlyPropertyStub},
28875 : {6903, nsIDOMHTMLTextAreaElement_GetSelectionStart, nsIDOMHTMLTextAreaElement_SetSelectionStart},
28876 : {6918, nsIDOMHTMLTextAreaElement_GetSelectionEnd, nsIDOMHTMLTextAreaElement_SetSelectionEnd},
28877 : {6931, nsIDOMHTMLTextAreaElement_GetSelectionDirection, nsIDOMHTMLTextAreaElement_SetSelectionDirection},
28878 : {6892, nsIDOMHTMLTextAreaElement_GetTextLength, xpc_qsGetterOnlyPropertyStub},
28879 : {7184, nsIDOMHTMLTextAreaElement_GetWrap, nsIDOMHTMLTextAreaElement_SetWrap},
28880 : // nsIDOMHTMLTitleElement (index 554)
28881 : {6340, nsIDOMHTMLTitleElement_GetText, nsIDOMHTMLTitleElement_SetText},
28882 : // nsIDOMHTMLCanvasElement (index 555)
28883 : {131, nsIDOMHTMLCanvasElement_GetWidth, nsIDOMHTMLCanvasElement_SetWidth},
28884 : {124, nsIDOMHTMLCanvasElement_GetHeight, nsIDOMHTMLCanvasElement_SetHeight},
28885 : // nsIDOMRange (index 557)
28886 : {7210, nsIDOMRange_GetStartContainer, xpc_qsGetterOnlyPropertyStub},
28887 : {7225, nsIDOMRange_GetStartOffset, xpc_qsGetterOnlyPropertyStub},
28888 : {7237, nsIDOMRange_GetEndContainer, xpc_qsGetterOnlyPropertyStub},
28889 : {7250, nsIDOMRange_GetEndOffset, xpc_qsGetterOnlyPropertyStub},
28890 : {7260, nsIDOMRange_GetCollapsed, xpc_qsGetterOnlyPropertyStub},
28891 : {7270, nsIDOMRange_GetCommonAncestorContainer, xpc_qsGetterOnlyPropertyStub},
28892 : // nsIDOMStorage (index 563)
28893 : {155, nsIDOMStorage_GetLength, xpc_qsGetterOnlyPropertyStub},
28894 : // nsIDOMStorageItem (index 564)
28895 : {1891, nsIDOMStorageItem_GetValue, nsIDOMStorageItem_SetValue},
28896 : // nsIDOMSVGStylable (index 565)
28897 : {6526, nsIDOMSVGStylable_GetClassName, xpc_qsGetterOnlyPropertyStub},
28898 : {2201, nsIDOMSVGStylable_GetStyle, xpc_qsGetterOnlyPropertyStub},
28899 : // nsIDOMXPathResult (index 567)
28900 : {7702, nsIDOMXPathResult_GetSnapshotLength, xpc_qsGetterOnlyPropertyStub},
28901 : {7717, nsIDOMXPathResult_GetResultType, xpc_qsGetterOnlyPropertyStub},
28902 : {7728, nsIDOMXPathResult_GetNumberValue, xpc_qsGetterOnlyPropertyStub},
28903 : {7740, nsIDOMXPathResult_GetStringValue, xpc_qsGetterOnlyPropertyStub},
28904 : {7752, nsIDOMXPathResult_GetBooleanValue, xpc_qsGetterOnlyPropertyStub},
28905 : {7765, nsIDOMXPathResult_GetSingleNodeValue, xpc_qsGetterOnlyPropertyStub},
28906 : // nsIDOMXULElement (index 573)
28907 : {6514, nsIDOMXULElement_GetId, nsIDOMXULElement_SetId},
28908 : {6526, nsIDOMXULElement_GetClassName, nsIDOMXULElement_SetClassName},
28909 : {7801, nsIDOMXULElement_GetAlign, nsIDOMXULElement_SetAlign},
28910 : {6522, nsIDOMXULElement_GetDir, nsIDOMXULElement_SetDir},
28911 : {7807, nsIDOMXULElement_GetFlex, nsIDOMXULElement_SetFlex},
28912 : {7812, nsIDOMXULElement_GetFlexGroup, nsIDOMXULElement_SetFlexGroup},
28913 : {7822, nsIDOMXULElement_GetOrdinal, nsIDOMXULElement_SetOrdinal},
28914 : {7830, nsIDOMXULElement_GetOrient, nsIDOMXULElement_SetOrient},
28915 : {7837, nsIDOMXULElement_GetPack, nsIDOMXULElement_SetPack},
28916 : {6544, nsIDOMXULElement_GetHidden, nsIDOMXULElement_SetHidden},
28917 : {7260, nsIDOMXULElement_GetCollapsed, nsIDOMXULElement_SetCollapsed},
28918 : {7842, nsIDOMXULElement_GetObserves, nsIDOMXULElement_SetObserves},
28919 : {7851, nsIDOMXULElement_GetMenu, nsIDOMXULElement_SetMenu},
28920 : {6646, nsIDOMXULElement_GetContextMenu, nsIDOMXULElement_SetContextMenu},
28921 : {7856, nsIDOMXULElement_GetTooltip, nsIDOMXULElement_SetTooltip},
28922 : {131, nsIDOMXULElement_GetWidth, nsIDOMXULElement_SetWidth},
28923 : {124, nsIDOMXULElement_GetHeight, nsIDOMXULElement_SetHeight},
28924 : {3104, nsIDOMXULElement_GetMinWidth, nsIDOMXULElement_SetMinWidth},
28925 : {3094, nsIDOMXULElement_GetMinHeight, nsIDOMXULElement_SetMinHeight},
28926 : {3085, nsIDOMXULElement_GetMaxWidth, nsIDOMXULElement_SetMaxWidth},
28927 : {3075, nsIDOMXULElement_GetMaxHeight, nsIDOMXULElement_SetMaxHeight},
28928 : {7864, nsIDOMXULElement_GetPersist, nsIDOMXULElement_SetPersist},
28929 : {137, nsIDOMXULElement_GetLeft, nsIDOMXULElement_SetLeft},
28930 : {12, nsIDOMXULElement_GetTop, nsIDOMXULElement_SetTop},
28931 : {7872, nsIDOMXULElement_GetDatasources, nsIDOMXULElement_SetDatasources},
28932 : {7884, nsIDOMXULElement_GetRef, nsIDOMXULElement_SetRef},
28933 : {7888, nsIDOMXULElement_GetTooltipText, nsIDOMXULElement_SetTooltipText},
28934 : {7900, nsIDOMXULElement_GetStatusText, nsIDOMXULElement_SetStatusText},
28935 : {7911, nsIDOMXULElement_GetAllowEvents, nsIDOMXULElement_SetAllowEvents},
28936 : {7923, nsIDOMXULElement_GetDatabase, xpc_qsGetterOnlyPropertyStub},
28937 : {7932, nsIDOMXULElement_GetBuilder, xpc_qsGetterOnlyPropertyStub},
28938 : {7940, nsIDOMXULElement_GetResource, xpc_qsGetterOnlyPropertyStub},
28939 : {7949, nsIDOMXULElement_GetControllers, xpc_qsGetterOnlyPropertyStub},
28940 : {7961, nsIDOMXULElement_GetBoxObject, xpc_qsGetterOnlyPropertyStub},
28941 : // nsIBoxObject (index 607)
28942 : {5966, nsIBoxObject_GetX, xpc_qsGetterOnlyPropertyStub},
28943 : {5968, nsIBoxObject_GetY, xpc_qsGetterOnlyPropertyStub},
28944 : {5696, nsIBoxObject_GetScreenX, xpc_qsGetterOnlyPropertyStub},
28945 : {5704, nsIBoxObject_GetScreenY, xpc_qsGetterOnlyPropertyStub},
28946 : {131, nsIBoxObject_GetWidth, xpc_qsGetterOnlyPropertyStub},
28947 : {124, nsIBoxObject_GetHeight, xpc_qsGetterOnlyPropertyStub},
28948 : // nsIDOMFileReader (index 613)
28949 : {8097, nsIDOMFileReader_GetReadyState, xpc_qsGetterOnlyPropertyStub},
28950 : {8108, nsIDOMFileReader_GetResult, xpc_qsGetterOnlyPropertyStub},
28951 : {8115, nsIDOMFileReader_GetError, xpc_qsGetterOnlyPropertyStub},
28952 : {8121, nsIDOMFileReader_GetOnloadstart, nsIDOMFileReader_SetOnloadstart},
28953 : {8133, nsIDOMFileReader_GetOnprogress, nsIDOMFileReader_SetOnprogress},
28954 : {8144, nsIDOMFileReader_GetOnload, nsIDOMFileReader_SetOnload},
28955 : {8151, nsIDOMFileReader_GetOnabort, nsIDOMFileReader_SetOnabort},
28956 : {8159, nsIDOMFileReader_GetOnerror, nsIDOMFileReader_SetOnerror},
28957 : {8167, nsIDOMFileReader_GetOnloadend, nsIDOMFileReader_SetOnloadend},
28958 : // nsIXMLHttpRequest (index 622)
28959 : {8177, nsIXMLHttpRequest_GetResponseXML, xpc_qsGetterOnlyPropertyStub},
28960 : {8189, nsIXMLHttpRequest_GetResponseText, xpc_qsGetterOnlyPropertyStub},
28961 : {8202, nsIXMLHttpRequest_GetResponseType, nsIXMLHttpRequest_SetResponseType},
28962 : {8215, nsIXMLHttpRequest_GetResponse, xpc_qsGetterOnlyPropertyStub},
28963 : {8224, nsIXMLHttpRequest_GetStatus, xpc_qsGetterOnlyPropertyStub},
28964 : {8254, nsIXMLHttpRequest_GetTimeout, nsIXMLHttpRequest_SetTimeout},
28965 : {8097, nsIXMLHttpRequest_GetReadyState, xpc_qsGetterOnlyPropertyStub},
28966 : {8262, nsIXMLHttpRequest_GetMultipart, nsIXMLHttpRequest_SetMultipart},
28967 : {8272, nsIXMLHttpRequest_GetMozBackgroundRequest, nsIXMLHttpRequest_SetMozBackgroundRequest},
28968 : {8293, nsIXMLHttpRequest_GetWithCredentials, nsIXMLHttpRequest_SetWithCredentials},
28969 : {1196, nsIXMLHttpRequest_GetOnreadystatechange, nsIXMLHttpRequest_SetOnreadystatechange},
28970 : // nsIWebSocket (index 633)
28971 : {8309, nsIWebSocket_GetUrl, xpc_qsGetterOnlyPropertyStub},
28972 : {8313, nsIWebSocket_GetExtensions, xpc_qsGetterOnlyPropertyStub},
28973 : {8324, nsIWebSocket_GetProtocol, xpc_qsGetterOnlyPropertyStub},
28974 : {8097, nsIWebSocket_GetReadyState, xpc_qsGetterOnlyPropertyStub},
28975 : {8333, nsIWebSocket_GetBufferedAmount, xpc_qsGetterOnlyPropertyStub},
28976 : {8348, nsIWebSocket_GetBinaryType, nsIWebSocket_SetBinaryType},
28977 : {8359, nsIWebSocket_GetOnopen, nsIWebSocket_SetOnopen},
28978 : {8366, nsIWebSocket_GetOnmessage, nsIWebSocket_SetOnmessage},
28979 : {8159, nsIWebSocket_GetOnerror, nsIWebSocket_SetOnerror},
28980 : {8376, nsIWebSocket_GetOnclose, nsIWebSocket_SetOnclose},
28981 : // nsIDOMWebGLRenderingContext (index 643)
28982 : {185, nsIDOMWebGLRenderingContext_GetCanvas, xpc_qsGetterOnlyPropertyStub},
28983 : {10308, nsIDOMWebGLRenderingContext_GetDrawingBufferWidth, xpc_qsGetterOnlyPropertyStub},
28984 : {10327, nsIDOMWebGLRenderingContext_GetDrawingBufferHeight, xpc_qsGetterOnlyPropertyStub},
28985 : // nsIDOMNotifyAudioAvailableEvent (index 646)
28986 : {10347, nsIDOMNotifyAudioAvailableEvent_GetFrameBuffer, xpc_qsGetterOnlyPropertyStub},
28987 : {10359, nsIDOMNotifyAudioAvailableEvent_GetTime, xpc_qsGetterOnlyPropertyStub},
28988 : // nsIIDBCursor (index 648)
28989 : {2803, nsIIDBCursor_GetDirection, xpc_qsGetterOnlyPropertyStub},
28990 : {6054, nsIIDBCursor_GetSource, xpc_qsGetterOnlyPropertyStub},
28991 : {7585, nsIIDBCursor_GetKey, xpc_qsGetterOnlyPropertyStub},
28992 : {10378, nsIIDBCursor_GetPrimaryKey, xpc_qsGetterOnlyPropertyStub},
28993 : // nsIIDBCursorWithValue (index 652)
28994 : {1891, nsIIDBCursorWithValue_GetValue, xpc_qsGetterOnlyPropertyStub},
28995 : // nsIIDBDatabase (index 653)
28996 : {0, nsIIDBDatabase_GetName, xpc_qsGetterOnlyPropertyStub},
28997 : {10420, nsIIDBDatabase_GetVersion, xpc_qsGetterOnlyPropertyStub},
28998 : {10428, nsIIDBDatabase_GetObjectStoreNames, xpc_qsGetterOnlyPropertyStub},
28999 : {8151, nsIIDBDatabase_GetOnabort, nsIIDBDatabase_SetOnabort},
29000 : {8159, nsIIDBDatabase_GetOnerror, nsIIDBDatabase_SetOnerror},
29001 : {10493, nsIIDBDatabase_GetOnversionchange, nsIIDBDatabase_SetOnversionchange},
29002 : // nsIIDBDatabaseException (index 659)
29003 : {10509, nsIIDBDatabaseException_GetCode, xpc_qsGetterOnlyPropertyStub},
29004 : // nsIIDBIndex (index 660)
29005 : {0, nsIIDBIndex_GetName, xpc_qsGetterOnlyPropertyStub},
29006 : {10514, nsIIDBIndex_GetStoreName, xpc_qsGetterOnlyPropertyStub},
29007 : {10524, nsIIDBIndex_GetKeyPath, xpc_qsGetterOnlyPropertyStub},
29008 : {10532, nsIIDBIndex_GetUnique, xpc_qsGetterOnlyPropertyStub},
29009 : {10539, nsIIDBIndex_GetMultiEntry, xpc_qsGetterOnlyPropertyStub},
29010 : {10550, nsIIDBIndex_GetObjectStore, xpc_qsGetterOnlyPropertyStub},
29011 : // nsIIDBKeyRange (index 666)
29012 : {10622, nsIIDBKeyRange_GetLower, xpc_qsGetterOnlyPropertyStub},
29013 : {10628, nsIIDBKeyRange_GetUpper, xpc_qsGetterOnlyPropertyStub},
29014 : {10634, nsIIDBKeyRange_GetLowerOpen, xpc_qsGetterOnlyPropertyStub},
29015 : {10644, nsIIDBKeyRange_GetUpperOpen, xpc_qsGetterOnlyPropertyStub},
29016 : // nsIIDBObjectStore (index 670)
29017 : {0, nsIIDBObjectStore_GetName, xpc_qsGetterOnlyPropertyStub},
29018 : {10524, nsIIDBObjectStore_GetKeyPath, xpc_qsGetterOnlyPropertyStub},
29019 : {10654, nsIIDBObjectStore_GetIndexNames, xpc_qsGetterOnlyPropertyStub},
29020 : {10481, nsIIDBObjectStore_GetTransaction, xpc_qsGetterOnlyPropertyStub},
29021 : {10665, nsIIDBObjectStore_GetAutoIncrement, xpc_qsGetterOnlyPropertyStub},
29022 : // nsIIDBRequest (index 675)
29023 : {8097, nsIIDBRequest_GetReadyState, xpc_qsGetterOnlyPropertyStub},
29024 : {6054, nsIIDBRequest_GetSource, xpc_qsGetterOnlyPropertyStub},
29025 : {10481, nsIIDBRequest_GetTransaction, xpc_qsGetterOnlyPropertyStub},
29026 : {8108, nsIIDBRequest_GetResult, xpc_qsGetterOnlyPropertyStub},
29027 : {10707, nsIIDBRequest_GetErrorCode, xpc_qsGetterOnlyPropertyStub},
29028 : {10717, nsIIDBRequest_GetOnsuccess, nsIIDBRequest_SetOnsuccess},
29029 : {8159, nsIIDBRequest_GetOnerror, nsIIDBRequest_SetOnerror},
29030 : // nsIIDBTransaction (index 682)
29031 : {10727, nsIIDBTransaction_GetDb, xpc_qsGetterOnlyPropertyStub},
29032 : {10730, nsIIDBTransaction_GetMode, xpc_qsGetterOnlyPropertyStub},
29033 : {10428, nsIIDBTransaction_GetObjectStoreNames, xpc_qsGetterOnlyPropertyStub},
29034 : {8159, nsIIDBTransaction_GetOnerror, nsIIDBTransaction_SetOnerror},
29035 : {10735, nsIIDBTransaction_GetOncomplete, nsIIDBTransaction_SetOncomplete},
29036 : {8151, nsIIDBTransaction_GetOnabort, nsIIDBTransaction_SetOnabort},
29037 : // nsIIDBOpenDBRequest (index 688)
29038 : {10765, nsIIDBOpenDBRequest_GetOnblocked, nsIIDBOpenDBRequest_SetOnblocked},
29039 : {10775, nsIIDBOpenDBRequest_GetOnupgradeneeded, nsIIDBOpenDBRequest_SetOnupgradeneeded},
29040 : // nsIIDBVersionChangeEvent (index 690)
29041 : {10791, nsIIDBVersionChangeEvent_GetOldVersion, xpc_qsGetterOnlyPropertyStub},
29042 : {10802, nsIIDBVersionChangeEvent_GetNewVersion, xpc_qsGetterOnlyPropertyStub},
29043 : // nsIDOMDOMError (index 692)
29044 : {0, nsIDOMDOMError_GetName, xpc_qsGetterOnlyPropertyStub},
29045 : };
29046 :
29047 : static const xpc_qsFunctionSpec all_functions[] = {
29048 : // nsIDOMWindow (index 0)
29049 : {21, 0, nsIDOMWindow_GetSelection},
29050 : {34, 1, nsIDOMWindow_ScrollByLines},
29051 : {48, 2, nsIDOMWindow_GetComputedStyle},
29052 : // nsIDOMJSWindow (index 3)
29053 : {119, 1, nsIDOMJSWindow_Dump},
29054 : // nsIDOMClientRectList (index 4)
29055 : {162, 1, nsIDOMClientRectList_Item},
29056 : // nsIDOMPaintRequestList (index 5)
29057 : {162, 1, nsIDOMPaintRequestList_Item},
29058 : // nsIDOMCanvasRenderingContext2D (index 6)
29059 : {192, 0, nsIDOMCanvasRenderingContext2D_Save},
29060 : {197, 0, nsIDOMCanvasRenderingContext2D_Restore},
29061 : {205, 2, nsIDOMCanvasRenderingContext2D_Scale},
29062 : {211, 1, nsIDOMCanvasRenderingContext2D_Rotate},
29063 : {218, 2, nsIDOMCanvasRenderingContext2D_Translate},
29064 : {228, 6, nsIDOMCanvasRenderingContext2D_Transform},
29065 : {238, 6, nsIDOMCanvasRenderingContext2D_SetTransform},
29066 : {369, 4, nsIDOMCanvasRenderingContext2D_CreateLinearGradient},
29067 : {390, 6, nsIDOMCanvasRenderingContext2D_CreateRadialGradient},
29068 : {411, 2, nsIDOMCanvasRenderingContext2D_CreatePattern},
29069 : {536, 4, nsIDOMCanvasRenderingContext2D_ClearRect},
29070 : {546, 4, nsIDOMCanvasRenderingContext2D_FillRect},
29071 : {555, 4, nsIDOMCanvasRenderingContext2D_StrokeRect},
29072 : {566, 0, nsIDOMCanvasRenderingContext2D_BeginPath},
29073 : {576, 0, nsIDOMCanvasRenderingContext2D_ClosePath},
29074 : {586, 2, nsIDOMCanvasRenderingContext2D_MoveTo},
29075 : {593, 2, nsIDOMCanvasRenderingContext2D_LineTo},
29076 : {600, 4, nsIDOMCanvasRenderingContext2D_QuadraticCurveTo},
29077 : {617, 6, nsIDOMCanvasRenderingContext2D_BezierCurveTo},
29078 : {631, 5, nsIDOMCanvasRenderingContext2D_ArcTo},
29079 : {637, 6, nsIDOMCanvasRenderingContext2D_Arc},
29080 : {641, 4, nsIDOMCanvasRenderingContext2D_Rect},
29081 : {646, 0, nsIDOMCanvasRenderingContext2D_Fill},
29082 : {651, 0, nsIDOMCanvasRenderingContext2D_Stroke},
29083 : {658, 0, nsIDOMCanvasRenderingContext2D_Clip},
29084 : {691, 4, nsIDOMCanvasRenderingContext2D_FillText},
29085 : {700, 4, nsIDOMCanvasRenderingContext2D_StrokeText},
29086 : {711, 1, nsIDOMCanvasRenderingContext2D_MeasureText},
29087 : {736, 9, nsIDOMCanvasRenderingContext2D_DrawImage},
29088 : {746, 2, nsIDOMCanvasRenderingContext2D_IsPointInPath},
29089 : {760, 0, nsIDOMCanvasRenderingContext2D_GetImageData},
29090 : {773, 0, nsIDOMCanvasRenderingContext2D_PutImageData},
29091 : {786, 0, nsIDOMCanvasRenderingContext2D_CreateImageData},
29092 : {827, 7, nsIDOMCanvasRenderingContext2D_DrawWindow},
29093 : {838, 7, nsIDOMCanvasRenderingContext2D_AsyncDrawXULElement},
29094 : // nsIDOMCanvasGradient (index 41)
29095 : {858, 2, nsIDOMCanvasGradient_AddColorStop},
29096 : // nsIDOMDocument (index 42)
29097 : {907, 1, nsIDOMDocument_GetElementsByTagName},
29098 : {936, 2, nsIDOMDocument_GetElementsByTagNameNS},
29099 : {959, 1, nsIDOMDocument_GetElementById},
29100 : {974, 0, nsIDOMDocument_CreateDocumentFragment},
29101 : {997, 1, nsIDOMDocument_CreateElement},
29102 : {1011, 2, nsIDOMDocument_CreateElementNS},
29103 : {1027, 2, nsIDOMDocument_ImportNode},
29104 : {1038, 1, nsIDOMDocument_CreateTextNode},
29105 : {1065, 1, nsIDOMDocument_AdoptNode},
29106 : {1087, 3, nsIDOMDocument_CreateNodeIterator},
29107 : {1106, 1, nsIDOMDocument_CreateEvent},
29108 : {1118, 1, nsIDOMDocument_GetElementsByClassName},
29109 : {1156, 0, nsIDOMDocument_HasFocus},
29110 : {1165, 2, nsIDOMDocument_ElementFromPoint},
29111 : // nsIDOMElement (index 56)
29112 : {1215, 2, nsIDOMElement_RemoveAttributeNS},
29113 : {1233, 1, nsIDOMElement_RemoveAttribute},
29114 : {1249, 1, nsIDOMElement_GetAttribute},
29115 : {907, 1, nsIDOMElement_GetElementsByTagName},
29116 : {1262, 2, nsIDOMElement_SetAttribute},
29117 : {936, 2, nsIDOMElement_GetElementsByTagNameNS},
29118 : {1275, 2, nsIDOMElement_HasAttributeNS},
29119 : {1298, 3, nsIDOMElement_SetAttributeNS},
29120 : {1313, 1, nsIDOMElement_HasAttribute},
29121 : {1326, 2, nsIDOMElement_GetAttributeNS},
29122 : // nsIDOMNamedNodeMap (index 66)
29123 : {162, 1, nsIDOMNamedNodeMap_Item},
29124 : // nsIDOMNode (index 67)
29125 : {1479, 2, nsIDOMNode_InsertBefore},
29126 : {1492, 2, nsIDOMNode_ReplaceChild},
29127 : {1505, 1, nsIDOMNode_RemoveChild},
29128 : {1517, 1, nsIDOMNode_AppendChild},
29129 : {1529, 0, nsIDOMNode_HasChildNodes},
29130 : {1543, 1, nsIDOMNode_CloneNode},
29131 : {1553, 0, nsIDOMNode_Normalize},
29132 : {1563, 2, nsIDOMNode_IsSupported},
29133 : {1605, 0, nsIDOMNode_HasAttributes},
29134 : {1627, 1, nsIDOMNode_CompareDocumentPosition},
29135 : {1663, 1, nsIDOMNode_LookupPrefix},
29136 : {1676, 1, nsIDOMNode_IsDefaultNamespace},
29137 : {1695, 1, nsIDOMNode_LookupNamespaceURI},
29138 : {1714, 1, nsIDOMNode_IsEqualNode},
29139 : {1726, 3, nsIDOMNode_SetUserData},
29140 : {1738, 1, nsIDOMNode_GetUserData},
29141 : {1750, 1, nsIDOMNode_Contains},
29142 : // nsIDOMNodeList (index 84)
29143 : {162, 1, nsIDOMNodeList_Item},
29144 : // nsIDOMNodeSelector (index 85)
29145 : {1759, 1, nsIDOMNodeSelector_QuerySelector},
29146 : {1773, 1, nsIDOMNodeSelector_QuerySelectorAll},
29147 : // nsIDOMText (index 87)
29148 : {1790, 1, nsIDOMText_SplitText},
29149 : // nsIDOMDOMImplementation (index 88)
29150 : {1800, 2, nsIDOMDOMImplementation_HasFeature},
29151 : {1811, 3, nsIDOMDOMImplementation_CreateDocumentType},
29152 : {1830, 3, nsIDOMDOMImplementation_CreateDocument},
29153 : {1845, 1, nsIDOMDOMImplementation_CreateHTMLDocument},
29154 : // nsIDOMDOMStringList (index 92)
29155 : {162, 1, nsIDOMDOMStringList_Item},
29156 : {1750, 1, nsIDOMDOMStringList_Contains},
29157 : // nsIDOMDOMTokenList (index 94)
29158 : {162, 1, nsIDOMDOMTokenList_Item},
29159 : {1750, 1, nsIDOMDOMTokenList_Contains},
29160 : {1864, 1, nsIDOMDOMTokenList_Add},
29161 : {1868, 1, nsIDOMDOMTokenList_Remove},
29162 : {1875, 1, nsIDOMDOMTokenList_Toggle},
29163 : {1882, 0, nsIDOMDOMTokenList_ToString},
29164 : // nsIDOMXULDocument (index 100)
29165 : {1897, 1, nsIDOMXULDocument_GetBoxObjectFor},
29166 : // nsIDOMNSElement (index 101)
29167 : {1118, 1, nsIDOMNSElement_GetElementsByClassName},
29168 : {1913, 0, nsIDOMNSElement_GetClientRects},
29169 : {1928, 0, nsIDOMNSElement_GetBoundingClientRect},
29170 : {2156, 1, nsIDOMNSElement_SetCapture},
29171 : {2167, 0, nsIDOMNSElement_ReleaseCapture},
29172 : {2182, 1, nsIDOMNSElement_MozMatchesSelector},
29173 : // nsIDOMCSSStyleDeclaration (index 107)
29174 : {5401, 1, nsIDOMCSSStyleDeclaration_GetPropertyValue},
29175 : {5418, 1, nsIDOMCSSStyleDeclaration_GetPropertyCSSValue},
29176 : {5438, 1, nsIDOMCSSStyleDeclaration_RemoveProperty},
29177 : {5453, 1, nsIDOMCSSStyleDeclaration_GetPropertyPriority},
29178 : {5473, 3, nsIDOMCSSStyleDeclaration_SetProperty},
29179 : {162, 1, nsIDOMCSSStyleDeclaration_Item},
29180 : // nsIDOMEventTarget (index 113)
29181 : {5496, 4, nsIDOMEventTarget_AddEventListener},
29182 : {5513, 3, nsIDOMEventTarget_RemoveEventListener},
29183 : {5533, 1, nsIDOMEventTarget_DispatchEvent},
29184 : // nsIDOMEvent (index 116)
29185 : {5613, 0, nsIDOMEvent_StopPropagation},
29186 : {5629, 0, nsIDOMEvent_PreventDefault},
29187 : {5644, 3, nsIDOMEvent_InitEvent},
29188 : {5671, 0, nsIDOMEvent_StopImmediatePropagation},
29189 : // nsIDOMMouseEvent (index 120)
29190 : {5781, 15, nsIDOMMouseEvent_InitMouseEvent},
29191 : {5823, 17, nsIDOMMouseEvent_InitNSMouseEvent},
29192 : // nsIDOMKeyEvent (index 122)
29193 : {5857, 10, nsIDOMKeyEvent_InitKeyEvent},
29194 : // nsIDOMMutationEvent (index 123)
29195 : {5921, 8, nsIDOMMutationEvent_InitMutationEvent},
29196 : // nsIDOMDragEvent (index 124)
29197 : {5952, 16, nsIDOMDragEvent_InitDragEvent},
29198 : // nsIDOMScrollAreaEvent (index 125)
29199 : {5970, 9, nsIDOMScrollAreaEvent_InitScrollAreaEvent},
29200 : // nsIDOMMessageEvent (index 126)
29201 : {6061, 7, nsIDOMMessageEvent_InitMessageEvent},
29202 : // nsIDOMMouseScrollEvent (index 127)
29203 : {6083, 16, nsIDOMMouseScrollEvent_InitMouseScrollEvent},
29204 : // nsIDOMNSEvent (index 128)
29205 : {6149, 0, nsIDOMNSEvent_GetPreventDefault},
29206 : // nsIDOMTouchList (index 129)
29207 : {162, 1, nsIDOMTouchList_Item},
29208 : {6263, 1, nsIDOMTouchList_IdentifiedTouch},
29209 : // nsIDOMTouchEvent (index 131)
29210 : {6316, 12, nsIDOMTouchEvent_InitTouchEvent},
29211 : // nsIDOMHTMLCollection (index 132)
29212 : {162, 1, nsIDOMHTMLCollection_Item},
29213 : // nsIDOMHTMLDocument (index 133)
29214 : {6421, 1, nsIDOMHTMLDocument_GetElementsByName},
29215 : {6477, 1, nsIDOMHTMLDocument_Write},
29216 : {6483, 1, nsIDOMHTMLDocument_Writeln},
29217 : {21, 0, nsIDOMHTMLDocument_GetSelection},
29218 : // nsIDOMHTMLElement (index 137)
29219 : {6551, 0, nsIDOMHTMLElement_Click},
29220 : {6566, 0, nsIDOMHTMLElement_Focus},
29221 : {6572, 0, nsIDOMHTMLElement_Blur},
29222 : {6689, 2, nsIDOMHTMLElement_InsertAdjacentHTML},
29223 : {6708, 1, nsIDOMHTMLElement_ScrollIntoView},
29224 : {6782, 0, nsIDOMHTMLElement_MozRequestFullScreen},
29225 : // nsIDOMHTMLFormElement (index 143)
29226 : {6812, 0, nsIDOMHTMLFormElement_Submit},
29227 : // nsIDOMHTMLInputElement (index 144)
29228 : {6879, 0, nsIDOMHTMLInputElement_Select},
29229 : {6950, 3, nsIDOMHTMLInputElement_SetSelectionRange},
29230 : // nsIDOMHTMLOptionsCollection (index 146)
29231 : {162, 1, nsIDOMHTMLOptionsCollection_Item},
29232 : {1864, 2, nsIDOMHTMLOptionsCollection_Add},
29233 : // nsIDOMHTMLSelectElement (index 148)
29234 : {1864, 2, nsIDOMHTMLSelectElement_Add},
29235 : {1868, 1, nsIDOMHTMLSelectElement_Remove},
29236 : {162, 1, nsIDOMHTMLSelectElement_Item},
29237 : // nsIDOMHTMLTableElement (index 151)
29238 : {7090, 1, nsIDOMHTMLTableElement_DeleteRow},
29239 : {7108, 1, nsIDOMHTMLTableElement_InsertRow},
29240 : // nsIDOMHTMLTableRowElement (index 153)
29241 : {7149, 1, nsIDOMHTMLTableRowElement_DeleteCell},
29242 : {7160, 1, nsIDOMHTMLTableRowElement_InsertCell},
29243 : // nsIDOMHTMLTableSectionElement (index 155)
29244 : {7108, 1, nsIDOMHTMLTableSectionElement_InsertRow},
29245 : {7090, 1, nsIDOMHTMLTableSectionElement_DeleteRow},
29246 : // nsIDOMHTMLTextAreaElement (index 157)
29247 : {6879, 0, nsIDOMHTMLTextAreaElement_Select},
29248 : {6950, 3, nsIDOMHTMLTextAreaElement_SetSelectionRange},
29249 : // nsIDOMHTMLCanvasElement (index 159)
29250 : {7189, 2, nsIDOMHTMLCanvasElement_GetContext},
29251 : {7200, 2, nsIDOMHTMLCanvasElement_ToDataURL},
29252 : // nsIDOMRange (index 161)
29253 : {7294, 2, nsIDOMRange_SetStart},
29254 : {7303, 2, nsIDOMRange_SetEnd},
29255 : {7310, 1, nsIDOMRange_SetStartBefore},
29256 : {7325, 1, nsIDOMRange_SetStartAfter},
29257 : {7339, 1, nsIDOMRange_SetEndBefore},
29258 : {7352, 1, nsIDOMRange_SetEndAfter},
29259 : {7364, 1, nsIDOMRange_Collapse},
29260 : {7373, 1, nsIDOMRange_SelectNode},
29261 : {7384, 1, nsIDOMRange_SelectNodeContents},
29262 : {7403, 2, nsIDOMRange_CompareBoundaryPoints},
29263 : {7425, 0, nsIDOMRange_DeleteContents},
29264 : {7440, 0, nsIDOMRange_ExtractContents},
29265 : {7456, 0, nsIDOMRange_CloneContents},
29266 : {7470, 1, nsIDOMRange_InsertNode},
29267 : {7481, 1, nsIDOMRange_SurroundContents},
29268 : {7498, 0, nsIDOMRange_CloneRange},
29269 : {1882, 0, nsIDOMRange_ToString},
29270 : {7509, 0, nsIDOMRange_Detach},
29271 : {7516, 1, nsIDOMRange_CreateContextualFragment},
29272 : {7541, 2, nsIDOMRange_IsPointInRange},
29273 : {7556, 2, nsIDOMRange_ComparePoint},
29274 : {1913, 0, nsIDOMRange_GetClientRects},
29275 : {1928, 0, nsIDOMRange_GetBoundingClientRect},
29276 : // nsIDOMToString (index 184)
29277 : {1882, 0, nsIDOMToString_ToString},
29278 : // nsIDOMStorage (index 185)
29279 : {7569, 2, nsIDOMStorage_SetItem},
29280 : {7577, 1, nsIDOMStorage_GetItem},
29281 : {7585, 1, nsIDOMStorage_Key},
29282 : {7589, 1, nsIDOMStorage_RemoveItem},
29283 : {2746, 0, nsIDOMStorage_Clear},
29284 : // nsIDOMSVGStylable (index 190)
29285 : {7600, 1, nsIDOMSVGStylable_GetPresentationAttribute},
29286 : // nsIDOMNodeIterator (index 191)
29287 : {7625, 0, nsIDOMNodeIterator_NextNode},
29288 : // nsIDOMXPathEvaluator (index 192)
29289 : {7634, 5, nsIDOMXPathEvaluator_Evaluate},
29290 : {7643, 2, nsIDOMXPathEvaluator_CreateExpression},
29291 : {7660, 1, nsIDOMXPathEvaluator_CreateNSResolver},
29292 : // nsIDOMXPathExpression (index 195)
29293 : {7634, 3, nsIDOMXPathExpression_Evaluate},
29294 : // nsIDOMXPathNSResolver (index 196)
29295 : {1695, 1, nsIDOMXPathNSResolver_LookupNamespaceURI},
29296 : // nsIDOMXPathResult (index 197)
29297 : {7677, 1, nsIDOMXPathResult_SnapshotItem},
29298 : {7690, 0, nsIDOMXPathResult_IterateNext},
29299 : // nsIDOMNSXPathExpression (index 199)
29300 : {7781, 5, nsIDOMNSXPathExpression_EvaluateWithContext},
29301 : // nsIDOMXULElement (index 200)
29302 : {6566, 0, nsIDOMXULElement_Focus},
29303 : {6572, 0, nsIDOMXULElement_Blur},
29304 : {6551, 0, nsIDOMXULElement_Click},
29305 : {7971, 0, nsIDOMXULElement_DoCommand},
29306 : {7981, 2, nsIDOMXULElement_GetElementsByAttribute},
29307 : {8004, 3, nsIDOMXULElement_GetElementsByAttributeNS},
29308 : // nsIDOMFileReader (index 206)
29309 : {8029, 1, nsIDOMFileReader_ReadAsArrayBuffer},
29310 : {8047, 1, nsIDOMFileReader_ReadAsBinaryString},
29311 : {8066, 2, nsIDOMFileReader_ReadAsText},
29312 : {8077, 1, nsIDOMFileReader_ReadAsDataURL},
29313 : {8091, 0, nsIDOMFileReader_Abort},
29314 : // nsIXMLHttpRequest (index 211)
29315 : {8091, 0, nsIXMLHttpRequest_Abort},
29316 : {8231, 5, nsIXMLHttpRequest_Open},
29317 : {8236, 1, nsIXMLHttpRequest_Send},
29318 : {8241, 1, nsIXMLHttpRequest_SendAsBinary},
29319 : // nsIWebSocket (index 215)
29320 : {8236, 1, nsIWebSocket_Send},
29321 : {8384, 2, nsIWebSocket_Close},
29322 : // nsIDOMWebGLRenderingContext (index 217)
29323 : {8390, 1, nsIDOMWebGLRenderingContext_ActiveTexture},
29324 : {8404, 2, nsIDOMWebGLRenderingContext_AttachShader},
29325 : {8417, 3, nsIDOMWebGLRenderingContext_BindAttribLocation},
29326 : {8436, 2, nsIDOMWebGLRenderingContext_BindBuffer},
29327 : {8447, 2, nsIDOMWebGLRenderingContext_BindFramebuffer},
29328 : {8463, 2, nsIDOMWebGLRenderingContext_BindRenderbuffer},
29329 : {8480, 2, nsIDOMWebGLRenderingContext_BindTexture},
29330 : {8492, 4, nsIDOMWebGLRenderingContext_BlendColor},
29331 : {8503, 1, nsIDOMWebGLRenderingContext_BlendEquation},
29332 : {8517, 2, nsIDOMWebGLRenderingContext_BlendEquationSeparate},
29333 : {8539, 2, nsIDOMWebGLRenderingContext_BlendFunc},
29334 : {8549, 4, nsIDOMWebGLRenderingContext_BlendFuncSeparate},
29335 : {8567, 1, nsIDOMWebGLRenderingContext_BufferData},
29336 : {8578, 1, nsIDOMWebGLRenderingContext_BufferSubData},
29337 : {8592, 1, nsIDOMWebGLRenderingContext_CheckFramebufferStatus},
29338 : {2746, 1, nsIDOMWebGLRenderingContext_Clear},
29339 : {8615, 4, nsIDOMWebGLRenderingContext_ClearColor},
29340 : {8626, 1, nsIDOMWebGLRenderingContext_ClearDepth},
29341 : {8637, 1, nsIDOMWebGLRenderingContext_ClearStencil},
29342 : {8650, 4, nsIDOMWebGLRenderingContext_ColorMask},
29343 : {8660, 1, nsIDOMWebGLRenderingContext_CompileShader},
29344 : {8674, 1, nsIDOMWebGLRenderingContext_CompressedTexImage2D},
29345 : {8695, 1, nsIDOMWebGLRenderingContext_CompressedTexSubImage2D},
29346 : {8719, 8, nsIDOMWebGLRenderingContext_CopyTexImage2D},
29347 : {8734, 8, nsIDOMWebGLRenderingContext_CopyTexSubImage2D},
29348 : {8752, 0, nsIDOMWebGLRenderingContext_CreateBuffer},
29349 : {8765, 0, nsIDOMWebGLRenderingContext_CreateProgram},
29350 : {8779, 0, nsIDOMWebGLRenderingContext_CreateFramebuffer},
29351 : {8797, 0, nsIDOMWebGLRenderingContext_CreateRenderbuffer},
29352 : {8816, 1, nsIDOMWebGLRenderingContext_CreateShader},
29353 : {8829, 0, nsIDOMWebGLRenderingContext_CreateTexture},
29354 : {8843, 1, nsIDOMWebGLRenderingContext_CullFace},
29355 : {8852, 1, nsIDOMWebGLRenderingContext_DeleteBuffer},
29356 : {8865, 1, nsIDOMWebGLRenderingContext_DeleteProgram},
29357 : {8879, 1, nsIDOMWebGLRenderingContext_DeleteFramebuffer},
29358 : {8897, 1, nsIDOMWebGLRenderingContext_DeleteRenderbuffer},
29359 : {8916, 1, nsIDOMWebGLRenderingContext_DeleteShader},
29360 : {8929, 1, nsIDOMWebGLRenderingContext_DeleteTexture},
29361 : {8943, 1, nsIDOMWebGLRenderingContext_DepthFunc},
29362 : {8953, 1, nsIDOMWebGLRenderingContext_DepthMask},
29363 : {8963, 2, nsIDOMWebGLRenderingContext_DepthRange},
29364 : {8974, 2, nsIDOMWebGLRenderingContext_DetachShader},
29365 : {8987, 1, nsIDOMWebGLRenderingContext_Disable},
29366 : {8995, 1, nsIDOMWebGLRenderingContext_DisableVertexAttribArray},
29367 : {9020, 3, nsIDOMWebGLRenderingContext_DrawArrays},
29368 : {9031, 4, nsIDOMWebGLRenderingContext_DrawElements},
29369 : {9044, 1, nsIDOMWebGLRenderingContext_Enable},
29370 : {9051, 1, nsIDOMWebGLRenderingContext_EnableVertexAttribArray},
29371 : {9075, 0, nsIDOMWebGLRenderingContext_Finish},
29372 : {9082, 0, nsIDOMWebGLRenderingContext_Flush},
29373 : {9088, 4, nsIDOMWebGLRenderingContext_FramebufferRenderbuffer},
29374 : {9112, 5, nsIDOMWebGLRenderingContext_FramebufferTexture2D},
29375 : {9133, 1, nsIDOMWebGLRenderingContext_FrontFace},
29376 : {9143, 1, nsIDOMWebGLRenderingContext_GenerateMipmap},
29377 : {9158, 2, nsIDOMWebGLRenderingContext_GetActiveAttrib},
29378 : {9174, 2, nsIDOMWebGLRenderingContext_GetActiveUniform},
29379 : {9191, 1, nsIDOMWebGLRenderingContext_GetAttachedShaders},
29380 : {9210, 2, nsIDOMWebGLRenderingContext_GetAttribLocation},
29381 : {9228, 1, nsIDOMWebGLRenderingContext_GetParameter},
29382 : {9241, 2, nsIDOMWebGLRenderingContext_GetBufferParameter},
29383 : {9260, 0, nsIDOMWebGLRenderingContext_GetError},
29384 : {9269, 3, nsIDOMWebGLRenderingContext_GetFramebufferAttachmentParameter},
29385 : {9303, 2, nsIDOMWebGLRenderingContext_GetProgramParameter},
29386 : {9323, 1, nsIDOMWebGLRenderingContext_GetProgramInfoLog},
29387 : {9341, 2, nsIDOMWebGLRenderingContext_GetRenderbufferParameter},
29388 : {9366, 2, nsIDOMWebGLRenderingContext_GetShaderParameter},
29389 : {9385, 1, nsIDOMWebGLRenderingContext_GetShaderInfoLog},
29390 : {9402, 2, nsIDOMWebGLRenderingContext_GetShaderPrecisionFormat},
29391 : {9427, 1, nsIDOMWebGLRenderingContext_GetShaderSource},
29392 : {9443, 2, nsIDOMWebGLRenderingContext_GetTexParameter},
29393 : {9459, 2, nsIDOMWebGLRenderingContext_GetUniform},
29394 : {9470, 2, nsIDOMWebGLRenderingContext_GetUniformLocation},
29395 : {9489, 2, nsIDOMWebGLRenderingContext_GetVertexAttrib},
29396 : {9505, 2, nsIDOMWebGLRenderingContext_GetVertexAttribOffset},
29397 : {9527, 2, nsIDOMWebGLRenderingContext_Hint},
29398 : {9532, 1, nsIDOMWebGLRenderingContext_IsBuffer},
29399 : {9541, 1, nsIDOMWebGLRenderingContext_IsFramebuffer},
29400 : {9555, 1, nsIDOMWebGLRenderingContext_IsProgram},
29401 : {9565, 1, nsIDOMWebGLRenderingContext_IsRenderbuffer},
29402 : {9580, 1, nsIDOMWebGLRenderingContext_IsShader},
29403 : {9589, 1, nsIDOMWebGLRenderingContext_IsTexture},
29404 : {9599, 1, nsIDOMWebGLRenderingContext_IsEnabled},
29405 : {425, 1, nsIDOMWebGLRenderingContext_LineWidth},
29406 : {9609, 1, nsIDOMWebGLRenderingContext_LinkProgram},
29407 : {9621, 2, nsIDOMWebGLRenderingContext_PixelStorei},
29408 : {9633, 2, nsIDOMWebGLRenderingContext_PolygonOffset},
29409 : {9647, 1, nsIDOMWebGLRenderingContext_ReadPixels},
29410 : {9658, 4, nsIDOMWebGLRenderingContext_RenderbufferStorage},
29411 : {9678, 2, nsIDOMWebGLRenderingContext_SampleCoverage},
29412 : {9693, 4, nsIDOMWebGLRenderingContext_Scissor},
29413 : {9701, 2, nsIDOMWebGLRenderingContext_ShaderSource},
29414 : {9714, 3, nsIDOMWebGLRenderingContext_StencilFunc},
29415 : {9726, 4, nsIDOMWebGLRenderingContext_StencilFuncSeparate},
29416 : {9746, 1, nsIDOMWebGLRenderingContext_StencilMask},
29417 : {9758, 2, nsIDOMWebGLRenderingContext_StencilMaskSeparate},
29418 : {9778, 3, nsIDOMWebGLRenderingContext_StencilOp},
29419 : {9788, 4, nsIDOMWebGLRenderingContext_StencilOpSeparate},
29420 : {9806, 1, nsIDOMWebGLRenderingContext_TexImage2D},
29421 : {9817, 1, nsIDOMWebGLRenderingContext_TexSubImage2D},
29422 : {9831, 3, nsIDOMWebGLRenderingContext_TexParameterf},
29423 : {9845, 3, nsIDOMWebGLRenderingContext_TexParameteri},
29424 : {9859, 2, nsIDOMWebGLRenderingContext_Uniform1f},
29425 : {9869, 2, nsIDOMWebGLRenderingContext_Uniform1i},
29426 : {9879, 3, nsIDOMWebGLRenderingContext_Uniform2f},
29427 : {9889, 3, nsIDOMWebGLRenderingContext_Uniform2i},
29428 : {9899, 4, nsIDOMWebGLRenderingContext_Uniform3f},
29429 : {9909, 4, nsIDOMWebGLRenderingContext_Uniform3i},
29430 : {9919, 5, nsIDOMWebGLRenderingContext_Uniform4f},
29431 : {9929, 5, nsIDOMWebGLRenderingContext_Uniform4i},
29432 : {9939, 1, nsIDOMWebGLRenderingContext_Uniform1fv},
29433 : {9950, 1, nsIDOMWebGLRenderingContext_Uniform1iv},
29434 : {9961, 1, nsIDOMWebGLRenderingContext_Uniform2fv},
29435 : {9972, 1, nsIDOMWebGLRenderingContext_Uniform2iv},
29436 : {9983, 1, nsIDOMWebGLRenderingContext_Uniform3fv},
29437 : {9994, 1, nsIDOMWebGLRenderingContext_Uniform3iv},
29438 : {10005, 1, nsIDOMWebGLRenderingContext_Uniform4fv},
29439 : {10016, 1, nsIDOMWebGLRenderingContext_Uniform4iv},
29440 : {10027, 1, nsIDOMWebGLRenderingContext_UniformMatrix2fv},
29441 : {10044, 1, nsIDOMWebGLRenderingContext_UniformMatrix3fv},
29442 : {10061, 1, nsIDOMWebGLRenderingContext_UniformMatrix4fv},
29443 : {10078, 1, nsIDOMWebGLRenderingContext_UseProgram},
29444 : {10089, 1, nsIDOMWebGLRenderingContext_ValidateProgram},
29445 : {10105, 2, nsIDOMWebGLRenderingContext_VertexAttrib1f},
29446 : {10120, 3, nsIDOMWebGLRenderingContext_VertexAttrib2f},
29447 : {10135, 4, nsIDOMWebGLRenderingContext_VertexAttrib3f},
29448 : {10150, 5, nsIDOMWebGLRenderingContext_VertexAttrib4f},
29449 : {10165, 1, nsIDOMWebGLRenderingContext_VertexAttrib1fv},
29450 : {10181, 1, nsIDOMWebGLRenderingContext_VertexAttrib2fv},
29451 : {10197, 1, nsIDOMWebGLRenderingContext_VertexAttrib3fv},
29452 : {10213, 1, nsIDOMWebGLRenderingContext_VertexAttrib4fv},
29453 : {10229, 6, nsIDOMWebGLRenderingContext_VertexAttribPointer},
29454 : {10249, 4, nsIDOMWebGLRenderingContext_Viewport},
29455 : {10258, 1, nsIDOMWebGLRenderingContext_GetExtension},
29456 : {10271, 0, nsIDOMWebGLRenderingContext_GetSupportedExtensions},
29457 : {10294, 0, nsIDOMWebGLRenderingContext_IsContextLost},
29458 : // nsIDOMHTMLAudioElement (index 352)
29459 : {10364, 1, nsIDOMHTMLAudioElement_MozWriteAudio},
29460 : // nsIIDBCursor (index 353)
29461 : {10389, 1, nsIIDBCursor_Continue},
29462 : {10398, 1, nsIIDBCursor_Update},
29463 : {10405, 0, nsIIDBCursor_Delete},
29464 : {10412, 1, nsIIDBCursor_Advance},
29465 : // nsIIDBDatabase (index 357)
29466 : {10445, 2, nsIIDBDatabase_CreateObjectStore},
29467 : {10463, 1, nsIIDBDatabase_DeleteObjectStore},
29468 : {10481, 2, nsIIDBDatabase_Transaction},
29469 : {8384, 0, nsIIDBDatabase_Close},
29470 : // nsIIDBIndex (index 361)
29471 : {10562, 1, nsIIDBIndex_Get},
29472 : {10566, 1, nsIIDBIndex_GetKey},
29473 : {10573, 2, nsIIDBIndex_GetAll},
29474 : {10580, 2, nsIIDBIndex_GetAllKeys},
29475 : {10591, 2, nsIIDBIndex_OpenCursor},
29476 : {10602, 2, nsIIDBIndex_OpenKeyCursor},
29477 : {10616, 1, nsIIDBIndex_Count},
29478 : // nsIIDBObjectStore (index 368)
29479 : {10562, 1, nsIIDBObjectStore_Get},
29480 : {10573, 2, nsIIDBObjectStore_GetAll},
29481 : {1864, 2, nsIIDBObjectStore_Add},
29482 : {10679, 2, nsIIDBObjectStore_Put},
29483 : {10405, 1, nsIIDBObjectStore_Delete},
29484 : {2746, 0, nsIIDBObjectStore_Clear},
29485 : {10591, 2, nsIIDBObjectStore_OpenCursor},
29486 : {10683, 3, nsIIDBObjectStore_CreateIndex},
29487 : {6976, 1, nsIIDBObjectStore_Index},
29488 : {10695, 1, nsIIDBObjectStore_DeleteIndex},
29489 : {10616, 1, nsIIDBObjectStore_Count},
29490 : // nsIIDBTransaction (index 379)
29491 : {10550, 1, nsIIDBTransaction_ObjectStore},
29492 : {8091, 0, nsIIDBTransaction_Abort},
29493 : // nsIIDBFactory (index 381)
29494 : {8231, 2, nsIIDBFactory_Open},
29495 : {10746, 1, nsIIDBFactory_DeleteDatabase},
29496 : {10761, 2, nsIIDBFactory_Cmp},
29497 : // nsIIndexedDatabaseUsageCallback (index 384)
29498 : {10813, 3, nsIIndexedDatabaseUsageCallback_OnUsageResult},
29499 : // nsIIndexedDatabaseManager (index 385)
29500 : {10827, 2, nsIIndexedDatabaseManager_GetUsageForURI},
29501 : {10842, 2, nsIIndexedDatabaseManager_CancelGetUsageForURI},
29502 : {10863, 1, nsIIndexedDatabaseManager_ClearDatabasesForURI},
29503 : {10884, 1, nsIIndexedDatabaseManager_InitWindowless},
29504 : };
29505 :
29506 : static const xpc_qsHashEntry tableData[] = {
29507 : /* nsIIDBRequest */ {{0xfe30ca60, 0xbb90, 0x4d68, {0xaf, 0x2f, 0x47, 0x35, 0xf9, 0x22, 0x8a, 0x54}}, 675, 7, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29508 : /* nsIDOMHTMLInputElement */ {{0x7330cd35, 0xc930, 0x4f45, {0xae, 0x61, 0xf5, 0x38, 0x0c, 0x30, 0x22, 0x2d}}, 485, 13, 144, 2, 123, 180},
29509 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29510 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29511 : /* nsIDOMHTMLStyleElement */ {{0x247fc8c4, 0x92f3, 0x427b, {0xaf, 0x6f, 0x41, 0xb1, 0x3f, 0x28, 0x28, 0x7d}}, 525, 1, 0, 0, 123, XPC_QS_NULL_INDEX},
29512 : /* nsIDOMEventTarget */ {{0x8e375931, 0x298d, 0x4d0a, {0x9c, 0xb4, 0x56, 0x68, 0xf0, 0xcd, 0xc5, 0xa8}}, 0, 0, 113, 3, XPC_QS_NULL_INDEX, 181},
29513 : /* nsIDOMHTMLFrameElement */ {{0x318fdc4a, 0x3fca, 0x4099, {0x94, 0xaa, 0xc9, 0xa1, 0xc3, 0x0c, 0xa2, 0xb9}}, 471, 4, 0, 0, 123, 182},
29514 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29515 : /* nsIDOMHTMLButtonElement */ {{0x79f034f0, 0x5c13, 0x4101, {0x95, 0x98, 0x41, 0x2e, 0x1e, 0xac, 0x19, 0x86}}, 422, 4, 0, 0, 123, XPC_QS_NULL_INDEX},
29516 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29517 : /* nsIDOMNodeList */ {{0x496852ba, 0xe48d, 0x4fa5, {0x98, 0x2e, 0xe0, 0xdc, 0x1b, 0x47, 0x5b, 0xf1}}, 80, 1, 84, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29518 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29519 : /* nsIDOMHTMLBaseElement */ {{0xe55cd224, 0xb603, 0x4976, {0x89, 0x2a, 0x20, 0xb1, 0x1d, 0x46, 0x93, 0x94}}, 420, 2, 0, 0, 123, 183},
29520 : /* nsIDOMDragEvent */ {{0x74fb5f01, 0xe473, 0x4302, {0x93, 0xf5, 0x6f, 0x74, 0xbd, 0xaa, 0xdd, 0xf2}}, 370, 1, 124, 1, 153, XPC_QS_NULL_INDEX},
29521 : /* nsIDOMDOMSettableTokenList */ {{0xcdac274e, 0x6619, 0x4b5f, {0xba, 0x1a, 0xcd, 0x1d, 0xbf, 0xae, 0x44, 0xb8}}, 83, 1, 0, 0, 100, XPC_QS_NULL_INDEX},
29522 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29523 : /* nsIDOMNodeIterator */ {{0x5af83f50, 0xc8d5, 0x4824, {0xbe, 0x29, 0x1a, 0xa9, 0xd6, 0x40, 0xba, 0xcb}}, 0, 0, 191, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29524 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29525 : /* nsIDOMXPathExpression */ {{0x75506f82, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 0, 0, 195, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29526 : /* nsIDOMElement */ {{0x1f249e8b, 0x7b41, 0x44c0, {0xa8, 0xd5, 0x15, 0x29, 0x8c, 0x11, 0x98, 0xcd}}, 59, 3, 56, 10, 161, 184},
29527 : /* nsIDOMDOMImplementation */ {{0x03a6f574, 0x99ec, 0x42f8, {0x9e, 0x6c, 0x81, 0x2a, 0x4a, 0x9b, 0xcb, 0xf7}}, 0, 0, 88, 4, XPC_QS_NULL_INDEX, 185},
29528 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29529 : /* nsIIDBCursorWithValue */ {{0xb6b7e08a, 0x4379, 0x4441, {0xa1, 0x76, 0x44, 0x7c, 0x5c, 0x96, 0xdf, 0x69}}, 652, 1, 0, 0, 170, XPC_QS_NULL_INDEX},
29530 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29531 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29532 : /* nsIDOMCharacterData */ {{0xcb75c251, 0xafc7, 0x444f, {0xb2, 0xd6, 0xb9, 0x63, 0x55, 0x55, 0xf3, 0xed}}, 46, 2, 0, 0, 161, XPC_QS_NULL_INDEX},
29533 : /* nsIDOMProgressEvent */ {{0x2377d8a6, 0x9e27, 0x4eb2, {0xa3, 0x77, 0x99, 0x10, 0x77, 0x2b, 0x33, 0xd3}}, 383, 3, 0, 0, 140, 188},
29534 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29535 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29536 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29537 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29538 : /* nsIDOMHTMLCollection */ {{0xb7ccd7b3, 0x86aa, 0x4322, {0xa5, 0x0c, 0xb9, 0x72, 0x64, 0x3b, 0xb6, 0x62}}, 426, 1, 132, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29539 : /* nsIDOMNSXPathExpression */ {{0xce600ca8, 0xe98a, 0x4419, {0xad, 0x61, 0x2f, 0x6d, 0x0c, 0xb0, 0xec, 0xc8}}, 0, 0, 199, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29540 : /* nsIDOMElementCSSInlineStyle */ {{0x99715845, 0x95fc, 0x4a56, {0xaa, 0x53, 0x21, 0x4b, 0x65, 0xc2, 0x6e, 0x22}}, 99, 1, 0, 0, XPC_QS_NULL_INDEX, 189},
29541 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29542 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29543 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29544 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29545 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29546 : /* nsIDOMWindow */ {{0x17400e2b, 0xf78b, 0x4e69, {0xb5, 0x00, 0xc2, 0xa3, 0x13, 0x5a, 0x40, 0xfd}}, 0, 8, 0, 3, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29547 : /* nsIDOMRange */ {{0xa059eea8, 0xfece, 0x4c14, {0x93, 0xd3, 0x7f, 0x50, 0xa9, 0x44, 0xae, 0x43}}, 557, 6, 161, 23, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29548 : /* nsIDOMMouseScrollEvent */ {{0x159f24b9, 0x2058, 0x40b9, {0xb5, 0xbc, 0x64, 0x77, 0xd1, 0x92, 0x95, 0x5a}}, 382, 1, 127, 1, 153, XPC_QS_NULL_INDEX},
29549 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29550 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29551 : /* nsIDOMText */ {{0x437ed60c, 0xfebd, 0x4bd0, {0x89, 0x2f, 0xcf, 0x35, 0x8a, 0xdc, 0x3c, 0x96}}, 0, 0, 87, 1, 25, 190},
29552 : /* nsIDOMNotifyPaintEvent */ {{0x5e9e91ad, 0x8638, 0x4e1c, {0xbd, 0xed, 0x35, 0xb5, 0x1b, 0x6d, 0xf2, 0x79}}, 375, 3, 0, 0, 140, XPC_QS_NULL_INDEX},
29553 : /* nsIDOMRect */ {{0x71735f62, 0xac5c, 0x4236, {0x9a, 0x1f, 0x5f, 0xfb, 0x28, 0x0d, 0x53, 0x1c}}, 332, 4, 0, 0, XPC_QS_NULL_INDEX, 191},
29554 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29555 : /* nsIIDBKeyRange */ {{0x8aeb8660, 0x76b3, 0x4651, {0xb8, 0xc2, 0x98, 0x94, 0xae, 0x6d, 0xfe, 0x68}}, 666, 4, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29556 : /* nsIWebSocket */ {{0xf463b9b5, 0x1408, 0x4057, {0x92, 0x24, 0xe4, 0xf5, 0xbc, 0x33, 0xf1, 0x7b}}, 633, 10, 215, 2, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29557 : /* nsIDOMJSWindow */ {{0x6652c4d2, 0x6b49, 0x424b, {0xaa, 0xf9, 0x91, 0xf9, 0x10, 0x06, 0xfa, 0xb7}}, 0, 0, 3, 1, XPC_QS_NULL_INDEX, 192},
29558 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29559 : /* nsIDOMCanvasRenderingContext2D */ {{0x274213a8, 0xdf51, 0x4b52, {0xbf, 0xad, 0xd3, 0x06, 0xa1, 0xd5, 0xf6, 0x42}}, 22, 23, 6, 35, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29560 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29561 : /* nsIDOMXULElement */ {{0xa98a4472, 0xa549, 0x4b84, {0xb9, 0xea, 0xe6, 0xeb, 0x67, 0x92, 0x28, 0xdd}}, 573, 34, 200, 6, 19, XPC_QS_NULL_INDEX},
29562 : /* nsIDOMNamedNodeMap */ {{0xa6cf907b, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}, 62, 1, 66, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29563 : /* nsIDOMTextMetrics */ {{0x2d01715c, 0xec7d, 0x424a, {0xab, 0x85, 0xe0, 0xfd, 0x70, 0xc8, 0x66, 0x5c}}, 45, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29564 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29565 : /* nsIIDBDatabase */ {{0xbedee48a, 0xf47f, 0x44f2, {0xba, 0x1e, 0xd8, 0xfe, 0x59, 0x5b, 0xbf, 0xee}}, 653, 6, 357, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29566 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29567 : /* nsIIDBObjectStore */ {{0x43157a3c, 0xbed1, 0x4ce7, {0x98, 0xc0, 0x11, 0x36, 0x5b, 0x85, 0x25, 0x60}}, 670, 5, 368, 11, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29568 : /* nsIDOMFileReader */ {{0xfaed1779, 0xb523, 0x4060, {0x8c, 0x3b, 0x71, 0x99, 0xf3, 0x47, 0xb2, 0x73}}, 613, 9, 206, 5, 5, XPC_QS_NULL_INDEX},
29569 : /* nsIDOMCSS2Properties */ {{0x76732e62, 0xda09, 0x4aef, {0x85, 0x0a, 0x78, 0xb9, 0xf6, 0xd5, 0xc8, 0xcf}}, 100, 232, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29570 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29571 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29572 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29573 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29574 : /* nsIDOMScreen */ {{0x4507e43f, 0x097c, 0x452a, {0xbf, 0xc4, 0xdb, 0xb9, 0x97, 0x48, 0xf6, 0xfd}}, 8, 4, 0, 0, XPC_QS_NULL_INDEX, 193},
29575 : /* nsIDOMHTMLTableCellElement */ {{0x4caa7af0, 0xfec4, 0x44c1, {0x9a, 0x81, 0xe1, 0xf1, 0x41, 0x66, 0xe6, 0x0c}}, 526, 8, 0, 0, 123, XPC_QS_NULL_INDEX},
29576 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29577 : /* nsIDOMMutationEvent */ {{0x72b3ddba, 0x6cbb, 0x4011, {0xac, 0x3b, 0x50, 0xbd, 0x90, 0x0b, 0x22, 0x3d}}, 365, 5, 123, 1, 140, XPC_QS_NULL_INDEX},
29578 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29579 : /* nsIDOMMessageEvent */ {{0x3aca4a44, 0x8e5f, 0x4829, {0x9d, 0x59, 0xce, 0x4a, 0xdb, 0xba, 0x2b, 0x12}}, 378, 4, 126, 1, 140, XPC_QS_NULL_INDEX},
29580 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29583 : /* nsIDOMStorageItem */ {{0x0cc37c78, 0x4c5f, 0x48e1, {0xad, 0xfc, 0x74, 0x80, 0xb8, 0xfe, 0x9d, 0xc4}}, 564, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29584 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29585 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29586 : /* nsIDOMPaintRequest */ {{0x4802360b, 0xf1c0, 0x4d84, {0xbb, 0x9e, 0x9d, 0x2c, 0xcb, 0x9d, 0xe4, 0x61}}, 19, 2, 0, 0, XPC_QS_NULL_INDEX, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29591 : /* nsIDOMDOMStringList */ {{0x0bbae65c, 0x1dde, 0x11d9, {0x8c, 0x46, 0x00, 0x0a, 0x95, 0xdc, 0x23, 0x4c}}, 81, 1, 92, 2, XPC_QS_NULL_INDEX, 194},
29592 : /* nsIDOMHTMLCanvasElement */ {{0xdbbeeba1, 0x3c20, 0x4d9d, {0xac, 0x82, 0x98, 0xb6, 0x9f, 0xd8, 0x19, 0xa9}}, 555, 2, 159, 2, 123, XPC_QS_NULL_INDEX},
29593 : /* nsIDOMPaintRequestList */ {{0x01627136, 0xfdd8, 0x44b4, {0xaa, 0xc0, 0x7d, 0x61, 0x36, 0x08, 0xa3, 0xd4}}, 21, 1, 5, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29594 : /* nsIDOMHTMLOptionsCollection */ {{0x429b041b, 0x06df, 0x486c, {0x9a, 0x3a, 0xa1, 0xd9, 0x01, 0xcc, 0x76, 0xa2}}, 510, 2, 146, 2, XPC_QS_NULL_INDEX, 195},
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 : /* nsIIDBIndex */ {{0xa859747a, 0x0f05, 0x4dfb, {0x8f, 0x42, 0x05, 0xc6, 0x14, 0x15, 0xd4, 0xe4}}, 660, 6, 361, 7, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29598 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29599 : /* nsIDOMHTMLLinkElement */ {{0x2ece79f4, 0x83d7, 0x499c, {0x94, 0x6f, 0xae, 0x9a, 0xb9, 0x31, 0x47, 0xb7}}, 498, 1, 0, 0, 123, XPC_QS_NULL_INDEX},
29600 : /* nsIDOMClientRectList */ {{0x917da19d, 0x62f5, 0x441d, {0xb4, 0x7e, 0x9e, 0x35, 0xf0, 0x56, 0x39, 0xc9}}, 18, 1, 4, 1, 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 : /* nsIDOMNodeSelector */ {{0x7cebc153, 0x168a, 0x416c, {0xba, 0x5a, 0x56, 0xa8, 0xc2, 0xdd, 0xb2, 0xec}}, 0, 0, 85, 2, XPC_QS_NULL_INDEX, 196},
29603 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29604 : /* nsIIDBVersionChangeEvent */ {{0x52e21085, 0xd6cd, 0x4886, {0xa5, 0xeb, 0x19, 0xb4, 0x7d, 0x13, 0xab, 0xf6}}, 690, 2, 0, 0, 140, XPC_QS_NULL_INDEX},
29605 : /* nsIIDBDatabaseException */ {{0x7aad2542, 0xa5cb, 0x4a57, {0xb2, 0x0c, 0xc7, 0xd1, 0x6b, 0x85, 0x82, 0xab}}, 659, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
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 : /* nsIDOMDOMTokenList */ {{0xc6f1e160, 0xeeeb, 0x404a, {0x98, 0xb0, 0x6f, 0x12, 0x46, 0x52, 0x0b, 0x6e}}, 82, 1, 94, 6, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29612 : /* nsIDOMTouch */ {{0x98bc0f7d, 0x5bff, 0x4387, {0x9c, 0x42, 0x58, 0xaf, 0x54, 0xb4, 0x8d, 0xd5}}, 393, 12, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29613 : /* nsIDOMHTMLTableSectionElement */ {{0x6acc106e, 0x96a2, 0x4519, {0x8f, 0x3a, 0x14, 0x2e, 0xbb, 0xdc, 0x1b, 0xb1}}, 541, 1, 155, 2, 123, XPC_QS_NULL_INDEX},
29614 : /* nsIDOMHTMLProgressElement */ {{0x9b1d2263, 0xb60f, 0x4d18, {0xb4, 0xd1, 0x66, 0xe8, 0xc3, 0x86, 0x7c, 0x79}}, 512, 4, 0, 0, 123, 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 : /* nsIDOMNSEvent */ {{0x07f905c1, 0x9170, 0x4103, {0x86, 0xca, 0x76, 0x63, 0x74, 0xda, 0x14, 0x9a}}, 386, 1, 128, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29617 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29618 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29621 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29622 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
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 : /* nsIDOMSVGStylable */ {{0xea8a6cb1, 0x9176, 0x45db, {0x98, 0x9d, 0xd0, 0xe8, 0x9f, 0x56, 0x3d, 0x7e}}, 565, 2, 190, 1, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29627 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29628 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29629 : /* nsIDOMCSSStyleDeclaration */ {{0xa6cf90be, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}, 336, 3, 107, 6, XPC_QS_NULL_INDEX, 197},
29630 : /* nsIDOMHTMLElement */ {{0x4eccf8a3, 0x8bf5, 0x43f3, {0xa7, 0x28, 0xf5, 0xb6, 0x32, 0xf7, 0xdb, 0x3a}}, 444, 22, 137, 6, 19, XPC_QS_NULL_INDEX},
29631 : /* nsIDOMHTMLSelectElement */ {{0x98f111e0, 0x2b7e, 0x4abd, {0x98, 0x4b, 0x2c, 0xc1, 0xd1, 0x74, 0xfe, 0x44}}, 516, 9, 148, 3, 123, XPC_QS_NULL_INDEX},
29632 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29633 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29634 : /* nsIDOMDOMError */ {{0xe4e28307, 0xd409, 0x4cf7, {0x93, 0xcd, 0x6e, 0xa8, 0xe8, 0x89, 0xf8, 0x7a}}, 692, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29635 : /* nsIDOMHTMLIFrameElement */ {{0x5ef30718, 0xfe45, 0x43a2, {0xa4, 0x78, 0xa9, 0xe3, 0xcb, 0xf3, 0xa1, 0x18}}, 477, 3, 0, 0, 123, 198},
29636 : /* nsIDOMHTMLTextAreaElement */ {{0x16db703d, 0x4816, 0x440c, {0xbc, 0xb3, 0xc1, 0xae, 0x0c, 0xae, 0x65, 0x32}}, 542, 12, 157, 2, 123, 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 : /* nsIIDBFactory */ {{0x885abbb7, 0xcf81, 0x4945, {0xb5, 0xf1, 0x07, 0xfe, 0xd0, 0x7a, 0xda, 0x82}}, 0, 0, 381, 3, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29639 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29640 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, 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 : /* nsIDOMEvent */ {{0xe85cff74, 0x951f, 0x45c1, {0xbe, 0x0c, 0x89, 0x44, 0x2e, 0xa2, 0xf5, 0x00}}, 339, 8, 116, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29648 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 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 : /* nsIDOMClientRect */ {{0xb2f824c4, 0xd9d3, 0x499b, {0x8d, 0x3b, 0x45, 0xc8, 0x24, 0x54, 0x97, 0xc6}}, 12, 6, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29656 : /* nsIDOMCanvasGradient */ {{0xbbb20a59, 0x524e, 0x4662, {0x98, 0x1e, 0x5e, 0x14, 0x28, 0x14, 0xb2, 0x0c}}, 0, 0, 41, 1, XPC_QS_NULL_INDEX, 199},
29657 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29658 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29659 : /* nsIIndexedDatabaseUsageCallback */ {{0xef1795ec, 0x7050, 0x4658, {0xb8, 0x0f, 0x0e, 0x48, 0xcb, 0xe1, 0xd6, 0x4b}}, 0, 0, 384, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29660 : /* nsIDOMMouseEvent */ {{0x7f57aa45, 0x6792, 0x4d8b, {0xba, 0x5b, 0x20, 0x15, 0x33, 0xcf, 0x0b, 0x2f}}, 347, 12, 120, 2, 166, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29665 : /* nsIDOMHTMLTableColElement */ {{0x9a4d1f6a, 0xfb19, 0x4886, {0xb0, 0xd8, 0xdc, 0xd2, 0x01, 0x56, 0x65, 0x80}}, 534, 2, 0, 0, 123, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29668 : /* nsIDOMNode */ {{0x5e9bcec9, 0x5928, 0x4f77, {0x8a, 0x9c, 0x42, 0x4e, 0xf0, 0x1c, 0x20, 0xe1}}, 63, 17, 67, 17, XPC_QS_NULL_INDEX, 200},
29669 : /* nsIDOMHTMLAudioElement */ {{0x0969143a, 0xfe20, 0x4924, {0xa9, 0x50, 0x55, 0xde, 0xb4, 0xd0, 0xd1, 0xab}}, 0, 0, 352, 1, 123, XPC_QS_NULL_INDEX},
29670 : /* nsIDOMTouchEvent */ {{0x0cc687df, 0x0ed5, 0x4b7f, {0xb8, 0x9d, 0xcb, 0xb9, 0x9b, 0x21, 0xd2, 0x3a}}, 406, 7, 131, 1, 166, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29673 : /* nsIDOMUIEvent */ {{0xaf3f130e, 0x0c22, 0x4613, {0xa1, 0x50, 0x78, 0x0a, 0x46, 0xc2, 0x2e, 0x3a}}, 387, 6, 0, 0, 140, XPC_QS_NULL_INDEX},
29674 : /* nsIDOMKeyEvent */ {{0xdef974c3, 0xb491, 0x481b, {0xbc, 0x67, 0x29, 0x17, 0x4a, 0xf4, 0xb2, 0x6a}}, 359, 6, 122, 1, 166, 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 : /* nsIIDBCursor */ {{0x01136b3a, 0xd84c, 0x487c, {0xb9, 0x29, 0xf5, 0xd0, 0x12, 0x34, 0x6c, 0x44}}, 648, 4, 353, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29678 : /* nsIDOMTouchList */ {{0x60706eb7, 0xd50d, 0x4379, {0xb0, 0x1c, 0xe7, 0x8e, 0x6a, 0xf8, 0x42, 0x13}}, 405, 1, 129, 2, XPC_QS_NULL_INDEX, 201},
29679 : /* nsIDOMNSElement */ {{0xd894b5d4, 0x44f3, 0x422a, {0xa2, 0x20, 0x77, 0x63, 0xc1, 0x2d, 0x4a, 0x94}}, 84, 15, 101, 6, XPC_QS_NULL_INDEX, 202},
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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, 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 : /* nsIDOMScrollAreaEvent */ {{0xa382424b, 0x464f, 0x475f, {0x88, 0x80, 0xf4, 0xce, 0xac, 0xa9, 0xfd, 0xe9}}, 371, 4, 125, 1, 166, 203},
29687 : /* nsIDOMStorage */ {{0x43e5edad, 0x1e02, 0x42c4, {0x9d, 0x99, 0xc3, 0xd9, 0xde, 0xe2, 0x2a, 0x20}}, 563, 1, 185, 5, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29688 : /* nsIDOMHTMLFormElement */ {{0xd873b251, 0x6f96, 0x4e70, {0xba, 0xf5, 0xaa, 0xa9, 0x35, 0xaa, 0xbe, 0x59}}, 466, 5, 143, 1, 123, XPC_QS_NULL_INDEX},
29689 : /* nsIIDBOpenDBRequest */ {{0x91010fbe, 0x1dfb, 0x435d, {0x85, 0x2e, 0x28, 0x8d, 0x28, 0x04, 0xc0, 0xa7}}, 688, 2, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29690 : /* nsIDOMHTMLOptionElement */ {{0x7c5bf0ac, 0x6230, 0x4ee0, {0x8b, 0x82, 0xe7, 0xeb, 0xf2, 0x11, 0xaf, 0x03}}, 502, 8, 0, 0, 123, XPC_QS_NULL_INDEX},
29691 : /* nsIDOMXPathNSResolver */ {{0x75506f83, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 0, 0, 196, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29692 : /* nsIDOMHTMLCommandElement */ {{0x13032f74, 0x4150, 0x4768, {0xab, 0x5e, 0x51, 0xf4, 0xde, 0x39, 0xa3, 0x00}}, 427, 7, 0, 0, 123, 186},
29693 : /* nsIDOMXPathResult */ {{0x75506f84, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 567, 6, 197, 2, XPC_QS_NULL_INDEX, 187},
29694 : /* nsIBoxObject */ {{0xce572460, 0xb0f2, 0x4650, {0xa9, 0xe7, 0xc5, 0x3a, 0x99, 0xd3, 0xb6, 0xad}}, 607, 6, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29695 : /* nsIDOMXPathEvaluator */ {{0x75506f8a, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 0, 0, 192, 3, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29696 : /* nsIDOMHTMLFrameSetElement */ {{0x6eefbe6d, 0x182c, 0x42e9, {0x98, 0x50, 0xaf, 0x18, 0x92, 0xb6, 0xf2, 0xe4}}, 475, 2, 0, 0, 123, XPC_QS_NULL_INDEX},
29697 : /* nsIDOMHTMLAnchorElement */ {{0xbcb54394, 0xd9f8, 0x4bcb, {0xbb, 0xbb, 0xec, 0xa9, 0x82, 0x6c, 0xdb, 0xca}}, 413, 7, 0, 0, 123, XPC_QS_NULL_INDEX},
29698 : /* nsIIDBTransaction */ {{0xe4927c76, 0x4f1f, 0x4d7d, {0x80, 0xad, 0x81, 0x86, 0xe1, 0x67, 0x7d, 0xa6}}, 682, 6, 379, 2, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29699 : /* nsIDOMDocument */ {{0xd7cdd08e, 0x1bfd, 0x4bc3, {0x97, 0x42, 0xd6, 0x65, 0x86, 0x78, 0x1e, 0xe2}}, 48, 11, 42, 14, 161, XPC_QS_NULL_INDEX},
29700 : /* nsIDOMToString */ {{0x2a72e20f, 0xe337, 0x4822, {0x89, 0x94, 0x2e, 0x35, 0xb5, 0x55, 0x0d, 0x03}}, 0, 0, 184, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29701 : /* nsIDOMHTMLTableRowElement */ {{0xd24a80d4, 0x491d, 0x4e36, {0x93, 0x49, 0xaf, 0xd3, 0xc6, 0x99, 0x9b, 0x3e}}, 538, 3, 153, 2, 123, XPC_QS_NULL_INDEX},
29702 : /* nsIIndexedDatabaseManager */ {{0x02256aa7, 0x70d8, 0x473f, {0xbf, 0x3b, 0x8c, 0xb3, 0x5d, 0x28, 0xfd, 0x75}}, 0, 0, 385, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29703 : /* nsIDOMXULDocument */ {{0xb16d13c3, 0x837d, 0x445d, {0x8f, 0x56, 0x05, 0xd8, 0x3d, 0x9b, 0x9e, 0xae}}, 0, 0, 100, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29704 : /* nsIXMLHttpRequest */ {{0x88ffc45a, 0x22e2, 0x44f4, {0x9a, 0x6e, 0xf4, 0x58, 0x6f, 0xbd, 0xe3, 0x76}}, 622, 11, 211, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29705 : /* nsIDOMHTMLMenuElement */ {{0x06d48250, 0x45e0, 0x4f26, {0x9a, 0x07, 0xd9, 0xb5, 0xa3, 0xf0, 0x8b, 0xb6}}, 499, 3, 0, 0, 123, XPC_QS_NULL_INDEX},
29706 : /* nsIDOMWebGLRenderingContext */ {{0x020474b1, 0x2d3f, 0x403b, {0xb8, 0x5d, 0x11, 0xd9, 0x08, 0x2c, 0xcd, 0x92}}, 643, 3, 217, 135, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29707 : /* nsIDOMHTMLTitleElement */ {{0xe20fd651, 0x6240, 0x4f20, {0xb8, 0xf0, 0x6c, 0xc2, 0x5c, 0xb6, 0x99, 0xb7}}, 554, 1, 0, 0, 123, XPC_QS_NULL_INDEX},
29708 : /* nsIDOMNotifyAudioAvailableEvent */ {{0xcd362d2f, 0xa9a1, 0x4127, {0x94, 0x0d, 0x47, 0x7b, 0xa0, 0xe8, 0x2b, 0xd6}}, 646, 2, 0, 0, 140, XPC_QS_NULL_INDEX},
29709 : /* nsIDOMHTMLDocument */ {{0xcc1af020, 0x6543, 0x429c, {0x82, 0xd7, 0x84, 0x0c, 0xda, 0x3b, 0xe0, 0xb9}}, 434, 10, 133, 4, 192, XPC_QS_NULL_INDEX},
29710 : /* nsIDOMHTMLImageElement */ {{0x56d9191f, 0x5a94, 0x432f, {0xaf, 0x70, 0x6f, 0xcc, 0xde, 0xaf, 0x61, 0x4b}}, 480, 5, 0, 0, 123, 204},
29711 : /* nsIDOMHTMLTableElement */ {{0x0f809b97, 0x9311, 0x45c4, {0xa4, 0x4e, 0x71, 0x45, 0xf3, 0x54, 0x43, 0x8b}}, 536, 2, 151, 2, 123, XPC_QS_NULL_INDEX}
29712 : };
29713 :
29714 : // Make sure our table indices aren't overflowed
29715 : PR_STATIC_ASSERT((sizeof(tableData) / sizeof(tableData[0])) < (1 << (8 * sizeof(tableData[0].parentInterface))));
29716 : PR_STATIC_ASSERT((sizeof(tableData) / sizeof(tableData[0])) < (1 << (8 * sizeof(tableData[0].chain))));
29717 :
29718 : static const char stringtab[] = {
29719 : /* 0 */ 'n', 'a', 'm', 'e', '\0',
29720 : /* 5 */ 'p', 'a', 'r', 'e', 'n', 't', '\0',
29721 : /* 12 */ 't', 'o', 'p', '\0',
29722 : /* 16 */ 's', 'e', 'l', 'f', '\0',
29723 : /* 21 */ 'g', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', '\0',
29724 : /* 34 */ 's', 'c', 'r', 'o', 'l', 'l', 'B', 'y', 'L', 'i', 'n', 'e', 's', '\0',
29725 : /* 48 */ 'g', 'e', 't', 'C', 'o', 'm', 'p', 'u', 't', 'e', 'd', 'S', 't', 'y', 'l', 'e', '\0',
29726 : /* 65 */ 's', 'e', 's', 's', 'i', 'o', 'n', 'S', 't', 'o', 'r', 'a', 'g', 'e', '\0',
29727 : /* 80 */ 'l', 'o', 'c', 'a', 'l', 'S', 't', 'o', 'r', 'a', 'g', 'e', '\0',
29728 : /* 93 */ 'o', 'n', 'm', 'o', 'u', 's', 'e', 'e', 'n', 't', 'e', 'r', '\0',
29729 : /* 106 */ 'o', 'n', 'm', 'o', 'u', 's', 'e', 'l', 'e', 'a', 'v', 'e', '\0',
29730 : /* 119 */ 'd', 'u', 'm', 'p', '\0',
29731 : /* 124 */ 'h', 'e', 'i', 'g', 'h', 't', '\0',
29732 : /* 131 */ 'w', 'i', 'd', 't', 'h', '\0',
29733 : /* 137 */ 'l', 'e', 'f', 't', '\0',
29734 : /* 142 */ 'r', 'i', 'g', 'h', 't', '\0',
29735 : /* 148 */ 'b', 'o', 't', 't', 'o', 'm', '\0',
29736 : /* 155 */ 'l', 'e', 'n', 'g', 't', 'h', '\0',
29737 : /* 162 */ 'i', 't', 'e', 'm', '\0',
29738 : /* 167 */ 'c', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', '\0',
29739 : /* 178 */ 'r', 'e', 'a', 's', 'o', 'n', '\0',
29740 : /* 185 */ 'c', 'a', 'n', 'v', 'a', 's', '\0',
29741 : /* 192 */ 's', 'a', 'v', 'e', '\0',
29742 : /* 197 */ 'r', 'e', 's', 't', 'o', 'r', 'e', '\0',
29743 : /* 205 */ 's', 'c', 'a', 'l', 'e', '\0',
29744 : /* 211 */ 'r', 'o', 't', 'a', 't', 'e', '\0',
29745 : /* 218 */ 't', 'r', 'a', 'n', 's', 'l', 'a', 't', 'e', '\0',
29746 : /* 228 */ 't', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
29747 : /* 238 */ 's', 'e', 't', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
29748 : /* 251 */ 'm', 'o', 'z', 'C', 'u', 'r', 'r', 'e', 'n', 't', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
29749 : /* 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',
29750 : /* 298 */ 'g', 'l', 'o', 'b', 'a', 'l', 'A', 'l', 'p', 'h', 'a', '\0',
29751 : /* 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',
29752 : /* 335 */ 's', 't', 'r', 'o', 'k', 'e', 'S', 't', 'y', 'l', 'e', '\0',
29753 : /* 347 */ 'f', 'i', 'l', 'l', 'S', 't', 'y', 'l', 'e', '\0',
29754 : /* 357 */ 'm', 'o', 'z', 'F', 'i', 'l', 'l', 'R', 'u', 'l', 'e', '\0',
29755 : /* 369 */ 'c', 'r', 'e', 'a', 't', 'e', 'L', 'i', 'n', 'e', 'a', 'r', 'G', 'r', 'a', 'd', 'i', 'e', 'n', 't', '\0',
29756 : /* 390 */ 'c', 'r', 'e', 'a', 't', 'e', 'R', 'a', 'd', 'i', 'a', 'l', 'G', 'r', 'a', 'd', 'i', 'e', 'n', 't', '\0',
29757 : /* 411 */ 'c', 'r', 'e', 'a', 't', 'e', 'P', 'a', 't', 't', 'e', 'r', 'n', '\0',
29758 : /* 425 */ 'l', 'i', 'n', 'e', 'W', 'i', 'd', 't', 'h', '\0',
29759 : /* 435 */ 'l', 'i', 'n', 'e', 'C', 'a', 'p', '\0',
29760 : /* 443 */ 'l', 'i', 'n', 'e', 'J', 'o', 'i', 'n', '\0',
29761 : /* 452 */ 'm', 'i', 't', 'e', 'r', 'L', 'i', 'm', 'i', 't', '\0',
29762 : /* 463 */ 'm', 'o', 'z', 'D', 'a', 's', 'h', '\0',
29763 : /* 471 */ 'm', 'o', 'z', 'D', 'a', 's', 'h', 'O', 'f', 'f', 's', 'e', 't', '\0',
29764 : /* 485 */ 's', 'h', 'a', 'd', 'o', 'w', 'O', 'f', 'f', 's', 'e', 't', 'X', '\0',
29765 : /* 499 */ 's', 'h', 'a', 'd', 'o', 'w', 'O', 'f', 'f', 's', 'e', 't', 'Y', '\0',
29766 : /* 513 */ 's', 'h', 'a', 'd', 'o', 'w', 'B', 'l', 'u', 'r', '\0',
29767 : /* 524 */ 's', 'h', 'a', 'd', 'o', 'w', 'C', 'o', 'l', 'o', 'r', '\0',
29768 : /* 536 */ 'c', 'l', 'e', 'a', 'r', 'R', 'e', 'c', 't', '\0',
29769 : /* 546 */ 'f', 'i', 'l', 'l', 'R', 'e', 'c', 't', '\0',
29770 : /* 555 */ 's', 't', 'r', 'o', 'k', 'e', 'R', 'e', 'c', 't', '\0',
29771 : /* 566 */ 'b', 'e', 'g', 'i', 'n', 'P', 'a', 't', 'h', '\0',
29772 : /* 576 */ 'c', 'l', 'o', 's', 'e', 'P', 'a', 't', 'h', '\0',
29773 : /* 586 */ 'm', 'o', 'v', 'e', 'T', 'o', '\0',
29774 : /* 593 */ 'l', 'i', 'n', 'e', 'T', 'o', '\0',
29775 : /* 600 */ 'q', 'u', 'a', 'd', 'r', 'a', 't', 'i', 'c', 'C', 'u', 'r', 'v', 'e', 'T', 'o', '\0',
29776 : /* 617 */ 'b', 'e', 'z', 'i', 'e', 'r', 'C', 'u', 'r', 'v', 'e', 'T', 'o', '\0',
29777 : /* 631 */ 'a', 'r', 'c', 'T', 'o', '\0',
29778 : /* 637 */ 'a', 'r', 'c', '\0',
29779 : /* 641 */ 'r', 'e', 'c', 't', '\0',
29780 : /* 646 */ 'f', 'i', 'l', 'l', '\0',
29781 : /* 651 */ 's', 't', 'r', 'o', 'k', 'e', '\0',
29782 : /* 658 */ 'c', 'l', 'i', 'p', '\0',
29783 : /* 663 */ 'f', 'o', 'n', 't', '\0',
29784 : /* 668 */ 't', 'e', 'x', 't', 'A', 'l', 'i', 'g', 'n', '\0',
29785 : /* 678 */ 't', 'e', 'x', 't', 'B', 'a', 's', 'e', 'l', 'i', 'n', 'e', '\0',
29786 : /* 691 */ 'f', 'i', 'l', 'l', 'T', 'e', 'x', 't', '\0',
29787 : /* 700 */ 's', 't', 'r', 'o', 'k', 'e', 'T', 'e', 'x', 't', '\0',
29788 : /* 711 */ 'm', 'e', 'a', 's', 'u', 'r', 'e', 'T', 'e', 'x', 't', '\0',
29789 : /* 723 */ 'm', 'o', 'z', 'T', 'e', 'x', 't', 'S', 't', 'y', 'l', 'e', '\0',
29790 : /* 736 */ 'd', 'r', 'a', 'w', 'I', 'm', 'a', 'g', 'e', '\0',
29791 : /* 746 */ 'i', 's', 'P', 'o', 'i', 'n', 't', 'I', 'n', 'P', 'a', 't', 'h', '\0',
29792 : /* 760 */ 'g', 'e', 't', 'I', 'm', 'a', 'g', 'e', 'D', 'a', 't', 'a', '\0',
29793 : /* 773 */ 'p', 'u', 't', 'I', 'm', 'a', 'g', 'e', 'D', 'a', 't', 'a', '\0',
29794 : /* 786 */ 'c', 'r', 'e', 'a', 't', 'e', 'I', 'm', 'a', 'g', 'e', 'D', 'a', 't', 'a', '\0',
29795 : /* 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',
29796 : /* 827 */ 'd', 'r', 'a', 'w', 'W', 'i', 'n', 'd', 'o', 'w', '\0',
29797 : /* 838 */ 'a', 's', 'y', 'n', 'c', 'D', 'r', 'a', 'w', 'X', 'U', 'L', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29798 : /* 858 */ 'a', 'd', 'd', 'C', 'o', 'l', 'o', 'r', 'S', 't', 'o', 'p', '\0',
29799 : /* 871 */ 'd', 'a', 't', 'a', '\0',
29800 : /* 876 */ 'd', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29801 : /* 892 */ 'i', 'm', 'p', 'l', 'e', 'm', 'e', 'n', 't', 'a', 't', 'i', 'o', 'n', '\0',
29802 : /* 907 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'T', 'a', 'g', 'N', 'a', 'm', 'e', '\0',
29803 : /* 928 */ 'd', 'o', 'c', 't', 'y', 'p', 'e', '\0',
29804 : /* 936 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'T', 'a', 'g', 'N', 'a', 'm', 'e', 'N', 'S', '\0',
29805 : /* 959 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'B', 'y', 'I', 'd', '\0',
29806 : /* 974 */ 'c', 'r', 'e', 'a', 't', 'e', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', '\0',
29807 : /* 997 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29808 : /* 1011 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'N', 'S', '\0',
29809 : /* 1027 */ 'i', 'm', 'p', 'o', 'r', 't', 'N', 'o', 'd', 'e', '\0',
29810 : /* 1038 */ 'c', 'r', 'e', 'a', 't', 'e', 'T', 'e', 'x', 't', 'N', 'o', 'd', 'e', '\0',
29811 : /* 1053 */ 'd', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'U', 'R', 'I', '\0',
29812 : /* 1065 */ 'a', 'd', 'o', 'p', 't', 'N', 'o', 'd', 'e', '\0',
29813 : /* 1075 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'i', 'e', 'w', '\0',
29814 : /* 1087 */ 'c', 'r', 'e', 'a', 't', 'e', 'N', 'o', 'd', 'e', 'I', 't', 'e', 'r', 'a', 't', 'o', 'r', '\0',
29815 : /* 1106 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'v', 'e', 'n', 't', '\0',
29816 : /* 1118 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'C', 'l', 'a', 's', 's', 'N', 'a', 'm', 'e', '\0',
29817 : /* 1141 */ 't', 'i', 't', 'l', 'e', '\0',
29818 : /* 1147 */ 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'r', '\0',
29819 : /* 1156 */ 'h', 'a', 's', 'F', 'o', 'c', 'u', 's', '\0',
29820 : /* 1165 */ 'e', 'l', 'e', 'm', 'e', 'n', 't', 'F', 'r', 'o', 'm', 'P', 'o', 'i', 'n', 't', '\0',
29821 : /* 1182 */ 'a', 'c', 't', 'i', 'v', 'e', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29822 : /* 1196 */ 'o', 'n', 'r', 'e', 'a', 'd', 'y', 's', 't', 'a', 't', 'e', 'c', 'h', 'a', 'n', 'g', 'e', '\0',
29823 : /* 1215 */ 'r', 'e', 'm', 'o', 'v', 'e', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29824 : /* 1233 */ 'r', 'e', 'm', 'o', 'v', 'e', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29825 : /* 1249 */ 'g', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29826 : /* 1262 */ 's', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29827 : /* 1275 */ 'h', 'a', 's', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29828 : /* 1290 */ 't', 'a', 'g', 'N', 'a', 'm', 'e', '\0',
29829 : /* 1298 */ 's', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29830 : /* 1313 */ 'h', 'a', 's', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29831 : /* 1326 */ 'g', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29832 : /* 1341 */ 'n', 'o', 'd', 'e', 'N', 'a', 'm', 'e', '\0',
29833 : /* 1350 */ 'n', 'o', 'd', 'e', 'V', 'a', 'l', 'u', 'e', '\0',
29834 : /* 1360 */ 'n', 'o', 'd', 'e', 'T', 'y', 'p', 'e', '\0',
29835 : /* 1369 */ 'p', 'a', 'r', 'e', 'n', 't', 'N', 'o', 'd', 'e', '\0',
29836 : /* 1380 */ 'p', 'a', 'r', 'e', 'n', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29837 : /* 1394 */ 'c', 'h', 'i', 'l', 'd', 'N', 'o', 'd', 'e', 's', '\0',
29838 : /* 1405 */ 'f', 'i', 'r', 's', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29839 : /* 1416 */ 'l', 'a', 's', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29840 : /* 1426 */ 'p', 'r', 'e', 'v', 'i', 'o', 'u', 's', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29841 : /* 1442 */ 'n', 'e', 'x', 't', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29842 : /* 1454 */ 'a', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 's', '\0',
29843 : /* 1465 */ 'o', 'w', 'n', 'e', 'r', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
29844 : /* 1479 */ 'i', 'n', 's', 'e', 'r', 't', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
29845 : /* 1492 */ 'r', 'e', 'p', 'l', 'a', 'c', 'e', 'C', 'h', 'i', 'l', 'd', '\0',
29846 : /* 1505 */ 'r', 'e', 'm', 'o', 'v', 'e', 'C', 'h', 'i', 'l', 'd', '\0',
29847 : /* 1517 */ 'a', 'p', 'p', 'e', 'n', 'd', 'C', 'h', 'i', 'l', 'd', '\0',
29848 : /* 1529 */ 'h', 'a', 's', 'C', 'h', 'i', 'l', 'd', 'N', 'o', 'd', 'e', 's', '\0',
29849 : /* 1543 */ 'c', 'l', 'o', 'n', 'e', 'N', 'o', 'd', 'e', '\0',
29850 : /* 1553 */ 'n', 'o', 'r', 'm', 'a', 'l', 'i', 'z', 'e', '\0',
29851 : /* 1563 */ 'i', 's', 'S', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', '\0',
29852 : /* 1575 */ 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', 'U', 'R', 'I', '\0',
29853 : /* 1588 */ 'p', 'r', 'e', 'f', 'i', 'x', '\0',
29854 : /* 1595 */ 'l', 'o', 'c', 'a', 'l', 'N', 'a', 'm', 'e', '\0',
29855 : /* 1605 */ 'h', 'a', 's', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 's', '\0',
29856 : /* 1619 */ 'b', 'a', 's', 'e', 'U', 'R', 'I', '\0',
29857 : /* 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',
29858 : /* 1651 */ 't', 'e', 'x', 't', 'C', 'o', 'n', 't', 'e', 'n', 't', '\0',
29859 : /* 1663 */ 'l', 'o', 'o', 'k', 'u', 'p', 'P', 'r', 'e', 'f', 'i', 'x', '\0',
29860 : /* 1676 */ 'i', 's', 'D', 'e', 'f', 'a', 'u', 'l', 't', 'N', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\0',
29861 : /* 1695 */ 'l', 'o', 'o', 'k', 'u', 'p', 'N', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', 'U', 'R', 'I', '\0',
29862 : /* 1714 */ 'i', 's', 'E', 'q', 'u', 'a', 'l', 'N', 'o', 'd', 'e', '\0',
29863 : /* 1726 */ 's', 'e', 't', 'U', 's', 'e', 'r', 'D', 'a', 't', 'a', '\0',
29864 : /* 1738 */ 'g', 'e', 't', 'U', 's', 'e', 'r', 'D', 'a', 't', 'a', '\0',
29865 : /* 1750 */ 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\0',
29866 : /* 1759 */ 'q', 'u', 'e', 'r', 'y', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\0',
29867 : /* 1773 */ 'q', 'u', 'e', 'r', 'y', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', 'A', 'l', 'l', '\0',
29868 : /* 1790 */ 's', 'p', 'l', 'i', 't', 'T', 'e', 'x', 't', '\0',
29869 : /* 1800 */ 'h', 'a', 's', 'F', 'e', 'a', 't', 'u', 'r', 'e', '\0',
29870 : /* 1811 */ 'c', 'r', 'e', 'a', 't', 'e', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'T', 'y', 'p', 'e', '\0',
29871 : /* 1830 */ 'c', 'r', 'e', 'a', 't', 'e', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
29872 : /* 1845 */ 'c', 'r', 'e', 'a', 't', 'e', 'H', 'T', 'M', 'L', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
29873 : /* 1864 */ 'a', 'd', 'd', '\0',
29874 : /* 1868 */ 'r', 'e', 'm', 'o', 'v', 'e', '\0',
29875 : /* 1875 */ 't', 'o', 'g', 'g', 'l', 'e', '\0',
29876 : /* 1882 */ 't', 'o', 'S', 't', 'r', 'i', 'n', 'g', '\0',
29877 : /* 1891 */ 'v', 'a', 'l', 'u', 'e', '\0',
29878 : /* 1897 */ 'g', 'e', 't', 'B', 'o', 'x', 'O', 'b', 'j', 'e', 'c', 't', 'F', 'o', 'r', '\0',
29879 : /* 1913 */ 'g', 'e', 't', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', 's', '\0',
29880 : /* 1928 */ 'g', 'e', 't', 'B', 'o', 'u', 'n', 'd', 'i', 'n', 'g', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', '\0',
29881 : /* 1950 */ 's', 'c', 'r', 'o', 'l', 'l', 'T', 'o', 'p', '\0',
29882 : /* 1960 */ 's', 'c', 'r', 'o', 'l', 'l', 'L', 'e', 'f', 't', '\0',
29883 : /* 1971 */ 's', 'c', 'r', 'o', 'l', 'l', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29884 : /* 1984 */ 's', 'c', 'r', 'o', 'l', 'l', 'W', 'i', 'd', 't', 'h', '\0',
29885 : /* 1996 */ 'c', 'l', 'i', 'e', 'n', 't', 'T', 'o', 'p', '\0',
29886 : /* 2006 */ 'c', 'l', 'i', 'e', 'n', 't', 'L', 'e', 'f', 't', '\0',
29887 : /* 2017 */ 'c', 'l', 'i', 'e', 'n', 't', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29888 : /* 2030 */ 'c', 'l', 'i', 'e', 'n', 't', 'W', 'i', 'd', 't', 'h', '\0',
29889 : /* 2042 */ 'f', 'i', 'r', 's', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29890 : /* 2060 */ 'l', 'a', 's', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29891 : /* 2077 */ 'p', 'r', 'e', 'v', 'i', 'o', 'u', 's', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29892 : /* 2100 */ 'n', 'e', 'x', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29893 : /* 2119 */ 'c', 'h', 'i', 'l', 'd', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'C', 'o', 'u', 'n', 't', '\0',
29894 : /* 2137 */ 'c', 'h', 'i', 'l', 'd', 'r', 'e', 'n', '\0',
29895 : /* 2146 */ 'c', 'l', 'a', 's', 's', 'L', 'i', 's', 't', '\0',
29896 : /* 2156 */ 's', 'e', 't', 'C', 'a', 'p', 't', 'u', 'r', 'e', '\0',
29897 : /* 2167 */ 'r', 'e', 'l', 'e', 'a', 's', 'e', 'C', 'a', 'p', 't', 'u', 'r', 'e', '\0',
29898 : /* 2182 */ 'm', 'o', 'z', 'M', 'a', 't', 'c', 'h', 'e', 's', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\0',
29899 : /* 2201 */ 's', 't', 'y', 'l', 'e', '\0',
29900 : /* 2207 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', '\0',
29901 : /* 2218 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'A', 't', 't', 'a', 'c', 'h', 'm', 'e', 'n', 't', '\0',
29902 : /* 2239 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
29903 : /* 2255 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'I', 'm', 'a', 'g', 'e', '\0',
29904 : /* 2271 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'P', 'o', 's', 'i', 't', 'i', 'o', 'n', '\0',
29905 : /* 2290 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'R', 'e', 'p', 'e', 'a', 't', '\0',
29906 : /* 2307 */ 'b', 'o', 'r', 'd', 'e', 'r', '\0',
29907 : /* 2314 */ 'b', 'o', 'r', 'd', 'e', 'r', 'C', 'o', 'l', 'l', 'a', 'p', 's', 'e', '\0',
29908 : /* 2329 */ 'b', 'o', 'r', 'd', 'e', 'r', 'C', 'o', 'l', 'o', 'r', '\0',
29909 : /* 2341 */ 'b', 'o', 'r', 'd', 'e', 'r', 'S', 'p', 'a', 'c', 'i', 'n', 'g', '\0',
29910 : /* 2355 */ 'b', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'y', 'l', 'e', '\0',
29911 : /* 2367 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', '\0',
29912 : /* 2377 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', '\0',
29913 : /* 2389 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', '\0',
29914 : /* 2402 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', '\0',
29915 : /* 2413 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'C', 'o', 'l', 'o', 'r', '\0',
29916 : /* 2428 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'C', 'o', 'l', 'o', 'r', '\0',
29917 : /* 2445 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'C', 'o', 'l', 'o', 'r', '\0',
29918 : /* 2463 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'C', 'o', 'l', 'o', 'r', '\0',
29919 : /* 2479 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'S', 't', 'y', 'l', 'e', '\0',
29920 : /* 2494 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'S', 't', 'y', 'l', 'e', '\0',
29921 : /* 2511 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'S', 't', 'y', 'l', 'e', '\0',
29922 : /* 2529 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'S', 't', 'y', 'l', 'e', '\0',
29923 : /* 2545 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'W', 'i', 'd', 't', 'h', '\0',
29924 : /* 2560 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'W', 'i', 'd', 't', 'h', '\0',
29925 : /* 2577 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'W', 'i', 'd', 't', 'h', '\0',
29926 : /* 2595 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'W', 'i', 'd', 't', 'h', '\0',
29927 : /* 2611 */ 'b', 'o', 'r', 'd', 'e', 'r', 'W', 'i', 'd', 't', 'h', '\0',
29928 : /* 2623 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29929 : /* 2636 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'L', 'e', 'f', 't', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29930 : /* 2656 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'R', 'i', 'g', 'h', 't', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29931 : /* 2677 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'L', 'e', 'f', 't', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29932 : /* 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',
29933 : /* 2724 */ 'b', 'o', 'x', 'S', 'h', 'a', 'd', 'o', 'w', '\0',
29934 : /* 2734 */ 'c', 'a', 'p', 't', 'i', 'o', 'n', 'S', 'i', 'd', 'e', '\0',
29935 : /* 2746 */ 'c', 'l', 'e', 'a', 'r', '\0',
29936 : /* 2752 */ 'c', 'o', 'l', 'o', 'r', '\0',
29937 : /* 2758 */ 'c', 'o', 'n', 't', 'e', 'n', 't', '\0',
29938 : /* 2766 */ 'c', 'o', 'u', 'n', 't', 'e', 'r', 'I', 'n', 'c', 'r', 'e', 'm', 'e', 'n', 't', '\0',
29939 : /* 2783 */ 'c', 'o', 'u', 'n', 't', 'e', 'r', 'R', 'e', 's', 'e', 't', '\0',
29940 : /* 2796 */ 'c', 'u', 'r', 's', 'o', 'r', '\0',
29941 : /* 2803 */ 'd', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
29942 : /* 2813 */ 'd', 'i', 's', 'p', 'l', 'a', 'y', '\0',
29943 : /* 2821 */ 'e', 'm', 'p', 't', 'y', 'C', 'e', 'l', 'l', 's', '\0',
29944 : /* 2832 */ 'c', 's', 's', 'F', 'l', 'o', 'a', 't', '\0',
29945 : /* 2841 */ 'f', 'o', 'n', 't', 'F', 'a', 'm', 'i', 'l', 'y', '\0',
29946 : /* 2852 */ 'f', 'o', 'n', 't', 'S', 'i', 'z', 'e', '\0',
29947 : /* 2861 */ 'f', 'o', 'n', 't', 'S', 'i', 'z', 'e', 'A', 'd', 'j', 'u', 's', 't', '\0',
29948 : /* 2876 */ 'f', 'o', 'n', 't', 'S', 't', 'r', 'e', 't', 'c', 'h', '\0',
29949 : /* 2888 */ 'f', 'o', 'n', 't', 'S', 't', 'y', 'l', 'e', '\0',
29950 : /* 2898 */ 'f', 'o', 'n', 't', 'V', 'a', 'r', 'i', 'a', 'n', 't', '\0',
29951 : /* 2910 */ 'f', 'o', 'n', 't', 'W', 'e', 'i', 'g', 'h', 't', '\0',
29952 : /* 2921 */ 'l', 'e', 't', 't', 'e', 'r', 'S', 'p', 'a', 'c', 'i', 'n', 'g', '\0',
29953 : /* 2935 */ 'l', 'i', 'n', 'e', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29954 : /* 2946 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', '\0',
29955 : /* 2956 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', 'I', 'm', 'a', 'g', 'e', '\0',
29956 : /* 2971 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', 'P', 'o', 's', 'i', 't', 'i', 'o', 'n', '\0',
29957 : /* 2989 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', 'T', 'y', 'p', 'e', '\0',
29958 : /* 3003 */ 'm', 'a', 'r', 'g', 'i', 'n', '\0',
29959 : /* 3010 */ 'm', 'a', 'r', 'g', 'i', 'n', 'T', 'o', 'p', '\0',
29960 : /* 3020 */ 'm', 'a', 'r', 'g', 'i', 'n', 'R', 'i', 'g', 'h', 't', '\0',
29961 : /* 3032 */ 'm', 'a', 'r', 'g', 'i', 'n', 'B', 'o', 't', 't', 'o', 'm', '\0',
29962 : /* 3045 */ 'm', 'a', 'r', 'g', 'i', 'n', 'L', 'e', 'f', 't', '\0',
29963 : /* 3056 */ 'm', 'a', 'r', 'k', 'e', 'r', 'O', 'f', 'f', 's', 'e', 't', '\0',
29964 : /* 3069 */ 'm', 'a', 'r', 'k', 's', '\0',
29965 : /* 3075 */ 'm', 'a', 'x', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29966 : /* 3085 */ 'm', 'a', 'x', 'W', 'i', 'd', 't', 'h', '\0',
29967 : /* 3094 */ 'm', 'i', 'n', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29968 : /* 3104 */ 'm', 'i', 'n', 'W', 'i', 'd', 't', 'h', '\0',
29969 : /* 3113 */ 'o', 'r', 'p', 'h', 'a', 'n', 's', '\0',
29970 : /* 3121 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', '\0',
29971 : /* 3129 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'C', 'o', 'l', 'o', 'r', '\0',
29972 : /* 3142 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'S', 't', 'y', 'l', 'e', '\0',
29973 : /* 3155 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'W', 'i', 'd', 't', 'h', '\0',
29974 : /* 3168 */ 'o', 'v', 'e', 'r', 'f', 'l', 'o', 'w', '\0',
29975 : /* 3177 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', '\0',
29976 : /* 3185 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'T', 'o', 'p', '\0',
29977 : /* 3196 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'R', 'i', 'g', 'h', 't', '\0',
29978 : /* 3209 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'B', 'o', 't', 't', 'o', 'm', '\0',
29979 : /* 3223 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'L', 'e', 'f', 't', '\0',
29980 : /* 3235 */ 'p', 'a', 'g', 'e', '\0',
29981 : /* 3240 */ 'p', 'a', 'g', 'e', 'B', 'r', 'e', 'a', 'k', 'A', 'f', 't', 'e', 'r', '\0',
29982 : /* 3255 */ 'p', 'a', 'g', 'e', 'B', 'r', 'e', 'a', 'k', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
29983 : /* 3271 */ 'p', 'a', 'g', 'e', 'B', 'r', 'e', 'a', 'k', 'I', 'n', 's', 'i', 'd', 'e', '\0',
29984 : /* 3287 */ 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '\0',
29985 : /* 3296 */ 'q', 'u', 'o', 't', 'e', 's', '\0',
29986 : /* 3303 */ 's', 'i', 'z', 'e', '\0',
29987 : /* 3308 */ 't', 'a', 'b', 'l', 'e', 'L', 'a', 'y', 'o', 'u', 't', '\0',
29988 : /* 3320 */ 't', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', '\0',
29989 : /* 3335 */ 't', 'e', 'x', 't', 'I', 'n', 'd', 'e', 'n', 't', '\0',
29990 : /* 3346 */ 't', 'e', 'x', 't', 'O', 'v', 'e', 'r', 'f', 'l', 'o', 'w', '\0',
29991 : /* 3359 */ 't', 'e', 'x', 't', 'S', 'h', 'a', 'd', 'o', 'w', '\0',
29992 : /* 3370 */ 't', 'e', 'x', 't', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
29993 : /* 3384 */ 'u', 'n', 'i', 'c', 'o', 'd', 'e', 'B', 'i', 'd', 'i', '\0',
29994 : /* 3396 */ 'v', 'e', 'r', 't', 'i', 'c', 'a', 'l', 'A', 'l', 'i', 'g', 'n', '\0',
29995 : /* 3410 */ 'v', 'i', 's', 'i', 'b', 'i', 'l', 'i', 't', 'y', '\0',
29996 : /* 3421 */ 'w', 'h', 'i', 't', 'e', 'S', 'p', 'a', 'c', 'e', '\0',
29997 : /* 3432 */ 'w', 'i', 'd', 'o', 'w', 's', '\0',
29998 : /* 3439 */ 'w', 'o', 'r', 'd', 'S', 'p', 'a', 'c', 'i', 'n', 'g', '\0',
29999 : /* 3451 */ 'z', 'I', 'n', 'd', 'e', 'x', '\0',
30000 : /* 3458 */ 'c', 'l', 'i', 'p', 'P', 'a', 't', 'h', '\0',
30001 : /* 3467 */ 'c', 'l', 'i', 'p', 'R', 'u', 'l', 'e', '\0',
30002 : /* 3476 */ 'c', 'o', 'l', 'o', 'r', 'I', 'n', 't', 'e', 'r', 'p', 'o', 'l', 'a', 't', 'i', 'o', 'n', '\0',
30003 : /* 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',
30004 : /* 3521 */ 'd', 'o', 'm', 'i', 'n', 'a', 'n', 't', 'B', 'a', 's', 'e', 'l', 'i', 'n', 'e', '\0',
30005 : /* 3538 */ 'f', 'i', 'l', 'l', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30006 : /* 3550 */ 'f', 'i', 'l', 'l', 'R', 'u', 'l', 'e', '\0',
30007 : /* 3559 */ 'f', 'i', 'l', 't', 'e', 'r', '\0',
30008 : /* 3566 */ 'f', 'l', 'o', 'o', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
30009 : /* 3577 */ 'f', 'l', 'o', 'o', 'd', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30010 : /* 3590 */ 'i', 'm', 'a', 'g', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'i', 'n', 'g', '\0',
30011 : /* 3605 */ 'l', 'i', 'g', 'h', 't', 'i', 'n', 'g', 'C', 'o', 'l', 'o', 'r', '\0',
30012 : /* 3619 */ 'm', 'a', 'r', 'k', 'e', 'r', '\0',
30013 : /* 3626 */ 'm', 'a', 'r', 'k', 'e', 'r', 'E', 'n', 'd', '\0',
30014 : /* 3636 */ 'm', 'a', 'r', 'k', 'e', 'r', 'M', 'i', 'd', '\0',
30015 : /* 3646 */ 'm', 'a', 'r', 'k', 'e', 'r', 'S', 't', 'a', 'r', 't', '\0',
30016 : /* 3658 */ 'm', 'a', 's', 'k', '\0',
30017 : /* 3663 */ 's', 'h', 'a', 'p', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'i', 'n', 'g', '\0',
30018 : /* 3678 */ 's', 't', 'o', 'p', 'C', 'o', 'l', 'o', 'r', '\0',
30019 : /* 3688 */ 's', 't', 'o', 'p', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30020 : /* 3700 */ 's', 't', 'r', 'o', 'k', 'e', 'D', 'a', 's', 'h', 'a', 'r', 'r', 'a', 'y', '\0',
30021 : /* 3716 */ 's', 't', 'r', 'o', 'k', 'e', 'D', 'a', 's', 'h', 'o', 'f', 'f', 's', 'e', 't', '\0',
30022 : /* 3733 */ 's', 't', 'r', 'o', 'k', 'e', 'L', 'i', 'n', 'e', 'c', 'a', 'p', '\0',
30023 : /* 3747 */ 's', 't', 'r', 'o', 'k', 'e', 'L', 'i', 'n', 'e', 'j', 'o', 'i', 'n', '\0',
30024 : /* 3762 */ 's', 't', 'r', 'o', 'k', 'e', 'M', 'i', 't', 'e', 'r', 'l', 'i', 'm', 'i', 't', '\0',
30025 : /* 3779 */ 's', 't', 'r', 'o', 'k', 'e', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30026 : /* 3793 */ 's', 't', 'r', 'o', 'k', 'e', 'W', 'i', 'd', 't', 'h', '\0',
30027 : /* 3805 */ 't', 'e', 'x', 't', 'A', 'n', 'c', 'h', 'o', 'r', '\0',
30028 : /* 3816 */ 't', 'e', 'x', 't', 'R', 'e', 'n', 'd', 'e', 'r', 'i', 'n', 'g', '\0',
30029 : /* 3830 */ 'M', 'o', 'z', 'A', 'p', 'p', 'e', 'a', 'r', 'a', 'n', 'c', 'e', '\0',
30030 : /* 3844 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'C', 'l', 'i', 'p', '\0',
30031 : /* 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',
30032 : /* 3885 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'O', 'r', 'i', 'g', 'i', 'n', '\0',
30033 : /* 3902 */ 'M', 'o', 'z', 'B', 'i', 'n', 'd', 'i', 'n', 'g', '\0',
30034 : /* 3913 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30035 : /* 3935 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30036 : /* 3955 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30037 : /* 3976 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30038 : /* 3995 */ 'M', 'o', 'z', 'B', 'o', 'x', 'A', 'l', 'i', 'g', 'n', '\0',
30039 : /* 4007 */ 'M', 'o', 'z', 'B', 'o', 'x', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
30040 : /* 4023 */ 'M', 'o', 'z', 'B', 'o', 'x', 'F', 'l', 'e', 'x', '\0',
30041 : /* 4034 */ 'M', 'o', 'z', 'B', 'o', 'x', 'O', 'r', 'i', 'e', 'n', 't', '\0',
30042 : /* 4047 */ 'M', 'o', 'z', 'B', 'o', 'x', 'O', 'r', 'd', 'i', 'n', 'a', 'l', 'G', 'r', 'o', 'u', 'p', '\0',
30043 : /* 4066 */ 'M', 'o', 'z', 'B', 'o', 'x', 'P', 'a', 'c', 'k', '\0',
30044 : /* 4077 */ 'M', 'o', 'z', 'B', 'o', 'x', 'S', 'i', 'z', 'i', 'n', 'g', '\0',
30045 : /* 4090 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'C', 'o', 'u', 'n', 't', '\0',
30046 : /* 4105 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'W', 'i', 'd', 't', 'h', '\0',
30047 : /* 4120 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'F', 'i', 'l', 'l', '\0',
30048 : /* 4134 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'G', 'a', 'p', '\0',
30049 : /* 4147 */ 'M', 'o', 'z', 'F', 'l', 'o', 'a', 't', 'E', 'd', 'g', 'e', '\0',
30050 : /* 4160 */ 'M', 'o', 'z', 'F', 'o', 'n', 't', 'F', 'e', 'a', 't', 'u', 'r', 'e', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', '\0',
30051 : /* 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',
30052 : /* 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',
30053 : /* 4231 */ 'M', 'o', 'z', 'I', 'm', 'a', 'g', 'e', 'R', 'e', 'g', 'i', 'o', 'n', '\0',
30054 : /* 4246 */ 'M', 'o', 'z', 'M', 'a', 'r', 'g', 'i', 'n', 'E', 'n', 'd', '\0',
30055 : /* 4259 */ 'M', 'o', 'z', 'M', 'a', 'r', 'g', 'i', 'n', 'S', 't', 'a', 'r', 't', '\0',
30056 : /* 4274 */ 'M', 'o', 'z', 'O', 'r', 'i', 'e', 'n', 't', '\0',
30057 : /* 4284 */ 'M', 'o', 'z', 'O', 'u', 't', 'l', 'i', 'n', 'e', 'R', 'a', 'd', 'i', 'u', 's', '\0',
30058 : /* 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',
30059 : /* 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',
30060 : /* 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',
30061 : /* 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',
30062 : /* 4405 */ 'M', 'o', 'z', 'P', 'a', 'd', 'd', 'i', 'n', 'g', 'E', 'n', 'd', '\0',
30063 : /* 4419 */ 'M', 'o', 'z', 'P', 'a', 'd', 'd', 'i', 'n', 'g', 'S', 't', 'a', 'r', 't', '\0',
30064 : /* 4435 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'F', 'o', 'c', 'u', 's', '\0',
30065 : /* 4448 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'I', 'n', 'p', 'u', 't', '\0',
30066 : /* 4461 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'M', 'o', 'd', 'i', 'f', 'y', '\0',
30067 : /* 4475 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'S', 'e', 'l', 'e', 'c', 't', '\0',
30068 : /* 4489 */ 'o', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30069 : /* 4497 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'O', 'f', 'f', 's', 'e', 't', '\0',
30070 : /* 4511 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'A', 'l', 'i', 'g', 'n', 'L', 'a', 's', 't', '\0',
30071 : /* 4528 */ 'o', 'v', 'e', 'r', 'f', 'l', 'o', 'w', 'X', '\0',
30072 : /* 4538 */ 'o', 'v', 'e', 'r', 'f', 'l', 'o', 'w', 'Y', '\0',
30073 : /* 4548 */ 'i', 'm', 'e', 'M', 'o', 'd', 'e', '\0',
30074 : /* 4556 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', '\0',
30075 : /* 4569 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
30076 : /* 4587 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', 'S', 't', 'y', 'l', 'e', '\0',
30077 : /* 4605 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', 'W', 'i', 'd', 't', 'h', '\0',
30078 : /* 4623 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', '\0',
30079 : /* 4638 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', 'C', 'o', 'l', 'o', 'r', '\0',
30080 : /* 4658 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', 'S', 't', 'y', 'l', 'e', '\0',
30081 : /* 4678 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', 'W', 'i', 'd', 't', 'h', '\0',
30082 : /* 4698 */ 'M', 'o', 'z', 'S', 't', 'a', 'c', 'k', 'S', 'i', 'z', 'i', 'n', 'g', '\0',
30083 : /* 4713 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'I', 'm', 'a', 'g', 'e', '\0',
30084 : /* 4728 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 's', '\0',
30085 : /* 4739 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', '\0',
30086 : /* 4753 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', 'W', 'i', 'd', 't', 'h', '\0',
30087 : /* 4772 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', 'S', 't', 'y', 'l', 'e', '\0',
30088 : /* 4791 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', 'C', 'o', 'l', 'o', 'r', '\0',
30089 : /* 4810 */ 'w', 'o', 'r', 'd', 'W', 'r', 'a', 'p', '\0',
30090 : /* 4819 */ 'M', 'o', 'z', 'H', 'y', 'p', 'h', 'e', 'n', 's', '\0',
30091 : /* 4830 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
30092 : /* 4843 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'O', 'r', 'i', 'g', 'i', 'n', '\0',
30093 : /* 4862 */ 'M', 'o', 'z', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', '\0',
30094 : /* 4877 */ 'M', 'o', 'z', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', 'O', 'r', 'i', 'g', 'i', 'n', '\0',
30095 : /* 4898 */ 'M', 'o', 'z', 'B', 'a', 'c', 'k', 'f', 'a', 'c', 'e', 'V', 'i', 's', 'i', 'b', 'i', 'l', 'i', 't', 'y', '\0',
30096 : /* 4920 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'S', 't', 'y', 'l', 'e', '\0',
30097 : /* 4938 */ 'M', 'o', 'z', 'W', 'i', 'n', 'd', 'o', 'w', 'S', 'h', 'a', 'd', 'o', 'w', '\0',
30098 : /* 4954 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'S', 'i', 'z', 'e', '\0',
30099 : /* 4969 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'B', 'l', 'i', 'n', 'k', '\0',
30100 : /* 4982 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'l', 'o', 'r', '\0',
30101 : /* 5005 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', 'L', 'i', 'n', 'e', '\0',
30102 : /* 5027 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', 'S', 't', 'y', 'l', 'e', '\0',
30103 : /* 5050 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', '\0',
30104 : /* 5072 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\0',
30105 : /* 5094 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', 'D', 'e', 'l', 'a', 'y', '\0',
30106 : /* 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',
30107 : /* 5141 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', '\0',
30108 : /* 5155 */ 'p', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'v', 'e', 'n', 't', 's', '\0',
30109 : /* 5169 */ 'M', 'o', 'z', 'T', 'a', 'b', 'S', 'i', 'z', 'e', '\0',
30110 : /* 5180 */ 'r', 'e', 's', 'i', 'z', 'e', '\0',
30111 : /* 5187 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'N', 'a', 'm', 'e', '\0',
30112 : /* 5204 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\0',
30113 : /* 5225 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'D', 'e', 'l', 'a', 'y', '\0',
30114 : /* 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',
30115 : /* 5270 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
30116 : /* 5292 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'F', 'i', 'l', 'l', 'M', 'o', 'd', 'e', '\0',
30117 : /* 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',
30118 : /* 5340 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'P', 'l', 'a', 'y', 'S', 't', 'a', 't', 'e', '\0',
30119 : /* 5362 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', '\0',
30120 : /* 5375 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'S', 'i', 'z', 'e', 'A', 'd', 'j', 'u', 's', 't', '\0',
30121 : /* 5393 */ 'c', 's', 's', 'T', 'e', 'x', 't', '\0',
30122 : /* 5401 */ 'g', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', 'V', 'a', 'l', 'u', 'e', '\0',
30123 : /* 5418 */ 'g', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', 'C', 'S', 'S', 'V', 'a', 'l', 'u', 'e', '\0',
30124 : /* 5438 */ 'r', 'e', 'm', 'o', 'v', 'e', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', '\0',
30125 : /* 5453 */ 'g', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\0',
30126 : /* 5473 */ 's', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', '\0',
30127 : /* 5485 */ 'p', 'a', 'r', 'e', 'n', 't', 'R', 'u', 'l', 'e', '\0',
30128 : /* 5496 */ 'a', 'd', 'd', 'E', 'v', 'e', 'n', 't', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\0',
30129 : /* 5513 */ 'r', 'e', 'm', 'o', 'v', 'e', 'E', 'v', 'e', 'n', 't', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\0',
30130 : /* 5533 */ 'd', 'i', 's', 'p', 'a', 't', 'c', 'h', 'E', 'v', 'e', 'n', 't', '\0',
30131 : /* 5547 */ 't', 'y', 'p', 'e', '\0',
30132 : /* 5552 */ 't', 'a', 'r', 'g', 'e', 't', '\0',
30133 : /* 5559 */ 'c', 'u', 'r', 'r', 'e', 'n', 't', 'T', 'a', 'r', 'g', 'e', 't', '\0',
30134 : /* 5573 */ 'e', 'v', 'e', 'n', 't', 'P', 'h', 'a', 's', 'e', '\0',
30135 : /* 5584 */ 'b', 'u', 'b', 'b', 'l', 'e', 's', '\0',
30136 : /* 5592 */ 'c', 'a', 'n', 'c', 'e', 'l', 'a', 'b', 'l', 'e', '\0',
30137 : /* 5603 */ 't', 'i', 'm', 'e', 'S', 't', 'a', 'm', 'p', '\0',
30138 : /* 5613 */ 's', 't', 'o', 'p', 'P', 'r', 'o', 'p', 'a', 'g', 'a', 't', 'i', 'o', 'n', '\0',
30139 : /* 5629 */ 'p', 'r', 'e', 'v', 'e', 'n', 't', 'D', 'e', 'f', 'a', 'u', 'l', 't', '\0',
30140 : /* 5644 */ 'i', 'n', 'i', 't', 'E', 'v', 'e', 'n', 't', '\0',
30141 : /* 5654 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'P', 'r', 'e', 'v', 'e', 'n', 't', 'e', 'd', '\0',
30142 : /* 5671 */ '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',
30143 : /* 5696 */ 's', 'c', 'r', 'e', 'e', 'n', 'X', '\0',
30144 : /* 5704 */ 's', 'c', 'r', 'e', 'e', 'n', 'Y', '\0',
30145 : /* 5712 */ 'c', 'l', 'i', 'e', 'n', 't', 'X', '\0',
30146 : /* 5720 */ 'c', 'l', 'i', 'e', 'n', 't', 'Y', '\0',
30147 : /* 5728 */ 'c', 't', 'r', 'l', 'K', 'e', 'y', '\0',
30148 : /* 5736 */ 's', 'h', 'i', 'f', 't', 'K', 'e', 'y', '\0',
30149 : /* 5745 */ 'a', 'l', 't', 'K', 'e', 'y', '\0',
30150 : /* 5752 */ 'm', 'e', 't', 'a', 'K', 'e', 'y', '\0',
30151 : /* 5760 */ 'b', 'u', 't', 't', 'o', 'n', '\0',
30152 : /* 5767 */ 'r', 'e', 'l', 'a', 't', 'e', 'd', 'T', 'a', 'r', 'g', 'e', 't', '\0',
30153 : /* 5781 */ 'i', 'n', 'i', 't', 'M', 'o', 'u', 's', 'e', 'E', 'v', 'e', 'n', 't', '\0',
30154 : /* 5796 */ 'm', 'o', 'z', 'P', 'r', 'e', 's', 's', 'u', 'r', 'e', '\0',
30155 : /* 5808 */ 'm', 'o', 'z', 'I', 'n', 'p', 'u', 't', 'S', 'o', 'u', 'r', 'c', 'e', '\0',
30156 : /* 5823 */ 'i', 'n', 'i', 't', 'N', 'S', 'M', 'o', 'u', 's', 'e', 'E', 'v', 'e', 'n', 't', '\0',
30157 : /* 5840 */ 'c', 'h', 'a', 'r', 'C', 'o', 'd', 'e', '\0',
30158 : /* 5849 */ 'k', 'e', 'y', 'C', 'o', 'd', 'e', '\0',
30159 : /* 5857 */ 'i', 'n', 'i', 't', 'K', 'e', 'y', 'E', 'v', 'e', 'n', 't', '\0',
30160 : /* 5870 */ 'r', 'e', 'l', 'a', 't', 'e', 'd', 'N', 'o', 'd', 'e', '\0',
30161 : /* 5882 */ 'p', 'r', 'e', 'v', 'V', 'a', 'l', 'u', 'e', '\0',
30162 : /* 5892 */ 'n', 'e', 'w', 'V', 'a', 'l', 'u', 'e', '\0',
30163 : /* 5901 */ 'a', 't', 't', 'r', 'N', 'a', 'm', 'e', '\0',
30164 : /* 5910 */ 'a', 't', 't', 'r', 'C', 'h', 'a', 'n', 'g', 'e', '\0',
30165 : /* 5921 */ 'i', 'n', 'i', 't', 'M', 'u', 't', 'a', 't', 'i', 'o', 'n', 'E', 'v', 'e', 'n', 't', '\0',
30166 : /* 5939 */ 'd', 'a', 't', 'a', 'T', 'r', 'a', 'n', 's', 'f', 'e', 'r', '\0',
30167 : /* 5952 */ 'i', 'n', 'i', 't', 'D', 'r', 'a', 'g', 'E', 'v', 'e', 'n', 't', '\0',
30168 : /* 5966 */ 'x', '\0',
30169 : /* 5968 */ 'y', '\0',
30170 : /* 5970 */ 'i', 'n', 'i', 't', 'S', 'c', 'r', 'o', 'l', 'l', 'A', 'r', 'e', 'a', 'E', 'v', 'e', 'n', 't', '\0',
30171 : /* 5990 */ 'c', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', 's', '\0',
30172 : /* 6002 */ 'b', 'o', 'u', 'n', 'd', 'i', 'n', 'g', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', '\0',
30173 : /* 6021 */ 'p', 'a', 'i', 'n', 't', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\0',
30174 : /* 6035 */ 'o', 'r', 'i', 'g', 'i', 'n', '\0',
30175 : /* 6042 */ 'l', 'a', 's', 't', 'E', 'v', 'e', 'n', 't', 'I', 'd', '\0',
30176 : /* 6054 */ 's', 'o', 'u', 'r', 'c', 'e', '\0',
30177 : /* 6061 */ 'i', 'n', 'i', 't', 'M', 'e', 's', 's', 'a', 'g', 'e', 'E', 'v', 'e', 'n', 't', '\0',
30178 : /* 6078 */ 'a', 'x', 'i', 's', '\0',
30179 : /* 6083 */ 'i', 'n', 'i', 't', 'M', 'o', 'u', 's', 'e', 'S', 'c', 'r', 'o', 'l', 'l', 'E', 'v', 'e', 'n', 't', '\0',
30180 : /* 6104 */ 'l', 'e', 'n', 'g', 't', 'h', 'C', 'o', 'm', 'p', 'u', 't', 'a', 'b', 'l', 'e', '\0',
30181 : /* 6121 */ 'l', 'o', 'a', 'd', 'e', 'd', '\0',
30182 : /* 6128 */ 't', 'o', 't', 'a', 'l', '\0',
30183 : /* 6134 */ 'o', 'r', 'i', 'g', 'i', 'n', 'a', 'l', 'T', 'a', 'r', 'g', 'e', 't', '\0',
30184 : /* 6149 */ 'g', 'e', 't', 'P', 'r', 'e', 'v', 'e', 'n', 't', 'D', 'e', 'f', 'a', 'u', 'l', 't', '\0',
30185 : /* 6167 */ 'w', 'h', 'i', 'c', 'h', '\0',
30186 : /* 6173 */ 'r', 'a', 'n', 'g', 'e', 'P', 'a', 'r', 'e', 'n', 't', '\0',
30187 : /* 6185 */ 'r', 'a', 'n', 'g', 'e', 'O', 'f', 'f', 's', 'e', 't', '\0',
30188 : /* 6197 */ 'p', 'a', 'g', 'e', 'X', '\0',
30189 : /* 6203 */ 'p', 'a', 'g', 'e', 'Y', '\0',
30190 : /* 6209 */ 'i', 's', 'C', 'h', 'a', 'r', '\0',
30191 : /* 6216 */ 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', '\0',
30192 : /* 6227 */ 'r', 'a', 'd', 'i', 'u', 's', 'X', '\0',
30193 : /* 6235 */ 'r', 'a', 'd', 'i', 'u', 's', 'Y', '\0',
30194 : /* 6243 */ 'r', 'o', 't', 'a', 't', 'i', 'o', 'n', 'A', 'n', 'g', 'l', 'e', '\0',
30195 : /* 6257 */ 'f', 'o', 'r', 'c', 'e', '\0',
30196 : /* 6263 */ 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'd', 'T', 'o', 'u', 'c', 'h', '\0',
30197 : /* 6279 */ 't', 'o', 'u', 'c', 'h', 'e', 's', '\0',
30198 : /* 6287 */ 't', 'a', 'r', 'g', 'e', 't', 'T', 'o', 'u', 'c', 'h', 'e', 's', '\0',
30199 : /* 6301 */ 'c', 'h', 'a', 'n', 'g', 'e', 'd', 'T', 'o', 'u', 'c', 'h', 'e', 's', '\0',
30200 : /* 6316 */ 'i', 'n', 'i', 't', 'T', 'o', 'u', 'c', 'h', 'E', 'v', 'e', 'n', 't', '\0',
30201 : /* 6331 */ 'h', 'r', 'e', 'f', '\0',
30202 : /* 6336 */ 'r', 'e', 'l', '\0',
30203 : /* 6340 */ 't', 'e', 'x', 't', '\0',
30204 : /* 6345 */ 's', 'e', 'a', 'r', 'c', 'h', '\0',
30205 : /* 6352 */ 'h', 'a', 's', 'h', '\0',
30206 : /* 6357 */ 'f', 'o', 'r', 'm', '\0',
30207 : /* 6362 */ 'd', 'i', 's', 'a', 'b', 'l', 'e', 'd', '\0',
30208 : /* 6371 */ 'l', 'a', 'b', 'e', 'l', '\0',
30209 : /* 6377 */ 'i', 'c', 'o', 'n', '\0',
30210 : /* 6382 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'C', 'h', 'e', 'c', 'k', 'e', 'd', '\0',
30211 : /* 6397 */ 'c', 'h', 'e', 'c', 'k', 'e', 'd', '\0',
30212 : /* 6405 */ 'r', 'a', 'd', 'i', 'o', 'g', 'r', 'o', 'u', 'p', '\0',
30213 : /* 6416 */ 'b', 'o', 'd', 'y', '\0',
30214 : /* 6421 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'N', 'a', 'm', 'e', '\0',
30215 : /* 6439 */ 'a', 'n', 'c', 'h', 'o', 'r', 's', '\0',
30216 : /* 6447 */ 'l', 'i', 'n', 'k', 's', '\0',
30217 : /* 6453 */ 'U', 'R', 'L', '\0',
30218 : /* 6457 */ 'f', 'o', 'r', 'm', 's', '\0',
30219 : /* 6463 */ 'c', 'o', 'o', 'k', 'i', 'e', '\0',
30220 : /* 6470 */ 'i', 'm', 'a', 'g', 'e', 's', '\0',
30221 : /* 6477 */ 'w', 'r', 'i', 't', 'e', '\0',
30222 : /* 6483 */ 'w', 'r', 'i', 't', 'e', 'l', 'n', '\0',
30223 : /* 6491 */ 'd', 'o', 'm', 'a', 'i', 'n', '\0',
30224 : /* 6498 */ 'd', 'e', 's', 'i', 'g', 'n', 'M', 'o', 'd', 'e', '\0',
30225 : /* 6509 */ 'h', 'e', 'a', 'd', '\0',
30226 : /* 6514 */ 'i', 'd', '\0',
30227 : /* 6517 */ 'l', 'a', 'n', 'g', '\0',
30228 : /* 6522 */ 'd', 'i', 'r', '\0',
30229 : /* 6526 */ 'c', 'l', 'a', 's', 's', 'N', 'a', 'm', 'e', '\0',
30230 : /* 6536 */ 'd', 'a', 't', 'a', 's', 'e', 't', '\0',
30231 : /* 6544 */ 'h', 'i', 'd', 'd', 'e', 'n', '\0',
30232 : /* 6551 */ 'c', 'l', 'i', 'c', 'k', '\0',
30233 : /* 6557 */ 't', 'a', 'b', 'I', 'n', 'd', 'e', 'x', '\0',
30234 : /* 6566 */ 'f', 'o', 'c', 'u', 's', '\0',
30235 : /* 6572 */ 'b', 'l', 'u', 'r', '\0',
30236 : /* 6577 */ 'a', 'c', 'c', 'e', 's', 's', 'K', 'e', 'y', '\0',
30237 : /* 6587 */ 'a', 'c', 'c', 'e', 's', 's', 'K', 'e', 'y', 'L', 'a', 'b', 'e', 'l', '\0',
30238 : /* 6602 */ 'd', 'r', 'a', 'g', 'g', 'a', 'b', 'l', 'e', '\0',
30239 : /* 6612 */ 'c', 'o', 'n', 't', 'e', 'n', 't', 'E', 'd', 'i', 't', 'a', 'b', 'l', 'e', '\0',
30240 : /* 6628 */ 'i', 's', 'C', 'o', 'n', 't', 'e', 'n', 't', 'E', 'd', 'i', 't', 'a', 'b', 'l', 'e', '\0',
30241 : /* 6646 */ 'c', 'o', 'n', 't', 'e', 'x', 't', 'M', 'e', 'n', 'u', '\0',
30242 : /* 6658 */ 's', 'p', 'e', 'l', 'l', 'c', 'h', 'e', 'c', 'k', '\0',
30243 : /* 6669 */ 'i', 'n', 'n', 'e', 'r', 'H', 'T', 'M', 'L', '\0',
30244 : /* 6679 */ 'o', 'u', 't', 'e', 'r', 'H', 'T', 'M', 'L', '\0',
30245 : /* 6689 */ 'i', 'n', 's', 'e', 'r', 't', 'A', 'd', 'j', 'a', 'c', 'e', 'n', 't', 'H', 'T', 'M', 'L', '\0',
30246 : /* 6708 */ 's', 'c', 'r', 'o', 'l', 'l', 'I', 'n', 't', 'o', 'V', 'i', 'e', 'w', '\0',
30247 : /* 6723 */ 'o', 'f', 'f', 's', 'e', 't', 'P', 'a', 'r', 'e', 'n', 't', '\0',
30248 : /* 6736 */ 'o', 'f', 'f', 's', 'e', 't', 'T', 'o', 'p', '\0',
30249 : /* 6746 */ 'o', 'f', 'f', 's', 'e', 't', 'L', 'e', 'f', 't', '\0',
30250 : /* 6757 */ 'o', 'f', 'f', 's', 'e', 't', 'W', 'i', 'd', 't', 'h', '\0',
30251 : /* 6769 */ 'o', 'f', 'f', 's', 'e', 't', 'H', 'e', 'i', 'g', 'h', 't', '\0',
30252 : /* 6782 */ 'm', 'o', 'z', 'R', 'e', 'q', 'u', 'e', 's', 't', 'F', 'u', 'l', 'l', 'S', 'c', 'r', 'e', 'e', 'n', '\0',
30253 : /* 6803 */ 'e', 'l', 'e', 'm', 'e', 'n', 't', 's', '\0',
30254 : /* 6812 */ 's', 'u', 'b', 'm', 'i', 't', '\0',
30255 : /* 6819 */ 'a', 'c', 't', 'i', 'o', 'n', '\0',
30256 : /* 6826 */ 's', 'r', 'c', '\0',
30257 : /* 6830 */ 'c', 'o', 'n', 't', 'e', 'n', 't', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
30258 : /* 6846 */ 'c', 'o', 'n', 't', 'e', 'n', 't', 'W', 'i', 'n', 'd', 'o', 'w', '\0',
30259 : /* 6860 */ 'r', 'o', 'w', 's', '\0',
30260 : /* 6865 */ 'c', 'o', 'l', 's', '\0',
30261 : /* 6870 */ 'c', 'o', 'm', 'p', 'l', 'e', 't', 'e', '\0',
30262 : /* 6879 */ 's', 'e', 'l', 'e', 'c', 't', '\0',
30263 : /* 6886 */ 'f', 'i', 'l', 'e', 's', '\0',
30264 : /* 6892 */ 't', 'e', 'x', 't', 'L', 'e', 'n', 'g', 't', 'h', '\0',
30265 : /* 6903 */ 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'S', 't', 'a', 'r', 't', '\0',
30266 : /* 6918 */ 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'E', 'n', 'd', '\0',
30267 : /* 6931 */ 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
30268 : /* 6950 */ 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', '\0',
30269 : /* 6968 */ 'c', 'o', 'm', 'p', 'a', 'c', 't', '\0',
30270 : /* 6976 */ 'i', 'n', 'd', 'e', 'x', '\0',
30271 : /* 6982 */ 's', 'e', 'l', 'e', 'c', 't', 'e', 'd', '\0',
30272 : /* 6991 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'S', 'e', 'l', 'e', 'c', 't', 'e', 'd', '\0',
30273 : /* 7007 */ 's', 'e', 'l', 'e', 'c', 't', 'e', 'd', 'I', 'n', 'd', 'e', 'x', '\0',
30274 : /* 7021 */ 'm', 'a', 'x', '\0',
30275 : /* 7025 */ 'o', 'p', 't', 'i', 'o', 'n', 's', '\0',
30276 : /* 7033 */ 'c', 'o', 'l', 'S', 'p', 'a', 'n', '\0',
30277 : /* 7041 */ 'h', 'e', 'a', 'd', 'e', 'r', 's', '\0',
30278 : /* 7049 */ 'c', 'e', 'l', 'l', 'I', 'n', 'd', 'e', 'x', '\0',
30279 : /* 7059 */ 'r', 'o', 'w', 'S', 'p', 'a', 'n', '\0',
30280 : /* 7067 */ 'a', 'b', 'b', 'r', '\0',
30281 : /* 7072 */ 's', 'c', 'o', 'p', 'e', '\0',
30282 : /* 7078 */ 'n', 'o', 'W', 'r', 'a', 'p', '\0',
30283 : /* 7085 */ 's', 'p', 'a', 'n', '\0',
30284 : /* 7090 */ 'd', 'e', 'l', 'e', 't', 'e', 'R', 'o', 'w', '\0',
30285 : /* 7100 */ 's', 'u', 'm', 'm', 'a', 'r', 'y', '\0',
30286 : /* 7108 */ 'i', 'n', 's', 'e', 'r', 't', 'R', 'o', 'w', '\0',
30287 : /* 7118 */ 's', 'e', 'c', 't', 'i', 'o', 'n', 'R', 'o', 'w', 'I', 'n', 'd', 'e', 'x', '\0',
30288 : /* 7134 */ 'r', 'o', 'w', 'I', 'n', 'd', 'e', 'x', '\0',
30289 : /* 7143 */ 'c', 'e', 'l', 'l', 's', '\0',
30290 : /* 7149 */ 'd', 'e', 'l', 'e', 't', 'e', 'C', 'e', 'l', 'l', '\0',
30291 : /* 7160 */ 'i', 'n', 's', 'e', 'r', 't', 'C', 'e', 'l', 'l', '\0',
30292 : /* 7171 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\0',
30293 : /* 7184 */ 'w', 'r', 'a', 'p', '\0',
30294 : /* 7189 */ 'g', 'e', 't', 'C', 'o', 'n', 't', 'e', 'x', 't', '\0',
30295 : /* 7200 */ 't', 'o', 'D', 'a', 't', 'a', 'U', 'R', 'L', '\0',
30296 : /* 7210 */ 's', 't', 'a', 'r', 't', 'C', 'o', 'n', 't', 'a', 'i', 'n', 'e', 'r', '\0',
30297 : /* 7225 */ 's', 't', 'a', 'r', 't', 'O', 'f', 'f', 's', 'e', 't', '\0',
30298 : /* 7237 */ 'e', 'n', 'd', 'C', 'o', 'n', 't', 'a', 'i', 'n', 'e', 'r', '\0',
30299 : /* 7250 */ 'e', 'n', 'd', 'O', 'f', 'f', 's', 'e', 't', '\0',
30300 : /* 7260 */ 'c', 'o', 'l', 'l', 'a', 'p', 's', 'e', 'd', '\0',
30301 : /* 7270 */ 'c', 'o', 'm', 'm', 'o', 'n', 'A', 'n', 'c', 'e', 's', 't', 'o', 'r', 'C', 'o', 'n', 't', 'a', 'i', 'n', 'e', 'r', '\0',
30302 : /* 7294 */ 's', 'e', 't', 'S', 't', 'a', 'r', 't', '\0',
30303 : /* 7303 */ 's', 'e', 't', 'E', 'n', 'd', '\0',
30304 : /* 7310 */ 's', 'e', 't', 'S', 't', 'a', 'r', 't', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
30305 : /* 7325 */ 's', 'e', 't', 'S', 't', 'a', 'r', 't', 'A', 'f', 't', 'e', 'r', '\0',
30306 : /* 7339 */ 's', 'e', 't', 'E', 'n', 'd', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
30307 : /* 7352 */ 's', 'e', 't', 'E', 'n', 'd', 'A', 'f', 't', 'e', 'r', '\0',
30308 : /* 7364 */ 'c', 'o', 'l', 'l', 'a', 'p', 's', 'e', '\0',
30309 : /* 7373 */ 's', 'e', 'l', 'e', 'c', 't', 'N', 'o', 'd', 'e', '\0',
30310 : /* 7384 */ 's', 'e', 'l', 'e', 'c', 't', 'N', 'o', 'd', 'e', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30311 : /* 7403 */ 'c', 'o', 'm', 'p', 'a', 'r', 'e', 'B', 'o', 'u', 'n', 'd', 'a', 'r', 'y', 'P', 'o', 'i', 'n', 't', 's', '\0',
30312 : /* 7425 */ 'd', 'e', 'l', 'e', 't', 'e', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30313 : /* 7440 */ 'e', 'x', 't', 'r', 'a', 'c', 't', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30314 : /* 7456 */ 'c', 'l', 'o', 'n', 'e', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30315 : /* 7470 */ 'i', 'n', 's', 'e', 'r', 't', 'N', 'o', 'd', 'e', '\0',
30316 : /* 7481 */ 's', 'u', 'r', 'r', 'o', 'u', 'n', 'd', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30317 : /* 7498 */ 'c', 'l', 'o', 'n', 'e', 'R', 'a', 'n', 'g', 'e', '\0',
30318 : /* 7509 */ 'd', 'e', 't', 'a', 'c', 'h', '\0',
30319 : /* 7516 */ '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',
30320 : /* 7541 */ 'i', 's', 'P', 'o', 'i', 'n', 't', 'I', 'n', 'R', 'a', 'n', 'g', 'e', '\0',
30321 : /* 7556 */ 'c', 'o', 'm', 'p', 'a', 'r', 'e', 'P', 'o', 'i', 'n', 't', '\0',
30322 : /* 7569 */ 's', 'e', 't', 'I', 't', 'e', 'm', '\0',
30323 : /* 7577 */ 'g', 'e', 't', 'I', 't', 'e', 'm', '\0',
30324 : /* 7585 */ 'k', 'e', 'y', '\0',
30325 : /* 7589 */ 'r', 'e', 'm', 'o', 'v', 'e', 'I', 't', 'e', 'm', '\0',
30326 : /* 7600 */ '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',
30327 : /* 7625 */ 'n', 'e', 'x', 't', 'N', 'o', 'd', 'e', '\0',
30328 : /* 7634 */ 'e', 'v', 'a', 'l', 'u', 'a', 't', 'e', '\0',
30329 : /* 7643 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'x', 'p', 'r', 'e', 's', 's', 'i', 'o', 'n', '\0',
30330 : /* 7660 */ 'c', 'r', 'e', 'a', 't', 'e', 'N', 'S', 'R', 'e', 's', 'o', 'l', 'v', 'e', 'r', '\0',
30331 : /* 7677 */ 's', 'n', 'a', 'p', 's', 'h', 'o', 't', 'I', 't', 'e', 'm', '\0',
30332 : /* 7690 */ 'i', 't', 'e', 'r', 'a', 't', 'e', 'N', 'e', 'x', 't', '\0',
30333 : /* 7702 */ 's', 'n', 'a', 'p', 's', 'h', 'o', 't', 'L', 'e', 'n', 'g', 't', 'h', '\0',
30334 : /* 7717 */ 'r', 'e', 's', 'u', 'l', 't', 'T', 'y', 'p', 'e', '\0',
30335 : /* 7728 */ 'n', 'u', 'm', 'b', 'e', 'r', 'V', 'a', 'l', 'u', 'e', '\0',
30336 : /* 7740 */ 's', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\0',
30337 : /* 7752 */ 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'V', 'a', 'l', 'u', 'e', '\0',
30338 : /* 7765 */ 's', 'i', 'n', 'g', 'l', 'e', 'N', 'o', 'd', 'e', 'V', 'a', 'l', 'u', 'e', '\0',
30339 : /* 7781 */ 'e', 'v', 'a', 'l', 'u', 'a', 't', 'e', 'W', 'i', 't', 'h', 'C', 'o', 'n', 't', 'e', 'x', 't', '\0',
30340 : /* 7801 */ 'a', 'l', 'i', 'g', 'n', '\0',
30341 : /* 7807 */ 'f', 'l', 'e', 'x', '\0',
30342 : /* 7812 */ 'f', 'l', 'e', 'x', 'G', 'r', 'o', 'u', 'p', '\0',
30343 : /* 7822 */ 'o', 'r', 'd', 'i', 'n', 'a', 'l', '\0',
30344 : /* 7830 */ 'o', 'r', 'i', 'e', 'n', 't', '\0',
30345 : /* 7837 */ 'p', 'a', 'c', 'k', '\0',
30346 : /* 7842 */ 'o', 'b', 's', 'e', 'r', 'v', 'e', 's', '\0',
30347 : /* 7851 */ 'm', 'e', 'n', 'u', '\0',
30348 : /* 7856 */ 't', 'o', 'o', 'l', 't', 'i', 'p', '\0',
30349 : /* 7864 */ 'p', 'e', 'r', 's', 'i', 's', 't', '\0',
30350 : /* 7872 */ 'd', 'a', 't', 'a', 's', 'o', 'u', 'r', 'c', 'e', 's', '\0',
30351 : /* 7884 */ 'r', 'e', 'f', '\0',
30352 : /* 7888 */ 't', 'o', 'o', 'l', 't', 'i', 'p', 'T', 'e', 'x', 't', '\0',
30353 : /* 7900 */ 's', 't', 'a', 't', 'u', 's', 'T', 'e', 'x', 't', '\0',
30354 : /* 7911 */ 'a', 'l', 'l', 'o', 'w', 'E', 'v', 'e', 'n', 't', 's', '\0',
30355 : /* 7923 */ 'd', 'a', 't', 'a', 'b', 'a', 's', 'e', '\0',
30356 : /* 7932 */ 'b', 'u', 'i', 'l', 'd', 'e', 'r', '\0',
30357 : /* 7940 */ 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\0',
30358 : /* 7949 */ 'c', 'o', 'n', 't', 'r', 'o', 'l', 'l', 'e', 'r', 's', '\0',
30359 : /* 7961 */ 'b', 'o', 'x', 'O', 'b', 'j', 'e', 'c', 't', '\0',
30360 : /* 7971 */ 'd', 'o', 'C', 'o', 'm', 'm', 'a', 'n', 'd', '\0',
30361 : /* 7981 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
30362 : /* 8004 */ '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',
30363 : /* 8029 */ 'r', 'e', 'a', 'd', 'A', 's', 'A', 'r', 'r', 'a', 'y', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30364 : /* 8047 */ 'r', 'e', 'a', 'd', 'A', 's', 'B', 'i', 'n', 'a', 'r', 'y', 'S', 't', 'r', 'i', 'n', 'g', '\0',
30365 : /* 8066 */ 'r', 'e', 'a', 'd', 'A', 's', 'T', 'e', 'x', 't', '\0',
30366 : /* 8077 */ 'r', 'e', 'a', 'd', 'A', 's', 'D', 'a', 't', 'a', 'U', 'R', 'L', '\0',
30367 : /* 8091 */ 'a', 'b', 'o', 'r', 't', '\0',
30368 : /* 8097 */ 'r', 'e', 'a', 'd', 'y', 'S', 't', 'a', 't', 'e', '\0',
30369 : /* 8108 */ 'r', 'e', 's', 'u', 'l', 't', '\0',
30370 : /* 8115 */ 'e', 'r', 'r', 'o', 'r', '\0',
30371 : /* 8121 */ 'o', 'n', 'l', 'o', 'a', 'd', 's', 't', 'a', 'r', 't', '\0',
30372 : /* 8133 */ 'o', 'n', 'p', 'r', 'o', 'g', 'r', 'e', 's', 's', '\0',
30373 : /* 8144 */ 'o', 'n', 'l', 'o', 'a', 'd', '\0',
30374 : /* 8151 */ 'o', 'n', 'a', 'b', 'o', 'r', 't', '\0',
30375 : /* 8159 */ 'o', 'n', 'e', 'r', 'r', 'o', 'r', '\0',
30376 : /* 8167 */ 'o', 'n', 'l', 'o', 'a', 'd', 'e', 'n', 'd', '\0',
30377 : /* 8177 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'X', 'M', 'L', '\0',
30378 : /* 8189 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'T', 'e', 'x', 't', '\0',
30379 : /* 8202 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'T', 'y', 'p', 'e', '\0',
30380 : /* 8215 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '\0',
30381 : /* 8224 */ 's', 't', 'a', 't', 'u', 's', '\0',
30382 : /* 8231 */ 'o', 'p', 'e', 'n', '\0',
30383 : /* 8236 */ 's', 'e', 'n', 'd', '\0',
30384 : /* 8241 */ 's', 'e', 'n', 'd', 'A', 's', 'B', 'i', 'n', 'a', 'r', 'y', '\0',
30385 : /* 8254 */ 't', 'i', 'm', 'e', 'o', 'u', 't', '\0',
30386 : /* 8262 */ 'm', 'u', 'l', 't', 'i', 'p', 'a', 'r', 't', '\0',
30387 : /* 8272 */ 'm', 'o', 'z', 'B', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'R', 'e', 'q', 'u', 'e', 's', 't', '\0',
30388 : /* 8293 */ 'w', 'i', 't', 'h', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\0',
30389 : /* 8309 */ 'u', 'r', 'l', '\0',
30390 : /* 8313 */ 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '\0',
30391 : /* 8324 */ 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\0',
30392 : /* 8333 */ 'b', 'u', 'f', 'f', 'e', 'r', 'e', 'd', 'A', 'm', 'o', 'u', 'n', 't', '\0',
30393 : /* 8348 */ 'b', 'i', 'n', 'a', 'r', 'y', 'T', 'y', 'p', 'e', '\0',
30394 : /* 8359 */ 'o', 'n', 'o', 'p', 'e', 'n', '\0',
30395 : /* 8366 */ 'o', 'n', 'm', 'e', 's', 's', 'a', 'g', 'e', '\0',
30396 : /* 8376 */ 'o', 'n', 'c', 'l', 'o', 's', 'e', '\0',
30397 : /* 8384 */ 'c', 'l', 'o', 's', 'e', '\0',
30398 : /* 8390 */ 'a', 'c', 't', 'i', 'v', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30399 : /* 8404 */ 'a', 't', 't', 'a', 'c', 'h', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30400 : /* 8417 */ 'b', 'i', 'n', 'd', 'A', 't', 't', 'r', 'i', 'b', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\0',
30401 : /* 8436 */ 'b', 'i', 'n', 'd', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30402 : /* 8447 */ 'b', 'i', 'n', 'd', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30403 : /* 8463 */ 'b', 'i', 'n', 'd', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30404 : /* 8480 */ 'b', 'i', 'n', 'd', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30405 : /* 8492 */ 'b', 'l', 'e', 'n', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
30406 : /* 8503 */ 'b', 'l', 'e', 'n', 'd', 'E', 'q', 'u', 'a', 't', 'i', 'o', 'n', '\0',
30407 : /* 8517 */ 'b', 'l', 'e', 'n', 'd', 'E', 'q', 'u', 'a', 't', 'i', 'o', 'n', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30408 : /* 8539 */ 'b', 'l', 'e', 'n', 'd', 'F', 'u', 'n', 'c', '\0',
30409 : /* 8549 */ 'b', 'l', 'e', 'n', 'd', 'F', 'u', 'n', 'c', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30410 : /* 8567 */ 'b', 'u', 'f', 'f', 'e', 'r', 'D', 'a', 't', 'a', '\0',
30411 : /* 8578 */ 'b', 'u', 'f', 'f', 'e', 'r', 'S', 'u', 'b', 'D', 'a', 't', 'a', '\0',
30412 : /* 8592 */ 'c', 'h', 'e', 'c', 'k', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', 'S', 't', 'a', 't', 'u', 's', '\0',
30413 : /* 8615 */ 'c', 'l', 'e', 'a', 'r', 'C', 'o', 'l', 'o', 'r', '\0',
30414 : /* 8626 */ 'c', 'l', 'e', 'a', 'r', 'D', 'e', 'p', 't', 'h', '\0',
30415 : /* 8637 */ 'c', 'l', 'e', 'a', 'r', 'S', 't', 'e', 'n', 'c', 'i', 'l', '\0',
30416 : /* 8650 */ 'c', 'o', 'l', 'o', 'r', 'M', 'a', 's', 'k', '\0',
30417 : /* 8660 */ 'c', 'o', 'm', 'p', 'i', 'l', 'e', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30418 : /* 8674 */ 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30419 : /* 8695 */ 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30420 : /* 8719 */ 'c', 'o', 'p', 'y', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30421 : /* 8734 */ 'c', 'o', 'p', 'y', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30422 : /* 8752 */ 'c', 'r', 'e', 'a', 't', 'e', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30423 : /* 8765 */ 'c', 'r', 'e', 'a', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30424 : /* 8779 */ 'c', 'r', 'e', 'a', 't', 'e', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30425 : /* 8797 */ 'c', 'r', 'e', 'a', 't', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30426 : /* 8816 */ 'c', 'r', 'e', 'a', 't', 'e', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30427 : /* 8829 */ 'c', 'r', 'e', 'a', 't', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30428 : /* 8843 */ 'c', 'u', 'l', 'l', 'F', 'a', 'c', 'e', '\0',
30429 : /* 8852 */ 'd', 'e', 'l', 'e', 't', 'e', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30430 : /* 8865 */ 'd', 'e', 'l', 'e', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30431 : /* 8879 */ 'd', 'e', 'l', 'e', 't', 'e', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30432 : /* 8897 */ 'd', 'e', 'l', 'e', 't', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30433 : /* 8916 */ 'd', 'e', 'l', 'e', 't', 'e', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30434 : /* 8929 */ 'd', 'e', 'l', 'e', 't', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30435 : /* 8943 */ 'd', 'e', 'p', 't', 'h', 'F', 'u', 'n', 'c', '\0',
30436 : /* 8953 */ 'd', 'e', 'p', 't', 'h', 'M', 'a', 's', 'k', '\0',
30437 : /* 8963 */ 'd', 'e', 'p', 't', 'h', 'R', 'a', 'n', 'g', 'e', '\0',
30438 : /* 8974 */ 'd', 'e', 't', 'a', 'c', 'h', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30439 : /* 8987 */ 'd', 'i', 's', 'a', 'b', 'l', 'e', '\0',
30440 : /* 8995 */ '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',
30441 : /* 9020 */ 'd', 'r', 'a', 'w', 'A', 'r', 'r', 'a', 'y', 's', '\0',
30442 : /* 9031 */ 'd', 'r', 'a', 'w', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', '\0',
30443 : /* 9044 */ 'e', 'n', 'a', 'b', 'l', 'e', '\0',
30444 : /* 9051 */ 'e', 'n', 'a', 'b', 'l', 'e', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'A', 'r', 'r', 'a', 'y', '\0',
30445 : /* 9075 */ 'f', 'i', 'n', 'i', 's', 'h', '\0',
30446 : /* 9082 */ 'f', 'l', 'u', 's', 'h', '\0',
30447 : /* 9088 */ 'f', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30448 : /* 9112 */ 'f', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', 'T', 'e', 'x', 't', 'u', 'r', 'e', '2', 'D', '\0',
30449 : /* 9133 */ 'f', 'r', 'o', 'n', 't', 'F', 'a', 'c', 'e', '\0',
30450 : /* 9143 */ 'g', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'M', 'i', 'p', 'm', 'a', 'p', '\0',
30451 : /* 9158 */ 'g', 'e', 't', 'A', 'c', 't', 'i', 'v', 'e', 'A', 't', 't', 'r', 'i', 'b', '\0',
30452 : /* 9174 */ 'g', 'e', 't', 'A', 'c', 't', 'i', 'v', 'e', 'U', 'n', 'i', 'f', 'o', 'r', 'm', '\0',
30453 : /* 9191 */ 'g', 'e', 't', 'A', 't', 't', 'a', 'c', 'h', 'e', 'd', 'S', 'h', 'a', 'd', 'e', 'r', 's', '\0',
30454 : /* 9210 */ 'g', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\0',
30455 : /* 9228 */ 'g', 'e', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30456 : /* 9241 */ 'g', 'e', 't', 'B', 'u', 'f', 'f', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30457 : /* 9260 */ 'g', 'e', 't', 'E', 'r', 'r', 'o', 'r', '\0',
30458 : /* 9269 */ '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',
30459 : /* 9303 */ 'g', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30460 : /* 9323 */ 'g', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'I', 'n', 'f', 'o', 'L', 'o', 'g', '\0',
30461 : /* 9341 */ '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',
30462 : /* 9366 */ 'g', 'e', 't', 'S', 'h', 'a', 'd', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30463 : /* 9385 */ 'g', 'e', 't', 'S', 'h', 'a', 'd', 'e', 'r', 'I', 'n', 'f', 'o', 'L', 'o', 'g', '\0',
30464 : /* 9402 */ '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',
30465 : /* 9427 */ 'g', 'e', 't', 'S', 'h', 'a', 'd', 'e', 'r', 'S', 'o', 'u', 'r', 'c', 'e', '\0',
30466 : /* 9443 */ 'g', 'e', 't', 'T', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30467 : /* 9459 */ 'g', 'e', 't', 'U', 'n', 'i', 'f', 'o', 'r', 'm', '\0',
30468 : /* 9470 */ 'g', 'e', 't', 'U', 'n', 'i', 'f', 'o', 'r', 'm', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\0',
30469 : /* 9489 */ 'g', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '\0',
30470 : /* 9505 */ 'g', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'O', 'f', 'f', 's', 'e', 't', '\0',
30471 : /* 9527 */ 'h', 'i', 'n', 't', '\0',
30472 : /* 9532 */ 'i', 's', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30473 : /* 9541 */ 'i', 's', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30474 : /* 9555 */ 'i', 's', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30475 : /* 9565 */ 'i', 's', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30476 : /* 9580 */ 'i', 's', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30477 : /* 9589 */ 'i', 's', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30478 : /* 9599 */ 'i', 's', 'E', 'n', 'a', 'b', 'l', 'e', 'd', '\0',
30479 : /* 9609 */ 'l', 'i', 'n', 'k', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30480 : /* 9621 */ 'p', 'i', 'x', 'e', 'l', 'S', 't', 'o', 'r', 'e', 'i', '\0',
30481 : /* 9633 */ 'p', 'o', 'l', 'y', 'g', 'o', 'n', 'O', 'f', 'f', 's', 'e', 't', '\0',
30482 : /* 9647 */ 'r', 'e', 'a', 'd', 'P', 'i', 'x', 'e', 'l', 's', '\0',
30483 : /* 9658 */ 'r', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', 'S', 't', 'o', 'r', 'a', 'g', 'e', '\0',
30484 : /* 9678 */ 's', 'a', 'm', 'p', 'l', 'e', 'C', 'o', 'v', 'e', 'r', 'a', 'g', 'e', '\0',
30485 : /* 9693 */ 's', 'c', 'i', 's', 's', 'o', 'r', '\0',
30486 : /* 9701 */ 's', 'h', 'a', 'd', 'e', 'r', 'S', 'o', 'u', 'r', 'c', 'e', '\0',
30487 : /* 9714 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'F', 'u', 'n', 'c', '\0',
30488 : /* 9726 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'F', 'u', 'n', 'c', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30489 : /* 9746 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'M', 'a', 's', 'k', '\0',
30490 : /* 9758 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'M', 'a', 's', 'k', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30491 : /* 9778 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'O', 'p', '\0',
30492 : /* 9788 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'O', 'p', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30493 : /* 9806 */ 't', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30494 : /* 9817 */ 't', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30495 : /* 9831 */ 't', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', '\0',
30496 : /* 9845 */ 't', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', '\0',
30497 : /* 9859 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'f', '\0',
30498 : /* 9869 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'i', '\0',
30499 : /* 9879 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'f', '\0',
30500 : /* 9889 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'i', '\0',
30501 : /* 9899 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'f', '\0',
30502 : /* 9909 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'i', '\0',
30503 : /* 9919 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'f', '\0',
30504 : /* 9929 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'i', '\0',
30505 : /* 9939 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'f', 'v', '\0',
30506 : /* 9950 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'i', 'v', '\0',
30507 : /* 9961 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'f', 'v', '\0',
30508 : /* 9972 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'i', 'v', '\0',
30509 : /* 9983 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'f', 'v', '\0',
30510 : /* 9994 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'i', 'v', '\0',
30511 : /* 10005 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'f', 'v', '\0',
30512 : /* 10016 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'i', 'v', '\0',
30513 : /* 10027 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', 'M', 'a', 't', 'r', 'i', 'x', '2', 'f', 'v', '\0',
30514 : /* 10044 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', 'M', 'a', 't', 'r', 'i', 'x', '3', 'f', 'v', '\0',
30515 : /* 10061 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', 'M', 'a', 't', 'r', 'i', 'x', '4', 'f', 'v', '\0',
30516 : /* 10078 */ 'u', 's', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30517 : /* 10089 */ 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30518 : /* 10105 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'f', '\0',
30519 : /* 10120 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'f', '\0',
30520 : /* 10135 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'f', '\0',
30521 : /* 10150 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'f', '\0',
30522 : /* 10165 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'f', 'v', '\0',
30523 : /* 10181 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'f', 'v', '\0',
30524 : /* 10197 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'f', 'v', '\0',
30525 : /* 10213 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'f', 'v', '\0',
30526 : /* 10229 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'P', 'o', 'i', 'n', 't', 'e', 'r', '\0',
30527 : /* 10249 */ 'v', 'i', 'e', 'w', 'p', 'o', 'r', 't', '\0',
30528 : /* 10258 */ 'g', 'e', 't', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\0',
30529 : /* 10271 */ 'g', 'e', 't', 'S', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '\0',
30530 : /* 10294 */ 'i', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'L', 'o', 's', 't', '\0',
30531 : /* 10308 */ 'd', 'r', 'a', 'w', 'i', 'n', 'g', 'B', 'u', 'f', 'f', 'e', 'r', 'W', 'i', 'd', 't', 'h', '\0',
30532 : /* 10327 */ 'd', 'r', 'a', 'w', 'i', 'n', 'g', 'B', 'u', 'f', 'f', 'e', 'r', 'H', 'e', 'i', 'g', 'h', 't', '\0',
30533 : /* 10347 */ 'f', 'r', 'a', 'm', 'e', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30534 : /* 10359 */ 't', 'i', 'm', 'e', '\0',
30535 : /* 10364 */ 'm', 'o', 'z', 'W', 'r', 'i', 't', 'e', 'A', 'u', 'd', 'i', 'o', '\0',
30536 : /* 10378 */ 'p', 'r', 'i', 'm', 'a', 'r', 'y', 'K', 'e', 'y', '\0',
30537 : /* 10389 */ 'c', 'o', 'n', 't', 'i', 'n', 'u', 'e', '\0',
30538 : /* 10398 */ 'u', 'p', 'd', 'a', 't', 'e', '\0',
30539 : /* 10405 */ 'd', 'e', 'l', 'e', 't', 'e', '\0',
30540 : /* 10412 */ 'a', 'd', 'v', 'a', 'n', 'c', 'e', '\0',
30541 : /* 10420 */ 'v', 'e', 'r', 's', 'i', 'o', 'n', '\0',
30542 : /* 10428 */ 'o', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', 'N', 'a', 'm', 'e', 's', '\0',
30543 : /* 10445 */ 'c', 'r', 'e', 'a', 't', 'e', 'O', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', '\0',
30544 : /* 10463 */ 'd', 'e', 'l', 'e', 't', 'e', 'O', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', '\0',
30545 : /* 10481 */ 't', 'r', 'a', 'n', 's', 'a', 'c', 't', 'i', 'o', 'n', '\0',
30546 : /* 10493 */ 'o', 'n', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'c', 'h', 'a', 'n', 'g', 'e', '\0',
30547 : /* 10509 */ 'c', 'o', 'd', 'e', '\0',
30548 : /* 10514 */ 's', 't', 'o', 'r', 'e', 'N', 'a', 'm', 'e', '\0',
30549 : /* 10524 */ 'k', 'e', 'y', 'P', 'a', 't', 'h', '\0',
30550 : /* 10532 */ 'u', 'n', 'i', 'q', 'u', 'e', '\0',
30551 : /* 10539 */ 'm', 'u', 'l', 't', 'i', 'E', 'n', 't', 'r', 'y', '\0',
30552 : /* 10550 */ 'o', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', '\0',
30553 : /* 10562 */ 'g', 'e', 't', '\0',
30554 : /* 10566 */ 'g', 'e', 't', 'K', 'e', 'y', '\0',
30555 : /* 10573 */ 'g', 'e', 't', 'A', 'l', 'l', '\0',
30556 : /* 10580 */ 'g', 'e', 't', 'A', 'l', 'l', 'K', 'e', 'y', 's', '\0',
30557 : /* 10591 */ 'o', 'p', 'e', 'n', 'C', 'u', 'r', 's', 'o', 'r', '\0',
30558 : /* 10602 */ 'o', 'p', 'e', 'n', 'K', 'e', 'y', 'C', 'u', 'r', 's', 'o', 'r', '\0',
30559 : /* 10616 */ 'c', 'o', 'u', 'n', 't', '\0',
30560 : /* 10622 */ 'l', 'o', 'w', 'e', 'r', '\0',
30561 : /* 10628 */ 'u', 'p', 'p', 'e', 'r', '\0',
30562 : /* 10634 */ 'l', 'o', 'w', 'e', 'r', 'O', 'p', 'e', 'n', '\0',
30563 : /* 10644 */ 'u', 'p', 'p', 'e', 'r', 'O', 'p', 'e', 'n', '\0',
30564 : /* 10654 */ 'i', 'n', 'd', 'e', 'x', 'N', 'a', 'm', 'e', 's', '\0',
30565 : /* 10665 */ 'a', 'u', 't', 'o', 'I', 'n', 'c', 'r', 'e', 'm', 'e', 'n', 't', '\0',
30566 : /* 10679 */ 'p', 'u', 't', '\0',
30567 : /* 10683 */ 'c', 'r', 'e', 'a', 't', 'e', 'I', 'n', 'd', 'e', 'x', '\0',
30568 : /* 10695 */ 'd', 'e', 'l', 'e', 't', 'e', 'I', 'n', 'd', 'e', 'x', '\0',
30569 : /* 10707 */ 'e', 'r', 'r', 'o', 'r', 'C', 'o', 'd', 'e', '\0',
30570 : /* 10717 */ 'o', 'n', 's', 'u', 'c', 'c', 'e', 's', 's', '\0',
30571 : /* 10727 */ 'd', 'b', '\0',
30572 : /* 10730 */ 'm', 'o', 'd', 'e', '\0',
30573 : /* 10735 */ 'o', 'n', 'c', 'o', 'm', 'p', 'l', 'e', 't', 'e', '\0',
30574 : /* 10746 */ 'd', 'e', 'l', 'e', 't', 'e', 'D', 'a', 't', 'a', 'b', 'a', 's', 'e', '\0',
30575 : /* 10761 */ 'c', 'm', 'p', '\0',
30576 : /* 10765 */ 'o', 'n', 'b', 'l', 'o', 'c', 'k', 'e', 'd', '\0',
30577 : /* 10775 */ 'o', 'n', 'u', 'p', 'g', 'r', 'a', 'd', 'e', 'n', 'e', 'e', 'd', 'e', 'd', '\0',
30578 : /* 10791 */ 'o', 'l', 'd', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\0',
30579 : /* 10802 */ 'n', 'e', 'w', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\0',
30580 : /* 10813 */ 'o', 'n', 'U', 's', 'a', 'g', 'e', 'R', 'e', 's', 'u', 'l', 't', '\0',
30581 : /* 10827 */ 'g', 'e', 't', 'U', 's', 'a', 'g', 'e', 'F', 'o', 'r', 'U', 'R', 'I', '\0',
30582 : /* 10842 */ 'c', 'a', 'n', 'c', 'e', 'l', 'G', 'e', 't', 'U', 's', 'a', 'g', 'e', 'F', 'o', 'r', 'U', 'R', 'I', '\0',
30583 : /* 10863 */ 'c', 'l', 'e', 'a', 'r', 'D', 'a', 't', 'a', 'b', 'a', 's', 'e', 's', 'F', 'o', 'r', 'U', 'R', 'I', '\0',
30584 : /* 10884 */ 'i', 'n', 'i', 't', 'W', 'i', 'n', 'd', 'o', 'w', 'l', 'e', 's', 's', '\0' };
30585 :
30586 : PR_STATIC_ASSERT(sizeof(stringtab) < (1 << (8 * sizeof(all_properties[0].name_index))));
30587 : PR_STATIC_ASSERT(sizeof(stringtab) < (1 << (8 * sizeof(all_functions[0].name_index))));
30588 :
30589 2781 : JSBool DOM_DefineQuickStubs(JSContext *cx, JSObject *proto, unsigned flags, PRUint32 count, const nsID **iids)
30590 : {
30591 2781 : return xpc_qsDefineQuickStubs(cx, proto, flags, count, iids, 180, tableData, all_properties, all_functions, stringtab);
30592 : }
30593 :
30594 :
|