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 "nsIDOMStorageList.h"
19 : #include "nsIDOMWindow_globalStorage.h"
20 : #include "nsIDOMJSWindow.h"
21 : #include "nsIDOMScreen.h"
22 : #include "nsIDOMClientRect.h"
23 : #include "nsIDOMClientRectList.h"
24 : #include "nsIDOMPaintRequest.h"
25 : #include "nsIDOMPaintRequestList.h"
26 : #include "nsIDOMHTMLCanvasElement.h"
27 : #include "nsIVariant.h"
28 : #include "nsIDOMCanvasRenderingContext2D.h"
29 : #include "nsIDOMHTMLElement.h"
30 : #include "nsIDOMXULElement.h"
31 : #include "nsIDOMCharacterData.h"
32 : #include "nsIDOMDOMImplementation.h"
33 : #include "nsIDOMNodeList.h"
34 : #include "nsIDOMDocumentType.h"
35 : #include "nsIDOMDocumentFragment.h"
36 : #include "nsIDOMNode.h"
37 : #include "nsIDOMText.h"
38 : #include "nsIDOMNodeIterator.h"
39 : #include "nsIDOMNodeFilter.h"
40 : #include "nsIDOMEvent.h"
41 : #include "nsIDOMDocument.h"
42 : #include "nsIDOMNamedNodeMap.h"
43 : #include "nsIDOMUserDataHandler.h"
44 : #include "nsIDOMNodeSelector.h"
45 : #include "nsIDOMDOMStringList.h"
46 : #include "nsIDOMDOMTokenList.h"
47 : #include "nsIDOMDOMSettableTokenList.h"
48 : #include "nsIBoxObject.h"
49 : #include "nsIDOMXULDocument.h"
50 : #include "nsIDOMNSElement.h"
51 : #include "nsIDOMElementCSSInlineStyle.h"
52 : #include "nsIDOMCSS2Properties.h"
53 : #include "nsIDOMCSSPrimitiveValue.h"
54 : #include "nsIDOMRect.h"
55 : #include "nsIDOMCSSValue.h"
56 : #include "nsIDOMCSSRule.h"
57 : #include "nsIDOMEventListener.h"
58 : #include "nsIDOMEventTarget.h"
59 : #include "nsIDOMMouseEvent.h"
60 : #include "nsIDOMKeyEvent.h"
61 : #include "nsIDOMMutationEvent.h"
62 : #include "nsIDOMDataTransfer.h"
63 : #include "nsIDOMDragEvent.h"
64 : #include "nsIDOMScrollAreaEvent.h"
65 : #include "nsIDOMNotifyPaintEvent.h"
66 : #include "nsIDOMMessageEvent.h"
67 : #include "nsIDOMMouseScrollEvent.h"
68 : #include "nsIDOMProgressEvent.h"
69 : #include "nsIDOMNSEvent.h"
70 : #include "nsIDOMUIEvent.h"
71 : #include "nsIDOMTouchEvent.h"
72 : #include "nsIDOMHTMLAnchorElement.h"
73 : #include "nsIDOMHTMLBaseElement.h"
74 : #include "nsIDOMHTMLFormElement.h"
75 : #include "nsIDOMHTMLButtonElement.h"
76 : #include "nsIDOMHTMLCollection.h"
77 : #include "nsIDOMHTMLCommandElement.h"
78 : #include "nsIDOMHTMLHeadElement.h"
79 : #include "nsIDOMHTMLDocument.h"
80 : #include "nsIDOMDOMStringMap.h"
81 : #include "nsIDOMHTMLMenuElement.h"
82 : #include "nsIDOMHTMLFrameElement.h"
83 : #include "nsIDOMHTMLFrameSetElement.h"
84 : #include "nsIDOMHTMLIFrameElement.h"
85 : #include "nsIDOMHTMLImageElement.h"
86 : #include "nsIDOMFileList.h"
87 : #include "nsIDOMHTMLInputElement.h"
88 : #include "nsIDOMHTMLLinkElement.h"
89 : #include "nsIDOMHTMLMenuItemElement.h"
90 : #include "nsIDOMHTMLOptionElement.h"
91 : #include "nsIDOMHTMLOptionsCollection.h"
92 : #include "nsIDOMHTMLProgressElement.h"
93 : #include "nsIDOMHTMLSelectElement.h"
94 : #include "nsIDOMHTMLStyleElement.h"
95 : #include "nsIDOMHTMLTableCellElement.h"
96 : #include "nsIDOMHTMLTableColElement.h"
97 : #include "nsIDOMHTMLTableElement.h"
98 : #include "nsIDOMHTMLTableRowElement.h"
99 : #include "nsIDOMHTMLTableSectionElem.h"
100 : #include "nsIDOMHTMLTextAreaElement.h"
101 : #include "nsIDOMHTMLTitleElement.h"
102 : #include "nsISupports.h"
103 : #include "nsIDOMRange.h"
104 : #include "nsIDOMToString.h"
105 : #include "nsIDOMStorageItem.h"
106 : #include "nsIDOMSVGAnimatedString.h"
107 : #include "nsIDOMSVGStylable.h"
108 : #include "nsIDOMXPathNSResolver.h"
109 : #include "nsIDOMXPathExpression.h"
110 : #include "nsIDOMXPathEvaluator.h"
111 : #include "nsIDOMXPathResult.h"
112 : #include "nsIDOMNSXPathExpression.h"
113 : #include "nsIRDFCompositeDataSource.h"
114 : #include "nsIXULTemplateBuilder.h"
115 : #include "nsIRDFResource.h"
116 : #include "nsIControllers.h"
117 : #include "nsIDOMFile.h"
118 : #include "nsIDOMDOMError.h"
119 : #include "nsIDOMFileReader.h"
120 : #include "nsIXMLHttpRequest.h"
121 : #include "nsIWebSocket.h"
122 : #include "nsIDOMWebGLRenderingContext.h"
123 : #include "nsIDOMNotifyAudioAvailableEvent.h"
124 : #include "nsIDOMHTMLAudioElement.h"
125 : #include "nsIIDBRequest.h"
126 : #include "nsIIDBCursor.h"
127 : #include "nsIIDBCursorWithValue.h"
128 : #include "nsIIDBObjectStore.h"
129 : #include "nsIIDBTransaction.h"
130 : #include "nsIIDBDatabase.h"
131 : #include "nsIIDBDatabaseException.h"
132 : #include "nsIIDBIndex.h"
133 : #include "nsIIDBKeyRange.h"
134 : #include "nsIIDBOpenDBRequest.h"
135 : #include "nsIIDBFactory.h"
136 : #include "nsIIDBVersionChangeEvent.h"
137 : #include "nsIURI.h"
138 : #include "nsIIndexedDatabaseManager.h"
139 : #include "nsINode.h"
140 : #include "nsIContent.h"
141 : #include "nsIDocument.h"
142 : #include "nsINodeList.h"
143 : #include "nsCSSPropertiesQS.h"
144 : #include "nsDocument.h"
145 : #include "nsDOMTokenList.h"
146 : #include "nsGenericDOMDataNode.h"
147 : #include "nsGenericElement.h"
148 : #include "nsGenericHTMLElement.h"
149 : #include "nsSVGStylableElement.h"
150 : #include "nsHTMLDocument.h"
151 : #include "nsDOMQS.h"
152 :
153 :
154 : // === XPCNativeInterface cache
155 :
156 : static XPCNativeInterface* interfaces[69];
157 :
158 14728 : void DOM_MarkInterfaces()
159 : {
160 1030960 : for (PRUint32 i = 0; i < 69; ++i)
161 1016232 : if (interfaces[i])
162 3358 : interfaces[i]->Mark();
163 14728 : }
164 2807 : void DOM_ClearInterfaces()
165 : {
166 2807 : memset(interfaces, 0, 69 * sizeof(XPCNativeInterface*));
167 2807 : }
168 :
169 : static const PRUint32 k_nsIDOMNode = 0;
170 : static const PRUint32 k_nsIDOMEvent = 1;
171 : static const PRUint32 k_nsIDOMCanvasGradient = 2;
172 : static const PRUint32 k_nsIControllers = 3;
173 : static const PRUint32 k_nsIDOMXPathExpression = 4;
174 : static const PRUint32 k_nsIDOMDataTransfer = 5;
175 : static const PRUint32 k_nsIRDFResource = 6;
176 : static const PRUint32 k_nsIXULTemplateBuilder = 7;
177 : static const PRUint32 k_nsIDOMCanvasPattern = 8;
178 : static const PRUint32 k_nsIWebGLProgram = 9;
179 : static const PRUint32 k_nsIRDFCompositeDataSource = 10;
180 : static const PRUint32 k_nsIDOMHTMLOptionsCollection = 11;
181 : static const PRUint32 k_nsIDOMDOMImplementation = 12;
182 : static const PRUint32 k_nsIDOMCSSValue = 13;
183 : static const PRUint32 k_nsIWebGLFramebuffer = 14;
184 : static const PRUint32 k_nsIDOMRange = 15;
185 : static const PRUint32 k_nsIWebGLActiveInfo = 16;
186 : static const PRUint32 k_nsIDOMStorage = 17;
187 : static const PRUint32 k_nsIWebGLTexture = 18;
188 : static const PRUint32 k_nsIDOMSVGAnimatedString = 19;
189 : static const PRUint32 k_nsIIDBDatabase = 20;
190 : static const PRUint32 k_nsIDOMCSSRule = 21;
191 : static const PRUint32 k_nsIDOMTouch = 22;
192 : static const PRUint32 k_nsIIDBTransaction = 23;
193 : static const PRUint32 k_nsIDOMDOMStringMap = 24;
194 : static const PRUint32 k_nsISupports = 25;
195 : static const PRUint32 k_nsIDOMTextMetrics = 26;
196 : static const PRUint32 k_nsIDOMNodeList = 27;
197 : static const PRUint32 k_nsIIDBOpenDBRequest = 28;
198 : static const PRUint32 k_nsIWebGLRenderbuffer = 29;
199 : static const PRUint32 k_nsIWebGLShaderPrecisionFormat = 30;
200 : static const PRUint32 k_nsIDOMDOMError = 31;
201 : static const PRUint32 k_nsIDOMCSSStyleDeclaration = 32;
202 : static const PRUint32 k_nsIDOMCSSPrimitiveValue = 33;
203 : static const PRUint32 k_nsIIDBIndex = 34;
204 : static const PRUint32 k_nsIDOMPaintRequest = 35;
205 : static const PRUint32 k_nsIBoxObject = 36;
206 : static const PRUint32 k_nsIWebGLExtension = 37;
207 : static const PRUint32 k_nsIIDBRequest = 38;
208 : static const PRUint32 k_nsIDOMHTMLCanvasElement = 39;
209 : static const PRUint32 k_nsIWebGLShader = 40;
210 : static const PRUint32 k_nsIDOMHTMLMenuElement = 41;
211 : static const PRUint32 k_nsIDOMNodeIterator = 42;
212 : static const PRUint32 k_nsIDOMDocumentType = 43;
213 : static const PRUint32 k_nsIDOMHTMLCollection = 44;
214 : static const PRUint32 k_nsIDOMDocumentFragment = 45;
215 : static const PRUint32 k_nsIDOMEventTarget = 46;
216 : static const PRUint32 k_nsIDOMEventListener = 47;
217 : static const PRUint32 k_nsIDOMHTMLElement = 48;
218 : static const PRUint32 k_nsIDOMPaintRequestList = 49;
219 : static const PRUint32 k_nsISelection = 50;
220 : static const PRUint32 k_nsIDOMDOMStringList = 51;
221 : static const PRUint32 k_nsIDOMNamedNodeMap = 52;
222 : static const PRUint32 k_nsIDOMTouchList = 53;
223 : static const PRUint32 k_nsIDOMClientRect = 54;
224 : static const PRUint32 k_nsIDOMElement = 55;
225 : static const PRUint32 k_nsIDOMStorageList = 56;
226 : static const PRUint32 k_nsIWebGLUniformLocation = 57;
227 : static const PRUint32 k_nsIIDBObjectStore = 58;
228 : static const PRUint32 k_nsIDOMHTMLFormElement = 59;
229 : static const PRUint32 k_nsIDOMDocument = 60;
230 : static const PRUint32 k_nsIDOMClientRectList = 61;
231 : static const PRUint32 k_nsIDOMXPathNSResolver = 62;
232 : static const PRUint32 k_nsIDOMDOMTokenList = 63;
233 : static const PRUint32 k_nsIWebGLBuffer = 64;
234 : static const PRUint32 k_nsIDOMWindow = 65;
235 : static const PRUint32 k_nsIDOMHTMLHeadElement = 66;
236 : static const PRUint32 k_nsIDOMText = 67;
237 : static const PRUint32 k_nsIDOMFileList = 68;
238 :
239 :
240 : #include "CustomQS_WebGL.h"
241 : #include "CustomQS_Canvas2D.h"
242 : // === interface nsIDOMWindow
243 :
244 : static JSBool
245 0 : nsIDOMWindow_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
246 : {
247 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
248 : nsIDOMWindow *self;
249 0 : xpc_qsSelfRef selfref;
250 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
251 0 : return JS_FALSE;
252 : nsresult rv;
253 0 : nsString result;
254 0 : rv = self->GetName(result);
255 0 : if (NS_FAILED(rv))
256 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
257 0 : return xpc::StringToJsval(cx, result, vp);
258 : }
259 :
260 : static JSBool
261 0 : nsIDOMWindow_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
262 : {
263 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
264 : nsIDOMWindow *self;
265 0 : xpc_qsSelfRef selfref;
266 0 : JS::AutoValueRooter tvr(cx);
267 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
268 0 : return JS_FALSE;
269 : xpc_qsDOMString arg0(cx, *vp, vp,
270 : xpc_qsDOMString::eDefaultNullBehavior,
271 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
272 0 : if (!arg0.IsValid())
273 0 : return JS_FALSE;
274 : nsresult rv;
275 0 : rv = self->SetName(arg0);
276 0 : if (NS_FAILED(rv))
277 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
278 0 : return JS_TRUE;
279 : }
280 :
281 : static JSBool
282 0 : nsIDOMWindow_GetScriptableParent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
283 : {
284 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
285 0 : JSObject *callee = nsnull;
286 : nsIDOMWindow *self;
287 0 : xpc_qsSelfRef selfref;
288 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
289 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
290 0 : return JS_FALSE;
291 : nsresult rv;
292 0 : nsCOMPtr<nsIDOMWindow> result;
293 0 : rv = self->GetScriptableParent(getter_AddRefs(result));
294 0 : if (NS_FAILED(rv))
295 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
296 0 : if (!result) {
297 0 : *vp = JSVAL_NULL;
298 0 : return JS_TRUE;
299 : }
300 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
301 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
302 0 : return JS_TRUE;
303 : }
304 : // After this point do not use 'result'!
305 0 : qsObjectHelper helper(result, cache);
306 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
307 : }
308 :
309 : static JSBool
310 0 : nsIDOMWindow_GetScriptableTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
311 : {
312 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
313 0 : JSObject *callee = nsnull;
314 : nsIDOMWindow *self;
315 0 : xpc_qsSelfRef selfref;
316 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
317 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
318 0 : return JS_FALSE;
319 : nsresult rv;
320 0 : nsCOMPtr<nsIDOMWindow> result;
321 0 : rv = self->GetScriptableTop(getter_AddRefs(result));
322 0 : if (NS_FAILED(rv))
323 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
324 0 : if (!result) {
325 0 : *vp = JSVAL_NULL;
326 0 : return JS_TRUE;
327 : }
328 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
329 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
330 0 : return JS_TRUE;
331 : }
332 : // After this point do not use 'result'!
333 0 : qsObjectHelper helper(result, cache);
334 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
335 : }
336 :
337 : static JSBool
338 0 : nsIDOMWindow_GetSelf(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
339 : {
340 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
341 0 : JSObject *callee = nsnull;
342 : nsIDOMWindow *self;
343 0 : xpc_qsSelfRef selfref;
344 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
345 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
346 0 : return JS_FALSE;
347 : nsresult rv;
348 0 : nsCOMPtr<nsIDOMWindow> result;
349 0 : rv = self->GetSelf(getter_AddRefs(result));
350 0 : if (NS_FAILED(rv))
351 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
352 0 : if (!result) {
353 0 : *vp = JSVAL_NULL;
354 0 : return JS_TRUE;
355 : }
356 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
357 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
358 0 : return JS_TRUE;
359 : }
360 : // After this point do not use 'result'!
361 0 : qsObjectHelper helper(result, cache);
362 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
363 : }
364 :
365 : static JSBool
366 0 : nsIDOMWindow_GetSelection(JSContext *cx, unsigned argc, jsval *vp)
367 : {
368 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
369 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
370 0 : if (!obj)
371 0 : return JS_FALSE;
372 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
373 : nsIDOMWindow *self;
374 0 : xpc_qsSelfRef selfref;
375 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
376 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
377 0 : return JS_FALSE;
378 : nsresult rv;
379 0 : nsCOMPtr<nsISelection> result;
380 0 : rv = self->GetSelection(getter_AddRefs(result));
381 0 : if (NS_FAILED(rv))
382 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
383 0 : if (!result) {
384 0 : *vp = JSVAL_NULL;
385 0 : return JS_TRUE;
386 : }
387 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
388 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
389 0 : return JS_TRUE;
390 : }
391 : // After this point do not use 'result'!
392 0 : qsObjectHelper helper(result, cache);
393 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISelection), &interfaces[k_nsISelection], vp);
394 : }
395 :
396 : static JSBool
397 0 : nsIDOMWindow_ScrollByLines(JSContext *cx, unsigned argc, jsval *vp)
398 : {
399 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
400 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
401 0 : if (!obj)
402 0 : return JS_FALSE;
403 : nsIDOMWindow *self;
404 0 : xpc_qsSelfRef selfref;
405 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
406 0 : return JS_FALSE;
407 0 : if (argc < 1)
408 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
409 0 : jsval *argv = JS_ARGV(cx, vp);
410 : int32_t arg0;
411 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
412 0 : return JS_FALSE;
413 : nsresult rv;
414 0 : rv = self->ScrollByLines(arg0);
415 0 : if (NS_FAILED(rv))
416 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
417 0 : *vp = JSVAL_VOID;
418 0 : return JS_TRUE;
419 : }
420 :
421 : static JSBool
422 0 : nsIDOMWindow_GetComputedStyle(JSContext *cx, unsigned argc, jsval *vp)
423 : {
424 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
425 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
426 0 : if (!obj)
427 0 : return JS_FALSE;
428 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
429 : nsIDOMWindow *self;
430 0 : xpc_qsSelfRef selfref;
431 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
432 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
433 0 : return JS_FALSE;
434 0 : if (argc < 1)
435 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
436 0 : jsval *argv = JS_ARGV(cx, vp);
437 : nsresult rv;
438 : nsIDOMElement *arg0;
439 0 : xpc_qsSelfRef arg0ref;
440 0 : rv = xpc_qsUnwrapArg<nsIDOMElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
441 0 : if (NS_FAILED(rv)) {
442 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
443 0 : return JS_FALSE;
444 : }
445 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
446 : xpc_qsDOMString::eDefaultNullBehavior,
447 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
448 0 : if (!arg1.IsValid())
449 0 : return JS_FALSE;
450 0 : nsCOMPtr<nsIDOMCSSStyleDeclaration> result;
451 0 : rv = self->GetComputedStyle(arg0, arg1, getter_AddRefs(result));
452 0 : if (NS_FAILED(rv))
453 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
454 0 : if (!result) {
455 0 : *vp = JSVAL_NULL;
456 0 : return JS_TRUE;
457 : }
458 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
459 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
460 0 : return JS_TRUE;
461 : }
462 : // After this point do not use 'result'!
463 0 : qsObjectHelper helper(result, cache);
464 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSStyleDeclaration), &interfaces[k_nsIDOMCSSStyleDeclaration], vp);
465 : }
466 :
467 : static JSBool
468 0 : nsIDOMWindow_GetSessionStorage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
469 : {
470 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
471 0 : JSObject *callee = nsnull;
472 : nsIDOMWindow *self;
473 0 : xpc_qsSelfRef selfref;
474 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
475 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
476 0 : return JS_FALSE;
477 : nsresult rv;
478 0 : nsCOMPtr<nsIDOMStorage> result;
479 0 : rv = self->GetSessionStorage(getter_AddRefs(result));
480 0 : if (NS_FAILED(rv))
481 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
482 0 : if (!result) {
483 0 : *vp = JSVAL_NULL;
484 0 : return JS_TRUE;
485 : }
486 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
487 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
488 0 : return JS_TRUE;
489 : }
490 : // After this point do not use 'result'!
491 0 : qsObjectHelper helper(result, cache);
492 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMStorage), &interfaces[k_nsIDOMStorage], vp);
493 : }
494 :
495 : static JSBool
496 0 : nsIDOMWindow_GetLocalStorage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
497 : {
498 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
499 0 : JSObject *callee = nsnull;
500 : nsIDOMWindow *self;
501 0 : xpc_qsSelfRef selfref;
502 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
503 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
504 0 : return JS_FALSE;
505 : nsresult rv;
506 0 : nsCOMPtr<nsIDOMStorage> result;
507 0 : rv = self->GetLocalStorage(getter_AddRefs(result));
508 0 : if (NS_FAILED(rv))
509 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
510 0 : if (!result) {
511 0 : *vp = JSVAL_NULL;
512 0 : return JS_TRUE;
513 : }
514 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
515 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
516 0 : return JS_TRUE;
517 : }
518 : // After this point do not use 'result'!
519 0 : qsObjectHelper helper(result, cache);
520 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMStorage), &interfaces[k_nsIDOMStorage], vp);
521 : }
522 :
523 : static JSBool
524 0 : nsIDOMWindow_GetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
525 : {
526 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
527 : nsIDOMWindow *self;
528 0 : xpc_qsSelfRef selfref;
529 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
530 0 : return JS_FALSE;
531 0 : if (!self) {
532 0 : *vp = JSVAL_NULL;
533 0 : return JS_TRUE;
534 : }
535 : nsresult rv;
536 0 : rv = self->GetOnmouseenter(cx, vp);
537 0 : if (NS_FAILED(rv))
538 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
539 0 : return JS_TRUE;
540 : }
541 :
542 : static JSBool
543 0 : nsIDOMWindow_SetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
544 : {
545 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
546 : nsIDOMWindow *self;
547 0 : xpc_qsSelfRef selfref;
548 0 : JS::AutoValueRooter tvr(cx);
549 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
550 0 : return JS_FALSE;
551 0 : if (!self) {
552 0 : return JS_TRUE;
553 : }
554 0 : jsval arg0 = *vp;
555 : nsresult rv;
556 0 : rv = self->SetOnmouseenter(cx, arg0);
557 0 : if (NS_FAILED(rv))
558 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
559 0 : return JS_TRUE;
560 : }
561 :
562 : static JSBool
563 0 : nsIDOMWindow_GetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
564 : {
565 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
566 : nsIDOMWindow *self;
567 0 : xpc_qsSelfRef selfref;
568 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
569 0 : return JS_FALSE;
570 0 : if (!self) {
571 0 : *vp = JSVAL_NULL;
572 0 : return JS_TRUE;
573 : }
574 : nsresult rv;
575 0 : rv = self->GetOnmouseleave(cx, vp);
576 0 : if (NS_FAILED(rv))
577 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
578 0 : return JS_TRUE;
579 : }
580 :
581 : static JSBool
582 0 : nsIDOMWindow_SetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
583 : {
584 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
585 : nsIDOMWindow *self;
586 0 : xpc_qsSelfRef selfref;
587 0 : JS::AutoValueRooter tvr(cx);
588 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
589 0 : return JS_FALSE;
590 0 : if (!self) {
591 0 : return JS_TRUE;
592 : }
593 0 : jsval arg0 = *vp;
594 : nsresult rv;
595 0 : rv = self->SetOnmouseleave(cx, arg0);
596 0 : if (NS_FAILED(rv))
597 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
598 0 : return JS_TRUE;
599 : }
600 :
601 : // === interface nsIDOMWindow_globalStorage
602 :
603 : static JSBool
604 0 : nsIDOMWindow_globalStorage_GetGlobalStorage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
605 : {
606 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
607 0 : JSObject *callee = nsnull;
608 : nsIDOMWindow_globalStorage *self;
609 0 : xpc_qsSelfRef selfref;
610 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
611 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
612 0 : return JS_FALSE;
613 : nsresult rv;
614 0 : nsCOMPtr<nsIDOMStorageList> result;
615 0 : rv = self->GetGlobalStorage(getter_AddRefs(result));
616 0 : if (NS_FAILED(rv))
617 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
618 0 : if (!result) {
619 0 : *vp = JSVAL_NULL;
620 0 : return JS_TRUE;
621 : }
622 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
623 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
624 0 : return JS_TRUE;
625 : }
626 : // After this point do not use 'result'!
627 0 : qsObjectHelper helper(result, cache);
628 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMStorageList), &interfaces[k_nsIDOMStorageList], vp);
629 : }
630 :
631 : // === interface nsIDOMJSWindow
632 :
633 : static JSBool
634 0 : nsIDOMJSWindow_Dump(JSContext *cx, unsigned argc, jsval *vp)
635 : {
636 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
637 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
638 0 : if (!obj)
639 0 : return JS_FALSE;
640 : nsIDOMJSWindow *self;
641 0 : xpc_qsSelfRef selfref;
642 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
643 0 : return JS_FALSE;
644 0 : if (argc < 1)
645 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
646 0 : jsval *argv = JS_ARGV(cx, vp);
647 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
648 : xpc_qsDOMString::eDefaultNullBehavior,
649 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
650 0 : if (!arg0.IsValid())
651 0 : return JS_FALSE;
652 : nsresult rv;
653 0 : rv = self->Dump(arg0);
654 0 : if (NS_FAILED(rv))
655 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
656 0 : *vp = JSVAL_VOID;
657 0 : return JS_TRUE;
658 : }
659 :
660 : // === interface nsIDOMScreen
661 :
662 : static JSBool
663 0 : nsIDOMScreen_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
664 : {
665 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
666 : nsIDOMScreen *self;
667 0 : xpc_qsSelfRef selfref;
668 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
669 0 : return JS_FALSE;
670 : nsresult rv;
671 : PRInt32 result;
672 0 : rv = self->GetTop(&result);
673 0 : if (NS_FAILED(rv))
674 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
675 0 : *vp = INT_TO_JSVAL(result);
676 0 : return JS_TRUE;
677 : }
678 :
679 : static JSBool
680 0 : nsIDOMScreen_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
681 : {
682 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
683 : nsIDOMScreen *self;
684 0 : xpc_qsSelfRef selfref;
685 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
686 0 : return JS_FALSE;
687 : nsresult rv;
688 : PRInt32 result;
689 0 : rv = self->GetHeight(&result);
690 0 : if (NS_FAILED(rv))
691 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
692 0 : *vp = INT_TO_JSVAL(result);
693 0 : return JS_TRUE;
694 : }
695 :
696 : static JSBool
697 0 : nsIDOMScreen_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
698 : {
699 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
700 : nsIDOMScreen *self;
701 0 : xpc_qsSelfRef selfref;
702 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
703 0 : return JS_FALSE;
704 : nsresult rv;
705 : PRInt32 result;
706 0 : rv = self->GetWidth(&result);
707 0 : if (NS_FAILED(rv))
708 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
709 0 : *vp = INT_TO_JSVAL(result);
710 0 : return JS_TRUE;
711 : }
712 :
713 : static JSBool
714 0 : nsIDOMScreen_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
715 : {
716 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
717 : nsIDOMScreen *self;
718 0 : xpc_qsSelfRef selfref;
719 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
720 0 : return JS_FALSE;
721 : nsresult rv;
722 : PRInt32 result;
723 0 : rv = self->GetLeft(&result);
724 0 : if (NS_FAILED(rv))
725 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
726 0 : *vp = INT_TO_JSVAL(result);
727 0 : return JS_TRUE;
728 : }
729 :
730 : // === interface nsIDOMClientRect
731 :
732 : static JSBool
733 0 : nsIDOMClientRect_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
734 : {
735 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
736 : nsIDOMClientRect *self;
737 0 : xpc_qsSelfRef selfref;
738 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
739 0 : return JS_FALSE;
740 : nsresult rv;
741 : float result;
742 0 : rv = self->GetLeft(&result);
743 0 : if (NS_FAILED(rv))
744 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
745 0 : return JS_NewNumberValue(cx, result, vp);
746 : }
747 :
748 : static JSBool
749 0 : nsIDOMClientRect_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
750 : {
751 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
752 : nsIDOMClientRect *self;
753 0 : xpc_qsSelfRef selfref;
754 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
755 0 : return JS_FALSE;
756 : nsresult rv;
757 : float result;
758 0 : rv = self->GetTop(&result);
759 0 : if (NS_FAILED(rv))
760 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
761 0 : return JS_NewNumberValue(cx, result, vp);
762 : }
763 :
764 : static JSBool
765 0 : nsIDOMClientRect_GetRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
766 : {
767 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
768 : nsIDOMClientRect *self;
769 0 : xpc_qsSelfRef selfref;
770 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
771 0 : return JS_FALSE;
772 : nsresult rv;
773 : float result;
774 0 : rv = self->GetRight(&result);
775 0 : if (NS_FAILED(rv))
776 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
777 0 : return JS_NewNumberValue(cx, result, vp);
778 : }
779 :
780 : static JSBool
781 0 : nsIDOMClientRect_GetBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
782 : {
783 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
784 : nsIDOMClientRect *self;
785 0 : xpc_qsSelfRef selfref;
786 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
787 0 : return JS_FALSE;
788 : nsresult rv;
789 : float result;
790 0 : rv = self->GetBottom(&result);
791 0 : if (NS_FAILED(rv))
792 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
793 0 : return JS_NewNumberValue(cx, result, vp);
794 : }
795 :
796 : static JSBool
797 0 : nsIDOMClientRect_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
798 : {
799 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
800 : nsIDOMClientRect *self;
801 0 : xpc_qsSelfRef selfref;
802 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
803 0 : return JS_FALSE;
804 : nsresult rv;
805 : float result;
806 0 : rv = self->GetWidth(&result);
807 0 : if (NS_FAILED(rv))
808 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
809 0 : return JS_NewNumberValue(cx, result, vp);
810 : }
811 :
812 : static JSBool
813 0 : nsIDOMClientRect_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
814 : {
815 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
816 : nsIDOMClientRect *self;
817 0 : xpc_qsSelfRef selfref;
818 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
819 0 : return JS_FALSE;
820 : nsresult rv;
821 : float result;
822 0 : rv = self->GetHeight(&result);
823 0 : if (NS_FAILED(rv))
824 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
825 0 : return JS_NewNumberValue(cx, result, vp);
826 : }
827 :
828 : // === interface nsIDOMClientRectList
829 :
830 : static JSBool
831 0 : nsIDOMClientRectList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
832 : {
833 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
834 : nsIDOMClientRectList *self;
835 0 : xpc_qsSelfRef selfref;
836 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
837 0 : return JS_FALSE;
838 : nsresult rv;
839 : PRUint32 result;
840 0 : rv = self->GetLength(&result);
841 0 : if (NS_FAILED(rv))
842 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
843 0 : *vp = UINT_TO_JSVAL(result);
844 0 : return JS_TRUE;
845 : }
846 :
847 : static JSBool
848 0 : nsIDOMClientRectList_Item(JSContext *cx, unsigned argc, jsval *vp)
849 : {
850 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
851 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
852 0 : if (!obj)
853 0 : return JS_FALSE;
854 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
855 : nsIDOMClientRectList *self;
856 0 : xpc_qsSelfRef selfref;
857 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
858 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
859 0 : return JS_FALSE;
860 0 : if (argc < 1)
861 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
862 0 : jsval *argv = JS_ARGV(cx, vp);
863 : uint32_t arg0;
864 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
865 0 : return JS_FALSE;
866 : nsresult rv;
867 0 : nsCOMPtr<nsIDOMClientRect> result;
868 0 : rv = self->Item(arg0, getter_AddRefs(result));
869 0 : if (NS_FAILED(rv))
870 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
871 0 : if (!result) {
872 0 : *vp = JSVAL_NULL;
873 0 : return JS_TRUE;
874 : }
875 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
876 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
877 0 : return JS_TRUE;
878 : }
879 : // After this point do not use 'result'!
880 0 : qsObjectHelper helper(result, cache);
881 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
882 : }
883 :
884 : // === interface nsIDOMPaintRequest
885 :
886 : static JSBool
887 0 : nsIDOMPaintRequest_GetClientRect(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
888 : {
889 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
890 0 : JSObject *callee = nsnull;
891 : nsIDOMPaintRequest *self;
892 0 : xpc_qsSelfRef selfref;
893 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
894 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
895 0 : return JS_FALSE;
896 : nsresult rv;
897 0 : nsCOMPtr<nsIDOMClientRect> result;
898 0 : rv = self->GetClientRect(getter_AddRefs(result));
899 0 : if (NS_FAILED(rv))
900 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
901 0 : if (!result) {
902 0 : *vp = JSVAL_NULL;
903 0 : return JS_TRUE;
904 : }
905 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
906 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
907 0 : return JS_TRUE;
908 : }
909 : // After this point do not use 'result'!
910 0 : qsObjectHelper helper(result, cache);
911 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
912 : }
913 :
914 : static JSBool
915 0 : nsIDOMPaintRequest_GetReason(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
916 : {
917 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
918 : nsIDOMPaintRequest *self;
919 0 : xpc_qsSelfRef selfref;
920 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
921 0 : return JS_FALSE;
922 : nsresult rv;
923 0 : nsString result;
924 0 : rv = self->GetReason(result);
925 0 : if (NS_FAILED(rv))
926 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
927 0 : return xpc::StringToJsval(cx, result, vp);
928 : }
929 :
930 : // === interface nsIDOMPaintRequestList
931 :
932 : static JSBool
933 0 : nsIDOMPaintRequestList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
934 : {
935 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
936 : nsIDOMPaintRequestList *self;
937 0 : xpc_qsSelfRef selfref;
938 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
939 0 : return JS_FALSE;
940 : nsresult rv;
941 : PRUint32 result;
942 0 : rv = self->GetLength(&result);
943 0 : if (NS_FAILED(rv))
944 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
945 0 : *vp = UINT_TO_JSVAL(result);
946 0 : return JS_TRUE;
947 : }
948 :
949 : static JSBool
950 0 : nsIDOMPaintRequestList_Item(JSContext *cx, unsigned argc, jsval *vp)
951 : {
952 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
953 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
954 0 : if (!obj)
955 0 : return JS_FALSE;
956 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
957 : nsIDOMPaintRequestList *self;
958 0 : xpc_qsSelfRef selfref;
959 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
960 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
961 0 : return JS_FALSE;
962 0 : if (argc < 1)
963 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
964 0 : jsval *argv = JS_ARGV(cx, vp);
965 : uint32_t arg0;
966 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
967 0 : return JS_FALSE;
968 : nsresult rv;
969 0 : nsCOMPtr<nsIDOMPaintRequest> result;
970 0 : rv = self->Item(arg0, getter_AddRefs(result));
971 0 : if (NS_FAILED(rv))
972 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
973 0 : if (!result) {
974 0 : *vp = JSVAL_NULL;
975 0 : return JS_TRUE;
976 : }
977 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
978 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
979 0 : return JS_TRUE;
980 : }
981 : // After this point do not use 'result'!
982 0 : qsObjectHelper helper(result, cache);
983 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMPaintRequest), &interfaces[k_nsIDOMPaintRequest], vp);
984 : }
985 :
986 : // === interface nsIDOMCanvasRenderingContext2D
987 :
988 : static JSBool
989 0 : nsIDOMCanvasRenderingContext2D_GetCanvas(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
990 : {
991 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
992 0 : JSObject *callee = nsnull;
993 : nsIDOMCanvasRenderingContext2D *self;
994 0 : xpc_qsSelfRef selfref;
995 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
996 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
997 0 : return JS_FALSE;
998 : nsresult rv;
999 0 : nsCOMPtr<nsIDOMHTMLCanvasElement> result;
1000 0 : rv = self->GetCanvas(getter_AddRefs(result));
1001 0 : if (NS_FAILED(rv))
1002 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1003 0 : if (!result) {
1004 0 : *vp = JSVAL_NULL;
1005 0 : return JS_TRUE;
1006 : }
1007 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
1008 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
1009 0 : return JS_TRUE;
1010 : }
1011 : // After this point do not use 'result'!
1012 0 : qsObjectHelper helper(result, cache);
1013 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCanvasElement), &interfaces[k_nsIDOMHTMLCanvasElement], vp);
1014 : }
1015 :
1016 : static JSBool
1017 0 : nsIDOMCanvasRenderingContext2D_Save(JSContext *cx, unsigned argc, jsval *vp)
1018 : {
1019 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1020 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1021 0 : if (!obj)
1022 0 : return JS_FALSE;
1023 : nsIDOMCanvasRenderingContext2D *self;
1024 0 : xpc_qsSelfRef selfref;
1025 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1026 0 : return JS_FALSE;
1027 : nsresult rv;
1028 0 : rv = self->Save();
1029 0 : if (NS_FAILED(rv))
1030 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1031 0 : *vp = JSVAL_VOID;
1032 0 : return JS_TRUE;
1033 : }
1034 :
1035 : static JSBool
1036 0 : nsIDOMCanvasRenderingContext2D_Restore(JSContext *cx, unsigned argc, jsval *vp)
1037 : {
1038 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1039 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1040 0 : if (!obj)
1041 0 : return JS_FALSE;
1042 : nsIDOMCanvasRenderingContext2D *self;
1043 0 : xpc_qsSelfRef selfref;
1044 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1045 0 : return JS_FALSE;
1046 : nsresult rv;
1047 0 : rv = self->Restore();
1048 0 : if (NS_FAILED(rv))
1049 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1050 0 : *vp = JSVAL_VOID;
1051 0 : return JS_TRUE;
1052 : }
1053 :
1054 : static JSBool
1055 0 : nsIDOMCanvasRenderingContext2D_Scale(JSContext *cx, unsigned argc, jsval *vp)
1056 : {
1057 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1058 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1059 0 : if (!obj)
1060 0 : return JS_FALSE;
1061 : nsIDOMCanvasRenderingContext2D *self;
1062 0 : xpc_qsSelfRef selfref;
1063 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1064 0 : return JS_FALSE;
1065 0 : if (argc < 2)
1066 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1067 0 : jsval *argv = JS_ARGV(cx, vp);
1068 : double arg0_dbl;
1069 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1070 0 : return JS_FALSE;
1071 0 : float arg0 = (float) arg0_dbl;
1072 : double arg1_dbl;
1073 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1074 0 : return JS_FALSE;
1075 0 : float arg1 = (float) arg1_dbl;
1076 : nsresult rv;
1077 0 : rv = self->Scale(arg0, arg1);
1078 0 : if (NS_FAILED(rv))
1079 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1080 0 : *vp = JSVAL_VOID;
1081 0 : return JS_TRUE;
1082 : }
1083 :
1084 : static JSBool
1085 0 : nsIDOMCanvasRenderingContext2D_Rotate(JSContext *cx, unsigned argc, jsval *vp)
1086 : {
1087 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1088 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1089 0 : if (!obj)
1090 0 : return JS_FALSE;
1091 : nsIDOMCanvasRenderingContext2D *self;
1092 0 : xpc_qsSelfRef selfref;
1093 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1094 0 : return JS_FALSE;
1095 0 : if (argc < 1)
1096 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1097 0 : jsval *argv = JS_ARGV(cx, vp);
1098 : double arg0_dbl;
1099 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1100 0 : return JS_FALSE;
1101 0 : float arg0 = (float) arg0_dbl;
1102 : nsresult rv;
1103 0 : rv = self->Rotate(arg0);
1104 0 : if (NS_FAILED(rv))
1105 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1106 0 : *vp = JSVAL_VOID;
1107 0 : return JS_TRUE;
1108 : }
1109 :
1110 : static JSBool
1111 0 : nsIDOMCanvasRenderingContext2D_Translate(JSContext *cx, unsigned argc, jsval *vp)
1112 : {
1113 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1114 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1115 0 : if (!obj)
1116 0 : return JS_FALSE;
1117 : nsIDOMCanvasRenderingContext2D *self;
1118 0 : xpc_qsSelfRef selfref;
1119 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1120 0 : return JS_FALSE;
1121 0 : if (argc < 2)
1122 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1123 0 : jsval *argv = JS_ARGV(cx, vp);
1124 : double arg0_dbl;
1125 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1126 0 : return JS_FALSE;
1127 0 : float arg0 = (float) arg0_dbl;
1128 : double arg1_dbl;
1129 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1130 0 : return JS_FALSE;
1131 0 : float arg1 = (float) arg1_dbl;
1132 : nsresult rv;
1133 0 : rv = self->Translate(arg0, arg1);
1134 0 : if (NS_FAILED(rv))
1135 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1136 0 : *vp = JSVAL_VOID;
1137 0 : return JS_TRUE;
1138 : }
1139 :
1140 : static JSBool
1141 0 : nsIDOMCanvasRenderingContext2D_Transform(JSContext *cx, unsigned argc, jsval *vp)
1142 : {
1143 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1144 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1145 0 : if (!obj)
1146 0 : return JS_FALSE;
1147 : nsIDOMCanvasRenderingContext2D *self;
1148 0 : xpc_qsSelfRef selfref;
1149 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1150 0 : return JS_FALSE;
1151 0 : if (argc < 6)
1152 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1153 0 : jsval *argv = JS_ARGV(cx, vp);
1154 : double arg0_dbl;
1155 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1156 0 : return JS_FALSE;
1157 0 : float arg0 = (float) arg0_dbl;
1158 : double arg1_dbl;
1159 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1160 0 : return JS_FALSE;
1161 0 : float arg1 = (float) arg1_dbl;
1162 : double arg2_dbl;
1163 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1164 0 : return JS_FALSE;
1165 0 : float arg2 = (float) arg2_dbl;
1166 : double arg3_dbl;
1167 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1168 0 : return JS_FALSE;
1169 0 : float arg3 = (float) arg3_dbl;
1170 : double arg4_dbl;
1171 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
1172 0 : return JS_FALSE;
1173 0 : float arg4 = (float) arg4_dbl;
1174 : double arg5_dbl;
1175 0 : if (!JS_ValueToNumber(cx, argv[5], &arg5_dbl))
1176 0 : return JS_FALSE;
1177 0 : float arg5 = (float) arg5_dbl;
1178 : nsresult rv;
1179 0 : rv = self->Transform(arg0, arg1, arg2, arg3, arg4, arg5);
1180 0 : if (NS_FAILED(rv))
1181 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1182 0 : *vp = JSVAL_VOID;
1183 0 : return JS_TRUE;
1184 : }
1185 :
1186 : static JSBool
1187 0 : nsIDOMCanvasRenderingContext2D_SetTransform(JSContext *cx, unsigned argc, jsval *vp)
1188 : {
1189 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1190 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1191 0 : if (!obj)
1192 0 : return JS_FALSE;
1193 : nsIDOMCanvasRenderingContext2D *self;
1194 0 : xpc_qsSelfRef selfref;
1195 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1196 0 : return JS_FALSE;
1197 0 : if (argc < 6)
1198 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1199 0 : jsval *argv = JS_ARGV(cx, vp);
1200 : double arg0_dbl;
1201 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1202 0 : return JS_FALSE;
1203 0 : float arg0 = (float) arg0_dbl;
1204 : double arg1_dbl;
1205 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1206 0 : return JS_FALSE;
1207 0 : float arg1 = (float) arg1_dbl;
1208 : double arg2_dbl;
1209 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1210 0 : return JS_FALSE;
1211 0 : float arg2 = (float) arg2_dbl;
1212 : double arg3_dbl;
1213 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1214 0 : return JS_FALSE;
1215 0 : float arg3 = (float) arg3_dbl;
1216 : double arg4_dbl;
1217 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
1218 0 : return JS_FALSE;
1219 0 : float arg4 = (float) arg4_dbl;
1220 : double arg5_dbl;
1221 0 : if (!JS_ValueToNumber(cx, argv[5], &arg5_dbl))
1222 0 : return JS_FALSE;
1223 0 : float arg5 = (float) arg5_dbl;
1224 : nsresult rv;
1225 0 : rv = self->SetTransform(arg0, arg1, arg2, arg3, arg4, arg5);
1226 0 : if (NS_FAILED(rv))
1227 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1228 0 : *vp = JSVAL_VOID;
1229 0 : return JS_TRUE;
1230 : }
1231 :
1232 : static JSBool
1233 0 : nsIDOMCanvasRenderingContext2D_GetMozCurrentTransform(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1234 : {
1235 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1236 : nsIDOMCanvasRenderingContext2D *self;
1237 0 : xpc_qsSelfRef selfref;
1238 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1239 0 : return JS_FALSE;
1240 : nsresult rv;
1241 0 : rv = self->GetMozCurrentTransform(cx, vp);
1242 0 : if (NS_FAILED(rv))
1243 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1244 0 : return JS_TRUE;
1245 : }
1246 :
1247 : static JSBool
1248 0 : nsIDOMCanvasRenderingContext2D_SetMozCurrentTransform(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1249 : {
1250 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1251 : nsIDOMCanvasRenderingContext2D *self;
1252 0 : xpc_qsSelfRef selfref;
1253 0 : JS::AutoValueRooter tvr(cx);
1254 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1255 0 : return JS_FALSE;
1256 0 : jsval arg0 = *vp;
1257 : nsresult rv;
1258 0 : rv = self->SetMozCurrentTransform(cx, arg0);
1259 0 : if (NS_FAILED(rv))
1260 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1261 0 : return JS_TRUE;
1262 : }
1263 :
1264 : static JSBool
1265 0 : nsIDOMCanvasRenderingContext2D_GetMozCurrentTransformInverse(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1266 : {
1267 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1268 : nsIDOMCanvasRenderingContext2D *self;
1269 0 : xpc_qsSelfRef selfref;
1270 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1271 0 : return JS_FALSE;
1272 : nsresult rv;
1273 0 : rv = self->GetMozCurrentTransformInverse(cx, vp);
1274 0 : if (NS_FAILED(rv))
1275 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1276 0 : return JS_TRUE;
1277 : }
1278 :
1279 : static JSBool
1280 0 : nsIDOMCanvasRenderingContext2D_SetMozCurrentTransformInverse(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 0 : jsval arg0 = *vp;
1289 : nsresult rv;
1290 0 : rv = self->SetMozCurrentTransformInverse(cx, arg0);
1291 0 : if (NS_FAILED(rv))
1292 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1293 0 : return JS_TRUE;
1294 : }
1295 :
1296 : static JSBool
1297 0 : nsIDOMCanvasRenderingContext2D_GetGlobalAlpha(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1298 : {
1299 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1300 : nsIDOMCanvasRenderingContext2D *self;
1301 0 : xpc_qsSelfRef selfref;
1302 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1303 0 : return JS_FALSE;
1304 : nsresult rv;
1305 : float result;
1306 0 : rv = self->GetGlobalAlpha(&result);
1307 0 : if (NS_FAILED(rv))
1308 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1309 0 : return JS_NewNumberValue(cx, result, vp);
1310 : }
1311 :
1312 : static JSBool
1313 0 : nsIDOMCanvasRenderingContext2D_SetGlobalAlpha(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1314 : {
1315 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1316 : nsIDOMCanvasRenderingContext2D *self;
1317 0 : xpc_qsSelfRef selfref;
1318 0 : JS::AutoValueRooter tvr(cx);
1319 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1320 0 : return JS_FALSE;
1321 : double arg0_dbl;
1322 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1323 0 : return JS_FALSE;
1324 0 : float arg0 = (float) arg0_dbl;
1325 : nsresult rv;
1326 0 : rv = self->SetGlobalAlpha(arg0);
1327 0 : if (NS_FAILED(rv))
1328 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1329 0 : return JS_TRUE;
1330 : }
1331 :
1332 : static JSBool
1333 0 : nsIDOMCanvasRenderingContext2D_GetGlobalCompositeOperation(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1334 : {
1335 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1336 : nsIDOMCanvasRenderingContext2D *self;
1337 0 : xpc_qsSelfRef selfref;
1338 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1339 0 : return JS_FALSE;
1340 : nsresult rv;
1341 0 : nsString result;
1342 0 : rv = self->GetGlobalCompositeOperation(result);
1343 0 : if (NS_FAILED(rv))
1344 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1345 0 : return xpc::StringToJsval(cx, result, vp);
1346 : }
1347 :
1348 : static JSBool
1349 0 : nsIDOMCanvasRenderingContext2D_SetGlobalCompositeOperation(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1350 : {
1351 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1352 : nsIDOMCanvasRenderingContext2D *self;
1353 0 : xpc_qsSelfRef selfref;
1354 0 : JS::AutoValueRooter tvr(cx);
1355 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1356 0 : return JS_FALSE;
1357 : xpc_qsDOMString arg0(cx, *vp, vp,
1358 : xpc_qsDOMString::eDefaultNullBehavior,
1359 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1360 0 : if (!arg0.IsValid())
1361 0 : return JS_FALSE;
1362 : nsresult rv;
1363 0 : rv = self->SetGlobalCompositeOperation(arg0);
1364 0 : if (NS_FAILED(rv))
1365 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1366 0 : return JS_TRUE;
1367 : }
1368 :
1369 : static JSBool
1370 0 : nsIDOMCanvasRenderingContext2D_GetMozFillRule(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1371 : {
1372 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1373 : nsIDOMCanvasRenderingContext2D *self;
1374 0 : xpc_qsSelfRef selfref;
1375 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1376 0 : return JS_FALSE;
1377 : nsresult rv;
1378 0 : nsString result;
1379 0 : rv = self->GetMozFillRule(result);
1380 0 : if (NS_FAILED(rv))
1381 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1382 0 : return xpc::StringToJsval(cx, result, vp);
1383 : }
1384 :
1385 : static JSBool
1386 0 : nsIDOMCanvasRenderingContext2D_SetMozFillRule(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1387 : {
1388 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1389 : nsIDOMCanvasRenderingContext2D *self;
1390 0 : xpc_qsSelfRef selfref;
1391 0 : JS::AutoValueRooter tvr(cx);
1392 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1393 0 : return JS_FALSE;
1394 : xpc_qsDOMString arg0(cx, *vp, vp,
1395 : xpc_qsDOMString::eDefaultNullBehavior,
1396 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1397 0 : if (!arg0.IsValid())
1398 0 : return JS_FALSE;
1399 : nsresult rv;
1400 0 : rv = self->SetMozFillRule(arg0);
1401 0 : if (NS_FAILED(rv))
1402 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1403 0 : return JS_TRUE;
1404 : }
1405 :
1406 : static JSBool
1407 0 : nsIDOMCanvasRenderingContext2D_CreateLinearGradient(JSContext *cx, unsigned argc, jsval *vp)
1408 : {
1409 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1410 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1411 0 : if (!obj)
1412 0 : return JS_FALSE;
1413 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
1414 : nsIDOMCanvasRenderingContext2D *self;
1415 0 : xpc_qsSelfRef selfref;
1416 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
1417 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
1418 0 : return JS_FALSE;
1419 0 : if (argc < 4)
1420 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1421 0 : jsval *argv = JS_ARGV(cx, vp);
1422 : double arg0_dbl;
1423 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1424 0 : return JS_FALSE;
1425 0 : float arg0 = (float) arg0_dbl;
1426 : double arg1_dbl;
1427 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1428 0 : return JS_FALSE;
1429 0 : float arg1 = (float) arg1_dbl;
1430 : double arg2_dbl;
1431 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1432 0 : return JS_FALSE;
1433 0 : float arg2 = (float) arg2_dbl;
1434 : double arg3_dbl;
1435 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1436 0 : return JS_FALSE;
1437 0 : float arg3 = (float) arg3_dbl;
1438 : nsresult rv;
1439 0 : nsCOMPtr<nsIDOMCanvasGradient> result;
1440 0 : rv = self->CreateLinearGradient(arg0, arg1, arg2, arg3, getter_AddRefs(result));
1441 0 : if (NS_FAILED(rv))
1442 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1443 0 : if (!result) {
1444 0 : *vp = JSVAL_NULL;
1445 0 : return JS_TRUE;
1446 : }
1447 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
1448 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
1449 0 : return JS_TRUE;
1450 : }
1451 : // After this point do not use 'result'!
1452 0 : qsObjectHelper helper(result, cache);
1453 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCanvasGradient), &interfaces[k_nsIDOMCanvasGradient], vp);
1454 : }
1455 :
1456 : static JSBool
1457 0 : nsIDOMCanvasRenderingContext2D_CreateRadialGradient(JSContext *cx, unsigned argc, jsval *vp)
1458 : {
1459 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1460 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1461 0 : if (!obj)
1462 0 : return JS_FALSE;
1463 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
1464 : nsIDOMCanvasRenderingContext2D *self;
1465 0 : xpc_qsSelfRef selfref;
1466 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
1467 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
1468 0 : return JS_FALSE;
1469 0 : if (argc < 6)
1470 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1471 0 : jsval *argv = JS_ARGV(cx, vp);
1472 : double arg0_dbl;
1473 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1474 0 : return JS_FALSE;
1475 0 : float arg0 = (float) arg0_dbl;
1476 : double arg1_dbl;
1477 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1478 0 : return JS_FALSE;
1479 0 : float arg1 = (float) arg1_dbl;
1480 : double arg2_dbl;
1481 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1482 0 : return JS_FALSE;
1483 0 : float arg2 = (float) arg2_dbl;
1484 : double arg3_dbl;
1485 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1486 0 : return JS_FALSE;
1487 0 : float arg3 = (float) arg3_dbl;
1488 : double arg4_dbl;
1489 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
1490 0 : return JS_FALSE;
1491 0 : float arg4 = (float) arg4_dbl;
1492 : double arg5_dbl;
1493 0 : if (!JS_ValueToNumber(cx, argv[5], &arg5_dbl))
1494 0 : return JS_FALSE;
1495 0 : float arg5 = (float) arg5_dbl;
1496 : nsresult rv;
1497 0 : nsCOMPtr<nsIDOMCanvasGradient> result;
1498 0 : rv = self->CreateRadialGradient(arg0, arg1, arg2, arg3, arg4, arg5, getter_AddRefs(result));
1499 0 : if (NS_FAILED(rv))
1500 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1501 0 : if (!result) {
1502 0 : *vp = JSVAL_NULL;
1503 0 : return JS_TRUE;
1504 : }
1505 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
1506 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
1507 0 : return JS_TRUE;
1508 : }
1509 : // After this point do not use 'result'!
1510 0 : qsObjectHelper helper(result, cache);
1511 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCanvasGradient), &interfaces[k_nsIDOMCanvasGradient], vp);
1512 : }
1513 :
1514 : static JSBool
1515 0 : nsIDOMCanvasRenderingContext2D_CreatePattern(JSContext *cx, unsigned argc, jsval *vp)
1516 : {
1517 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1518 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1519 0 : if (!obj)
1520 0 : return JS_FALSE;
1521 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
1522 : nsIDOMCanvasRenderingContext2D *self;
1523 0 : xpc_qsSelfRef selfref;
1524 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
1525 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
1526 0 : return JS_FALSE;
1527 0 : if (argc < 2)
1528 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1529 0 : jsval *argv = JS_ARGV(cx, vp);
1530 : nsresult rv;
1531 : nsIDOMHTMLElement *arg0;
1532 0 : xpc_qsSelfRef arg0ref;
1533 0 : rv = xpc_qsUnwrapArg<nsIDOMHTMLElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
1534 0 : if (NS_FAILED(rv)) {
1535 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
1536 0 : return JS_FALSE;
1537 : }
1538 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
1539 : xpc_qsDOMString::eDefaultNullBehavior,
1540 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1541 0 : if (!arg1.IsValid())
1542 0 : return JS_FALSE;
1543 0 : nsCOMPtr<nsIDOMCanvasPattern> result;
1544 0 : rv = self->CreatePattern(arg0, arg1, getter_AddRefs(result));
1545 0 : if (NS_FAILED(rv))
1546 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1547 0 : if (!result) {
1548 0 : *vp = JSVAL_NULL;
1549 0 : return JS_TRUE;
1550 : }
1551 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
1552 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
1553 0 : return JS_TRUE;
1554 : }
1555 : // After this point do not use 'result'!
1556 0 : qsObjectHelper helper(result, cache);
1557 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCanvasPattern), &interfaces[k_nsIDOMCanvasPattern], vp);
1558 : }
1559 :
1560 : static JSBool
1561 0 : nsIDOMCanvasRenderingContext2D_GetLineWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1562 : {
1563 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1564 : nsIDOMCanvasRenderingContext2D *self;
1565 0 : xpc_qsSelfRef selfref;
1566 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1567 0 : return JS_FALSE;
1568 : nsresult rv;
1569 : float result;
1570 0 : rv = self->GetLineWidth(&result);
1571 0 : if (NS_FAILED(rv))
1572 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1573 0 : return JS_NewNumberValue(cx, result, vp);
1574 : }
1575 :
1576 : static JSBool
1577 0 : nsIDOMCanvasRenderingContext2D_SetLineWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1578 : {
1579 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1580 : nsIDOMCanvasRenderingContext2D *self;
1581 0 : xpc_qsSelfRef selfref;
1582 0 : JS::AutoValueRooter tvr(cx);
1583 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1584 0 : return JS_FALSE;
1585 : double arg0_dbl;
1586 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1587 0 : return JS_FALSE;
1588 0 : float arg0 = (float) arg0_dbl;
1589 : nsresult rv;
1590 0 : rv = self->SetLineWidth(arg0);
1591 0 : if (NS_FAILED(rv))
1592 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1593 0 : return JS_TRUE;
1594 : }
1595 :
1596 : static JSBool
1597 0 : nsIDOMCanvasRenderingContext2D_GetLineCap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1598 : {
1599 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1600 : nsIDOMCanvasRenderingContext2D *self;
1601 0 : xpc_qsSelfRef selfref;
1602 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1603 0 : return JS_FALSE;
1604 : nsresult rv;
1605 0 : nsString result;
1606 0 : rv = self->GetLineCap(result);
1607 0 : if (NS_FAILED(rv))
1608 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1609 0 : return xpc::StringToJsval(cx, result, vp);
1610 : }
1611 :
1612 : static JSBool
1613 0 : nsIDOMCanvasRenderingContext2D_SetLineCap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1614 : {
1615 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1616 : nsIDOMCanvasRenderingContext2D *self;
1617 0 : xpc_qsSelfRef selfref;
1618 0 : JS::AutoValueRooter tvr(cx);
1619 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1620 0 : return JS_FALSE;
1621 : xpc_qsDOMString arg0(cx, *vp, vp,
1622 : xpc_qsDOMString::eDefaultNullBehavior,
1623 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1624 0 : if (!arg0.IsValid())
1625 0 : return JS_FALSE;
1626 : nsresult rv;
1627 0 : rv = self->SetLineCap(arg0);
1628 0 : if (NS_FAILED(rv))
1629 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1630 0 : return JS_TRUE;
1631 : }
1632 :
1633 : static JSBool
1634 0 : nsIDOMCanvasRenderingContext2D_GetLineJoin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1635 : {
1636 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1637 : nsIDOMCanvasRenderingContext2D *self;
1638 0 : xpc_qsSelfRef selfref;
1639 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1640 0 : return JS_FALSE;
1641 : nsresult rv;
1642 0 : nsString result;
1643 0 : rv = self->GetLineJoin(result);
1644 0 : if (NS_FAILED(rv))
1645 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1646 0 : return xpc::StringToJsval(cx, result, vp);
1647 : }
1648 :
1649 : static JSBool
1650 0 : nsIDOMCanvasRenderingContext2D_SetLineJoin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1651 : {
1652 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1653 : nsIDOMCanvasRenderingContext2D *self;
1654 0 : xpc_qsSelfRef selfref;
1655 0 : JS::AutoValueRooter tvr(cx);
1656 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1657 0 : return JS_FALSE;
1658 : xpc_qsDOMString arg0(cx, *vp, vp,
1659 : xpc_qsDOMString::eDefaultNullBehavior,
1660 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1661 0 : if (!arg0.IsValid())
1662 0 : return JS_FALSE;
1663 : nsresult rv;
1664 0 : rv = self->SetLineJoin(arg0);
1665 0 : if (NS_FAILED(rv))
1666 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1667 0 : return JS_TRUE;
1668 : }
1669 :
1670 : static JSBool
1671 0 : nsIDOMCanvasRenderingContext2D_GetMiterLimit(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1672 : {
1673 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1674 : nsIDOMCanvasRenderingContext2D *self;
1675 0 : xpc_qsSelfRef selfref;
1676 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1677 0 : return JS_FALSE;
1678 : nsresult rv;
1679 : float result;
1680 0 : rv = self->GetMiterLimit(&result);
1681 0 : if (NS_FAILED(rv))
1682 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1683 0 : return JS_NewNumberValue(cx, result, vp);
1684 : }
1685 :
1686 : static JSBool
1687 0 : nsIDOMCanvasRenderingContext2D_SetMiterLimit(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1688 : {
1689 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1690 : nsIDOMCanvasRenderingContext2D *self;
1691 0 : xpc_qsSelfRef selfref;
1692 0 : JS::AutoValueRooter tvr(cx);
1693 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1694 0 : return JS_FALSE;
1695 : double arg0_dbl;
1696 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1697 0 : return JS_FALSE;
1698 0 : float arg0 = (float) arg0_dbl;
1699 : nsresult rv;
1700 0 : rv = self->SetMiterLimit(arg0);
1701 0 : if (NS_FAILED(rv))
1702 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1703 0 : return JS_TRUE;
1704 : }
1705 :
1706 : static JSBool
1707 0 : nsIDOMCanvasRenderingContext2D_GetMozDash(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1708 : {
1709 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1710 : nsIDOMCanvasRenderingContext2D *self;
1711 0 : xpc_qsSelfRef selfref;
1712 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1713 0 : return JS_FALSE;
1714 : nsresult rv;
1715 0 : rv = self->GetMozDash(cx, vp);
1716 0 : if (NS_FAILED(rv))
1717 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1718 0 : return JS_TRUE;
1719 : }
1720 :
1721 : static JSBool
1722 0 : nsIDOMCanvasRenderingContext2D_SetMozDash(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 0 : jsval arg0 = *vp;
1731 : nsresult rv;
1732 0 : rv = self->SetMozDash(cx, arg0);
1733 0 : if (NS_FAILED(rv))
1734 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1735 0 : return JS_TRUE;
1736 : }
1737 :
1738 : static JSBool
1739 0 : nsIDOMCanvasRenderingContext2D_GetMozDashOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1740 : {
1741 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1742 : nsIDOMCanvasRenderingContext2D *self;
1743 0 : xpc_qsSelfRef selfref;
1744 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1745 0 : return JS_FALSE;
1746 : nsresult rv;
1747 : float result;
1748 0 : rv = self->GetMozDashOffset(&result);
1749 0 : if (NS_FAILED(rv))
1750 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1751 0 : return JS_NewNumberValue(cx, result, vp);
1752 : }
1753 :
1754 : static JSBool
1755 0 : nsIDOMCanvasRenderingContext2D_SetMozDashOffset(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1756 : {
1757 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1758 : nsIDOMCanvasRenderingContext2D *self;
1759 0 : xpc_qsSelfRef selfref;
1760 0 : JS::AutoValueRooter tvr(cx);
1761 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1762 0 : return JS_FALSE;
1763 : double arg0_dbl;
1764 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1765 0 : return JS_FALSE;
1766 0 : float arg0 = (float) arg0_dbl;
1767 : nsresult rv;
1768 0 : rv = self->SetMozDashOffset(arg0);
1769 0 : if (NS_FAILED(rv))
1770 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1771 0 : return JS_TRUE;
1772 : }
1773 :
1774 : static JSBool
1775 0 : nsIDOMCanvasRenderingContext2D_GetShadowOffsetX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1776 : {
1777 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1778 : nsIDOMCanvasRenderingContext2D *self;
1779 0 : xpc_qsSelfRef selfref;
1780 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1781 0 : return JS_FALSE;
1782 : nsresult rv;
1783 : float result;
1784 0 : rv = self->GetShadowOffsetX(&result);
1785 0 : if (NS_FAILED(rv))
1786 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1787 0 : return JS_NewNumberValue(cx, result, vp);
1788 : }
1789 :
1790 : static JSBool
1791 0 : nsIDOMCanvasRenderingContext2D_SetShadowOffsetX(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1792 : {
1793 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1794 : nsIDOMCanvasRenderingContext2D *self;
1795 0 : xpc_qsSelfRef selfref;
1796 0 : JS::AutoValueRooter tvr(cx);
1797 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1798 0 : return JS_FALSE;
1799 : double arg0_dbl;
1800 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1801 0 : return JS_FALSE;
1802 0 : float arg0 = (float) arg0_dbl;
1803 : nsresult rv;
1804 0 : rv = self->SetShadowOffsetX(arg0);
1805 0 : if (NS_FAILED(rv))
1806 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1807 0 : return JS_TRUE;
1808 : }
1809 :
1810 : static JSBool
1811 0 : nsIDOMCanvasRenderingContext2D_GetShadowOffsetY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1812 : {
1813 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1814 : nsIDOMCanvasRenderingContext2D *self;
1815 0 : xpc_qsSelfRef selfref;
1816 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1817 0 : return JS_FALSE;
1818 : nsresult rv;
1819 : float result;
1820 0 : rv = self->GetShadowOffsetY(&result);
1821 0 : if (NS_FAILED(rv))
1822 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1823 0 : return JS_NewNumberValue(cx, result, vp);
1824 : }
1825 :
1826 : static JSBool
1827 0 : nsIDOMCanvasRenderingContext2D_SetShadowOffsetY(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1828 : {
1829 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1830 : nsIDOMCanvasRenderingContext2D *self;
1831 0 : xpc_qsSelfRef selfref;
1832 0 : JS::AutoValueRooter tvr(cx);
1833 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1834 0 : return JS_FALSE;
1835 : double arg0_dbl;
1836 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1837 0 : return JS_FALSE;
1838 0 : float arg0 = (float) arg0_dbl;
1839 : nsresult rv;
1840 0 : rv = self->SetShadowOffsetY(arg0);
1841 0 : if (NS_FAILED(rv))
1842 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1843 0 : return JS_TRUE;
1844 : }
1845 :
1846 : static JSBool
1847 0 : nsIDOMCanvasRenderingContext2D_GetShadowBlur(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1848 : {
1849 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1850 : nsIDOMCanvasRenderingContext2D *self;
1851 0 : xpc_qsSelfRef selfref;
1852 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1853 0 : return JS_FALSE;
1854 : nsresult rv;
1855 : float result;
1856 0 : rv = self->GetShadowBlur(&result);
1857 0 : if (NS_FAILED(rv))
1858 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1859 0 : return JS_NewNumberValue(cx, result, vp);
1860 : }
1861 :
1862 : static JSBool
1863 0 : nsIDOMCanvasRenderingContext2D_SetShadowBlur(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1864 : {
1865 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1866 : nsIDOMCanvasRenderingContext2D *self;
1867 0 : xpc_qsSelfRef selfref;
1868 0 : JS::AutoValueRooter tvr(cx);
1869 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1870 0 : return JS_FALSE;
1871 : double arg0_dbl;
1872 0 : if (!JS_ValueToNumber(cx, *vp, &arg0_dbl))
1873 0 : return JS_FALSE;
1874 0 : float arg0 = (float) arg0_dbl;
1875 : nsresult rv;
1876 0 : rv = self->SetShadowBlur(arg0);
1877 0 : if (NS_FAILED(rv))
1878 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1879 0 : return JS_TRUE;
1880 : }
1881 :
1882 : static JSBool
1883 0 : nsIDOMCanvasRenderingContext2D_GetShadowColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
1884 : {
1885 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1886 : nsIDOMCanvasRenderingContext2D *self;
1887 0 : xpc_qsSelfRef selfref;
1888 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
1889 0 : return JS_FALSE;
1890 : nsresult rv;
1891 0 : nsString result;
1892 0 : rv = self->GetShadowColor(result);
1893 0 : if (NS_FAILED(rv))
1894 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
1895 0 : return xpc::StringToJsval(cx, result, vp);
1896 : }
1897 :
1898 : static JSBool
1899 0 : nsIDOMCanvasRenderingContext2D_SetShadowColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
1900 : {
1901 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1902 : nsIDOMCanvasRenderingContext2D *self;
1903 0 : xpc_qsSelfRef selfref;
1904 0 : JS::AutoValueRooter tvr(cx);
1905 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
1906 0 : return JS_FALSE;
1907 : xpc_qsDOMString arg0(cx, *vp, vp,
1908 : xpc_qsDOMString::eDefaultNullBehavior,
1909 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
1910 0 : if (!arg0.IsValid())
1911 0 : return JS_FALSE;
1912 : nsresult rv;
1913 0 : rv = self->SetShadowColor(arg0);
1914 0 : if (NS_FAILED(rv))
1915 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
1916 0 : return JS_TRUE;
1917 : }
1918 :
1919 : static JSBool
1920 0 : nsIDOMCanvasRenderingContext2D_ClearRect(JSContext *cx, unsigned argc, jsval *vp)
1921 : {
1922 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1923 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1924 0 : if (!obj)
1925 0 : return JS_FALSE;
1926 : nsIDOMCanvasRenderingContext2D *self;
1927 0 : xpc_qsSelfRef selfref;
1928 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1929 0 : return JS_FALSE;
1930 0 : if (argc < 4)
1931 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1932 0 : jsval *argv = JS_ARGV(cx, vp);
1933 : double arg0_dbl;
1934 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1935 0 : return JS_FALSE;
1936 0 : float arg0 = (float) arg0_dbl;
1937 : double arg1_dbl;
1938 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1939 0 : return JS_FALSE;
1940 0 : float arg1 = (float) arg1_dbl;
1941 : double arg2_dbl;
1942 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1943 0 : return JS_FALSE;
1944 0 : float arg2 = (float) arg2_dbl;
1945 : double arg3_dbl;
1946 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1947 0 : return JS_FALSE;
1948 0 : float arg3 = (float) arg3_dbl;
1949 : nsresult rv;
1950 0 : rv = self->ClearRect(arg0, arg1, arg2, arg3);
1951 0 : if (NS_FAILED(rv))
1952 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1953 0 : *vp = JSVAL_VOID;
1954 0 : return JS_TRUE;
1955 : }
1956 :
1957 : static JSBool
1958 0 : nsIDOMCanvasRenderingContext2D_FillRect(JSContext *cx, unsigned argc, jsval *vp)
1959 : {
1960 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1961 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
1962 0 : if (!obj)
1963 0 : return JS_FALSE;
1964 : nsIDOMCanvasRenderingContext2D *self;
1965 0 : xpc_qsSelfRef selfref;
1966 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
1967 0 : return JS_FALSE;
1968 0 : if (argc < 4)
1969 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
1970 0 : jsval *argv = JS_ARGV(cx, vp);
1971 : double arg0_dbl;
1972 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
1973 0 : return JS_FALSE;
1974 0 : float arg0 = (float) arg0_dbl;
1975 : double arg1_dbl;
1976 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
1977 0 : return JS_FALSE;
1978 0 : float arg1 = (float) arg1_dbl;
1979 : double arg2_dbl;
1980 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
1981 0 : return JS_FALSE;
1982 0 : float arg2 = (float) arg2_dbl;
1983 : double arg3_dbl;
1984 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
1985 0 : return JS_FALSE;
1986 0 : float arg3 = (float) arg3_dbl;
1987 : nsresult rv;
1988 0 : rv = self->FillRect(arg0, arg1, arg2, arg3);
1989 0 : if (NS_FAILED(rv))
1990 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
1991 0 : *vp = JSVAL_VOID;
1992 0 : return JS_TRUE;
1993 : }
1994 :
1995 : static JSBool
1996 0 : nsIDOMCanvasRenderingContext2D_StrokeRect(JSContext *cx, unsigned argc, jsval *vp)
1997 : {
1998 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
1999 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2000 0 : if (!obj)
2001 0 : return JS_FALSE;
2002 : nsIDOMCanvasRenderingContext2D *self;
2003 0 : xpc_qsSelfRef selfref;
2004 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2005 0 : return JS_FALSE;
2006 0 : if (argc < 4)
2007 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2008 0 : jsval *argv = JS_ARGV(cx, vp);
2009 : double arg0_dbl;
2010 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2011 0 : return JS_FALSE;
2012 0 : float arg0 = (float) arg0_dbl;
2013 : double arg1_dbl;
2014 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2015 0 : return JS_FALSE;
2016 0 : float arg1 = (float) arg1_dbl;
2017 : double arg2_dbl;
2018 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2019 0 : return JS_FALSE;
2020 0 : float arg2 = (float) arg2_dbl;
2021 : double arg3_dbl;
2022 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2023 0 : return JS_FALSE;
2024 0 : float arg3 = (float) arg3_dbl;
2025 : nsresult rv;
2026 0 : rv = self->StrokeRect(arg0, arg1, arg2, arg3);
2027 0 : if (NS_FAILED(rv))
2028 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2029 0 : *vp = JSVAL_VOID;
2030 0 : return JS_TRUE;
2031 : }
2032 :
2033 : static JSBool
2034 0 : nsIDOMCanvasRenderingContext2D_BeginPath(JSContext *cx, unsigned argc, jsval *vp)
2035 : {
2036 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2037 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2038 0 : if (!obj)
2039 0 : return JS_FALSE;
2040 : nsIDOMCanvasRenderingContext2D *self;
2041 0 : xpc_qsSelfRef selfref;
2042 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2043 0 : return JS_FALSE;
2044 : nsresult rv;
2045 0 : rv = self->BeginPath();
2046 0 : if (NS_FAILED(rv))
2047 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2048 0 : *vp = JSVAL_VOID;
2049 0 : return JS_TRUE;
2050 : }
2051 :
2052 : static JSBool
2053 0 : nsIDOMCanvasRenderingContext2D_ClosePath(JSContext *cx, unsigned argc, jsval *vp)
2054 : {
2055 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2056 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2057 0 : if (!obj)
2058 0 : return JS_FALSE;
2059 : nsIDOMCanvasRenderingContext2D *self;
2060 0 : xpc_qsSelfRef selfref;
2061 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2062 0 : return JS_FALSE;
2063 : nsresult rv;
2064 0 : rv = self->ClosePath();
2065 0 : if (NS_FAILED(rv))
2066 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2067 0 : *vp = JSVAL_VOID;
2068 0 : return JS_TRUE;
2069 : }
2070 :
2071 : static JSBool
2072 0 : nsIDOMCanvasRenderingContext2D_MoveTo(JSContext *cx, unsigned argc, jsval *vp)
2073 : {
2074 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2075 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2076 0 : if (!obj)
2077 0 : return JS_FALSE;
2078 : nsIDOMCanvasRenderingContext2D *self;
2079 0 : xpc_qsSelfRef selfref;
2080 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2081 0 : return JS_FALSE;
2082 0 : if (argc < 2)
2083 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2084 0 : jsval *argv = JS_ARGV(cx, vp);
2085 : double arg0_dbl;
2086 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2087 0 : return JS_FALSE;
2088 0 : float arg0 = (float) arg0_dbl;
2089 : double arg1_dbl;
2090 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2091 0 : return JS_FALSE;
2092 0 : float arg1 = (float) arg1_dbl;
2093 : nsresult rv;
2094 0 : rv = self->MoveTo(arg0, arg1);
2095 0 : if (NS_FAILED(rv))
2096 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2097 0 : *vp = JSVAL_VOID;
2098 0 : return JS_TRUE;
2099 : }
2100 :
2101 : static JSBool
2102 0 : nsIDOMCanvasRenderingContext2D_LineTo(JSContext *cx, unsigned argc, jsval *vp)
2103 : {
2104 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2105 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2106 0 : if (!obj)
2107 0 : return JS_FALSE;
2108 : nsIDOMCanvasRenderingContext2D *self;
2109 0 : xpc_qsSelfRef selfref;
2110 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2111 0 : return JS_FALSE;
2112 0 : if (argc < 2)
2113 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2114 0 : jsval *argv = JS_ARGV(cx, vp);
2115 : double arg0_dbl;
2116 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2117 0 : return JS_FALSE;
2118 0 : float arg0 = (float) arg0_dbl;
2119 : double arg1_dbl;
2120 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2121 0 : return JS_FALSE;
2122 0 : float arg1 = (float) arg1_dbl;
2123 : nsresult rv;
2124 0 : rv = self->LineTo(arg0, arg1);
2125 0 : if (NS_FAILED(rv))
2126 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2127 0 : *vp = JSVAL_VOID;
2128 0 : return JS_TRUE;
2129 : }
2130 :
2131 : static JSBool
2132 0 : nsIDOMCanvasRenderingContext2D_QuadraticCurveTo(JSContext *cx, unsigned argc, jsval *vp)
2133 : {
2134 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2135 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2136 0 : if (!obj)
2137 0 : return JS_FALSE;
2138 : nsIDOMCanvasRenderingContext2D *self;
2139 0 : xpc_qsSelfRef selfref;
2140 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2141 0 : return JS_FALSE;
2142 0 : if (argc < 4)
2143 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2144 0 : jsval *argv = JS_ARGV(cx, vp);
2145 : double arg0_dbl;
2146 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2147 0 : return JS_FALSE;
2148 0 : float arg0 = (float) arg0_dbl;
2149 : double arg1_dbl;
2150 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2151 0 : return JS_FALSE;
2152 0 : float arg1 = (float) arg1_dbl;
2153 : double arg2_dbl;
2154 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2155 0 : return JS_FALSE;
2156 0 : float arg2 = (float) arg2_dbl;
2157 : double arg3_dbl;
2158 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2159 0 : return JS_FALSE;
2160 0 : float arg3 = (float) arg3_dbl;
2161 : nsresult rv;
2162 0 : rv = self->QuadraticCurveTo(arg0, arg1, arg2, arg3);
2163 0 : if (NS_FAILED(rv))
2164 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2165 0 : *vp = JSVAL_VOID;
2166 0 : return JS_TRUE;
2167 : }
2168 :
2169 : static JSBool
2170 0 : nsIDOMCanvasRenderingContext2D_BezierCurveTo(JSContext *cx, unsigned argc, jsval *vp)
2171 : {
2172 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2173 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2174 0 : if (!obj)
2175 0 : return JS_FALSE;
2176 : nsIDOMCanvasRenderingContext2D *self;
2177 0 : xpc_qsSelfRef selfref;
2178 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2179 0 : return JS_FALSE;
2180 0 : if (argc < 6)
2181 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2182 0 : jsval *argv = JS_ARGV(cx, vp);
2183 : double arg0_dbl;
2184 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2185 0 : return JS_FALSE;
2186 0 : float arg0 = (float) arg0_dbl;
2187 : double arg1_dbl;
2188 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2189 0 : return JS_FALSE;
2190 0 : float arg1 = (float) arg1_dbl;
2191 : double arg2_dbl;
2192 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2193 0 : return JS_FALSE;
2194 0 : float arg2 = (float) arg2_dbl;
2195 : double arg3_dbl;
2196 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2197 0 : return JS_FALSE;
2198 0 : float arg3 = (float) arg3_dbl;
2199 : double arg4_dbl;
2200 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
2201 0 : return JS_FALSE;
2202 0 : float arg4 = (float) arg4_dbl;
2203 : double arg5_dbl;
2204 0 : if (!JS_ValueToNumber(cx, argv[5], &arg5_dbl))
2205 0 : return JS_FALSE;
2206 0 : float arg5 = (float) arg5_dbl;
2207 : nsresult rv;
2208 0 : rv = self->BezierCurveTo(arg0, arg1, arg2, arg3, arg4, arg5);
2209 0 : if (NS_FAILED(rv))
2210 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2211 0 : *vp = JSVAL_VOID;
2212 0 : return JS_TRUE;
2213 : }
2214 :
2215 : static JSBool
2216 0 : nsIDOMCanvasRenderingContext2D_ArcTo(JSContext *cx, unsigned argc, jsval *vp)
2217 : {
2218 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2219 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2220 0 : if (!obj)
2221 0 : return JS_FALSE;
2222 : nsIDOMCanvasRenderingContext2D *self;
2223 0 : xpc_qsSelfRef selfref;
2224 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2225 0 : return JS_FALSE;
2226 0 : if (argc < 5)
2227 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2228 0 : jsval *argv = JS_ARGV(cx, vp);
2229 : double arg0_dbl;
2230 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2231 0 : return JS_FALSE;
2232 0 : float arg0 = (float) arg0_dbl;
2233 : double arg1_dbl;
2234 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2235 0 : return JS_FALSE;
2236 0 : float arg1 = (float) arg1_dbl;
2237 : double arg2_dbl;
2238 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2239 0 : return JS_FALSE;
2240 0 : float arg2 = (float) arg2_dbl;
2241 : double arg3_dbl;
2242 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2243 0 : return JS_FALSE;
2244 0 : float arg3 = (float) arg3_dbl;
2245 : double arg4_dbl;
2246 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
2247 0 : return JS_FALSE;
2248 0 : float arg4 = (float) arg4_dbl;
2249 : nsresult rv;
2250 0 : rv = self->ArcTo(arg0, arg1, arg2, arg3, arg4);
2251 0 : if (NS_FAILED(rv))
2252 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2253 0 : *vp = JSVAL_VOID;
2254 0 : return JS_TRUE;
2255 : }
2256 :
2257 : static JSBool
2258 0 : nsIDOMCanvasRenderingContext2D_Arc(JSContext *cx, unsigned argc, jsval *vp)
2259 : {
2260 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2261 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2262 0 : if (!obj)
2263 0 : return JS_FALSE;
2264 : nsIDOMCanvasRenderingContext2D *self;
2265 0 : xpc_qsSelfRef selfref;
2266 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2267 0 : return JS_FALSE;
2268 0 : if (argc < 5)
2269 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2270 0 : jsval *argv = JS_ARGV(cx, vp);
2271 : double arg0_dbl;
2272 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2273 0 : return JS_FALSE;
2274 0 : float arg0 = (float) arg0_dbl;
2275 : double arg1_dbl;
2276 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2277 0 : return JS_FALSE;
2278 0 : float arg1 = (float) arg1_dbl;
2279 : double arg2_dbl;
2280 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2281 0 : return JS_FALSE;
2282 0 : float arg2 = (float) arg2_dbl;
2283 : double arg3_dbl;
2284 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2285 0 : return JS_FALSE;
2286 0 : float arg3 = (float) arg3_dbl;
2287 : double arg4_dbl;
2288 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
2289 0 : return JS_FALSE;
2290 0 : float arg4 = (float) arg4_dbl;
2291 : JSBool arg5;
2292 0 : JS_ValueToBoolean(cx, (5 < argc ? argv[5] : JSVAL_NULL), &arg5);
2293 : nsresult rv;
2294 0 : rv = self->Arc(arg0, arg1, arg2, arg3, arg4, arg5);
2295 0 : if (NS_FAILED(rv))
2296 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2297 0 : *vp = JSVAL_VOID;
2298 0 : return JS_TRUE;
2299 : }
2300 :
2301 : static JSBool
2302 0 : nsIDOMCanvasRenderingContext2D_Rect(JSContext *cx, unsigned argc, jsval *vp)
2303 : {
2304 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2305 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2306 0 : if (!obj)
2307 0 : return JS_FALSE;
2308 : nsIDOMCanvasRenderingContext2D *self;
2309 0 : xpc_qsSelfRef selfref;
2310 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2311 0 : return JS_FALSE;
2312 0 : if (argc < 4)
2313 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2314 0 : jsval *argv = JS_ARGV(cx, vp);
2315 : double arg0_dbl;
2316 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2317 0 : return JS_FALSE;
2318 0 : float arg0 = (float) arg0_dbl;
2319 : double arg1_dbl;
2320 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2321 0 : return JS_FALSE;
2322 0 : float arg1 = (float) arg1_dbl;
2323 : double arg2_dbl;
2324 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2325 0 : return JS_FALSE;
2326 0 : float arg2 = (float) arg2_dbl;
2327 : double arg3_dbl;
2328 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2329 0 : return JS_FALSE;
2330 0 : float arg3 = (float) arg3_dbl;
2331 : nsresult rv;
2332 0 : rv = self->Rect(arg0, arg1, arg2, arg3);
2333 0 : if (NS_FAILED(rv))
2334 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2335 0 : *vp = JSVAL_VOID;
2336 0 : return JS_TRUE;
2337 : }
2338 :
2339 : static JSBool
2340 0 : nsIDOMCanvasRenderingContext2D_Fill(JSContext *cx, unsigned argc, jsval *vp)
2341 : {
2342 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2343 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2344 0 : if (!obj)
2345 0 : return JS_FALSE;
2346 : nsIDOMCanvasRenderingContext2D *self;
2347 0 : xpc_qsSelfRef selfref;
2348 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2349 0 : return JS_FALSE;
2350 : nsresult rv;
2351 0 : rv = self->Fill();
2352 0 : if (NS_FAILED(rv))
2353 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2354 0 : *vp = JSVAL_VOID;
2355 0 : return JS_TRUE;
2356 : }
2357 :
2358 : static JSBool
2359 0 : nsIDOMCanvasRenderingContext2D_Stroke(JSContext *cx, unsigned argc, jsval *vp)
2360 : {
2361 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2362 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2363 0 : if (!obj)
2364 0 : return JS_FALSE;
2365 : nsIDOMCanvasRenderingContext2D *self;
2366 0 : xpc_qsSelfRef selfref;
2367 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2368 0 : return JS_FALSE;
2369 : nsresult rv;
2370 0 : rv = self->Stroke();
2371 0 : if (NS_FAILED(rv))
2372 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2373 0 : *vp = JSVAL_VOID;
2374 0 : return JS_TRUE;
2375 : }
2376 :
2377 : static JSBool
2378 0 : nsIDOMCanvasRenderingContext2D_Clip(JSContext *cx, unsigned argc, jsval *vp)
2379 : {
2380 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2381 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2382 0 : if (!obj)
2383 0 : return JS_FALSE;
2384 : nsIDOMCanvasRenderingContext2D *self;
2385 0 : xpc_qsSelfRef selfref;
2386 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2387 0 : return JS_FALSE;
2388 : nsresult rv;
2389 0 : rv = self->Clip();
2390 0 : if (NS_FAILED(rv))
2391 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2392 0 : *vp = JSVAL_VOID;
2393 0 : return JS_TRUE;
2394 : }
2395 :
2396 : static JSBool
2397 0 : nsIDOMCanvasRenderingContext2D_GetFont(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2398 : {
2399 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2400 : nsIDOMCanvasRenderingContext2D *self;
2401 0 : xpc_qsSelfRef selfref;
2402 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2403 0 : return JS_FALSE;
2404 : nsresult rv;
2405 0 : nsString result;
2406 0 : rv = self->GetFont(result);
2407 0 : if (NS_FAILED(rv))
2408 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2409 0 : return xpc::StringToJsval(cx, result, vp);
2410 : }
2411 :
2412 : static JSBool
2413 0 : nsIDOMCanvasRenderingContext2D_SetFont(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2414 : {
2415 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2416 : nsIDOMCanvasRenderingContext2D *self;
2417 0 : xpc_qsSelfRef selfref;
2418 0 : JS::AutoValueRooter tvr(cx);
2419 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2420 0 : return JS_FALSE;
2421 : xpc_qsDOMString arg0(cx, *vp, vp,
2422 : xpc_qsDOMString::eDefaultNullBehavior,
2423 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2424 0 : if (!arg0.IsValid())
2425 0 : return JS_FALSE;
2426 : nsresult rv;
2427 0 : rv = self->SetFont(arg0);
2428 0 : if (NS_FAILED(rv))
2429 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2430 0 : return JS_TRUE;
2431 : }
2432 :
2433 : static JSBool
2434 0 : nsIDOMCanvasRenderingContext2D_GetTextAlign(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2435 : {
2436 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2437 : nsIDOMCanvasRenderingContext2D *self;
2438 0 : xpc_qsSelfRef selfref;
2439 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2440 0 : return JS_FALSE;
2441 : nsresult rv;
2442 0 : nsString result;
2443 0 : rv = self->GetTextAlign(result);
2444 0 : if (NS_FAILED(rv))
2445 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2446 0 : return xpc::StringToJsval(cx, result, vp);
2447 : }
2448 :
2449 : static JSBool
2450 0 : nsIDOMCanvasRenderingContext2D_SetTextAlign(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2451 : {
2452 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2453 : nsIDOMCanvasRenderingContext2D *self;
2454 0 : xpc_qsSelfRef selfref;
2455 0 : JS::AutoValueRooter tvr(cx);
2456 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2457 0 : return JS_FALSE;
2458 : xpc_qsDOMString arg0(cx, *vp, vp,
2459 : xpc_qsDOMString::eDefaultNullBehavior,
2460 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2461 0 : if (!arg0.IsValid())
2462 0 : return JS_FALSE;
2463 : nsresult rv;
2464 0 : rv = self->SetTextAlign(arg0);
2465 0 : if (NS_FAILED(rv))
2466 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2467 0 : return JS_TRUE;
2468 : }
2469 :
2470 : static JSBool
2471 0 : nsIDOMCanvasRenderingContext2D_GetTextBaseline(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2472 : {
2473 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2474 : nsIDOMCanvasRenderingContext2D *self;
2475 0 : xpc_qsSelfRef selfref;
2476 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2477 0 : return JS_FALSE;
2478 : nsresult rv;
2479 0 : nsString result;
2480 0 : rv = self->GetTextBaseline(result);
2481 0 : if (NS_FAILED(rv))
2482 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2483 0 : return xpc::StringToJsval(cx, result, vp);
2484 : }
2485 :
2486 : static JSBool
2487 0 : nsIDOMCanvasRenderingContext2D_SetTextBaseline(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2488 : {
2489 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2490 : nsIDOMCanvasRenderingContext2D *self;
2491 0 : xpc_qsSelfRef selfref;
2492 0 : JS::AutoValueRooter tvr(cx);
2493 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2494 0 : return JS_FALSE;
2495 : xpc_qsDOMString arg0(cx, *vp, vp,
2496 : xpc_qsDOMString::eDefaultNullBehavior,
2497 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2498 0 : if (!arg0.IsValid())
2499 0 : return JS_FALSE;
2500 : nsresult rv;
2501 0 : rv = self->SetTextBaseline(arg0);
2502 0 : if (NS_FAILED(rv))
2503 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2504 0 : return JS_TRUE;
2505 : }
2506 :
2507 : static JSBool
2508 0 : nsIDOMCanvasRenderingContext2D_FillText(JSContext *cx, unsigned argc, jsval *vp)
2509 : {
2510 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2511 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2512 0 : if (!obj)
2513 0 : return JS_FALSE;
2514 : nsIDOMCanvasRenderingContext2D *self;
2515 0 : xpc_qsSelfRef selfref;
2516 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2517 0 : return JS_FALSE;
2518 0 : if (argc < 3)
2519 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2520 0 : jsval *argv = JS_ARGV(cx, vp);
2521 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
2522 : xpc_qsDOMString::eDefaultNullBehavior,
2523 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2524 0 : if (!arg0.IsValid())
2525 0 : return JS_FALSE;
2526 : double arg1_dbl;
2527 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2528 0 : return JS_FALSE;
2529 0 : float arg1 = (float) arg1_dbl;
2530 : double arg2_dbl;
2531 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2532 0 : return JS_FALSE;
2533 0 : float arg2 = (float) arg2_dbl;
2534 : double arg3_dbl;
2535 0 : if (!JS_ValueToNumber(cx, (3 < argc ? argv[3] : JSVAL_NULL), &arg3_dbl))
2536 0 : return JS_FALSE;
2537 0 : float arg3 = (float) arg3_dbl;
2538 : nsresult rv;
2539 0 : rv = self->FillText(arg0, arg1, arg2, arg3);
2540 0 : if (NS_FAILED(rv))
2541 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2542 0 : *vp = JSVAL_VOID;
2543 0 : return JS_TRUE;
2544 : }
2545 :
2546 : static JSBool
2547 0 : nsIDOMCanvasRenderingContext2D_StrokeText(JSContext *cx, unsigned argc, jsval *vp)
2548 : {
2549 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2550 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2551 0 : if (!obj)
2552 0 : return JS_FALSE;
2553 : nsIDOMCanvasRenderingContext2D *self;
2554 0 : xpc_qsSelfRef selfref;
2555 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2556 0 : return JS_FALSE;
2557 0 : if (argc < 3)
2558 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2559 0 : jsval *argv = JS_ARGV(cx, vp);
2560 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
2561 : xpc_qsDOMString::eDefaultNullBehavior,
2562 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2563 0 : if (!arg0.IsValid())
2564 0 : return JS_FALSE;
2565 : double arg1_dbl;
2566 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2567 0 : return JS_FALSE;
2568 0 : float arg1 = (float) arg1_dbl;
2569 : double arg2_dbl;
2570 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2571 0 : return JS_FALSE;
2572 0 : float arg2 = (float) arg2_dbl;
2573 : double arg3_dbl;
2574 0 : if (!JS_ValueToNumber(cx, (3 < argc ? argv[3] : JSVAL_NULL), &arg3_dbl))
2575 0 : return JS_FALSE;
2576 0 : float arg3 = (float) arg3_dbl;
2577 : nsresult rv;
2578 0 : rv = self->StrokeText(arg0, arg1, arg2, arg3);
2579 0 : if (NS_FAILED(rv))
2580 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2581 0 : *vp = JSVAL_VOID;
2582 0 : return JS_TRUE;
2583 : }
2584 :
2585 : static JSBool
2586 0 : nsIDOMCanvasRenderingContext2D_MeasureText(JSContext *cx, unsigned argc, jsval *vp)
2587 : {
2588 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2589 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2590 0 : if (!obj)
2591 0 : return JS_FALSE;
2592 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
2593 : nsIDOMCanvasRenderingContext2D *self;
2594 0 : xpc_qsSelfRef selfref;
2595 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
2596 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
2597 0 : return JS_FALSE;
2598 0 : if (argc < 1)
2599 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2600 0 : jsval *argv = JS_ARGV(cx, vp);
2601 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
2602 : xpc_qsDOMString::eDefaultNullBehavior,
2603 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2604 0 : if (!arg0.IsValid())
2605 0 : return JS_FALSE;
2606 : nsresult rv;
2607 0 : nsCOMPtr<nsIDOMTextMetrics> result;
2608 0 : rv = self->MeasureText(arg0, getter_AddRefs(result));
2609 0 : if (NS_FAILED(rv))
2610 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2611 0 : if (!result) {
2612 0 : *vp = JSVAL_NULL;
2613 0 : return JS_TRUE;
2614 : }
2615 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
2616 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
2617 0 : return JS_TRUE;
2618 : }
2619 : // After this point do not use 'result'!
2620 0 : qsObjectHelper helper(result, cache);
2621 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTextMetrics), &interfaces[k_nsIDOMTextMetrics], vp);
2622 : }
2623 :
2624 : static JSBool
2625 0 : nsIDOMCanvasRenderingContext2D_GetMozTextStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2626 : {
2627 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2628 : nsIDOMCanvasRenderingContext2D *self;
2629 0 : xpc_qsSelfRef selfref;
2630 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2631 0 : return JS_FALSE;
2632 : nsresult rv;
2633 0 : nsString result;
2634 0 : rv = self->GetMozTextStyle(result);
2635 0 : if (NS_FAILED(rv))
2636 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2637 0 : return xpc::StringToJsval(cx, result, vp);
2638 : }
2639 :
2640 : static JSBool
2641 0 : nsIDOMCanvasRenderingContext2D_SetMozTextStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2642 : {
2643 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2644 : nsIDOMCanvasRenderingContext2D *self;
2645 0 : xpc_qsSelfRef selfref;
2646 0 : JS::AutoValueRooter tvr(cx);
2647 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2648 0 : return JS_FALSE;
2649 : xpc_qsDOMString arg0(cx, *vp, vp,
2650 : xpc_qsDOMString::eDefaultNullBehavior,
2651 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2652 0 : if (!arg0.IsValid())
2653 0 : return JS_FALSE;
2654 : nsresult rv;
2655 0 : rv = self->SetMozTextStyle(arg0);
2656 0 : if (NS_FAILED(rv))
2657 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2658 0 : return JS_TRUE;
2659 : }
2660 :
2661 : static JSBool
2662 0 : nsIDOMCanvasRenderingContext2D_DrawImage(JSContext *cx, unsigned argc, jsval *vp)
2663 : {
2664 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2665 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2666 0 : if (!obj)
2667 0 : return JS_FALSE;
2668 : nsIDOMCanvasRenderingContext2D *self;
2669 0 : xpc_qsSelfRef selfref;
2670 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2671 0 : return JS_FALSE;
2672 0 : if (argc < 3)
2673 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2674 0 : jsval *argv = JS_ARGV(cx, vp);
2675 : nsresult rv;
2676 : nsIDOMElement *arg0;
2677 0 : xpc_qsSelfRef arg0ref;
2678 0 : rv = xpc_qsUnwrapArg<nsIDOMElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
2679 0 : if (NS_FAILED(rv)) {
2680 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
2681 0 : return JS_FALSE;
2682 : }
2683 : double arg1_dbl;
2684 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2685 0 : return JS_FALSE;
2686 0 : float arg1 = (float) arg1_dbl;
2687 : double arg2_dbl;
2688 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2689 0 : return JS_FALSE;
2690 0 : float arg2 = (float) arg2_dbl;
2691 : double arg3_dbl;
2692 0 : if (!JS_ValueToNumber(cx, (3 < argc ? argv[3] : JSVAL_NULL), &arg3_dbl))
2693 0 : return JS_FALSE;
2694 0 : float arg3 = (float) arg3_dbl;
2695 : double arg4_dbl;
2696 0 : if (!JS_ValueToNumber(cx, (4 < argc ? argv[4] : JSVAL_NULL), &arg4_dbl))
2697 0 : return JS_FALSE;
2698 0 : float arg4 = (float) arg4_dbl;
2699 : double arg5_dbl;
2700 0 : if (!JS_ValueToNumber(cx, (5 < argc ? argv[5] : JSVAL_NULL), &arg5_dbl))
2701 0 : return JS_FALSE;
2702 0 : float arg5 = (float) arg5_dbl;
2703 : double arg6_dbl;
2704 0 : if (!JS_ValueToNumber(cx, (6 < argc ? argv[6] : JSVAL_NULL), &arg6_dbl))
2705 0 : return JS_FALSE;
2706 0 : float arg6 = (float) arg6_dbl;
2707 : double arg7_dbl;
2708 0 : if (!JS_ValueToNumber(cx, (7 < argc ? argv[7] : JSVAL_NULL), &arg7_dbl))
2709 0 : return JS_FALSE;
2710 0 : float arg7 = (float) arg7_dbl;
2711 : double arg8_dbl;
2712 0 : if (!JS_ValueToNumber(cx, (8 < argc ? argv[8] : JSVAL_NULL), &arg8_dbl))
2713 0 : return JS_FALSE;
2714 0 : float arg8 = (float) arg8_dbl;
2715 0 : rv = self->DrawImage(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, NS_MIN<PRUint32>(argc, 9) - 3);
2716 0 : if (NS_FAILED(rv))
2717 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2718 0 : *vp = JSVAL_VOID;
2719 0 : return JS_TRUE;
2720 : }
2721 :
2722 : static JSBool
2723 0 : nsIDOMCanvasRenderingContext2D_IsPointInPath(JSContext *cx, unsigned argc, jsval *vp)
2724 : {
2725 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2726 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2727 0 : if (!obj)
2728 0 : return JS_FALSE;
2729 : nsIDOMCanvasRenderingContext2D *self;
2730 0 : xpc_qsSelfRef selfref;
2731 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2732 0 : return JS_FALSE;
2733 0 : if (argc < 2)
2734 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2735 0 : jsval *argv = JS_ARGV(cx, vp);
2736 : double arg0_dbl;
2737 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2738 0 : return JS_FALSE;
2739 0 : float arg0 = (float) arg0_dbl;
2740 : double arg1_dbl;
2741 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2742 0 : return JS_FALSE;
2743 0 : float arg1 = (float) arg1_dbl;
2744 : nsresult rv;
2745 : bool result;
2746 0 : rv = self->IsPointInPath(arg0, arg1, &result);
2747 0 : if (NS_FAILED(rv))
2748 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2749 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
2750 0 : return JS_TRUE;
2751 : }
2752 :
2753 : static JSBool
2754 0 : nsIDOMCanvasRenderingContext2D_GetMozImageSmoothingEnabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2755 : {
2756 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2757 : nsIDOMCanvasRenderingContext2D *self;
2758 0 : xpc_qsSelfRef selfref;
2759 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2760 0 : return JS_FALSE;
2761 : nsresult rv;
2762 : bool result;
2763 0 : rv = self->GetMozImageSmoothingEnabled(&result);
2764 0 : if (NS_FAILED(rv))
2765 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2766 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
2767 0 : return JS_TRUE;
2768 : }
2769 :
2770 : static JSBool
2771 0 : nsIDOMCanvasRenderingContext2D_SetMozImageSmoothingEnabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2772 : {
2773 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2774 : nsIDOMCanvasRenderingContext2D *self;
2775 0 : xpc_qsSelfRef selfref;
2776 0 : JS::AutoValueRooter tvr(cx);
2777 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2778 0 : return JS_FALSE;
2779 : JSBool arg0;
2780 0 : JS_ValueToBoolean(cx, *vp, &arg0);
2781 : nsresult rv;
2782 0 : rv = self->SetMozImageSmoothingEnabled(arg0);
2783 0 : if (NS_FAILED(rv))
2784 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2785 0 : return JS_TRUE;
2786 : }
2787 :
2788 : static JSBool
2789 0 : nsIDOMCanvasRenderingContext2D_DrawWindow(JSContext *cx, unsigned argc, jsval *vp)
2790 : {
2791 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2792 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2793 0 : if (!obj)
2794 0 : return JS_FALSE;
2795 : nsIDOMCanvasRenderingContext2D *self;
2796 0 : xpc_qsSelfRef selfref;
2797 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2798 0 : return JS_FALSE;
2799 0 : if (argc < 6)
2800 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2801 0 : jsval *argv = JS_ARGV(cx, vp);
2802 : nsresult rv;
2803 : nsIDOMWindow *arg0;
2804 0 : xpc_qsSelfRef arg0ref;
2805 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
2806 0 : if (NS_FAILED(rv)) {
2807 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
2808 0 : return JS_FALSE;
2809 : }
2810 : double arg1_dbl;
2811 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2812 0 : return JS_FALSE;
2813 0 : float arg1 = (float) arg1_dbl;
2814 : double arg2_dbl;
2815 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2816 0 : return JS_FALSE;
2817 0 : float arg2 = (float) arg2_dbl;
2818 : double arg3_dbl;
2819 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2820 0 : return JS_FALSE;
2821 0 : float arg3 = (float) arg3_dbl;
2822 : double arg4_dbl;
2823 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
2824 0 : return JS_FALSE;
2825 0 : float arg4 = (float) arg4_dbl;
2826 0 : xpc_qsDOMString arg5(cx, argv[5], &argv[5],
2827 : xpc_qsDOMString::eDefaultNullBehavior,
2828 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2829 0 : if (!arg5.IsValid())
2830 0 : return JS_FALSE;
2831 : uint32_t arg6;
2832 0 : if (!JS_ValueToECMAUint32(cx, (6 < argc ? argv[6] : JSVAL_NULL), &arg6))
2833 0 : return JS_FALSE;
2834 0 : rv = self->DrawWindow(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
2835 0 : if (NS_FAILED(rv))
2836 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2837 0 : *vp = JSVAL_VOID;
2838 0 : return JS_TRUE;
2839 : }
2840 :
2841 : static JSBool
2842 0 : nsIDOMCanvasRenderingContext2D_AsyncDrawXULElement(JSContext *cx, unsigned argc, jsval *vp)
2843 : {
2844 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2845 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2846 0 : if (!obj)
2847 0 : return JS_FALSE;
2848 : nsIDOMCanvasRenderingContext2D *self;
2849 0 : xpc_qsSelfRef selfref;
2850 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2851 0 : return JS_FALSE;
2852 0 : if (argc < 6)
2853 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2854 0 : jsval *argv = JS_ARGV(cx, vp);
2855 : nsresult rv;
2856 : nsIDOMXULElement *arg0;
2857 0 : xpc_qsSelfRef arg0ref;
2858 0 : rv = xpc_qsUnwrapArg<nsIDOMXULElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
2859 0 : if (NS_FAILED(rv)) {
2860 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
2861 0 : return JS_FALSE;
2862 : }
2863 : double arg1_dbl;
2864 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
2865 0 : return JS_FALSE;
2866 0 : float arg1 = (float) arg1_dbl;
2867 : double arg2_dbl;
2868 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
2869 0 : return JS_FALSE;
2870 0 : float arg2 = (float) arg2_dbl;
2871 : double arg3_dbl;
2872 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
2873 0 : return JS_FALSE;
2874 0 : float arg3 = (float) arg3_dbl;
2875 : double arg4_dbl;
2876 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
2877 0 : return JS_FALSE;
2878 0 : float arg4 = (float) arg4_dbl;
2879 0 : xpc_qsDOMString arg5(cx, argv[5], &argv[5],
2880 : xpc_qsDOMString::eDefaultNullBehavior,
2881 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2882 0 : if (!arg5.IsValid())
2883 0 : return JS_FALSE;
2884 : uint32_t arg6;
2885 0 : if (!JS_ValueToECMAUint32(cx, (6 < argc ? argv[6] : JSVAL_NULL), &arg6))
2886 0 : return JS_FALSE;
2887 0 : rv = self->AsyncDrawXULElement(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
2888 0 : if (NS_FAILED(rv))
2889 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2890 0 : *vp = JSVAL_VOID;
2891 0 : return JS_TRUE;
2892 : }
2893 :
2894 : // === interface nsIDOMTextMetrics
2895 :
2896 : static JSBool
2897 0 : nsIDOMTextMetrics_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2898 : {
2899 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2900 : nsIDOMTextMetrics *self;
2901 0 : xpc_qsSelfRef selfref;
2902 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2903 0 : return JS_FALSE;
2904 : nsresult rv;
2905 : float result;
2906 0 : rv = self->GetWidth(&result);
2907 0 : if (NS_FAILED(rv))
2908 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2909 0 : return JS_NewNumberValue(cx, result, vp);
2910 : }
2911 :
2912 : // === interface nsIDOMCanvasGradient
2913 :
2914 : static JSBool
2915 0 : nsIDOMCanvasGradient_AddColorStop(JSContext *cx, unsigned argc, jsval *vp)
2916 : {
2917 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2918 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
2919 0 : if (!obj)
2920 0 : return JS_FALSE;
2921 : nsIDOMCanvasGradient *self;
2922 0 : xpc_qsSelfRef selfref;
2923 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
2924 0 : return JS_FALSE;
2925 0 : if (argc < 2)
2926 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
2927 0 : jsval *argv = JS_ARGV(cx, vp);
2928 : double arg0_dbl;
2929 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
2930 0 : return JS_FALSE;
2931 0 : float arg0 = (float) arg0_dbl;
2932 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
2933 : xpc_qsDOMString::eDefaultNullBehavior,
2934 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2935 0 : if (!arg1.IsValid())
2936 0 : return JS_FALSE;
2937 : nsresult rv;
2938 0 : rv = self->AddColorStop(arg0, arg1);
2939 0 : if (NS_FAILED(rv))
2940 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
2941 0 : *vp = JSVAL_VOID;
2942 0 : return JS_TRUE;
2943 : }
2944 :
2945 : // === interface nsIDOMCanvasPattern
2946 :
2947 : // === interface nsIDOMCharacterData
2948 :
2949 : static JSBool
2950 2 : nsIDOMCharacterData_GetData(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2951 : {
2952 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2953 : nsIDOMCharacterData *self;
2954 4 : xpc_qsSelfRef selfref;
2955 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2956 0 : return JS_FALSE;
2957 : nsresult rv;
2958 4 : nsString result;
2959 2 : rv = self->GetData(result);
2960 2 : if (NS_FAILED(rv))
2961 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2962 2 : return xpc::StringToJsval(cx, result, vp);
2963 : }
2964 :
2965 : static JSBool
2966 0 : nsIDOMCharacterData_SetData(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
2967 : {
2968 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2969 : nsIDOMCharacterData *self;
2970 0 : xpc_qsSelfRef selfref;
2971 0 : JS::AutoValueRooter tvr(cx);
2972 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
2973 0 : return JS_FALSE;
2974 : xpc_qsDOMString arg0(cx, *vp, vp,
2975 : xpc_qsDOMString::eDefaultNullBehavior,
2976 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
2977 0 : if (!arg0.IsValid())
2978 0 : return JS_FALSE;
2979 : nsresult rv;
2980 0 : rv = self->SetData(arg0);
2981 0 : if (NS_FAILED(rv))
2982 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
2983 0 : return JS_TRUE;
2984 : }
2985 :
2986 : static JSBool
2987 0 : nsIDOMCharacterData_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
2988 : {
2989 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
2990 : nsIDOMCharacterData *self;
2991 0 : xpc_qsSelfRef selfref;
2992 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
2993 0 : return JS_FALSE;
2994 : nsresult rv;
2995 : PRUint32 result;
2996 0 : rv = self->GetLength(&result);
2997 0 : if (NS_FAILED(rv))
2998 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
2999 0 : *vp = UINT_TO_JSVAL(result);
3000 0 : return JS_TRUE;
3001 : }
3002 :
3003 : // === interface nsIDOMDocument
3004 :
3005 : static JSBool
3006 1652 : nsIDOMDocument_GetDocumentElement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3007 : {
3008 1652 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3009 1652 : JSObject *callee = nsnull;
3010 : nsDocument *self;
3011 3304 : xpc_qsSelfRef selfref;
3012 3304 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3013 1652 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
3014 0 : return JS_FALSE;
3015 : nsresult rv;
3016 3304 : nsCOMPtr<nsIDOMElement> result;
3017 1652 : rv = self->GetDocumentElement(getter_AddRefs(result));
3018 1652 : if (NS_FAILED(rv))
3019 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3020 1652 : if (!result) {
3021 0 : *vp = JSVAL_NULL;
3022 0 : return JS_TRUE;
3023 : }
3024 1652 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3025 1652 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3026 0 : return JS_TRUE;
3027 : }
3028 : // After this point do not use 'result'!
3029 3304 : qsObjectHelper helper(result, cache);
3030 1652 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
3031 : }
3032 :
3033 : static JSBool
3034 2 : nsIDOMDocument_GetImplementation(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3035 : {
3036 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3037 2 : JSObject *callee = nsnull;
3038 : nsDocument *self;
3039 4 : xpc_qsSelfRef selfref;
3040 4 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3041 2 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
3042 0 : return JS_FALSE;
3043 : nsresult rv;
3044 4 : nsCOMPtr<nsIDOMDOMImplementation> result;
3045 2 : rv = self->GetImplementation(getter_AddRefs(result));
3046 2 : if (NS_FAILED(rv))
3047 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3048 2 : if (!result) {
3049 0 : *vp = JSVAL_NULL;
3050 0 : return JS_TRUE;
3051 : }
3052 2 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3053 2 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3054 0 : return JS_TRUE;
3055 : }
3056 : // After this point do not use 'result'!
3057 4 : qsObjectHelper helper(result, cache);
3058 2 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMImplementation), &interfaces[k_nsIDOMDOMImplementation], vp);
3059 : }
3060 :
3061 : static JSBool
3062 26 : nsIDOMDocument_GetElementsByTagName(JSContext *cx, unsigned argc, jsval *vp)
3063 : {
3064 26 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3065 26 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3066 26 : if (!obj)
3067 0 : return JS_FALSE;
3068 26 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3069 : nsDocument *self;
3070 52 : xpc_qsSelfRef selfref;
3071 52 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3072 26 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3073 0 : return JS_FALSE;
3074 26 : if (argc < 1)
3075 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3076 26 : jsval *argv = JS_ARGV(cx, vp);
3077 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3078 : xpc_qsDOMString::eDefaultNullBehavior,
3079 52 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3080 26 : if (!arg0.IsValid())
3081 0 : return JS_FALSE;
3082 52 : nsRefPtr<nsContentList> result =self->GetElementsByTagName(arg0);
3083 26 : if (!result) {
3084 0 : *vp = JSVAL_NULL;
3085 0 : return JS_TRUE;
3086 : }
3087 26 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3088 26 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3089 10 : return JS_TRUE;
3090 : }
3091 : // After this point do not use 'result'!
3092 32 : qsObjectHelper helper(result, cache);
3093 16 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
3094 : }
3095 :
3096 : static JSBool
3097 0 : nsIDOMDocument_GetDoctype(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3098 : {
3099 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3100 0 : JSObject *callee = nsnull;
3101 : nsDocument *self;
3102 0 : xpc_qsSelfRef selfref;
3103 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3104 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
3105 0 : return JS_FALSE;
3106 : nsresult rv;
3107 0 : nsCOMPtr<nsIDOMDocumentType> result;
3108 0 : rv = self->GetDoctype(getter_AddRefs(result));
3109 0 : if (NS_FAILED(rv))
3110 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3111 0 : if (!result) {
3112 0 : *vp = JSVAL_NULL;
3113 0 : return JS_TRUE;
3114 : }
3115 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3116 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3117 0 : return JS_TRUE;
3118 : }
3119 : // After this point do not use 'result'!
3120 0 : qsObjectHelper helper(result, cache);
3121 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentType), &interfaces[k_nsIDOMDocumentType], vp);
3122 : }
3123 :
3124 : static JSBool
3125 40 : nsIDOMDocument_GetElementsByTagNameNS(JSContext *cx, unsigned argc, jsval *vp)
3126 : {
3127 40 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3128 40 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3129 40 : if (!obj)
3130 0 : return JS_FALSE;
3131 40 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3132 : nsDocument *self;
3133 80 : xpc_qsSelfRef selfref;
3134 80 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3135 40 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3136 0 : return JS_FALSE;
3137 40 : if (argc < 2)
3138 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3139 40 : jsval *argv = JS_ARGV(cx, vp);
3140 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3141 : xpc_qsDOMString::eDefaultNullBehavior,
3142 80 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3143 40 : if (!arg0.IsValid())
3144 0 : return JS_FALSE;
3145 40 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
3146 : xpc_qsDOMString::eDefaultNullBehavior,
3147 120 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3148 40 : if (!arg1.IsValid())
3149 0 : return JS_FALSE;
3150 80 : nsRefPtr<nsContentList> result =self->GetElementsByTagNameNS(arg0, arg1);
3151 40 : if (!result) {
3152 0 : *vp = JSVAL_NULL;
3153 0 : return JS_TRUE;
3154 : }
3155 40 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3156 40 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3157 21 : return JS_TRUE;
3158 : }
3159 : // After this point do not use 'result'!
3160 38 : qsObjectHelper helper(result, cache);
3161 19 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
3162 : }
3163 :
3164 : static JSBool
3165 78 : nsIDOMDocument_GetElementById(JSContext *cx, unsigned argc, jsval *vp)
3166 : {
3167 78 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3168 78 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3169 78 : if (!obj)
3170 0 : return JS_FALSE;
3171 78 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3172 : nsDocument *self;
3173 156 : xpc_qsSelfRef selfref;
3174 156 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3175 78 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3176 0 : return JS_FALSE;
3177 78 : if (argc < 1)
3178 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3179 78 : jsval *argv = JS_ARGV(cx, vp);
3180 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3181 : xpc_qsDOMString::eDefaultNullBehavior,
3182 156 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3183 78 : if (!arg0.IsValid())
3184 0 : return JS_FALSE;
3185 78 : mozilla::dom::Element *result = self->GetElementById(arg0);
3186 78 : if (!result) {
3187 0 : *vp = JSVAL_NULL;
3188 0 : return JS_TRUE;
3189 : }
3190 78 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3191 78 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3192 53 : return JS_TRUE;
3193 : }
3194 : // After this point do not use 'result'!
3195 50 : qsObjectHelper helper(result, cache);
3196 25 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
3197 : }
3198 :
3199 : static JSBool
3200 57 : nsIDOMDocument_CreateDocumentFragment(JSContext *cx, unsigned argc, jsval *vp)
3201 : {
3202 57 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3203 57 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3204 57 : if (!obj)
3205 0 : return JS_FALSE;
3206 57 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3207 : nsDocument *self;
3208 114 : xpc_qsSelfRef selfref;
3209 114 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3210 57 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3211 0 : return JS_FALSE;
3212 : nsresult rv;
3213 114 : nsCOMPtr<nsIDOMDocumentFragment> result;
3214 57 : rv = self->CreateDocumentFragment(getter_AddRefs(result));
3215 57 : if (NS_FAILED(rv))
3216 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3217 57 : if (!result) {
3218 0 : *vp = JSVAL_NULL;
3219 0 : return JS_TRUE;
3220 : }
3221 57 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3222 57 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3223 0 : return JS_TRUE;
3224 : }
3225 : // After this point do not use 'result'!
3226 114 : qsObjectHelper helper(result, cache);
3227 57 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentFragment), &interfaces[k_nsIDOMDocumentFragment], vp);
3228 : }
3229 :
3230 : static JSBool
3231 8 : nsIDOMDocument_CreateElement(JSContext *cx, unsigned argc, jsval *vp)
3232 : {
3233 8 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3234 8 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3235 8 : if (!obj)
3236 0 : return JS_FALSE;
3237 8 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3238 : nsDocument *self;
3239 16 : xpc_qsSelfRef selfref;
3240 16 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3241 8 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3242 0 : return JS_FALSE;
3243 8 : if (argc < 1)
3244 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3245 8 : jsval *argv = JS_ARGV(cx, vp);
3246 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3247 : xpc_qsDOMString::eDefaultNullBehavior,
3248 16 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3249 8 : if (!arg0.IsValid())
3250 0 : return JS_FALSE;
3251 : nsresult rv;
3252 16 : nsCOMPtr<nsIContent> result;
3253 8 : rv = self->CreateElement(arg0, getter_AddRefs(result));
3254 8 : if (NS_FAILED(rv))
3255 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3256 8 : if (!result) {
3257 0 : *vp = JSVAL_NULL;
3258 0 : return JS_TRUE;
3259 : }
3260 8 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3261 8 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3262 0 : return JS_TRUE;
3263 : }
3264 : // After this point do not use 'result'!
3265 16 : qsObjectHelper helper(result, cache);
3266 8 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
3267 : }
3268 :
3269 : static JSBool
3270 165 : nsIDOMDocument_CreateElementNS(JSContext *cx, unsigned argc, jsval *vp)
3271 : {
3272 165 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3273 165 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3274 165 : if (!obj)
3275 0 : return JS_FALSE;
3276 165 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3277 : nsDocument *self;
3278 330 : xpc_qsSelfRef selfref;
3279 330 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3280 165 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3281 0 : return JS_FALSE;
3282 165 : if (argc < 2)
3283 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3284 165 : jsval *argv = JS_ARGV(cx, vp);
3285 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3286 : xpc_qsDOMString::eDefaultNullBehavior,
3287 330 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3288 165 : if (!arg0.IsValid())
3289 0 : return JS_FALSE;
3290 165 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
3291 : xpc_qsDOMString::eDefaultNullBehavior,
3292 495 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3293 165 : if (!arg1.IsValid())
3294 0 : return JS_FALSE;
3295 : nsresult rv;
3296 330 : nsCOMPtr<nsIContent> result;
3297 165 : rv = self->CreateElementNS(arg0, arg1, getter_AddRefs(result));
3298 165 : if (NS_FAILED(rv))
3299 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3300 165 : if (!result) {
3301 0 : *vp = JSVAL_NULL;
3302 0 : return JS_TRUE;
3303 : }
3304 165 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3305 165 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3306 0 : return JS_TRUE;
3307 : }
3308 : // After this point do not use 'result'!
3309 330 : qsObjectHelper helper(result, cache);
3310 165 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
3311 : }
3312 :
3313 : static JSBool
3314 0 : nsIDOMDocument_ImportNode(JSContext *cx, unsigned argc, jsval *vp)
3315 : {
3316 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3317 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3318 0 : if (!obj)
3319 0 : return JS_FALSE;
3320 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3321 : nsDocument *self;
3322 0 : xpc_qsSelfRef selfref;
3323 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3324 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3325 0 : return JS_FALSE;
3326 0 : if (argc < 1)
3327 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3328 0 : jsval *argv = JS_ARGV(cx, vp);
3329 : nsresult rv;
3330 : nsIDOMNode *arg0;
3331 0 : xpc_qsSelfRef arg0ref;
3332 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
3333 0 : if (NS_FAILED(rv)) {
3334 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
3335 0 : return JS_FALSE;
3336 : }
3337 : JSBool arg1;
3338 0 : JS_ValueToBoolean(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1);
3339 0 : nsCOMPtr<nsIDOMNode> result;
3340 0 : rv = self->ImportNode(arg0, arg1, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
3341 0 : if (NS_FAILED(rv))
3342 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3343 0 : if (!result) {
3344 0 : *vp = JSVAL_NULL;
3345 0 : return JS_TRUE;
3346 : }
3347 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3348 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3349 0 : return JS_TRUE;
3350 : }
3351 : // After this point do not use 'result'!
3352 0 : qsObjectHelper helper(result, cache);
3353 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
3354 : }
3355 :
3356 : static JSBool
3357 34 : nsIDOMDocument_CreateTextNode(JSContext *cx, unsigned argc, jsval *vp)
3358 : {
3359 34 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3360 34 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3361 34 : if (!obj)
3362 0 : return JS_FALSE;
3363 34 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3364 : nsDocument *self;
3365 68 : xpc_qsSelfRef selfref;
3366 68 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3367 34 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3368 0 : return JS_FALSE;
3369 34 : if (argc < 1)
3370 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3371 34 : jsval *argv = JS_ARGV(cx, vp);
3372 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3373 : xpc_qsDOMString::eDefaultNullBehavior,
3374 68 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3375 34 : if (!arg0.IsValid())
3376 0 : return JS_FALSE;
3377 : nsresult rv;
3378 68 : nsCOMPtr<nsIContent> result;
3379 34 : rv = self->CreateTextNode(arg0, getter_AddRefs(result));
3380 34 : if (NS_FAILED(rv))
3381 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3382 34 : if (!result) {
3383 0 : *vp = JSVAL_NULL;
3384 0 : return JS_TRUE;
3385 : }
3386 34 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3387 34 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3388 0 : return JS_TRUE;
3389 : }
3390 : // After this point do not use 'result'!
3391 68 : qsObjectHelper helper(result, cache);
3392 34 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMText), &interfaces[k_nsIDOMText], vp);
3393 : }
3394 :
3395 : static JSBool
3396 0 : nsIDOMDocument_GetDocumentURI(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3397 : {
3398 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3399 : nsDocument *self;
3400 0 : xpc_qsSelfRef selfref;
3401 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
3402 0 : return JS_FALSE;
3403 : nsresult rv;
3404 0 : nsString result;
3405 0 : rv = self->GetDocumentURI(result);
3406 0 : if (NS_FAILED(rv))
3407 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3408 0 : return xpc::StringToJsval(cx, result, vp);
3409 : }
3410 :
3411 : static JSBool
3412 0 : nsIDOMDocument_AdoptNode(JSContext *cx, unsigned argc, jsval *vp)
3413 : {
3414 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3415 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3416 0 : if (!obj)
3417 0 : return JS_FALSE;
3418 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3419 : nsDocument *self;
3420 0 : xpc_qsSelfRef selfref;
3421 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3422 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3423 0 : return JS_FALSE;
3424 0 : if (argc < 1)
3425 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3426 0 : jsval *argv = JS_ARGV(cx, vp);
3427 : nsresult rv;
3428 : nsIDOMNode *arg0;
3429 0 : xpc_qsSelfRef arg0ref;
3430 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
3431 0 : if (NS_FAILED(rv)) {
3432 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
3433 0 : return JS_FALSE;
3434 : }
3435 0 : nsCOMPtr<nsIDOMNode> result;
3436 0 : rv = self->AdoptNode(arg0, getter_AddRefs(result));
3437 0 : if (NS_FAILED(rv))
3438 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3439 0 : if (!result) {
3440 0 : *vp = JSVAL_NULL;
3441 0 : return JS_TRUE;
3442 : }
3443 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3444 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3445 0 : return JS_TRUE;
3446 : }
3447 : // After this point do not use 'result'!
3448 0 : qsObjectHelper helper(result, cache);
3449 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
3450 : }
3451 :
3452 : static JSBool
3453 0 : nsIDOMDocument_GetDefaultView(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3454 : {
3455 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3456 0 : JSObject *callee = nsnull;
3457 : nsDocument *self;
3458 0 : xpc_qsSelfRef selfref;
3459 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3460 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
3461 0 : return JS_FALSE;
3462 : nsresult rv;
3463 0 : nsCOMPtr<nsIDOMWindow> result;
3464 0 : rv = self->GetDefaultView(getter_AddRefs(result));
3465 0 : if (NS_FAILED(rv))
3466 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3467 0 : if (!result) {
3468 0 : *vp = JSVAL_NULL;
3469 0 : return JS_TRUE;
3470 : }
3471 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3472 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3473 0 : return JS_TRUE;
3474 : }
3475 : // After this point do not use 'result'!
3476 0 : qsObjectHelper helper(result, cache);
3477 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
3478 : }
3479 :
3480 : static JSBool
3481 0 : nsIDOMDocument_CreateNodeIterator(JSContext *cx, unsigned argc, jsval *vp)
3482 : {
3483 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3484 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3485 0 : if (!obj)
3486 0 : return JS_FALSE;
3487 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3488 : nsDocument *self;
3489 0 : xpc_qsSelfRef selfref;
3490 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3491 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3492 0 : return JS_FALSE;
3493 0 : if (argc < 1)
3494 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3495 0 : jsval *argv = JS_ARGV(cx, vp);
3496 : nsresult rv;
3497 : nsIDOMNode *arg0;
3498 0 : xpc_qsSelfRef arg0ref;
3499 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
3500 0 : if (NS_FAILED(rv)) {
3501 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
3502 0 : return JS_FALSE;
3503 : }
3504 : uint32_t arg1;
3505 0 : if (!JS_ValueToECMAUint32(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
3506 0 : return JS_FALSE;
3507 : nsIDOMNodeFilter *arg2;
3508 0 : xpc_qsSelfRef arg2ref;
3509 0 : rv = xpc_qsUnwrapArg<nsIDOMNodeFilter>(cx, (2 < argc ? argv[2] : JSVAL_NULL), &arg2, &arg2ref.ptr, (2 < argc ? &argv[2] : NULL));
3510 0 : if (NS_FAILED(rv)) {
3511 0 : xpc_qsThrowBadArg(cx, rv, vp, 2);
3512 0 : return JS_FALSE;
3513 : }
3514 0 : nsCOMPtr<nsIDOMNodeIterator> result;
3515 0 : rv = self->CreateNodeIterator(arg0, arg1, arg2, NS_MIN<PRUint32>(argc, 3) - 1, getter_AddRefs(result));
3516 0 : if (NS_FAILED(rv))
3517 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3518 0 : if (!result) {
3519 0 : *vp = JSVAL_NULL;
3520 0 : return JS_TRUE;
3521 : }
3522 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3523 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3524 0 : return JS_TRUE;
3525 : }
3526 : // After this point do not use 'result'!
3527 0 : qsObjectHelper helper(result, cache);
3528 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeIterator), &interfaces[k_nsIDOMNodeIterator], vp);
3529 : }
3530 :
3531 : static JSBool
3532 2 : nsIDOMDocument_CreateEvent(JSContext *cx, unsigned argc, jsval *vp)
3533 : {
3534 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3535 2 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3536 2 : if (!obj)
3537 0 : return JS_FALSE;
3538 2 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3539 : nsDocument *self;
3540 4 : xpc_qsSelfRef selfref;
3541 4 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3542 2 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3543 0 : return JS_FALSE;
3544 2 : if (argc < 1)
3545 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3546 2 : jsval *argv = JS_ARGV(cx, vp);
3547 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3548 : xpc_qsDOMString::eDefaultNullBehavior,
3549 4 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3550 2 : if (!arg0.IsValid())
3551 0 : return JS_FALSE;
3552 : nsresult rv;
3553 4 : nsCOMPtr<nsIDOMEvent> result;
3554 2 : rv = self->CreateEvent(arg0, getter_AddRefs(result));
3555 2 : if (NS_FAILED(rv))
3556 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3557 2 : if (!result) {
3558 0 : *vp = JSVAL_NULL;
3559 0 : return JS_TRUE;
3560 : }
3561 2 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3562 2 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3563 0 : return JS_TRUE;
3564 : }
3565 : // After this point do not use 'result'!
3566 4 : qsObjectHelper helper(result, cache);
3567 2 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEvent), &interfaces[k_nsIDOMEvent], vp);
3568 : }
3569 :
3570 : static JSBool
3571 0 : nsIDOMDocument_GetElementsByClassName(JSContext *cx, unsigned argc, jsval *vp)
3572 : {
3573 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3574 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3575 0 : if (!obj)
3576 0 : return JS_FALSE;
3577 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3578 : nsDocument *self;
3579 0 : xpc_qsSelfRef selfref;
3580 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3581 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3582 0 : return JS_FALSE;
3583 0 : if (argc < 1)
3584 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3585 0 : jsval *argv = JS_ARGV(cx, vp);
3586 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3587 : xpc_qsDOMString::eDefaultNullBehavior,
3588 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3589 0 : if (!arg0.IsValid())
3590 0 : return JS_FALSE;
3591 : nsresult rv;
3592 0 : nsCOMPtr<nsIDOMNodeList> result;
3593 0 : rv = self->GetElementsByClassName(arg0, getter_AddRefs(result));
3594 0 : if (NS_FAILED(rv))
3595 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3596 0 : if (!result) {
3597 0 : *vp = JSVAL_NULL;
3598 0 : return JS_TRUE;
3599 : }
3600 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3601 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3602 0 : return JS_TRUE;
3603 : }
3604 : // After this point do not use 'result'!
3605 0 : qsObjectHelper helper(result, cache);
3606 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
3607 : }
3608 :
3609 : static JSBool
3610 0 : nsIDOMDocument_GetTitle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3611 : {
3612 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3613 : nsDocument *self;
3614 0 : xpc_qsSelfRef selfref;
3615 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
3616 0 : return JS_FALSE;
3617 : nsresult rv;
3618 0 : nsString result;
3619 0 : rv = self->GetTitle(result);
3620 0 : if (NS_FAILED(rv))
3621 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3622 0 : return xpc::StringToJsval(cx, result, vp);
3623 : }
3624 :
3625 : static JSBool
3626 0 : nsIDOMDocument_SetTitle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
3627 : {
3628 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3629 : nsDocument *self;
3630 0 : xpc_qsSelfRef selfref;
3631 0 : JS::AutoValueRooter tvr(cx);
3632 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
3633 0 : return JS_FALSE;
3634 : xpc_qsDOMString arg0(cx, *vp, vp,
3635 : xpc_qsDOMString::eDefaultNullBehavior,
3636 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3637 0 : if (!arg0.IsValid())
3638 0 : return JS_FALSE;
3639 : nsresult rv;
3640 0 : rv = self->SetTitle(arg0);
3641 0 : if (NS_FAILED(rv))
3642 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
3643 0 : return JS_TRUE;
3644 : }
3645 :
3646 : static JSBool
3647 0 : nsIDOMDocument_GetReferrer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3648 : {
3649 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3650 : nsDocument *self;
3651 0 : xpc_qsSelfRef selfref;
3652 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
3653 0 : return JS_FALSE;
3654 : nsresult rv;
3655 0 : nsString result;
3656 0 : rv = self->GetReferrer(result);
3657 0 : if (NS_FAILED(rv))
3658 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3659 0 : return xpc::StringToJsval(cx, result, vp);
3660 : }
3661 :
3662 : static JSBool
3663 0 : nsIDOMDocument_HasFocus(JSContext *cx, unsigned argc, jsval *vp)
3664 : {
3665 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3666 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3667 0 : if (!obj)
3668 0 : return JS_FALSE;
3669 : nsDocument *self;
3670 0 : xpc_qsSelfRef selfref;
3671 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
3672 0 : return JS_FALSE;
3673 : nsresult rv;
3674 : bool result;
3675 0 : rv = self->HasFocus(&result);
3676 0 : if (NS_FAILED(rv))
3677 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3678 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
3679 0 : return JS_TRUE;
3680 : }
3681 :
3682 : static JSBool
3683 0 : nsIDOMDocument_ElementFromPoint(JSContext *cx, unsigned argc, jsval *vp)
3684 : {
3685 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3686 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3687 0 : if (!obj)
3688 0 : return JS_FALSE;
3689 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3690 : nsDocument *self;
3691 0 : xpc_qsSelfRef selfref;
3692 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3693 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3694 0 : return JS_FALSE;
3695 0 : if (argc < 2)
3696 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3697 0 : jsval *argv = JS_ARGV(cx, vp);
3698 : double arg0_dbl;
3699 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
3700 0 : return JS_FALSE;
3701 0 : float arg0 = (float) arg0_dbl;
3702 : double arg1_dbl;
3703 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
3704 0 : return JS_FALSE;
3705 0 : float arg1 = (float) arg1_dbl;
3706 : nsresult rv;
3707 0 : nsCOMPtr<nsIDOMElement> result;
3708 0 : rv = self->ElementFromPoint(arg0, arg1, getter_AddRefs(result));
3709 0 : if (NS_FAILED(rv))
3710 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3711 0 : if (!result) {
3712 0 : *vp = JSVAL_NULL;
3713 0 : return JS_TRUE;
3714 : }
3715 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3716 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3717 0 : return JS_TRUE;
3718 : }
3719 : // After this point do not use 'result'!
3720 0 : qsObjectHelper helper(result, cache);
3721 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
3722 : }
3723 :
3724 : static JSBool
3725 0 : nsIDOMDocument_GetActiveElement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3726 : {
3727 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3728 0 : JSObject *callee = nsnull;
3729 : nsDocument *self;
3730 0 : xpc_qsSelfRef selfref;
3731 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3732 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
3733 0 : return JS_FALSE;
3734 : nsresult rv;
3735 0 : nsCOMPtr<nsIDOMElement> result;
3736 0 : rv = self->GetActiveElement(getter_AddRefs(result));
3737 0 : if (NS_FAILED(rv))
3738 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3739 0 : if (!result) {
3740 0 : *vp = JSVAL_NULL;
3741 0 : return JS_TRUE;
3742 : }
3743 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3744 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3745 0 : return JS_TRUE;
3746 : }
3747 : // After this point do not use 'result'!
3748 0 : qsObjectHelper helper(result, cache);
3749 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
3750 : }
3751 :
3752 : static JSBool
3753 0 : nsIDOMDocument_GetOnreadystatechange(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3754 : {
3755 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3756 : nsDocument *self;
3757 0 : xpc_qsSelfRef selfref;
3758 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
3759 0 : return JS_FALSE;
3760 0 : if (!self) {
3761 0 : *vp = JSVAL_NULL;
3762 0 : return JS_TRUE;
3763 : }
3764 : nsresult rv;
3765 0 : rv = self->GetOnreadystatechange(cx, vp);
3766 0 : if (NS_FAILED(rv))
3767 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3768 0 : return JS_TRUE;
3769 : }
3770 :
3771 : static JSBool
3772 0 : nsIDOMDocument_SetOnreadystatechange(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
3773 : {
3774 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3775 : nsDocument *self;
3776 0 : xpc_qsSelfRef selfref;
3777 0 : JS::AutoValueRooter tvr(cx);
3778 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
3779 0 : return JS_FALSE;
3780 0 : if (!self) {
3781 0 : return JS_TRUE;
3782 : }
3783 0 : jsval arg0 = *vp;
3784 : nsresult rv;
3785 0 : rv = self->SetOnreadystatechange(cx, arg0);
3786 0 : if (NS_FAILED(rv))
3787 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
3788 0 : return JS_TRUE;
3789 : }
3790 :
3791 : static JSBool
3792 0 : nsIDOMDocument_GetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3793 : {
3794 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3795 : nsDocument *self;
3796 0 : xpc_qsSelfRef selfref;
3797 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
3798 0 : return JS_FALSE;
3799 0 : if (!self) {
3800 0 : *vp = JSVAL_NULL;
3801 0 : return JS_TRUE;
3802 : }
3803 : nsresult rv;
3804 0 : rv = self->GetOnmouseenter(cx, vp);
3805 0 : if (NS_FAILED(rv))
3806 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3807 0 : return JS_TRUE;
3808 : }
3809 :
3810 : static JSBool
3811 0 : nsIDOMDocument_SetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
3812 : {
3813 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3814 : nsDocument *self;
3815 0 : xpc_qsSelfRef selfref;
3816 0 : JS::AutoValueRooter tvr(cx);
3817 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
3818 0 : return JS_FALSE;
3819 0 : if (!self) {
3820 0 : return JS_TRUE;
3821 : }
3822 0 : jsval arg0 = *vp;
3823 : nsresult rv;
3824 0 : rv = self->SetOnmouseenter(cx, arg0);
3825 0 : if (NS_FAILED(rv))
3826 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
3827 0 : return JS_TRUE;
3828 : }
3829 :
3830 : static JSBool
3831 0 : nsIDOMDocument_GetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
3832 : {
3833 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3834 : nsDocument *self;
3835 0 : xpc_qsSelfRef selfref;
3836 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
3837 0 : return JS_FALSE;
3838 0 : if (!self) {
3839 0 : *vp = JSVAL_NULL;
3840 0 : return JS_TRUE;
3841 : }
3842 : nsresult rv;
3843 0 : rv = self->GetOnmouseleave(cx, vp);
3844 0 : if (NS_FAILED(rv))
3845 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
3846 0 : return JS_TRUE;
3847 : }
3848 :
3849 : static JSBool
3850 0 : nsIDOMDocument_SetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
3851 : {
3852 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3853 : nsDocument *self;
3854 0 : xpc_qsSelfRef selfref;
3855 0 : JS::AutoValueRooter tvr(cx);
3856 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
3857 0 : return JS_FALSE;
3858 0 : if (!self) {
3859 0 : return JS_TRUE;
3860 : }
3861 0 : jsval arg0 = *vp;
3862 : nsresult rv;
3863 0 : rv = self->SetOnmouseleave(cx, arg0);
3864 0 : if (NS_FAILED(rv))
3865 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
3866 0 : return JS_TRUE;
3867 : }
3868 :
3869 : // === interface nsIDOMElement
3870 :
3871 : static JSBool
3872 0 : nsIDOMElement_RemoveAttributeNS(JSContext *cx, unsigned argc, jsval *vp)
3873 : {
3874 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3875 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3876 0 : if (!obj)
3877 0 : return JS_FALSE;
3878 : nsGenericElement *self;
3879 0 : xpc_qsSelfRef selfref;
3880 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
3881 0 : return JS_FALSE;
3882 0 : if (argc < 2)
3883 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3884 0 : jsval *argv = JS_ARGV(cx, vp);
3885 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3886 : xpc_qsDOMString::eDefaultNullBehavior,
3887 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3888 0 : if (!arg0.IsValid())
3889 0 : return JS_FALSE;
3890 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
3891 : xpc_qsDOMString::eDefaultNullBehavior,
3892 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3893 0 : if (!arg1.IsValid())
3894 0 : return JS_FALSE;
3895 : nsresult rv;
3896 0 : rv = self->RemoveAttributeNS(arg0, arg1);
3897 0 : if (NS_FAILED(rv))
3898 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3899 0 : *vp = JSVAL_VOID;
3900 0 : return JS_TRUE;
3901 : }
3902 :
3903 : static JSBool
3904 0 : nsIDOMElement_RemoveAttribute(JSContext *cx, unsigned argc, jsval *vp)
3905 : {
3906 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3907 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3908 0 : if (!obj)
3909 0 : return JS_FALSE;
3910 : nsGenericElement *self;
3911 0 : xpc_qsSelfRef selfref;
3912 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
3913 0 : return JS_FALSE;
3914 0 : if (argc < 1)
3915 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3916 0 : jsval *argv = JS_ARGV(cx, vp);
3917 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3918 : xpc_qsDOMString::eDefaultNullBehavior,
3919 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3920 0 : if (!arg0.IsValid())
3921 0 : return JS_FALSE;
3922 : nsresult rv;
3923 0 : rv = self->RemoveAttribute(arg0);
3924 0 : if (NS_FAILED(rv))
3925 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3926 0 : *vp = JSVAL_VOID;
3927 0 : return JS_TRUE;
3928 : }
3929 :
3930 : static JSBool
3931 3386 : nsIDOMElement_GetAttribute(JSContext *cx, unsigned argc, jsval *vp)
3932 : {
3933 3386 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3934 3386 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3935 3386 : if (!obj)
3936 0 : return JS_FALSE;
3937 : nsGenericElement *self;
3938 6772 : xpc_qsSelfRef selfref;
3939 3386 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
3940 0 : return JS_FALSE;
3941 3386 : if (argc < 1)
3942 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3943 3386 : jsval *argv = JS_ARGV(cx, vp);
3944 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3945 : xpc_qsDOMString::eDefaultNullBehavior,
3946 6772 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3947 3386 : if (!arg0.IsValid())
3948 0 : return JS_FALSE;
3949 : nsresult rv;
3950 6772 : nsString result;
3951 3386 : rv = self->GetAttribute(arg0, result);
3952 3386 : if (NS_FAILED(rv))
3953 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3954 3386 : return xpc::StringToJsval(cx, result, vp);
3955 : }
3956 :
3957 : static JSBool
3958 2485 : nsIDOMElement_GetElementsByTagName(JSContext *cx, unsigned argc, jsval *vp)
3959 : {
3960 2485 : XPC_QS_ASSERT_CONTEXT_OK(cx);
3961 2485 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
3962 2485 : if (!obj)
3963 0 : return JS_FALSE;
3964 2485 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
3965 : nsGenericElement *self;
3966 4970 : xpc_qsSelfRef selfref;
3967 4970 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
3968 2485 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
3969 0 : return JS_FALSE;
3970 2485 : if (argc < 1)
3971 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
3972 2485 : jsval *argv = JS_ARGV(cx, vp);
3973 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
3974 : xpc_qsDOMString::eDefaultNullBehavior,
3975 4970 : xpc_qsDOMString::eDefaultUndefinedBehavior);
3976 2485 : if (!arg0.IsValid())
3977 0 : return JS_FALSE;
3978 : nsresult rv;
3979 4970 : nsCOMPtr<nsIDOMNodeList> result;
3980 2485 : rv = self->GetElementsByTagName(arg0, getter_AddRefs(result));
3981 2485 : if (NS_FAILED(rv))
3982 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
3983 2485 : if (!result) {
3984 0 : *vp = JSVAL_NULL;
3985 0 : return JS_TRUE;
3986 : }
3987 2485 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
3988 2485 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
3989 0 : return JS_TRUE;
3990 : }
3991 : // After this point do not use 'result'!
3992 4970 : qsObjectHelper helper(result, cache);
3993 2485 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
3994 : }
3995 :
3996 : static JSBool
3997 1847 : nsIDOMElement_SetAttribute(JSContext *cx, unsigned argc, jsval *vp)
3998 : {
3999 1847 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4000 1847 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4001 1847 : if (!obj)
4002 0 : return JS_FALSE;
4003 : nsGenericElement *self;
4004 3694 : xpc_qsSelfRef selfref;
4005 1847 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4006 0 : return JS_FALSE;
4007 1847 : if (argc < 2)
4008 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4009 1847 : jsval *argv = JS_ARGV(cx, vp);
4010 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4011 : xpc_qsDOMString::eDefaultNullBehavior,
4012 3694 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4013 1847 : if (!arg0.IsValid())
4014 0 : return JS_FALSE;
4015 1847 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
4016 : xpc_qsDOMString::eDefaultNullBehavior,
4017 5541 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4018 1847 : if (!arg1.IsValid())
4019 0 : return JS_FALSE;
4020 : nsresult rv;
4021 1847 : rv = self->SetAttribute(arg0, arg1);
4022 1847 : if (NS_FAILED(rv))
4023 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4024 1847 : *vp = JSVAL_VOID;
4025 1847 : return JS_TRUE;
4026 : }
4027 :
4028 : static JSBool
4029 10 : nsIDOMElement_GetElementsByTagNameNS(JSContext *cx, unsigned argc, jsval *vp)
4030 : {
4031 10 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4032 10 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4033 10 : if (!obj)
4034 0 : return JS_FALSE;
4035 10 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4036 : nsGenericElement *self;
4037 20 : xpc_qsSelfRef selfref;
4038 20 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4039 10 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4040 0 : return JS_FALSE;
4041 10 : if (argc < 2)
4042 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4043 10 : jsval *argv = JS_ARGV(cx, vp);
4044 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4045 : xpc_qsDOMString::eDefaultNullBehavior,
4046 20 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4047 10 : if (!arg0.IsValid())
4048 0 : return JS_FALSE;
4049 10 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
4050 : xpc_qsDOMString::eDefaultNullBehavior,
4051 30 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4052 10 : if (!arg1.IsValid())
4053 0 : return JS_FALSE;
4054 : nsresult rv;
4055 20 : nsCOMPtr<nsIDOMNodeList> result;
4056 10 : rv = self->GetElementsByTagNameNS(arg0, arg1, getter_AddRefs(result));
4057 10 : if (NS_FAILED(rv))
4058 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4059 10 : if (!result) {
4060 0 : *vp = JSVAL_NULL;
4061 0 : return JS_TRUE;
4062 : }
4063 10 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4064 10 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4065 0 : return JS_TRUE;
4066 : }
4067 : // After this point do not use 'result'!
4068 20 : qsObjectHelper helper(result, cache);
4069 10 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
4070 : }
4071 :
4072 : static JSBool
4073 0 : nsIDOMElement_HasAttributeNS(JSContext *cx, unsigned argc, jsval *vp)
4074 : {
4075 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4076 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4077 0 : if (!obj)
4078 0 : return JS_FALSE;
4079 : nsGenericElement *self;
4080 0 : xpc_qsSelfRef selfref;
4081 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4082 0 : return JS_FALSE;
4083 0 : if (argc < 2)
4084 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4085 0 : jsval *argv = JS_ARGV(cx, vp);
4086 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4087 : xpc_qsDOMString::eDefaultNullBehavior,
4088 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4089 0 : if (!arg0.IsValid())
4090 0 : return JS_FALSE;
4091 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
4092 : xpc_qsDOMString::eDefaultNullBehavior,
4093 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4094 0 : if (!arg1.IsValid())
4095 0 : return JS_FALSE;
4096 : nsresult rv;
4097 : bool result;
4098 0 : rv = self->HasAttributeNS(arg0, arg1, &result);
4099 0 : if (NS_FAILED(rv))
4100 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4101 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
4102 0 : return JS_TRUE;
4103 : }
4104 :
4105 : static JSBool
4106 433 : nsIDOMElement_GetTagName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4107 : {
4108 433 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4109 : nsGenericElement *self;
4110 866 : xpc_qsSelfRef selfref;
4111 433 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
4112 0 : return JS_FALSE;
4113 866 : nsString result = self->NodeName();
4114 : #ifdef DEBUG
4115 : nsresult debug_rv;
4116 866 : nsCOMPtr<nsIDOMElement> debug_self;
4117 433 : CallQueryInterface(self, getter_AddRefs(debug_self));
4118 866 : nsString debug_result;
4119 433 : debug_rv = debug_self->GetTagName(debug_result);
4120 433 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4121 : "Got the wrong answer from the custom method call!");
4122 : #endif
4123 433 : return xpc::StringToJsval(cx, result, vp);
4124 : }
4125 :
4126 : static JSBool
4127 26 : nsIDOMElement_SetAttributeNS(JSContext *cx, unsigned argc, jsval *vp)
4128 : {
4129 26 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4130 26 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4131 26 : if (!obj)
4132 0 : return JS_FALSE;
4133 : nsGenericElement *self;
4134 52 : xpc_qsSelfRef selfref;
4135 26 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4136 0 : return JS_FALSE;
4137 26 : if (argc < 3)
4138 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4139 26 : jsval *argv = JS_ARGV(cx, vp);
4140 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4141 : xpc_qsDOMString::eDefaultNullBehavior,
4142 52 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4143 26 : if (!arg0.IsValid())
4144 0 : return JS_FALSE;
4145 26 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
4146 : xpc_qsDOMString::eDefaultNullBehavior,
4147 78 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4148 26 : if (!arg1.IsValid())
4149 0 : return JS_FALSE;
4150 26 : xpc_qsDOMString arg2(cx, argv[2], &argv[2],
4151 : xpc_qsDOMString::eDefaultNullBehavior,
4152 78 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4153 26 : if (!arg2.IsValid())
4154 0 : return JS_FALSE;
4155 : nsresult rv;
4156 26 : rv = self->SetAttributeNS(arg0, arg1, arg2);
4157 26 : if (NS_FAILED(rv))
4158 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4159 26 : *vp = JSVAL_VOID;
4160 26 : return JS_TRUE;
4161 : }
4162 :
4163 : static JSBool
4164 2560 : nsIDOMElement_HasAttribute(JSContext *cx, unsigned argc, jsval *vp)
4165 : {
4166 2560 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4167 2560 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4168 2560 : if (!obj)
4169 0 : return JS_FALSE;
4170 : nsGenericElement *self;
4171 5120 : xpc_qsSelfRef selfref;
4172 2560 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4173 0 : return JS_FALSE;
4174 2560 : if (argc < 1)
4175 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4176 2560 : jsval *argv = JS_ARGV(cx, vp);
4177 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4178 : xpc_qsDOMString::eDefaultNullBehavior,
4179 5120 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4180 2560 : if (!arg0.IsValid())
4181 0 : return JS_FALSE;
4182 : nsresult rv;
4183 : bool result;
4184 2560 : rv = self->HasAttribute(arg0, &result);
4185 2560 : if (NS_FAILED(rv))
4186 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4187 2560 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
4188 2560 : return JS_TRUE;
4189 : }
4190 :
4191 : static JSBool
4192 0 : nsIDOMElement_GetAttributeNS(JSContext *cx, unsigned argc, jsval *vp)
4193 : {
4194 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4195 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4196 0 : if (!obj)
4197 0 : return JS_FALSE;
4198 : nsGenericElement *self;
4199 0 : xpc_qsSelfRef selfref;
4200 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4201 0 : return JS_FALSE;
4202 0 : if (argc < 2)
4203 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4204 0 : jsval *argv = JS_ARGV(cx, vp);
4205 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
4206 : xpc_qsDOMString::eDefaultNullBehavior,
4207 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4208 0 : if (!arg0.IsValid())
4209 0 : return JS_FALSE;
4210 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
4211 : xpc_qsDOMString::eDefaultNullBehavior,
4212 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4213 0 : if (!arg1.IsValid())
4214 0 : return JS_FALSE;
4215 : nsresult rv;
4216 0 : nsString result;
4217 0 : rv = self->GetAttributeNS(arg0, arg1, result);
4218 0 : if (NS_FAILED(rv))
4219 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4220 0 : return xpc::StringToJsval(cx, result, vp);
4221 : }
4222 :
4223 : static JSBool
4224 0 : nsIDOMElement_GetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4225 : {
4226 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4227 : nsGenericElement *self;
4228 0 : xpc_qsSelfRef selfref;
4229 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
4230 0 : return JS_FALSE;
4231 0 : if (!self) {
4232 0 : *vp = JSVAL_NULL;
4233 0 : return JS_TRUE;
4234 : }
4235 : nsresult rv;
4236 0 : rv = self->GetOnmouseenter(cx, vp);
4237 0 : if (NS_FAILED(rv))
4238 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4239 0 : return JS_TRUE;
4240 : }
4241 :
4242 : static JSBool
4243 0 : nsIDOMElement_SetOnmouseenter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
4244 : {
4245 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4246 : nsGenericElement *self;
4247 0 : xpc_qsSelfRef selfref;
4248 0 : JS::AutoValueRooter tvr(cx);
4249 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
4250 0 : return JS_FALSE;
4251 0 : if (!self) {
4252 0 : return JS_TRUE;
4253 : }
4254 0 : jsval arg0 = *vp;
4255 : nsresult rv;
4256 0 : rv = self->SetOnmouseenter(cx, arg0);
4257 0 : if (NS_FAILED(rv))
4258 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
4259 0 : return JS_TRUE;
4260 : }
4261 :
4262 : static JSBool
4263 0 : nsIDOMElement_GetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4264 : {
4265 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4266 : nsGenericElement *self;
4267 0 : xpc_qsSelfRef selfref;
4268 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, false))
4269 0 : return JS_FALSE;
4270 0 : if (!self) {
4271 0 : *vp = JSVAL_NULL;
4272 0 : return JS_TRUE;
4273 : }
4274 : nsresult rv;
4275 0 : rv = self->GetOnmouseleave(cx, vp);
4276 0 : if (NS_FAILED(rv))
4277 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4278 0 : return JS_TRUE;
4279 : }
4280 :
4281 : static JSBool
4282 0 : nsIDOMElement_SetOnmouseleave(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
4283 : {
4284 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4285 : nsGenericElement *self;
4286 0 : xpc_qsSelfRef selfref;
4287 0 : JS::AutoValueRooter tvr(cx);
4288 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, false))
4289 0 : return JS_FALSE;
4290 0 : if (!self) {
4291 0 : return JS_TRUE;
4292 : }
4293 0 : jsval arg0 = *vp;
4294 : nsresult rv;
4295 0 : rv = self->SetOnmouseleave(cx, arg0);
4296 0 : if (NS_FAILED(rv))
4297 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
4298 0 : return JS_TRUE;
4299 : }
4300 :
4301 : // === interface nsIDOMNamedNodeMap
4302 :
4303 : static JSBool
4304 943 : nsIDOMNamedNodeMap_Item(JSContext *cx, unsigned argc, jsval *vp)
4305 : {
4306 943 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4307 943 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4308 943 : if (!obj)
4309 0 : return JS_FALSE;
4310 943 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4311 : nsIDOMNamedNodeMap *self;
4312 1886 : xpc_qsSelfRef selfref;
4313 1886 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4314 943 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4315 0 : return JS_FALSE;
4316 943 : if (argc < 1)
4317 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4318 943 : jsval *argv = JS_ARGV(cx, vp);
4319 : uint32_t arg0;
4320 943 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
4321 0 : return JS_FALSE;
4322 : nsresult rv;
4323 1886 : nsCOMPtr<nsIDOMNode> result;
4324 943 : rv = self->Item(arg0, getter_AddRefs(result));
4325 943 : if (NS_FAILED(rv))
4326 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4327 943 : if (!result) {
4328 0 : *vp = JSVAL_NULL;
4329 0 : return JS_TRUE;
4330 : }
4331 943 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4332 943 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4333 0 : return JS_TRUE;
4334 : }
4335 : // After this point do not use 'result'!
4336 1886 : qsObjectHelper helper(result, cache);
4337 943 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4338 : }
4339 :
4340 : static JSBool
4341 1171 : nsIDOMNamedNodeMap_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4342 : {
4343 1171 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4344 : nsIDOMNamedNodeMap *self;
4345 2342 : xpc_qsSelfRef selfref;
4346 1171 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
4347 0 : return JS_FALSE;
4348 : nsresult rv;
4349 : PRUint32 result;
4350 1171 : rv = self->GetLength(&result);
4351 1171 : if (NS_FAILED(rv))
4352 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4353 1171 : *vp = UINT_TO_JSVAL(result);
4354 1171 : return JS_TRUE;
4355 : }
4356 :
4357 : // === interface nsIDOMNode
4358 :
4359 : static JSBool
4360 51 : nsIDOMNode_GetNodeName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4361 : {
4362 51 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4363 : nsINode *self;
4364 102 : xpc_qsSelfRef selfref;
4365 51 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
4366 0 : return JS_FALSE;
4367 102 : nsString result = self->NodeName();
4368 : #ifdef DEBUG
4369 : nsresult debug_rv;
4370 102 : nsCOMPtr<nsIDOMNode> debug_self;
4371 51 : CallQueryInterface(self, getter_AddRefs(debug_self));
4372 102 : nsString debug_result;
4373 51 : debug_rv = debug_self->GetNodeName(debug_result);
4374 51 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4375 : "Got the wrong answer from the custom method call!");
4376 : #endif
4377 51 : return xpc::StringToJsval(cx, result, vp);
4378 : }
4379 :
4380 : static JSBool
4381 764 : nsIDOMNode_GetNodeValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4382 : {
4383 764 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4384 : nsIDOMNode *self;
4385 1528 : xpc_qsSelfRef selfref;
4386 764 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
4387 0 : return JS_FALSE;
4388 : nsresult rv;
4389 1528 : nsString result;
4390 764 : rv = self->GetNodeValue(result);
4391 764 : if (NS_FAILED(rv))
4392 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4393 764 : return xpc::StringToJsval(cx, result, vp);
4394 : }
4395 :
4396 : static JSBool
4397 0 : nsIDOMNode_SetNodeValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
4398 : {
4399 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4400 : nsIDOMNode *self;
4401 0 : xpc_qsSelfRef selfref;
4402 0 : JS::AutoValueRooter tvr(cx);
4403 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
4404 0 : return JS_FALSE;
4405 : xpc_qsDOMString arg0(cx, *vp, vp,
4406 : xpc_qsDOMString::eDefaultNullBehavior,
4407 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
4408 0 : if (!arg0.IsValid())
4409 0 : return JS_FALSE;
4410 : nsresult rv;
4411 0 : rv = self->SetNodeValue(arg0);
4412 0 : if (NS_FAILED(rv))
4413 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
4414 0 : return JS_TRUE;
4415 : }
4416 :
4417 : static JSBool
4418 368 : nsIDOMNode_GetNodeType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4419 : {
4420 368 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4421 : nsINode *self;
4422 736 : xpc_qsSelfRef selfref;
4423 368 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
4424 0 : return JS_FALSE;
4425 368 : PRUint16 result = self->NodeType();
4426 : #ifdef DEBUG
4427 : nsresult debug_rv;
4428 736 : nsCOMPtr<nsIDOMNode> debug_self;
4429 368 : CallQueryInterface(self, getter_AddRefs(debug_self));
4430 : PRUint16 debug_result;
4431 368 : debug_rv = debug_self->GetNodeType(&debug_result);
4432 368 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4433 : "Got the wrong answer from the custom method call!");
4434 : #endif
4435 368 : *vp = INT_TO_JSVAL((int32_t) result);
4436 368 : return JS_TRUE;
4437 : }
4438 :
4439 : static JSBool
4440 359 : nsIDOMNode_GetParentNode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4441 : {
4442 359 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4443 359 : JSObject *callee = nsnull;
4444 : nsINode *self;
4445 718 : xpc_qsSelfRef selfref;
4446 718 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4447 359 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4448 0 : return JS_FALSE;
4449 359 : nsINode *result = self->GetNodeParent();
4450 : #ifdef DEBUG
4451 : nsresult debug_rv;
4452 718 : nsCOMPtr<nsIDOMNode> debug_self;
4453 359 : CallQueryInterface(self, getter_AddRefs(debug_self));
4454 718 : nsCOMPtr<nsIDOMNode> debug_result;
4455 359 : debug_rv = debug_self->GetParentNode(getter_AddRefs(debug_result));
4456 359 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4457 : "Got the wrong answer from the custom method call!");
4458 : #endif
4459 359 : if (!result) {
4460 0 : *vp = JSVAL_NULL;
4461 0 : return JS_TRUE;
4462 : }
4463 359 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4464 359 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4465 137 : return JS_TRUE;
4466 : }
4467 : // After this point do not use 'result'!
4468 444 : qsObjectHelper helper(result, cache);
4469 222 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4470 : }
4471 :
4472 : static JSBool
4473 0 : nsIDOMNode_GetParentElement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4474 : {
4475 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4476 0 : JSObject *callee = nsnull;
4477 : nsINode *self;
4478 0 : xpc_qsSelfRef selfref;
4479 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4480 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4481 0 : return JS_FALSE;
4482 0 : nsINode *result = self->GetElementParent();
4483 : #ifdef DEBUG
4484 : nsresult debug_rv;
4485 0 : nsCOMPtr<nsIDOMNode> debug_self;
4486 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
4487 0 : nsCOMPtr<nsIDOMElement> debug_result;
4488 0 : debug_rv = debug_self->GetParentElement(getter_AddRefs(debug_result));
4489 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4490 : "Got the wrong answer from the custom method call!");
4491 : #endif
4492 0 : if (!result) {
4493 0 : *vp = JSVAL_NULL;
4494 0 : return JS_TRUE;
4495 : }
4496 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4497 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4498 0 : return JS_TRUE;
4499 : }
4500 : // After this point do not use 'result'!
4501 0 : qsObjectHelper helper(result, cache);
4502 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
4503 : }
4504 :
4505 : static JSBool
4506 4589 : nsIDOMNode_GetChildNodes(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4507 : {
4508 4589 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4509 4589 : JSObject *callee = nsnull;
4510 : nsINode *self;
4511 9178 : xpc_qsSelfRef selfref;
4512 9178 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4513 4589 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4514 0 : return JS_FALSE;
4515 : nsresult rv;
4516 :
4517 4589 : nsChildContentList* result = static_cast<nsChildContentList*>(self->GetChildNodesList());
4518 4589 : rv = result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
4519 :
4520 : #ifdef DEBUG
4521 : nsresult debug_rv;
4522 9178 : nsCOMPtr<nsIDOMNode> debug_self;
4523 4589 : CallQueryInterface(self, getter_AddRefs(debug_self));
4524 9178 : nsCOMPtr<nsIDOMNodeList> debug_result;
4525 4589 : debug_rv = debug_self->GetChildNodes(getter_AddRefs(debug_result));
4526 4589 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) == NS_SUCCEEDED(rv) && xpc_qsSameResult(debug_result, result),
4527 : "Got the wrong answer from the custom method call!");
4528 : #endif
4529 4589 : if (NS_FAILED(rv))
4530 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4531 4589 : if (!result) {
4532 0 : *vp = JSVAL_NULL;
4533 0 : return JS_TRUE;
4534 : }
4535 4589 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4536 4589 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4537 3062 : return JS_TRUE;
4538 : }
4539 : // After this point do not use 'result'!
4540 3054 : qsObjectHelper helper(result, cache);
4541 1527 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
4542 : }
4543 :
4544 : static JSBool
4545 254 : nsIDOMNode_GetFirstChild(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4546 : {
4547 254 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4548 254 : JSObject *callee = nsnull;
4549 : nsINode *self;
4550 508 : xpc_qsSelfRef selfref;
4551 508 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4552 254 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4553 0 : return JS_FALSE;
4554 254 : nsINode *result = self->GetFirstChild();
4555 : #ifdef DEBUG
4556 : nsresult debug_rv;
4557 508 : nsCOMPtr<nsIDOMNode> debug_self;
4558 254 : CallQueryInterface(self, getter_AddRefs(debug_self));
4559 508 : nsCOMPtr<nsIDOMNode> debug_result;
4560 254 : debug_rv = debug_self->GetFirstChild(getter_AddRefs(debug_result));
4561 254 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4562 : "Got the wrong answer from the custom method call!");
4563 : #endif
4564 254 : if (!result) {
4565 0 : *vp = JSVAL_NULL;
4566 0 : return JS_TRUE;
4567 : }
4568 254 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4569 254 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4570 2 : return JS_TRUE;
4571 : }
4572 : // After this point do not use 'result'!
4573 504 : qsObjectHelper helper(result, cache);
4574 252 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4575 : }
4576 :
4577 : static JSBool
4578 0 : nsIDOMNode_GetLastChild(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->GetLastChild();
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->GetLastChild(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 0 : nsIDOMNode_GetPreviousSibling(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4612 : {
4613 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4614 0 : JSObject *callee = nsnull;
4615 : nsINode *self;
4616 0 : xpc_qsSelfRef selfref;
4617 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4618 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4619 0 : return JS_FALSE;
4620 0 : nsINode *result = self->GetPreviousSibling();
4621 : #ifdef DEBUG
4622 : nsresult debug_rv;
4623 0 : nsCOMPtr<nsIDOMNode> debug_self;
4624 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
4625 0 : nsCOMPtr<nsIDOMNode> debug_result;
4626 0 : debug_rv = debug_self->GetPreviousSibling(getter_AddRefs(debug_result));
4627 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4628 : "Got the wrong answer from the custom method call!");
4629 : #endif
4630 0 : if (!result) {
4631 0 : *vp = JSVAL_NULL;
4632 0 : return JS_TRUE;
4633 : }
4634 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4635 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4636 0 : return JS_TRUE;
4637 : }
4638 : // After this point do not use 'result'!
4639 0 : qsObjectHelper helper(result, cache);
4640 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4641 : }
4642 :
4643 : static JSBool
4644 5122 : nsIDOMNode_GetNextSibling(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4645 : {
4646 5122 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4647 5122 : JSObject *callee = nsnull;
4648 : nsINode *self;
4649 10244 : xpc_qsSelfRef selfref;
4650 10244 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4651 5122 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4652 0 : return JS_FALSE;
4653 5122 : nsINode *result = self->GetNextSibling();
4654 : #ifdef DEBUG
4655 : nsresult debug_rv;
4656 10244 : nsCOMPtr<nsIDOMNode> debug_self;
4657 5122 : CallQueryInterface(self, getter_AddRefs(debug_self));
4658 10244 : nsCOMPtr<nsIDOMNode> debug_result;
4659 5122 : debug_rv = debug_self->GetNextSibling(getter_AddRefs(debug_result));
4660 5122 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4661 : "Got the wrong answer from the custom method call!");
4662 : #endif
4663 5122 : if (!result) {
4664 238 : *vp = JSVAL_NULL;
4665 238 : return JS_TRUE;
4666 : }
4667 4884 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4668 4884 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4669 391 : return JS_TRUE;
4670 : }
4671 : // After this point do not use 'result'!
4672 8986 : qsObjectHelper helper(result, cache);
4673 4493 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4674 : }
4675 :
4676 : static JSBool
4677 1898 : nsIDOMNode_GetAttributes(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4678 : {
4679 1898 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4680 1898 : JSObject *callee = nsnull;
4681 : nsIDOMNode *self;
4682 3796 : xpc_qsSelfRef selfref;
4683 3796 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4684 1898 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4685 0 : return JS_FALSE;
4686 : nsresult rv;
4687 3796 : nsCOMPtr<nsIDOMNamedNodeMap> result;
4688 1898 : rv = self->GetAttributes(getter_AddRefs(result));
4689 1898 : if (NS_FAILED(rv))
4690 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
4691 1898 : if (!result) {
4692 0 : *vp = JSVAL_NULL;
4693 0 : return JS_TRUE;
4694 : }
4695 1898 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4696 1898 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4697 0 : return JS_TRUE;
4698 : }
4699 : // After this point do not use 'result'!
4700 3796 : qsObjectHelper helper(result, cache);
4701 1898 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNamedNodeMap), &interfaces[k_nsIDOMNamedNodeMap], vp);
4702 : }
4703 :
4704 : static JSBool
4705 170 : nsIDOMNode_GetOwnerDocument(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
4706 : {
4707 170 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4708 170 : JSObject *callee = nsnull;
4709 : nsINode *self;
4710 340 : xpc_qsSelfRef selfref;
4711 340 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4712 170 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
4713 0 : return JS_FALSE;
4714 170 : nsIDocument *result = self->GetOwnerDocument();
4715 : #ifdef DEBUG
4716 : nsresult debug_rv;
4717 340 : nsCOMPtr<nsIDOMNode> debug_self;
4718 170 : CallQueryInterface(self, getter_AddRefs(debug_self));
4719 340 : nsCOMPtr<nsIDOMDocument> debug_result;
4720 170 : debug_rv = debug_self->GetOwnerDocument(getter_AddRefs(debug_result));
4721 170 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
4722 : "Got the wrong answer from the custom method call!");
4723 : #endif
4724 170 : if (!result) {
4725 0 : *vp = JSVAL_NULL;
4726 0 : return JS_TRUE;
4727 : }
4728 170 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4729 170 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4730 170 : return JS_TRUE;
4731 : }
4732 : // After this point do not use 'result'!
4733 0 : qsObjectHelper helper(result, cache);
4734 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
4735 : }
4736 :
4737 : static JSBool
4738 4 : nsIDOMNode_InsertBefore(JSContext *cx, unsigned argc, jsval *vp)
4739 : {
4740 4 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4741 4 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4742 4 : if (!obj)
4743 0 : return JS_FALSE;
4744 4 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4745 : nsINode *self;
4746 8 : xpc_qsSelfRef selfref;
4747 8 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4748 4 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4749 0 : return JS_FALSE;
4750 4 : if (argc < 2)
4751 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4752 4 : jsval *argv = JS_ARGV(cx, vp);
4753 : nsresult rv;
4754 : nsINode *arg0;
4755 8 : xpc_qsSelfRef arg0ref;
4756 4 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
4757 4 : if (NS_FAILED(rv)) {
4758 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
4759 0 : return JS_FALSE;
4760 : }
4761 : nsINode *arg1;
4762 8 : xpc_qsSelfRef arg1ref;
4763 4 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
4764 4 : if (NS_FAILED(rv)) {
4765 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
4766 0 : return JS_FALSE;
4767 : }
4768 4 : nsINode *result = self->InsertBefore(arg0, arg1, &rv);
4769 4 : if(NS_FAILED(rv))
4770 0 : result = nsnull;
4771 4 : if (NS_FAILED(rv))
4772 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4773 4 : if (!result) {
4774 0 : *vp = JSVAL_NULL;
4775 0 : return JS_TRUE;
4776 : }
4777 4 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4778 4 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4779 4 : return JS_TRUE;
4780 : }
4781 : // After this point do not use 'result'!
4782 0 : qsObjectHelper helper(result, cache);
4783 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4784 : }
4785 :
4786 : static JSBool
4787 0 : nsIDOMNode_ReplaceChild(JSContext *cx, unsigned argc, jsval *vp)
4788 : {
4789 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4790 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4791 0 : if (!obj)
4792 0 : return JS_FALSE;
4793 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4794 : nsINode *self;
4795 0 : xpc_qsSelfRef selfref;
4796 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4797 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4798 0 : return JS_FALSE;
4799 0 : if (argc < 2)
4800 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4801 0 : jsval *argv = JS_ARGV(cx, vp);
4802 : nsresult rv;
4803 : nsINode *arg0;
4804 0 : xpc_qsSelfRef arg0ref;
4805 0 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
4806 0 : if (NS_FAILED(rv)) {
4807 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
4808 0 : return JS_FALSE;
4809 : }
4810 : nsINode *arg1;
4811 0 : xpc_qsSelfRef arg1ref;
4812 0 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
4813 0 : if (NS_FAILED(rv)) {
4814 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
4815 0 : return JS_FALSE;
4816 : }
4817 0 : nsINode *result = self->ReplaceChild(arg0, arg1, &rv);
4818 0 : if(NS_FAILED(rv))
4819 0 : result = nsnull;
4820 0 : if (NS_FAILED(rv))
4821 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4822 0 : if (!result) {
4823 0 : *vp = JSVAL_NULL;
4824 0 : return JS_TRUE;
4825 : }
4826 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4827 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4828 0 : return JS_TRUE;
4829 : }
4830 : // After this point do not use 'result'!
4831 0 : qsObjectHelper helper(result, cache);
4832 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4833 : }
4834 :
4835 : static JSBool
4836 116 : nsIDOMNode_RemoveChild(JSContext *cx, unsigned argc, jsval *vp)
4837 : {
4838 116 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4839 116 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4840 116 : if (!obj)
4841 0 : return JS_FALSE;
4842 116 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4843 : nsINode *self;
4844 232 : xpc_qsSelfRef selfref;
4845 232 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4846 116 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4847 0 : return JS_FALSE;
4848 116 : if (argc < 1)
4849 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4850 116 : jsval *argv = JS_ARGV(cx, vp);
4851 : nsresult rv;
4852 : nsINode *arg0;
4853 232 : xpc_qsSelfRef arg0ref;
4854 116 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
4855 116 : if (NS_FAILED(rv)) {
4856 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
4857 0 : return JS_FALSE;
4858 : }
4859 116 : rv = self->RemoveChild(arg0);
4860 116 : nsINode *result = NS_SUCCEEDED(rv) ? arg0 : nsnull;
4861 116 : if (NS_FAILED(rv))
4862 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4863 116 : if (!result) {
4864 0 : *vp = JSVAL_NULL;
4865 0 : return JS_TRUE;
4866 : }
4867 116 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4868 116 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4869 116 : return JS_TRUE;
4870 : }
4871 : // After this point do not use 'result'!
4872 0 : qsObjectHelper helper(result, cache);
4873 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4874 : }
4875 :
4876 : static JSBool
4877 400 : nsIDOMNode_AppendChild(JSContext *cx, unsigned argc, jsval *vp)
4878 : {
4879 400 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4880 400 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4881 400 : if (!obj)
4882 0 : return JS_FALSE;
4883 400 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4884 : nsINode *self;
4885 800 : xpc_qsSelfRef selfref;
4886 800 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4887 400 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4888 0 : return JS_FALSE;
4889 400 : if (argc < 1)
4890 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
4891 400 : jsval *argv = JS_ARGV(cx, vp);
4892 : nsresult rv;
4893 : nsINode *arg0;
4894 800 : xpc_qsSelfRef arg0ref;
4895 400 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
4896 400 : if (NS_FAILED(rv)) {
4897 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
4898 0 : return JS_FALSE;
4899 : }
4900 400 : nsINode *result = self->AppendChild(arg0, &rv);
4901 400 : if(NS_FAILED(rv))
4902 0 : result = nsnull;
4903 400 : if (NS_FAILED(rv))
4904 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4905 400 : if (!result) {
4906 0 : *vp = JSVAL_NULL;
4907 0 : return JS_TRUE;
4908 : }
4909 400 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4910 400 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4911 400 : return JS_TRUE;
4912 : }
4913 : // After this point do not use 'result'!
4914 0 : qsObjectHelper helper(result, cache);
4915 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4916 : }
4917 :
4918 : static JSBool
4919 11 : nsIDOMNode_HasChildNodes(JSContext *cx, unsigned argc, jsval *vp)
4920 : {
4921 11 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4922 11 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4923 11 : if (!obj)
4924 0 : return JS_FALSE;
4925 : nsIDOMNode *self;
4926 22 : xpc_qsSelfRef selfref;
4927 11 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4928 0 : return JS_FALSE;
4929 : nsresult rv;
4930 : bool result;
4931 11 : rv = self->HasChildNodes(&result);
4932 11 : if (NS_FAILED(rv))
4933 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4934 11 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
4935 11 : return JS_TRUE;
4936 : }
4937 :
4938 : static JSBool
4939 257 : nsIDOMNode_CloneNode(JSContext *cx, unsigned argc, jsval *vp)
4940 : {
4941 257 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4942 257 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4943 257 : if (!obj)
4944 0 : return JS_FALSE;
4945 257 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
4946 : nsIDOMNode *self;
4947 514 : xpc_qsSelfRef selfref;
4948 514 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
4949 257 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
4950 0 : return JS_FALSE;
4951 257 : jsval *argv = JS_ARGV(cx, vp);
4952 : JSBool arg0;
4953 257 : JS_ValueToBoolean(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0);
4954 : nsresult rv;
4955 514 : nsCOMPtr<nsIDOMNode> result;
4956 257 : rv = self->CloneNode(arg0, NS_MIN<PRUint32>(argc, 1) - 0, getter_AddRefs(result));
4957 257 : if (NS_FAILED(rv))
4958 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
4959 257 : if (!result) {
4960 0 : *vp = JSVAL_NULL;
4961 0 : return JS_TRUE;
4962 : }
4963 257 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
4964 257 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
4965 0 : return JS_TRUE;
4966 : }
4967 : // After this point do not use 'result'!
4968 514 : qsObjectHelper helper(result, cache);
4969 257 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
4970 : }
4971 :
4972 : static JSBool
4973 21 : nsIDOMNode_Normalize(JSContext *cx, unsigned argc, jsval *vp)
4974 : {
4975 21 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4976 21 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4977 21 : if (!obj)
4978 0 : return JS_FALSE;
4979 : nsINode *self;
4980 42 : xpc_qsSelfRef selfref;
4981 21 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4982 0 : return JS_FALSE;
4983 21 : self->Normalize();
4984 21 : *vp = JSVAL_VOID;
4985 21 : return JS_TRUE;
4986 : }
4987 :
4988 : static JSBool
4989 0 : nsIDOMNode_IsSupported(JSContext *cx, unsigned argc, jsval *vp)
4990 : {
4991 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
4992 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
4993 0 : if (!obj)
4994 0 : return JS_FALSE;
4995 : nsIDOMNode *self;
4996 0 : xpc_qsSelfRef selfref;
4997 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
4998 0 : return JS_FALSE;
4999 0 : if (argc < 2)
5000 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5001 0 : jsval *argv = JS_ARGV(cx, vp);
5002 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5003 : xpc_qsDOMString::eDefaultNullBehavior,
5004 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5005 0 : if (!arg0.IsValid())
5006 0 : return JS_FALSE;
5007 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
5008 : xpc_qsDOMString::eDefaultNullBehavior,
5009 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5010 0 : if (!arg1.IsValid())
5011 0 : return JS_FALSE;
5012 : nsresult rv;
5013 : bool result;
5014 0 : rv = self->IsSupported(arg0, arg1, &result);
5015 0 : if (NS_FAILED(rv))
5016 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5017 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5018 0 : return JS_TRUE;
5019 : }
5020 :
5021 : static JSBool
5022 1117 : nsIDOMNode_GetNamespaceURI(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5023 : {
5024 1117 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5025 : nsIDOMNode *self;
5026 2234 : xpc_qsSelfRef selfref;
5027 1117 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5028 0 : return JS_FALSE;
5029 : nsresult rv;
5030 2234 : nsString result;
5031 1117 : rv = self->GetNamespaceURI(result);
5032 1117 : if (NS_FAILED(rv))
5033 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5034 1117 : return xpc::StringToJsval(cx, result, vp);
5035 : }
5036 :
5037 : static JSBool
5038 0 : nsIDOMNode_GetPrefix(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5039 : {
5040 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5041 : nsIDOMNode *self;
5042 0 : xpc_qsSelfRef selfref;
5043 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5044 0 : return JS_FALSE;
5045 : nsresult rv;
5046 0 : nsString result;
5047 0 : rv = self->GetPrefix(result);
5048 0 : if (NS_FAILED(rv))
5049 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5050 0 : return xpc::StringToJsval(cx, result, vp);
5051 : }
5052 :
5053 : static JSBool
5054 4391 : nsIDOMNode_GetLocalName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5055 : {
5056 4391 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5057 : nsINode *self;
5058 8782 : xpc_qsSelfRef selfref;
5059 4391 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5060 0 : return JS_FALSE;
5061 8782 : nsString result = self->LocalName();
5062 : #ifdef DEBUG
5063 : nsresult debug_rv;
5064 8782 : nsCOMPtr<nsIDOMNode> debug_self;
5065 4391 : CallQueryInterface(self, getter_AddRefs(debug_self));
5066 8782 : nsString debug_result;
5067 4391 : debug_rv = debug_self->GetLocalName(debug_result);
5068 4391 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
5069 : "Got the wrong answer from the custom method call!");
5070 : #endif
5071 4391 : return xpc::StringToJsval(cx, result, vp);
5072 : }
5073 :
5074 : static JSBool
5075 0 : nsIDOMNode_HasAttributes(JSContext *cx, unsigned argc, jsval *vp)
5076 : {
5077 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5078 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5079 0 : if (!obj)
5080 0 : return JS_FALSE;
5081 : nsIDOMNode *self;
5082 0 : xpc_qsSelfRef selfref;
5083 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5084 0 : return JS_FALSE;
5085 : nsresult rv;
5086 : bool result;
5087 0 : rv = self->HasAttributes(&result);
5088 0 : if (NS_FAILED(rv))
5089 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5090 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5091 0 : return JS_TRUE;
5092 : }
5093 :
5094 : static JSBool
5095 0 : nsIDOMNode_GetDOMBaseURI(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5096 : {
5097 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5098 : nsIDOMNode *self;
5099 0 : xpc_qsSelfRef selfref;
5100 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5101 0 : return JS_FALSE;
5102 : nsresult rv;
5103 0 : nsString result;
5104 0 : rv = self->GetDOMBaseURI(result);
5105 0 : if (NS_FAILED(rv))
5106 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5107 0 : return xpc::StringToJsval(cx, result, vp);
5108 : }
5109 :
5110 : static JSBool
5111 0 : nsIDOMNode_CompareDocumentPosition(JSContext *cx, unsigned argc, jsval *vp)
5112 : {
5113 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5114 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5115 0 : if (!obj)
5116 0 : return JS_FALSE;
5117 : nsINode *self;
5118 0 : xpc_qsSelfRef selfref;
5119 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5120 0 : return JS_FALSE;
5121 0 : if (argc < 1)
5122 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5123 0 : jsval *argv = JS_ARGV(cx, vp);
5124 : nsresult rv;
5125 : nsINode *arg0;
5126 0 : xpc_qsSelfRef arg0ref;
5127 0 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
5128 0 : if (NS_FAILED(rv)) {
5129 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
5130 0 : return JS_FALSE;
5131 : }
5132 : PRUint16 result;
5133 0 : rv = self->CompareDocPosition(arg0, &result);
5134 0 : if (NS_FAILED(rv))
5135 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5136 0 : *vp = INT_TO_JSVAL((int32_t) result);
5137 0 : return JS_TRUE;
5138 : }
5139 :
5140 : static JSBool
5141 3233 : nsIDOMNode_GetTextContent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5142 : {
5143 3233 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5144 : nsINode *self;
5145 6466 : xpc_qsSelfRef selfref;
5146 3233 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5147 0 : return JS_FALSE;
5148 6466 : nsString result;
5149 3233 : self->GetTextContent(result);
5150 3233 : return xpc::StringToJsval(cx, result, vp);
5151 : }
5152 :
5153 : static JSBool
5154 1 : nsIDOMNode_SetTextContent(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
5155 : {
5156 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5157 : nsIDOMNode *self;
5158 2 : xpc_qsSelfRef selfref;
5159 2 : JS::AutoValueRooter tvr(cx);
5160 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
5161 0 : return JS_FALSE;
5162 : xpc_qsDOMString arg0(cx, *vp, vp,
5163 : xpc_qsDOMString::eDefaultNullBehavior,
5164 2 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5165 1 : if (!arg0.IsValid())
5166 0 : return JS_FALSE;
5167 : nsresult rv;
5168 1 : rv = self->SetTextContent(arg0);
5169 1 : if (NS_FAILED(rv))
5170 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
5171 1 : return JS_TRUE;
5172 : }
5173 :
5174 : static JSBool
5175 0 : nsIDOMNode_LookupPrefix(JSContext *cx, unsigned argc, jsval *vp)
5176 : {
5177 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5178 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5179 0 : if (!obj)
5180 0 : return JS_FALSE;
5181 : nsINode *self;
5182 0 : xpc_qsSelfRef selfref;
5183 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5184 0 : return JS_FALSE;
5185 0 : if (argc < 1)
5186 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5187 0 : jsval *argv = JS_ARGV(cx, vp);
5188 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5189 : xpc_qsDOMString::eDefaultNullBehavior,
5190 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5191 0 : if (!arg0.IsValid())
5192 0 : return JS_FALSE;
5193 0 : nsString result;
5194 0 : self->LookupPrefix(arg0, result);
5195 0 : return xpc::StringToJsval(cx, result, vp);
5196 : }
5197 :
5198 : static JSBool
5199 0 : nsIDOMNode_IsDefaultNamespace(JSContext *cx, unsigned argc, jsval *vp)
5200 : {
5201 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5202 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5203 0 : if (!obj)
5204 0 : return JS_FALSE;
5205 : nsINode *self;
5206 0 : xpc_qsSelfRef selfref;
5207 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5208 0 : return JS_FALSE;
5209 0 : if (argc < 1)
5210 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5211 0 : jsval *argv = JS_ARGV(cx, vp);
5212 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5213 : xpc_qsDOMString::eDefaultNullBehavior,
5214 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5215 0 : if (!arg0.IsValid())
5216 0 : return JS_FALSE;
5217 : bool result;
5218 0 : self->IsDefaultNamespace(arg0, &result);
5219 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5220 0 : return JS_TRUE;
5221 : }
5222 :
5223 : static JSBool
5224 0 : nsIDOMNode_LookupNamespaceURI(JSContext *cx, unsigned argc, jsval *vp)
5225 : {
5226 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5227 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5228 0 : if (!obj)
5229 0 : return JS_FALSE;
5230 : nsINode *self;
5231 0 : xpc_qsSelfRef selfref;
5232 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5233 0 : return JS_FALSE;
5234 0 : if (argc < 1)
5235 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5236 0 : jsval *argv = JS_ARGV(cx, vp);
5237 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5238 : xpc_qsDOMString::eDefaultNullBehavior,
5239 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5240 0 : if (!arg0.IsValid())
5241 0 : return JS_FALSE;
5242 0 : nsString result;
5243 0 : self->LookupNamespaceURI(arg0, result);
5244 0 : return xpc::StringToJsval(cx, result, vp);
5245 : }
5246 :
5247 : static JSBool
5248 999 : nsIDOMNode_IsEqualNode(JSContext *cx, unsigned argc, jsval *vp)
5249 : {
5250 999 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5251 999 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5252 999 : if (!obj)
5253 0 : return JS_FALSE;
5254 : nsINode *self;
5255 1998 : xpc_qsSelfRef selfref;
5256 999 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5257 0 : return JS_FALSE;
5258 999 : if (argc < 1)
5259 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5260 999 : jsval *argv = JS_ARGV(cx, vp);
5261 : nsresult rv;
5262 : nsINode *arg0;
5263 1998 : xpc_qsSelfRef arg0ref;
5264 999 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
5265 999 : if (NS_FAILED(rv)) {
5266 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
5267 0 : return JS_FALSE;
5268 : }
5269 999 : bool result = self->IsEqualTo(arg0);
5270 999 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5271 999 : return JS_TRUE;
5272 : }
5273 :
5274 : static JSBool
5275 0 : nsIDOMNode_SetUserData(JSContext *cx, unsigned argc, jsval *vp)
5276 : {
5277 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5278 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5279 0 : if (!obj)
5280 0 : return JS_FALSE;
5281 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
5282 0 : XPCLazyCallContext lccx(ccx);
5283 : nsIDOMNode *self;
5284 0 : xpc_qsSelfRef selfref;
5285 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
5286 0 : return JS_FALSE;
5287 0 : if (argc < 3)
5288 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5289 0 : jsval *argv = JS_ARGV(cx, vp);
5290 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5291 : xpc_qsDOMString::eDefaultNullBehavior,
5292 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5293 0 : if (!arg0.IsValid())
5294 0 : return JS_FALSE;
5295 0 : nsCOMPtr<nsIVariant> arg1(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, argv[1])));
5296 0 : if (!arg1) {
5297 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 1);
5298 0 : return JS_FALSE;
5299 : } nsresult rv;
5300 : nsIDOMUserDataHandler *arg2;
5301 0 : xpc_qsSelfRef arg2ref;
5302 0 : rv = xpc_qsUnwrapArg<nsIDOMUserDataHandler>(cx, argv[2], &arg2, &arg2ref.ptr, &argv[2]);
5303 0 : if (NS_FAILED(rv)) {
5304 0 : xpc_qsThrowBadArgWithCcx(ccx, rv, 2);
5305 0 : return JS_FALSE;
5306 : }
5307 0 : nsCOMPtr<nsIVariant> result;
5308 0 : rv = self->SetUserData(arg0, arg1, arg2, getter_AddRefs(result));
5309 0 : if (NS_FAILED(rv))
5310 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
5311 0 : return xpc_qsVariantToJsval(lccx, result, vp);
5312 : }
5313 :
5314 : static JSBool
5315 0 : nsIDOMNode_GetUserData(JSContext *cx, unsigned argc, jsval *vp)
5316 : {
5317 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5318 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5319 0 : if (!obj)
5320 0 : return JS_FALSE;
5321 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5322 : nsINode *self;
5323 0 : xpc_qsSelfRef selfref;
5324 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5325 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5326 0 : return JS_FALSE;
5327 0 : if (argc < 1)
5328 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5329 0 : jsval *argv = JS_ARGV(cx, vp);
5330 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5331 : xpc_qsDOMString::eDefaultNullBehavior,
5332 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5333 0 : if (!arg0.IsValid())
5334 0 : return JS_FALSE;
5335 0 : nsCOMPtr<nsIVariant> result;
5336 0 : self->GetUserData(arg0, getter_AddRefs(result));
5337 0 : return xpc_qsVariantToJsval(lccx, result, vp);
5338 : }
5339 :
5340 : static JSBool
5341 0 : nsIDOMNode_Contains(JSContext *cx, unsigned argc, jsval *vp)
5342 : {
5343 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5344 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5345 0 : if (!obj)
5346 0 : return JS_FALSE;
5347 : nsINode *self;
5348 0 : xpc_qsSelfRef selfref;
5349 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5350 0 : return JS_FALSE;
5351 0 : if (argc < 1)
5352 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5353 0 : jsval *argv = JS_ARGV(cx, vp);
5354 : nsresult rv;
5355 : nsINode *arg0;
5356 0 : xpc_qsSelfRef arg0ref;
5357 0 : rv = xpc_qsUnwrapArg<nsINode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
5358 0 : if (NS_FAILED(rv)) {
5359 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
5360 0 : return JS_FALSE;
5361 : }
5362 0 : bool result = self->Contains(arg0);
5363 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5364 0 : return JS_TRUE;
5365 : }
5366 :
5367 : // === interface nsIDOMNodeList
5368 :
5369 : static JSBool
5370 0 : nsIDOMNodeList_Item(JSContext *cx, unsigned argc, jsval *vp)
5371 : {
5372 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5373 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5374 0 : if (!obj)
5375 0 : return JS_FALSE;
5376 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5377 : nsINodeList *self;
5378 0 : xpc_qsSelfRef selfref;
5379 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5380 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5381 0 : return JS_FALSE;
5382 0 : if (argc < 1)
5383 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5384 0 : jsval *argv = JS_ARGV(cx, vp);
5385 : uint32_t arg0;
5386 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
5387 0 : return JS_FALSE;
5388 0 : nsINode *result = self->GetNodeAt(arg0);
5389 0 : if (!result) {
5390 0 : *vp = JSVAL_NULL;
5391 0 : return JS_TRUE;
5392 : }
5393 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5394 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5395 0 : return JS_TRUE;
5396 : }
5397 : // After this point do not use 'result'!
5398 0 : qsObjectHelper helper(result, cache);
5399 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
5400 : }
5401 :
5402 : static JSBool
5403 0 : nsIDOMNodeList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5404 : {
5405 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5406 : nsINodeList *self;
5407 0 : xpc_qsSelfRef selfref;
5408 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5409 0 : return JS_FALSE;
5410 : nsresult rv;
5411 : PRUint32 result;
5412 0 : rv = self->GetLength(&result);
5413 0 : if (NS_FAILED(rv))
5414 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5415 0 : *vp = UINT_TO_JSVAL(result);
5416 0 : return JS_TRUE;
5417 : }
5418 :
5419 : // === interface nsIDOMNodeSelector
5420 :
5421 : static JSBool
5422 0 : nsIDOMNodeSelector_QuerySelector(JSContext *cx, unsigned argc, jsval *vp)
5423 : {
5424 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5425 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5426 0 : if (!obj)
5427 0 : return JS_FALSE;
5428 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5429 : nsINode *self;
5430 0 : xpc_qsSelfRef selfref;
5431 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5432 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5433 0 : return JS_FALSE;
5434 0 : if (argc < 1)
5435 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5436 0 : jsval *argv = JS_ARGV(cx, vp);
5437 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5438 : xpc_qsDOMString::eStringify,
5439 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5440 0 : if (!arg0.IsValid())
5441 0 : return JS_FALSE;
5442 : nsresult rv;
5443 0 : nsIContent* result = nsGenericElement::doQuerySelector(self, arg0, &rv);
5444 0 : if (NS_FAILED(rv))
5445 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5446 0 : if (!result) {
5447 0 : *vp = JSVAL_NULL;
5448 0 : return JS_TRUE;
5449 : }
5450 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5451 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5452 0 : return JS_TRUE;
5453 : }
5454 : // After this point do not use 'result'!
5455 0 : qsObjectHelper helper(result, cache);
5456 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
5457 : }
5458 :
5459 : static JSBool
5460 110 : nsIDOMNodeSelector_QuerySelectorAll(JSContext *cx, unsigned argc, jsval *vp)
5461 : {
5462 110 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5463 110 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5464 110 : if (!obj)
5465 0 : return JS_FALSE;
5466 110 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5467 : nsINode *self;
5468 220 : xpc_qsSelfRef selfref;
5469 220 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5470 110 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5471 0 : return JS_FALSE;
5472 110 : if (argc < 1)
5473 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5474 110 : jsval *argv = JS_ARGV(cx, vp);
5475 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5476 : xpc_qsDOMString::eStringify,
5477 220 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5478 110 : if (!arg0.IsValid())
5479 0 : return JS_FALSE;
5480 : nsresult rv;
5481 220 : nsCOMPtr<nsIDOMNodeList> result;
5482 110 : rv = nsGenericElement::doQuerySelectorAll(self, arg0, getter_AddRefs(result));
5483 110 : if (NS_FAILED(rv))
5484 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5485 110 : if (!result) {
5486 0 : *vp = JSVAL_NULL;
5487 0 : return JS_TRUE;
5488 : }
5489 110 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5490 110 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5491 0 : return JS_TRUE;
5492 : }
5493 : // After this point do not use 'result'!
5494 220 : qsObjectHelper helper(result, cache);
5495 110 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
5496 : }
5497 :
5498 : // === interface nsIDOMText
5499 :
5500 : static JSBool
5501 0 : nsIDOMText_SplitText(JSContext *cx, unsigned argc, jsval *vp)
5502 : {
5503 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5504 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5505 0 : if (!obj)
5506 0 : return JS_FALSE;
5507 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5508 : nsIDOMText *self;
5509 0 : xpc_qsSelfRef selfref;
5510 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5511 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5512 0 : return JS_FALSE;
5513 0 : if (argc < 1)
5514 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5515 0 : jsval *argv = JS_ARGV(cx, vp);
5516 : uint32_t arg0;
5517 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
5518 0 : return JS_FALSE;
5519 : nsresult rv;
5520 0 : nsCOMPtr<nsIDOMText> result;
5521 0 : rv = self->SplitText(arg0, getter_AddRefs(result));
5522 0 : if (NS_FAILED(rv))
5523 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5524 0 : if (!result) {
5525 0 : *vp = JSVAL_NULL;
5526 0 : return JS_TRUE;
5527 : }
5528 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5529 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5530 0 : return JS_TRUE;
5531 : }
5532 : // After this point do not use 'result'!
5533 0 : qsObjectHelper helper(result, cache);
5534 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMText), &interfaces[k_nsIDOMText], vp);
5535 : }
5536 :
5537 : // === interface nsIDOMDOMImplementation
5538 :
5539 : static JSBool
5540 0 : nsIDOMDOMImplementation_HasFeature(JSContext *cx, unsigned argc, jsval *vp)
5541 : {
5542 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5543 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5544 0 : if (!obj)
5545 0 : return JS_FALSE;
5546 : nsIDOMDOMImplementation *self;
5547 0 : xpc_qsSelfRef selfref;
5548 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5549 0 : return JS_FALSE;
5550 0 : if (argc < 2)
5551 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5552 0 : jsval *argv = JS_ARGV(cx, vp);
5553 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5554 : xpc_qsDOMString::eDefaultNullBehavior,
5555 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5556 0 : if (!arg0.IsValid())
5557 0 : return JS_FALSE;
5558 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
5559 : xpc_qsDOMString::eDefaultNullBehavior,
5560 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5561 0 : if (!arg1.IsValid())
5562 0 : return JS_FALSE;
5563 : nsresult rv;
5564 : bool result;
5565 0 : rv = self->HasFeature(arg0, arg1, &result);
5566 0 : if (NS_FAILED(rv))
5567 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5568 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5569 0 : return JS_TRUE;
5570 : }
5571 :
5572 : static JSBool
5573 1 : nsIDOMDOMImplementation_CreateDocumentType(JSContext *cx, unsigned argc, jsval *vp)
5574 : {
5575 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5576 1 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5577 1 : if (!obj)
5578 0 : return JS_FALSE;
5579 1 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5580 : nsIDOMDOMImplementation *self;
5581 2 : xpc_qsSelfRef selfref;
5582 2 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5583 1 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5584 0 : return JS_FALSE;
5585 1 : if (argc < 3)
5586 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5587 1 : jsval *argv = JS_ARGV(cx, vp);
5588 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5589 : xpc_qsDOMString::eDefaultNullBehavior,
5590 2 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5591 1 : if (!arg0.IsValid())
5592 0 : return JS_FALSE;
5593 1 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
5594 : xpc_qsDOMString::eDefaultNullBehavior,
5595 3 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5596 1 : if (!arg1.IsValid())
5597 0 : return JS_FALSE;
5598 1 : xpc_qsDOMString arg2(cx, argv[2], &argv[2],
5599 : xpc_qsDOMString::eDefaultNullBehavior,
5600 3 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5601 1 : if (!arg2.IsValid())
5602 0 : return JS_FALSE;
5603 : nsresult rv;
5604 2 : nsCOMPtr<nsIDOMDocumentType> result;
5605 1 : rv = self->CreateDocumentType(arg0, arg1, arg2, getter_AddRefs(result));
5606 1 : if (NS_FAILED(rv))
5607 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5608 1 : if (!result) {
5609 0 : *vp = JSVAL_NULL;
5610 0 : return JS_TRUE;
5611 : }
5612 1 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5613 1 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5614 0 : return JS_TRUE;
5615 : }
5616 : // After this point do not use 'result'!
5617 2 : qsObjectHelper helper(result, cache);
5618 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentType), &interfaces[k_nsIDOMDocumentType], vp);
5619 : }
5620 :
5621 : static JSBool
5622 1 : nsIDOMDOMImplementation_CreateDocument(JSContext *cx, unsigned argc, jsval *vp)
5623 : {
5624 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5625 1 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5626 1 : if (!obj)
5627 0 : return JS_FALSE;
5628 1 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5629 : nsIDOMDOMImplementation *self;
5630 2 : xpc_qsSelfRef selfref;
5631 2 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5632 1 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5633 0 : return JS_FALSE;
5634 1 : if (argc < 3)
5635 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5636 1 : jsval *argv = JS_ARGV(cx, vp);
5637 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5638 : xpc_qsDOMString::eDefaultNullBehavior,
5639 2 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5640 1 : if (!arg0.IsValid())
5641 0 : return JS_FALSE;
5642 1 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
5643 : xpc_qsDOMString::eDefaultNullBehavior,
5644 3 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5645 1 : if (!arg1.IsValid())
5646 0 : return JS_FALSE;
5647 : nsresult rv;
5648 : nsIDOMDocumentType *arg2;
5649 2 : xpc_qsSelfRef arg2ref;
5650 1 : rv = xpc_qsUnwrapArg<nsIDOMDocumentType>(cx, argv[2], &arg2, &arg2ref.ptr, &argv[2]);
5651 1 : if (NS_FAILED(rv)) {
5652 0 : xpc_qsThrowBadArg(cx, rv, vp, 2);
5653 0 : return JS_FALSE;
5654 : }
5655 2 : nsCOMPtr<nsIDOMDocument> result;
5656 1 : rv = self->CreateDocument(arg0, arg1, arg2, getter_AddRefs(result));
5657 1 : if (NS_FAILED(rv))
5658 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5659 1 : if (!result) {
5660 0 : *vp = JSVAL_NULL;
5661 0 : return JS_TRUE;
5662 : }
5663 1 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5664 1 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5665 0 : return JS_TRUE;
5666 : }
5667 : // After this point do not use 'result'!
5668 2 : qsObjectHelper helper(result, cache);
5669 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
5670 : }
5671 :
5672 : static JSBool
5673 0 : nsIDOMDOMImplementation_CreateHTMLDocument(JSContext *cx, unsigned argc, jsval *vp)
5674 : {
5675 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5676 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5677 0 : if (!obj)
5678 0 : return JS_FALSE;
5679 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
5680 : nsIDOMDOMImplementation *self;
5681 0 : xpc_qsSelfRef selfref;
5682 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
5683 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
5684 0 : return JS_FALSE;
5685 0 : if (argc < 1)
5686 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5687 0 : jsval *argv = JS_ARGV(cx, vp);
5688 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5689 : xpc_qsDOMString::eStringify,
5690 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5691 0 : if (!arg0.IsValid())
5692 0 : return JS_FALSE;
5693 : nsresult rv;
5694 0 : nsCOMPtr<nsIDOMDocument> result;
5695 0 : rv = self->CreateHTMLDocument(arg0, getter_AddRefs(result));
5696 0 : if (NS_FAILED(rv))
5697 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5698 0 : if (!result) {
5699 0 : *vp = JSVAL_NULL;
5700 0 : return JS_TRUE;
5701 : }
5702 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
5703 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
5704 0 : return JS_TRUE;
5705 : }
5706 : // After this point do not use 'result'!
5707 0 : qsObjectHelper helper(result, cache);
5708 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
5709 : }
5710 :
5711 : // === interface nsIDOMDOMStringList
5712 :
5713 : static JSBool
5714 170 : nsIDOMDOMStringList_Item(JSContext *cx, unsigned argc, jsval *vp)
5715 : {
5716 170 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5717 170 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5718 170 : if (!obj)
5719 0 : return JS_FALSE;
5720 : nsIDOMDOMStringList *self;
5721 340 : xpc_qsSelfRef selfref;
5722 170 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5723 0 : return JS_FALSE;
5724 170 : if (argc < 1)
5725 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5726 170 : jsval *argv = JS_ARGV(cx, vp);
5727 : uint32_t arg0;
5728 170 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
5729 0 : return JS_FALSE;
5730 : nsresult rv;
5731 340 : nsString result;
5732 170 : rv = self->Item(arg0, result);
5733 170 : if (NS_FAILED(rv))
5734 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5735 170 : return xpc::StringToJsval(cx, result, vp);
5736 : }
5737 :
5738 : static JSBool
5739 219 : nsIDOMDOMStringList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5740 : {
5741 219 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5742 : nsIDOMDOMStringList *self;
5743 438 : xpc_qsSelfRef selfref;
5744 219 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5745 0 : return JS_FALSE;
5746 : nsresult rv;
5747 : PRUint32 result;
5748 219 : rv = self->GetLength(&result);
5749 219 : if (NS_FAILED(rv))
5750 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5751 219 : *vp = UINT_TO_JSVAL(result);
5752 219 : return JS_TRUE;
5753 : }
5754 :
5755 : static JSBool
5756 120 : nsIDOMDOMStringList_Contains(JSContext *cx, unsigned argc, jsval *vp)
5757 : {
5758 120 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5759 120 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5760 120 : if (!obj)
5761 0 : return JS_FALSE;
5762 : nsIDOMDOMStringList *self;
5763 240 : xpc_qsSelfRef selfref;
5764 120 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5765 0 : return JS_FALSE;
5766 120 : if (argc < 1)
5767 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5768 120 : jsval *argv = JS_ARGV(cx, vp);
5769 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5770 : xpc_qsDOMString::eDefaultNullBehavior,
5771 240 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5772 120 : if (!arg0.IsValid())
5773 0 : return JS_FALSE;
5774 : nsresult rv;
5775 : bool result;
5776 120 : rv = self->Contains(arg0, &result);
5777 120 : if (NS_FAILED(rv))
5778 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5779 120 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5780 120 : return JS_TRUE;
5781 : }
5782 :
5783 : // === interface nsIDOMDOMTokenList
5784 :
5785 : static JSBool
5786 0 : nsIDOMDOMTokenList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5787 : {
5788 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5789 : nsIDOMDOMTokenList *self;
5790 0 : xpc_qsSelfRef selfref;
5791 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5792 0 : return JS_FALSE;
5793 : nsresult rv;
5794 : PRUint32 result;
5795 0 : rv = self->GetLength(&result);
5796 0 : if (NS_FAILED(rv))
5797 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5798 0 : *vp = UINT_TO_JSVAL(result);
5799 0 : return JS_TRUE;
5800 : }
5801 :
5802 : static JSBool
5803 0 : nsIDOMDOMTokenList_Item(JSContext *cx, unsigned argc, jsval *vp)
5804 : {
5805 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5806 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5807 0 : if (!obj)
5808 0 : return JS_FALSE;
5809 : nsIDOMDOMTokenList *self;
5810 0 : xpc_qsSelfRef selfref;
5811 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5812 0 : return JS_FALSE;
5813 0 : if (argc < 1)
5814 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5815 0 : jsval *argv = JS_ARGV(cx, vp);
5816 : uint32_t arg0;
5817 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
5818 0 : return JS_FALSE;
5819 : nsresult rv;
5820 0 : nsString result;
5821 0 : rv = self->Item(arg0, result);
5822 0 : if (NS_FAILED(rv))
5823 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5824 0 : return xpc::StringToJsval(cx, result, vp);
5825 : }
5826 :
5827 : static JSBool
5828 0 : nsIDOMDOMTokenList_Contains(JSContext *cx, unsigned argc, jsval *vp)
5829 : {
5830 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5831 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5832 0 : if (!obj)
5833 0 : return JS_FALSE;
5834 : nsIDOMDOMTokenList *self;
5835 0 : xpc_qsSelfRef selfref;
5836 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5837 0 : return JS_FALSE;
5838 0 : if (argc < 1)
5839 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5840 0 : jsval *argv = JS_ARGV(cx, vp);
5841 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5842 : xpc_qsDOMString::eStringify,
5843 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5844 0 : if (!arg0.IsValid())
5845 0 : return JS_FALSE;
5846 : nsresult rv;
5847 : bool result;
5848 0 : rv = self->Contains(arg0, &result);
5849 0 : if (NS_FAILED(rv))
5850 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5851 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5852 0 : return JS_TRUE;
5853 : }
5854 :
5855 : static JSBool
5856 0 : nsIDOMDOMTokenList_Add(JSContext *cx, unsigned argc, jsval *vp)
5857 : {
5858 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5859 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5860 0 : if (!obj)
5861 0 : return JS_FALSE;
5862 : nsIDOMDOMTokenList *self;
5863 0 : xpc_qsSelfRef selfref;
5864 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5865 0 : return JS_FALSE;
5866 0 : if (argc < 1)
5867 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5868 0 : jsval *argv = JS_ARGV(cx, vp);
5869 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5870 : xpc_qsDOMString::eStringify,
5871 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5872 0 : if (!arg0.IsValid())
5873 0 : return JS_FALSE;
5874 : nsresult rv;
5875 0 : rv = self->Add(arg0);
5876 0 : if (NS_FAILED(rv))
5877 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5878 0 : *vp = JSVAL_VOID;
5879 0 : return JS_TRUE;
5880 : }
5881 :
5882 : static JSBool
5883 0 : nsIDOMDOMTokenList_Remove(JSContext *cx, unsigned argc, jsval *vp)
5884 : {
5885 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5886 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5887 0 : if (!obj)
5888 0 : return JS_FALSE;
5889 : nsIDOMDOMTokenList *self;
5890 0 : xpc_qsSelfRef selfref;
5891 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5892 0 : return JS_FALSE;
5893 0 : if (argc < 1)
5894 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5895 0 : jsval *argv = JS_ARGV(cx, vp);
5896 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5897 : xpc_qsDOMString::eStringify,
5898 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5899 0 : if (!arg0.IsValid())
5900 0 : return JS_FALSE;
5901 : nsresult rv;
5902 0 : rv = self->Remove(arg0);
5903 0 : if (NS_FAILED(rv))
5904 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5905 0 : *vp = JSVAL_VOID;
5906 0 : return JS_TRUE;
5907 : }
5908 :
5909 : static JSBool
5910 0 : nsIDOMDOMTokenList_Toggle(JSContext *cx, unsigned argc, jsval *vp)
5911 : {
5912 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5913 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5914 0 : if (!obj)
5915 0 : return JS_FALSE;
5916 : nsIDOMDOMTokenList *self;
5917 0 : xpc_qsSelfRef selfref;
5918 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5919 0 : return JS_FALSE;
5920 0 : if (argc < 1)
5921 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
5922 0 : jsval *argv = JS_ARGV(cx, vp);
5923 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
5924 : xpc_qsDOMString::eStringify,
5925 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5926 0 : if (!arg0.IsValid())
5927 0 : return JS_FALSE;
5928 : nsresult rv;
5929 : bool result;
5930 0 : rv = self->Toggle(arg0, &result);
5931 0 : if (NS_FAILED(rv))
5932 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5933 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
5934 0 : return JS_TRUE;
5935 : }
5936 :
5937 : static JSBool
5938 0 : nsIDOMDOMTokenList_ToString(JSContext *cx, unsigned argc, jsval *vp)
5939 : {
5940 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5941 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
5942 0 : if (!obj)
5943 0 : return JS_FALSE;
5944 : nsIDOMDOMTokenList *self;
5945 0 : xpc_qsSelfRef selfref;
5946 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
5947 0 : return JS_FALSE;
5948 : nsresult rv;
5949 0 : nsString result;
5950 0 : rv = self->ToString(result);
5951 0 : if (NS_FAILED(rv))
5952 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
5953 0 : return xpc::StringToJsval(cx, result, vp);
5954 : }
5955 :
5956 : // === interface nsIDOMDOMSettableTokenList
5957 :
5958 : static JSBool
5959 0 : nsIDOMDOMSettableTokenList_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
5960 : {
5961 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5962 : nsIDOMDOMSettableTokenList *self;
5963 0 : xpc_qsSelfRef selfref;
5964 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
5965 0 : return JS_FALSE;
5966 : nsresult rv;
5967 0 : nsString result;
5968 0 : rv = self->GetValue(result);
5969 0 : if (NS_FAILED(rv))
5970 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
5971 0 : return xpc::StringToJsval(cx, result, vp);
5972 : }
5973 :
5974 : static JSBool
5975 0 : nsIDOMDOMSettableTokenList_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
5976 : {
5977 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
5978 : nsIDOMDOMSettableTokenList *self;
5979 0 : xpc_qsSelfRef selfref;
5980 0 : JS::AutoValueRooter tvr(cx);
5981 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
5982 0 : return JS_FALSE;
5983 : xpc_qsDOMString arg0(cx, *vp, vp,
5984 : xpc_qsDOMString::eDefaultNullBehavior,
5985 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
5986 0 : if (!arg0.IsValid())
5987 0 : return JS_FALSE;
5988 : nsresult rv;
5989 0 : rv = self->SetValue(arg0);
5990 0 : if (NS_FAILED(rv))
5991 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
5992 0 : return JS_TRUE;
5993 : }
5994 :
5995 : // === interface nsIDOMXULDocument
5996 :
5997 : static JSBool
5998 0 : nsIDOMXULDocument_GetBoxObjectFor(JSContext *cx, unsigned argc, jsval *vp)
5999 : {
6000 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6001 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6002 0 : if (!obj)
6003 0 : return JS_FALSE;
6004 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
6005 : nsIDOMXULDocument *self;
6006 0 : xpc_qsSelfRef selfref;
6007 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6008 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
6009 0 : return JS_FALSE;
6010 0 : if (argc < 1)
6011 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
6012 0 : jsval *argv = JS_ARGV(cx, vp);
6013 : nsresult rv;
6014 : nsIDOMElement *arg0;
6015 0 : xpc_qsSelfRef arg0ref;
6016 0 : rv = xpc_qsUnwrapArg<nsIDOMElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
6017 0 : if (NS_FAILED(rv)) {
6018 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
6019 0 : return JS_FALSE;
6020 : }
6021 0 : nsCOMPtr<nsIBoxObject> result;
6022 0 : rv = self->GetBoxObjectFor(arg0, getter_AddRefs(result));
6023 0 : if (NS_FAILED(rv))
6024 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
6025 0 : if (!result) {
6026 0 : *vp = JSVAL_NULL;
6027 0 : return JS_TRUE;
6028 : }
6029 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6030 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6031 0 : return JS_TRUE;
6032 : }
6033 : // After this point do not use 'result'!
6034 0 : qsObjectHelper helper(result, cache);
6035 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIBoxObject), &interfaces[k_nsIBoxObject], vp);
6036 : }
6037 :
6038 : // === interface nsIDOMNSElement
6039 :
6040 : static JSBool
6041 0 : nsIDOMNSElement_GetElementsByClassName(JSContext *cx, unsigned argc, jsval *vp)
6042 : {
6043 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6044 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6045 0 : if (!obj)
6046 0 : return JS_FALSE;
6047 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
6048 : nsGenericElement *self;
6049 0 : xpc_qsSelfRef selfref;
6050 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6051 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
6052 0 : return JS_FALSE;
6053 0 : if (argc < 1)
6054 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
6055 0 : jsval *argv = JS_ARGV(cx, vp);
6056 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
6057 : xpc_qsDOMString::eDefaultNullBehavior,
6058 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
6059 0 : if (!arg0.IsValid())
6060 0 : return JS_FALSE;
6061 : nsresult rv;
6062 0 : nsCOMPtr<nsIDOMNodeList> result;
6063 0 : rv = self->GetElementsByClassName(arg0, getter_AddRefs(result));
6064 0 : if (NS_FAILED(rv))
6065 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
6066 0 : if (!result) {
6067 0 : *vp = JSVAL_NULL;
6068 0 : return JS_TRUE;
6069 : }
6070 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6071 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6072 0 : return JS_TRUE;
6073 : }
6074 : // After this point do not use 'result'!
6075 0 : qsObjectHelper helper(result, cache);
6076 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
6077 : }
6078 :
6079 : static JSBool
6080 0 : nsIDOMNSElement_GetClientRects(JSContext *cx, unsigned argc, jsval *vp)
6081 : {
6082 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6083 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6084 0 : if (!obj)
6085 0 : return JS_FALSE;
6086 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
6087 : nsGenericElement *self;
6088 0 : xpc_qsSelfRef selfref;
6089 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6090 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
6091 0 : return JS_FALSE;
6092 : nsresult rv;
6093 0 : nsCOMPtr<nsIDOMClientRectList> result;
6094 0 : rv = self->GetClientRects(getter_AddRefs(result));
6095 0 : if (NS_FAILED(rv))
6096 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
6097 0 : if (!result) {
6098 0 : *vp = JSVAL_NULL;
6099 0 : return JS_TRUE;
6100 : }
6101 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6102 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6103 0 : return JS_TRUE;
6104 : }
6105 : // After this point do not use 'result'!
6106 0 : qsObjectHelper helper(result, cache);
6107 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRectList), &interfaces[k_nsIDOMClientRectList], vp);
6108 : }
6109 :
6110 : static JSBool
6111 0 : nsIDOMNSElement_GetBoundingClientRect(JSContext *cx, unsigned argc, jsval *vp)
6112 : {
6113 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6114 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6115 0 : if (!obj)
6116 0 : return JS_FALSE;
6117 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
6118 : nsGenericElement *self;
6119 0 : xpc_qsSelfRef selfref;
6120 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6121 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
6122 0 : return JS_FALSE;
6123 : nsresult rv;
6124 0 : nsCOMPtr<nsIDOMClientRect> result;
6125 0 : rv = self->GetBoundingClientRect(getter_AddRefs(result));
6126 0 : if (NS_FAILED(rv))
6127 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
6128 0 : if (!result) {
6129 0 : *vp = JSVAL_NULL;
6130 0 : return JS_TRUE;
6131 : }
6132 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6133 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6134 0 : return JS_TRUE;
6135 : }
6136 : // After this point do not use 'result'!
6137 0 : qsObjectHelper helper(result, cache);
6138 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
6139 : }
6140 :
6141 : static JSBool
6142 0 : nsIDOMNSElement_GetScrollTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6143 : {
6144 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6145 : nsGenericElement *self;
6146 0 : xpc_qsSelfRef selfref;
6147 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6148 0 : return JS_FALSE;
6149 0 : PRInt32 result = self->GetScrollTop();
6150 : #ifdef DEBUG
6151 : nsresult debug_rv;
6152 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6153 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6154 : PRInt32 debug_result;
6155 0 : debug_rv = debug_self->GetScrollTop(&debug_result);
6156 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6157 : "Got the wrong answer from the custom method call!");
6158 : #endif
6159 0 : *vp = INT_TO_JSVAL(result);
6160 0 : return JS_TRUE;
6161 : }
6162 :
6163 : static JSBool
6164 0 : nsIDOMNSElement_SetScrollTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6165 : {
6166 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6167 : nsGenericElement *self;
6168 0 : xpc_qsSelfRef selfref;
6169 0 : JS::AutoValueRooter tvr(cx);
6170 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
6171 0 : return JS_FALSE;
6172 : int32_t arg0;
6173 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
6174 0 : return JS_FALSE;
6175 0 : self->SetScrollTop(arg0);
6176 0 : return JS_TRUE;
6177 : }
6178 :
6179 : static JSBool
6180 0 : nsIDOMNSElement_GetScrollLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6181 : {
6182 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6183 : nsGenericElement *self;
6184 0 : xpc_qsSelfRef selfref;
6185 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6186 0 : return JS_FALSE;
6187 0 : PRInt32 result = self->GetScrollLeft();
6188 : #ifdef DEBUG
6189 : nsresult debug_rv;
6190 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6191 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6192 : PRInt32 debug_result;
6193 0 : debug_rv = debug_self->GetScrollLeft(&debug_result);
6194 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6195 : "Got the wrong answer from the custom method call!");
6196 : #endif
6197 0 : *vp = INT_TO_JSVAL(result);
6198 0 : return JS_TRUE;
6199 : }
6200 :
6201 : static JSBool
6202 0 : nsIDOMNSElement_SetScrollLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6203 : {
6204 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6205 : nsGenericElement *self;
6206 0 : xpc_qsSelfRef selfref;
6207 0 : JS::AutoValueRooter tvr(cx);
6208 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
6209 0 : return JS_FALSE;
6210 : int32_t arg0;
6211 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
6212 0 : return JS_FALSE;
6213 0 : self->SetScrollLeft(arg0);
6214 0 : return JS_TRUE;
6215 : }
6216 :
6217 : static JSBool
6218 0 : nsIDOMNSElement_GetScrollHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6219 : {
6220 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6221 : nsGenericElement *self;
6222 0 : xpc_qsSelfRef selfref;
6223 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6224 0 : return JS_FALSE;
6225 0 : PRInt32 result = self->GetScrollHeight();
6226 : #ifdef DEBUG
6227 : nsresult debug_rv;
6228 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6229 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6230 : PRInt32 debug_result;
6231 0 : debug_rv = debug_self->GetScrollHeight(&debug_result);
6232 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6233 : "Got the wrong answer from the custom method call!");
6234 : #endif
6235 0 : *vp = INT_TO_JSVAL(result);
6236 0 : return JS_TRUE;
6237 : }
6238 :
6239 : static JSBool
6240 0 : nsIDOMNSElement_GetScrollWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6241 : {
6242 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6243 : nsGenericElement *self;
6244 0 : xpc_qsSelfRef selfref;
6245 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6246 0 : return JS_FALSE;
6247 0 : PRInt32 result = self->GetScrollWidth();
6248 : #ifdef DEBUG
6249 : nsresult debug_rv;
6250 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6251 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6252 : PRInt32 debug_result;
6253 0 : debug_rv = debug_self->GetScrollWidth(&debug_result);
6254 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6255 : "Got the wrong answer from the custom method call!");
6256 : #endif
6257 0 : *vp = INT_TO_JSVAL(result);
6258 0 : return JS_TRUE;
6259 : }
6260 :
6261 : static JSBool
6262 0 : nsIDOMNSElement_GetClientTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6263 : {
6264 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6265 : nsGenericElement *self;
6266 0 : xpc_qsSelfRef selfref;
6267 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6268 0 : return JS_FALSE;
6269 0 : PRInt32 result = self->GetClientTop();
6270 : #ifdef DEBUG
6271 : nsresult debug_rv;
6272 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6273 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6274 : PRInt32 debug_result;
6275 0 : debug_rv = debug_self->GetClientTop(&debug_result);
6276 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6277 : "Got the wrong answer from the custom method call!");
6278 : #endif
6279 0 : *vp = INT_TO_JSVAL(result);
6280 0 : return JS_TRUE;
6281 : }
6282 :
6283 : static JSBool
6284 0 : nsIDOMNSElement_GetClientLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6285 : {
6286 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6287 : nsGenericElement *self;
6288 0 : xpc_qsSelfRef selfref;
6289 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6290 0 : return JS_FALSE;
6291 0 : PRInt32 result = self->GetClientLeft();
6292 : #ifdef DEBUG
6293 : nsresult debug_rv;
6294 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6295 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6296 : PRInt32 debug_result;
6297 0 : debug_rv = debug_self->GetClientLeft(&debug_result);
6298 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6299 : "Got the wrong answer from the custom method call!");
6300 : #endif
6301 0 : *vp = INT_TO_JSVAL(result);
6302 0 : return JS_TRUE;
6303 : }
6304 :
6305 : static JSBool
6306 0 : nsIDOMNSElement_GetClientHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6307 : {
6308 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6309 : nsGenericElement *self;
6310 0 : xpc_qsSelfRef selfref;
6311 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6312 0 : return JS_FALSE;
6313 0 : PRInt32 result = self->GetClientHeight();
6314 : #ifdef DEBUG
6315 : nsresult debug_rv;
6316 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6317 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6318 : PRInt32 debug_result;
6319 0 : debug_rv = debug_self->GetClientHeight(&debug_result);
6320 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6321 : "Got the wrong answer from the custom method call!");
6322 : #endif
6323 0 : *vp = INT_TO_JSVAL(result);
6324 0 : return JS_TRUE;
6325 : }
6326 :
6327 : static JSBool
6328 0 : nsIDOMNSElement_GetClientWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6329 : {
6330 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6331 : nsGenericElement *self;
6332 0 : xpc_qsSelfRef selfref;
6333 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6334 0 : return JS_FALSE;
6335 0 : PRInt32 result = self->GetClientWidth();
6336 : #ifdef DEBUG
6337 : nsresult debug_rv;
6338 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6339 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6340 : PRInt32 debug_result;
6341 0 : debug_rv = debug_self->GetClientWidth(&debug_result);
6342 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6343 : "Got the wrong answer from the custom method call!");
6344 : #endif
6345 0 : *vp = INT_TO_JSVAL(result);
6346 0 : return JS_TRUE;
6347 : }
6348 :
6349 : static JSBool
6350 2 : nsIDOMNSElement_GetFirstElementChild(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6351 : {
6352 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6353 2 : JSObject *callee = nsnull;
6354 : nsGenericElement *self;
6355 4 : xpc_qsSelfRef selfref;
6356 4 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6357 2 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6358 0 : return JS_FALSE;
6359 2 : nsIContent *result = self->GetFirstElementChild();
6360 : #ifdef DEBUG
6361 : nsresult debug_rv;
6362 4 : nsCOMPtr<nsIDOMNSElement> debug_self;
6363 2 : CallQueryInterface(self, getter_AddRefs(debug_self));
6364 4 : nsCOMPtr<nsIDOMElement> debug_result;
6365 2 : debug_rv = debug_self->GetFirstElementChild(getter_AddRefs(debug_result));
6366 2 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6367 : "Got the wrong answer from the custom method call!");
6368 : #endif
6369 2 : if (!result) {
6370 0 : *vp = JSVAL_NULL;
6371 0 : return JS_TRUE;
6372 : }
6373 2 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6374 2 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6375 1 : return JS_TRUE;
6376 : }
6377 : // After this point do not use 'result'!
6378 2 : qsObjectHelper helper(result, cache);
6379 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
6380 : }
6381 :
6382 : static JSBool
6383 0 : nsIDOMNSElement_GetLastElementChild(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->GetLastElementChild();
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->GetLastElementChild(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_GetPreviousElementSibling(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->GetPreviousElementSibling();
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->GetPreviousElementSibling(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_GetNextElementSibling(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6450 : {
6451 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6452 0 : JSObject *callee = nsnull;
6453 : nsGenericElement *self;
6454 0 : xpc_qsSelfRef selfref;
6455 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6456 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6457 0 : return JS_FALSE;
6458 0 : nsIContent *result = self->GetNextElementSibling();
6459 : #ifdef DEBUG
6460 : nsresult debug_rv;
6461 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6462 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6463 0 : nsCOMPtr<nsIDOMElement> debug_result;
6464 0 : debug_rv = debug_self->GetNextElementSibling(getter_AddRefs(debug_result));
6465 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
6466 : "Got the wrong answer from the custom method call!");
6467 : #endif
6468 0 : if (!result) {
6469 0 : *vp = JSVAL_NULL;
6470 0 : return JS_TRUE;
6471 : }
6472 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6473 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6474 0 : return JS_TRUE;
6475 : }
6476 : // After this point do not use 'result'!
6477 0 : qsObjectHelper helper(result, cache);
6478 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
6479 : }
6480 :
6481 : static JSBool
6482 0 : nsIDOMNSElement_GetChildElementCount(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6483 : {
6484 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6485 : nsGenericElement *self;
6486 0 : xpc_qsSelfRef selfref;
6487 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6488 0 : return JS_FALSE;
6489 : nsresult rv;
6490 : PRUint32 result;
6491 0 : rv = self->GetChildElementCount(&result);
6492 0 : if (NS_FAILED(rv))
6493 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
6494 0 : *vp = UINT_TO_JSVAL(result);
6495 0 : return JS_TRUE;
6496 : }
6497 :
6498 : static JSBool
6499 167 : nsIDOMNSElement_GetChildren(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6500 : {
6501 167 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6502 167 : JSObject *callee = nsnull;
6503 : nsGenericElement *self;
6504 334 : xpc_qsSelfRef selfref;
6505 334 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6506 167 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6507 0 : return JS_FALSE;
6508 : nsresult rv;
6509 334 : nsCOMPtr<nsIDOMNodeList> result;
6510 167 : rv = self->GetChildren(getter_AddRefs(result));
6511 167 : if (NS_FAILED(rv))
6512 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
6513 167 : if (!result) {
6514 0 : *vp = JSVAL_NULL;
6515 0 : return JS_TRUE;
6516 : }
6517 167 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6518 167 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6519 0 : return JS_TRUE;
6520 : }
6521 : // After this point do not use 'result'!
6522 334 : qsObjectHelper helper(result, cache);
6523 167 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
6524 : }
6525 :
6526 : static JSBool
6527 0 : nsIDOMNSElement_GetClassList(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6528 : {
6529 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6530 0 : JSObject *callee = nsnull;
6531 : nsGenericElement *self;
6532 0 : xpc_qsSelfRef selfref;
6533 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6534 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6535 0 : return JS_FALSE;
6536 : nsresult rv;
6537 0 : nsDOMTokenList *result = self->GetClassList(&rv);
6538 : #ifdef DEBUG
6539 : nsresult debug_rv;
6540 0 : nsCOMPtr<nsIDOMNSElement> debug_self;
6541 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6542 0 : nsCOMPtr<nsIDOMDOMTokenList> debug_result;
6543 0 : debug_rv = debug_self->GetClassList(getter_AddRefs(debug_result));
6544 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) == NS_SUCCEEDED(rv) && xpc_qsSameResult(debug_result, result),
6545 : "Got the wrong answer from the custom method call!");
6546 : #endif
6547 0 : if (NS_FAILED(rv))
6548 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
6549 0 : if (!result) {
6550 0 : *vp = JSVAL_NULL;
6551 0 : return JS_TRUE;
6552 : }
6553 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6554 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6555 0 : return JS_TRUE;
6556 : }
6557 : // After this point do not use 'result'!
6558 0 : qsObjectHelper helper(result, cache);
6559 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMTokenList), &interfaces[k_nsIDOMDOMTokenList], vp);
6560 : }
6561 :
6562 : static JSBool
6563 0 : nsIDOMNSElement_SetCapture(JSContext *cx, unsigned argc, jsval *vp)
6564 : {
6565 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6566 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6567 0 : if (!obj)
6568 0 : return JS_FALSE;
6569 : nsGenericElement *self;
6570 0 : xpc_qsSelfRef selfref;
6571 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
6572 0 : return JS_FALSE;
6573 0 : jsval *argv = JS_ARGV(cx, vp);
6574 : JSBool arg0;
6575 0 : JS_ValueToBoolean(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0);
6576 0 : self->SetCapture(arg0);
6577 0 : *vp = JSVAL_VOID;
6578 0 : return JS_TRUE;
6579 : }
6580 :
6581 : static JSBool
6582 0 : nsIDOMNSElement_ReleaseCapture(JSContext *cx, unsigned argc, jsval *vp)
6583 : {
6584 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6585 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6586 0 : if (!obj)
6587 0 : return JS_FALSE;
6588 : nsGenericElement *self;
6589 0 : xpc_qsSelfRef selfref;
6590 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
6591 0 : return JS_FALSE;
6592 0 : self->ReleaseCapture();
6593 0 : *vp = JSVAL_VOID;
6594 0 : return JS_TRUE;
6595 : }
6596 :
6597 : static JSBool
6598 0 : nsIDOMNSElement_MozMatchesSelector(JSContext *cx, unsigned argc, jsval *vp)
6599 : {
6600 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6601 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
6602 0 : if (!obj)
6603 0 : return JS_FALSE;
6604 : nsGenericElement *self;
6605 0 : xpc_qsSelfRef selfref;
6606 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
6607 0 : return JS_FALSE;
6608 0 : if (argc < 1)
6609 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
6610 0 : jsval *argv = JS_ARGV(cx, vp);
6611 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
6612 : xpc_qsDOMString::eStringify,
6613 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
6614 0 : if (!arg0.IsValid())
6615 0 : return JS_FALSE;
6616 : nsresult rv;
6617 0 : bool result = self->MozMatchesSelector(arg0, &rv);
6618 0 : if (NS_FAILED(rv))
6619 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
6620 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
6621 0 : return JS_TRUE;
6622 : }
6623 :
6624 : // === interface nsIDOMElementCSSInlineStyle
6625 :
6626 : static JSBool
6627 0 : nsIDOMElementCSSInlineStyle_GetStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6628 : {
6629 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6630 0 : JSObject *callee = nsnull;
6631 : nsStyledElement *self;
6632 0 : xpc_qsSelfRef selfref;
6633 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
6634 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
6635 0 : return JS_FALSE;
6636 : nsresult rv;
6637 : /* XXXbz MathML elements inherit from nsStyledElement but
6638 : don't actually implement GetStyle. */
6639 0 : if (self->GetNameSpaceID() == kNameSpaceID_MathML)
6640 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_BAD_CONVERT_JS);
6641 0 : nsIDOMCSSStyleDeclaration* result = self->GetStyle(&rv);
6642 : #ifdef DEBUG
6643 : nsresult debug_rv;
6644 0 : nsCOMPtr<nsIDOMElementCSSInlineStyle> debug_self;
6645 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
6646 0 : nsCOMPtr<nsIDOMCSSStyleDeclaration> debug_result;
6647 0 : debug_rv = debug_self->GetStyle(getter_AddRefs(debug_result));
6648 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) == NS_SUCCEEDED(rv) && xpc_qsSameResult(debug_result, result),
6649 : "Got the wrong answer from the custom method call!");
6650 : #endif
6651 0 : if (NS_FAILED(rv))
6652 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
6653 0 : if (!result) {
6654 0 : *vp = JSVAL_NULL;
6655 0 : return JS_TRUE;
6656 : }
6657 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
6658 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
6659 0 : return JS_TRUE;
6660 : }
6661 : // After this point do not use 'result'!
6662 0 : qsObjectHelper helper(result, cache);
6663 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSStyleDeclaration), &interfaces[k_nsIDOMCSSStyleDeclaration], vp);
6664 : }
6665 :
6666 : // === interface nsIDOMCSS2Properties
6667 :
6668 : static JSBool
6669 0 : nsIDOMCSS2Properties_Get(JSContext *cx, JSObject *obj, jsid id, const nsCSSProperty prop, jsval *vp)
6670 : {
6671 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6672 : nsICSSDeclaration *self;
6673 0 : xpc_qsSelfRef selfref;
6674 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
6675 0 : return JS_FALSE;
6676 : nsresult rv;
6677 0 : nsString result;
6678 0 : rv = self->GetPropertyValue(prop, result);
6679 0 : if (NS_FAILED(rv))
6680 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
6681 0 : return xpc::StringToJsval(cx, result, vp);
6682 : }
6683 :
6684 : static JSBool
6685 0 : nsIDOMCSS2Properties_GetBackground(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6686 : {
6687 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Background, vp);
6688 : }
6689 :
6690 : static JSBool
6691 0 : nsIDOMCSS2Properties_Set(JSContext *cx, JSObject *obj, jsid id, JSBool strict, const nsCSSProperty prop, jsval *vp)
6692 : {
6693 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
6694 : nsICSSDeclaration *self;
6695 0 : xpc_qsSelfRef selfref;
6696 0 : JS::AutoValueRooter tvr(cx);
6697 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
6698 0 : return JS_FALSE;
6699 : xpc_qsDOMString arg0(cx, *vp, vp,
6700 : xpc_qsDOMString::eDefaultNullBehavior,
6701 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
6702 0 : if (!arg0.IsValid())
6703 0 : return JS_FALSE;
6704 : nsresult rv;
6705 0 : rv = self->SetPropertyValue(prop, arg0);
6706 0 : if (NS_FAILED(rv))
6707 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
6708 0 : return JS_TRUE;
6709 : }
6710 :
6711 : static JSBool
6712 0 : nsIDOMCSS2Properties_SetBackground(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6713 : {
6714 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Background, vp);
6715 : }
6716 :
6717 : static JSBool
6718 0 : nsIDOMCSS2Properties_GetBackgroundAttachment(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6719 : {
6720 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundAttachment, vp);
6721 : }
6722 :
6723 : static JSBool
6724 0 : nsIDOMCSS2Properties_SetBackgroundAttachment(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6725 : {
6726 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundAttachment, vp);
6727 : }
6728 :
6729 : static JSBool
6730 0 : nsIDOMCSS2Properties_GetBackgroundColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6731 : {
6732 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundColor, vp);
6733 : }
6734 :
6735 : static JSBool
6736 0 : nsIDOMCSS2Properties_SetBackgroundColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6737 : {
6738 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundColor, vp);
6739 : }
6740 :
6741 : static JSBool
6742 0 : nsIDOMCSS2Properties_GetBackgroundImage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6743 : {
6744 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundImage, vp);
6745 : }
6746 :
6747 : static JSBool
6748 0 : nsIDOMCSS2Properties_SetBackgroundImage(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6749 : {
6750 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundImage, vp);
6751 : }
6752 :
6753 : static JSBool
6754 0 : nsIDOMCSS2Properties_GetBackgroundPosition(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6755 : {
6756 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundPosition, vp);
6757 : }
6758 :
6759 : static JSBool
6760 0 : nsIDOMCSS2Properties_SetBackgroundPosition(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6761 : {
6762 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundPosition, vp);
6763 : }
6764 :
6765 : static JSBool
6766 0 : nsIDOMCSS2Properties_GetBackgroundRepeat(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6767 : {
6768 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundRepeat, vp);
6769 : }
6770 :
6771 : static JSBool
6772 0 : nsIDOMCSS2Properties_SetBackgroundRepeat(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6773 : {
6774 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundRepeat, vp);
6775 : }
6776 :
6777 : static JSBool
6778 0 : nsIDOMCSS2Properties_GetBorder(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6779 : {
6780 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Border, vp);
6781 : }
6782 :
6783 : static JSBool
6784 0 : nsIDOMCSS2Properties_SetBorder(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6785 : {
6786 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Border, vp);
6787 : }
6788 :
6789 : static JSBool
6790 0 : nsIDOMCSS2Properties_GetBorderCollapse(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6791 : {
6792 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderCollapse, vp);
6793 : }
6794 :
6795 : static JSBool
6796 0 : nsIDOMCSS2Properties_SetBorderCollapse(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6797 : {
6798 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderCollapse, vp);
6799 : }
6800 :
6801 : static JSBool
6802 0 : nsIDOMCSS2Properties_GetBorderColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6803 : {
6804 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderColor, vp);
6805 : }
6806 :
6807 : static JSBool
6808 0 : nsIDOMCSS2Properties_SetBorderColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6809 : {
6810 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderColor, vp);
6811 : }
6812 :
6813 : static JSBool
6814 0 : nsIDOMCSS2Properties_GetBorderSpacing(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6815 : {
6816 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderSpacing, vp);
6817 : }
6818 :
6819 : static JSBool
6820 0 : nsIDOMCSS2Properties_SetBorderSpacing(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6821 : {
6822 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderSpacing, vp);
6823 : }
6824 :
6825 : static JSBool
6826 0 : nsIDOMCSS2Properties_GetBorderStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6827 : {
6828 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderStyle, vp);
6829 : }
6830 :
6831 : static JSBool
6832 0 : nsIDOMCSS2Properties_SetBorderStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6833 : {
6834 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderStyle, vp);
6835 : }
6836 :
6837 : static JSBool
6838 0 : nsIDOMCSS2Properties_GetBorderTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6839 : {
6840 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTop, vp);
6841 : }
6842 :
6843 : static JSBool
6844 0 : nsIDOMCSS2Properties_SetBorderTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6845 : {
6846 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTop, vp);
6847 : }
6848 :
6849 : static JSBool
6850 0 : nsIDOMCSS2Properties_GetBorderRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6851 : {
6852 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderRight, vp);
6853 : }
6854 :
6855 : static JSBool
6856 0 : nsIDOMCSS2Properties_SetBorderRight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6857 : {
6858 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderRight, vp);
6859 : }
6860 :
6861 : static JSBool
6862 0 : nsIDOMCSS2Properties_GetBorderBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6863 : {
6864 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottom, vp);
6865 : }
6866 :
6867 : static JSBool
6868 0 : nsIDOMCSS2Properties_SetBorderBottom(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6869 : {
6870 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottom, vp);
6871 : }
6872 :
6873 : static JSBool
6874 0 : nsIDOMCSS2Properties_GetBorderLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6875 : {
6876 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderLeft, vp);
6877 : }
6878 :
6879 : static JSBool
6880 0 : nsIDOMCSS2Properties_SetBorderLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6881 : {
6882 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderLeft, vp);
6883 : }
6884 :
6885 : static JSBool
6886 0 : nsIDOMCSS2Properties_GetBorderTopColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6887 : {
6888 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTopColor, vp);
6889 : }
6890 :
6891 : static JSBool
6892 0 : nsIDOMCSS2Properties_SetBorderTopColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6893 : {
6894 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTopColor, vp);
6895 : }
6896 :
6897 : static JSBool
6898 0 : nsIDOMCSS2Properties_GetBorderRightColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6899 : {
6900 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderRightColor, vp);
6901 : }
6902 :
6903 : static JSBool
6904 0 : nsIDOMCSS2Properties_SetBorderRightColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6905 : {
6906 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderRightColor, vp);
6907 : }
6908 :
6909 : static JSBool
6910 0 : nsIDOMCSS2Properties_GetBorderBottomColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6911 : {
6912 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottomColor, vp);
6913 : }
6914 :
6915 : static JSBool
6916 0 : nsIDOMCSS2Properties_SetBorderBottomColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6917 : {
6918 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottomColor, vp);
6919 : }
6920 :
6921 : static JSBool
6922 0 : nsIDOMCSS2Properties_GetBorderLeftColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6923 : {
6924 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderLeftColor, vp);
6925 : }
6926 :
6927 : static JSBool
6928 0 : nsIDOMCSS2Properties_SetBorderLeftColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6929 : {
6930 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderLeftColor, vp);
6931 : }
6932 :
6933 : static JSBool
6934 0 : nsIDOMCSS2Properties_GetBorderTopStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6935 : {
6936 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTopStyle, vp);
6937 : }
6938 :
6939 : static JSBool
6940 0 : nsIDOMCSS2Properties_SetBorderTopStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6941 : {
6942 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTopStyle, vp);
6943 : }
6944 :
6945 : static JSBool
6946 0 : nsIDOMCSS2Properties_GetBorderRightStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6947 : {
6948 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderRightStyle, vp);
6949 : }
6950 :
6951 : static JSBool
6952 0 : nsIDOMCSS2Properties_SetBorderRightStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6953 : {
6954 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderRightStyle, vp);
6955 : }
6956 :
6957 : static JSBool
6958 0 : nsIDOMCSS2Properties_GetBorderBottomStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6959 : {
6960 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottomStyle, vp);
6961 : }
6962 :
6963 : static JSBool
6964 0 : nsIDOMCSS2Properties_SetBorderBottomStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6965 : {
6966 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottomStyle, vp);
6967 : }
6968 :
6969 : static JSBool
6970 0 : nsIDOMCSS2Properties_GetBorderLeftStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6971 : {
6972 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderLeftStyle, vp);
6973 : }
6974 :
6975 : static JSBool
6976 0 : nsIDOMCSS2Properties_SetBorderLeftStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6977 : {
6978 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderLeftStyle, vp);
6979 : }
6980 :
6981 : static JSBool
6982 0 : nsIDOMCSS2Properties_GetBorderTopWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6983 : {
6984 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTopWidth, vp);
6985 : }
6986 :
6987 : static JSBool
6988 0 : nsIDOMCSS2Properties_SetBorderTopWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
6989 : {
6990 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTopWidth, vp);
6991 : }
6992 :
6993 : static JSBool
6994 0 : nsIDOMCSS2Properties_GetBorderRightWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
6995 : {
6996 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderRightWidth, vp);
6997 : }
6998 :
6999 : static JSBool
7000 0 : nsIDOMCSS2Properties_SetBorderRightWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7001 : {
7002 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderRightWidth, vp);
7003 : }
7004 :
7005 : static JSBool
7006 0 : nsIDOMCSS2Properties_GetBorderBottomWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7007 : {
7008 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottomWidth, vp);
7009 : }
7010 :
7011 : static JSBool
7012 0 : nsIDOMCSS2Properties_SetBorderBottomWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7013 : {
7014 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottomWidth, vp);
7015 : }
7016 :
7017 : static JSBool
7018 0 : nsIDOMCSS2Properties_GetBorderLeftWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7019 : {
7020 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderLeftWidth, vp);
7021 : }
7022 :
7023 : static JSBool
7024 0 : nsIDOMCSS2Properties_SetBorderLeftWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7025 : {
7026 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderLeftWidth, vp);
7027 : }
7028 :
7029 : static JSBool
7030 0 : nsIDOMCSS2Properties_GetBorderWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7031 : {
7032 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderWidth, vp);
7033 : }
7034 :
7035 : static JSBool
7036 0 : nsIDOMCSS2Properties_SetBorderWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7037 : {
7038 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderWidth, vp);
7039 : }
7040 :
7041 : static JSBool
7042 0 : nsIDOMCSS2Properties_GetBorderRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7043 : {
7044 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderRadius, vp);
7045 : }
7046 :
7047 : static JSBool
7048 0 : nsIDOMCSS2Properties_SetBorderRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7049 : {
7050 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderRadius, vp);
7051 : }
7052 :
7053 : static JSBool
7054 0 : nsIDOMCSS2Properties_GetBorderTopLeftRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7055 : {
7056 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTopLeftRadius, vp);
7057 : }
7058 :
7059 : static JSBool
7060 0 : nsIDOMCSS2Properties_SetBorderTopLeftRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7061 : {
7062 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTopLeftRadius, vp);
7063 : }
7064 :
7065 : static JSBool
7066 0 : nsIDOMCSS2Properties_GetBorderTopRightRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7067 : {
7068 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderTopRightRadius, vp);
7069 : }
7070 :
7071 : static JSBool
7072 0 : nsIDOMCSS2Properties_SetBorderTopRightRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7073 : {
7074 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderTopRightRadius, vp);
7075 : }
7076 :
7077 : static JSBool
7078 0 : nsIDOMCSS2Properties_GetBorderBottomLeftRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7079 : {
7080 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottomLeftRadius, vp);
7081 : }
7082 :
7083 : static JSBool
7084 0 : nsIDOMCSS2Properties_SetBorderBottomLeftRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7085 : {
7086 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottomLeftRadius, vp);
7087 : }
7088 :
7089 : static JSBool
7090 0 : nsIDOMCSS2Properties_GetBorderBottomRightRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7091 : {
7092 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BorderBottomRightRadius, vp);
7093 : }
7094 :
7095 : static JSBool
7096 0 : nsIDOMCSS2Properties_SetBorderBottomRightRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7097 : {
7098 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BorderBottomRightRadius, vp);
7099 : }
7100 :
7101 : static JSBool
7102 0 : nsIDOMCSS2Properties_GetBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7103 : {
7104 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Bottom, vp);
7105 : }
7106 :
7107 : static JSBool
7108 0 : nsIDOMCSS2Properties_SetBottom(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7109 : {
7110 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Bottom, vp);
7111 : }
7112 :
7113 : static JSBool
7114 0 : nsIDOMCSS2Properties_GetBoxShadow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7115 : {
7116 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BoxShadow, vp);
7117 : }
7118 :
7119 : static JSBool
7120 0 : nsIDOMCSS2Properties_SetBoxShadow(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7121 : {
7122 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BoxShadow, vp);
7123 : }
7124 :
7125 : static JSBool
7126 0 : nsIDOMCSS2Properties_GetCaptionSide(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7127 : {
7128 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_CaptionSide, vp);
7129 : }
7130 :
7131 : static JSBool
7132 0 : nsIDOMCSS2Properties_SetCaptionSide(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7133 : {
7134 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_CaptionSide, vp);
7135 : }
7136 :
7137 : static JSBool
7138 0 : nsIDOMCSS2Properties_GetClear(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7139 : {
7140 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Clear, vp);
7141 : }
7142 :
7143 : static JSBool
7144 0 : nsIDOMCSS2Properties_SetClear(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7145 : {
7146 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Clear, vp);
7147 : }
7148 :
7149 : static JSBool
7150 0 : nsIDOMCSS2Properties_GetClip(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7151 : {
7152 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Clip, vp);
7153 : }
7154 :
7155 : static JSBool
7156 0 : nsIDOMCSS2Properties_SetClip(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7157 : {
7158 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Clip, vp);
7159 : }
7160 :
7161 : static JSBool
7162 0 : nsIDOMCSS2Properties_GetColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7163 : {
7164 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Color, vp);
7165 : }
7166 :
7167 : static JSBool
7168 0 : nsIDOMCSS2Properties_SetColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7169 : {
7170 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Color, vp);
7171 : }
7172 :
7173 : static JSBool
7174 0 : nsIDOMCSS2Properties_GetContent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7175 : {
7176 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Content, vp);
7177 : }
7178 :
7179 : static JSBool
7180 0 : nsIDOMCSS2Properties_SetContent(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7181 : {
7182 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Content, vp);
7183 : }
7184 :
7185 : static JSBool
7186 0 : nsIDOMCSS2Properties_GetCounterIncrement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7187 : {
7188 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_CounterIncrement, vp);
7189 : }
7190 :
7191 : static JSBool
7192 0 : nsIDOMCSS2Properties_SetCounterIncrement(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7193 : {
7194 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_CounterIncrement, vp);
7195 : }
7196 :
7197 : static JSBool
7198 0 : nsIDOMCSS2Properties_GetCounterReset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7199 : {
7200 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_CounterReset, vp);
7201 : }
7202 :
7203 : static JSBool
7204 0 : nsIDOMCSS2Properties_SetCounterReset(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7205 : {
7206 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_CounterReset, vp);
7207 : }
7208 :
7209 : static JSBool
7210 0 : nsIDOMCSS2Properties_GetCursor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7211 : {
7212 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Cursor, vp);
7213 : }
7214 :
7215 : static JSBool
7216 0 : nsIDOMCSS2Properties_SetCursor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7217 : {
7218 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Cursor, vp);
7219 : }
7220 :
7221 : static JSBool
7222 0 : nsIDOMCSS2Properties_GetDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7223 : {
7224 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Direction, vp);
7225 : }
7226 :
7227 : static JSBool
7228 0 : nsIDOMCSS2Properties_SetDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7229 : {
7230 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Direction, vp);
7231 : }
7232 :
7233 : static JSBool
7234 0 : nsIDOMCSS2Properties_GetDisplay(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7235 : {
7236 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Display, vp);
7237 : }
7238 :
7239 : static JSBool
7240 0 : nsIDOMCSS2Properties_SetDisplay(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7241 : {
7242 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Display, vp);
7243 : }
7244 :
7245 : static JSBool
7246 0 : nsIDOMCSS2Properties_GetEmptyCells(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7247 : {
7248 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_EmptyCells, vp);
7249 : }
7250 :
7251 : static JSBool
7252 0 : nsIDOMCSS2Properties_SetEmptyCells(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7253 : {
7254 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_EmptyCells, vp);
7255 : }
7256 :
7257 : static JSBool
7258 0 : nsIDOMCSS2Properties_GetCssFloat(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7259 : {
7260 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_CssFloat, vp);
7261 : }
7262 :
7263 : static JSBool
7264 0 : nsIDOMCSS2Properties_SetCssFloat(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7265 : {
7266 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_CssFloat, vp);
7267 : }
7268 :
7269 : static JSBool
7270 0 : nsIDOMCSS2Properties_GetFont(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7271 : {
7272 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Font, vp);
7273 : }
7274 :
7275 : static JSBool
7276 0 : nsIDOMCSS2Properties_SetFont(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7277 : {
7278 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Font, vp);
7279 : }
7280 :
7281 : static JSBool
7282 0 : nsIDOMCSS2Properties_GetFontFamily(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7283 : {
7284 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontFamily, vp);
7285 : }
7286 :
7287 : static JSBool
7288 0 : nsIDOMCSS2Properties_SetFontFamily(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7289 : {
7290 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontFamily, vp);
7291 : }
7292 :
7293 : static JSBool
7294 0 : nsIDOMCSS2Properties_GetFontSize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7295 : {
7296 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontSize, vp);
7297 : }
7298 :
7299 : static JSBool
7300 0 : nsIDOMCSS2Properties_SetFontSize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7301 : {
7302 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontSize, vp);
7303 : }
7304 :
7305 : static JSBool
7306 0 : nsIDOMCSS2Properties_GetFontSizeAdjust(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7307 : {
7308 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontSizeAdjust, vp);
7309 : }
7310 :
7311 : static JSBool
7312 0 : nsIDOMCSS2Properties_SetFontSizeAdjust(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7313 : {
7314 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontSizeAdjust, vp);
7315 : }
7316 :
7317 : static JSBool
7318 0 : nsIDOMCSS2Properties_GetFontStretch(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7319 : {
7320 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontStretch, vp);
7321 : }
7322 :
7323 : static JSBool
7324 0 : nsIDOMCSS2Properties_SetFontStretch(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7325 : {
7326 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontStretch, vp);
7327 : }
7328 :
7329 : static JSBool
7330 0 : nsIDOMCSS2Properties_GetFontStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7331 : {
7332 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontStyle, vp);
7333 : }
7334 :
7335 : static JSBool
7336 0 : nsIDOMCSS2Properties_SetFontStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7337 : {
7338 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontStyle, vp);
7339 : }
7340 :
7341 : static JSBool
7342 0 : nsIDOMCSS2Properties_GetFontVariant(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7343 : {
7344 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontVariant, vp);
7345 : }
7346 :
7347 : static JSBool
7348 0 : nsIDOMCSS2Properties_SetFontVariant(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7349 : {
7350 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontVariant, vp);
7351 : }
7352 :
7353 : static JSBool
7354 0 : nsIDOMCSS2Properties_GetFontWeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7355 : {
7356 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FontWeight, vp);
7357 : }
7358 :
7359 : static JSBool
7360 0 : nsIDOMCSS2Properties_SetFontWeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7361 : {
7362 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FontWeight, vp);
7363 : }
7364 :
7365 : static JSBool
7366 0 : nsIDOMCSS2Properties_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7367 : {
7368 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Height, vp);
7369 : }
7370 :
7371 : static JSBool
7372 0 : nsIDOMCSS2Properties_SetHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7373 : {
7374 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Height, vp);
7375 : }
7376 :
7377 : static JSBool
7378 0 : nsIDOMCSS2Properties_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7379 : {
7380 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Left, vp);
7381 : }
7382 :
7383 : static JSBool
7384 0 : nsIDOMCSS2Properties_SetLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7385 : {
7386 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Left, vp);
7387 : }
7388 :
7389 : static JSBool
7390 0 : nsIDOMCSS2Properties_GetLetterSpacing(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7391 : {
7392 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_LetterSpacing, vp);
7393 : }
7394 :
7395 : static JSBool
7396 0 : nsIDOMCSS2Properties_SetLetterSpacing(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7397 : {
7398 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_LetterSpacing, vp);
7399 : }
7400 :
7401 : static JSBool
7402 0 : nsIDOMCSS2Properties_GetLineHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7403 : {
7404 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_LineHeight, vp);
7405 : }
7406 :
7407 : static JSBool
7408 0 : nsIDOMCSS2Properties_SetLineHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7409 : {
7410 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_LineHeight, vp);
7411 : }
7412 :
7413 : static JSBool
7414 0 : nsIDOMCSS2Properties_GetListStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7415 : {
7416 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ListStyle, vp);
7417 : }
7418 :
7419 : static JSBool
7420 0 : nsIDOMCSS2Properties_SetListStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7421 : {
7422 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ListStyle, vp);
7423 : }
7424 :
7425 : static JSBool
7426 0 : nsIDOMCSS2Properties_GetListStyleImage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7427 : {
7428 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ListStyleImage, vp);
7429 : }
7430 :
7431 : static JSBool
7432 0 : nsIDOMCSS2Properties_SetListStyleImage(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7433 : {
7434 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ListStyleImage, vp);
7435 : }
7436 :
7437 : static JSBool
7438 0 : nsIDOMCSS2Properties_GetListStylePosition(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7439 : {
7440 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ListStylePosition, vp);
7441 : }
7442 :
7443 : static JSBool
7444 0 : nsIDOMCSS2Properties_SetListStylePosition(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7445 : {
7446 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ListStylePosition, vp);
7447 : }
7448 :
7449 : static JSBool
7450 0 : nsIDOMCSS2Properties_GetListStyleType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7451 : {
7452 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ListStyleType, vp);
7453 : }
7454 :
7455 : static JSBool
7456 0 : nsIDOMCSS2Properties_SetListStyleType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7457 : {
7458 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ListStyleType, vp);
7459 : }
7460 :
7461 : static JSBool
7462 0 : nsIDOMCSS2Properties_GetMargin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7463 : {
7464 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Margin, vp);
7465 : }
7466 :
7467 : static JSBool
7468 0 : nsIDOMCSS2Properties_SetMargin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7469 : {
7470 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Margin, vp);
7471 : }
7472 :
7473 : static JSBool
7474 0 : nsIDOMCSS2Properties_GetMarginTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7475 : {
7476 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarginTop, vp);
7477 : }
7478 :
7479 : static JSBool
7480 0 : nsIDOMCSS2Properties_SetMarginTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7481 : {
7482 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarginTop, vp);
7483 : }
7484 :
7485 : static JSBool
7486 0 : nsIDOMCSS2Properties_GetMarginRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7487 : {
7488 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarginRight, vp);
7489 : }
7490 :
7491 : static JSBool
7492 0 : nsIDOMCSS2Properties_SetMarginRight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7493 : {
7494 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarginRight, vp);
7495 : }
7496 :
7497 : static JSBool
7498 0 : nsIDOMCSS2Properties_GetMarginBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7499 : {
7500 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarginBottom, vp);
7501 : }
7502 :
7503 : static JSBool
7504 0 : nsIDOMCSS2Properties_SetMarginBottom(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7505 : {
7506 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarginBottom, vp);
7507 : }
7508 :
7509 : static JSBool
7510 0 : nsIDOMCSS2Properties_GetMarginLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7511 : {
7512 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarginLeft, vp);
7513 : }
7514 :
7515 : static JSBool
7516 0 : nsIDOMCSS2Properties_SetMarginLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7517 : {
7518 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarginLeft, vp);
7519 : }
7520 :
7521 : static JSBool
7522 0 : nsIDOMCSS2Properties_GetMarkerOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7523 : {
7524 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarkerOffset, vp);
7525 : }
7526 :
7527 : static JSBool
7528 0 : nsIDOMCSS2Properties_SetMarkerOffset(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7529 : {
7530 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarkerOffset, vp);
7531 : }
7532 :
7533 : static JSBool
7534 0 : nsIDOMCSS2Properties_GetMarks(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7535 : {
7536 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Marks, vp);
7537 : }
7538 :
7539 : static JSBool
7540 0 : nsIDOMCSS2Properties_SetMarks(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7541 : {
7542 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Marks, vp);
7543 : }
7544 :
7545 : static JSBool
7546 0 : nsIDOMCSS2Properties_GetMaxHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7547 : {
7548 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MaxHeight, vp);
7549 : }
7550 :
7551 : static JSBool
7552 0 : nsIDOMCSS2Properties_SetMaxHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7553 : {
7554 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MaxHeight, vp);
7555 : }
7556 :
7557 : static JSBool
7558 0 : nsIDOMCSS2Properties_GetMaxWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7559 : {
7560 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MaxWidth, vp);
7561 : }
7562 :
7563 : static JSBool
7564 0 : nsIDOMCSS2Properties_SetMaxWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7565 : {
7566 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MaxWidth, vp);
7567 : }
7568 :
7569 : static JSBool
7570 0 : nsIDOMCSS2Properties_GetMinHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7571 : {
7572 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MinHeight, vp);
7573 : }
7574 :
7575 : static JSBool
7576 0 : nsIDOMCSS2Properties_SetMinHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7577 : {
7578 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MinHeight, vp);
7579 : }
7580 :
7581 : static JSBool
7582 0 : nsIDOMCSS2Properties_GetMinWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7583 : {
7584 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MinWidth, vp);
7585 : }
7586 :
7587 : static JSBool
7588 0 : nsIDOMCSS2Properties_SetMinWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7589 : {
7590 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MinWidth, vp);
7591 : }
7592 :
7593 : static JSBool
7594 0 : nsIDOMCSS2Properties_GetOrphans(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7595 : {
7596 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Orphans, vp);
7597 : }
7598 :
7599 : static JSBool
7600 0 : nsIDOMCSS2Properties_SetOrphans(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7601 : {
7602 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Orphans, vp);
7603 : }
7604 :
7605 : static JSBool
7606 0 : nsIDOMCSS2Properties_GetOutline(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7607 : {
7608 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Outline, vp);
7609 : }
7610 :
7611 : static JSBool
7612 0 : nsIDOMCSS2Properties_SetOutline(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7613 : {
7614 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Outline, vp);
7615 : }
7616 :
7617 : static JSBool
7618 0 : nsIDOMCSS2Properties_GetOutlineColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7619 : {
7620 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OutlineColor, vp);
7621 : }
7622 :
7623 : static JSBool
7624 0 : nsIDOMCSS2Properties_SetOutlineColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7625 : {
7626 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OutlineColor, vp);
7627 : }
7628 :
7629 : static JSBool
7630 0 : nsIDOMCSS2Properties_GetOutlineStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7631 : {
7632 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OutlineStyle, vp);
7633 : }
7634 :
7635 : static JSBool
7636 0 : nsIDOMCSS2Properties_SetOutlineStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7637 : {
7638 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OutlineStyle, vp);
7639 : }
7640 :
7641 : static JSBool
7642 0 : nsIDOMCSS2Properties_GetOutlineWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7643 : {
7644 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OutlineWidth, vp);
7645 : }
7646 :
7647 : static JSBool
7648 0 : nsIDOMCSS2Properties_SetOutlineWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7649 : {
7650 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OutlineWidth, vp);
7651 : }
7652 :
7653 : static JSBool
7654 0 : nsIDOMCSS2Properties_GetOverflow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7655 : {
7656 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Overflow, vp);
7657 : }
7658 :
7659 : static JSBool
7660 0 : nsIDOMCSS2Properties_SetOverflow(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7661 : {
7662 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Overflow, vp);
7663 : }
7664 :
7665 : static JSBool
7666 0 : nsIDOMCSS2Properties_GetPadding(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7667 : {
7668 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Padding, vp);
7669 : }
7670 :
7671 : static JSBool
7672 0 : nsIDOMCSS2Properties_SetPadding(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7673 : {
7674 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Padding, vp);
7675 : }
7676 :
7677 : static JSBool
7678 0 : nsIDOMCSS2Properties_GetPaddingTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7679 : {
7680 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PaddingTop, vp);
7681 : }
7682 :
7683 : static JSBool
7684 0 : nsIDOMCSS2Properties_SetPaddingTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7685 : {
7686 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PaddingTop, vp);
7687 : }
7688 :
7689 : static JSBool
7690 0 : nsIDOMCSS2Properties_GetPaddingRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7691 : {
7692 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PaddingRight, vp);
7693 : }
7694 :
7695 : static JSBool
7696 0 : nsIDOMCSS2Properties_SetPaddingRight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7697 : {
7698 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PaddingRight, vp);
7699 : }
7700 :
7701 : static JSBool
7702 0 : nsIDOMCSS2Properties_GetPaddingBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7703 : {
7704 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PaddingBottom, vp);
7705 : }
7706 :
7707 : static JSBool
7708 0 : nsIDOMCSS2Properties_SetPaddingBottom(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7709 : {
7710 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PaddingBottom, vp);
7711 : }
7712 :
7713 : static JSBool
7714 0 : nsIDOMCSS2Properties_GetPaddingLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7715 : {
7716 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PaddingLeft, vp);
7717 : }
7718 :
7719 : static JSBool
7720 0 : nsIDOMCSS2Properties_SetPaddingLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7721 : {
7722 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PaddingLeft, vp);
7723 : }
7724 :
7725 : static JSBool
7726 0 : nsIDOMCSS2Properties_GetPage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7727 : {
7728 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Page, vp);
7729 : }
7730 :
7731 : static JSBool
7732 0 : nsIDOMCSS2Properties_SetPage(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7733 : {
7734 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Page, vp);
7735 : }
7736 :
7737 : static JSBool
7738 0 : nsIDOMCSS2Properties_GetPageBreakAfter(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7739 : {
7740 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PageBreakAfter, vp);
7741 : }
7742 :
7743 : static JSBool
7744 0 : nsIDOMCSS2Properties_SetPageBreakAfter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7745 : {
7746 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PageBreakAfter, vp);
7747 : }
7748 :
7749 : static JSBool
7750 0 : nsIDOMCSS2Properties_GetPageBreakBefore(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7751 : {
7752 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PageBreakBefore, vp);
7753 : }
7754 :
7755 : static JSBool
7756 0 : nsIDOMCSS2Properties_SetPageBreakBefore(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7757 : {
7758 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PageBreakBefore, vp);
7759 : }
7760 :
7761 : static JSBool
7762 0 : nsIDOMCSS2Properties_GetPageBreakInside(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7763 : {
7764 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PageBreakInside, vp);
7765 : }
7766 :
7767 : static JSBool
7768 0 : nsIDOMCSS2Properties_SetPageBreakInside(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7769 : {
7770 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PageBreakInside, vp);
7771 : }
7772 :
7773 : static JSBool
7774 0 : nsIDOMCSS2Properties_GetPosition(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7775 : {
7776 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Position, vp);
7777 : }
7778 :
7779 : static JSBool
7780 0 : nsIDOMCSS2Properties_SetPosition(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7781 : {
7782 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Position, vp);
7783 : }
7784 :
7785 : static JSBool
7786 0 : nsIDOMCSS2Properties_GetQuotes(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7787 : {
7788 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Quotes, vp);
7789 : }
7790 :
7791 : static JSBool
7792 0 : nsIDOMCSS2Properties_SetQuotes(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7793 : {
7794 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Quotes, vp);
7795 : }
7796 :
7797 : static JSBool
7798 0 : nsIDOMCSS2Properties_GetRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7799 : {
7800 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Right, vp);
7801 : }
7802 :
7803 : static JSBool
7804 0 : nsIDOMCSS2Properties_SetRight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7805 : {
7806 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Right, vp);
7807 : }
7808 :
7809 : static JSBool
7810 0 : nsIDOMCSS2Properties_GetSize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7811 : {
7812 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Size, vp);
7813 : }
7814 :
7815 : static JSBool
7816 0 : nsIDOMCSS2Properties_SetSize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7817 : {
7818 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Size, vp);
7819 : }
7820 :
7821 : static JSBool
7822 0 : nsIDOMCSS2Properties_GetTableLayout(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7823 : {
7824 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TableLayout, vp);
7825 : }
7826 :
7827 : static JSBool
7828 0 : nsIDOMCSS2Properties_SetTableLayout(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7829 : {
7830 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TableLayout, vp);
7831 : }
7832 :
7833 : static JSBool
7834 0 : nsIDOMCSS2Properties_GetTextAlign(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7835 : {
7836 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextAlign, vp);
7837 : }
7838 :
7839 : static JSBool
7840 0 : nsIDOMCSS2Properties_SetTextAlign(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7841 : {
7842 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextAlign, vp);
7843 : }
7844 :
7845 : static JSBool
7846 0 : nsIDOMCSS2Properties_GetTextDecoration(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7847 : {
7848 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextDecoration, vp);
7849 : }
7850 :
7851 : static JSBool
7852 0 : nsIDOMCSS2Properties_SetTextDecoration(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7853 : {
7854 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextDecoration, vp);
7855 : }
7856 :
7857 : static JSBool
7858 0 : nsIDOMCSS2Properties_GetTextIndent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7859 : {
7860 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextIndent, vp);
7861 : }
7862 :
7863 : static JSBool
7864 0 : nsIDOMCSS2Properties_SetTextIndent(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7865 : {
7866 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextIndent, vp);
7867 : }
7868 :
7869 : static JSBool
7870 0 : nsIDOMCSS2Properties_GetTextOverflow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7871 : {
7872 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextOverflow, vp);
7873 : }
7874 :
7875 : static JSBool
7876 0 : nsIDOMCSS2Properties_SetTextOverflow(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7877 : {
7878 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextOverflow, vp);
7879 : }
7880 :
7881 : static JSBool
7882 0 : nsIDOMCSS2Properties_GetTextShadow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7883 : {
7884 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextShadow, vp);
7885 : }
7886 :
7887 : static JSBool
7888 0 : nsIDOMCSS2Properties_SetTextShadow(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7889 : {
7890 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextShadow, vp);
7891 : }
7892 :
7893 : static JSBool
7894 0 : nsIDOMCSS2Properties_GetTextTransform(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7895 : {
7896 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextTransform, vp);
7897 : }
7898 :
7899 : static JSBool
7900 0 : nsIDOMCSS2Properties_SetTextTransform(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7901 : {
7902 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextTransform, vp);
7903 : }
7904 :
7905 : static JSBool
7906 0 : nsIDOMCSS2Properties_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7907 : {
7908 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Top, vp);
7909 : }
7910 :
7911 : static JSBool
7912 0 : nsIDOMCSS2Properties_SetTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7913 : {
7914 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Top, vp);
7915 : }
7916 :
7917 : static JSBool
7918 0 : nsIDOMCSS2Properties_GetUnicodeBidi(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7919 : {
7920 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_UnicodeBidi, vp);
7921 : }
7922 :
7923 : static JSBool
7924 0 : nsIDOMCSS2Properties_SetUnicodeBidi(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7925 : {
7926 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_UnicodeBidi, vp);
7927 : }
7928 :
7929 : static JSBool
7930 0 : nsIDOMCSS2Properties_GetVerticalAlign(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7931 : {
7932 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_VerticalAlign, vp);
7933 : }
7934 :
7935 : static JSBool
7936 0 : nsIDOMCSS2Properties_SetVerticalAlign(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7937 : {
7938 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_VerticalAlign, vp);
7939 : }
7940 :
7941 : static JSBool
7942 0 : nsIDOMCSS2Properties_GetVisibility(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7943 : {
7944 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Visibility, vp);
7945 : }
7946 :
7947 : static JSBool
7948 0 : nsIDOMCSS2Properties_SetVisibility(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7949 : {
7950 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Visibility, vp);
7951 : }
7952 :
7953 : static JSBool
7954 0 : nsIDOMCSS2Properties_GetWhiteSpace(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7955 : {
7956 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_WhiteSpace, vp);
7957 : }
7958 :
7959 : static JSBool
7960 0 : nsIDOMCSS2Properties_SetWhiteSpace(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7961 : {
7962 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_WhiteSpace, vp);
7963 : }
7964 :
7965 : static JSBool
7966 0 : nsIDOMCSS2Properties_GetWidows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7967 : {
7968 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Widows, vp);
7969 : }
7970 :
7971 : static JSBool
7972 0 : nsIDOMCSS2Properties_SetWidows(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7973 : {
7974 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Widows, vp);
7975 : }
7976 :
7977 : static JSBool
7978 0 : nsIDOMCSS2Properties_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7979 : {
7980 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Width, vp);
7981 : }
7982 :
7983 : static JSBool
7984 0 : nsIDOMCSS2Properties_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7985 : {
7986 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Width, vp);
7987 : }
7988 :
7989 : static JSBool
7990 0 : nsIDOMCSS2Properties_GetWordSpacing(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
7991 : {
7992 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_WordSpacing, vp);
7993 : }
7994 :
7995 : static JSBool
7996 0 : nsIDOMCSS2Properties_SetWordSpacing(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
7997 : {
7998 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_WordSpacing, vp);
7999 : }
8000 :
8001 : static JSBool
8002 0 : nsIDOMCSS2Properties_GetZIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8003 : {
8004 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ZIndex, vp);
8005 : }
8006 :
8007 : static JSBool
8008 0 : nsIDOMCSS2Properties_SetZIndex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8009 : {
8010 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ZIndex, vp);
8011 : }
8012 :
8013 : static JSBool
8014 0 : nsIDOMCSS2Properties_GetClipPath(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8015 : {
8016 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ClipPath, vp);
8017 : }
8018 :
8019 : static JSBool
8020 0 : nsIDOMCSS2Properties_SetClipPath(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8021 : {
8022 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ClipPath, vp);
8023 : }
8024 :
8025 : static JSBool
8026 0 : nsIDOMCSS2Properties_GetClipRule(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8027 : {
8028 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ClipRule, vp);
8029 : }
8030 :
8031 : static JSBool
8032 0 : nsIDOMCSS2Properties_SetClipRule(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8033 : {
8034 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ClipRule, vp);
8035 : }
8036 :
8037 : static JSBool
8038 0 : nsIDOMCSS2Properties_GetColorInterpolation(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8039 : {
8040 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ColorInterpolation, vp);
8041 : }
8042 :
8043 : static JSBool
8044 0 : nsIDOMCSS2Properties_SetColorInterpolation(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8045 : {
8046 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ColorInterpolation, vp);
8047 : }
8048 :
8049 : static JSBool
8050 0 : nsIDOMCSS2Properties_GetColorInterpolationFilters(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8051 : {
8052 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ColorInterpolationFilters, vp);
8053 : }
8054 :
8055 : static JSBool
8056 0 : nsIDOMCSS2Properties_SetColorInterpolationFilters(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8057 : {
8058 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ColorInterpolationFilters, vp);
8059 : }
8060 :
8061 : static JSBool
8062 0 : nsIDOMCSS2Properties_GetDominantBaseline(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8063 : {
8064 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_DominantBaseline, vp);
8065 : }
8066 :
8067 : static JSBool
8068 0 : nsIDOMCSS2Properties_SetDominantBaseline(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8069 : {
8070 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_DominantBaseline, vp);
8071 : }
8072 :
8073 : static JSBool
8074 0 : nsIDOMCSS2Properties_GetFill(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8075 : {
8076 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Fill, vp);
8077 : }
8078 :
8079 : static JSBool
8080 0 : nsIDOMCSS2Properties_SetFill(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8081 : {
8082 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Fill, vp);
8083 : }
8084 :
8085 : static JSBool
8086 0 : nsIDOMCSS2Properties_GetFillOpacity(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8087 : {
8088 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FillOpacity, vp);
8089 : }
8090 :
8091 : static JSBool
8092 0 : nsIDOMCSS2Properties_SetFillOpacity(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8093 : {
8094 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FillOpacity, vp);
8095 : }
8096 :
8097 : static JSBool
8098 0 : nsIDOMCSS2Properties_GetFillRule(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8099 : {
8100 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FillRule, vp);
8101 : }
8102 :
8103 : static JSBool
8104 0 : nsIDOMCSS2Properties_SetFillRule(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8105 : {
8106 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FillRule, vp);
8107 : }
8108 :
8109 : static JSBool
8110 0 : nsIDOMCSS2Properties_GetFilter(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8111 : {
8112 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Filter, vp);
8113 : }
8114 :
8115 : static JSBool
8116 0 : nsIDOMCSS2Properties_SetFilter(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8117 : {
8118 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Filter, vp);
8119 : }
8120 :
8121 : static JSBool
8122 0 : nsIDOMCSS2Properties_GetFloodColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8123 : {
8124 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FloodColor, vp);
8125 : }
8126 :
8127 : static JSBool
8128 0 : nsIDOMCSS2Properties_SetFloodColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8129 : {
8130 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FloodColor, vp);
8131 : }
8132 :
8133 : static JSBool
8134 0 : nsIDOMCSS2Properties_GetFloodOpacity(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8135 : {
8136 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_FloodOpacity, vp);
8137 : }
8138 :
8139 : static JSBool
8140 0 : nsIDOMCSS2Properties_SetFloodOpacity(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8141 : {
8142 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_FloodOpacity, vp);
8143 : }
8144 :
8145 : static JSBool
8146 0 : nsIDOMCSS2Properties_GetImageRendering(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8147 : {
8148 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ImageRendering, vp);
8149 : }
8150 :
8151 : static JSBool
8152 0 : nsIDOMCSS2Properties_SetImageRendering(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8153 : {
8154 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ImageRendering, vp);
8155 : }
8156 :
8157 : static JSBool
8158 0 : nsIDOMCSS2Properties_GetLightingColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8159 : {
8160 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_LightingColor, vp);
8161 : }
8162 :
8163 : static JSBool
8164 0 : nsIDOMCSS2Properties_SetLightingColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8165 : {
8166 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_LightingColor, vp);
8167 : }
8168 :
8169 : static JSBool
8170 0 : nsIDOMCSS2Properties_GetMarker(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8171 : {
8172 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Marker, vp);
8173 : }
8174 :
8175 : static JSBool
8176 0 : nsIDOMCSS2Properties_SetMarker(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8177 : {
8178 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Marker, vp);
8179 : }
8180 :
8181 : static JSBool
8182 0 : nsIDOMCSS2Properties_GetMarkerEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8183 : {
8184 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarkerEnd, vp);
8185 : }
8186 :
8187 : static JSBool
8188 0 : nsIDOMCSS2Properties_SetMarkerEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8189 : {
8190 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarkerEnd, vp);
8191 : }
8192 :
8193 : static JSBool
8194 0 : nsIDOMCSS2Properties_GetMarkerMid(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8195 : {
8196 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarkerMid, vp);
8197 : }
8198 :
8199 : static JSBool
8200 0 : nsIDOMCSS2Properties_SetMarkerMid(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8201 : {
8202 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarkerMid, vp);
8203 : }
8204 :
8205 : static JSBool
8206 0 : nsIDOMCSS2Properties_GetMarkerStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8207 : {
8208 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MarkerStart, vp);
8209 : }
8210 :
8211 : static JSBool
8212 0 : nsIDOMCSS2Properties_SetMarkerStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8213 : {
8214 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MarkerStart, vp);
8215 : }
8216 :
8217 : static JSBool
8218 0 : nsIDOMCSS2Properties_GetMask(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8219 : {
8220 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Mask, vp);
8221 : }
8222 :
8223 : static JSBool
8224 0 : nsIDOMCSS2Properties_SetMask(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8225 : {
8226 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Mask, vp);
8227 : }
8228 :
8229 : static JSBool
8230 0 : nsIDOMCSS2Properties_GetShapeRendering(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8231 : {
8232 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ShapeRendering, vp);
8233 : }
8234 :
8235 : static JSBool
8236 0 : nsIDOMCSS2Properties_SetShapeRendering(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8237 : {
8238 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ShapeRendering, vp);
8239 : }
8240 :
8241 : static JSBool
8242 0 : nsIDOMCSS2Properties_GetStopColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8243 : {
8244 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StopColor, vp);
8245 : }
8246 :
8247 : static JSBool
8248 0 : nsIDOMCSS2Properties_SetStopColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8249 : {
8250 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StopColor, vp);
8251 : }
8252 :
8253 : static JSBool
8254 0 : nsIDOMCSS2Properties_GetStopOpacity(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8255 : {
8256 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StopOpacity, vp);
8257 : }
8258 :
8259 : static JSBool
8260 0 : nsIDOMCSS2Properties_SetStopOpacity(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8261 : {
8262 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StopOpacity, vp);
8263 : }
8264 :
8265 : static JSBool
8266 0 : nsIDOMCSS2Properties_GetStroke(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8267 : {
8268 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Stroke, vp);
8269 : }
8270 :
8271 : static JSBool
8272 0 : nsIDOMCSS2Properties_SetStroke(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8273 : {
8274 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Stroke, vp);
8275 : }
8276 :
8277 : static JSBool
8278 0 : nsIDOMCSS2Properties_GetStrokeDasharray(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8279 : {
8280 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeDasharray, vp);
8281 : }
8282 :
8283 : static JSBool
8284 0 : nsIDOMCSS2Properties_SetStrokeDasharray(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8285 : {
8286 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeDasharray, vp);
8287 : }
8288 :
8289 : static JSBool
8290 0 : nsIDOMCSS2Properties_GetStrokeDashoffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8291 : {
8292 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeDashoffset, vp);
8293 : }
8294 :
8295 : static JSBool
8296 0 : nsIDOMCSS2Properties_SetStrokeDashoffset(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8297 : {
8298 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeDashoffset, vp);
8299 : }
8300 :
8301 : static JSBool
8302 0 : nsIDOMCSS2Properties_GetStrokeLinecap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8303 : {
8304 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeLinecap, vp);
8305 : }
8306 :
8307 : static JSBool
8308 0 : nsIDOMCSS2Properties_SetStrokeLinecap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8309 : {
8310 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeLinecap, vp);
8311 : }
8312 :
8313 : static JSBool
8314 0 : nsIDOMCSS2Properties_GetStrokeLinejoin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8315 : {
8316 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeLinejoin, vp);
8317 : }
8318 :
8319 : static JSBool
8320 0 : nsIDOMCSS2Properties_SetStrokeLinejoin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8321 : {
8322 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeLinejoin, vp);
8323 : }
8324 :
8325 : static JSBool
8326 0 : nsIDOMCSS2Properties_GetStrokeMiterlimit(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8327 : {
8328 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeMiterlimit, vp);
8329 : }
8330 :
8331 : static JSBool
8332 0 : nsIDOMCSS2Properties_SetStrokeMiterlimit(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8333 : {
8334 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeMiterlimit, vp);
8335 : }
8336 :
8337 : static JSBool
8338 0 : nsIDOMCSS2Properties_GetStrokeOpacity(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8339 : {
8340 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeOpacity, vp);
8341 : }
8342 :
8343 : static JSBool
8344 0 : nsIDOMCSS2Properties_SetStrokeOpacity(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8345 : {
8346 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeOpacity, vp);
8347 : }
8348 :
8349 : static JSBool
8350 0 : nsIDOMCSS2Properties_GetStrokeWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8351 : {
8352 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_StrokeWidth, vp);
8353 : }
8354 :
8355 : static JSBool
8356 0 : nsIDOMCSS2Properties_SetStrokeWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8357 : {
8358 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_StrokeWidth, vp);
8359 : }
8360 :
8361 : static JSBool
8362 0 : nsIDOMCSS2Properties_GetTextAnchor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8363 : {
8364 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextAnchor, vp);
8365 : }
8366 :
8367 : static JSBool
8368 0 : nsIDOMCSS2Properties_SetTextAnchor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8369 : {
8370 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextAnchor, vp);
8371 : }
8372 :
8373 : static JSBool
8374 0 : nsIDOMCSS2Properties_GetTextRendering(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8375 : {
8376 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_TextRendering, vp);
8377 : }
8378 :
8379 : static JSBool
8380 0 : nsIDOMCSS2Properties_SetTextRendering(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8381 : {
8382 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_TextRendering, vp);
8383 : }
8384 :
8385 : static JSBool
8386 0 : nsIDOMCSS2Properties_GetMozAppearance(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8387 : {
8388 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAppearance, vp);
8389 : }
8390 :
8391 : static JSBool
8392 0 : nsIDOMCSS2Properties_SetMozAppearance(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8393 : {
8394 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAppearance, vp);
8395 : }
8396 :
8397 : static JSBool
8398 0 : nsIDOMCSS2Properties_GetBackgroundClip(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8399 : {
8400 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundClip, vp);
8401 : }
8402 :
8403 : static JSBool
8404 0 : nsIDOMCSS2Properties_SetBackgroundClip(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8405 : {
8406 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundClip, vp);
8407 : }
8408 :
8409 : static JSBool
8410 0 : nsIDOMCSS2Properties_GetMozBackgroundInlinePolicy(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8411 : {
8412 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBackgroundInlinePolicy, vp);
8413 : }
8414 :
8415 : static JSBool
8416 0 : nsIDOMCSS2Properties_SetMozBackgroundInlinePolicy(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8417 : {
8418 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBackgroundInlinePolicy, vp);
8419 : }
8420 :
8421 : static JSBool
8422 0 : nsIDOMCSS2Properties_GetBackgroundOrigin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8423 : {
8424 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundOrigin, vp);
8425 : }
8426 :
8427 : static JSBool
8428 0 : nsIDOMCSS2Properties_SetBackgroundOrigin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8429 : {
8430 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundOrigin, vp);
8431 : }
8432 :
8433 : static JSBool
8434 0 : nsIDOMCSS2Properties_GetMozBinding(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8435 : {
8436 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBinding, vp);
8437 : }
8438 :
8439 : static JSBool
8440 0 : nsIDOMCSS2Properties_SetMozBinding(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8441 : {
8442 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBinding, vp);
8443 : }
8444 :
8445 : static JSBool
8446 0 : nsIDOMCSS2Properties_GetMozBorderBottomColors(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8447 : {
8448 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderBottomColors, vp);
8449 : }
8450 :
8451 : static JSBool
8452 0 : nsIDOMCSS2Properties_SetMozBorderBottomColors(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8453 : {
8454 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderBottomColors, vp);
8455 : }
8456 :
8457 : static JSBool
8458 0 : nsIDOMCSS2Properties_GetMozBorderLeftColors(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8459 : {
8460 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderLeftColors, vp);
8461 : }
8462 :
8463 : static JSBool
8464 0 : nsIDOMCSS2Properties_SetMozBorderLeftColors(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8465 : {
8466 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderLeftColors, vp);
8467 : }
8468 :
8469 : static JSBool
8470 0 : nsIDOMCSS2Properties_GetMozBorderRightColors(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8471 : {
8472 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderRightColors, vp);
8473 : }
8474 :
8475 : static JSBool
8476 0 : nsIDOMCSS2Properties_SetMozBorderRightColors(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8477 : {
8478 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderRightColors, vp);
8479 : }
8480 :
8481 : static JSBool
8482 0 : nsIDOMCSS2Properties_GetMozBorderTopColors(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8483 : {
8484 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderTopColors, vp);
8485 : }
8486 :
8487 : static JSBool
8488 0 : nsIDOMCSS2Properties_SetMozBorderTopColors(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8489 : {
8490 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderTopColors, vp);
8491 : }
8492 :
8493 : static JSBool
8494 0 : nsIDOMCSS2Properties_GetMozBoxAlign(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8495 : {
8496 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxAlign, vp);
8497 : }
8498 :
8499 : static JSBool
8500 0 : nsIDOMCSS2Properties_SetMozBoxAlign(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8501 : {
8502 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxAlign, vp);
8503 : }
8504 :
8505 : static JSBool
8506 0 : nsIDOMCSS2Properties_GetMozBoxDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8507 : {
8508 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxDirection, vp);
8509 : }
8510 :
8511 : static JSBool
8512 0 : nsIDOMCSS2Properties_SetMozBoxDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8513 : {
8514 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxDirection, vp);
8515 : }
8516 :
8517 : static JSBool
8518 0 : nsIDOMCSS2Properties_GetMozBoxFlex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8519 : {
8520 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxFlex, vp);
8521 : }
8522 :
8523 : static JSBool
8524 0 : nsIDOMCSS2Properties_SetMozBoxFlex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8525 : {
8526 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxFlex, vp);
8527 : }
8528 :
8529 : static JSBool
8530 0 : nsIDOMCSS2Properties_GetMozBoxOrient(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8531 : {
8532 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxOrient, vp);
8533 : }
8534 :
8535 : static JSBool
8536 0 : nsIDOMCSS2Properties_SetMozBoxOrient(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8537 : {
8538 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxOrient, vp);
8539 : }
8540 :
8541 : static JSBool
8542 0 : nsIDOMCSS2Properties_GetMozBoxOrdinalGroup(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8543 : {
8544 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxOrdinalGroup, vp);
8545 : }
8546 :
8547 : static JSBool
8548 0 : nsIDOMCSS2Properties_SetMozBoxOrdinalGroup(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8549 : {
8550 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxOrdinalGroup, vp);
8551 : }
8552 :
8553 : static JSBool
8554 0 : nsIDOMCSS2Properties_GetMozBoxPack(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8555 : {
8556 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxPack, vp);
8557 : }
8558 :
8559 : static JSBool
8560 0 : nsIDOMCSS2Properties_SetMozBoxPack(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8561 : {
8562 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxPack, vp);
8563 : }
8564 :
8565 : static JSBool
8566 0 : nsIDOMCSS2Properties_GetMozBoxSizing(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8567 : {
8568 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBoxSizing, vp);
8569 : }
8570 :
8571 : static JSBool
8572 0 : nsIDOMCSS2Properties_SetMozBoxSizing(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8573 : {
8574 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBoxSizing, vp);
8575 : }
8576 :
8577 : static JSBool
8578 0 : nsIDOMCSS2Properties_GetMozColumnCount(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8579 : {
8580 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnCount, vp);
8581 : }
8582 :
8583 : static JSBool
8584 0 : nsIDOMCSS2Properties_SetMozColumnCount(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8585 : {
8586 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnCount, vp);
8587 : }
8588 :
8589 : static JSBool
8590 0 : nsIDOMCSS2Properties_GetMozColumnWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8591 : {
8592 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnWidth, vp);
8593 : }
8594 :
8595 : static JSBool
8596 0 : nsIDOMCSS2Properties_SetMozColumnWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8597 : {
8598 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnWidth, vp);
8599 : }
8600 :
8601 : static JSBool
8602 0 : nsIDOMCSS2Properties_GetMozColumnGap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8603 : {
8604 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnGap, vp);
8605 : }
8606 :
8607 : static JSBool
8608 0 : nsIDOMCSS2Properties_SetMozColumnGap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8609 : {
8610 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnGap, vp);
8611 : }
8612 :
8613 : static JSBool
8614 0 : nsIDOMCSS2Properties_GetMozFloatEdge(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8615 : {
8616 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozFloatEdge, vp);
8617 : }
8618 :
8619 : static JSBool
8620 0 : nsIDOMCSS2Properties_SetMozFloatEdge(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8621 : {
8622 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozFloatEdge, vp);
8623 : }
8624 :
8625 : static JSBool
8626 0 : nsIDOMCSS2Properties_GetMozFontFeatureSettings(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8627 : {
8628 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozFontFeatureSettings, vp);
8629 : }
8630 :
8631 : static JSBool
8632 0 : nsIDOMCSS2Properties_SetMozFontFeatureSettings(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8633 : {
8634 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozFontFeatureSettings, vp);
8635 : }
8636 :
8637 : static JSBool
8638 0 : nsIDOMCSS2Properties_GetMozFontLanguageOverride(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8639 : {
8640 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozFontLanguageOverride, vp);
8641 : }
8642 :
8643 : static JSBool
8644 0 : nsIDOMCSS2Properties_SetMozFontLanguageOverride(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8645 : {
8646 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozFontLanguageOverride, vp);
8647 : }
8648 :
8649 : static JSBool
8650 0 : nsIDOMCSS2Properties_GetMozForceBrokenImageIcon(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8651 : {
8652 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozForceBrokenImageIcon, vp);
8653 : }
8654 :
8655 : static JSBool
8656 0 : nsIDOMCSS2Properties_SetMozForceBrokenImageIcon(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8657 : {
8658 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozForceBrokenImageIcon, vp);
8659 : }
8660 :
8661 : static JSBool
8662 0 : nsIDOMCSS2Properties_GetMozImageRegion(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8663 : {
8664 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozImageRegion, vp);
8665 : }
8666 :
8667 : static JSBool
8668 0 : nsIDOMCSS2Properties_SetMozImageRegion(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8669 : {
8670 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozImageRegion, vp);
8671 : }
8672 :
8673 : static JSBool
8674 0 : nsIDOMCSS2Properties_GetMozMarginEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8675 : {
8676 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozMarginEnd, vp);
8677 : }
8678 :
8679 : static JSBool
8680 0 : nsIDOMCSS2Properties_SetMozMarginEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8681 : {
8682 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozMarginEnd, vp);
8683 : }
8684 :
8685 : static JSBool
8686 0 : nsIDOMCSS2Properties_GetMozMarginStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8687 : {
8688 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozMarginStart, vp);
8689 : }
8690 :
8691 : static JSBool
8692 0 : nsIDOMCSS2Properties_SetMozMarginStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8693 : {
8694 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozMarginStart, vp);
8695 : }
8696 :
8697 : static JSBool
8698 0 : nsIDOMCSS2Properties_GetMozOrient(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8699 : {
8700 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOrient, vp);
8701 : }
8702 :
8703 : static JSBool
8704 0 : nsIDOMCSS2Properties_SetMozOrient(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8705 : {
8706 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOrient, vp);
8707 : }
8708 :
8709 : static JSBool
8710 0 : nsIDOMCSS2Properties_GetMozOutlineRadius(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8711 : {
8712 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOutlineRadius, vp);
8713 : }
8714 :
8715 : static JSBool
8716 0 : nsIDOMCSS2Properties_SetMozOutlineRadius(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8717 : {
8718 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOutlineRadius, vp);
8719 : }
8720 :
8721 : static JSBool
8722 0 : nsIDOMCSS2Properties_GetMozOutlineRadiusTopleft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8723 : {
8724 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOutlineRadiusTopleft, vp);
8725 : }
8726 :
8727 : static JSBool
8728 0 : nsIDOMCSS2Properties_SetMozOutlineRadiusTopleft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8729 : {
8730 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOutlineRadiusTopleft, vp);
8731 : }
8732 :
8733 : static JSBool
8734 0 : nsIDOMCSS2Properties_GetMozOutlineRadiusTopright(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8735 : {
8736 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOutlineRadiusTopright, vp);
8737 : }
8738 :
8739 : static JSBool
8740 0 : nsIDOMCSS2Properties_SetMozOutlineRadiusTopright(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8741 : {
8742 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOutlineRadiusTopright, vp);
8743 : }
8744 :
8745 : static JSBool
8746 0 : nsIDOMCSS2Properties_GetMozOutlineRadiusBottomleft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8747 : {
8748 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOutlineRadiusBottomleft, vp);
8749 : }
8750 :
8751 : static JSBool
8752 0 : nsIDOMCSS2Properties_SetMozOutlineRadiusBottomleft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8753 : {
8754 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOutlineRadiusBottomleft, vp);
8755 : }
8756 :
8757 : static JSBool
8758 0 : nsIDOMCSS2Properties_GetMozOutlineRadiusBottomright(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8759 : {
8760 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozOutlineRadiusBottomright, vp);
8761 : }
8762 :
8763 : static JSBool
8764 0 : nsIDOMCSS2Properties_SetMozOutlineRadiusBottomright(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8765 : {
8766 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozOutlineRadiusBottomright, vp);
8767 : }
8768 :
8769 : static JSBool
8770 0 : nsIDOMCSS2Properties_GetMozPaddingEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8771 : {
8772 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozPaddingEnd, vp);
8773 : }
8774 :
8775 : static JSBool
8776 0 : nsIDOMCSS2Properties_SetMozPaddingEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8777 : {
8778 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozPaddingEnd, vp);
8779 : }
8780 :
8781 : static JSBool
8782 0 : nsIDOMCSS2Properties_GetMozPaddingStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8783 : {
8784 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozPaddingStart, vp);
8785 : }
8786 :
8787 : static JSBool
8788 0 : nsIDOMCSS2Properties_SetMozPaddingStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8789 : {
8790 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozPaddingStart, vp);
8791 : }
8792 :
8793 : static JSBool
8794 0 : nsIDOMCSS2Properties_GetMozUserFocus(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8795 : {
8796 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozUserFocus, vp);
8797 : }
8798 :
8799 : static JSBool
8800 0 : nsIDOMCSS2Properties_SetMozUserFocus(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8801 : {
8802 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozUserFocus, vp);
8803 : }
8804 :
8805 : static JSBool
8806 0 : nsIDOMCSS2Properties_GetMozUserInput(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8807 : {
8808 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozUserInput, vp);
8809 : }
8810 :
8811 : static JSBool
8812 0 : nsIDOMCSS2Properties_SetMozUserInput(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8813 : {
8814 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozUserInput, vp);
8815 : }
8816 :
8817 : static JSBool
8818 0 : nsIDOMCSS2Properties_GetMozUserModify(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8819 : {
8820 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozUserModify, vp);
8821 : }
8822 :
8823 : static JSBool
8824 0 : nsIDOMCSS2Properties_SetMozUserModify(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8825 : {
8826 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozUserModify, vp);
8827 : }
8828 :
8829 : static JSBool
8830 0 : nsIDOMCSS2Properties_GetMozUserSelect(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8831 : {
8832 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozUserSelect, vp);
8833 : }
8834 :
8835 : static JSBool
8836 0 : nsIDOMCSS2Properties_SetMozUserSelect(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8837 : {
8838 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozUserSelect, vp);
8839 : }
8840 :
8841 : static JSBool
8842 0 : nsIDOMCSS2Properties_GetOpacity(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8843 : {
8844 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Opacity, vp);
8845 : }
8846 :
8847 : static JSBool
8848 0 : nsIDOMCSS2Properties_SetOpacity(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8849 : {
8850 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Opacity, vp);
8851 : }
8852 :
8853 : static JSBool
8854 0 : nsIDOMCSS2Properties_GetOutlineOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8855 : {
8856 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OutlineOffset, vp);
8857 : }
8858 :
8859 : static JSBool
8860 0 : nsIDOMCSS2Properties_SetOutlineOffset(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8861 : {
8862 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OutlineOffset, vp);
8863 : }
8864 :
8865 : static JSBool
8866 0 : nsIDOMCSS2Properties_GetMozTextAlignLast(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8867 : {
8868 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextAlignLast, vp);
8869 : }
8870 :
8871 : static JSBool
8872 0 : nsIDOMCSS2Properties_SetMozTextAlignLast(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8873 : {
8874 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextAlignLast, vp);
8875 : }
8876 :
8877 : static JSBool
8878 0 : nsIDOMCSS2Properties_GetOverflowX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8879 : {
8880 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OverflowX, vp);
8881 : }
8882 :
8883 : static JSBool
8884 0 : nsIDOMCSS2Properties_SetOverflowX(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8885 : {
8886 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OverflowX, vp);
8887 : }
8888 :
8889 : static JSBool
8890 0 : nsIDOMCSS2Properties_GetOverflowY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8891 : {
8892 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_OverflowY, vp);
8893 : }
8894 :
8895 : static JSBool
8896 0 : nsIDOMCSS2Properties_SetOverflowY(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8897 : {
8898 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_OverflowY, vp);
8899 : }
8900 :
8901 : static JSBool
8902 0 : nsIDOMCSS2Properties_GetImeMode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8903 : {
8904 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_ImeMode, vp);
8905 : }
8906 :
8907 : static JSBool
8908 0 : nsIDOMCSS2Properties_SetImeMode(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8909 : {
8910 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_ImeMode, vp);
8911 : }
8912 :
8913 : static JSBool
8914 0 : nsIDOMCSS2Properties_GetMozBorderEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8915 : {
8916 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderEnd, vp);
8917 : }
8918 :
8919 : static JSBool
8920 0 : nsIDOMCSS2Properties_SetMozBorderEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8921 : {
8922 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderEnd, vp);
8923 : }
8924 :
8925 : static JSBool
8926 0 : nsIDOMCSS2Properties_GetMozBorderEndColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8927 : {
8928 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderEndColor, vp);
8929 : }
8930 :
8931 : static JSBool
8932 0 : nsIDOMCSS2Properties_SetMozBorderEndColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8933 : {
8934 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderEndColor, vp);
8935 : }
8936 :
8937 : static JSBool
8938 0 : nsIDOMCSS2Properties_GetMozBorderEndStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8939 : {
8940 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderEndStyle, vp);
8941 : }
8942 :
8943 : static JSBool
8944 0 : nsIDOMCSS2Properties_SetMozBorderEndStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8945 : {
8946 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderEndStyle, vp);
8947 : }
8948 :
8949 : static JSBool
8950 0 : nsIDOMCSS2Properties_GetMozBorderEndWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8951 : {
8952 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderEndWidth, vp);
8953 : }
8954 :
8955 : static JSBool
8956 0 : nsIDOMCSS2Properties_SetMozBorderEndWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8957 : {
8958 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderEndWidth, vp);
8959 : }
8960 :
8961 : static JSBool
8962 0 : nsIDOMCSS2Properties_GetMozBorderStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8963 : {
8964 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderStart, vp);
8965 : }
8966 :
8967 : static JSBool
8968 0 : nsIDOMCSS2Properties_SetMozBorderStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8969 : {
8970 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderStart, vp);
8971 : }
8972 :
8973 : static JSBool
8974 0 : nsIDOMCSS2Properties_GetMozBorderStartColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8975 : {
8976 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderStartColor, vp);
8977 : }
8978 :
8979 : static JSBool
8980 0 : nsIDOMCSS2Properties_SetMozBorderStartColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8981 : {
8982 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderStartColor, vp);
8983 : }
8984 :
8985 : static JSBool
8986 0 : nsIDOMCSS2Properties_GetMozBorderStartStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8987 : {
8988 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderStartStyle, vp);
8989 : }
8990 :
8991 : static JSBool
8992 0 : nsIDOMCSS2Properties_SetMozBorderStartStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
8993 : {
8994 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderStartStyle, vp);
8995 : }
8996 :
8997 : static JSBool
8998 0 : nsIDOMCSS2Properties_GetMozBorderStartWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
8999 : {
9000 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderStartWidth, vp);
9001 : }
9002 :
9003 : static JSBool
9004 0 : nsIDOMCSS2Properties_SetMozBorderStartWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9005 : {
9006 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderStartWidth, vp);
9007 : }
9008 :
9009 : static JSBool
9010 0 : nsIDOMCSS2Properties_GetMozStackSizing(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9011 : {
9012 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozStackSizing, vp);
9013 : }
9014 :
9015 : static JSBool
9016 0 : nsIDOMCSS2Properties_SetMozStackSizing(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9017 : {
9018 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozStackSizing, vp);
9019 : }
9020 :
9021 : static JSBool
9022 0 : nsIDOMCSS2Properties_GetMozBorderImage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9023 : {
9024 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBorderImage, vp);
9025 : }
9026 :
9027 : static JSBool
9028 0 : nsIDOMCSS2Properties_SetMozBorderImage(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9029 : {
9030 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBorderImage, vp);
9031 : }
9032 :
9033 : static JSBool
9034 0 : nsIDOMCSS2Properties_GetMozColumns(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9035 : {
9036 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumns, vp);
9037 : }
9038 :
9039 : static JSBool
9040 0 : nsIDOMCSS2Properties_SetMozColumns(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9041 : {
9042 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumns, vp);
9043 : }
9044 :
9045 : static JSBool
9046 0 : nsIDOMCSS2Properties_GetMozColumnRule(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9047 : {
9048 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnRule, vp);
9049 : }
9050 :
9051 : static JSBool
9052 0 : nsIDOMCSS2Properties_SetMozColumnRule(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9053 : {
9054 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnRule, vp);
9055 : }
9056 :
9057 : static JSBool
9058 0 : nsIDOMCSS2Properties_GetMozColumnRuleWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9059 : {
9060 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnRuleWidth, vp);
9061 : }
9062 :
9063 : static JSBool
9064 0 : nsIDOMCSS2Properties_SetMozColumnRuleWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9065 : {
9066 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnRuleWidth, vp);
9067 : }
9068 :
9069 : static JSBool
9070 0 : nsIDOMCSS2Properties_GetMozColumnRuleStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9071 : {
9072 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnRuleStyle, vp);
9073 : }
9074 :
9075 : static JSBool
9076 0 : nsIDOMCSS2Properties_SetMozColumnRuleStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9077 : {
9078 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnRuleStyle, vp);
9079 : }
9080 :
9081 : static JSBool
9082 0 : nsIDOMCSS2Properties_GetMozColumnRuleColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9083 : {
9084 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozColumnRuleColor, vp);
9085 : }
9086 :
9087 : static JSBool
9088 0 : nsIDOMCSS2Properties_SetMozColumnRuleColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9089 : {
9090 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozColumnRuleColor, vp);
9091 : }
9092 :
9093 : static JSBool
9094 0 : nsIDOMCSS2Properties_GetWordWrap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9095 : {
9096 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_WordWrap, vp);
9097 : }
9098 :
9099 : static JSBool
9100 0 : nsIDOMCSS2Properties_SetWordWrap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9101 : {
9102 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_WordWrap, vp);
9103 : }
9104 :
9105 : static JSBool
9106 0 : nsIDOMCSS2Properties_GetMozHyphens(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9107 : {
9108 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozHyphens, vp);
9109 : }
9110 :
9111 : static JSBool
9112 0 : nsIDOMCSS2Properties_SetMozHyphens(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9113 : {
9114 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozHyphens, vp);
9115 : }
9116 :
9117 : static JSBool
9118 0 : nsIDOMCSS2Properties_GetMozTransform(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9119 : {
9120 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransform, vp);
9121 : }
9122 :
9123 : static JSBool
9124 0 : nsIDOMCSS2Properties_SetMozTransform(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9125 : {
9126 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransform, vp);
9127 : }
9128 :
9129 : static JSBool
9130 0 : nsIDOMCSS2Properties_GetMozTransformOrigin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9131 : {
9132 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransformOrigin, vp);
9133 : }
9134 :
9135 : static JSBool
9136 0 : nsIDOMCSS2Properties_SetMozTransformOrigin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9137 : {
9138 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransformOrigin, vp);
9139 : }
9140 :
9141 : static JSBool
9142 0 : nsIDOMCSS2Properties_GetMozPerspective(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9143 : {
9144 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozPerspective, vp);
9145 : }
9146 :
9147 : static JSBool
9148 0 : nsIDOMCSS2Properties_SetMozPerspective(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9149 : {
9150 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozPerspective, vp);
9151 : }
9152 :
9153 : static JSBool
9154 0 : nsIDOMCSS2Properties_GetMozPerspectiveOrigin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9155 : {
9156 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozPerspectiveOrigin, vp);
9157 : }
9158 :
9159 : static JSBool
9160 0 : nsIDOMCSS2Properties_SetMozPerspectiveOrigin(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9161 : {
9162 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozPerspectiveOrigin, vp);
9163 : }
9164 :
9165 : static JSBool
9166 0 : nsIDOMCSS2Properties_GetMozBackfaceVisibility(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9167 : {
9168 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozBackfaceVisibility, vp);
9169 : }
9170 :
9171 : static JSBool
9172 0 : nsIDOMCSS2Properties_SetMozBackfaceVisibility(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9173 : {
9174 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozBackfaceVisibility, vp);
9175 : }
9176 :
9177 : static JSBool
9178 0 : nsIDOMCSS2Properties_GetMozTransformStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9179 : {
9180 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransformStyle, vp);
9181 : }
9182 :
9183 : static JSBool
9184 0 : nsIDOMCSS2Properties_SetMozTransformStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9185 : {
9186 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransformStyle, vp);
9187 : }
9188 :
9189 : static JSBool
9190 0 : nsIDOMCSS2Properties_GetMozWindowShadow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9191 : {
9192 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozWindowShadow, vp);
9193 : }
9194 :
9195 : static JSBool
9196 0 : nsIDOMCSS2Properties_SetMozWindowShadow(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9197 : {
9198 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozWindowShadow, vp);
9199 : }
9200 :
9201 : static JSBool
9202 0 : nsIDOMCSS2Properties_GetBackgroundSize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9203 : {
9204 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_BackgroundSize, vp);
9205 : }
9206 :
9207 : static JSBool
9208 0 : nsIDOMCSS2Properties_SetBackgroundSize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9209 : {
9210 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_BackgroundSize, vp);
9211 : }
9212 :
9213 : static JSBool
9214 0 : nsIDOMCSS2Properties_GetMozTextBlink(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9215 : {
9216 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextBlink, vp);
9217 : }
9218 :
9219 : static JSBool
9220 0 : nsIDOMCSS2Properties_SetMozTextBlink(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9221 : {
9222 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextBlink, vp);
9223 : }
9224 :
9225 : static JSBool
9226 0 : nsIDOMCSS2Properties_GetMozTextDecorationColor(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9227 : {
9228 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextDecorationColor, vp);
9229 : }
9230 :
9231 : static JSBool
9232 0 : nsIDOMCSS2Properties_SetMozTextDecorationColor(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9233 : {
9234 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextDecorationColor, vp);
9235 : }
9236 :
9237 : static JSBool
9238 0 : nsIDOMCSS2Properties_GetMozTextDecorationLine(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9239 : {
9240 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextDecorationLine, vp);
9241 : }
9242 :
9243 : static JSBool
9244 0 : nsIDOMCSS2Properties_SetMozTextDecorationLine(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9245 : {
9246 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextDecorationLine, vp);
9247 : }
9248 :
9249 : static JSBool
9250 0 : nsIDOMCSS2Properties_GetMozTextDecorationStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9251 : {
9252 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextDecorationStyle, vp);
9253 : }
9254 :
9255 : static JSBool
9256 0 : nsIDOMCSS2Properties_SetMozTextDecorationStyle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9257 : {
9258 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextDecorationStyle, vp);
9259 : }
9260 :
9261 : static JSBool
9262 0 : nsIDOMCSS2Properties_GetMozTransitionProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9263 : {
9264 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransitionProperty, vp);
9265 : }
9266 :
9267 : static JSBool
9268 0 : nsIDOMCSS2Properties_SetMozTransitionProperty(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9269 : {
9270 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransitionProperty, vp);
9271 : }
9272 :
9273 : static JSBool
9274 0 : nsIDOMCSS2Properties_GetMozTransitionDuration(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9275 : {
9276 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransitionDuration, vp);
9277 : }
9278 :
9279 : static JSBool
9280 0 : nsIDOMCSS2Properties_SetMozTransitionDuration(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9281 : {
9282 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransitionDuration, vp);
9283 : }
9284 :
9285 : static JSBool
9286 0 : nsIDOMCSS2Properties_GetMozTransitionDelay(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9287 : {
9288 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransitionDelay, vp);
9289 : }
9290 :
9291 : static JSBool
9292 0 : nsIDOMCSS2Properties_SetMozTransitionDelay(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9293 : {
9294 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransitionDelay, vp);
9295 : }
9296 :
9297 : static JSBool
9298 0 : nsIDOMCSS2Properties_GetMozTransitionTimingFunction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9299 : {
9300 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransitionTimingFunction, vp);
9301 : }
9302 :
9303 : static JSBool
9304 0 : nsIDOMCSS2Properties_SetMozTransitionTimingFunction(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9305 : {
9306 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransitionTimingFunction, vp);
9307 : }
9308 :
9309 : static JSBool
9310 0 : nsIDOMCSS2Properties_GetMozTransition(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9311 : {
9312 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTransition, vp);
9313 : }
9314 :
9315 : static JSBool
9316 0 : nsIDOMCSS2Properties_SetMozTransition(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9317 : {
9318 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTransition, vp);
9319 : }
9320 :
9321 : static JSBool
9322 0 : nsIDOMCSS2Properties_GetPointerEvents(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9323 : {
9324 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_PointerEvents, vp);
9325 : }
9326 :
9327 : static JSBool
9328 0 : nsIDOMCSS2Properties_SetPointerEvents(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9329 : {
9330 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_PointerEvents, vp);
9331 : }
9332 :
9333 : static JSBool
9334 0 : nsIDOMCSS2Properties_GetMozTabSize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9335 : {
9336 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTabSize, vp);
9337 : }
9338 :
9339 : static JSBool
9340 0 : nsIDOMCSS2Properties_SetMozTabSize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9341 : {
9342 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTabSize, vp);
9343 : }
9344 :
9345 : static JSBool
9346 0 : nsIDOMCSS2Properties_GetResize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9347 : {
9348 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Resize, vp);
9349 : }
9350 :
9351 : static JSBool
9352 0 : nsIDOMCSS2Properties_SetResize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9353 : {
9354 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_Resize, vp);
9355 : }
9356 :
9357 : static JSBool
9358 0 : nsIDOMCSS2Properties_GetMozAnimationName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9359 : {
9360 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationName, vp);
9361 : }
9362 :
9363 : static JSBool
9364 0 : nsIDOMCSS2Properties_SetMozAnimationName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9365 : {
9366 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationName, vp);
9367 : }
9368 :
9369 : static JSBool
9370 0 : nsIDOMCSS2Properties_GetMozAnimationDuration(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9371 : {
9372 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationDuration, vp);
9373 : }
9374 :
9375 : static JSBool
9376 0 : nsIDOMCSS2Properties_SetMozAnimationDuration(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9377 : {
9378 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationDuration, vp);
9379 : }
9380 :
9381 : static JSBool
9382 0 : nsIDOMCSS2Properties_GetMozAnimationDelay(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9383 : {
9384 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationDelay, vp);
9385 : }
9386 :
9387 : static JSBool
9388 0 : nsIDOMCSS2Properties_SetMozAnimationDelay(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9389 : {
9390 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationDelay, vp);
9391 : }
9392 :
9393 : static JSBool
9394 0 : nsIDOMCSS2Properties_GetMozAnimationTimingFunction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9395 : {
9396 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationTimingFunction, vp);
9397 : }
9398 :
9399 : static JSBool
9400 0 : nsIDOMCSS2Properties_SetMozAnimationTimingFunction(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9401 : {
9402 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationTimingFunction, vp);
9403 : }
9404 :
9405 : static JSBool
9406 0 : nsIDOMCSS2Properties_GetMozAnimationDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9407 : {
9408 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationDirection, vp);
9409 : }
9410 :
9411 : static JSBool
9412 0 : nsIDOMCSS2Properties_SetMozAnimationDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9413 : {
9414 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationDirection, vp);
9415 : }
9416 :
9417 : static JSBool
9418 0 : nsIDOMCSS2Properties_GetMozAnimationFillMode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9419 : {
9420 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationFillMode, vp);
9421 : }
9422 :
9423 : static JSBool
9424 0 : nsIDOMCSS2Properties_SetMozAnimationFillMode(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9425 : {
9426 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationFillMode, vp);
9427 : }
9428 :
9429 : static JSBool
9430 0 : nsIDOMCSS2Properties_GetMozAnimationIterationCount(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9431 : {
9432 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationIterationCount, vp);
9433 : }
9434 :
9435 : static JSBool
9436 0 : nsIDOMCSS2Properties_SetMozAnimationIterationCount(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9437 : {
9438 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationIterationCount, vp);
9439 : }
9440 :
9441 : static JSBool
9442 0 : nsIDOMCSS2Properties_GetMozAnimationPlayState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9443 : {
9444 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimationPlayState, vp);
9445 : }
9446 :
9447 : static JSBool
9448 0 : nsIDOMCSS2Properties_SetMozAnimationPlayState(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9449 : {
9450 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimationPlayState, vp);
9451 : }
9452 :
9453 : static JSBool
9454 0 : nsIDOMCSS2Properties_GetMozAnimation(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9455 : {
9456 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozAnimation, vp);
9457 : }
9458 :
9459 : static JSBool
9460 0 : nsIDOMCSS2Properties_SetMozAnimation(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9461 : {
9462 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozAnimation, vp);
9463 : }
9464 :
9465 : static JSBool
9466 0 : nsIDOMCSS2Properties_GetMozTextSizeAdjust(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9467 : {
9468 0 : return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_MozTextSizeAdjust, vp);
9469 : }
9470 :
9471 : static JSBool
9472 0 : nsIDOMCSS2Properties_SetMozTextSizeAdjust(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9473 : {
9474 0 : return nsIDOMCSS2Properties_Set(cx, obj, id, strict, QS_CSS_PROP_MozTextSizeAdjust, vp);
9475 : }
9476 :
9477 : // === interface nsIDOMRect
9478 :
9479 : static JSBool
9480 0 : nsIDOMRect_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9481 : {
9482 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9483 0 : JSObject *callee = nsnull;
9484 : nsIDOMRect *self;
9485 0 : xpc_qsSelfRef selfref;
9486 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9487 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9488 0 : return JS_FALSE;
9489 : nsresult rv;
9490 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9491 0 : rv = self->GetTop(getter_AddRefs(result));
9492 0 : if (NS_FAILED(rv))
9493 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9494 0 : if (!result) {
9495 0 : *vp = JSVAL_NULL;
9496 0 : return JS_TRUE;
9497 : }
9498 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9499 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9500 0 : return JS_TRUE;
9501 : }
9502 : // After this point do not use 'result'!
9503 0 : qsObjectHelper helper(result, cache);
9504 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9505 : }
9506 :
9507 : static JSBool
9508 0 : nsIDOMRect_GetRight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9509 : {
9510 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9511 0 : JSObject *callee = nsnull;
9512 : nsIDOMRect *self;
9513 0 : xpc_qsSelfRef selfref;
9514 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9515 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9516 0 : return JS_FALSE;
9517 : nsresult rv;
9518 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9519 0 : rv = self->GetRight(getter_AddRefs(result));
9520 0 : if (NS_FAILED(rv))
9521 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9522 0 : if (!result) {
9523 0 : *vp = JSVAL_NULL;
9524 0 : return JS_TRUE;
9525 : }
9526 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9527 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9528 0 : return JS_TRUE;
9529 : }
9530 : // After this point do not use 'result'!
9531 0 : qsObjectHelper helper(result, cache);
9532 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9533 : }
9534 :
9535 : static JSBool
9536 0 : nsIDOMRect_GetBottom(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9537 : {
9538 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9539 0 : JSObject *callee = nsnull;
9540 : nsIDOMRect *self;
9541 0 : xpc_qsSelfRef selfref;
9542 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9543 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9544 0 : return JS_FALSE;
9545 : nsresult rv;
9546 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9547 0 : rv = self->GetBottom(getter_AddRefs(result));
9548 0 : if (NS_FAILED(rv))
9549 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9550 0 : if (!result) {
9551 0 : *vp = JSVAL_NULL;
9552 0 : return JS_TRUE;
9553 : }
9554 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9555 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9556 0 : return JS_TRUE;
9557 : }
9558 : // After this point do not use 'result'!
9559 0 : qsObjectHelper helper(result, cache);
9560 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9561 : }
9562 :
9563 : static JSBool
9564 0 : nsIDOMRect_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9565 : {
9566 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9567 0 : JSObject *callee = nsnull;
9568 : nsIDOMRect *self;
9569 0 : xpc_qsSelfRef selfref;
9570 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9571 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9572 0 : return JS_FALSE;
9573 : nsresult rv;
9574 0 : nsCOMPtr<nsIDOMCSSPrimitiveValue> result;
9575 0 : rv = self->GetLeft(getter_AddRefs(result));
9576 0 : if (NS_FAILED(rv))
9577 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9578 0 : if (!result) {
9579 0 : *vp = JSVAL_NULL;
9580 0 : return JS_TRUE;
9581 : }
9582 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9583 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9584 0 : return JS_TRUE;
9585 : }
9586 : // After this point do not use 'result'!
9587 0 : qsObjectHelper helper(result, cache);
9588 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSPrimitiveValue), &interfaces[k_nsIDOMCSSPrimitiveValue], vp);
9589 : }
9590 :
9591 : // === interface nsIDOMCSSStyleDeclaration
9592 :
9593 : static JSBool
9594 0 : nsIDOMCSSStyleDeclaration_GetCssText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9595 : {
9596 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9597 : nsIDOMCSSStyleDeclaration *self;
9598 0 : xpc_qsSelfRef selfref;
9599 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
9600 0 : return JS_FALSE;
9601 : nsresult rv;
9602 0 : nsString result;
9603 0 : rv = self->GetCssText(result);
9604 0 : if (NS_FAILED(rv))
9605 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9606 0 : return xpc::StringToJsval(cx, result, vp);
9607 : }
9608 :
9609 : static JSBool
9610 0 : nsIDOMCSSStyleDeclaration_SetCssText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
9611 : {
9612 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9613 : nsIDOMCSSStyleDeclaration *self;
9614 0 : xpc_qsSelfRef selfref;
9615 0 : JS::AutoValueRooter tvr(cx);
9616 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
9617 0 : return JS_FALSE;
9618 : xpc_qsDOMString arg0(cx, *vp, vp,
9619 : xpc_qsDOMString::eDefaultNullBehavior,
9620 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9621 0 : if (!arg0.IsValid())
9622 0 : return JS_FALSE;
9623 : nsresult rv;
9624 0 : rv = self->SetCssText(arg0);
9625 0 : if (NS_FAILED(rv))
9626 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
9627 0 : return JS_TRUE;
9628 : }
9629 :
9630 : static JSBool
9631 0 : nsIDOMCSSStyleDeclaration_GetPropertyValue(JSContext *cx, unsigned argc, jsval *vp)
9632 : {
9633 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9634 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9635 0 : if (!obj)
9636 0 : return JS_FALSE;
9637 : nsIDOMCSSStyleDeclaration *self;
9638 0 : xpc_qsSelfRef selfref;
9639 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9640 0 : return JS_FALSE;
9641 0 : if (argc < 1)
9642 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9643 0 : jsval *argv = JS_ARGV(cx, vp);
9644 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9645 : xpc_qsDOMString::eDefaultNullBehavior,
9646 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9647 0 : if (!arg0.IsValid())
9648 0 : return JS_FALSE;
9649 : nsresult rv;
9650 0 : nsString result;
9651 0 : rv = self->GetPropertyValue(arg0, result);
9652 0 : if (NS_FAILED(rv))
9653 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9654 0 : return xpc::StringToJsval(cx, result, vp);
9655 : }
9656 :
9657 : static JSBool
9658 0 : nsIDOMCSSStyleDeclaration_GetPropertyCSSValue(JSContext *cx, unsigned argc, jsval *vp)
9659 : {
9660 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9661 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9662 0 : if (!obj)
9663 0 : return JS_FALSE;
9664 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
9665 : nsIDOMCSSStyleDeclaration *self;
9666 0 : xpc_qsSelfRef selfref;
9667 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9668 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
9669 0 : return JS_FALSE;
9670 0 : if (argc < 1)
9671 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9672 0 : jsval *argv = JS_ARGV(cx, vp);
9673 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9674 : xpc_qsDOMString::eDefaultNullBehavior,
9675 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9676 0 : if (!arg0.IsValid())
9677 0 : return JS_FALSE;
9678 : nsresult rv;
9679 0 : nsCOMPtr<nsIDOMCSSValue> result;
9680 0 : rv = self->GetPropertyCSSValue(arg0, getter_AddRefs(result));
9681 0 : if (NS_FAILED(rv))
9682 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9683 0 : if (!result) {
9684 0 : *vp = JSVAL_NULL;
9685 0 : return JS_TRUE;
9686 : }
9687 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9688 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9689 0 : return JS_TRUE;
9690 : }
9691 : // After this point do not use 'result'!
9692 0 : qsObjectHelper helper(result, cache);
9693 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSValue), &interfaces[k_nsIDOMCSSValue], vp);
9694 : }
9695 :
9696 : static JSBool
9697 0 : nsIDOMCSSStyleDeclaration_RemoveProperty(JSContext *cx, unsigned argc, jsval *vp)
9698 : {
9699 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9700 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9701 0 : if (!obj)
9702 0 : return JS_FALSE;
9703 : nsIDOMCSSStyleDeclaration *self;
9704 0 : xpc_qsSelfRef selfref;
9705 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9706 0 : return JS_FALSE;
9707 0 : if (argc < 1)
9708 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9709 0 : jsval *argv = JS_ARGV(cx, vp);
9710 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9711 : xpc_qsDOMString::eDefaultNullBehavior,
9712 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9713 0 : if (!arg0.IsValid())
9714 0 : return JS_FALSE;
9715 : nsresult rv;
9716 0 : nsString result;
9717 0 : rv = self->RemoveProperty(arg0, result);
9718 0 : if (NS_FAILED(rv))
9719 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9720 0 : return xpc::StringToJsval(cx, result, vp);
9721 : }
9722 :
9723 : static JSBool
9724 0 : nsIDOMCSSStyleDeclaration_GetPropertyPriority(JSContext *cx, unsigned argc, jsval *vp)
9725 : {
9726 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9727 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9728 0 : if (!obj)
9729 0 : return JS_FALSE;
9730 : nsIDOMCSSStyleDeclaration *self;
9731 0 : xpc_qsSelfRef selfref;
9732 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9733 0 : return JS_FALSE;
9734 0 : if (argc < 1)
9735 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9736 0 : jsval *argv = JS_ARGV(cx, vp);
9737 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9738 : xpc_qsDOMString::eDefaultNullBehavior,
9739 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9740 0 : if (!arg0.IsValid())
9741 0 : return JS_FALSE;
9742 : nsresult rv;
9743 0 : nsString result;
9744 0 : rv = self->GetPropertyPriority(arg0, result);
9745 0 : if (NS_FAILED(rv))
9746 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9747 0 : return xpc::StringToJsval(cx, result, vp);
9748 : }
9749 :
9750 : static JSBool
9751 0 : nsIDOMCSSStyleDeclaration_SetProperty(JSContext *cx, unsigned argc, jsval *vp)
9752 : {
9753 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9754 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9755 0 : if (!obj)
9756 0 : return JS_FALSE;
9757 : nsIDOMCSSStyleDeclaration *self;
9758 0 : xpc_qsSelfRef selfref;
9759 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9760 0 : return JS_FALSE;
9761 0 : if (argc < 2)
9762 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9763 0 : jsval *argv = JS_ARGV(cx, vp);
9764 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9765 : xpc_qsDOMString::eDefaultNullBehavior,
9766 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9767 0 : if (!arg0.IsValid())
9768 0 : return JS_FALSE;
9769 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
9770 : xpc_qsDOMString::eDefaultNullBehavior,
9771 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9772 0 : if (!arg1.IsValid())
9773 0 : return JS_FALSE;
9774 : xpc_qsDOMString arg2(cx, (2 < argc ? argv[2] : JSVAL_NULL), (2 < argc ? &argv[2] : NULL),
9775 : xpc_qsDOMString::eDefaultNullBehavior,
9776 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9777 0 : if (!arg2.IsValid())
9778 0 : return JS_FALSE;
9779 : nsresult rv;
9780 0 : rv = self->SetProperty(arg0, arg1, arg2);
9781 0 : if (NS_FAILED(rv))
9782 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9783 0 : *vp = JSVAL_VOID;
9784 0 : return JS_TRUE;
9785 : }
9786 :
9787 : static JSBool
9788 0 : nsIDOMCSSStyleDeclaration_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9789 : {
9790 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9791 : nsIDOMCSSStyleDeclaration *self;
9792 0 : xpc_qsSelfRef selfref;
9793 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
9794 0 : return JS_FALSE;
9795 : nsresult rv;
9796 : PRUint32 result;
9797 0 : rv = self->GetLength(&result);
9798 0 : if (NS_FAILED(rv))
9799 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9800 0 : *vp = UINT_TO_JSVAL(result);
9801 0 : return JS_TRUE;
9802 : }
9803 :
9804 : static JSBool
9805 0 : nsIDOMCSSStyleDeclaration_Item(JSContext *cx, unsigned argc, jsval *vp)
9806 : {
9807 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9808 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9809 0 : if (!obj)
9810 0 : return JS_FALSE;
9811 : nsIDOMCSSStyleDeclaration *self;
9812 0 : xpc_qsSelfRef selfref;
9813 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9814 0 : return JS_FALSE;
9815 0 : if (argc < 1)
9816 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9817 0 : jsval *argv = JS_ARGV(cx, vp);
9818 : uint32_t arg0;
9819 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
9820 0 : return JS_FALSE;
9821 : nsresult rv;
9822 0 : nsString result;
9823 0 : rv = self->Item(arg0, result);
9824 0 : if (NS_FAILED(rv))
9825 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9826 0 : return xpc::StringToJsval(cx, result, vp);
9827 : }
9828 :
9829 : static JSBool
9830 0 : nsIDOMCSSStyleDeclaration_GetParentRule(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9831 : {
9832 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9833 0 : JSObject *callee = nsnull;
9834 : nsIDOMCSSStyleDeclaration *self;
9835 0 : xpc_qsSelfRef selfref;
9836 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9837 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9838 0 : return JS_FALSE;
9839 : nsresult rv;
9840 0 : nsCOMPtr<nsIDOMCSSRule> result;
9841 0 : rv = self->GetParentRule(getter_AddRefs(result));
9842 0 : if (NS_FAILED(rv))
9843 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9844 0 : if (!result) {
9845 0 : *vp = JSVAL_NULL;
9846 0 : return JS_TRUE;
9847 : }
9848 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
9849 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
9850 0 : return JS_TRUE;
9851 : }
9852 : // After this point do not use 'result'!
9853 0 : qsObjectHelper helper(result, cache);
9854 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSRule), &interfaces[k_nsIDOMCSSRule], vp);
9855 : }
9856 :
9857 : // === interface nsIDOMEventTarget
9858 :
9859 : static JSBool
9860 1077 : nsIDOMEventTarget_AddEventListener(JSContext *cx, unsigned argc, jsval *vp)
9861 : {
9862 1077 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9863 1077 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9864 1077 : if (!obj)
9865 0 : return JS_FALSE;
9866 : nsIDOMEventTarget *self;
9867 2154 : xpc_qsSelfRef selfref;
9868 1077 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9869 0 : return JS_FALSE;
9870 1077 : if (argc < 2)
9871 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9872 1077 : jsval *argv = JS_ARGV(cx, vp);
9873 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9874 : xpc_qsDOMString::eDefaultNullBehavior,
9875 2154 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9876 1077 : if (!arg0.IsValid())
9877 0 : return JS_FALSE;
9878 : nsresult rv;
9879 : nsIDOMEventListener *arg1;
9880 2154 : xpc_qsSelfRef arg1ref;
9881 1077 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
9882 1077 : if (NS_FAILED(rv)) {
9883 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
9884 0 : return JS_FALSE;
9885 : }
9886 : JSBool arg2;
9887 1077 : JS_ValueToBoolean(cx, (2 < argc ? argv[2] : JSVAL_NULL), &arg2);
9888 : JSBool arg3;
9889 1077 : JS_ValueToBoolean(cx, (3 < argc ? argv[3] : JSVAL_NULL), &arg3);
9890 1077 : rv = self->AddEventListener(arg0, arg1, arg2, arg3, NS_MIN<PRUint32>(argc, 4) - 2);
9891 1077 : if (NS_FAILED(rv))
9892 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9893 1077 : *vp = JSVAL_VOID;
9894 1077 : return JS_TRUE;
9895 : }
9896 :
9897 : static JSBool
9898 2 : nsIDOMEventTarget_RemoveEventListener(JSContext *cx, unsigned argc, jsval *vp)
9899 : {
9900 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9901 2 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9902 2 : if (!obj)
9903 0 : return JS_FALSE;
9904 : nsIDOMEventTarget *self;
9905 4 : xpc_qsSelfRef selfref;
9906 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9907 0 : return JS_FALSE;
9908 2 : if (argc < 2)
9909 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9910 2 : jsval *argv = JS_ARGV(cx, vp);
9911 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
9912 : xpc_qsDOMString::eDefaultNullBehavior,
9913 4 : xpc_qsDOMString::eDefaultUndefinedBehavior);
9914 2 : if (!arg0.IsValid())
9915 0 : return JS_FALSE;
9916 : nsresult rv;
9917 : nsIDOMEventListener *arg1;
9918 4 : xpc_qsSelfRef arg1ref;
9919 2 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
9920 2 : if (NS_FAILED(rv)) {
9921 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
9922 0 : return JS_FALSE;
9923 : }
9924 : JSBool arg2;
9925 2 : JS_ValueToBoolean(cx, (2 < argc ? argv[2] : JSVAL_NULL), &arg2);
9926 2 : rv = self->RemoveEventListener(arg0, arg1, arg2);
9927 2 : if (NS_FAILED(rv))
9928 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9929 2 : *vp = JSVAL_VOID;
9930 2 : return JS_TRUE;
9931 : }
9932 :
9933 : static JSBool
9934 0 : nsIDOMEventTarget_DispatchEvent(JSContext *cx, unsigned argc, jsval *vp)
9935 : {
9936 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9937 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
9938 0 : if (!obj)
9939 0 : return JS_FALSE;
9940 : nsIDOMEventTarget *self;
9941 0 : xpc_qsSelfRef selfref;
9942 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
9943 0 : return JS_FALSE;
9944 0 : if (argc < 1)
9945 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
9946 0 : jsval *argv = JS_ARGV(cx, vp);
9947 : nsresult rv;
9948 : nsIDOMEvent *arg0;
9949 0 : xpc_qsSelfRef arg0ref;
9950 0 : rv = xpc_qsUnwrapArg<nsIDOMEvent>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
9951 0 : if (NS_FAILED(rv)) {
9952 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
9953 0 : return JS_FALSE;
9954 : }
9955 : bool result;
9956 0 : rv = self->DispatchEvent(arg0, &result);
9957 0 : if (NS_FAILED(rv))
9958 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
9959 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
9960 0 : return JS_TRUE;
9961 : }
9962 :
9963 : // === interface nsIDOMEvent
9964 :
9965 : static JSBool
9966 148 : nsIDOMEvent_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9967 : {
9968 148 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9969 : nsIDOMEvent *self;
9970 296 : xpc_qsSelfRef selfref;
9971 148 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
9972 0 : return JS_FALSE;
9973 : nsresult rv;
9974 296 : nsString result;
9975 148 : rv = self->GetType(result);
9976 148 : if (NS_FAILED(rv))
9977 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9978 148 : return xpc::StringToJsval(cx, result, vp);
9979 : }
9980 :
9981 : static JSBool
9982 3536 : nsIDOMEvent_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
9983 : {
9984 3536 : XPC_QS_ASSERT_CONTEXT_OK(cx);
9985 3536 : JSObject *callee = nsnull;
9986 : nsIDOMEvent *self;
9987 7072 : xpc_qsSelfRef selfref;
9988 7072 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
9989 3536 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
9990 0 : return JS_FALSE;
9991 : nsresult rv;
9992 7072 : nsCOMPtr<nsIDOMEventTarget> result;
9993 3536 : rv = self->GetTarget(getter_AddRefs(result));
9994 3536 : if (NS_FAILED(rv))
9995 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
9996 3536 : if (!result) {
9997 0 : *vp = JSVAL_NULL;
9998 0 : return JS_TRUE;
9999 : }
10000 3536 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10001 3536 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10002 0 : return JS_TRUE;
10003 : }
10004 : // After this point do not use 'result'!
10005 7072 : qsObjectHelper helper(result, cache);
10006 3536 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
10007 : }
10008 :
10009 : static JSBool
10010 0 : nsIDOMEvent_GetCurrentTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10011 : {
10012 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10013 0 : JSObject *callee = nsnull;
10014 : nsIDOMEvent *self;
10015 0 : xpc_qsSelfRef selfref;
10016 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10017 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10018 0 : return JS_FALSE;
10019 : nsresult rv;
10020 0 : nsCOMPtr<nsIDOMEventTarget> result;
10021 0 : rv = self->GetCurrentTarget(getter_AddRefs(result));
10022 0 : if (NS_FAILED(rv))
10023 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10024 0 : if (!result) {
10025 0 : *vp = JSVAL_NULL;
10026 0 : return JS_TRUE;
10027 : }
10028 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10029 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10030 0 : return JS_TRUE;
10031 : }
10032 : // After this point do not use 'result'!
10033 0 : qsObjectHelper helper(result, cache);
10034 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
10035 : }
10036 :
10037 : static JSBool
10038 0 : nsIDOMEvent_GetEventPhase(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10039 : {
10040 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10041 : nsIDOMEvent *self;
10042 0 : xpc_qsSelfRef selfref;
10043 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10044 0 : return JS_FALSE;
10045 : nsresult rv;
10046 : PRUint16 result;
10047 0 : rv = self->GetEventPhase(&result);
10048 0 : if (NS_FAILED(rv))
10049 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10050 0 : *vp = INT_TO_JSVAL((int32_t) result);
10051 0 : return JS_TRUE;
10052 : }
10053 :
10054 : static JSBool
10055 0 : nsIDOMEvent_GetBubbles(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10056 : {
10057 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10058 : nsIDOMEvent *self;
10059 0 : xpc_qsSelfRef selfref;
10060 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10061 0 : return JS_FALSE;
10062 : nsresult rv;
10063 : bool result;
10064 0 : rv = self->GetBubbles(&result);
10065 0 : if (NS_FAILED(rv))
10066 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10067 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10068 0 : return JS_TRUE;
10069 : }
10070 :
10071 : static JSBool
10072 0 : nsIDOMEvent_GetCancelable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10073 : {
10074 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10075 : nsIDOMEvent *self;
10076 0 : xpc_qsSelfRef selfref;
10077 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10078 0 : return JS_FALSE;
10079 : nsresult rv;
10080 : bool result;
10081 0 : rv = self->GetCancelable(&result);
10082 0 : if (NS_FAILED(rv))
10083 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10084 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10085 0 : return JS_TRUE;
10086 : }
10087 :
10088 : static JSBool
10089 0 : nsIDOMEvent_GetTimeStamp(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10090 : {
10091 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10092 : nsIDOMEvent *self;
10093 0 : xpc_qsSelfRef selfref;
10094 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10095 0 : return JS_FALSE;
10096 : nsresult rv;
10097 : DOMTimeStamp result;
10098 0 : rv = self->GetTimeStamp(&result);
10099 0 : if (NS_FAILED(rv))
10100 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10101 0 : return xpc_qsUint64ToJsval(cx, result, vp);
10102 : }
10103 :
10104 : static JSBool
10105 10 : nsIDOMEvent_StopPropagation(JSContext *cx, unsigned argc, jsval *vp)
10106 : {
10107 10 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10108 10 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10109 10 : if (!obj)
10110 0 : return JS_FALSE;
10111 : nsIDOMEvent *self;
10112 20 : xpc_qsSelfRef selfref;
10113 10 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10114 0 : return JS_FALSE;
10115 : nsresult rv;
10116 10 : rv = self->StopPropagation();
10117 10 : if (NS_FAILED(rv))
10118 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10119 10 : *vp = JSVAL_VOID;
10120 10 : return JS_TRUE;
10121 : }
10122 :
10123 : static JSBool
10124 32 : nsIDOMEvent_PreventDefault(JSContext *cx, unsigned argc, jsval *vp)
10125 : {
10126 32 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10127 32 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10128 32 : if (!obj)
10129 0 : return JS_FALSE;
10130 : nsIDOMEvent *self;
10131 64 : xpc_qsSelfRef selfref;
10132 32 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10133 0 : return JS_FALSE;
10134 : nsresult rv;
10135 32 : rv = self->PreventDefault();
10136 32 : if (NS_FAILED(rv))
10137 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10138 32 : *vp = JSVAL_VOID;
10139 32 : return JS_TRUE;
10140 : }
10141 :
10142 : static JSBool
10143 0 : nsIDOMEvent_InitEvent(JSContext *cx, unsigned argc, jsval *vp)
10144 : {
10145 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10146 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10147 0 : if (!obj)
10148 0 : return JS_FALSE;
10149 : nsIDOMEvent *self;
10150 0 : xpc_qsSelfRef selfref;
10151 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10152 0 : return JS_FALSE;
10153 0 : if (argc < 3)
10154 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10155 0 : jsval *argv = JS_ARGV(cx, vp);
10156 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10157 : xpc_qsDOMString::eDefaultNullBehavior,
10158 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10159 0 : if (!arg0.IsValid())
10160 0 : return JS_FALSE;
10161 : JSBool arg1;
10162 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10163 : JSBool arg2;
10164 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10165 : nsresult rv;
10166 0 : rv = self->InitEvent(arg0, arg1, arg2);
10167 0 : if (NS_FAILED(rv))
10168 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10169 0 : *vp = JSVAL_VOID;
10170 0 : return JS_TRUE;
10171 : }
10172 :
10173 : static JSBool
10174 0 : nsIDOMEvent_GetDefaultPrevented(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10175 : {
10176 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10177 : nsIDOMEvent *self;
10178 0 : xpc_qsSelfRef selfref;
10179 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10180 0 : return JS_FALSE;
10181 : nsresult rv;
10182 : bool result;
10183 0 : rv = self->GetDefaultPrevented(&result);
10184 0 : if (NS_FAILED(rv))
10185 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10186 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10187 0 : return JS_TRUE;
10188 : }
10189 :
10190 : static JSBool
10191 0 : nsIDOMEvent_StopImmediatePropagation(JSContext *cx, unsigned argc, jsval *vp)
10192 : {
10193 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10194 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10195 0 : if (!obj)
10196 0 : return JS_FALSE;
10197 : nsIDOMEvent *self;
10198 0 : xpc_qsSelfRef selfref;
10199 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10200 0 : return JS_FALSE;
10201 : nsresult rv;
10202 0 : rv = self->StopImmediatePropagation();
10203 0 : if (NS_FAILED(rv))
10204 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10205 0 : *vp = JSVAL_VOID;
10206 0 : return JS_TRUE;
10207 : }
10208 :
10209 : // === interface nsIDOMMouseEvent
10210 :
10211 : static JSBool
10212 0 : nsIDOMMouseEvent_GetScreenX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10213 : {
10214 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10215 : nsIDOMMouseEvent *self;
10216 0 : xpc_qsSelfRef selfref;
10217 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10218 0 : return JS_FALSE;
10219 : nsresult rv;
10220 : PRInt32 result;
10221 0 : rv = self->GetScreenX(&result);
10222 0 : if (NS_FAILED(rv))
10223 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10224 0 : *vp = INT_TO_JSVAL(result);
10225 0 : return JS_TRUE;
10226 : }
10227 :
10228 : static JSBool
10229 0 : nsIDOMMouseEvent_GetScreenY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10230 : {
10231 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10232 : nsIDOMMouseEvent *self;
10233 0 : xpc_qsSelfRef selfref;
10234 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10235 0 : return JS_FALSE;
10236 : nsresult rv;
10237 : PRInt32 result;
10238 0 : rv = self->GetScreenY(&result);
10239 0 : if (NS_FAILED(rv))
10240 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10241 0 : *vp = INT_TO_JSVAL(result);
10242 0 : return JS_TRUE;
10243 : }
10244 :
10245 : static JSBool
10246 0 : nsIDOMMouseEvent_GetClientX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10247 : {
10248 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10249 : nsIDOMMouseEvent *self;
10250 0 : xpc_qsSelfRef selfref;
10251 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10252 0 : return JS_FALSE;
10253 : nsresult rv;
10254 : PRInt32 result;
10255 0 : rv = self->GetClientX(&result);
10256 0 : if (NS_FAILED(rv))
10257 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10258 0 : *vp = INT_TO_JSVAL(result);
10259 0 : return JS_TRUE;
10260 : }
10261 :
10262 : static JSBool
10263 0 : nsIDOMMouseEvent_GetClientY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10264 : {
10265 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10266 : nsIDOMMouseEvent *self;
10267 0 : xpc_qsSelfRef selfref;
10268 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10269 0 : return JS_FALSE;
10270 : nsresult rv;
10271 : PRInt32 result;
10272 0 : rv = self->GetClientY(&result);
10273 0 : if (NS_FAILED(rv))
10274 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10275 0 : *vp = INT_TO_JSVAL(result);
10276 0 : return JS_TRUE;
10277 : }
10278 :
10279 : static JSBool
10280 0 : nsIDOMMouseEvent_GetCtrlKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10281 : {
10282 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10283 : nsIDOMMouseEvent *self;
10284 0 : xpc_qsSelfRef selfref;
10285 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10286 0 : return JS_FALSE;
10287 : nsresult rv;
10288 : bool result;
10289 0 : rv = self->GetCtrlKey(&result);
10290 0 : if (NS_FAILED(rv))
10291 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10292 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10293 0 : return JS_TRUE;
10294 : }
10295 :
10296 : static JSBool
10297 0 : nsIDOMMouseEvent_GetShiftKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10298 : {
10299 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10300 : nsIDOMMouseEvent *self;
10301 0 : xpc_qsSelfRef selfref;
10302 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10303 0 : return JS_FALSE;
10304 : nsresult rv;
10305 : bool result;
10306 0 : rv = self->GetShiftKey(&result);
10307 0 : if (NS_FAILED(rv))
10308 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10309 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10310 0 : return JS_TRUE;
10311 : }
10312 :
10313 : static JSBool
10314 0 : nsIDOMMouseEvent_GetAltKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10315 : {
10316 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10317 : nsIDOMMouseEvent *self;
10318 0 : xpc_qsSelfRef selfref;
10319 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10320 0 : return JS_FALSE;
10321 : nsresult rv;
10322 : bool result;
10323 0 : rv = self->GetAltKey(&result);
10324 0 : if (NS_FAILED(rv))
10325 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10326 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10327 0 : return JS_TRUE;
10328 : }
10329 :
10330 : static JSBool
10331 0 : nsIDOMMouseEvent_GetMetaKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10332 : {
10333 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10334 : nsIDOMMouseEvent *self;
10335 0 : xpc_qsSelfRef selfref;
10336 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10337 0 : return JS_FALSE;
10338 : nsresult rv;
10339 : bool result;
10340 0 : rv = self->GetMetaKey(&result);
10341 0 : if (NS_FAILED(rv))
10342 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10343 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10344 0 : return JS_TRUE;
10345 : }
10346 :
10347 : static JSBool
10348 0 : nsIDOMMouseEvent_GetButton(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10349 : {
10350 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10351 : nsIDOMMouseEvent *self;
10352 0 : xpc_qsSelfRef selfref;
10353 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10354 0 : return JS_FALSE;
10355 : nsresult rv;
10356 : PRUint16 result;
10357 0 : rv = self->GetButton(&result);
10358 0 : if (NS_FAILED(rv))
10359 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10360 0 : *vp = INT_TO_JSVAL((int32_t) result);
10361 0 : return JS_TRUE;
10362 : }
10363 :
10364 : static JSBool
10365 0 : nsIDOMMouseEvent_GetRelatedTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10366 : {
10367 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10368 0 : JSObject *callee = nsnull;
10369 : nsIDOMMouseEvent *self;
10370 0 : xpc_qsSelfRef selfref;
10371 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10372 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10373 0 : return JS_FALSE;
10374 : nsresult rv;
10375 0 : nsCOMPtr<nsIDOMEventTarget> result;
10376 0 : rv = self->GetRelatedTarget(getter_AddRefs(result));
10377 0 : if (NS_FAILED(rv))
10378 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10379 0 : if (!result) {
10380 0 : *vp = JSVAL_NULL;
10381 0 : return JS_TRUE;
10382 : }
10383 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10384 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10385 0 : return JS_TRUE;
10386 : }
10387 : // After this point do not use 'result'!
10388 0 : qsObjectHelper helper(result, cache);
10389 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
10390 : }
10391 :
10392 : static JSBool
10393 0 : nsIDOMMouseEvent_InitMouseEvent(JSContext *cx, unsigned argc, jsval *vp)
10394 : {
10395 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10396 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10397 0 : if (!obj)
10398 0 : return JS_FALSE;
10399 : nsIDOMMouseEvent *self;
10400 0 : xpc_qsSelfRef selfref;
10401 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10402 0 : return JS_FALSE;
10403 0 : if (argc < 15)
10404 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10405 0 : jsval *argv = JS_ARGV(cx, vp);
10406 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10407 : xpc_qsDOMString::eDefaultNullBehavior,
10408 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10409 0 : if (!arg0.IsValid())
10410 0 : return JS_FALSE;
10411 : JSBool arg1;
10412 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10413 : JSBool arg2;
10414 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10415 : nsresult rv;
10416 : nsIDOMWindow *arg3;
10417 0 : xpc_qsSelfRef arg3ref;
10418 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10419 0 : if (NS_FAILED(rv)) {
10420 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10421 0 : return JS_FALSE;
10422 : }
10423 : int32_t arg4;
10424 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
10425 0 : return JS_FALSE;
10426 : int32_t arg5;
10427 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
10428 0 : return JS_FALSE;
10429 : int32_t arg6;
10430 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
10431 0 : return JS_FALSE;
10432 : int32_t arg7;
10433 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
10434 0 : return JS_FALSE;
10435 : int32_t arg8;
10436 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
10437 0 : return JS_FALSE;
10438 : JSBool arg9;
10439 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
10440 : JSBool arg10;
10441 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
10442 : JSBool arg11;
10443 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
10444 : JSBool arg12;
10445 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
10446 : uint32_t arg13_u32;
10447 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
10448 0 : return JS_FALSE;
10449 0 : uint16_t arg13 = (uint16_t) arg13_u32;
10450 : nsIDOMEventTarget *arg14;
10451 0 : xpc_qsSelfRef arg14ref;
10452 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
10453 0 : if (NS_FAILED(rv)) {
10454 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
10455 0 : return JS_FALSE;
10456 : }
10457 0 : rv = self->InitMouseEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14);
10458 0 : if (NS_FAILED(rv))
10459 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10460 0 : *vp = JSVAL_VOID;
10461 0 : return JS_TRUE;
10462 : }
10463 :
10464 : static JSBool
10465 0 : nsIDOMMouseEvent_GetMozPressure(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10466 : {
10467 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10468 : nsIDOMMouseEvent *self;
10469 0 : xpc_qsSelfRef selfref;
10470 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10471 0 : return JS_FALSE;
10472 : nsresult rv;
10473 : float result;
10474 0 : rv = self->GetMozPressure(&result);
10475 0 : if (NS_FAILED(rv))
10476 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10477 0 : return JS_NewNumberValue(cx, result, vp);
10478 : }
10479 :
10480 : static JSBool
10481 0 : nsIDOMMouseEvent_GetMozInputSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10482 : {
10483 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10484 : nsIDOMMouseEvent *self;
10485 0 : xpc_qsSelfRef selfref;
10486 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10487 0 : return JS_FALSE;
10488 : nsresult rv;
10489 : PRUint16 result;
10490 0 : rv = self->GetMozInputSource(&result);
10491 0 : if (NS_FAILED(rv))
10492 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10493 0 : *vp = INT_TO_JSVAL((int32_t) result);
10494 0 : return JS_TRUE;
10495 : }
10496 :
10497 : static JSBool
10498 0 : nsIDOMMouseEvent_InitNSMouseEvent(JSContext *cx, unsigned argc, jsval *vp)
10499 : {
10500 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10501 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10502 0 : if (!obj)
10503 0 : return JS_FALSE;
10504 : nsIDOMMouseEvent *self;
10505 0 : xpc_qsSelfRef selfref;
10506 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10507 0 : return JS_FALSE;
10508 0 : if (argc < 17)
10509 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10510 0 : jsval *argv = JS_ARGV(cx, vp);
10511 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10512 : xpc_qsDOMString::eDefaultNullBehavior,
10513 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10514 0 : if (!arg0.IsValid())
10515 0 : return JS_FALSE;
10516 : JSBool arg1;
10517 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10518 : JSBool arg2;
10519 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10520 : nsresult rv;
10521 : nsIDOMWindow *arg3;
10522 0 : xpc_qsSelfRef arg3ref;
10523 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10524 0 : if (NS_FAILED(rv)) {
10525 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10526 0 : return JS_FALSE;
10527 : }
10528 : int32_t arg4;
10529 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
10530 0 : return JS_FALSE;
10531 : int32_t arg5;
10532 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
10533 0 : return JS_FALSE;
10534 : int32_t arg6;
10535 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
10536 0 : return JS_FALSE;
10537 : int32_t arg7;
10538 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
10539 0 : return JS_FALSE;
10540 : int32_t arg8;
10541 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
10542 0 : return JS_FALSE;
10543 : JSBool arg9;
10544 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
10545 : JSBool arg10;
10546 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
10547 : JSBool arg11;
10548 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
10549 : JSBool arg12;
10550 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
10551 : uint32_t arg13_u32;
10552 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
10553 0 : return JS_FALSE;
10554 0 : uint16_t arg13 = (uint16_t) arg13_u32;
10555 : nsIDOMEventTarget *arg14;
10556 0 : xpc_qsSelfRef arg14ref;
10557 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
10558 0 : if (NS_FAILED(rv)) {
10559 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
10560 0 : return JS_FALSE;
10561 : }
10562 : double arg15_dbl;
10563 0 : if (!JS_ValueToNumber(cx, argv[15], &arg15_dbl))
10564 0 : return JS_FALSE;
10565 0 : float arg15 = (float) arg15_dbl;
10566 : uint32_t arg16_u32;
10567 0 : if (!JS_ValueToECMAUint32(cx, argv[16], &arg16_u32))
10568 0 : return JS_FALSE;
10569 0 : uint16_t arg16 = (uint16_t) arg16_u32;
10570 0 : rv = self->InitNSMouseEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16);
10571 0 : if (NS_FAILED(rv))
10572 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10573 0 : *vp = JSVAL_VOID;
10574 0 : return JS_TRUE;
10575 : }
10576 :
10577 : // === interface nsIDOMKeyEvent
10578 :
10579 : static JSBool
10580 0 : nsIDOMKeyEvent_GetCharCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10581 : {
10582 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10583 : nsIDOMKeyEvent *self;
10584 0 : xpc_qsSelfRef selfref;
10585 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10586 0 : return JS_FALSE;
10587 : nsresult rv;
10588 : PRUint32 result;
10589 0 : rv = self->GetCharCode(&result);
10590 0 : if (NS_FAILED(rv))
10591 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10592 0 : *vp = UINT_TO_JSVAL(result);
10593 0 : return JS_TRUE;
10594 : }
10595 :
10596 : static JSBool
10597 0 : nsIDOMKeyEvent_GetKeyCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10598 : {
10599 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10600 : nsIDOMKeyEvent *self;
10601 0 : xpc_qsSelfRef selfref;
10602 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10603 0 : return JS_FALSE;
10604 : nsresult rv;
10605 : PRUint32 result;
10606 0 : rv = self->GetKeyCode(&result);
10607 0 : if (NS_FAILED(rv))
10608 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10609 0 : *vp = UINT_TO_JSVAL(result);
10610 0 : return JS_TRUE;
10611 : }
10612 :
10613 : static JSBool
10614 0 : nsIDOMKeyEvent_GetAltKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10615 : {
10616 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10617 : nsIDOMKeyEvent *self;
10618 0 : xpc_qsSelfRef selfref;
10619 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10620 0 : return JS_FALSE;
10621 : nsresult rv;
10622 : bool result;
10623 0 : rv = self->GetAltKey(&result);
10624 0 : if (NS_FAILED(rv))
10625 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10626 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10627 0 : return JS_TRUE;
10628 : }
10629 :
10630 : static JSBool
10631 0 : nsIDOMKeyEvent_GetCtrlKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10632 : {
10633 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10634 : nsIDOMKeyEvent *self;
10635 0 : xpc_qsSelfRef selfref;
10636 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10637 0 : return JS_FALSE;
10638 : nsresult rv;
10639 : bool result;
10640 0 : rv = self->GetCtrlKey(&result);
10641 0 : if (NS_FAILED(rv))
10642 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10643 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10644 0 : return JS_TRUE;
10645 : }
10646 :
10647 : static JSBool
10648 0 : nsIDOMKeyEvent_GetShiftKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10649 : {
10650 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10651 : nsIDOMKeyEvent *self;
10652 0 : xpc_qsSelfRef selfref;
10653 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10654 0 : return JS_FALSE;
10655 : nsresult rv;
10656 : bool result;
10657 0 : rv = self->GetShiftKey(&result);
10658 0 : if (NS_FAILED(rv))
10659 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10660 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10661 0 : return JS_TRUE;
10662 : }
10663 :
10664 : static JSBool
10665 0 : nsIDOMKeyEvent_GetMetaKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10666 : {
10667 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10668 : nsIDOMKeyEvent *self;
10669 0 : xpc_qsSelfRef selfref;
10670 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10671 0 : return JS_FALSE;
10672 : nsresult rv;
10673 : bool result;
10674 0 : rv = self->GetMetaKey(&result);
10675 0 : if (NS_FAILED(rv))
10676 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10677 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
10678 0 : return JS_TRUE;
10679 : }
10680 :
10681 : static JSBool
10682 0 : nsIDOMKeyEvent_InitKeyEvent(JSContext *cx, unsigned argc, jsval *vp)
10683 : {
10684 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10685 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10686 0 : if (!obj)
10687 0 : return JS_FALSE;
10688 : nsIDOMKeyEvent *self;
10689 0 : xpc_qsSelfRef selfref;
10690 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10691 0 : return JS_FALSE;
10692 0 : if (argc < 10)
10693 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10694 0 : jsval *argv = JS_ARGV(cx, vp);
10695 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10696 : xpc_qsDOMString::eDefaultNullBehavior,
10697 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10698 0 : if (!arg0.IsValid())
10699 0 : return JS_FALSE;
10700 : JSBool arg1;
10701 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10702 : JSBool arg2;
10703 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10704 : nsresult rv;
10705 : nsIDOMWindow *arg3;
10706 0 : xpc_qsSelfRef arg3ref;
10707 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10708 0 : if (NS_FAILED(rv)) {
10709 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10710 0 : return JS_FALSE;
10711 : }
10712 : JSBool arg4;
10713 0 : JS_ValueToBoolean(cx, argv[4], &arg4);
10714 : JSBool arg5;
10715 0 : JS_ValueToBoolean(cx, argv[5], &arg5);
10716 : JSBool arg6;
10717 0 : JS_ValueToBoolean(cx, argv[6], &arg6);
10718 : JSBool arg7;
10719 0 : JS_ValueToBoolean(cx, argv[7], &arg7);
10720 : uint32_t arg8;
10721 0 : if (!JS_ValueToECMAUint32(cx, argv[8], &arg8))
10722 0 : return JS_FALSE;
10723 : uint32_t arg9;
10724 0 : if (!JS_ValueToECMAUint32(cx, argv[9], &arg9))
10725 0 : return JS_FALSE;
10726 0 : rv = self->InitKeyEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
10727 0 : if (NS_FAILED(rv))
10728 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10729 0 : *vp = JSVAL_VOID;
10730 0 : return JS_TRUE;
10731 : }
10732 :
10733 : // === interface nsIDOMMutationEvent
10734 :
10735 : static JSBool
10736 0 : nsIDOMMutationEvent_GetRelatedNode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10737 : {
10738 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10739 0 : JSObject *callee = nsnull;
10740 : nsIDOMMutationEvent *self;
10741 0 : xpc_qsSelfRef selfref;
10742 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10743 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10744 0 : return JS_FALSE;
10745 : nsresult rv;
10746 0 : nsCOMPtr<nsIDOMNode> result;
10747 0 : rv = self->GetRelatedNode(getter_AddRefs(result));
10748 0 : if (NS_FAILED(rv))
10749 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10750 0 : if (!result) {
10751 0 : *vp = JSVAL_NULL;
10752 0 : return JS_TRUE;
10753 : }
10754 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10755 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10756 0 : return JS_TRUE;
10757 : }
10758 : // After this point do not use 'result'!
10759 0 : qsObjectHelper helper(result, cache);
10760 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
10761 : }
10762 :
10763 : static JSBool
10764 0 : nsIDOMMutationEvent_GetPrevValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10765 : {
10766 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10767 : nsIDOMMutationEvent *self;
10768 0 : xpc_qsSelfRef selfref;
10769 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10770 0 : return JS_FALSE;
10771 : nsresult rv;
10772 0 : nsString result;
10773 0 : rv = self->GetPrevValue(result);
10774 0 : if (NS_FAILED(rv))
10775 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10776 0 : return xpc::StringToJsval(cx, result, vp);
10777 : }
10778 :
10779 : static JSBool
10780 0 : nsIDOMMutationEvent_GetNewValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10781 : {
10782 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10783 : nsIDOMMutationEvent *self;
10784 0 : xpc_qsSelfRef selfref;
10785 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10786 0 : return JS_FALSE;
10787 : nsresult rv;
10788 0 : nsString result;
10789 0 : rv = self->GetNewValue(result);
10790 0 : if (NS_FAILED(rv))
10791 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10792 0 : return xpc::StringToJsval(cx, result, vp);
10793 : }
10794 :
10795 : static JSBool
10796 0 : nsIDOMMutationEvent_GetAttrName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10797 : {
10798 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10799 : nsIDOMMutationEvent *self;
10800 0 : xpc_qsSelfRef selfref;
10801 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10802 0 : return JS_FALSE;
10803 : nsresult rv;
10804 0 : nsString result;
10805 0 : rv = self->GetAttrName(result);
10806 0 : if (NS_FAILED(rv))
10807 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10808 0 : return xpc::StringToJsval(cx, result, vp);
10809 : }
10810 :
10811 : static JSBool
10812 0 : nsIDOMMutationEvent_GetAttrChange(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10813 : {
10814 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10815 : nsIDOMMutationEvent *self;
10816 0 : xpc_qsSelfRef selfref;
10817 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
10818 0 : return JS_FALSE;
10819 : nsresult rv;
10820 : PRUint16 result;
10821 0 : rv = self->GetAttrChange(&result);
10822 0 : if (NS_FAILED(rv))
10823 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10824 0 : *vp = INT_TO_JSVAL((int32_t) result);
10825 0 : return JS_TRUE;
10826 : }
10827 :
10828 : static JSBool
10829 0 : nsIDOMMutationEvent_InitMutationEvent(JSContext *cx, unsigned argc, jsval *vp)
10830 : {
10831 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10832 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10833 0 : if (!obj)
10834 0 : return JS_FALSE;
10835 : nsIDOMMutationEvent *self;
10836 0 : xpc_qsSelfRef selfref;
10837 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10838 0 : return JS_FALSE;
10839 0 : if (argc < 8)
10840 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10841 0 : jsval *argv = JS_ARGV(cx, vp);
10842 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10843 : xpc_qsDOMString::eDefaultNullBehavior,
10844 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10845 0 : if (!arg0.IsValid())
10846 0 : return JS_FALSE;
10847 : JSBool arg1;
10848 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10849 : JSBool arg2;
10850 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10851 : nsresult rv;
10852 : nsIDOMNode *arg3;
10853 0 : xpc_qsSelfRef arg3ref;
10854 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10855 0 : if (NS_FAILED(rv)) {
10856 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10857 0 : return JS_FALSE;
10858 : }
10859 0 : xpc_qsDOMString arg4(cx, argv[4], &argv[4],
10860 : xpc_qsDOMString::eDefaultNullBehavior,
10861 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10862 0 : if (!arg4.IsValid())
10863 0 : return JS_FALSE;
10864 0 : xpc_qsDOMString arg5(cx, argv[5], &argv[5],
10865 : xpc_qsDOMString::eDefaultNullBehavior,
10866 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10867 0 : if (!arg5.IsValid())
10868 0 : return JS_FALSE;
10869 0 : xpc_qsDOMString arg6(cx, argv[6], &argv[6],
10870 : xpc_qsDOMString::eDefaultNullBehavior,
10871 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10872 0 : if (!arg6.IsValid())
10873 0 : return JS_FALSE;
10874 : uint32_t arg7_u32;
10875 0 : if (!JS_ValueToECMAUint32(cx, argv[7], &arg7_u32))
10876 0 : return JS_FALSE;
10877 0 : uint16_t arg7 = (uint16_t) arg7_u32;
10878 0 : rv = self->InitMutationEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
10879 0 : if (NS_FAILED(rv))
10880 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10881 0 : *vp = JSVAL_VOID;
10882 0 : return JS_TRUE;
10883 : }
10884 :
10885 : // === interface nsIDOMDragEvent
10886 :
10887 : static JSBool
10888 0 : nsIDOMDragEvent_GetDataTransfer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10889 : {
10890 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10891 0 : JSObject *callee = nsnull;
10892 : nsIDOMDragEvent *self;
10893 0 : xpc_qsSelfRef selfref;
10894 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
10895 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
10896 0 : return JS_FALSE;
10897 : nsresult rv;
10898 0 : nsCOMPtr<nsIDOMDataTransfer> result;
10899 0 : rv = self->GetDataTransfer(getter_AddRefs(result));
10900 0 : if (NS_FAILED(rv))
10901 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
10902 0 : if (!result) {
10903 0 : *vp = JSVAL_NULL;
10904 0 : return JS_TRUE;
10905 : }
10906 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
10907 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
10908 0 : return JS_TRUE;
10909 : }
10910 : // After this point do not use 'result'!
10911 0 : qsObjectHelper helper(result, cache);
10912 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDataTransfer), &interfaces[k_nsIDOMDataTransfer], vp);
10913 : }
10914 :
10915 : static JSBool
10916 0 : nsIDOMDragEvent_InitDragEvent(JSContext *cx, unsigned argc, jsval *vp)
10917 : {
10918 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
10919 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
10920 0 : if (!obj)
10921 0 : return JS_FALSE;
10922 : nsIDOMDragEvent *self;
10923 0 : xpc_qsSelfRef selfref;
10924 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
10925 0 : return JS_FALSE;
10926 0 : if (argc < 16)
10927 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
10928 0 : jsval *argv = JS_ARGV(cx, vp);
10929 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
10930 : xpc_qsDOMString::eDefaultNullBehavior,
10931 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
10932 0 : if (!arg0.IsValid())
10933 0 : return JS_FALSE;
10934 : JSBool arg1;
10935 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
10936 : JSBool arg2;
10937 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
10938 : nsresult rv;
10939 : nsIDOMWindow *arg3;
10940 0 : xpc_qsSelfRef arg3ref;
10941 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
10942 0 : if (NS_FAILED(rv)) {
10943 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
10944 0 : return JS_FALSE;
10945 : }
10946 : int32_t arg4;
10947 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
10948 0 : return JS_FALSE;
10949 : int32_t arg5;
10950 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
10951 0 : return JS_FALSE;
10952 : int32_t arg6;
10953 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
10954 0 : return JS_FALSE;
10955 : int32_t arg7;
10956 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
10957 0 : return JS_FALSE;
10958 : int32_t arg8;
10959 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
10960 0 : return JS_FALSE;
10961 : JSBool arg9;
10962 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
10963 : JSBool arg10;
10964 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
10965 : JSBool arg11;
10966 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
10967 : JSBool arg12;
10968 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
10969 : uint32_t arg13_u32;
10970 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
10971 0 : return JS_FALSE;
10972 0 : uint16_t arg13 = (uint16_t) arg13_u32;
10973 : nsIDOMEventTarget *arg14;
10974 0 : xpc_qsSelfRef arg14ref;
10975 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
10976 0 : if (NS_FAILED(rv)) {
10977 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
10978 0 : return JS_FALSE;
10979 : }
10980 : nsIDOMDataTransfer *arg15;
10981 0 : xpc_qsSelfRef arg15ref;
10982 0 : rv = xpc_qsUnwrapArg<nsIDOMDataTransfer>(cx, argv[15], &arg15, &arg15ref.ptr, &argv[15]);
10983 0 : if (NS_FAILED(rv)) {
10984 0 : xpc_qsThrowBadArg(cx, rv, vp, 15);
10985 0 : return JS_FALSE;
10986 : }
10987 0 : rv = self->InitDragEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15);
10988 0 : if (NS_FAILED(rv))
10989 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
10990 0 : *vp = JSVAL_VOID;
10991 0 : return JS_TRUE;
10992 : }
10993 :
10994 : // === interface nsIDOMScrollAreaEvent
10995 :
10996 : static JSBool
10997 0 : nsIDOMScrollAreaEvent_GetX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
10998 : {
10999 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11000 : nsIDOMScrollAreaEvent *self;
11001 0 : xpc_qsSelfRef selfref;
11002 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11003 0 : return JS_FALSE;
11004 : nsresult rv;
11005 : float result;
11006 0 : rv = self->GetX(&result);
11007 0 : if (NS_FAILED(rv))
11008 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11009 0 : return JS_NewNumberValue(cx, result, vp);
11010 : }
11011 :
11012 : static JSBool
11013 0 : nsIDOMScrollAreaEvent_GetY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11014 : {
11015 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11016 : nsIDOMScrollAreaEvent *self;
11017 0 : xpc_qsSelfRef selfref;
11018 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11019 0 : return JS_FALSE;
11020 : nsresult rv;
11021 : float result;
11022 0 : rv = self->GetY(&result);
11023 0 : if (NS_FAILED(rv))
11024 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11025 0 : return JS_NewNumberValue(cx, result, vp);
11026 : }
11027 :
11028 : static JSBool
11029 0 : nsIDOMScrollAreaEvent_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11030 : {
11031 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11032 : nsIDOMScrollAreaEvent *self;
11033 0 : xpc_qsSelfRef selfref;
11034 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11035 0 : return JS_FALSE;
11036 : nsresult rv;
11037 : float result;
11038 0 : rv = self->GetWidth(&result);
11039 0 : if (NS_FAILED(rv))
11040 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11041 0 : return JS_NewNumberValue(cx, result, vp);
11042 : }
11043 :
11044 : static JSBool
11045 0 : nsIDOMScrollAreaEvent_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11046 : {
11047 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11048 : nsIDOMScrollAreaEvent *self;
11049 0 : xpc_qsSelfRef selfref;
11050 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11051 0 : return JS_FALSE;
11052 : nsresult rv;
11053 : float result;
11054 0 : rv = self->GetHeight(&result);
11055 0 : if (NS_FAILED(rv))
11056 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11057 0 : return JS_NewNumberValue(cx, result, vp);
11058 : }
11059 :
11060 : static JSBool
11061 0 : nsIDOMScrollAreaEvent_InitScrollAreaEvent(JSContext *cx, unsigned argc, jsval *vp)
11062 : {
11063 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11064 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11065 0 : if (!obj)
11066 0 : return JS_FALSE;
11067 : nsIDOMScrollAreaEvent *self;
11068 0 : xpc_qsSelfRef selfref;
11069 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11070 0 : return JS_FALSE;
11071 0 : if (argc < 9)
11072 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11073 0 : jsval *argv = JS_ARGV(cx, vp);
11074 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
11075 : xpc_qsDOMString::eDefaultNullBehavior,
11076 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11077 0 : if (!arg0.IsValid())
11078 0 : return JS_FALSE;
11079 : JSBool arg1;
11080 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
11081 : JSBool arg2;
11082 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
11083 : nsresult rv;
11084 : nsIDOMWindow *arg3;
11085 0 : xpc_qsSelfRef arg3ref;
11086 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
11087 0 : if (NS_FAILED(rv)) {
11088 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
11089 0 : return JS_FALSE;
11090 : }
11091 : int32_t arg4;
11092 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
11093 0 : return JS_FALSE;
11094 : double arg5_dbl;
11095 0 : if (!JS_ValueToNumber(cx, argv[5], &arg5_dbl))
11096 0 : return JS_FALSE;
11097 0 : float arg5 = (float) arg5_dbl;
11098 : double arg6_dbl;
11099 0 : if (!JS_ValueToNumber(cx, argv[6], &arg6_dbl))
11100 0 : return JS_FALSE;
11101 0 : float arg6 = (float) arg6_dbl;
11102 : double arg7_dbl;
11103 0 : if (!JS_ValueToNumber(cx, argv[7], &arg7_dbl))
11104 0 : return JS_FALSE;
11105 0 : float arg7 = (float) arg7_dbl;
11106 : double arg8_dbl;
11107 0 : if (!JS_ValueToNumber(cx, argv[8], &arg8_dbl))
11108 0 : return JS_FALSE;
11109 0 : float arg8 = (float) arg8_dbl;
11110 0 : rv = self->InitScrollAreaEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
11111 0 : if (NS_FAILED(rv))
11112 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11113 0 : *vp = JSVAL_VOID;
11114 0 : return JS_TRUE;
11115 : }
11116 :
11117 : // === interface nsIDOMNotifyPaintEvent
11118 :
11119 : static JSBool
11120 0 : nsIDOMNotifyPaintEvent_GetClientRects(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11121 : {
11122 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11123 0 : JSObject *callee = nsnull;
11124 : nsIDOMNotifyPaintEvent *self;
11125 0 : xpc_qsSelfRef selfref;
11126 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11127 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11128 0 : return JS_FALSE;
11129 : nsresult rv;
11130 0 : nsCOMPtr<nsIDOMClientRectList> result;
11131 0 : rv = self->GetClientRects(getter_AddRefs(result));
11132 0 : if (NS_FAILED(rv))
11133 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11134 0 : if (!result) {
11135 0 : *vp = JSVAL_NULL;
11136 0 : return JS_TRUE;
11137 : }
11138 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11139 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11140 0 : return JS_TRUE;
11141 : }
11142 : // After this point do not use 'result'!
11143 0 : qsObjectHelper helper(result, cache);
11144 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRectList), &interfaces[k_nsIDOMClientRectList], vp);
11145 : }
11146 :
11147 : static JSBool
11148 0 : nsIDOMNotifyPaintEvent_GetBoundingClientRect(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11149 : {
11150 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11151 0 : JSObject *callee = nsnull;
11152 : nsIDOMNotifyPaintEvent *self;
11153 0 : xpc_qsSelfRef selfref;
11154 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11155 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11156 0 : return JS_FALSE;
11157 : nsresult rv;
11158 0 : nsCOMPtr<nsIDOMClientRect> result;
11159 0 : rv = self->GetBoundingClientRect(getter_AddRefs(result));
11160 0 : if (NS_FAILED(rv))
11161 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11162 0 : if (!result) {
11163 0 : *vp = JSVAL_NULL;
11164 0 : return JS_TRUE;
11165 : }
11166 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11167 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11168 0 : return JS_TRUE;
11169 : }
11170 : // After this point do not use 'result'!
11171 0 : qsObjectHelper helper(result, cache);
11172 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
11173 : }
11174 :
11175 : static JSBool
11176 0 : nsIDOMNotifyPaintEvent_GetPaintRequests(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11177 : {
11178 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11179 0 : JSObject *callee = nsnull;
11180 : nsIDOMNotifyPaintEvent *self;
11181 0 : xpc_qsSelfRef selfref;
11182 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11183 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11184 0 : return JS_FALSE;
11185 : nsresult rv;
11186 0 : nsCOMPtr<nsIDOMPaintRequestList> result;
11187 0 : rv = self->GetPaintRequests(getter_AddRefs(result));
11188 0 : if (NS_FAILED(rv))
11189 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11190 0 : if (!result) {
11191 0 : *vp = JSVAL_NULL;
11192 0 : return JS_TRUE;
11193 : }
11194 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11195 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11196 0 : return JS_TRUE;
11197 : }
11198 : // After this point do not use 'result'!
11199 0 : qsObjectHelper helper(result, cache);
11200 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMPaintRequestList), &interfaces[k_nsIDOMPaintRequestList], vp);
11201 : }
11202 :
11203 : // === interface nsIDOMMessageEvent
11204 :
11205 : static JSBool
11206 0 : nsIDOMMessageEvent_GetData(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11207 : {
11208 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11209 : nsIDOMMessageEvent *self;
11210 0 : xpc_qsSelfRef selfref;
11211 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11212 0 : return JS_FALSE;
11213 : nsresult rv;
11214 0 : rv = self->GetData(cx, vp);
11215 0 : if (NS_FAILED(rv))
11216 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11217 0 : return JS_TRUE;
11218 : }
11219 :
11220 : static JSBool
11221 0 : nsIDOMMessageEvent_GetOrigin(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11222 : {
11223 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11224 : nsIDOMMessageEvent *self;
11225 0 : xpc_qsSelfRef selfref;
11226 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11227 0 : return JS_FALSE;
11228 : nsresult rv;
11229 0 : nsString result;
11230 0 : rv = self->GetOrigin(result);
11231 0 : if (NS_FAILED(rv))
11232 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11233 0 : return xpc::StringToJsval(cx, result, vp);
11234 : }
11235 :
11236 : static JSBool
11237 0 : nsIDOMMessageEvent_GetLastEventId(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11238 : {
11239 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11240 : nsIDOMMessageEvent *self;
11241 0 : xpc_qsSelfRef selfref;
11242 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11243 0 : return JS_FALSE;
11244 : nsresult rv;
11245 0 : nsString result;
11246 0 : rv = self->GetLastEventId(result);
11247 0 : if (NS_FAILED(rv))
11248 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11249 0 : return xpc::StringToJsval(cx, result, vp);
11250 : }
11251 :
11252 : static JSBool
11253 0 : nsIDOMMessageEvent_GetSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11254 : {
11255 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11256 0 : JSObject *callee = nsnull;
11257 : nsIDOMMessageEvent *self;
11258 0 : xpc_qsSelfRef selfref;
11259 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11260 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11261 0 : return JS_FALSE;
11262 : nsresult rv;
11263 0 : nsCOMPtr<nsIDOMWindow> result;
11264 0 : rv = self->GetSource(getter_AddRefs(result));
11265 0 : if (NS_FAILED(rv))
11266 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11267 0 : if (!result) {
11268 0 : *vp = JSVAL_NULL;
11269 0 : return JS_TRUE;
11270 : }
11271 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11272 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11273 0 : return JS_TRUE;
11274 : }
11275 : // After this point do not use 'result'!
11276 0 : qsObjectHelper helper(result, cache);
11277 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
11278 : }
11279 :
11280 : static JSBool
11281 0 : nsIDOMMessageEvent_InitMessageEvent(JSContext *cx, unsigned argc, jsval *vp)
11282 : {
11283 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11284 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11285 0 : if (!obj)
11286 0 : return JS_FALSE;
11287 : nsIDOMMessageEvent *self;
11288 0 : xpc_qsSelfRef selfref;
11289 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11290 0 : return JS_FALSE;
11291 0 : if (argc < 7)
11292 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11293 0 : jsval *argv = JS_ARGV(cx, vp);
11294 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
11295 : xpc_qsDOMString::eDefaultNullBehavior,
11296 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11297 0 : if (!arg0.IsValid())
11298 0 : return JS_FALSE;
11299 : JSBool arg1;
11300 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
11301 : JSBool arg2;
11302 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
11303 0 : jsval arg3 = argv[3];
11304 0 : xpc_qsDOMString arg4(cx, argv[4], &argv[4],
11305 : xpc_qsDOMString::eDefaultNullBehavior,
11306 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11307 0 : if (!arg4.IsValid())
11308 0 : return JS_FALSE;
11309 0 : xpc_qsDOMString arg5(cx, argv[5], &argv[5],
11310 : xpc_qsDOMString::eDefaultNullBehavior,
11311 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11312 0 : if (!arg5.IsValid())
11313 0 : return JS_FALSE;
11314 : nsresult rv;
11315 : nsIDOMWindow *arg6;
11316 0 : xpc_qsSelfRef arg6ref;
11317 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[6], &arg6, &arg6ref.ptr, &argv[6]);
11318 0 : if (NS_FAILED(rv)) {
11319 0 : xpc_qsThrowBadArg(cx, rv, vp, 6);
11320 0 : return JS_FALSE;
11321 : }
11322 0 : rv = self->InitMessageEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
11323 0 : if (NS_FAILED(rv))
11324 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11325 0 : *vp = JSVAL_VOID;
11326 0 : return JS_TRUE;
11327 : }
11328 :
11329 : // === interface nsIDOMMouseScrollEvent
11330 :
11331 : static JSBool
11332 0 : nsIDOMMouseScrollEvent_GetAxis(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11333 : {
11334 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11335 : nsIDOMMouseScrollEvent *self;
11336 0 : xpc_qsSelfRef selfref;
11337 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11338 0 : return JS_FALSE;
11339 : nsresult rv;
11340 : PRInt32 result;
11341 0 : rv = self->GetAxis(&result);
11342 0 : if (NS_FAILED(rv))
11343 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11344 0 : *vp = INT_TO_JSVAL(result);
11345 0 : return JS_TRUE;
11346 : }
11347 :
11348 : static JSBool
11349 0 : nsIDOMMouseScrollEvent_InitMouseScrollEvent(JSContext *cx, unsigned argc, jsval *vp)
11350 : {
11351 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11352 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11353 0 : if (!obj)
11354 0 : return JS_FALSE;
11355 : nsIDOMMouseScrollEvent *self;
11356 0 : xpc_qsSelfRef selfref;
11357 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11358 0 : return JS_FALSE;
11359 0 : if (argc < 16)
11360 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11361 0 : jsval *argv = JS_ARGV(cx, vp);
11362 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
11363 : xpc_qsDOMString::eDefaultNullBehavior,
11364 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
11365 0 : if (!arg0.IsValid())
11366 0 : return JS_FALSE;
11367 : JSBool arg1;
11368 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
11369 : JSBool arg2;
11370 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
11371 : nsresult rv;
11372 : nsIDOMWindow *arg3;
11373 0 : xpc_qsSelfRef arg3ref;
11374 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
11375 0 : if (NS_FAILED(rv)) {
11376 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
11377 0 : return JS_FALSE;
11378 : }
11379 : int32_t arg4;
11380 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
11381 0 : return JS_FALSE;
11382 : int32_t arg5;
11383 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
11384 0 : return JS_FALSE;
11385 : int32_t arg6;
11386 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
11387 0 : return JS_FALSE;
11388 : int32_t arg7;
11389 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
11390 0 : return JS_FALSE;
11391 : int32_t arg8;
11392 0 : if (!JS_ValueToECMAInt32(cx, argv[8], &arg8))
11393 0 : return JS_FALSE;
11394 : JSBool arg9;
11395 0 : JS_ValueToBoolean(cx, argv[9], &arg9);
11396 : JSBool arg10;
11397 0 : JS_ValueToBoolean(cx, argv[10], &arg10);
11398 : JSBool arg11;
11399 0 : JS_ValueToBoolean(cx, argv[11], &arg11);
11400 : JSBool arg12;
11401 0 : JS_ValueToBoolean(cx, argv[12], &arg12);
11402 : uint32_t arg13_u32;
11403 0 : if (!JS_ValueToECMAUint32(cx, argv[13], &arg13_u32))
11404 0 : return JS_FALSE;
11405 0 : uint16_t arg13 = (uint16_t) arg13_u32;
11406 : nsIDOMEventTarget *arg14;
11407 0 : xpc_qsSelfRef arg14ref;
11408 0 : rv = xpc_qsUnwrapArg<nsIDOMEventTarget>(cx, argv[14], &arg14, &arg14ref.ptr, &argv[14]);
11409 0 : if (NS_FAILED(rv)) {
11410 0 : xpc_qsThrowBadArg(cx, rv, vp, 14);
11411 0 : return JS_FALSE;
11412 : }
11413 : int32_t arg15;
11414 0 : if (!JS_ValueToECMAInt32(cx, argv[15], &arg15))
11415 0 : return JS_FALSE;
11416 0 : rv = self->InitMouseScrollEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15);
11417 0 : if (NS_FAILED(rv))
11418 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11419 0 : *vp = JSVAL_VOID;
11420 0 : return JS_TRUE;
11421 : }
11422 :
11423 : // === interface nsIDOMProgressEvent
11424 :
11425 : static JSBool
11426 0 : nsIDOMProgressEvent_GetLengthComputable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11427 : {
11428 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11429 : nsIDOMProgressEvent *self;
11430 0 : xpc_qsSelfRef selfref;
11431 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11432 0 : return JS_FALSE;
11433 : nsresult rv;
11434 : bool result;
11435 0 : rv = self->GetLengthComputable(&result);
11436 0 : if (NS_FAILED(rv))
11437 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11438 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
11439 0 : return JS_TRUE;
11440 : }
11441 :
11442 : static JSBool
11443 0 : nsIDOMProgressEvent_GetLoaded(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11444 : {
11445 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11446 : nsIDOMProgressEvent *self;
11447 0 : xpc_qsSelfRef selfref;
11448 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11449 0 : return JS_FALSE;
11450 : nsresult rv;
11451 : PRUint64 result;
11452 0 : rv = self->GetLoaded(&result);
11453 0 : if (NS_FAILED(rv))
11454 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11455 0 : return xpc_qsUint64ToJsval(cx, result, vp);
11456 : }
11457 :
11458 : static JSBool
11459 0 : nsIDOMProgressEvent_GetTotal(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11460 : {
11461 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11462 : nsIDOMProgressEvent *self;
11463 0 : xpc_qsSelfRef selfref;
11464 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11465 0 : return JS_FALSE;
11466 : nsresult rv;
11467 : PRUint64 result;
11468 0 : rv = self->GetTotal(&result);
11469 0 : if (NS_FAILED(rv))
11470 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11471 0 : return xpc_qsUint64ToJsval(cx, result, vp);
11472 : }
11473 :
11474 : // === interface nsIDOMNSEvent
11475 :
11476 : static JSBool
11477 0 : nsIDOMNSEvent_GetOriginalTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11478 : {
11479 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11480 0 : JSObject *callee = nsnull;
11481 : nsIDOMNSEvent *self;
11482 0 : xpc_qsSelfRef selfref;
11483 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11484 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11485 0 : return JS_FALSE;
11486 : nsresult rv;
11487 0 : nsCOMPtr<nsIDOMEventTarget> result;
11488 0 : rv = self->GetOriginalTarget(getter_AddRefs(result));
11489 0 : if (NS_FAILED(rv))
11490 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11491 0 : if (!result) {
11492 0 : *vp = JSVAL_NULL;
11493 0 : return JS_TRUE;
11494 : }
11495 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11496 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11497 0 : return JS_TRUE;
11498 : }
11499 : // After this point do not use 'result'!
11500 0 : qsObjectHelper helper(result, cache);
11501 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
11502 : }
11503 :
11504 : static JSBool
11505 0 : nsIDOMNSEvent_GetPreventDefault(JSContext *cx, unsigned argc, jsval *vp)
11506 : {
11507 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11508 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11509 0 : if (!obj)
11510 0 : return JS_FALSE;
11511 : nsIDOMNSEvent *self;
11512 0 : xpc_qsSelfRef selfref;
11513 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
11514 0 : return JS_FALSE;
11515 : nsresult rv;
11516 : bool result;
11517 0 : rv = self->GetPreventDefault(&result);
11518 0 : if (NS_FAILED(rv))
11519 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11520 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
11521 0 : return JS_TRUE;
11522 : }
11523 :
11524 : // === interface nsIDOMUIEvent
11525 :
11526 : static JSBool
11527 0 : nsIDOMUIEvent_GetWhich(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11528 : {
11529 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11530 : nsIDOMUIEvent *self;
11531 0 : xpc_qsSelfRef selfref;
11532 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11533 0 : return JS_FALSE;
11534 : nsresult rv;
11535 : PRUint32 result;
11536 0 : rv = self->GetWhich(&result);
11537 0 : if (NS_FAILED(rv))
11538 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11539 0 : *vp = UINT_TO_JSVAL(result);
11540 0 : return JS_TRUE;
11541 : }
11542 :
11543 : static JSBool
11544 0 : nsIDOMUIEvent_GetRangeParent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11545 : {
11546 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11547 0 : JSObject *callee = nsnull;
11548 : nsIDOMUIEvent *self;
11549 0 : xpc_qsSelfRef selfref;
11550 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11551 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11552 0 : return JS_FALSE;
11553 : nsresult rv;
11554 0 : nsCOMPtr<nsIDOMNode> result;
11555 0 : rv = self->GetRangeParent(getter_AddRefs(result));
11556 0 : if (NS_FAILED(rv))
11557 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11558 0 : if (!result) {
11559 0 : *vp = JSVAL_NULL;
11560 0 : return JS_TRUE;
11561 : }
11562 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11563 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11564 0 : return JS_TRUE;
11565 : }
11566 : // After this point do not use 'result'!
11567 0 : qsObjectHelper helper(result, cache);
11568 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
11569 : }
11570 :
11571 : static JSBool
11572 0 : nsIDOMUIEvent_GetRangeOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11573 : {
11574 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11575 : nsIDOMUIEvent *self;
11576 0 : xpc_qsSelfRef selfref;
11577 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11578 0 : return JS_FALSE;
11579 : nsresult rv;
11580 : PRInt32 result;
11581 0 : rv = self->GetRangeOffset(&result);
11582 0 : if (NS_FAILED(rv))
11583 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11584 0 : *vp = INT_TO_JSVAL(result);
11585 0 : return JS_TRUE;
11586 : }
11587 :
11588 : static JSBool
11589 0 : nsIDOMUIEvent_GetPageX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11590 : {
11591 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11592 : nsIDOMUIEvent *self;
11593 0 : xpc_qsSelfRef selfref;
11594 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11595 0 : return JS_FALSE;
11596 : nsresult rv;
11597 : PRInt32 result;
11598 0 : rv = self->GetPageX(&result);
11599 0 : if (NS_FAILED(rv))
11600 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11601 0 : *vp = INT_TO_JSVAL(result);
11602 0 : return JS_TRUE;
11603 : }
11604 :
11605 : static JSBool
11606 0 : nsIDOMUIEvent_GetPageY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11607 : {
11608 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11609 : nsIDOMUIEvent *self;
11610 0 : xpc_qsSelfRef selfref;
11611 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11612 0 : return JS_FALSE;
11613 : nsresult rv;
11614 : PRInt32 result;
11615 0 : rv = self->GetPageY(&result);
11616 0 : if (NS_FAILED(rv))
11617 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11618 0 : *vp = INT_TO_JSVAL(result);
11619 0 : return JS_TRUE;
11620 : }
11621 :
11622 : static JSBool
11623 0 : nsIDOMUIEvent_GetIsChar(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11624 : {
11625 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11626 : nsIDOMUIEvent *self;
11627 0 : xpc_qsSelfRef selfref;
11628 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11629 0 : return JS_FALSE;
11630 : nsresult rv;
11631 : bool result;
11632 0 : rv = self->GetIsChar(&result);
11633 0 : if (NS_FAILED(rv))
11634 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11635 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
11636 0 : return JS_TRUE;
11637 : }
11638 :
11639 : // === interface nsIDOMTouch
11640 :
11641 : static JSBool
11642 0 : nsIDOMTouch_GetIdentifier(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11643 : {
11644 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11645 : nsIDOMTouch *self;
11646 0 : xpc_qsSelfRef selfref;
11647 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11648 0 : return JS_FALSE;
11649 : nsresult rv;
11650 : PRInt32 result;
11651 0 : rv = self->GetIdentifier(&result);
11652 0 : if (NS_FAILED(rv))
11653 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11654 0 : *vp = INT_TO_JSVAL(result);
11655 0 : return JS_TRUE;
11656 : }
11657 :
11658 : static JSBool
11659 0 : nsIDOMTouch_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11660 : {
11661 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11662 0 : JSObject *callee = nsnull;
11663 : nsIDOMTouch *self;
11664 0 : xpc_qsSelfRef selfref;
11665 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11666 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11667 0 : return JS_FALSE;
11668 : nsresult rv;
11669 0 : nsCOMPtr<nsIDOMEventTarget> result;
11670 0 : rv = self->GetTarget(getter_AddRefs(result));
11671 0 : if (NS_FAILED(rv))
11672 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11673 0 : if (!result) {
11674 0 : *vp = JSVAL_NULL;
11675 0 : return JS_TRUE;
11676 : }
11677 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11678 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11679 0 : return JS_TRUE;
11680 : }
11681 : // After this point do not use 'result'!
11682 0 : qsObjectHelper helper(result, cache);
11683 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventTarget), &interfaces[k_nsIDOMEventTarget], vp);
11684 : }
11685 :
11686 : static JSBool
11687 0 : nsIDOMTouch_GetPageX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11688 : {
11689 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11690 : nsIDOMTouch *self;
11691 0 : xpc_qsSelfRef selfref;
11692 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11693 0 : return JS_FALSE;
11694 : nsresult rv;
11695 : PRInt32 result;
11696 0 : rv = self->GetPageX(&result);
11697 0 : if (NS_FAILED(rv))
11698 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11699 0 : *vp = INT_TO_JSVAL(result);
11700 0 : return JS_TRUE;
11701 : }
11702 :
11703 : static JSBool
11704 0 : nsIDOMTouch_GetPageY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11705 : {
11706 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11707 : nsIDOMTouch *self;
11708 0 : xpc_qsSelfRef selfref;
11709 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11710 0 : return JS_FALSE;
11711 : nsresult rv;
11712 : PRInt32 result;
11713 0 : rv = self->GetPageY(&result);
11714 0 : if (NS_FAILED(rv))
11715 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11716 0 : *vp = INT_TO_JSVAL(result);
11717 0 : return JS_TRUE;
11718 : }
11719 :
11720 : static JSBool
11721 0 : nsIDOMTouch_GetScreenX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11722 : {
11723 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11724 : nsIDOMTouch *self;
11725 0 : xpc_qsSelfRef selfref;
11726 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11727 0 : return JS_FALSE;
11728 : nsresult rv;
11729 : PRInt32 result;
11730 0 : rv = self->GetScreenX(&result);
11731 0 : if (NS_FAILED(rv))
11732 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11733 0 : *vp = INT_TO_JSVAL(result);
11734 0 : return JS_TRUE;
11735 : }
11736 :
11737 : static JSBool
11738 0 : nsIDOMTouch_GetScreenY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11739 : {
11740 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11741 : nsIDOMTouch *self;
11742 0 : xpc_qsSelfRef selfref;
11743 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11744 0 : return JS_FALSE;
11745 : nsresult rv;
11746 : PRInt32 result;
11747 0 : rv = self->GetScreenY(&result);
11748 0 : if (NS_FAILED(rv))
11749 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11750 0 : *vp = INT_TO_JSVAL(result);
11751 0 : return JS_TRUE;
11752 : }
11753 :
11754 : static JSBool
11755 0 : nsIDOMTouch_GetClientX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11756 : {
11757 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11758 : nsIDOMTouch *self;
11759 0 : xpc_qsSelfRef selfref;
11760 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11761 0 : return JS_FALSE;
11762 : nsresult rv;
11763 : PRInt32 result;
11764 0 : rv = self->GetClientX(&result);
11765 0 : if (NS_FAILED(rv))
11766 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11767 0 : *vp = INT_TO_JSVAL(result);
11768 0 : return JS_TRUE;
11769 : }
11770 :
11771 : static JSBool
11772 0 : nsIDOMTouch_GetClientY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11773 : {
11774 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11775 : nsIDOMTouch *self;
11776 0 : xpc_qsSelfRef selfref;
11777 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11778 0 : return JS_FALSE;
11779 : nsresult rv;
11780 : PRInt32 result;
11781 0 : rv = self->GetClientY(&result);
11782 0 : if (NS_FAILED(rv))
11783 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11784 0 : *vp = INT_TO_JSVAL(result);
11785 0 : return JS_TRUE;
11786 : }
11787 :
11788 : static JSBool
11789 0 : nsIDOMTouch_GetRadiusX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11790 : {
11791 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11792 : nsIDOMTouch *self;
11793 0 : xpc_qsSelfRef selfref;
11794 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11795 0 : return JS_FALSE;
11796 : nsresult rv;
11797 : PRInt32 result;
11798 0 : rv = self->GetRadiusX(&result);
11799 0 : if (NS_FAILED(rv))
11800 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11801 0 : *vp = INT_TO_JSVAL(result);
11802 0 : return JS_TRUE;
11803 : }
11804 :
11805 : static JSBool
11806 0 : nsIDOMTouch_GetRadiusY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11807 : {
11808 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11809 : nsIDOMTouch *self;
11810 0 : xpc_qsSelfRef selfref;
11811 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11812 0 : return JS_FALSE;
11813 : nsresult rv;
11814 : PRInt32 result;
11815 0 : rv = self->GetRadiusY(&result);
11816 0 : if (NS_FAILED(rv))
11817 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11818 0 : *vp = INT_TO_JSVAL(result);
11819 0 : return JS_TRUE;
11820 : }
11821 :
11822 : static JSBool
11823 0 : nsIDOMTouch_GetRotationAngle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11824 : {
11825 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11826 : nsIDOMTouch *self;
11827 0 : xpc_qsSelfRef selfref;
11828 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11829 0 : return JS_FALSE;
11830 : nsresult rv;
11831 : float result;
11832 0 : rv = self->GetRotationAngle(&result);
11833 0 : if (NS_FAILED(rv))
11834 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11835 0 : return JS_NewNumberValue(cx, result, vp);
11836 : }
11837 :
11838 : static JSBool
11839 0 : nsIDOMTouch_GetForce(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11840 : {
11841 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11842 : nsIDOMTouch *self;
11843 0 : xpc_qsSelfRef selfref;
11844 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11845 0 : return JS_FALSE;
11846 : nsresult rv;
11847 : float result;
11848 0 : rv = self->GetForce(&result);
11849 0 : if (NS_FAILED(rv))
11850 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11851 0 : return JS_NewNumberValue(cx, result, vp);
11852 : }
11853 :
11854 : // === interface nsIDOMTouchList
11855 :
11856 : static JSBool
11857 0 : nsIDOMTouchList_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11858 : {
11859 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11860 : nsIDOMTouchList *self;
11861 0 : xpc_qsSelfRef selfref;
11862 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
11863 0 : return JS_FALSE;
11864 : nsresult rv;
11865 : PRUint32 result;
11866 0 : rv = self->GetLength(&result);
11867 0 : if (NS_FAILED(rv))
11868 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11869 0 : *vp = UINT_TO_JSVAL(result);
11870 0 : return JS_TRUE;
11871 : }
11872 :
11873 : static JSBool
11874 0 : nsIDOMTouchList_Item(JSContext *cx, unsigned argc, jsval *vp)
11875 : {
11876 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11877 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11878 0 : if (!obj)
11879 0 : return JS_FALSE;
11880 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
11881 : nsIDOMTouchList *self;
11882 0 : xpc_qsSelfRef selfref;
11883 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11884 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
11885 0 : return JS_FALSE;
11886 0 : if (argc < 1)
11887 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11888 0 : jsval *argv = JS_ARGV(cx, vp);
11889 : uint32_t arg0;
11890 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
11891 0 : return JS_FALSE;
11892 : nsresult rv;
11893 0 : nsCOMPtr<nsIDOMTouch> result;
11894 0 : rv = self->Item(arg0, getter_AddRefs(result));
11895 0 : if (NS_FAILED(rv))
11896 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11897 0 : if (!result) {
11898 0 : *vp = JSVAL_NULL;
11899 0 : return JS_TRUE;
11900 : }
11901 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11902 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11903 0 : return JS_TRUE;
11904 : }
11905 : // After this point do not use 'result'!
11906 0 : qsObjectHelper helper(result, cache);
11907 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouch), &interfaces[k_nsIDOMTouch], vp);
11908 : }
11909 :
11910 : static JSBool
11911 0 : nsIDOMTouchList_IdentifiedTouch(JSContext *cx, unsigned argc, jsval *vp)
11912 : {
11913 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11914 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
11915 0 : if (!obj)
11916 0 : return JS_FALSE;
11917 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
11918 : nsIDOMTouchList *self;
11919 0 : xpc_qsSelfRef selfref;
11920 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11921 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
11922 0 : return JS_FALSE;
11923 0 : if (argc < 1)
11924 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
11925 0 : jsval *argv = JS_ARGV(cx, vp);
11926 : int32_t arg0;
11927 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
11928 0 : return JS_FALSE;
11929 : nsresult rv;
11930 0 : nsCOMPtr<nsIDOMTouch> result;
11931 0 : rv = self->IdentifiedTouch(arg0, getter_AddRefs(result));
11932 0 : if (NS_FAILED(rv))
11933 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
11934 0 : if (!result) {
11935 0 : *vp = JSVAL_NULL;
11936 0 : return JS_TRUE;
11937 : }
11938 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11939 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11940 0 : return JS_TRUE;
11941 : }
11942 : // After this point do not use 'result'!
11943 0 : qsObjectHelper helper(result, cache);
11944 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouch), &interfaces[k_nsIDOMTouch], vp);
11945 : }
11946 :
11947 : // === interface nsIDOMTouchEvent
11948 :
11949 : static JSBool
11950 0 : nsIDOMTouchEvent_GetTouches(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11951 : {
11952 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11953 0 : JSObject *callee = nsnull;
11954 : nsIDOMTouchEvent *self;
11955 0 : xpc_qsSelfRef selfref;
11956 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11957 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11958 0 : return JS_FALSE;
11959 : nsresult rv;
11960 0 : nsCOMPtr<nsIDOMTouchList> result;
11961 0 : rv = self->GetTouches(getter_AddRefs(result));
11962 0 : if (NS_FAILED(rv))
11963 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11964 0 : if (!result) {
11965 0 : *vp = JSVAL_NULL;
11966 0 : return JS_TRUE;
11967 : }
11968 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11969 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11970 0 : return JS_TRUE;
11971 : }
11972 : // After this point do not use 'result'!
11973 0 : qsObjectHelper helper(result, cache);
11974 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouchList), &interfaces[k_nsIDOMTouchList], vp);
11975 : }
11976 :
11977 : static JSBool
11978 0 : nsIDOMTouchEvent_GetTargetTouches(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
11979 : {
11980 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
11981 0 : JSObject *callee = nsnull;
11982 : nsIDOMTouchEvent *self;
11983 0 : xpc_qsSelfRef selfref;
11984 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
11985 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
11986 0 : return JS_FALSE;
11987 : nsresult rv;
11988 0 : nsCOMPtr<nsIDOMTouchList> result;
11989 0 : rv = self->GetTargetTouches(getter_AddRefs(result));
11990 0 : if (NS_FAILED(rv))
11991 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
11992 0 : if (!result) {
11993 0 : *vp = JSVAL_NULL;
11994 0 : return JS_TRUE;
11995 : }
11996 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
11997 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
11998 0 : return JS_TRUE;
11999 : }
12000 : // After this point do not use 'result'!
12001 0 : qsObjectHelper helper(result, cache);
12002 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouchList), &interfaces[k_nsIDOMTouchList], vp);
12003 : }
12004 :
12005 : static JSBool
12006 0 : nsIDOMTouchEvent_GetChangedTouches(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12007 : {
12008 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12009 0 : JSObject *callee = nsnull;
12010 : nsIDOMTouchEvent *self;
12011 0 : xpc_qsSelfRef selfref;
12012 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
12013 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
12014 0 : return JS_FALSE;
12015 : nsresult rv;
12016 0 : nsCOMPtr<nsIDOMTouchList> result;
12017 0 : rv = self->GetChangedTouches(getter_AddRefs(result));
12018 0 : if (NS_FAILED(rv))
12019 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12020 0 : if (!result) {
12021 0 : *vp = JSVAL_NULL;
12022 0 : return JS_TRUE;
12023 : }
12024 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12025 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12026 0 : return JS_TRUE;
12027 : }
12028 : // After this point do not use 'result'!
12029 0 : qsObjectHelper helper(result, cache);
12030 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMTouchList), &interfaces[k_nsIDOMTouchList], vp);
12031 : }
12032 :
12033 : static JSBool
12034 0 : nsIDOMTouchEvent_GetAltKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12035 : {
12036 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12037 : nsIDOMTouchEvent *self;
12038 0 : xpc_qsSelfRef selfref;
12039 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12040 0 : return JS_FALSE;
12041 : nsresult rv;
12042 : bool result;
12043 0 : rv = self->GetAltKey(&result);
12044 0 : if (NS_FAILED(rv))
12045 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12046 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12047 0 : return JS_TRUE;
12048 : }
12049 :
12050 : static JSBool
12051 0 : nsIDOMTouchEvent_GetMetaKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12052 : {
12053 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12054 : nsIDOMTouchEvent *self;
12055 0 : xpc_qsSelfRef selfref;
12056 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12057 0 : return JS_FALSE;
12058 : nsresult rv;
12059 : bool result;
12060 0 : rv = self->GetMetaKey(&result);
12061 0 : if (NS_FAILED(rv))
12062 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12063 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12064 0 : return JS_TRUE;
12065 : }
12066 :
12067 : static JSBool
12068 0 : nsIDOMTouchEvent_GetCtrlKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12069 : {
12070 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12071 : nsIDOMTouchEvent *self;
12072 0 : xpc_qsSelfRef selfref;
12073 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12074 0 : return JS_FALSE;
12075 : nsresult rv;
12076 : bool result;
12077 0 : rv = self->GetCtrlKey(&result);
12078 0 : if (NS_FAILED(rv))
12079 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12080 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12081 0 : return JS_TRUE;
12082 : }
12083 :
12084 : static JSBool
12085 0 : nsIDOMTouchEvent_GetShiftKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12086 : {
12087 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12088 : nsIDOMTouchEvent *self;
12089 0 : xpc_qsSelfRef selfref;
12090 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12091 0 : return JS_FALSE;
12092 : nsresult rv;
12093 : bool result;
12094 0 : rv = self->GetShiftKey(&result);
12095 0 : if (NS_FAILED(rv))
12096 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12097 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12098 0 : return JS_TRUE;
12099 : }
12100 :
12101 : static JSBool
12102 0 : nsIDOMTouchEvent_InitTouchEvent(JSContext *cx, unsigned argc, jsval *vp)
12103 : {
12104 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12105 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
12106 0 : if (!obj)
12107 0 : return JS_FALSE;
12108 : nsIDOMTouchEvent *self;
12109 0 : xpc_qsSelfRef selfref;
12110 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
12111 0 : return JS_FALSE;
12112 0 : if (argc < 12)
12113 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
12114 0 : jsval *argv = JS_ARGV(cx, vp);
12115 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
12116 : xpc_qsDOMString::eDefaultNullBehavior,
12117 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12118 0 : if (!arg0.IsValid())
12119 0 : return JS_FALSE;
12120 : JSBool arg1;
12121 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
12122 : JSBool arg2;
12123 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
12124 : nsresult rv;
12125 : nsIDOMWindow *arg3;
12126 0 : xpc_qsSelfRef arg3ref;
12127 0 : rv = xpc_qsUnwrapArg<nsIDOMWindow>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
12128 0 : if (NS_FAILED(rv)) {
12129 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
12130 0 : return JS_FALSE;
12131 : }
12132 : int32_t arg4;
12133 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
12134 0 : return JS_FALSE;
12135 : JSBool arg5;
12136 0 : JS_ValueToBoolean(cx, argv[5], &arg5);
12137 : JSBool arg6;
12138 0 : JS_ValueToBoolean(cx, argv[6], &arg6);
12139 : JSBool arg7;
12140 0 : JS_ValueToBoolean(cx, argv[7], &arg7);
12141 : JSBool arg8;
12142 0 : JS_ValueToBoolean(cx, argv[8], &arg8);
12143 : nsIDOMTouchList *arg9;
12144 0 : xpc_qsSelfRef arg9ref;
12145 0 : rv = xpc_qsUnwrapArg<nsIDOMTouchList>(cx, argv[9], &arg9, &arg9ref.ptr, &argv[9]);
12146 0 : if (NS_FAILED(rv)) {
12147 0 : xpc_qsThrowBadArg(cx, rv, vp, 9);
12148 0 : return JS_FALSE;
12149 : }
12150 : nsIDOMTouchList *arg10;
12151 0 : xpc_qsSelfRef arg10ref;
12152 0 : rv = xpc_qsUnwrapArg<nsIDOMTouchList>(cx, argv[10], &arg10, &arg10ref.ptr, &argv[10]);
12153 0 : if (NS_FAILED(rv)) {
12154 0 : xpc_qsThrowBadArg(cx, rv, vp, 10);
12155 0 : return JS_FALSE;
12156 : }
12157 : nsIDOMTouchList *arg11;
12158 0 : xpc_qsSelfRef arg11ref;
12159 0 : rv = xpc_qsUnwrapArg<nsIDOMTouchList>(cx, argv[11], &arg11, &arg11ref.ptr, &argv[11]);
12160 0 : if (NS_FAILED(rv)) {
12161 0 : xpc_qsThrowBadArg(cx, rv, vp, 11);
12162 0 : return JS_FALSE;
12163 : }
12164 0 : rv = self->InitTouchEvent(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
12165 0 : if (NS_FAILED(rv))
12166 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
12167 0 : *vp = JSVAL_VOID;
12168 0 : return JS_TRUE;
12169 : }
12170 :
12171 : // === interface nsIDOMHTMLAnchorElement
12172 :
12173 : static JSBool
12174 0 : nsIDOMHTMLAnchorElement_GetHref(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12175 : {
12176 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12177 : nsIDOMHTMLAnchorElement *self;
12178 0 : xpc_qsSelfRef selfref;
12179 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12180 0 : return JS_FALSE;
12181 : nsresult rv;
12182 0 : nsString result;
12183 0 : rv = self->GetHref(result);
12184 0 : if (NS_FAILED(rv))
12185 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12186 0 : return xpc::StringToJsval(cx, result, vp);
12187 : }
12188 :
12189 : static JSBool
12190 0 : nsIDOMHTMLAnchorElement_SetHref(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12191 : {
12192 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12193 : nsIDOMHTMLAnchorElement *self;
12194 0 : xpc_qsSelfRef selfref;
12195 0 : JS::AutoValueRooter tvr(cx);
12196 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12197 0 : return JS_FALSE;
12198 : xpc_qsDOMString arg0(cx, *vp, vp,
12199 : xpc_qsDOMString::eDefaultNullBehavior,
12200 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12201 0 : if (!arg0.IsValid())
12202 0 : return JS_FALSE;
12203 : nsresult rv;
12204 0 : rv = self->SetHref(arg0);
12205 0 : if (NS_FAILED(rv))
12206 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12207 0 : return JS_TRUE;
12208 : }
12209 :
12210 : static JSBool
12211 0 : nsIDOMHTMLAnchorElement_GetRel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12212 : {
12213 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12214 : nsIDOMHTMLAnchorElement *self;
12215 0 : xpc_qsSelfRef selfref;
12216 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12217 0 : return JS_FALSE;
12218 : nsresult rv;
12219 0 : nsString result;
12220 0 : rv = self->GetRel(result);
12221 0 : if (NS_FAILED(rv))
12222 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12223 0 : return xpc::StringToJsval(cx, result, vp);
12224 : }
12225 :
12226 : static JSBool
12227 0 : nsIDOMHTMLAnchorElement_SetRel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12228 : {
12229 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12230 : nsIDOMHTMLAnchorElement *self;
12231 0 : xpc_qsSelfRef selfref;
12232 0 : JS::AutoValueRooter tvr(cx);
12233 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12234 0 : return JS_FALSE;
12235 : xpc_qsDOMString arg0(cx, *vp, vp,
12236 : xpc_qsDOMString::eDefaultNullBehavior,
12237 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12238 0 : if (!arg0.IsValid())
12239 0 : return JS_FALSE;
12240 : nsresult rv;
12241 0 : rv = self->SetRel(arg0);
12242 0 : if (NS_FAILED(rv))
12243 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12244 0 : return JS_TRUE;
12245 : }
12246 :
12247 : static JSBool
12248 0 : nsIDOMHTMLAnchorElement_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12249 : {
12250 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12251 : nsIDOMHTMLAnchorElement *self;
12252 0 : xpc_qsSelfRef selfref;
12253 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12254 0 : return JS_FALSE;
12255 : nsresult rv;
12256 0 : nsString result;
12257 0 : rv = self->GetTarget(result);
12258 0 : if (NS_FAILED(rv))
12259 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12260 0 : return xpc::StringToJsval(cx, result, vp);
12261 : }
12262 :
12263 : static JSBool
12264 0 : nsIDOMHTMLAnchorElement_SetTarget(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12265 : {
12266 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12267 : nsIDOMHTMLAnchorElement *self;
12268 0 : xpc_qsSelfRef selfref;
12269 0 : JS::AutoValueRooter tvr(cx);
12270 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12271 0 : return JS_FALSE;
12272 : xpc_qsDOMString arg0(cx, *vp, vp,
12273 : xpc_qsDOMString::eDefaultNullBehavior,
12274 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12275 0 : if (!arg0.IsValid())
12276 0 : return JS_FALSE;
12277 : nsresult rv;
12278 0 : rv = self->SetTarget(arg0);
12279 0 : if (NS_FAILED(rv))
12280 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12281 0 : return JS_TRUE;
12282 : }
12283 :
12284 : static JSBool
12285 0 : nsIDOMHTMLAnchorElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12286 : {
12287 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12288 : nsIDOMHTMLAnchorElement *self;
12289 0 : xpc_qsSelfRef selfref;
12290 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12291 0 : return JS_FALSE;
12292 : nsresult rv;
12293 0 : nsString result;
12294 0 : rv = self->GetName(result);
12295 0 : if (NS_FAILED(rv))
12296 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12297 0 : return xpc::StringToJsval(cx, result, vp);
12298 : }
12299 :
12300 : static JSBool
12301 0 : nsIDOMHTMLAnchorElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12302 : {
12303 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12304 : nsIDOMHTMLAnchorElement *self;
12305 0 : xpc_qsSelfRef selfref;
12306 0 : JS::AutoValueRooter tvr(cx);
12307 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12308 0 : return JS_FALSE;
12309 : xpc_qsDOMString arg0(cx, *vp, vp,
12310 : xpc_qsDOMString::eDefaultNullBehavior,
12311 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12312 0 : if (!arg0.IsValid())
12313 0 : return JS_FALSE;
12314 : nsresult rv;
12315 0 : rv = self->SetName(arg0);
12316 0 : if (NS_FAILED(rv))
12317 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12318 0 : return JS_TRUE;
12319 : }
12320 :
12321 : static JSBool
12322 0 : nsIDOMHTMLAnchorElement_GetText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12323 : {
12324 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12325 : nsIDOMHTMLAnchorElement *self;
12326 0 : xpc_qsSelfRef selfref;
12327 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12328 0 : return JS_FALSE;
12329 : nsresult rv;
12330 0 : nsString result;
12331 0 : rv = self->GetText(result);
12332 0 : if (NS_FAILED(rv))
12333 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12334 0 : return xpc::StringToJsval(cx, result, vp);
12335 : }
12336 :
12337 : static JSBool
12338 0 : nsIDOMHTMLAnchorElement_SetText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12339 : {
12340 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12341 : nsIDOMHTMLAnchorElement *self;
12342 0 : xpc_qsSelfRef selfref;
12343 0 : JS::AutoValueRooter tvr(cx);
12344 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12345 0 : return JS_FALSE;
12346 : xpc_qsDOMString arg0(cx, *vp, vp,
12347 : xpc_qsDOMString::eStringify,
12348 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12349 0 : if (!arg0.IsValid())
12350 0 : return JS_FALSE;
12351 : nsresult rv;
12352 0 : rv = self->SetText(arg0);
12353 0 : if (NS_FAILED(rv))
12354 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12355 0 : return JS_TRUE;
12356 : }
12357 :
12358 : static JSBool
12359 0 : nsIDOMHTMLAnchorElement_GetSearch(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12360 : {
12361 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12362 : nsIDOMHTMLAnchorElement *self;
12363 0 : xpc_qsSelfRef selfref;
12364 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12365 0 : return JS_FALSE;
12366 : nsresult rv;
12367 0 : nsString result;
12368 0 : rv = self->GetSearch(result);
12369 0 : if (NS_FAILED(rv))
12370 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12371 0 : return xpc::StringToJsval(cx, result, vp);
12372 : }
12373 :
12374 : static JSBool
12375 0 : nsIDOMHTMLAnchorElement_SetSearch(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12376 : {
12377 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12378 : nsIDOMHTMLAnchorElement *self;
12379 0 : xpc_qsSelfRef selfref;
12380 0 : JS::AutoValueRooter tvr(cx);
12381 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12382 0 : return JS_FALSE;
12383 : xpc_qsDOMString arg0(cx, *vp, vp,
12384 : xpc_qsDOMString::eDefaultNullBehavior,
12385 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12386 0 : if (!arg0.IsValid())
12387 0 : return JS_FALSE;
12388 : nsresult rv;
12389 0 : rv = self->SetSearch(arg0);
12390 0 : if (NS_FAILED(rv))
12391 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12392 0 : return JS_TRUE;
12393 : }
12394 :
12395 : static JSBool
12396 0 : nsIDOMHTMLAnchorElement_GetHash(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12397 : {
12398 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12399 : nsIDOMHTMLAnchorElement *self;
12400 0 : xpc_qsSelfRef selfref;
12401 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12402 0 : return JS_FALSE;
12403 : nsresult rv;
12404 0 : nsString result;
12405 0 : rv = self->GetHash(result);
12406 0 : if (NS_FAILED(rv))
12407 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12408 0 : return xpc::StringToJsval(cx, result, vp);
12409 : }
12410 :
12411 : static JSBool
12412 0 : nsIDOMHTMLAnchorElement_SetHash(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12413 : {
12414 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12415 : nsIDOMHTMLAnchorElement *self;
12416 0 : xpc_qsSelfRef selfref;
12417 0 : JS::AutoValueRooter tvr(cx);
12418 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12419 0 : return JS_FALSE;
12420 : xpc_qsDOMString arg0(cx, *vp, vp,
12421 : xpc_qsDOMString::eDefaultNullBehavior,
12422 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12423 0 : if (!arg0.IsValid())
12424 0 : return JS_FALSE;
12425 : nsresult rv;
12426 0 : rv = self->SetHash(arg0);
12427 0 : if (NS_FAILED(rv))
12428 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12429 0 : return JS_TRUE;
12430 : }
12431 :
12432 : // === interface nsIDOMHTMLBaseElement
12433 :
12434 : static JSBool
12435 0 : nsIDOMHTMLBaseElement_GetHref(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12436 : {
12437 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12438 : nsIDOMHTMLBaseElement *self;
12439 0 : xpc_qsSelfRef selfref;
12440 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12441 0 : return JS_FALSE;
12442 : nsresult rv;
12443 0 : nsString result;
12444 0 : rv = self->GetHref(result);
12445 0 : if (NS_FAILED(rv))
12446 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12447 0 : return xpc::StringToJsval(cx, result, vp);
12448 : }
12449 :
12450 : static JSBool
12451 0 : nsIDOMHTMLBaseElement_SetHref(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12452 : {
12453 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12454 : nsIDOMHTMLBaseElement *self;
12455 0 : xpc_qsSelfRef selfref;
12456 0 : JS::AutoValueRooter tvr(cx);
12457 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12458 0 : return JS_FALSE;
12459 : xpc_qsDOMString arg0(cx, *vp, vp,
12460 : xpc_qsDOMString::eDefaultNullBehavior,
12461 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12462 0 : if (!arg0.IsValid())
12463 0 : return JS_FALSE;
12464 : nsresult rv;
12465 0 : rv = self->SetHref(arg0);
12466 0 : if (NS_FAILED(rv))
12467 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12468 0 : return JS_TRUE;
12469 : }
12470 :
12471 : static JSBool
12472 0 : nsIDOMHTMLBaseElement_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12473 : {
12474 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12475 : nsIDOMHTMLBaseElement *self;
12476 0 : xpc_qsSelfRef selfref;
12477 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12478 0 : return JS_FALSE;
12479 : nsresult rv;
12480 0 : nsString result;
12481 0 : rv = self->GetTarget(result);
12482 0 : if (NS_FAILED(rv))
12483 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12484 0 : return xpc::StringToJsval(cx, result, vp);
12485 : }
12486 :
12487 : static JSBool
12488 0 : nsIDOMHTMLBaseElement_SetTarget(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12489 : {
12490 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12491 : nsIDOMHTMLBaseElement *self;
12492 0 : xpc_qsSelfRef selfref;
12493 0 : JS::AutoValueRooter tvr(cx);
12494 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12495 0 : return JS_FALSE;
12496 : xpc_qsDOMString arg0(cx, *vp, vp,
12497 : xpc_qsDOMString::eDefaultNullBehavior,
12498 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12499 0 : if (!arg0.IsValid())
12500 0 : return JS_FALSE;
12501 : nsresult rv;
12502 0 : rv = self->SetTarget(arg0);
12503 0 : if (NS_FAILED(rv))
12504 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12505 0 : return JS_TRUE;
12506 : }
12507 :
12508 : // === interface nsIDOMHTMLButtonElement
12509 :
12510 : static JSBool
12511 0 : nsIDOMHTMLButtonElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12512 : {
12513 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12514 : nsIDOMHTMLButtonElement *self;
12515 0 : xpc_qsSelfRef selfref;
12516 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12517 0 : return JS_FALSE;
12518 : nsresult rv;
12519 0 : nsString result;
12520 0 : rv = self->GetName(result);
12521 0 : if (NS_FAILED(rv))
12522 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12523 0 : return xpc::StringToJsval(cx, result, vp);
12524 : }
12525 :
12526 : static JSBool
12527 0 : nsIDOMHTMLButtonElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12528 : {
12529 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12530 : nsIDOMHTMLButtonElement *self;
12531 0 : xpc_qsSelfRef selfref;
12532 0 : JS::AutoValueRooter tvr(cx);
12533 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12534 0 : return JS_FALSE;
12535 : xpc_qsDOMString arg0(cx, *vp, vp,
12536 : xpc_qsDOMString::eDefaultNullBehavior,
12537 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12538 0 : if (!arg0.IsValid())
12539 0 : return JS_FALSE;
12540 : nsresult rv;
12541 0 : rv = self->SetName(arg0);
12542 0 : if (NS_FAILED(rv))
12543 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12544 0 : return JS_TRUE;
12545 : }
12546 :
12547 : static JSBool
12548 0 : nsIDOMHTMLButtonElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12549 : {
12550 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12551 0 : JSObject *callee = nsnull;
12552 : nsIDOMHTMLButtonElement *self;
12553 0 : xpc_qsSelfRef selfref;
12554 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
12555 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
12556 0 : return JS_FALSE;
12557 : nsresult rv;
12558 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
12559 0 : rv = self->GetForm(getter_AddRefs(result));
12560 0 : if (NS_FAILED(rv))
12561 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12562 0 : if (!result) {
12563 0 : *vp = JSVAL_NULL;
12564 0 : return JS_TRUE;
12565 : }
12566 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12567 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12568 0 : return JS_TRUE;
12569 : }
12570 : // After this point do not use 'result'!
12571 0 : qsObjectHelper helper(result, cache);
12572 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
12573 : }
12574 :
12575 : static JSBool
12576 0 : nsIDOMHTMLButtonElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12577 : {
12578 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12579 : nsIDOMHTMLButtonElement *self;
12580 0 : xpc_qsSelfRef selfref;
12581 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12582 0 : return JS_FALSE;
12583 : nsresult rv;
12584 0 : nsString result;
12585 0 : rv = self->GetValue(result);
12586 0 : if (NS_FAILED(rv))
12587 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12588 0 : return xpc::StringToJsval(cx, result, vp);
12589 : }
12590 :
12591 : static JSBool
12592 0 : nsIDOMHTMLButtonElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12593 : {
12594 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12595 : nsIDOMHTMLButtonElement *self;
12596 0 : xpc_qsSelfRef selfref;
12597 0 : JS::AutoValueRooter tvr(cx);
12598 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12599 0 : return JS_FALSE;
12600 : xpc_qsDOMString arg0(cx, *vp, vp,
12601 : xpc_qsDOMString::eDefaultNullBehavior,
12602 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12603 0 : if (!arg0.IsValid())
12604 0 : return JS_FALSE;
12605 : nsresult rv;
12606 0 : rv = self->SetValue(arg0);
12607 0 : if (NS_FAILED(rv))
12608 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12609 0 : return JS_TRUE;
12610 : }
12611 :
12612 : static JSBool
12613 0 : nsIDOMHTMLButtonElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12614 : {
12615 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12616 : nsIDOMHTMLButtonElement *self;
12617 0 : xpc_qsSelfRef selfref;
12618 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12619 0 : return JS_FALSE;
12620 : nsresult rv;
12621 : bool result;
12622 0 : rv = self->GetDisabled(&result);
12623 0 : if (NS_FAILED(rv))
12624 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12625 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12626 0 : return JS_TRUE;
12627 : }
12628 :
12629 : static JSBool
12630 0 : nsIDOMHTMLButtonElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12631 : {
12632 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12633 : nsIDOMHTMLButtonElement *self;
12634 0 : xpc_qsSelfRef selfref;
12635 0 : JS::AutoValueRooter tvr(cx);
12636 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12637 0 : return JS_FALSE;
12638 : JSBool arg0;
12639 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12640 : nsresult rv;
12641 0 : rv = self->SetDisabled(arg0);
12642 0 : if (NS_FAILED(rv))
12643 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12644 0 : return JS_TRUE;
12645 : }
12646 :
12647 : // === interface nsIDOMHTMLCollection
12648 :
12649 : static JSBool
12650 0 : nsIDOMHTMLCollection_Item(JSContext *cx, unsigned argc, jsval *vp)
12651 : {
12652 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12653 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
12654 0 : if (!obj)
12655 0 : return JS_FALSE;
12656 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
12657 : nsIDOMHTMLCollection *self;
12658 0 : xpc_qsSelfRef selfref;
12659 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
12660 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
12661 0 : return JS_FALSE;
12662 0 : if (argc < 1)
12663 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
12664 0 : jsval *argv = JS_ARGV(cx, vp);
12665 : uint32_t arg0;
12666 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
12667 0 : return JS_FALSE;
12668 : nsresult rv;
12669 0 : nsCOMPtr<nsIDOMNode> result;
12670 0 : rv = self->Item(arg0, getter_AddRefs(result));
12671 0 : if (NS_FAILED(rv))
12672 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
12673 0 : if (!result) {
12674 0 : *vp = JSVAL_NULL;
12675 0 : return JS_TRUE;
12676 : }
12677 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12678 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12679 0 : return JS_TRUE;
12680 : }
12681 : // After this point do not use 'result'!
12682 0 : qsObjectHelper helper(result, cache);
12683 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
12684 : }
12685 :
12686 : static JSBool
12687 0 : nsIDOMHTMLCollection_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12688 : {
12689 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12690 : nsIDOMHTMLCollection *self;
12691 0 : xpc_qsSelfRef selfref;
12692 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12693 0 : return JS_FALSE;
12694 : nsresult rv;
12695 : PRUint32 result;
12696 0 : rv = self->GetLength(&result);
12697 0 : if (NS_FAILED(rv))
12698 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12699 0 : *vp = UINT_TO_JSVAL(result);
12700 0 : return JS_TRUE;
12701 : }
12702 :
12703 : // === interface nsIDOMHTMLCommandElement
12704 :
12705 : static JSBool
12706 0 : nsIDOMHTMLCommandElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12707 : {
12708 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12709 : nsIDOMHTMLCommandElement *self;
12710 0 : xpc_qsSelfRef selfref;
12711 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12712 0 : return JS_FALSE;
12713 : nsresult rv;
12714 0 : nsString result;
12715 0 : rv = self->GetType(result);
12716 0 : if (NS_FAILED(rv))
12717 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12718 0 : return xpc::StringToJsval(cx, result, vp);
12719 : }
12720 :
12721 : static JSBool
12722 0 : nsIDOMHTMLCommandElement_SetType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12723 : {
12724 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12725 : nsIDOMHTMLCommandElement *self;
12726 0 : xpc_qsSelfRef selfref;
12727 0 : JS::AutoValueRooter tvr(cx);
12728 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12729 0 : return JS_FALSE;
12730 : xpc_qsDOMString arg0(cx, *vp, vp,
12731 : xpc_qsDOMString::eDefaultNullBehavior,
12732 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12733 0 : if (!arg0.IsValid())
12734 0 : return JS_FALSE;
12735 : nsresult rv;
12736 0 : rv = self->SetType(arg0);
12737 0 : if (NS_FAILED(rv))
12738 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12739 0 : return JS_TRUE;
12740 : }
12741 :
12742 : static JSBool
12743 0 : nsIDOMHTMLCommandElement_GetLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12744 : {
12745 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12746 : nsIDOMHTMLCommandElement *self;
12747 0 : xpc_qsSelfRef selfref;
12748 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12749 0 : return JS_FALSE;
12750 : nsresult rv;
12751 0 : nsString result;
12752 0 : rv = self->GetLabel(result);
12753 0 : if (NS_FAILED(rv))
12754 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12755 0 : return xpc::StringToJsval(cx, result, vp);
12756 : }
12757 :
12758 : static JSBool
12759 0 : nsIDOMHTMLCommandElement_SetLabel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12760 : {
12761 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12762 : nsIDOMHTMLCommandElement *self;
12763 0 : xpc_qsSelfRef selfref;
12764 0 : JS::AutoValueRooter tvr(cx);
12765 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12766 0 : return JS_FALSE;
12767 : xpc_qsDOMString arg0(cx, *vp, vp,
12768 : xpc_qsDOMString::eDefaultNullBehavior,
12769 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12770 0 : if (!arg0.IsValid())
12771 0 : return JS_FALSE;
12772 : nsresult rv;
12773 0 : rv = self->SetLabel(arg0);
12774 0 : if (NS_FAILED(rv))
12775 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12776 0 : return JS_TRUE;
12777 : }
12778 :
12779 : static JSBool
12780 0 : nsIDOMHTMLCommandElement_GetIcon(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12781 : {
12782 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12783 : nsIDOMHTMLCommandElement *self;
12784 0 : xpc_qsSelfRef selfref;
12785 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12786 0 : return JS_FALSE;
12787 : nsresult rv;
12788 0 : nsString result;
12789 0 : rv = self->GetIcon(result);
12790 0 : if (NS_FAILED(rv))
12791 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12792 0 : return xpc::StringToJsval(cx, result, vp);
12793 : }
12794 :
12795 : static JSBool
12796 0 : nsIDOMHTMLCommandElement_SetIcon(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12797 : {
12798 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12799 : nsIDOMHTMLCommandElement *self;
12800 0 : xpc_qsSelfRef selfref;
12801 0 : JS::AutoValueRooter tvr(cx);
12802 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12803 0 : return JS_FALSE;
12804 : xpc_qsDOMString arg0(cx, *vp, vp,
12805 : xpc_qsDOMString::eDefaultNullBehavior,
12806 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12807 0 : if (!arg0.IsValid())
12808 0 : return JS_FALSE;
12809 : nsresult rv;
12810 0 : rv = self->SetIcon(arg0);
12811 0 : if (NS_FAILED(rv))
12812 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12813 0 : return JS_TRUE;
12814 : }
12815 :
12816 : static JSBool
12817 0 : nsIDOMHTMLCommandElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12818 : {
12819 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12820 : nsIDOMHTMLCommandElement *self;
12821 0 : xpc_qsSelfRef selfref;
12822 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12823 0 : return JS_FALSE;
12824 : nsresult rv;
12825 : bool result;
12826 0 : rv = self->GetDisabled(&result);
12827 0 : if (NS_FAILED(rv))
12828 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12829 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12830 0 : return JS_TRUE;
12831 : }
12832 :
12833 : static JSBool
12834 0 : nsIDOMHTMLCommandElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12835 : {
12836 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12837 : nsIDOMHTMLCommandElement *self;
12838 0 : xpc_qsSelfRef selfref;
12839 0 : JS::AutoValueRooter tvr(cx);
12840 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12841 0 : return JS_FALSE;
12842 : JSBool arg0;
12843 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12844 : nsresult rv;
12845 0 : rv = self->SetDisabled(arg0);
12846 0 : if (NS_FAILED(rv))
12847 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12848 0 : return JS_TRUE;
12849 : }
12850 :
12851 : static JSBool
12852 0 : nsIDOMHTMLCommandElement_GetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12853 : {
12854 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12855 : nsIDOMHTMLCommandElement *self;
12856 0 : xpc_qsSelfRef selfref;
12857 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12858 0 : return JS_FALSE;
12859 : nsresult rv;
12860 : bool result;
12861 0 : rv = self->GetDefaultChecked(&result);
12862 0 : if (NS_FAILED(rv))
12863 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12864 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12865 0 : return JS_TRUE;
12866 : }
12867 :
12868 : static JSBool
12869 0 : nsIDOMHTMLCommandElement_SetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12870 : {
12871 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12872 : nsIDOMHTMLCommandElement *self;
12873 0 : xpc_qsSelfRef selfref;
12874 0 : JS::AutoValueRooter tvr(cx);
12875 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12876 0 : return JS_FALSE;
12877 : JSBool arg0;
12878 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12879 : nsresult rv;
12880 0 : rv = self->SetDefaultChecked(arg0);
12881 0 : if (NS_FAILED(rv))
12882 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12883 0 : return JS_TRUE;
12884 : }
12885 :
12886 : static JSBool
12887 0 : nsIDOMHTMLCommandElement_GetChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12888 : {
12889 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12890 : nsIDOMHTMLCommandElement *self;
12891 0 : xpc_qsSelfRef selfref;
12892 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12893 0 : return JS_FALSE;
12894 : nsresult rv;
12895 : bool result;
12896 0 : rv = self->GetChecked(&result);
12897 0 : if (NS_FAILED(rv))
12898 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12899 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
12900 0 : return JS_TRUE;
12901 : }
12902 :
12903 : static JSBool
12904 0 : nsIDOMHTMLCommandElement_SetChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12905 : {
12906 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12907 : nsIDOMHTMLCommandElement *self;
12908 0 : xpc_qsSelfRef selfref;
12909 0 : JS::AutoValueRooter tvr(cx);
12910 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12911 0 : return JS_FALSE;
12912 : JSBool arg0;
12913 0 : JS_ValueToBoolean(cx, *vp, &arg0);
12914 : nsresult rv;
12915 0 : rv = self->SetChecked(arg0);
12916 0 : if (NS_FAILED(rv))
12917 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12918 0 : return JS_TRUE;
12919 : }
12920 :
12921 : static JSBool
12922 0 : nsIDOMHTMLCommandElement_GetRadiogroup(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12923 : {
12924 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12925 : nsIDOMHTMLCommandElement *self;
12926 0 : xpc_qsSelfRef selfref;
12927 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
12928 0 : return JS_FALSE;
12929 : nsresult rv;
12930 0 : nsString result;
12931 0 : rv = self->GetRadiogroup(result);
12932 0 : if (NS_FAILED(rv))
12933 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
12934 0 : return xpc::StringToJsval(cx, result, vp);
12935 : }
12936 :
12937 : static JSBool
12938 0 : nsIDOMHTMLCommandElement_SetRadiogroup(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12939 : {
12940 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12941 : nsIDOMHTMLCommandElement *self;
12942 0 : xpc_qsSelfRef selfref;
12943 0 : JS::AutoValueRooter tvr(cx);
12944 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
12945 0 : return JS_FALSE;
12946 : xpc_qsDOMString arg0(cx, *vp, vp,
12947 : xpc_qsDOMString::eDefaultNullBehavior,
12948 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
12949 0 : if (!arg0.IsValid())
12950 0 : return JS_FALSE;
12951 : nsresult rv;
12952 0 : rv = self->SetRadiogroup(arg0);
12953 0 : if (NS_FAILED(rv))
12954 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
12955 0 : return JS_TRUE;
12956 : }
12957 :
12958 : // === interface nsIDOMHTMLDocument
12959 :
12960 : static JSBool
12961 0 : nsIDOMHTMLDocument_GetBody(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
12962 : {
12963 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12964 0 : JSObject *callee = nsnull;
12965 : nsHTMLDocument *self;
12966 0 : xpc_qsSelfRef selfref;
12967 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
12968 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
12969 0 : return JS_FALSE;
12970 0 : nsIContent *result = self->GetBody();
12971 : #ifdef DEBUG
12972 : nsresult debug_rv;
12973 0 : nsCOMPtr<nsIDOMHTMLDocument> debug_self;
12974 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
12975 0 : nsCOMPtr<nsIDOMHTMLElement> debug_result;
12976 0 : debug_rv = debug_self->GetBody(getter_AddRefs(debug_result));
12977 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
12978 : "Got the wrong answer from the custom method call!");
12979 : #endif
12980 0 : if (!result) {
12981 0 : *vp = JSVAL_NULL;
12982 0 : return JS_TRUE;
12983 : }
12984 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
12985 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
12986 0 : return JS_TRUE;
12987 : }
12988 : // After this point do not use 'result'!
12989 0 : qsObjectHelper helper(result, cache);
12990 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
12991 : }
12992 :
12993 : static JSBool
12994 0 : nsIDOMHTMLDocument_SetBody(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
12995 : {
12996 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
12997 : nsHTMLDocument *self;
12998 0 : xpc_qsSelfRef selfref;
12999 0 : JS::AutoValueRooter tvr(cx);
13000 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13001 0 : return JS_FALSE;
13002 : nsresult rv;
13003 : nsIDOMHTMLElement *arg0;
13004 0 : xpc_qsSelfRef arg0ref;
13005 0 : rv = xpc_qsUnwrapArg<nsIDOMHTMLElement>(cx, *vp, &arg0, &arg0ref.ptr, vp);
13006 0 : if (NS_FAILED(rv)) {
13007 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13008 0 : return JS_FALSE;
13009 : }
13010 0 : rv = self->SetBody(arg0);
13011 0 : if (NS_FAILED(rv))
13012 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13013 0 : return JS_TRUE;
13014 : }
13015 :
13016 : static JSBool
13017 0 : nsIDOMHTMLDocument_GetElementsByName(JSContext *cx, unsigned argc, jsval *vp)
13018 : {
13019 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13020 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13021 0 : if (!obj)
13022 0 : return JS_FALSE;
13023 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
13024 : nsHTMLDocument *self;
13025 0 : xpc_qsSelfRef selfref;
13026 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13027 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
13028 0 : return JS_FALSE;
13029 0 : if (argc < 1)
13030 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
13031 0 : jsval *argv = JS_ARGV(cx, vp);
13032 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
13033 : xpc_qsDOMString::eDefaultNullBehavior,
13034 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13035 0 : if (!arg0.IsValid())
13036 0 : return JS_FALSE;
13037 0 : nsRefPtr<nsContentList> result = self->GetElementsByName(arg0);
13038 0 : if (!result) {
13039 0 : *vp = JSVAL_NULL;
13040 0 : return JS_TRUE;
13041 : }
13042 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13043 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13044 0 : return JS_TRUE;
13045 : }
13046 : // After this point do not use 'result'!
13047 0 : qsObjectHelper helper(result, cache);
13048 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
13049 : }
13050 :
13051 : static JSBool
13052 0 : nsIDOMHTMLDocument_GetAnchors(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13053 : {
13054 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13055 0 : JSObject *callee = nsnull;
13056 : nsHTMLDocument *self;
13057 0 : xpc_qsSelfRef selfref;
13058 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13059 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13060 0 : return JS_FALSE;
13061 : nsresult rv;
13062 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13063 0 : rv = self->GetAnchors(getter_AddRefs(result));
13064 0 : if (NS_FAILED(rv))
13065 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13066 0 : if (!result) {
13067 0 : *vp = JSVAL_NULL;
13068 0 : return JS_TRUE;
13069 : }
13070 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13071 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13072 0 : return JS_TRUE;
13073 : }
13074 : // After this point do not use 'result'!
13075 0 : qsObjectHelper helper(result, cache);
13076 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13077 : }
13078 :
13079 : static JSBool
13080 0 : nsIDOMHTMLDocument_GetLinks(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13081 : {
13082 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13083 0 : JSObject *callee = nsnull;
13084 : nsHTMLDocument *self;
13085 0 : xpc_qsSelfRef selfref;
13086 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13087 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13088 0 : return JS_FALSE;
13089 : nsresult rv;
13090 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13091 0 : rv = self->GetLinks(getter_AddRefs(result));
13092 0 : if (NS_FAILED(rv))
13093 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13094 0 : if (!result) {
13095 0 : *vp = JSVAL_NULL;
13096 0 : return JS_TRUE;
13097 : }
13098 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13099 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13100 0 : return JS_TRUE;
13101 : }
13102 : // After this point do not use 'result'!
13103 0 : qsObjectHelper helper(result, cache);
13104 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13105 : }
13106 :
13107 : static JSBool
13108 0 : nsIDOMHTMLDocument_GetURL(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13109 : {
13110 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13111 : nsHTMLDocument *self;
13112 0 : xpc_qsSelfRef selfref;
13113 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13114 0 : return JS_FALSE;
13115 : nsresult rv;
13116 0 : nsString result;
13117 0 : rv = self->GetURL(result);
13118 0 : if (NS_FAILED(rv))
13119 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13120 0 : return xpc::StringToJsval(cx, result, vp);
13121 : }
13122 :
13123 : static JSBool
13124 0 : nsIDOMHTMLDocument_GetForms(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13125 : {
13126 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13127 0 : JSObject *callee = nsnull;
13128 : nsHTMLDocument *self;
13129 0 : xpc_qsSelfRef selfref;
13130 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13131 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13132 0 : return JS_FALSE;
13133 : nsresult rv;
13134 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13135 0 : rv = self->GetForms(getter_AddRefs(result));
13136 0 : if (NS_FAILED(rv))
13137 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13138 0 : if (!result) {
13139 0 : *vp = JSVAL_NULL;
13140 0 : return JS_TRUE;
13141 : }
13142 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13143 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13144 0 : return JS_TRUE;
13145 : }
13146 : // After this point do not use 'result'!
13147 0 : qsObjectHelper helper(result, cache);
13148 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13149 : }
13150 :
13151 : static JSBool
13152 0 : nsIDOMHTMLDocument_GetCookie(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13153 : {
13154 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13155 : nsHTMLDocument *self;
13156 0 : xpc_qsSelfRef selfref;
13157 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13158 0 : return JS_FALSE;
13159 : nsresult rv;
13160 0 : nsString result;
13161 0 : rv = self->GetCookie(result);
13162 0 : if (NS_FAILED(rv))
13163 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13164 0 : return xpc::StringToJsval(cx, result, vp);
13165 : }
13166 :
13167 : static JSBool
13168 0 : nsIDOMHTMLDocument_SetCookie(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13169 : {
13170 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13171 : nsHTMLDocument *self;
13172 0 : xpc_qsSelfRef selfref;
13173 0 : JS::AutoValueRooter tvr(cx);
13174 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13175 0 : return JS_FALSE;
13176 : xpc_qsDOMString arg0(cx, *vp, vp,
13177 : xpc_qsDOMString::eDefaultNullBehavior,
13178 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13179 0 : if (!arg0.IsValid())
13180 0 : return JS_FALSE;
13181 : nsresult rv;
13182 0 : rv = self->SetCookie(arg0);
13183 0 : if (NS_FAILED(rv))
13184 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13185 0 : return JS_TRUE;
13186 : }
13187 :
13188 : static JSBool
13189 0 : nsIDOMHTMLDocument_GetImages(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13190 : {
13191 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13192 0 : JSObject *callee = nsnull;
13193 : nsHTMLDocument *self;
13194 0 : xpc_qsSelfRef selfref;
13195 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13196 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13197 0 : return JS_FALSE;
13198 : nsresult rv;
13199 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
13200 0 : rv = self->GetImages(getter_AddRefs(result));
13201 0 : if (NS_FAILED(rv))
13202 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13203 0 : if (!result) {
13204 0 : *vp = JSVAL_NULL;
13205 0 : return JS_TRUE;
13206 : }
13207 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13208 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13209 0 : return JS_TRUE;
13210 : }
13211 : // After this point do not use 'result'!
13212 0 : qsObjectHelper helper(result, cache);
13213 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
13214 : }
13215 :
13216 : static JSBool
13217 0 : nsIDOMHTMLDocument_Write(JSContext *cx, unsigned argc, jsval *vp)
13218 : {
13219 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13220 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13221 0 : if (!obj)
13222 0 : return JS_FALSE;
13223 : nsHTMLDocument *self;
13224 0 : xpc_qsSelfRef selfref;
13225 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13226 0 : return JS_FALSE;
13227 0 : jsval *argv = JS_ARGV(cx, vp);
13228 : xpc_qsDOMString arg0(cx, (0 < argc ? argv[0] : JSVAL_NULL), (0 < argc ? &argv[0] : NULL),
13229 : xpc_qsDOMString::eStringify,
13230 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13231 0 : if (!arg0.IsValid())
13232 0 : return JS_FALSE;
13233 : nsresult rv;
13234 :
13235 0 : nsAString &str = arg0;
13236 0 : for (unsigned i = 1; i < argc; ++i) {
13237 0 : xpc_qsDOMString next_arg(cx, argv[i], &argv[i],
13238 : xpc_qsDOMString::eStringify,
13239 0 : xpc_qsDOMString::eStringify);
13240 0 : if (!next_arg.IsValid())
13241 0 : return JS_FALSE;
13242 :
13243 0 : str.Append(next_arg);
13244 : }
13245 :
13246 0 : rv = self->Write(arg0, cx);
13247 :
13248 0 : if (NS_FAILED(rv))
13249 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13250 0 : *vp = JSVAL_VOID;
13251 0 : return JS_TRUE;
13252 : }
13253 :
13254 : static JSBool
13255 0 : nsIDOMHTMLDocument_Writeln(JSContext *cx, unsigned argc, jsval *vp)
13256 : {
13257 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13258 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13259 0 : if (!obj)
13260 0 : return JS_FALSE;
13261 : nsHTMLDocument *self;
13262 0 : xpc_qsSelfRef selfref;
13263 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13264 0 : return JS_FALSE;
13265 0 : jsval *argv = JS_ARGV(cx, vp);
13266 : xpc_qsDOMString arg0(cx, (0 < argc ? argv[0] : JSVAL_NULL), (0 < argc ? &argv[0] : NULL),
13267 : xpc_qsDOMString::eStringify,
13268 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13269 0 : if (!arg0.IsValid())
13270 0 : return JS_FALSE;
13271 : nsresult rv;
13272 :
13273 0 : nsAString &str = arg0;
13274 0 : for (unsigned i = 1; i < argc; ++i) {
13275 0 : xpc_qsDOMString next_arg(cx, argv[i], &argv[i],
13276 : xpc_qsDOMString::eStringify,
13277 0 : xpc_qsDOMString::eStringify);
13278 0 : if (!next_arg.IsValid())
13279 0 : return JS_FALSE;
13280 :
13281 0 : str.Append(next_arg);
13282 : }
13283 :
13284 0 : rv = self->Writeln(arg0, cx);
13285 :
13286 0 : if (NS_FAILED(rv))
13287 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13288 0 : *vp = JSVAL_VOID;
13289 0 : return JS_TRUE;
13290 : }
13291 :
13292 : static JSBool
13293 0 : nsIDOMHTMLDocument_GetDomain(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13294 : {
13295 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13296 : nsHTMLDocument *self;
13297 0 : xpc_qsSelfRef selfref;
13298 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13299 0 : return JS_FALSE;
13300 : nsresult rv;
13301 0 : nsString result;
13302 0 : rv = self->GetDomain(result);
13303 0 : if (NS_FAILED(rv))
13304 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13305 0 : return xpc::StringToJsval(cx, result, vp);
13306 : }
13307 :
13308 : static JSBool
13309 0 : nsIDOMHTMLDocument_SetDomain(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13310 : {
13311 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13312 : nsHTMLDocument *self;
13313 0 : xpc_qsSelfRef selfref;
13314 0 : JS::AutoValueRooter tvr(cx);
13315 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13316 0 : return JS_FALSE;
13317 : xpc_qsDOMString arg0(cx, *vp, vp,
13318 : xpc_qsDOMString::eDefaultNullBehavior,
13319 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13320 0 : if (!arg0.IsValid())
13321 0 : return JS_FALSE;
13322 : nsresult rv;
13323 0 : rv = self->SetDomain(arg0);
13324 0 : if (NS_FAILED(rv))
13325 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13326 0 : return JS_TRUE;
13327 : }
13328 :
13329 : static JSBool
13330 0 : nsIDOMHTMLDocument_GetSelection(JSContext *cx, unsigned argc, jsval *vp)
13331 : {
13332 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13333 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13334 0 : if (!obj)
13335 0 : return JS_FALSE;
13336 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
13337 : nsHTMLDocument *self;
13338 0 : xpc_qsSelfRef selfref;
13339 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13340 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
13341 0 : return JS_FALSE;
13342 : nsresult rv;
13343 0 : nsCOMPtr<nsISelection> result;
13344 0 : rv = self->GetSelection(getter_AddRefs(result));
13345 0 : if (NS_FAILED(rv))
13346 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13347 0 : if (!result) {
13348 0 : *vp = JSVAL_NULL;
13349 0 : return JS_TRUE;
13350 : }
13351 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13352 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13353 0 : return JS_TRUE;
13354 : }
13355 : // After this point do not use 'result'!
13356 0 : qsObjectHelper helper(result, cache);
13357 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISelection), &interfaces[k_nsISelection], vp);
13358 : }
13359 :
13360 : static JSBool
13361 0 : nsIDOMHTMLDocument_GetDesignMode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13362 : {
13363 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13364 : nsHTMLDocument *self;
13365 0 : xpc_qsSelfRef selfref;
13366 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13367 0 : return JS_FALSE;
13368 : nsresult rv;
13369 0 : nsString result;
13370 0 : rv = self->GetDesignMode(result);
13371 0 : if (NS_FAILED(rv))
13372 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13373 0 : return xpc::StringToJsval(cx, result, vp);
13374 : }
13375 :
13376 : static JSBool
13377 0 : nsIDOMHTMLDocument_SetDesignMode(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13378 : {
13379 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13380 : nsHTMLDocument *self;
13381 0 : xpc_qsSelfRef selfref;
13382 0 : JS::AutoValueRooter tvr(cx);
13383 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13384 0 : return JS_FALSE;
13385 : xpc_qsDOMString arg0(cx, *vp, vp,
13386 : xpc_qsDOMString::eDefaultNullBehavior,
13387 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13388 0 : if (!arg0.IsValid())
13389 0 : return JS_FALSE;
13390 : nsresult rv;
13391 0 : rv = self->SetDesignMode(arg0);
13392 0 : if (NS_FAILED(rv))
13393 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13394 0 : return JS_TRUE;
13395 : }
13396 :
13397 : static JSBool
13398 0 : nsIDOMHTMLDocument_GetHead(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13399 : {
13400 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13401 0 : JSObject *callee = nsnull;
13402 : nsHTMLDocument *self;
13403 0 : xpc_qsSelfRef selfref;
13404 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13405 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13406 0 : return JS_FALSE;
13407 0 : nsIContent *result = self->GetHead();
13408 : #ifdef DEBUG
13409 : nsresult debug_rv;
13410 0 : nsCOMPtr<nsIDOMHTMLDocument> debug_self;
13411 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
13412 0 : nsCOMPtr<nsIDOMHTMLHeadElement> debug_result;
13413 0 : debug_rv = debug_self->GetHead(getter_AddRefs(debug_result));
13414 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) && xpc_qsSameResult(debug_result, result),
13415 : "Got the wrong answer from the custom method call!");
13416 : #endif
13417 0 : if (!result) {
13418 0 : *vp = JSVAL_NULL;
13419 0 : return JS_TRUE;
13420 : }
13421 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13422 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13423 0 : return JS_TRUE;
13424 : }
13425 : // After this point do not use 'result'!
13426 0 : qsObjectHelper helper(result, cache);
13427 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLHeadElement), &interfaces[k_nsIDOMHTMLHeadElement], vp);
13428 : }
13429 :
13430 : // === interface nsIDOMHTMLElement
13431 :
13432 : static JSBool
13433 0 : nsIDOMHTMLElement_GetId(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13434 : {
13435 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13436 : nsGenericHTMLElement *self;
13437 0 : xpc_qsSelfRef selfref;
13438 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13439 0 : return JS_FALSE;
13440 : nsresult rv;
13441 0 : nsString result;
13442 0 : rv = self->GetId(result);
13443 0 : if (NS_FAILED(rv))
13444 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13445 0 : return xpc::StringToJsval(cx, result, vp);
13446 : }
13447 :
13448 : static JSBool
13449 0 : nsIDOMHTMLElement_SetId(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13450 : {
13451 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13452 : nsGenericHTMLElement *self;
13453 0 : xpc_qsSelfRef selfref;
13454 0 : JS::AutoValueRooter tvr(cx);
13455 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13456 0 : return JS_FALSE;
13457 : xpc_qsDOMString arg0(cx, *vp, vp,
13458 : xpc_qsDOMString::eDefaultNullBehavior,
13459 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13460 0 : if (!arg0.IsValid())
13461 0 : return JS_FALSE;
13462 : nsresult rv;
13463 0 : rv = self->SetId(arg0);
13464 0 : if (NS_FAILED(rv))
13465 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13466 0 : return JS_TRUE;
13467 : }
13468 :
13469 : static JSBool
13470 0 : nsIDOMHTMLElement_GetTitle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13471 : {
13472 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13473 : nsGenericHTMLElement *self;
13474 0 : xpc_qsSelfRef selfref;
13475 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13476 0 : return JS_FALSE;
13477 : nsresult rv;
13478 0 : nsString result;
13479 0 : rv = self->GetTitle(result);
13480 0 : if (NS_FAILED(rv))
13481 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13482 0 : return xpc::StringToJsval(cx, result, vp);
13483 : }
13484 :
13485 : static JSBool
13486 0 : nsIDOMHTMLElement_SetTitle(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13487 : {
13488 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13489 : nsGenericHTMLElement *self;
13490 0 : xpc_qsSelfRef selfref;
13491 0 : JS::AutoValueRooter tvr(cx);
13492 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13493 0 : return JS_FALSE;
13494 : xpc_qsDOMString arg0(cx, *vp, vp,
13495 : xpc_qsDOMString::eDefaultNullBehavior,
13496 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13497 0 : if (!arg0.IsValid())
13498 0 : return JS_FALSE;
13499 : nsresult rv;
13500 0 : rv = self->SetTitle(arg0);
13501 0 : if (NS_FAILED(rv))
13502 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13503 0 : return JS_TRUE;
13504 : }
13505 :
13506 : static JSBool
13507 0 : nsIDOMHTMLElement_GetLang(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13508 : {
13509 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13510 : nsGenericHTMLElement *self;
13511 0 : xpc_qsSelfRef selfref;
13512 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13513 0 : return JS_FALSE;
13514 : nsresult rv;
13515 0 : nsString result;
13516 0 : rv = self->GetLang(result);
13517 0 : if (NS_FAILED(rv))
13518 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13519 0 : return xpc::StringToJsval(cx, result, vp);
13520 : }
13521 :
13522 : static JSBool
13523 0 : nsIDOMHTMLElement_SetLang(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13524 : {
13525 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13526 : nsGenericHTMLElement *self;
13527 0 : xpc_qsSelfRef selfref;
13528 0 : JS::AutoValueRooter tvr(cx);
13529 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13530 0 : return JS_FALSE;
13531 : xpc_qsDOMString arg0(cx, *vp, vp,
13532 : xpc_qsDOMString::eDefaultNullBehavior,
13533 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13534 0 : if (!arg0.IsValid())
13535 0 : return JS_FALSE;
13536 : nsresult rv;
13537 0 : rv = self->SetLang(arg0);
13538 0 : if (NS_FAILED(rv))
13539 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13540 0 : return JS_TRUE;
13541 : }
13542 :
13543 : static JSBool
13544 0 : nsIDOMHTMLElement_GetDir(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13545 : {
13546 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13547 : nsGenericHTMLElement *self;
13548 0 : xpc_qsSelfRef selfref;
13549 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13550 0 : return JS_FALSE;
13551 : nsresult rv;
13552 0 : nsString result;
13553 0 : rv = self->GetDir(result);
13554 0 : if (NS_FAILED(rv))
13555 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13556 0 : return xpc::StringToJsval(cx, result, vp);
13557 : }
13558 :
13559 : static JSBool
13560 0 : nsIDOMHTMLElement_SetDir(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13561 : {
13562 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13563 : nsGenericHTMLElement *self;
13564 0 : xpc_qsSelfRef selfref;
13565 0 : JS::AutoValueRooter tvr(cx);
13566 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13567 0 : return JS_FALSE;
13568 : xpc_qsDOMString arg0(cx, *vp, vp,
13569 : xpc_qsDOMString::eDefaultNullBehavior,
13570 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13571 0 : if (!arg0.IsValid())
13572 0 : return JS_FALSE;
13573 : nsresult rv;
13574 0 : rv = self->SetDir(arg0);
13575 0 : if (NS_FAILED(rv))
13576 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13577 0 : return JS_TRUE;
13578 : }
13579 :
13580 : static JSBool
13581 0 : nsIDOMHTMLElement_GetClassName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13582 : {
13583 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13584 : nsGenericHTMLElement *self;
13585 0 : xpc_qsSelfRef selfref;
13586 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13587 0 : return JS_FALSE;
13588 : nsresult rv;
13589 0 : nsString result;
13590 0 : rv = self->GetClassName(result);
13591 0 : if (NS_FAILED(rv))
13592 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13593 0 : return xpc::StringToJsval(cx, result, vp);
13594 : }
13595 :
13596 : static JSBool
13597 0 : nsIDOMHTMLElement_SetClassName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13598 : {
13599 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13600 : nsGenericHTMLElement *self;
13601 0 : xpc_qsSelfRef selfref;
13602 0 : JS::AutoValueRooter tvr(cx);
13603 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13604 0 : return JS_FALSE;
13605 : xpc_qsDOMString arg0(cx, *vp, vp,
13606 : xpc_qsDOMString::eDefaultNullBehavior,
13607 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13608 0 : if (!arg0.IsValid())
13609 0 : return JS_FALSE;
13610 : nsresult rv;
13611 0 : rv = self->SetClassName(arg0);
13612 0 : if (NS_FAILED(rv))
13613 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13614 0 : return JS_TRUE;
13615 : }
13616 :
13617 : static JSBool
13618 0 : nsIDOMHTMLElement_GetDataset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13619 : {
13620 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13621 0 : JSObject *callee = nsnull;
13622 : nsGenericHTMLElement *self;
13623 0 : xpc_qsSelfRef selfref;
13624 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13625 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13626 0 : return JS_FALSE;
13627 : nsresult rv;
13628 0 : nsCOMPtr<nsIDOMDOMStringMap> result;
13629 0 : rv = self->GetDataset(getter_AddRefs(result));
13630 0 : if (NS_FAILED(rv))
13631 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13632 0 : if (!result) {
13633 0 : *vp = JSVAL_NULL;
13634 0 : return JS_TRUE;
13635 : }
13636 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13637 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13638 0 : return JS_TRUE;
13639 : }
13640 : // After this point do not use 'result'!
13641 0 : qsObjectHelper helper(result, cache);
13642 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringMap), &interfaces[k_nsIDOMDOMStringMap], vp);
13643 : }
13644 :
13645 : static JSBool
13646 0 : nsIDOMHTMLElement_GetHidden(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13647 : {
13648 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13649 : nsGenericHTMLElement *self;
13650 0 : xpc_qsSelfRef selfref;
13651 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13652 0 : return JS_FALSE;
13653 : nsresult rv;
13654 : bool result;
13655 0 : rv = self->GetHidden(&result);
13656 0 : if (NS_FAILED(rv))
13657 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13658 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13659 0 : return JS_TRUE;
13660 : }
13661 :
13662 : static JSBool
13663 0 : nsIDOMHTMLElement_SetHidden(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13664 : {
13665 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13666 : nsGenericHTMLElement *self;
13667 0 : xpc_qsSelfRef selfref;
13668 0 : JS::AutoValueRooter tvr(cx);
13669 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13670 0 : return JS_FALSE;
13671 : JSBool arg0;
13672 0 : JS_ValueToBoolean(cx, *vp, &arg0);
13673 : nsresult rv;
13674 0 : rv = self->SetHidden(arg0);
13675 0 : if (NS_FAILED(rv))
13676 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13677 0 : return JS_TRUE;
13678 : }
13679 :
13680 : static JSBool
13681 0 : nsIDOMHTMLElement_Click(JSContext *cx, unsigned argc, jsval *vp)
13682 : {
13683 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13684 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13685 0 : if (!obj)
13686 0 : return JS_FALSE;
13687 : nsGenericHTMLElement *self;
13688 0 : xpc_qsSelfRef selfref;
13689 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13690 0 : return JS_FALSE;
13691 : nsresult rv;
13692 0 : rv = self->Click();
13693 0 : if (NS_FAILED(rv))
13694 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13695 0 : *vp = JSVAL_VOID;
13696 0 : return JS_TRUE;
13697 : }
13698 :
13699 : static JSBool
13700 0 : nsIDOMHTMLElement_GetTabIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13701 : {
13702 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13703 : nsGenericHTMLElement *self;
13704 0 : xpc_qsSelfRef selfref;
13705 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13706 0 : return JS_FALSE;
13707 : nsresult rv;
13708 : PRInt32 result;
13709 0 : rv = self->GetTabIndex(&result);
13710 0 : if (NS_FAILED(rv))
13711 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13712 0 : *vp = INT_TO_JSVAL(result);
13713 0 : return JS_TRUE;
13714 : }
13715 :
13716 : static JSBool
13717 0 : nsIDOMHTMLElement_SetTabIndex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13718 : {
13719 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13720 : nsGenericHTMLElement *self;
13721 0 : xpc_qsSelfRef selfref;
13722 0 : JS::AutoValueRooter tvr(cx);
13723 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13724 0 : return JS_FALSE;
13725 : int32_t arg0;
13726 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
13727 0 : return JS_FALSE;
13728 : nsresult rv;
13729 0 : rv = self->SetTabIndex(arg0);
13730 0 : if (NS_FAILED(rv))
13731 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13732 0 : return JS_TRUE;
13733 : }
13734 :
13735 : static JSBool
13736 0 : nsIDOMHTMLElement_Focus(JSContext *cx, unsigned argc, jsval *vp)
13737 : {
13738 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13739 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13740 0 : if (!obj)
13741 0 : return JS_FALSE;
13742 : nsGenericHTMLElement *self;
13743 0 : xpc_qsSelfRef selfref;
13744 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13745 0 : return JS_FALSE;
13746 : nsresult rv;
13747 0 : rv = self->Focus();
13748 0 : if (NS_FAILED(rv))
13749 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13750 0 : *vp = JSVAL_VOID;
13751 0 : return JS_TRUE;
13752 : }
13753 :
13754 : static JSBool
13755 0 : nsIDOMHTMLElement_Blur(JSContext *cx, unsigned argc, jsval *vp)
13756 : {
13757 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13758 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
13759 0 : if (!obj)
13760 0 : return JS_FALSE;
13761 : nsGenericHTMLElement *self;
13762 0 : xpc_qsSelfRef selfref;
13763 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
13764 0 : return JS_FALSE;
13765 : nsresult rv;
13766 0 : rv = self->Blur();
13767 0 : if (NS_FAILED(rv))
13768 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
13769 0 : *vp = JSVAL_VOID;
13770 0 : return JS_TRUE;
13771 : }
13772 :
13773 : static JSBool
13774 0 : nsIDOMHTMLElement_GetAccessKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13775 : {
13776 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13777 : nsGenericHTMLElement *self;
13778 0 : xpc_qsSelfRef selfref;
13779 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13780 0 : return JS_FALSE;
13781 : nsresult rv;
13782 0 : nsString result;
13783 0 : rv = self->GetAccessKey(result);
13784 0 : if (NS_FAILED(rv))
13785 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13786 0 : return xpc::StringToJsval(cx, result, vp);
13787 : }
13788 :
13789 : static JSBool
13790 0 : nsIDOMHTMLElement_SetAccessKey(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13791 : {
13792 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13793 : nsGenericHTMLElement *self;
13794 0 : xpc_qsSelfRef selfref;
13795 0 : JS::AutoValueRooter tvr(cx);
13796 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13797 0 : return JS_FALSE;
13798 : xpc_qsDOMString arg0(cx, *vp, vp,
13799 : xpc_qsDOMString::eDefaultNullBehavior,
13800 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13801 0 : if (!arg0.IsValid())
13802 0 : return JS_FALSE;
13803 : nsresult rv;
13804 0 : rv = self->SetAccessKey(arg0);
13805 0 : if (NS_FAILED(rv))
13806 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13807 0 : return JS_TRUE;
13808 : }
13809 :
13810 : static JSBool
13811 0 : nsIDOMHTMLElement_GetAccessKeyLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13812 : {
13813 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13814 : nsGenericHTMLElement *self;
13815 0 : xpc_qsSelfRef selfref;
13816 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13817 0 : return JS_FALSE;
13818 : nsresult rv;
13819 0 : nsString result;
13820 0 : rv = self->GetAccessKeyLabel(result);
13821 0 : if (NS_FAILED(rv))
13822 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13823 0 : return xpc::StringToJsval(cx, result, vp);
13824 : }
13825 :
13826 : static JSBool
13827 0 : nsIDOMHTMLElement_GetDraggable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13828 : {
13829 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13830 : nsGenericHTMLElement *self;
13831 0 : xpc_qsSelfRef selfref;
13832 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13833 0 : return JS_FALSE;
13834 : nsresult rv;
13835 : bool result;
13836 0 : rv = self->GetDraggable(&result);
13837 0 : if (NS_FAILED(rv))
13838 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13839 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13840 0 : return JS_TRUE;
13841 : }
13842 :
13843 : static JSBool
13844 0 : nsIDOMHTMLElement_SetDraggable(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13845 : {
13846 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13847 : nsGenericHTMLElement *self;
13848 0 : xpc_qsSelfRef selfref;
13849 0 : JS::AutoValueRooter tvr(cx);
13850 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13851 0 : return JS_FALSE;
13852 : JSBool arg0;
13853 0 : JS_ValueToBoolean(cx, *vp, &arg0);
13854 : nsresult rv;
13855 0 : rv = self->SetDraggable(arg0);
13856 0 : if (NS_FAILED(rv))
13857 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13858 0 : return JS_TRUE;
13859 : }
13860 :
13861 : static JSBool
13862 0 : nsIDOMHTMLElement_GetContentEditable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13863 : {
13864 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13865 : nsGenericHTMLElement *self;
13866 0 : xpc_qsSelfRef selfref;
13867 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13868 0 : return JS_FALSE;
13869 : nsresult rv;
13870 0 : nsString result;
13871 0 : rv = self->GetContentEditable(result);
13872 0 : if (NS_FAILED(rv))
13873 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13874 0 : return xpc::StringToJsval(cx, result, vp);
13875 : }
13876 :
13877 : static JSBool
13878 0 : nsIDOMHTMLElement_SetContentEditable(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13879 : {
13880 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13881 : nsGenericHTMLElement *self;
13882 0 : xpc_qsSelfRef selfref;
13883 0 : JS::AutoValueRooter tvr(cx);
13884 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13885 0 : return JS_FALSE;
13886 : xpc_qsDOMString arg0(cx, *vp, vp,
13887 : xpc_qsDOMString::eDefaultNullBehavior,
13888 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
13889 0 : if (!arg0.IsValid())
13890 0 : return JS_FALSE;
13891 : nsresult rv;
13892 0 : rv = self->SetContentEditable(arg0);
13893 0 : if (NS_FAILED(rv))
13894 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13895 0 : return JS_TRUE;
13896 : }
13897 :
13898 : static JSBool
13899 0 : nsIDOMHTMLElement_GetIsContentEditable(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13900 : {
13901 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13902 : nsGenericHTMLElement *self;
13903 0 : xpc_qsSelfRef selfref;
13904 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13905 0 : return JS_FALSE;
13906 : nsresult rv;
13907 : bool result;
13908 0 : rv = self->GetIsContentEditable(&result);
13909 0 : if (NS_FAILED(rv))
13910 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13911 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13912 0 : return JS_TRUE;
13913 : }
13914 :
13915 : static JSBool
13916 0 : nsIDOMHTMLElement_GetContextMenu(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13917 : {
13918 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13919 0 : JSObject *callee = nsnull;
13920 : nsGenericHTMLElement *self;
13921 0 : xpc_qsSelfRef selfref;
13922 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
13923 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
13924 0 : return JS_FALSE;
13925 : nsresult rv;
13926 0 : nsCOMPtr<nsIDOMHTMLMenuElement> result;
13927 0 : rv = self->GetContextMenu(getter_AddRefs(result));
13928 0 : if (NS_FAILED(rv))
13929 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13930 0 : if (!result) {
13931 0 : *vp = JSVAL_NULL;
13932 0 : return JS_TRUE;
13933 : }
13934 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
13935 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
13936 0 : return JS_TRUE;
13937 : }
13938 : // After this point do not use 'result'!
13939 0 : qsObjectHelper helper(result, cache);
13940 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLMenuElement), &interfaces[k_nsIDOMHTMLMenuElement], vp);
13941 : }
13942 :
13943 : static JSBool
13944 0 : nsIDOMHTMLElement_GetSpellcheck(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13945 : {
13946 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13947 : nsGenericHTMLElement *self;
13948 0 : xpc_qsSelfRef selfref;
13949 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13950 0 : return JS_FALSE;
13951 : nsresult rv;
13952 : bool result;
13953 0 : rv = self->GetSpellcheck(&result);
13954 0 : if (NS_FAILED(rv))
13955 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13956 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
13957 0 : return JS_TRUE;
13958 : }
13959 :
13960 : static JSBool
13961 0 : nsIDOMHTMLElement_SetSpellcheck(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13962 : {
13963 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13964 : nsGenericHTMLElement *self;
13965 0 : xpc_qsSelfRef selfref;
13966 0 : JS::AutoValueRooter tvr(cx);
13967 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
13968 0 : return JS_FALSE;
13969 : JSBool arg0;
13970 0 : JS_ValueToBoolean(cx, *vp, &arg0);
13971 : nsresult rv;
13972 0 : rv = self->SetSpellcheck(arg0);
13973 0 : if (NS_FAILED(rv))
13974 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
13975 0 : return JS_TRUE;
13976 : }
13977 :
13978 : static JSBool
13979 0 : nsIDOMHTMLElement_GetInnerHTML(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
13980 : {
13981 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13982 : nsGenericHTMLElement *self;
13983 0 : xpc_qsSelfRef selfref;
13984 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
13985 0 : return JS_FALSE;
13986 : nsresult rv;
13987 0 : nsString result;
13988 0 : rv = self->GetInnerHTML(result);
13989 0 : if (NS_FAILED(rv))
13990 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
13991 0 : return xpc::StringToJsval(cx, result, vp);
13992 : }
13993 :
13994 : static JSBool
13995 0 : nsIDOMHTMLElement_SetInnerHTML(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
13996 : {
13997 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
13998 : nsGenericHTMLElement *self;
13999 0 : xpc_qsSelfRef selfref;
14000 0 : JS::AutoValueRooter tvr(cx);
14001 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14002 0 : return JS_FALSE;
14003 : xpc_qsDOMString arg0(cx, *vp, vp,
14004 : xpc_qsDOMString::eDefaultNullBehavior,
14005 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14006 0 : if (!arg0.IsValid())
14007 0 : return JS_FALSE;
14008 : nsresult rv;
14009 0 : rv = self->SetInnerHTML(arg0);
14010 0 : if (NS_FAILED(rv))
14011 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14012 0 : return JS_TRUE;
14013 : }
14014 :
14015 : static JSBool
14016 0 : nsIDOMHTMLElement_GetOuterHTML(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14017 : {
14018 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14019 : nsGenericHTMLElement *self;
14020 0 : xpc_qsSelfRef selfref;
14021 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14022 0 : return JS_FALSE;
14023 : nsresult rv;
14024 0 : nsString result;
14025 0 : rv = self->GetOuterHTML(result);
14026 0 : if (NS_FAILED(rv))
14027 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14028 0 : return xpc::StringToJsval(cx, result, vp);
14029 : }
14030 :
14031 : static JSBool
14032 0 : nsIDOMHTMLElement_SetOuterHTML(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14033 : {
14034 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14035 : nsGenericHTMLElement *self;
14036 0 : xpc_qsSelfRef selfref;
14037 0 : JS::AutoValueRooter tvr(cx);
14038 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14039 0 : return JS_FALSE;
14040 : xpc_qsDOMString arg0(cx, *vp, vp,
14041 : xpc_qsDOMString::eDefaultNullBehavior,
14042 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14043 0 : if (!arg0.IsValid())
14044 0 : return JS_FALSE;
14045 : nsresult rv;
14046 0 : rv = self->SetOuterHTML(arg0);
14047 0 : if (NS_FAILED(rv))
14048 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14049 0 : return JS_TRUE;
14050 : }
14051 :
14052 : static JSBool
14053 0 : nsIDOMHTMLElement_InsertAdjacentHTML(JSContext *cx, unsigned argc, jsval *vp)
14054 : {
14055 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14056 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14057 0 : if (!obj)
14058 0 : return JS_FALSE;
14059 : nsGenericHTMLElement *self;
14060 0 : xpc_qsSelfRef selfref;
14061 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14062 0 : return JS_FALSE;
14063 0 : if (argc < 2)
14064 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
14065 0 : jsval *argv = JS_ARGV(cx, vp);
14066 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
14067 : xpc_qsDOMString::eDefaultNullBehavior,
14068 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14069 0 : if (!arg0.IsValid())
14070 0 : return JS_FALSE;
14071 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
14072 : xpc_qsDOMString::eDefaultNullBehavior,
14073 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14074 0 : if (!arg1.IsValid())
14075 0 : return JS_FALSE;
14076 : nsresult rv;
14077 0 : rv = self->InsertAdjacentHTML(arg0, arg1);
14078 0 : if (NS_FAILED(rv))
14079 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14080 0 : *vp = JSVAL_VOID;
14081 0 : return JS_TRUE;
14082 : }
14083 :
14084 : static JSBool
14085 0 : nsIDOMHTMLElement_ScrollIntoView(JSContext *cx, unsigned argc, jsval *vp)
14086 : {
14087 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14088 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14089 0 : if (!obj)
14090 0 : return JS_FALSE;
14091 : nsGenericHTMLElement *self;
14092 0 : xpc_qsSelfRef selfref;
14093 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14094 0 : return JS_FALSE;
14095 0 : jsval *argv = JS_ARGV(cx, vp);
14096 : JSBool arg0;
14097 0 : JS_ValueToBoolean(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0);
14098 : nsresult rv;
14099 0 : rv = self->ScrollIntoView(arg0, NS_MIN<PRUint32>(argc, 1) - 0);
14100 0 : if (NS_FAILED(rv))
14101 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14102 0 : *vp = JSVAL_VOID;
14103 0 : return JS_TRUE;
14104 : }
14105 :
14106 : static JSBool
14107 0 : nsIDOMHTMLElement_GetOffsetParent(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14108 : {
14109 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14110 0 : JSObject *callee = nsnull;
14111 : nsGenericHTMLElement *self;
14112 0 : xpc_qsSelfRef selfref;
14113 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14114 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14115 0 : return JS_FALSE;
14116 : nsresult rv;
14117 0 : nsCOMPtr<nsIDOMElement> result;
14118 0 : rv = self->GetOffsetParent(getter_AddRefs(result));
14119 0 : if (NS_FAILED(rv))
14120 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14121 0 : if (!result) {
14122 0 : *vp = JSVAL_NULL;
14123 0 : return JS_TRUE;
14124 : }
14125 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14126 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14127 0 : return JS_TRUE;
14128 : }
14129 : // After this point do not use 'result'!
14130 0 : qsObjectHelper helper(result, cache);
14131 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMElement), &interfaces[k_nsIDOMElement], vp);
14132 : }
14133 :
14134 : static JSBool
14135 0 : nsIDOMHTMLElement_GetOffsetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14136 : {
14137 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14138 : nsGenericHTMLElement *self;
14139 0 : xpc_qsSelfRef selfref;
14140 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14141 0 : return JS_FALSE;
14142 : nsresult rv;
14143 : PRInt32 result;
14144 0 : rv = self->GetOffsetTop(&result);
14145 0 : if (NS_FAILED(rv))
14146 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14147 0 : *vp = INT_TO_JSVAL(result);
14148 0 : return JS_TRUE;
14149 : }
14150 :
14151 : static JSBool
14152 0 : nsIDOMHTMLElement_GetOffsetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14153 : {
14154 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14155 : nsGenericHTMLElement *self;
14156 0 : xpc_qsSelfRef selfref;
14157 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14158 0 : return JS_FALSE;
14159 : nsresult rv;
14160 : PRInt32 result;
14161 0 : rv = self->GetOffsetLeft(&result);
14162 0 : if (NS_FAILED(rv))
14163 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14164 0 : *vp = INT_TO_JSVAL(result);
14165 0 : return JS_TRUE;
14166 : }
14167 :
14168 : static JSBool
14169 0 : nsIDOMHTMLElement_GetOffsetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14170 : {
14171 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14172 : nsGenericHTMLElement *self;
14173 0 : xpc_qsSelfRef selfref;
14174 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14175 0 : return JS_FALSE;
14176 : nsresult rv;
14177 : PRInt32 result;
14178 0 : rv = self->GetOffsetWidth(&result);
14179 0 : if (NS_FAILED(rv))
14180 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14181 0 : *vp = INT_TO_JSVAL(result);
14182 0 : return JS_TRUE;
14183 : }
14184 :
14185 : static JSBool
14186 0 : nsIDOMHTMLElement_GetOffsetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14187 : {
14188 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14189 : nsGenericHTMLElement *self;
14190 0 : xpc_qsSelfRef selfref;
14191 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14192 0 : return JS_FALSE;
14193 : nsresult rv;
14194 : PRInt32 result;
14195 0 : rv = self->GetOffsetHeight(&result);
14196 0 : if (NS_FAILED(rv))
14197 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14198 0 : *vp = INT_TO_JSVAL(result);
14199 0 : return JS_TRUE;
14200 : }
14201 :
14202 : static JSBool
14203 0 : nsIDOMHTMLElement_MozRequestFullScreen(JSContext *cx, unsigned argc, jsval *vp)
14204 : {
14205 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14206 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14207 0 : if (!obj)
14208 0 : return JS_FALSE;
14209 : nsGenericHTMLElement *self;
14210 0 : xpc_qsSelfRef selfref;
14211 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14212 0 : return JS_FALSE;
14213 : nsresult rv;
14214 0 : rv = self->MozRequestFullScreen();
14215 0 : if (NS_FAILED(rv))
14216 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14217 0 : *vp = JSVAL_VOID;
14218 0 : return JS_TRUE;
14219 : }
14220 :
14221 : // === interface nsIDOMHTMLFormElement
14222 :
14223 : static JSBool
14224 0 : nsIDOMHTMLFormElement_GetElements(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14225 : {
14226 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14227 0 : JSObject *callee = nsnull;
14228 : nsIDOMHTMLFormElement *self;
14229 0 : xpc_qsSelfRef selfref;
14230 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14231 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14232 0 : return JS_FALSE;
14233 : nsresult rv;
14234 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
14235 0 : rv = self->GetElements(getter_AddRefs(result));
14236 0 : if (NS_FAILED(rv))
14237 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14238 0 : if (!result) {
14239 0 : *vp = JSVAL_NULL;
14240 0 : return JS_TRUE;
14241 : }
14242 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14243 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14244 0 : return JS_TRUE;
14245 : }
14246 : // After this point do not use 'result'!
14247 0 : qsObjectHelper helper(result, cache);
14248 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
14249 : }
14250 :
14251 : static JSBool
14252 0 : nsIDOMHTMLFormElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14253 : {
14254 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14255 : nsIDOMHTMLFormElement *self;
14256 0 : xpc_qsSelfRef selfref;
14257 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14258 0 : return JS_FALSE;
14259 : nsresult rv;
14260 0 : nsString result;
14261 0 : rv = self->GetName(result);
14262 0 : if (NS_FAILED(rv))
14263 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14264 0 : return xpc::StringToJsval(cx, result, vp);
14265 : }
14266 :
14267 : static JSBool
14268 0 : nsIDOMHTMLFormElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14269 : {
14270 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14271 : nsIDOMHTMLFormElement *self;
14272 0 : xpc_qsSelfRef selfref;
14273 0 : JS::AutoValueRooter tvr(cx);
14274 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14275 0 : return JS_FALSE;
14276 : xpc_qsDOMString arg0(cx, *vp, vp,
14277 : xpc_qsDOMString::eDefaultNullBehavior,
14278 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14279 0 : if (!arg0.IsValid())
14280 0 : return JS_FALSE;
14281 : nsresult rv;
14282 0 : rv = self->SetName(arg0);
14283 0 : if (NS_FAILED(rv))
14284 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14285 0 : return JS_TRUE;
14286 : }
14287 :
14288 : static JSBool
14289 0 : nsIDOMHTMLFormElement_Submit(JSContext *cx, unsigned argc, jsval *vp)
14290 : {
14291 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14292 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14293 0 : if (!obj)
14294 0 : return JS_FALSE;
14295 : nsIDOMHTMLFormElement *self;
14296 0 : xpc_qsSelfRef selfref;
14297 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14298 0 : return JS_FALSE;
14299 : nsresult rv;
14300 0 : rv = self->Submit();
14301 0 : if (NS_FAILED(rv))
14302 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14303 0 : *vp = JSVAL_VOID;
14304 0 : return JS_TRUE;
14305 : }
14306 :
14307 : static JSBool
14308 0 : nsIDOMHTMLFormElement_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14309 : {
14310 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14311 : nsIDOMHTMLFormElement *self;
14312 0 : xpc_qsSelfRef selfref;
14313 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14314 0 : return JS_FALSE;
14315 : nsresult rv;
14316 : PRInt32 result;
14317 0 : rv = self->GetLength(&result);
14318 0 : if (NS_FAILED(rv))
14319 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14320 0 : *vp = INT_TO_JSVAL(result);
14321 0 : return JS_TRUE;
14322 : }
14323 :
14324 : static JSBool
14325 0 : nsIDOMHTMLFormElement_GetTarget(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14326 : {
14327 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14328 : nsIDOMHTMLFormElement *self;
14329 0 : xpc_qsSelfRef selfref;
14330 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14331 0 : return JS_FALSE;
14332 : nsresult rv;
14333 0 : nsString result;
14334 0 : rv = self->GetTarget(result);
14335 0 : if (NS_FAILED(rv))
14336 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14337 0 : return xpc::StringToJsval(cx, result, vp);
14338 : }
14339 :
14340 : static JSBool
14341 0 : nsIDOMHTMLFormElement_SetTarget(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14342 : {
14343 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14344 : nsIDOMHTMLFormElement *self;
14345 0 : xpc_qsSelfRef selfref;
14346 0 : JS::AutoValueRooter tvr(cx);
14347 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14348 0 : return JS_FALSE;
14349 : xpc_qsDOMString arg0(cx, *vp, vp,
14350 : xpc_qsDOMString::eDefaultNullBehavior,
14351 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14352 0 : if (!arg0.IsValid())
14353 0 : return JS_FALSE;
14354 : nsresult rv;
14355 0 : rv = self->SetTarget(arg0);
14356 0 : if (NS_FAILED(rv))
14357 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14358 0 : return JS_TRUE;
14359 : }
14360 :
14361 : static JSBool
14362 0 : nsIDOMHTMLFormElement_GetAction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14363 : {
14364 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14365 : nsIDOMHTMLFormElement *self;
14366 0 : xpc_qsSelfRef selfref;
14367 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14368 0 : return JS_FALSE;
14369 : nsresult rv;
14370 0 : nsString result;
14371 0 : rv = self->GetAction(result);
14372 0 : if (NS_FAILED(rv))
14373 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14374 0 : return xpc::StringToJsval(cx, result, vp);
14375 : }
14376 :
14377 : static JSBool
14378 0 : nsIDOMHTMLFormElement_SetAction(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14379 : {
14380 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14381 : nsIDOMHTMLFormElement *self;
14382 0 : xpc_qsSelfRef selfref;
14383 0 : JS::AutoValueRooter tvr(cx);
14384 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14385 0 : return JS_FALSE;
14386 : xpc_qsDOMString arg0(cx, *vp, vp,
14387 : xpc_qsDOMString::eDefaultNullBehavior,
14388 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14389 0 : if (!arg0.IsValid())
14390 0 : return JS_FALSE;
14391 : nsresult rv;
14392 0 : rv = self->SetAction(arg0);
14393 0 : if (NS_FAILED(rv))
14394 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14395 0 : return JS_TRUE;
14396 : }
14397 :
14398 : // === interface nsIDOMHTMLFrameElement
14399 :
14400 : static JSBool
14401 0 : nsIDOMHTMLFrameElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14402 : {
14403 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14404 : nsIDOMHTMLFrameElement *self;
14405 0 : xpc_qsSelfRef selfref;
14406 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14407 0 : return JS_FALSE;
14408 : nsresult rv;
14409 0 : nsString result;
14410 0 : rv = self->GetSrc(result);
14411 0 : if (NS_FAILED(rv))
14412 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14413 0 : return xpc::StringToJsval(cx, result, vp);
14414 : }
14415 :
14416 : static JSBool
14417 0 : nsIDOMHTMLFrameElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14418 : {
14419 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14420 : nsIDOMHTMLFrameElement *self;
14421 0 : xpc_qsSelfRef selfref;
14422 0 : JS::AutoValueRooter tvr(cx);
14423 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14424 0 : return JS_FALSE;
14425 : xpc_qsDOMString arg0(cx, *vp, vp,
14426 : xpc_qsDOMString::eDefaultNullBehavior,
14427 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14428 0 : if (!arg0.IsValid())
14429 0 : return JS_FALSE;
14430 : nsresult rv;
14431 0 : rv = self->SetSrc(arg0);
14432 0 : if (NS_FAILED(rv))
14433 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14434 0 : return JS_TRUE;
14435 : }
14436 :
14437 : static JSBool
14438 0 : nsIDOMHTMLFrameElement_GetContentDocument(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14439 : {
14440 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14441 0 : JSObject *callee = nsnull;
14442 : nsIDOMHTMLFrameElement *self;
14443 0 : xpc_qsSelfRef selfref;
14444 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14445 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14446 0 : return JS_FALSE;
14447 : nsresult rv;
14448 0 : nsCOMPtr<nsIDOMDocument> result;
14449 0 : rv = self->GetContentDocument(getter_AddRefs(result));
14450 0 : if (NS_FAILED(rv))
14451 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14452 0 : if (!result) {
14453 0 : *vp = JSVAL_NULL;
14454 0 : return JS_TRUE;
14455 : }
14456 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14457 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14458 0 : return JS_TRUE;
14459 : }
14460 : // After this point do not use 'result'!
14461 0 : qsObjectHelper helper(result, cache);
14462 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
14463 : }
14464 :
14465 : static JSBool
14466 0 : nsIDOMHTMLFrameElement_GetContentWindow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14467 : {
14468 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14469 0 : JSObject *callee = nsnull;
14470 : nsIDOMHTMLFrameElement *self;
14471 0 : xpc_qsSelfRef selfref;
14472 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14473 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14474 0 : return JS_FALSE;
14475 : nsresult rv;
14476 0 : nsCOMPtr<nsIDOMWindow> result;
14477 0 : rv = self->GetContentWindow(getter_AddRefs(result));
14478 0 : if (NS_FAILED(rv))
14479 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14480 0 : if (!result) {
14481 0 : *vp = JSVAL_NULL;
14482 0 : return JS_TRUE;
14483 : }
14484 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14485 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14486 0 : return JS_TRUE;
14487 : }
14488 : // After this point do not use 'result'!
14489 0 : qsObjectHelper helper(result, cache);
14490 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
14491 : }
14492 :
14493 : static JSBool
14494 0 : nsIDOMHTMLFrameElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14495 : {
14496 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14497 : nsIDOMHTMLFrameElement *self;
14498 0 : xpc_qsSelfRef selfref;
14499 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14500 0 : return JS_FALSE;
14501 : nsresult rv;
14502 0 : nsString result;
14503 0 : rv = self->GetName(result);
14504 0 : if (NS_FAILED(rv))
14505 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14506 0 : return xpc::StringToJsval(cx, result, vp);
14507 : }
14508 :
14509 : static JSBool
14510 0 : nsIDOMHTMLFrameElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14511 : {
14512 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14513 : nsIDOMHTMLFrameElement *self;
14514 0 : xpc_qsSelfRef selfref;
14515 0 : JS::AutoValueRooter tvr(cx);
14516 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14517 0 : return JS_FALSE;
14518 : xpc_qsDOMString arg0(cx, *vp, vp,
14519 : xpc_qsDOMString::eDefaultNullBehavior,
14520 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14521 0 : if (!arg0.IsValid())
14522 0 : return JS_FALSE;
14523 : nsresult rv;
14524 0 : rv = self->SetName(arg0);
14525 0 : if (NS_FAILED(rv))
14526 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14527 0 : return JS_TRUE;
14528 : }
14529 :
14530 : // === interface nsIDOMHTMLFrameSetElement
14531 :
14532 : static JSBool
14533 0 : nsIDOMHTMLFrameSetElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14534 : {
14535 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14536 : nsIDOMHTMLFrameSetElement *self;
14537 0 : xpc_qsSelfRef selfref;
14538 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14539 0 : return JS_FALSE;
14540 : nsresult rv;
14541 0 : nsString result;
14542 0 : rv = self->GetRows(result);
14543 0 : if (NS_FAILED(rv))
14544 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14545 0 : return xpc::StringToJsval(cx, result, vp);
14546 : }
14547 :
14548 : static JSBool
14549 0 : nsIDOMHTMLFrameSetElement_SetRows(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14550 : {
14551 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14552 : nsIDOMHTMLFrameSetElement *self;
14553 0 : xpc_qsSelfRef selfref;
14554 0 : JS::AutoValueRooter tvr(cx);
14555 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14556 0 : return JS_FALSE;
14557 : xpc_qsDOMString arg0(cx, *vp, vp,
14558 : xpc_qsDOMString::eDefaultNullBehavior,
14559 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14560 0 : if (!arg0.IsValid())
14561 0 : return JS_FALSE;
14562 : nsresult rv;
14563 0 : rv = self->SetRows(arg0);
14564 0 : if (NS_FAILED(rv))
14565 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14566 0 : return JS_TRUE;
14567 : }
14568 :
14569 : static JSBool
14570 0 : nsIDOMHTMLFrameSetElement_GetCols(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14571 : {
14572 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14573 : nsIDOMHTMLFrameSetElement *self;
14574 0 : xpc_qsSelfRef selfref;
14575 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14576 0 : return JS_FALSE;
14577 : nsresult rv;
14578 0 : nsString result;
14579 0 : rv = self->GetCols(result);
14580 0 : if (NS_FAILED(rv))
14581 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14582 0 : return xpc::StringToJsval(cx, result, vp);
14583 : }
14584 :
14585 : static JSBool
14586 0 : nsIDOMHTMLFrameSetElement_SetCols(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14587 : {
14588 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14589 : nsIDOMHTMLFrameSetElement *self;
14590 0 : xpc_qsSelfRef selfref;
14591 0 : JS::AutoValueRooter tvr(cx);
14592 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14593 0 : return JS_FALSE;
14594 : xpc_qsDOMString arg0(cx, *vp, vp,
14595 : xpc_qsDOMString::eDefaultNullBehavior,
14596 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14597 0 : if (!arg0.IsValid())
14598 0 : return JS_FALSE;
14599 : nsresult rv;
14600 0 : rv = self->SetCols(arg0);
14601 0 : if (NS_FAILED(rv))
14602 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14603 0 : return JS_TRUE;
14604 : }
14605 :
14606 : // === interface nsIDOMHTMLIFrameElement
14607 :
14608 : static JSBool
14609 0 : nsIDOMHTMLIFrameElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14610 : {
14611 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14612 : nsIDOMHTMLIFrameElement *self;
14613 0 : xpc_qsSelfRef selfref;
14614 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14615 0 : return JS_FALSE;
14616 : nsresult rv;
14617 0 : nsString result;
14618 0 : rv = self->GetSrc(result);
14619 0 : if (NS_FAILED(rv))
14620 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14621 0 : return xpc::StringToJsval(cx, result, vp);
14622 : }
14623 :
14624 : static JSBool
14625 0 : nsIDOMHTMLIFrameElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14626 : {
14627 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14628 : nsIDOMHTMLIFrameElement *self;
14629 0 : xpc_qsSelfRef selfref;
14630 0 : JS::AutoValueRooter tvr(cx);
14631 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14632 0 : return JS_FALSE;
14633 : xpc_qsDOMString arg0(cx, *vp, vp,
14634 : xpc_qsDOMString::eDefaultNullBehavior,
14635 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14636 0 : if (!arg0.IsValid())
14637 0 : return JS_FALSE;
14638 : nsresult rv;
14639 0 : rv = self->SetSrc(arg0);
14640 0 : if (NS_FAILED(rv))
14641 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14642 0 : return JS_TRUE;
14643 : }
14644 :
14645 : static JSBool
14646 0 : nsIDOMHTMLIFrameElement_GetContentDocument(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14647 : {
14648 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14649 0 : JSObject *callee = nsnull;
14650 : nsIDOMHTMLIFrameElement *self;
14651 0 : xpc_qsSelfRef selfref;
14652 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14653 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14654 0 : return JS_FALSE;
14655 : nsresult rv;
14656 0 : nsCOMPtr<nsIDOMDocument> result;
14657 0 : rv = self->GetContentDocument(getter_AddRefs(result));
14658 0 : if (NS_FAILED(rv))
14659 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14660 0 : if (!result) {
14661 0 : *vp = JSVAL_NULL;
14662 0 : return JS_TRUE;
14663 : }
14664 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14665 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14666 0 : return JS_TRUE;
14667 : }
14668 : // After this point do not use 'result'!
14669 0 : qsObjectHelper helper(result, cache);
14670 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
14671 : }
14672 :
14673 : static JSBool
14674 0 : nsIDOMHTMLIFrameElement_GetContentWindow(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14675 : {
14676 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14677 0 : JSObject *callee = nsnull;
14678 : nsIDOMHTMLIFrameElement *self;
14679 0 : xpc_qsSelfRef selfref;
14680 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
14681 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
14682 0 : return JS_FALSE;
14683 : nsresult rv;
14684 0 : nsCOMPtr<nsIDOMWindow> result;
14685 0 : rv = self->GetContentWindow(getter_AddRefs(result));
14686 0 : if (NS_FAILED(rv))
14687 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14688 0 : if (!result) {
14689 0 : *vp = JSVAL_NULL;
14690 0 : return JS_TRUE;
14691 : }
14692 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
14693 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
14694 0 : return JS_TRUE;
14695 : }
14696 : // After this point do not use 'result'!
14697 0 : qsObjectHelper helper(result, cache);
14698 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMWindow), &interfaces[k_nsIDOMWindow], vp);
14699 : }
14700 :
14701 : // === interface nsIDOMHTMLImageElement
14702 :
14703 : static JSBool
14704 0 : nsIDOMHTMLImageElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14705 : {
14706 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14707 : nsIDOMHTMLImageElement *self;
14708 0 : xpc_qsSelfRef selfref;
14709 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14710 0 : return JS_FALSE;
14711 : nsresult rv;
14712 0 : nsString result;
14713 0 : rv = self->GetSrc(result);
14714 0 : if (NS_FAILED(rv))
14715 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14716 0 : return xpc::StringToJsval(cx, result, vp);
14717 : }
14718 :
14719 : static JSBool
14720 0 : nsIDOMHTMLImageElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14721 : {
14722 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14723 : nsIDOMHTMLImageElement *self;
14724 0 : xpc_qsSelfRef selfref;
14725 0 : JS::AutoValueRooter tvr(cx);
14726 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14727 0 : return JS_FALSE;
14728 : xpc_qsDOMString arg0(cx, *vp, vp,
14729 : xpc_qsDOMString::eDefaultNullBehavior,
14730 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14731 0 : if (!arg0.IsValid())
14732 0 : return JS_FALSE;
14733 : nsresult rv;
14734 0 : rv = self->SetSrc(arg0);
14735 0 : if (NS_FAILED(rv))
14736 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14737 0 : return JS_TRUE;
14738 : }
14739 :
14740 : static JSBool
14741 0 : nsIDOMHTMLImageElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14742 : {
14743 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14744 : nsIDOMHTMLImageElement *self;
14745 0 : xpc_qsSelfRef selfref;
14746 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14747 0 : return JS_FALSE;
14748 : nsresult rv;
14749 0 : nsString result;
14750 0 : rv = self->GetName(result);
14751 0 : if (NS_FAILED(rv))
14752 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14753 0 : return xpc::StringToJsval(cx, result, vp);
14754 : }
14755 :
14756 : static JSBool
14757 0 : nsIDOMHTMLImageElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14758 : {
14759 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14760 : nsIDOMHTMLImageElement *self;
14761 0 : xpc_qsSelfRef selfref;
14762 0 : JS::AutoValueRooter tvr(cx);
14763 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14764 0 : return JS_FALSE;
14765 : xpc_qsDOMString arg0(cx, *vp, vp,
14766 : xpc_qsDOMString::eDefaultNullBehavior,
14767 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
14768 0 : if (!arg0.IsValid())
14769 0 : return JS_FALSE;
14770 : nsresult rv;
14771 0 : rv = self->SetName(arg0);
14772 0 : if (NS_FAILED(rv))
14773 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14774 0 : return JS_TRUE;
14775 : }
14776 :
14777 : static JSBool
14778 0 : nsIDOMHTMLImageElement_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14779 : {
14780 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14781 : nsIDOMHTMLImageElement *self;
14782 0 : xpc_qsSelfRef selfref;
14783 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14784 0 : return JS_FALSE;
14785 : nsresult rv;
14786 : PRUint32 result;
14787 0 : rv = self->GetHeight(&result);
14788 0 : if (NS_FAILED(rv))
14789 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14790 0 : *vp = UINT_TO_JSVAL(result);
14791 0 : return JS_TRUE;
14792 : }
14793 :
14794 : static JSBool
14795 0 : nsIDOMHTMLImageElement_SetHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14796 : {
14797 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14798 : nsIDOMHTMLImageElement *self;
14799 0 : xpc_qsSelfRef selfref;
14800 0 : JS::AutoValueRooter tvr(cx);
14801 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14802 0 : return JS_FALSE;
14803 : uint32_t arg0;
14804 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
14805 0 : return JS_FALSE;
14806 : nsresult rv;
14807 0 : rv = self->SetHeight(arg0);
14808 0 : if (NS_FAILED(rv))
14809 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14810 0 : return JS_TRUE;
14811 : }
14812 :
14813 : static JSBool
14814 0 : nsIDOMHTMLImageElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14815 : {
14816 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14817 : nsIDOMHTMLImageElement *self;
14818 0 : xpc_qsSelfRef selfref;
14819 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14820 0 : return JS_FALSE;
14821 : nsresult rv;
14822 : PRUint32 result;
14823 0 : rv = self->GetWidth(&result);
14824 0 : if (NS_FAILED(rv))
14825 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14826 0 : *vp = UINT_TO_JSVAL(result);
14827 0 : return JS_TRUE;
14828 : }
14829 :
14830 : static JSBool
14831 0 : nsIDOMHTMLImageElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14832 : {
14833 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14834 : nsIDOMHTMLImageElement *self;
14835 0 : xpc_qsSelfRef selfref;
14836 0 : JS::AutoValueRooter tvr(cx);
14837 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14838 0 : return JS_FALSE;
14839 : uint32_t arg0;
14840 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
14841 0 : return JS_FALSE;
14842 : nsresult rv;
14843 0 : rv = self->SetWidth(arg0);
14844 0 : if (NS_FAILED(rv))
14845 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14846 0 : return JS_TRUE;
14847 : }
14848 :
14849 : static JSBool
14850 0 : nsIDOMHTMLImageElement_GetComplete(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14851 : {
14852 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14853 : nsIDOMHTMLImageElement *self;
14854 0 : xpc_qsSelfRef selfref;
14855 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14856 0 : return JS_FALSE;
14857 : nsresult rv;
14858 : bool result;
14859 0 : rv = self->GetComplete(&result);
14860 0 : if (NS_FAILED(rv))
14861 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14862 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
14863 0 : return JS_TRUE;
14864 : }
14865 :
14866 : // === interface nsIDOMHTMLInputElement
14867 :
14868 : static JSBool
14869 0 : nsIDOMHTMLInputElement_GetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14870 : {
14871 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14872 : nsIDOMHTMLInputElement *self;
14873 0 : xpc_qsSelfRef selfref;
14874 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14875 0 : return JS_FALSE;
14876 : nsresult rv;
14877 : bool result;
14878 0 : rv = self->GetDefaultChecked(&result);
14879 0 : if (NS_FAILED(rv))
14880 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14881 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
14882 0 : return JS_TRUE;
14883 : }
14884 :
14885 : static JSBool
14886 0 : nsIDOMHTMLInputElement_SetDefaultChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14887 : {
14888 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14889 : nsIDOMHTMLInputElement *self;
14890 0 : xpc_qsSelfRef selfref;
14891 0 : JS::AutoValueRooter tvr(cx);
14892 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14893 0 : return JS_FALSE;
14894 : JSBool arg0;
14895 0 : JS_ValueToBoolean(cx, *vp, &arg0);
14896 : nsresult rv;
14897 0 : rv = self->SetDefaultChecked(arg0);
14898 0 : if (NS_FAILED(rv))
14899 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14900 0 : return JS_TRUE;
14901 : }
14902 :
14903 : static JSBool
14904 0 : nsIDOMHTMLInputElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14905 : {
14906 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14907 : nsIDOMHTMLInputElement *self;
14908 0 : xpc_qsSelfRef selfref;
14909 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14910 0 : return JS_FALSE;
14911 : nsresult rv;
14912 : bool result;
14913 0 : rv = self->GetDisabled(&result);
14914 0 : if (NS_FAILED(rv))
14915 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14916 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
14917 0 : return JS_TRUE;
14918 : }
14919 :
14920 : static JSBool
14921 0 : nsIDOMHTMLInputElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14922 : {
14923 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14924 : nsIDOMHTMLInputElement *self;
14925 0 : xpc_qsSelfRef selfref;
14926 0 : JS::AutoValueRooter tvr(cx);
14927 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14928 0 : return JS_FALSE;
14929 : JSBool arg0;
14930 0 : JS_ValueToBoolean(cx, *vp, &arg0);
14931 : nsresult rv;
14932 0 : rv = self->SetDisabled(arg0);
14933 0 : if (NS_FAILED(rv))
14934 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14935 0 : return JS_TRUE;
14936 : }
14937 :
14938 : static JSBool
14939 0 : nsIDOMHTMLInputElement_Select(JSContext *cx, unsigned argc, jsval *vp)
14940 : {
14941 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14942 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
14943 0 : if (!obj)
14944 0 : return JS_FALSE;
14945 : nsIDOMHTMLInputElement *self;
14946 0 : xpc_qsSelfRef selfref;
14947 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
14948 0 : return JS_FALSE;
14949 : nsresult rv;
14950 0 : rv = self->Select();
14951 0 : if (NS_FAILED(rv))
14952 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
14953 0 : *vp = JSVAL_VOID;
14954 0 : return JS_TRUE;
14955 : }
14956 :
14957 : static JSBool
14958 0 : nsIDOMHTMLInputElement_GetChecked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14959 : {
14960 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14961 : nsIDOMHTMLInputElement *self;
14962 0 : xpc_qsSelfRef selfref;
14963 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14964 0 : return JS_FALSE;
14965 : nsresult rv;
14966 : bool result;
14967 0 : rv = self->GetChecked(&result);
14968 0 : if (NS_FAILED(rv))
14969 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
14970 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
14971 0 : return JS_TRUE;
14972 : }
14973 :
14974 : static JSBool
14975 0 : nsIDOMHTMLInputElement_SetChecked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
14976 : {
14977 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14978 : nsIDOMHTMLInputElement *self;
14979 0 : xpc_qsSelfRef selfref;
14980 0 : JS::AutoValueRooter tvr(cx);
14981 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
14982 0 : return JS_FALSE;
14983 : JSBool arg0;
14984 0 : JS_ValueToBoolean(cx, *vp, &arg0);
14985 : nsresult rv;
14986 0 : rv = self->SetChecked(arg0);
14987 0 : if (NS_FAILED(rv))
14988 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
14989 0 : return JS_TRUE;
14990 : }
14991 :
14992 : static JSBool
14993 0 : nsIDOMHTMLInputElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
14994 : {
14995 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
14996 : nsIDOMHTMLInputElement *self;
14997 0 : xpc_qsSelfRef selfref;
14998 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
14999 0 : return JS_FALSE;
15000 : nsresult rv;
15001 0 : nsString result;
15002 0 : rv = self->GetType(result);
15003 0 : if (NS_FAILED(rv))
15004 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15005 0 : return xpc::StringToJsval(cx, result, vp);
15006 : }
15007 :
15008 : static JSBool
15009 0 : nsIDOMHTMLInputElement_SetType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15010 : {
15011 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15012 : nsIDOMHTMLInputElement *self;
15013 0 : xpc_qsSelfRef selfref;
15014 0 : JS::AutoValueRooter tvr(cx);
15015 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15016 0 : return JS_FALSE;
15017 : xpc_qsDOMString arg0(cx, *vp, vp,
15018 : xpc_qsDOMString::eDefaultNullBehavior,
15019 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15020 0 : if (!arg0.IsValid())
15021 0 : return JS_FALSE;
15022 : nsresult rv;
15023 0 : rv = self->SetType(arg0);
15024 0 : if (NS_FAILED(rv))
15025 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15026 0 : return JS_TRUE;
15027 : }
15028 :
15029 : static JSBool
15030 0 : nsIDOMHTMLInputElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15031 : {
15032 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15033 0 : JSObject *callee = nsnull;
15034 : nsIDOMHTMLInputElement *self;
15035 0 : xpc_qsSelfRef selfref;
15036 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15037 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
15038 0 : return JS_FALSE;
15039 : nsresult rv;
15040 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
15041 0 : rv = self->GetForm(getter_AddRefs(result));
15042 0 : if (NS_FAILED(rv))
15043 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15044 0 : if (!result) {
15045 0 : *vp = JSVAL_NULL;
15046 0 : return JS_TRUE;
15047 : }
15048 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15049 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15050 0 : return JS_TRUE;
15051 : }
15052 : // After this point do not use 'result'!
15053 0 : qsObjectHelper helper(result, cache);
15054 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
15055 : }
15056 :
15057 : static JSBool
15058 0 : nsIDOMHTMLInputElement_GetSrc(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15059 : {
15060 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15061 : nsIDOMHTMLInputElement *self;
15062 0 : xpc_qsSelfRef selfref;
15063 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15064 0 : return JS_FALSE;
15065 : nsresult rv;
15066 0 : nsString result;
15067 0 : rv = self->GetSrc(result);
15068 0 : if (NS_FAILED(rv))
15069 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15070 0 : return xpc::StringToJsval(cx, result, vp);
15071 : }
15072 :
15073 : static JSBool
15074 0 : nsIDOMHTMLInputElement_SetSrc(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15075 : {
15076 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15077 : nsIDOMHTMLInputElement *self;
15078 0 : xpc_qsSelfRef selfref;
15079 0 : JS::AutoValueRooter tvr(cx);
15080 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15081 0 : return JS_FALSE;
15082 : xpc_qsDOMString arg0(cx, *vp, vp,
15083 : xpc_qsDOMString::eDefaultNullBehavior,
15084 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15085 0 : if (!arg0.IsValid())
15086 0 : return JS_FALSE;
15087 : nsresult rv;
15088 0 : rv = self->SetSrc(arg0);
15089 0 : if (NS_FAILED(rv))
15090 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15091 0 : return JS_TRUE;
15092 : }
15093 :
15094 : static JSBool
15095 0 : nsIDOMHTMLInputElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15096 : {
15097 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15098 : nsIDOMHTMLInputElement *self;
15099 0 : xpc_qsSelfRef selfref;
15100 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15101 0 : return JS_FALSE;
15102 : nsresult rv;
15103 0 : nsString result;
15104 0 : rv = self->GetName(result);
15105 0 : if (NS_FAILED(rv))
15106 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15107 0 : return xpc::StringToJsval(cx, result, vp);
15108 : }
15109 :
15110 : static JSBool
15111 0 : nsIDOMHTMLInputElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15112 : {
15113 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15114 : nsIDOMHTMLInputElement *self;
15115 0 : xpc_qsSelfRef selfref;
15116 0 : JS::AutoValueRooter tvr(cx);
15117 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15118 0 : return JS_FALSE;
15119 : xpc_qsDOMString arg0(cx, *vp, vp,
15120 : xpc_qsDOMString::eDefaultNullBehavior,
15121 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15122 0 : if (!arg0.IsValid())
15123 0 : return JS_FALSE;
15124 : nsresult rv;
15125 0 : rv = self->SetName(arg0);
15126 0 : if (NS_FAILED(rv))
15127 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15128 0 : return JS_TRUE;
15129 : }
15130 :
15131 : static JSBool
15132 0 : nsIDOMHTMLInputElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15133 : {
15134 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15135 : nsIDOMHTMLInputElement *self;
15136 0 : xpc_qsSelfRef selfref;
15137 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15138 0 : return JS_FALSE;
15139 : nsresult rv;
15140 0 : nsString result;
15141 0 : rv = self->GetValue(result);
15142 0 : if (NS_FAILED(rv))
15143 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15144 0 : return xpc::StringToJsval(cx, result, vp);
15145 : }
15146 :
15147 : static JSBool
15148 0 : nsIDOMHTMLInputElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15149 : {
15150 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15151 : nsIDOMHTMLInputElement *self;
15152 0 : xpc_qsSelfRef selfref;
15153 0 : JS::AutoValueRooter tvr(cx);
15154 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15155 0 : return JS_FALSE;
15156 : xpc_qsDOMString arg0(cx, *vp, vp,
15157 : xpc_qsDOMString::eDefaultNullBehavior,
15158 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15159 0 : if (!arg0.IsValid())
15160 0 : return JS_FALSE;
15161 : nsresult rv;
15162 0 : rv = self->SetValue(arg0);
15163 0 : if (NS_FAILED(rv))
15164 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15165 0 : return JS_TRUE;
15166 : }
15167 :
15168 : static JSBool
15169 0 : nsIDOMHTMLInputElement_GetFiles(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15170 : {
15171 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15172 0 : JSObject *callee = nsnull;
15173 : nsIDOMHTMLInputElement *self;
15174 0 : xpc_qsSelfRef selfref;
15175 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15176 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
15177 0 : return JS_FALSE;
15178 : nsresult rv;
15179 0 : nsCOMPtr<nsIDOMFileList> result;
15180 0 : rv = self->GetFiles(getter_AddRefs(result));
15181 0 : if (NS_FAILED(rv))
15182 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15183 0 : if (!result) {
15184 0 : *vp = JSVAL_NULL;
15185 0 : return JS_TRUE;
15186 : }
15187 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15188 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15189 0 : return JS_TRUE;
15190 : }
15191 : // After this point do not use 'result'!
15192 0 : qsObjectHelper helper(result, cache);
15193 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMFileList), &interfaces[k_nsIDOMFileList], vp);
15194 : }
15195 :
15196 : static JSBool
15197 0 : nsIDOMHTMLInputElement_GetTextLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15198 : {
15199 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15200 : nsIDOMHTMLInputElement *self;
15201 0 : xpc_qsSelfRef selfref;
15202 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15203 0 : return JS_FALSE;
15204 : nsresult rv;
15205 : PRInt32 result;
15206 0 : rv = self->GetTextLength(&result);
15207 0 : if (NS_FAILED(rv))
15208 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15209 0 : *vp = INT_TO_JSVAL(result);
15210 0 : return JS_TRUE;
15211 : }
15212 :
15213 : static JSBool
15214 0 : nsIDOMHTMLInputElement_GetSelectionStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15215 : {
15216 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15217 : nsIDOMHTMLInputElement *self;
15218 0 : xpc_qsSelfRef selfref;
15219 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15220 0 : return JS_FALSE;
15221 : nsresult rv;
15222 : PRInt32 result;
15223 0 : rv = self->GetSelectionStart(&result);
15224 0 : if (NS_FAILED(rv))
15225 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15226 0 : *vp = INT_TO_JSVAL(result);
15227 0 : return JS_TRUE;
15228 : }
15229 :
15230 : static JSBool
15231 0 : nsIDOMHTMLInputElement_SetSelectionStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15232 : {
15233 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15234 : nsIDOMHTMLInputElement *self;
15235 0 : xpc_qsSelfRef selfref;
15236 0 : JS::AutoValueRooter tvr(cx);
15237 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15238 0 : return JS_FALSE;
15239 : int32_t arg0;
15240 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
15241 0 : return JS_FALSE;
15242 : nsresult rv;
15243 0 : rv = self->SetSelectionStart(arg0);
15244 0 : if (NS_FAILED(rv))
15245 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15246 0 : return JS_TRUE;
15247 : }
15248 :
15249 : static JSBool
15250 0 : nsIDOMHTMLInputElement_GetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15251 : {
15252 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15253 : nsIDOMHTMLInputElement *self;
15254 0 : xpc_qsSelfRef selfref;
15255 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15256 0 : return JS_FALSE;
15257 : nsresult rv;
15258 : PRInt32 result;
15259 0 : rv = self->GetSelectionEnd(&result);
15260 0 : if (NS_FAILED(rv))
15261 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15262 0 : *vp = INT_TO_JSVAL(result);
15263 0 : return JS_TRUE;
15264 : }
15265 :
15266 : static JSBool
15267 0 : nsIDOMHTMLInputElement_SetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15268 : {
15269 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15270 : nsIDOMHTMLInputElement *self;
15271 0 : xpc_qsSelfRef selfref;
15272 0 : JS::AutoValueRooter tvr(cx);
15273 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15274 0 : return JS_FALSE;
15275 : int32_t arg0;
15276 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
15277 0 : return JS_FALSE;
15278 : nsresult rv;
15279 0 : rv = self->SetSelectionEnd(arg0);
15280 0 : if (NS_FAILED(rv))
15281 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15282 0 : return JS_TRUE;
15283 : }
15284 :
15285 : static JSBool
15286 0 : nsIDOMHTMLInputElement_GetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15287 : {
15288 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15289 : nsIDOMHTMLInputElement *self;
15290 0 : xpc_qsSelfRef selfref;
15291 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15292 0 : return JS_FALSE;
15293 : nsresult rv;
15294 0 : nsString result;
15295 0 : rv = self->GetSelectionDirection(result);
15296 0 : if (NS_FAILED(rv))
15297 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15298 0 : return xpc::StringToJsval(cx, result, vp);
15299 : }
15300 :
15301 : static JSBool
15302 0 : nsIDOMHTMLInputElement_SetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15303 : {
15304 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15305 : nsIDOMHTMLInputElement *self;
15306 0 : xpc_qsSelfRef selfref;
15307 0 : JS::AutoValueRooter tvr(cx);
15308 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15309 0 : return JS_FALSE;
15310 : xpc_qsDOMString arg0(cx, *vp, vp,
15311 : xpc_qsDOMString::eDefaultNullBehavior,
15312 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15313 0 : if (!arg0.IsValid())
15314 0 : return JS_FALSE;
15315 : nsresult rv;
15316 0 : rv = self->SetSelectionDirection(arg0);
15317 0 : if (NS_FAILED(rv))
15318 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15319 0 : return JS_TRUE;
15320 : }
15321 :
15322 : static JSBool
15323 0 : nsIDOMHTMLInputElement_SetSelectionRange(JSContext *cx, unsigned argc, jsval *vp)
15324 : {
15325 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15326 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
15327 0 : if (!obj)
15328 0 : return JS_FALSE;
15329 : nsIDOMHTMLInputElement *self;
15330 0 : xpc_qsSelfRef selfref;
15331 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
15332 0 : return JS_FALSE;
15333 0 : if (argc < 2)
15334 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
15335 0 : jsval *argv = JS_ARGV(cx, vp);
15336 : int32_t arg0;
15337 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
15338 0 : return JS_FALSE;
15339 : int32_t arg1;
15340 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
15341 0 : return JS_FALSE;
15342 : xpc_qsDOMString arg2(cx, (2 < argc ? argv[2] : JSVAL_NULL), (2 < argc ? &argv[2] : NULL),
15343 : xpc_qsDOMString::eDefaultNullBehavior,
15344 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15345 0 : if (!arg2.IsValid())
15346 0 : return JS_FALSE;
15347 : nsresult rv;
15348 0 : rv = self->SetSelectionRange(arg0, arg1, arg2);
15349 0 : if (NS_FAILED(rv))
15350 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
15351 0 : *vp = JSVAL_VOID;
15352 0 : return JS_TRUE;
15353 : }
15354 :
15355 : // === interface nsIDOMHTMLLinkElement
15356 :
15357 : static JSBool
15358 0 : nsIDOMHTMLLinkElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15359 : {
15360 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15361 : nsIDOMHTMLLinkElement *self;
15362 0 : xpc_qsSelfRef selfref;
15363 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15364 0 : return JS_FALSE;
15365 : nsresult rv;
15366 : bool result;
15367 0 : rv = self->GetDisabled(&result);
15368 0 : if (NS_FAILED(rv))
15369 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15370 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15371 0 : return JS_TRUE;
15372 : }
15373 :
15374 : static JSBool
15375 0 : nsIDOMHTMLLinkElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15376 : {
15377 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15378 : nsIDOMHTMLLinkElement *self;
15379 0 : xpc_qsSelfRef selfref;
15380 0 : JS::AutoValueRooter tvr(cx);
15381 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15382 0 : return JS_FALSE;
15383 : JSBool arg0;
15384 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15385 : nsresult rv;
15386 0 : rv = self->SetDisabled(arg0);
15387 0 : if (NS_FAILED(rv))
15388 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15389 0 : return JS_TRUE;
15390 : }
15391 :
15392 : // === interface nsIDOMHTMLMenuElement
15393 :
15394 : static JSBool
15395 0 : nsIDOMHTMLMenuElement_GetCompact(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15396 : {
15397 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15398 : nsIDOMHTMLMenuElement *self;
15399 0 : xpc_qsSelfRef selfref;
15400 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15401 0 : return JS_FALSE;
15402 : nsresult rv;
15403 : bool result;
15404 0 : rv = self->GetCompact(&result);
15405 0 : if (NS_FAILED(rv))
15406 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15407 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15408 0 : return JS_TRUE;
15409 : }
15410 :
15411 : static JSBool
15412 0 : nsIDOMHTMLMenuElement_SetCompact(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15413 : {
15414 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15415 : nsIDOMHTMLMenuElement *self;
15416 0 : xpc_qsSelfRef selfref;
15417 0 : JS::AutoValueRooter tvr(cx);
15418 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15419 0 : return JS_FALSE;
15420 : JSBool arg0;
15421 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15422 : nsresult rv;
15423 0 : rv = self->SetCompact(arg0);
15424 0 : if (NS_FAILED(rv))
15425 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15426 0 : return JS_TRUE;
15427 : }
15428 :
15429 : static JSBool
15430 0 : nsIDOMHTMLMenuElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15431 : {
15432 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15433 : nsIDOMHTMLMenuElement *self;
15434 0 : xpc_qsSelfRef selfref;
15435 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15436 0 : return JS_FALSE;
15437 : nsresult rv;
15438 0 : nsString result;
15439 0 : rv = self->GetType(result);
15440 0 : if (NS_FAILED(rv))
15441 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15442 0 : return xpc::StringToJsval(cx, result, vp);
15443 : }
15444 :
15445 : static JSBool
15446 0 : nsIDOMHTMLMenuElement_SetType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15447 : {
15448 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15449 : nsIDOMHTMLMenuElement *self;
15450 0 : xpc_qsSelfRef selfref;
15451 0 : JS::AutoValueRooter tvr(cx);
15452 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15453 0 : return JS_FALSE;
15454 : xpc_qsDOMString arg0(cx, *vp, vp,
15455 : xpc_qsDOMString::eDefaultNullBehavior,
15456 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15457 0 : if (!arg0.IsValid())
15458 0 : return JS_FALSE;
15459 : nsresult rv;
15460 0 : rv = self->SetType(arg0);
15461 0 : if (NS_FAILED(rv))
15462 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15463 0 : return JS_TRUE;
15464 : }
15465 :
15466 : static JSBool
15467 0 : nsIDOMHTMLMenuElement_GetLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15468 : {
15469 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15470 : nsIDOMHTMLMenuElement *self;
15471 0 : xpc_qsSelfRef selfref;
15472 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15473 0 : return JS_FALSE;
15474 : nsresult rv;
15475 0 : nsString result;
15476 0 : rv = self->GetLabel(result);
15477 0 : if (NS_FAILED(rv))
15478 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15479 0 : return xpc::StringToJsval(cx, result, vp);
15480 : }
15481 :
15482 : static JSBool
15483 0 : nsIDOMHTMLMenuElement_SetLabel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15484 : {
15485 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15486 : nsIDOMHTMLMenuElement *self;
15487 0 : xpc_qsSelfRef selfref;
15488 0 : JS::AutoValueRooter tvr(cx);
15489 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15490 0 : return JS_FALSE;
15491 : xpc_qsDOMString arg0(cx, *vp, vp,
15492 : xpc_qsDOMString::eDefaultNullBehavior,
15493 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15494 0 : if (!arg0.IsValid())
15495 0 : return JS_FALSE;
15496 : nsresult rv;
15497 0 : rv = self->SetLabel(arg0);
15498 0 : if (NS_FAILED(rv))
15499 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15500 0 : return JS_TRUE;
15501 : }
15502 :
15503 : // === interface nsIDOMHTMLMenuItemElement
15504 :
15505 : // === interface nsIDOMHTMLOptionElement
15506 :
15507 : static JSBool
15508 0 : nsIDOMHTMLOptionElement_GetIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15509 : {
15510 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15511 : nsIDOMHTMLOptionElement *self;
15512 0 : xpc_qsSelfRef selfref;
15513 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15514 0 : return JS_FALSE;
15515 : nsresult rv;
15516 : PRInt32 result;
15517 0 : rv = self->GetIndex(&result);
15518 0 : if (NS_FAILED(rv))
15519 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15520 0 : *vp = INT_TO_JSVAL(result);
15521 0 : return JS_TRUE;
15522 : }
15523 :
15524 : static JSBool
15525 0 : nsIDOMHTMLOptionElement_GetSelected(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15526 : {
15527 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15528 : nsIDOMHTMLOptionElement *self;
15529 0 : xpc_qsSelfRef selfref;
15530 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15531 0 : return JS_FALSE;
15532 : nsresult rv;
15533 : bool result;
15534 0 : rv = self->GetSelected(&result);
15535 0 : if (NS_FAILED(rv))
15536 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15537 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15538 0 : return JS_TRUE;
15539 : }
15540 :
15541 : static JSBool
15542 0 : nsIDOMHTMLOptionElement_SetSelected(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15543 : {
15544 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15545 : nsIDOMHTMLOptionElement *self;
15546 0 : xpc_qsSelfRef selfref;
15547 0 : JS::AutoValueRooter tvr(cx);
15548 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15549 0 : return JS_FALSE;
15550 : JSBool arg0;
15551 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15552 : nsresult rv;
15553 0 : rv = self->SetSelected(arg0);
15554 0 : if (NS_FAILED(rv))
15555 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15556 0 : return JS_TRUE;
15557 : }
15558 :
15559 : static JSBool
15560 0 : nsIDOMHTMLOptionElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15561 : {
15562 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15563 0 : JSObject *callee = nsnull;
15564 : nsIDOMHTMLOptionElement *self;
15565 0 : xpc_qsSelfRef selfref;
15566 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15567 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
15568 0 : return JS_FALSE;
15569 : nsresult rv;
15570 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
15571 0 : rv = self->GetForm(getter_AddRefs(result));
15572 0 : if (NS_FAILED(rv))
15573 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15574 0 : if (!result) {
15575 0 : *vp = JSVAL_NULL;
15576 0 : return JS_TRUE;
15577 : }
15578 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15579 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15580 0 : return JS_TRUE;
15581 : }
15582 : // After this point do not use 'result'!
15583 0 : qsObjectHelper helper(result, cache);
15584 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
15585 : }
15586 :
15587 : static JSBool
15588 0 : nsIDOMHTMLOptionElement_GetText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15589 : {
15590 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15591 : nsIDOMHTMLOptionElement *self;
15592 0 : xpc_qsSelfRef selfref;
15593 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15594 0 : return JS_FALSE;
15595 : nsresult rv;
15596 0 : nsString result;
15597 0 : rv = self->GetText(result);
15598 0 : if (NS_FAILED(rv))
15599 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15600 0 : return xpc::StringToJsval(cx, result, vp);
15601 : }
15602 :
15603 : static JSBool
15604 0 : nsIDOMHTMLOptionElement_SetText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15605 : {
15606 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15607 : nsIDOMHTMLOptionElement *self;
15608 0 : xpc_qsSelfRef selfref;
15609 0 : JS::AutoValueRooter tvr(cx);
15610 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15611 0 : return JS_FALSE;
15612 : xpc_qsDOMString arg0(cx, *vp, vp,
15613 : xpc_qsDOMString::eDefaultNullBehavior,
15614 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15615 0 : if (!arg0.IsValid())
15616 0 : return JS_FALSE;
15617 : nsresult rv;
15618 0 : rv = self->SetText(arg0);
15619 0 : if (NS_FAILED(rv))
15620 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15621 0 : return JS_TRUE;
15622 : }
15623 :
15624 : static JSBool
15625 0 : nsIDOMHTMLOptionElement_GetDefaultSelected(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15626 : {
15627 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15628 : nsIDOMHTMLOptionElement *self;
15629 0 : xpc_qsSelfRef selfref;
15630 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15631 0 : return JS_FALSE;
15632 : nsresult rv;
15633 : bool result;
15634 0 : rv = self->GetDefaultSelected(&result);
15635 0 : if (NS_FAILED(rv))
15636 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15637 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15638 0 : return JS_TRUE;
15639 : }
15640 :
15641 : static JSBool
15642 0 : nsIDOMHTMLOptionElement_SetDefaultSelected(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15643 : {
15644 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15645 : nsIDOMHTMLOptionElement *self;
15646 0 : xpc_qsSelfRef selfref;
15647 0 : JS::AutoValueRooter tvr(cx);
15648 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15649 0 : return JS_FALSE;
15650 : JSBool arg0;
15651 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15652 : nsresult rv;
15653 0 : rv = self->SetDefaultSelected(arg0);
15654 0 : if (NS_FAILED(rv))
15655 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15656 0 : return JS_TRUE;
15657 : }
15658 :
15659 : static JSBool
15660 0 : nsIDOMHTMLOptionElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15661 : {
15662 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15663 : nsIDOMHTMLOptionElement *self;
15664 0 : xpc_qsSelfRef selfref;
15665 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15666 0 : return JS_FALSE;
15667 : nsresult rv;
15668 0 : nsString result;
15669 0 : rv = self->GetValue(result);
15670 0 : if (NS_FAILED(rv))
15671 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15672 0 : return xpc::StringToJsval(cx, result, vp);
15673 : }
15674 :
15675 : static JSBool
15676 0 : nsIDOMHTMLOptionElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15677 : {
15678 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15679 : nsIDOMHTMLOptionElement *self;
15680 0 : xpc_qsSelfRef selfref;
15681 0 : JS::AutoValueRooter tvr(cx);
15682 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15683 0 : return JS_FALSE;
15684 : xpc_qsDOMString arg0(cx, *vp, vp,
15685 : xpc_qsDOMString::eDefaultNullBehavior,
15686 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15687 0 : if (!arg0.IsValid())
15688 0 : return JS_FALSE;
15689 : nsresult rv;
15690 0 : rv = self->SetValue(arg0);
15691 0 : if (NS_FAILED(rv))
15692 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15693 0 : return JS_TRUE;
15694 : }
15695 :
15696 : static JSBool
15697 0 : nsIDOMHTMLOptionElement_GetLabel(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15698 : {
15699 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15700 : nsIDOMHTMLOptionElement *self;
15701 0 : xpc_qsSelfRef selfref;
15702 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15703 0 : return JS_FALSE;
15704 : nsresult rv;
15705 0 : nsString result;
15706 0 : rv = self->GetLabel(result);
15707 0 : if (NS_FAILED(rv))
15708 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15709 0 : return xpc::StringToJsval(cx, result, vp);
15710 : }
15711 :
15712 : static JSBool
15713 0 : nsIDOMHTMLOptionElement_SetLabel(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15714 : {
15715 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15716 : nsIDOMHTMLOptionElement *self;
15717 0 : xpc_qsSelfRef selfref;
15718 0 : JS::AutoValueRooter tvr(cx);
15719 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15720 0 : return JS_FALSE;
15721 : xpc_qsDOMString arg0(cx, *vp, vp,
15722 : xpc_qsDOMString::eDefaultNullBehavior,
15723 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
15724 0 : if (!arg0.IsValid())
15725 0 : return JS_FALSE;
15726 : nsresult rv;
15727 0 : rv = self->SetLabel(arg0);
15728 0 : if (NS_FAILED(rv))
15729 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15730 0 : return JS_TRUE;
15731 : }
15732 :
15733 : static JSBool
15734 0 : nsIDOMHTMLOptionElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15735 : {
15736 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15737 : nsIDOMHTMLOptionElement *self;
15738 0 : xpc_qsSelfRef selfref;
15739 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15740 0 : return JS_FALSE;
15741 : nsresult rv;
15742 : bool result;
15743 0 : rv = self->GetDisabled(&result);
15744 0 : if (NS_FAILED(rv))
15745 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15746 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
15747 0 : return JS_TRUE;
15748 : }
15749 :
15750 : static JSBool
15751 0 : nsIDOMHTMLOptionElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15752 : {
15753 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15754 : nsIDOMHTMLOptionElement *self;
15755 0 : xpc_qsSelfRef selfref;
15756 0 : JS::AutoValueRooter tvr(cx);
15757 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15758 0 : return JS_FALSE;
15759 : JSBool arg0;
15760 0 : JS_ValueToBoolean(cx, *vp, &arg0);
15761 : nsresult rv;
15762 0 : rv = self->SetDisabled(arg0);
15763 0 : if (NS_FAILED(rv))
15764 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15765 0 : return JS_TRUE;
15766 : }
15767 :
15768 : // === interface nsIDOMHTMLOptionsCollection
15769 :
15770 : static JSBool
15771 0 : nsIDOMHTMLOptionsCollection_Item(JSContext *cx, unsigned argc, jsval *vp)
15772 : {
15773 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15774 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
15775 0 : if (!obj)
15776 0 : return JS_FALSE;
15777 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
15778 : nsIDOMHTMLOptionsCollection *self;
15779 0 : xpc_qsSelfRef selfref;
15780 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
15781 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
15782 0 : return JS_FALSE;
15783 0 : if (argc < 1)
15784 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
15785 0 : jsval *argv = JS_ARGV(cx, vp);
15786 : uint32_t arg0;
15787 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
15788 0 : return JS_FALSE;
15789 : nsresult rv;
15790 0 : nsCOMPtr<nsIDOMNode> result;
15791 0 : rv = self->Item(arg0, getter_AddRefs(result));
15792 0 : if (NS_FAILED(rv))
15793 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
15794 0 : if (!result) {
15795 0 : *vp = JSVAL_NULL;
15796 0 : return JS_TRUE;
15797 : }
15798 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
15799 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
15800 0 : return JS_TRUE;
15801 : }
15802 : // After this point do not use 'result'!
15803 0 : qsObjectHelper helper(result, cache);
15804 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
15805 : }
15806 :
15807 : static JSBool
15808 0 : nsIDOMHTMLOptionsCollection_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15809 : {
15810 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15811 : nsIDOMHTMLOptionsCollection *self;
15812 0 : xpc_qsSelfRef selfref;
15813 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15814 0 : return JS_FALSE;
15815 : nsresult rv;
15816 : PRUint32 result;
15817 0 : rv = self->GetLength(&result);
15818 0 : if (NS_FAILED(rv))
15819 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15820 0 : *vp = UINT_TO_JSVAL(result);
15821 0 : return JS_TRUE;
15822 : }
15823 :
15824 : static JSBool
15825 0 : nsIDOMHTMLOptionsCollection_SetLength(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15826 : {
15827 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15828 : nsIDOMHTMLOptionsCollection *self;
15829 0 : xpc_qsSelfRef selfref;
15830 0 : JS::AutoValueRooter tvr(cx);
15831 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15832 0 : return JS_FALSE;
15833 : uint32_t arg0;
15834 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
15835 0 : return JS_FALSE;
15836 : nsresult rv;
15837 0 : rv = self->SetLength(arg0);
15838 0 : if (NS_FAILED(rv))
15839 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15840 0 : return JS_TRUE;
15841 : }
15842 :
15843 : static JSBool
15844 0 : nsIDOMHTMLOptionsCollection_GetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15845 : {
15846 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15847 : nsIDOMHTMLOptionsCollection *self;
15848 0 : xpc_qsSelfRef selfref;
15849 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15850 0 : return JS_FALSE;
15851 : nsresult rv;
15852 : PRInt32 result;
15853 0 : rv = self->GetSelectedIndex(&result);
15854 0 : if (NS_FAILED(rv))
15855 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15856 0 : *vp = INT_TO_JSVAL(result);
15857 0 : return JS_TRUE;
15858 : }
15859 :
15860 : static JSBool
15861 0 : nsIDOMHTMLOptionsCollection_SetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15862 : {
15863 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15864 : nsIDOMHTMLOptionsCollection *self;
15865 0 : xpc_qsSelfRef selfref;
15866 0 : JS::AutoValueRooter tvr(cx);
15867 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15868 0 : return JS_FALSE;
15869 : int32_t arg0;
15870 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
15871 0 : return JS_FALSE;
15872 : nsresult rv;
15873 0 : rv = self->SetSelectedIndex(arg0);
15874 0 : if (NS_FAILED(rv))
15875 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15876 0 : return JS_TRUE;
15877 : }
15878 :
15879 : static JSBool
15880 0 : nsIDOMHTMLOptionsCollection_Add(JSContext *cx, unsigned argc, jsval *vp)
15881 : {
15882 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15883 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
15884 0 : if (!obj)
15885 0 : return JS_FALSE;
15886 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
15887 : nsIDOMHTMLOptionsCollection *self;
15888 0 : xpc_qsSelfRef selfref;
15889 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
15890 0 : return JS_FALSE;
15891 0 : if (argc < 1)
15892 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
15893 0 : jsval *argv = JS_ARGV(cx, vp);
15894 : nsresult rv;
15895 : nsIDOMHTMLOptionElement *arg0;
15896 0 : xpc_qsSelfRef arg0ref;
15897 0 : rv = xpc_qsUnwrapArg<nsIDOMHTMLOptionElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
15898 0 : if (NS_FAILED(rv)) {
15899 0 : xpc_qsThrowBadArgWithCcx(ccx, rv, 0);
15900 0 : return JS_FALSE;
15901 : }
15902 0 : nsCOMPtr<nsIVariant> arg1(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (1 < argc ? argv[1] : JSVAL_NULL))));
15903 0 : if (!arg1) {
15904 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 1);
15905 0 : return JS_FALSE;
15906 0 : } rv = self->Add(arg0, arg1);
15907 0 : if (NS_FAILED(rv))
15908 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
15909 0 : *vp = JSVAL_VOID;
15910 0 : return JS_TRUE;
15911 : }
15912 :
15913 : // === interface nsIDOMHTMLProgressElement
15914 :
15915 : static JSBool
15916 0 : nsIDOMHTMLProgressElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15917 : {
15918 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15919 : nsIDOMHTMLProgressElement *self;
15920 0 : xpc_qsSelfRef selfref;
15921 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15922 0 : return JS_FALSE;
15923 : nsresult rv;
15924 : double result;
15925 0 : rv = self->GetValue(&result);
15926 0 : if (NS_FAILED(rv))
15927 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15928 0 : return JS_NewNumberValue(cx, result, vp);
15929 : }
15930 :
15931 : static JSBool
15932 0 : nsIDOMHTMLProgressElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15933 : {
15934 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15935 : nsIDOMHTMLProgressElement *self;
15936 0 : xpc_qsSelfRef selfref;
15937 0 : JS::AutoValueRooter tvr(cx);
15938 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15939 0 : return JS_FALSE;
15940 : double arg0;
15941 0 : if (!JS_ValueToNumber(cx, *vp, &arg0))
15942 0 : return JS_FALSE;
15943 : nsresult rv;
15944 0 : rv = self->SetValue(arg0);
15945 0 : if (NS_FAILED(rv))
15946 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15947 0 : return JS_TRUE;
15948 : }
15949 :
15950 : static JSBool
15951 0 : nsIDOMHTMLProgressElement_GetMax(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15952 : {
15953 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15954 : nsIDOMHTMLProgressElement *self;
15955 0 : xpc_qsSelfRef selfref;
15956 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15957 0 : return JS_FALSE;
15958 : nsresult rv;
15959 : double result;
15960 0 : rv = self->GetMax(&result);
15961 0 : if (NS_FAILED(rv))
15962 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15963 0 : return JS_NewNumberValue(cx, result, vp);
15964 : }
15965 :
15966 : static JSBool
15967 0 : nsIDOMHTMLProgressElement_SetMax(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
15968 : {
15969 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15970 : nsIDOMHTMLProgressElement *self;
15971 0 : xpc_qsSelfRef selfref;
15972 0 : JS::AutoValueRooter tvr(cx);
15973 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
15974 0 : return JS_FALSE;
15975 : double arg0;
15976 0 : if (!JS_ValueToNumber(cx, *vp, &arg0))
15977 0 : return JS_FALSE;
15978 : nsresult rv;
15979 0 : rv = self->SetMax(arg0);
15980 0 : if (NS_FAILED(rv))
15981 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
15982 0 : return JS_TRUE;
15983 : }
15984 :
15985 : static JSBool
15986 0 : nsIDOMHTMLProgressElement_GetPosition(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
15987 : {
15988 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
15989 : nsIDOMHTMLProgressElement *self;
15990 0 : xpc_qsSelfRef selfref;
15991 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
15992 0 : return JS_FALSE;
15993 : nsresult rv;
15994 : double result;
15995 0 : rv = self->GetPosition(&result);
15996 0 : if (NS_FAILED(rv))
15997 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
15998 0 : return JS_NewNumberValue(cx, result, vp);
15999 : }
16000 :
16001 : static JSBool
16002 0 : nsIDOMHTMLProgressElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16003 : {
16004 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16005 0 : JSObject *callee = nsnull;
16006 : nsIDOMHTMLProgressElement *self;
16007 0 : xpc_qsSelfRef selfref;
16008 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16009 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16010 0 : return JS_FALSE;
16011 : nsresult rv;
16012 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
16013 0 : rv = self->GetForm(getter_AddRefs(result));
16014 0 : if (NS_FAILED(rv))
16015 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16016 0 : if (!result) {
16017 0 : *vp = JSVAL_NULL;
16018 0 : return JS_TRUE;
16019 : }
16020 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16021 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16022 0 : return JS_TRUE;
16023 : }
16024 : // After this point do not use 'result'!
16025 0 : qsObjectHelper helper(result, cache);
16026 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
16027 : }
16028 :
16029 : // === interface nsIDOMHTMLSelectElement
16030 :
16031 : static JSBool
16032 0 : nsIDOMHTMLSelectElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16033 : {
16034 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16035 : nsIDOMHTMLSelectElement *self;
16036 0 : xpc_qsSelfRef selfref;
16037 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16038 0 : return JS_FALSE;
16039 : nsresult rv;
16040 0 : nsString result;
16041 0 : rv = self->GetName(result);
16042 0 : if (NS_FAILED(rv))
16043 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16044 0 : return xpc::StringToJsval(cx, result, vp);
16045 : }
16046 :
16047 : static JSBool
16048 0 : nsIDOMHTMLSelectElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16049 : {
16050 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16051 : nsIDOMHTMLSelectElement *self;
16052 0 : xpc_qsSelfRef selfref;
16053 0 : JS::AutoValueRooter tvr(cx);
16054 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16055 0 : return JS_FALSE;
16056 : xpc_qsDOMString arg0(cx, *vp, vp,
16057 : xpc_qsDOMString::eDefaultNullBehavior,
16058 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16059 0 : if (!arg0.IsValid())
16060 0 : return JS_FALSE;
16061 : nsresult rv;
16062 0 : rv = self->SetName(arg0);
16063 0 : if (NS_FAILED(rv))
16064 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16065 0 : return JS_TRUE;
16066 : }
16067 :
16068 : static JSBool
16069 0 : nsIDOMHTMLSelectElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16070 : {
16071 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16072 0 : JSObject *callee = nsnull;
16073 : nsIDOMHTMLSelectElement *self;
16074 0 : xpc_qsSelfRef selfref;
16075 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16076 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16077 0 : return JS_FALSE;
16078 : nsresult rv;
16079 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
16080 0 : rv = self->GetForm(getter_AddRefs(result));
16081 0 : if (NS_FAILED(rv))
16082 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16083 0 : if (!result) {
16084 0 : *vp = JSVAL_NULL;
16085 0 : return JS_TRUE;
16086 : }
16087 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16088 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16089 0 : return JS_TRUE;
16090 : }
16091 : // After this point do not use 'result'!
16092 0 : qsObjectHelper helper(result, cache);
16093 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
16094 : }
16095 :
16096 : static JSBool
16097 0 : nsIDOMHTMLSelectElement_Add(JSContext *cx, unsigned argc, jsval *vp)
16098 : {
16099 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16100 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16101 0 : if (!obj)
16102 0 : return JS_FALSE;
16103 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
16104 : nsIDOMHTMLSelectElement *self;
16105 0 : xpc_qsSelfRef selfref;
16106 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
16107 0 : return JS_FALSE;
16108 0 : if (argc < 1)
16109 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16110 0 : jsval *argv = JS_ARGV(cx, vp);
16111 : nsresult rv;
16112 : nsIDOMHTMLElement *arg0;
16113 0 : xpc_qsSelfRef arg0ref;
16114 0 : rv = xpc_qsUnwrapArg<nsIDOMHTMLElement>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
16115 0 : if (NS_FAILED(rv)) {
16116 0 : xpc_qsThrowBadArgWithCcx(ccx, rv, 0);
16117 0 : return JS_FALSE;
16118 : }
16119 0 : nsCOMPtr<nsIVariant> arg1(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (1 < argc ? argv[1] : JSVAL_NULL))));
16120 0 : if (!arg1) {
16121 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 1);
16122 0 : return JS_FALSE;
16123 0 : } rv = self->Add(arg0, arg1);
16124 0 : if (NS_FAILED(rv))
16125 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
16126 0 : *vp = JSVAL_VOID;
16127 0 : return JS_TRUE;
16128 : }
16129 :
16130 : static JSBool
16131 0 : nsIDOMHTMLSelectElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16132 : {
16133 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16134 : nsIDOMHTMLSelectElement *self;
16135 0 : xpc_qsSelfRef selfref;
16136 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16137 0 : return JS_FALSE;
16138 : nsresult rv;
16139 0 : nsString result;
16140 0 : rv = self->GetValue(result);
16141 0 : if (NS_FAILED(rv))
16142 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16143 0 : return xpc::StringToJsval(cx, result, vp);
16144 : }
16145 :
16146 : static JSBool
16147 0 : nsIDOMHTMLSelectElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16148 : {
16149 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16150 : nsIDOMHTMLSelectElement *self;
16151 0 : xpc_qsSelfRef selfref;
16152 0 : JS::AutoValueRooter tvr(cx);
16153 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16154 0 : return JS_FALSE;
16155 : xpc_qsDOMString arg0(cx, *vp, vp,
16156 : xpc_qsDOMString::eDefaultNullBehavior,
16157 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16158 0 : if (!arg0.IsValid())
16159 0 : return JS_FALSE;
16160 : nsresult rv;
16161 0 : rv = self->SetValue(arg0);
16162 0 : if (NS_FAILED(rv))
16163 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16164 0 : return JS_TRUE;
16165 : }
16166 :
16167 : static JSBool
16168 0 : nsIDOMHTMLSelectElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16169 : {
16170 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16171 : nsIDOMHTMLSelectElement *self;
16172 0 : xpc_qsSelfRef selfref;
16173 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16174 0 : return JS_FALSE;
16175 : nsresult rv;
16176 : bool result;
16177 0 : rv = self->GetDisabled(&result);
16178 0 : if (NS_FAILED(rv))
16179 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16180 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
16181 0 : return JS_TRUE;
16182 : }
16183 :
16184 : static JSBool
16185 0 : nsIDOMHTMLSelectElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16186 : {
16187 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16188 : nsIDOMHTMLSelectElement *self;
16189 0 : xpc_qsSelfRef selfref;
16190 0 : JS::AutoValueRooter tvr(cx);
16191 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16192 0 : return JS_FALSE;
16193 : JSBool arg0;
16194 0 : JS_ValueToBoolean(cx, *vp, &arg0);
16195 : nsresult rv;
16196 0 : rv = self->SetDisabled(arg0);
16197 0 : if (NS_FAILED(rv))
16198 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16199 0 : return JS_TRUE;
16200 : }
16201 :
16202 : static JSBool
16203 0 : nsIDOMHTMLSelectElement_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16204 : {
16205 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16206 : nsIDOMHTMLSelectElement *self;
16207 0 : xpc_qsSelfRef selfref;
16208 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16209 0 : return JS_FALSE;
16210 : nsresult rv;
16211 : PRUint32 result;
16212 0 : rv = self->GetLength(&result);
16213 0 : if (NS_FAILED(rv))
16214 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16215 0 : *vp = UINT_TO_JSVAL(result);
16216 0 : return JS_TRUE;
16217 : }
16218 :
16219 : static JSBool
16220 0 : nsIDOMHTMLSelectElement_SetLength(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16221 : {
16222 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16223 : nsIDOMHTMLSelectElement *self;
16224 0 : xpc_qsSelfRef selfref;
16225 0 : JS::AutoValueRooter tvr(cx);
16226 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16227 0 : return JS_FALSE;
16228 : uint32_t arg0;
16229 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
16230 0 : return JS_FALSE;
16231 : nsresult rv;
16232 0 : rv = self->SetLength(arg0);
16233 0 : if (NS_FAILED(rv))
16234 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16235 0 : return JS_TRUE;
16236 : }
16237 :
16238 : static JSBool
16239 0 : nsIDOMHTMLSelectElement_Remove(JSContext *cx, unsigned argc, jsval *vp)
16240 : {
16241 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16242 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16243 0 : if (!obj)
16244 0 : return JS_FALSE;
16245 : nsIDOMHTMLSelectElement *self;
16246 0 : xpc_qsSelfRef selfref;
16247 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
16248 0 : return JS_FALSE;
16249 0 : if (argc < 1)
16250 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16251 0 : jsval *argv = JS_ARGV(cx, vp);
16252 : int32_t arg0;
16253 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
16254 0 : return JS_FALSE;
16255 : nsresult rv;
16256 0 : rv = self->Remove(arg0);
16257 0 : if (NS_FAILED(rv))
16258 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16259 0 : *vp = JSVAL_VOID;
16260 0 : return JS_TRUE;
16261 : }
16262 :
16263 : static JSBool
16264 0 : nsIDOMHTMLSelectElement_GetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16265 : {
16266 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16267 : nsIDOMHTMLSelectElement *self;
16268 0 : xpc_qsSelfRef selfref;
16269 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16270 0 : return JS_FALSE;
16271 : nsresult rv;
16272 : PRInt32 result;
16273 0 : rv = self->GetSelectedIndex(&result);
16274 0 : if (NS_FAILED(rv))
16275 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16276 0 : *vp = INT_TO_JSVAL(result);
16277 0 : return JS_TRUE;
16278 : }
16279 :
16280 : static JSBool
16281 0 : nsIDOMHTMLSelectElement_SetSelectedIndex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16282 : {
16283 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16284 : nsIDOMHTMLSelectElement *self;
16285 0 : xpc_qsSelfRef selfref;
16286 0 : JS::AutoValueRooter tvr(cx);
16287 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16288 0 : return JS_FALSE;
16289 : int32_t arg0;
16290 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16291 0 : return JS_FALSE;
16292 : nsresult rv;
16293 0 : rv = self->SetSelectedIndex(arg0);
16294 0 : if (NS_FAILED(rv))
16295 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16296 0 : return JS_TRUE;
16297 : }
16298 :
16299 : static JSBool
16300 0 : nsIDOMHTMLSelectElement_Item(JSContext *cx, unsigned argc, jsval *vp)
16301 : {
16302 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16303 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16304 0 : if (!obj)
16305 0 : return JS_FALSE;
16306 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
16307 : nsIDOMHTMLSelectElement *self;
16308 0 : xpc_qsSelfRef selfref;
16309 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16310 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
16311 0 : return JS_FALSE;
16312 0 : if (argc < 1)
16313 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16314 0 : jsval *argv = JS_ARGV(cx, vp);
16315 : uint32_t arg0;
16316 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
16317 0 : return JS_FALSE;
16318 : nsresult rv;
16319 0 : nsCOMPtr<nsIDOMNode> result;
16320 0 : rv = self->Item(arg0, getter_AddRefs(result));
16321 0 : if (NS_FAILED(rv))
16322 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16323 0 : if (!result) {
16324 0 : *vp = JSVAL_NULL;
16325 0 : return JS_TRUE;
16326 : }
16327 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16328 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16329 0 : return JS_TRUE;
16330 : }
16331 : // After this point do not use 'result'!
16332 0 : qsObjectHelper helper(result, cache);
16333 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
16334 : }
16335 :
16336 : static JSBool
16337 0 : nsIDOMHTMLSelectElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16338 : {
16339 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16340 : nsIDOMHTMLSelectElement *self;
16341 0 : xpc_qsSelfRef selfref;
16342 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16343 0 : return JS_FALSE;
16344 : nsresult rv;
16345 0 : nsString result;
16346 0 : rv = self->GetType(result);
16347 0 : if (NS_FAILED(rv))
16348 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16349 0 : return xpc::StringToJsval(cx, result, vp);
16350 : }
16351 :
16352 : static JSBool
16353 0 : nsIDOMHTMLSelectElement_GetOptions(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16354 : {
16355 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16356 0 : JSObject *callee = nsnull;
16357 : nsIDOMHTMLSelectElement *self;
16358 0 : xpc_qsSelfRef selfref;
16359 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16360 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16361 0 : return JS_FALSE;
16362 : nsresult rv;
16363 0 : nsCOMPtr<nsIDOMHTMLOptionsCollection> result;
16364 0 : rv = self->GetOptions(getter_AddRefs(result));
16365 0 : if (NS_FAILED(rv))
16366 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16367 0 : if (!result) {
16368 0 : *vp = JSVAL_NULL;
16369 0 : return JS_TRUE;
16370 : }
16371 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16372 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16373 0 : return JS_TRUE;
16374 : }
16375 : // After this point do not use 'result'!
16376 0 : qsObjectHelper helper(result, cache);
16377 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLOptionsCollection), &interfaces[k_nsIDOMHTMLOptionsCollection], vp);
16378 : }
16379 :
16380 : static JSBool
16381 0 : nsIDOMHTMLSelectElement_GetSize(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16382 : {
16383 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16384 : nsIDOMHTMLSelectElement *self;
16385 0 : xpc_qsSelfRef selfref;
16386 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16387 0 : return JS_FALSE;
16388 : nsresult rv;
16389 : PRInt32 result;
16390 0 : rv = self->GetSize(&result);
16391 0 : if (NS_FAILED(rv))
16392 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16393 0 : *vp = INT_TO_JSVAL(result);
16394 0 : return JS_TRUE;
16395 : }
16396 :
16397 : static JSBool
16398 0 : nsIDOMHTMLSelectElement_SetSize(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16399 : {
16400 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16401 : nsIDOMHTMLSelectElement *self;
16402 0 : xpc_qsSelfRef selfref;
16403 0 : JS::AutoValueRooter tvr(cx);
16404 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16405 0 : return JS_FALSE;
16406 : int32_t arg0;
16407 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16408 0 : return JS_FALSE;
16409 : nsresult rv;
16410 0 : rv = self->SetSize(arg0);
16411 0 : if (NS_FAILED(rv))
16412 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16413 0 : return JS_TRUE;
16414 : }
16415 :
16416 : // === interface nsIDOMHTMLStyleElement
16417 :
16418 : static JSBool
16419 0 : nsIDOMHTMLStyleElement_GetDisabled(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16420 : {
16421 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16422 : nsIDOMHTMLStyleElement *self;
16423 0 : xpc_qsSelfRef selfref;
16424 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16425 0 : return JS_FALSE;
16426 : nsresult rv;
16427 : bool result;
16428 0 : rv = self->GetDisabled(&result);
16429 0 : if (NS_FAILED(rv))
16430 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16431 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
16432 0 : return JS_TRUE;
16433 : }
16434 :
16435 : static JSBool
16436 0 : nsIDOMHTMLStyleElement_SetDisabled(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16437 : {
16438 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16439 : nsIDOMHTMLStyleElement *self;
16440 0 : xpc_qsSelfRef selfref;
16441 0 : JS::AutoValueRooter tvr(cx);
16442 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16443 0 : return JS_FALSE;
16444 : JSBool arg0;
16445 0 : JS_ValueToBoolean(cx, *vp, &arg0);
16446 : nsresult rv;
16447 0 : rv = self->SetDisabled(arg0);
16448 0 : if (NS_FAILED(rv))
16449 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16450 0 : return JS_TRUE;
16451 : }
16452 :
16453 : // === interface nsIDOMHTMLTableCellElement
16454 :
16455 : static JSBool
16456 0 : nsIDOMHTMLTableCellElement_GetColSpan(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16457 : {
16458 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16459 : nsIDOMHTMLTableCellElement *self;
16460 0 : xpc_qsSelfRef selfref;
16461 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16462 0 : return JS_FALSE;
16463 : nsresult rv;
16464 : PRInt32 result;
16465 0 : rv = self->GetColSpan(&result);
16466 0 : if (NS_FAILED(rv))
16467 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16468 0 : *vp = INT_TO_JSVAL(result);
16469 0 : return JS_TRUE;
16470 : }
16471 :
16472 : static JSBool
16473 0 : nsIDOMHTMLTableCellElement_SetColSpan(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16474 : {
16475 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16476 : nsIDOMHTMLTableCellElement *self;
16477 0 : xpc_qsSelfRef selfref;
16478 0 : JS::AutoValueRooter tvr(cx);
16479 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16480 0 : return JS_FALSE;
16481 : int32_t arg0;
16482 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16483 0 : return JS_FALSE;
16484 : nsresult rv;
16485 0 : rv = self->SetColSpan(arg0);
16486 0 : if (NS_FAILED(rv))
16487 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16488 0 : return JS_TRUE;
16489 : }
16490 :
16491 : static JSBool
16492 0 : nsIDOMHTMLTableCellElement_GetHeaders(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16493 : {
16494 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16495 : nsIDOMHTMLTableCellElement *self;
16496 0 : xpc_qsSelfRef selfref;
16497 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16498 0 : return JS_FALSE;
16499 : nsresult rv;
16500 0 : nsString result;
16501 0 : rv = self->GetHeaders(result);
16502 0 : if (NS_FAILED(rv))
16503 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16504 0 : return xpc::StringToJsval(cx, result, vp);
16505 : }
16506 :
16507 : static JSBool
16508 0 : nsIDOMHTMLTableCellElement_SetHeaders(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16509 : {
16510 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16511 : nsIDOMHTMLTableCellElement *self;
16512 0 : xpc_qsSelfRef selfref;
16513 0 : JS::AutoValueRooter tvr(cx);
16514 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16515 0 : return JS_FALSE;
16516 : xpc_qsDOMString arg0(cx, *vp, vp,
16517 : xpc_qsDOMString::eDefaultNullBehavior,
16518 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16519 0 : if (!arg0.IsValid())
16520 0 : return JS_FALSE;
16521 : nsresult rv;
16522 0 : rv = self->SetHeaders(arg0);
16523 0 : if (NS_FAILED(rv))
16524 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16525 0 : return JS_TRUE;
16526 : }
16527 :
16528 : static JSBool
16529 0 : nsIDOMHTMLTableCellElement_GetCellIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16530 : {
16531 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16532 : nsIDOMHTMLTableCellElement *self;
16533 0 : xpc_qsSelfRef selfref;
16534 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16535 0 : return JS_FALSE;
16536 : nsresult rv;
16537 : PRInt32 result;
16538 0 : rv = self->GetCellIndex(&result);
16539 0 : if (NS_FAILED(rv))
16540 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16541 0 : *vp = INT_TO_JSVAL(result);
16542 0 : return JS_TRUE;
16543 : }
16544 :
16545 : static JSBool
16546 0 : nsIDOMHTMLTableCellElement_GetRowSpan(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16547 : {
16548 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16549 : nsIDOMHTMLTableCellElement *self;
16550 0 : xpc_qsSelfRef selfref;
16551 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16552 0 : return JS_FALSE;
16553 : nsresult rv;
16554 : PRInt32 result;
16555 0 : rv = self->GetRowSpan(&result);
16556 0 : if (NS_FAILED(rv))
16557 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16558 0 : *vp = INT_TO_JSVAL(result);
16559 0 : return JS_TRUE;
16560 : }
16561 :
16562 : static JSBool
16563 0 : nsIDOMHTMLTableCellElement_SetRowSpan(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16564 : {
16565 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16566 : nsIDOMHTMLTableCellElement *self;
16567 0 : xpc_qsSelfRef selfref;
16568 0 : JS::AutoValueRooter tvr(cx);
16569 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16570 0 : return JS_FALSE;
16571 : int32_t arg0;
16572 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16573 0 : return JS_FALSE;
16574 : nsresult rv;
16575 0 : rv = self->SetRowSpan(arg0);
16576 0 : if (NS_FAILED(rv))
16577 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16578 0 : return JS_TRUE;
16579 : }
16580 :
16581 : static JSBool
16582 0 : nsIDOMHTMLTableCellElement_GetAbbr(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16583 : {
16584 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16585 : nsIDOMHTMLTableCellElement *self;
16586 0 : xpc_qsSelfRef selfref;
16587 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16588 0 : return JS_FALSE;
16589 : nsresult rv;
16590 0 : nsString result;
16591 0 : rv = self->GetAbbr(result);
16592 0 : if (NS_FAILED(rv))
16593 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16594 0 : return xpc::StringToJsval(cx, result, vp);
16595 : }
16596 :
16597 : static JSBool
16598 0 : nsIDOMHTMLTableCellElement_SetAbbr(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16599 : {
16600 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16601 : nsIDOMHTMLTableCellElement *self;
16602 0 : xpc_qsSelfRef selfref;
16603 0 : JS::AutoValueRooter tvr(cx);
16604 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16605 0 : return JS_FALSE;
16606 : xpc_qsDOMString arg0(cx, *vp, vp,
16607 : xpc_qsDOMString::eDefaultNullBehavior,
16608 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16609 0 : if (!arg0.IsValid())
16610 0 : return JS_FALSE;
16611 : nsresult rv;
16612 0 : rv = self->SetAbbr(arg0);
16613 0 : if (NS_FAILED(rv))
16614 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16615 0 : return JS_TRUE;
16616 : }
16617 :
16618 : static JSBool
16619 0 : nsIDOMHTMLTableCellElement_GetScope(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16620 : {
16621 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16622 : nsIDOMHTMLTableCellElement *self;
16623 0 : xpc_qsSelfRef selfref;
16624 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16625 0 : return JS_FALSE;
16626 : nsresult rv;
16627 0 : nsString result;
16628 0 : rv = self->GetScope(result);
16629 0 : if (NS_FAILED(rv))
16630 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16631 0 : return xpc::StringToJsval(cx, result, vp);
16632 : }
16633 :
16634 : static JSBool
16635 0 : nsIDOMHTMLTableCellElement_SetScope(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16636 : {
16637 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16638 : nsIDOMHTMLTableCellElement *self;
16639 0 : xpc_qsSelfRef selfref;
16640 0 : JS::AutoValueRooter tvr(cx);
16641 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16642 0 : return JS_FALSE;
16643 : xpc_qsDOMString arg0(cx, *vp, vp,
16644 : xpc_qsDOMString::eDefaultNullBehavior,
16645 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16646 0 : if (!arg0.IsValid())
16647 0 : return JS_FALSE;
16648 : nsresult rv;
16649 0 : rv = self->SetScope(arg0);
16650 0 : if (NS_FAILED(rv))
16651 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16652 0 : return JS_TRUE;
16653 : }
16654 :
16655 : static JSBool
16656 0 : nsIDOMHTMLTableCellElement_GetNoWrap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16657 : {
16658 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16659 : nsIDOMHTMLTableCellElement *self;
16660 0 : xpc_qsSelfRef selfref;
16661 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16662 0 : return JS_FALSE;
16663 : nsresult rv;
16664 : bool result;
16665 0 : rv = self->GetNoWrap(&result);
16666 0 : if (NS_FAILED(rv))
16667 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16668 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
16669 0 : return JS_TRUE;
16670 : }
16671 :
16672 : static JSBool
16673 0 : nsIDOMHTMLTableCellElement_SetNoWrap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16674 : {
16675 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16676 : nsIDOMHTMLTableCellElement *self;
16677 0 : xpc_qsSelfRef selfref;
16678 0 : JS::AutoValueRooter tvr(cx);
16679 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16680 0 : return JS_FALSE;
16681 : JSBool arg0;
16682 0 : JS_ValueToBoolean(cx, *vp, &arg0);
16683 : nsresult rv;
16684 0 : rv = self->SetNoWrap(arg0);
16685 0 : if (NS_FAILED(rv))
16686 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16687 0 : return JS_TRUE;
16688 : }
16689 :
16690 : static JSBool
16691 0 : nsIDOMHTMLTableCellElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16692 : {
16693 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16694 : nsIDOMHTMLTableCellElement *self;
16695 0 : xpc_qsSelfRef selfref;
16696 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16697 0 : return JS_FALSE;
16698 : nsresult rv;
16699 0 : nsString result;
16700 0 : rv = self->GetWidth(result);
16701 0 : if (NS_FAILED(rv))
16702 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16703 0 : return xpc::StringToJsval(cx, result, vp);
16704 : }
16705 :
16706 : static JSBool
16707 0 : nsIDOMHTMLTableCellElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16708 : {
16709 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16710 : nsIDOMHTMLTableCellElement *self;
16711 0 : xpc_qsSelfRef selfref;
16712 0 : JS::AutoValueRooter tvr(cx);
16713 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16714 0 : return JS_FALSE;
16715 : xpc_qsDOMString arg0(cx, *vp, vp,
16716 : xpc_qsDOMString::eDefaultNullBehavior,
16717 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16718 0 : if (!arg0.IsValid())
16719 0 : return JS_FALSE;
16720 : nsresult rv;
16721 0 : rv = self->SetWidth(arg0);
16722 0 : if (NS_FAILED(rv))
16723 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16724 0 : return JS_TRUE;
16725 : }
16726 :
16727 : // === interface nsIDOMHTMLTableColElement
16728 :
16729 : static JSBool
16730 0 : nsIDOMHTMLTableColElement_GetSpan(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16731 : {
16732 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16733 : nsIDOMHTMLTableColElement *self;
16734 0 : xpc_qsSelfRef selfref;
16735 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16736 0 : return JS_FALSE;
16737 : nsresult rv;
16738 : PRInt32 result;
16739 0 : rv = self->GetSpan(&result);
16740 0 : if (NS_FAILED(rv))
16741 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16742 0 : *vp = INT_TO_JSVAL(result);
16743 0 : return JS_TRUE;
16744 : }
16745 :
16746 : static JSBool
16747 0 : nsIDOMHTMLTableColElement_SetSpan(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16748 : {
16749 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16750 : nsIDOMHTMLTableColElement *self;
16751 0 : xpc_qsSelfRef selfref;
16752 0 : JS::AutoValueRooter tvr(cx);
16753 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16754 0 : return JS_FALSE;
16755 : int32_t arg0;
16756 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
16757 0 : return JS_FALSE;
16758 : nsresult rv;
16759 0 : rv = self->SetSpan(arg0);
16760 0 : if (NS_FAILED(rv))
16761 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16762 0 : return JS_TRUE;
16763 : }
16764 :
16765 : static JSBool
16766 0 : nsIDOMHTMLTableColElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16767 : {
16768 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16769 : nsIDOMHTMLTableColElement *self;
16770 0 : xpc_qsSelfRef selfref;
16771 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16772 0 : return JS_FALSE;
16773 : nsresult rv;
16774 0 : nsString result;
16775 0 : rv = self->GetWidth(result);
16776 0 : if (NS_FAILED(rv))
16777 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16778 0 : return xpc::StringToJsval(cx, result, vp);
16779 : }
16780 :
16781 : static JSBool
16782 0 : nsIDOMHTMLTableColElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16783 : {
16784 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16785 : nsIDOMHTMLTableColElement *self;
16786 0 : xpc_qsSelfRef selfref;
16787 0 : JS::AutoValueRooter tvr(cx);
16788 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16789 0 : return JS_FALSE;
16790 : xpc_qsDOMString arg0(cx, *vp, vp,
16791 : xpc_qsDOMString::eDefaultNullBehavior,
16792 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16793 0 : if (!arg0.IsValid())
16794 0 : return JS_FALSE;
16795 : nsresult rv;
16796 0 : rv = self->SetWidth(arg0);
16797 0 : if (NS_FAILED(rv))
16798 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16799 0 : return JS_TRUE;
16800 : }
16801 :
16802 : // === interface nsIDOMHTMLTableElement
16803 :
16804 : static JSBool
16805 0 : nsIDOMHTMLTableElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16806 : {
16807 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16808 0 : JSObject *callee = nsnull;
16809 : nsIDOMHTMLTableElement *self;
16810 0 : xpc_qsSelfRef selfref;
16811 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16812 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16813 0 : return JS_FALSE;
16814 : nsresult rv;
16815 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
16816 0 : rv = self->GetRows(getter_AddRefs(result));
16817 0 : if (NS_FAILED(rv))
16818 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16819 0 : if (!result) {
16820 0 : *vp = JSVAL_NULL;
16821 0 : return JS_TRUE;
16822 : }
16823 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16824 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16825 0 : return JS_TRUE;
16826 : }
16827 : // After this point do not use 'result'!
16828 0 : qsObjectHelper helper(result, cache);
16829 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
16830 : }
16831 :
16832 : static JSBool
16833 0 : nsIDOMHTMLTableElement_DeleteRow(JSContext *cx, unsigned argc, jsval *vp)
16834 : {
16835 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16836 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16837 0 : if (!obj)
16838 0 : return JS_FALSE;
16839 : nsIDOMHTMLTableElement *self;
16840 0 : xpc_qsSelfRef selfref;
16841 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
16842 0 : return JS_FALSE;
16843 0 : if (argc < 1)
16844 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16845 0 : jsval *argv = JS_ARGV(cx, vp);
16846 : int32_t arg0;
16847 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
16848 0 : return JS_FALSE;
16849 : nsresult rv;
16850 0 : rv = self->DeleteRow(arg0);
16851 0 : if (NS_FAILED(rv))
16852 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16853 0 : *vp = JSVAL_VOID;
16854 0 : return JS_TRUE;
16855 : }
16856 :
16857 : static JSBool
16858 0 : nsIDOMHTMLTableElement_GetSummary(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16859 : {
16860 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16861 : nsIDOMHTMLTableElement *self;
16862 0 : xpc_qsSelfRef selfref;
16863 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16864 0 : return JS_FALSE;
16865 : nsresult rv;
16866 0 : nsString result;
16867 0 : rv = self->GetSummary(result);
16868 0 : if (NS_FAILED(rv))
16869 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16870 0 : return xpc::StringToJsval(cx, result, vp);
16871 : }
16872 :
16873 : static JSBool
16874 0 : nsIDOMHTMLTableElement_SetSummary(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
16875 : {
16876 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16877 : nsIDOMHTMLTableElement *self;
16878 0 : xpc_qsSelfRef selfref;
16879 0 : JS::AutoValueRooter tvr(cx);
16880 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
16881 0 : return JS_FALSE;
16882 : xpc_qsDOMString arg0(cx, *vp, vp,
16883 : xpc_qsDOMString::eDefaultNullBehavior,
16884 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
16885 0 : if (!arg0.IsValid())
16886 0 : return JS_FALSE;
16887 : nsresult rv;
16888 0 : rv = self->SetSummary(arg0);
16889 0 : if (NS_FAILED(rv))
16890 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
16891 0 : return JS_TRUE;
16892 : }
16893 :
16894 : static JSBool
16895 0 : nsIDOMHTMLTableElement_InsertRow(JSContext *cx, unsigned argc, jsval *vp)
16896 : {
16897 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16898 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
16899 0 : if (!obj)
16900 0 : return JS_FALSE;
16901 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
16902 : nsIDOMHTMLTableElement *self;
16903 0 : xpc_qsSelfRef selfref;
16904 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16905 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
16906 0 : return JS_FALSE;
16907 0 : if (argc < 1)
16908 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
16909 0 : jsval *argv = JS_ARGV(cx, vp);
16910 : int32_t arg0;
16911 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
16912 0 : return JS_FALSE;
16913 : nsresult rv;
16914 0 : nsCOMPtr<nsIDOMHTMLElement> result;
16915 0 : rv = self->InsertRow(arg0, getter_AddRefs(result));
16916 0 : if (NS_FAILED(rv))
16917 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
16918 0 : if (!result) {
16919 0 : *vp = JSVAL_NULL;
16920 0 : return JS_TRUE;
16921 : }
16922 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16923 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16924 0 : return JS_TRUE;
16925 : }
16926 : // After this point do not use 'result'!
16927 0 : qsObjectHelper helper(result, cache);
16928 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
16929 : }
16930 :
16931 : // === interface nsIDOMHTMLTableRowElement
16932 :
16933 : static JSBool
16934 0 : nsIDOMHTMLTableRowElement_GetSectionRowIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16935 : {
16936 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16937 : nsIDOMHTMLTableRowElement *self;
16938 0 : xpc_qsSelfRef selfref;
16939 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16940 0 : return JS_FALSE;
16941 : nsresult rv;
16942 : PRInt32 result;
16943 0 : rv = self->GetSectionRowIndex(&result);
16944 0 : if (NS_FAILED(rv))
16945 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16946 0 : *vp = INT_TO_JSVAL(result);
16947 0 : return JS_TRUE;
16948 : }
16949 :
16950 : static JSBool
16951 0 : nsIDOMHTMLTableRowElement_GetRowIndex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16952 : {
16953 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16954 : nsIDOMHTMLTableRowElement *self;
16955 0 : xpc_qsSelfRef selfref;
16956 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
16957 0 : return JS_FALSE;
16958 : nsresult rv;
16959 : PRInt32 result;
16960 0 : rv = self->GetRowIndex(&result);
16961 0 : if (NS_FAILED(rv))
16962 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16963 0 : *vp = INT_TO_JSVAL(result);
16964 0 : return JS_TRUE;
16965 : }
16966 :
16967 : static JSBool
16968 0 : nsIDOMHTMLTableRowElement_GetCells(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
16969 : {
16970 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16971 0 : JSObject *callee = nsnull;
16972 : nsIDOMHTMLTableRowElement *self;
16973 0 : xpc_qsSelfRef selfref;
16974 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
16975 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
16976 0 : return JS_FALSE;
16977 : nsresult rv;
16978 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
16979 0 : rv = self->GetCells(getter_AddRefs(result));
16980 0 : if (NS_FAILED(rv))
16981 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
16982 0 : if (!result) {
16983 0 : *vp = JSVAL_NULL;
16984 0 : return JS_TRUE;
16985 : }
16986 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
16987 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
16988 0 : return JS_TRUE;
16989 : }
16990 : // After this point do not use 'result'!
16991 0 : qsObjectHelper helper(result, cache);
16992 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
16993 : }
16994 :
16995 : static JSBool
16996 0 : nsIDOMHTMLTableRowElement_DeleteCell(JSContext *cx, unsigned argc, jsval *vp)
16997 : {
16998 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
16999 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17000 0 : if (!obj)
17001 0 : return JS_FALSE;
17002 : nsIDOMHTMLTableRowElement *self;
17003 0 : xpc_qsSelfRef selfref;
17004 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17005 0 : return JS_FALSE;
17006 0 : if (argc < 1)
17007 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17008 0 : jsval *argv = JS_ARGV(cx, vp);
17009 : int32_t arg0;
17010 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17011 0 : return JS_FALSE;
17012 : nsresult rv;
17013 0 : rv = self->DeleteCell(arg0);
17014 0 : if (NS_FAILED(rv))
17015 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17016 0 : *vp = JSVAL_VOID;
17017 0 : return JS_TRUE;
17018 : }
17019 :
17020 : static JSBool
17021 0 : nsIDOMHTMLTableRowElement_InsertCell(JSContext *cx, unsigned argc, jsval *vp)
17022 : {
17023 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17024 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17025 0 : if (!obj)
17026 0 : return JS_FALSE;
17027 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
17028 : nsIDOMHTMLTableRowElement *self;
17029 0 : xpc_qsSelfRef selfref;
17030 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17031 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
17032 0 : return JS_FALSE;
17033 0 : if (argc < 1)
17034 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17035 0 : jsval *argv = JS_ARGV(cx, vp);
17036 : int32_t arg0;
17037 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17038 0 : return JS_FALSE;
17039 : nsresult rv;
17040 0 : nsCOMPtr<nsIDOMHTMLElement> result;
17041 0 : rv = self->InsertCell(arg0, getter_AddRefs(result));
17042 0 : if (NS_FAILED(rv))
17043 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17044 0 : if (!result) {
17045 0 : *vp = JSVAL_NULL;
17046 0 : return JS_TRUE;
17047 : }
17048 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17049 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17050 0 : return JS_TRUE;
17051 : }
17052 : // After this point do not use 'result'!
17053 0 : qsObjectHelper helper(result, cache);
17054 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
17055 : }
17056 :
17057 : // === interface nsIDOMHTMLTableSectionElement
17058 :
17059 : static JSBool
17060 0 : nsIDOMHTMLTableSectionElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17061 : {
17062 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17063 0 : JSObject *callee = nsnull;
17064 : nsIDOMHTMLTableSectionElement *self;
17065 0 : xpc_qsSelfRef selfref;
17066 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17067 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17068 0 : return JS_FALSE;
17069 : nsresult rv;
17070 0 : nsCOMPtr<nsIDOMHTMLCollection> result;
17071 0 : rv = self->GetRows(getter_AddRefs(result));
17072 0 : if (NS_FAILED(rv))
17073 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17074 0 : if (!result) {
17075 0 : *vp = JSVAL_NULL;
17076 0 : return JS_TRUE;
17077 : }
17078 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17079 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17080 0 : return JS_TRUE;
17081 : }
17082 : // After this point do not use 'result'!
17083 0 : qsObjectHelper helper(result, cache);
17084 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCollection), &interfaces[k_nsIDOMHTMLCollection], vp);
17085 : }
17086 :
17087 : static JSBool
17088 0 : nsIDOMHTMLTableSectionElement_InsertRow(JSContext *cx, unsigned argc, jsval *vp)
17089 : {
17090 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17091 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17092 0 : if (!obj)
17093 0 : return JS_FALSE;
17094 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
17095 : nsIDOMHTMLTableSectionElement *self;
17096 0 : xpc_qsSelfRef selfref;
17097 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17098 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
17099 0 : return JS_FALSE;
17100 0 : if (argc < 1)
17101 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17102 0 : jsval *argv = JS_ARGV(cx, vp);
17103 : int32_t arg0;
17104 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17105 0 : return JS_FALSE;
17106 : nsresult rv;
17107 0 : nsCOMPtr<nsIDOMHTMLElement> result;
17108 0 : rv = self->InsertRow(arg0, getter_AddRefs(result));
17109 0 : if (NS_FAILED(rv))
17110 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17111 0 : if (!result) {
17112 0 : *vp = JSVAL_NULL;
17113 0 : return JS_TRUE;
17114 : }
17115 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17116 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17117 0 : return JS_TRUE;
17118 : }
17119 : // After this point do not use 'result'!
17120 0 : qsObjectHelper helper(result, cache);
17121 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLElement), &interfaces[k_nsIDOMHTMLElement], vp);
17122 : }
17123 :
17124 : static JSBool
17125 0 : nsIDOMHTMLTableSectionElement_DeleteRow(JSContext *cx, unsigned argc, jsval *vp)
17126 : {
17127 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17128 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17129 0 : if (!obj)
17130 0 : return JS_FALSE;
17131 : nsIDOMHTMLTableSectionElement *self;
17132 0 : xpc_qsSelfRef selfref;
17133 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17134 0 : return JS_FALSE;
17135 0 : if (argc < 1)
17136 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17137 0 : jsval *argv = JS_ARGV(cx, vp);
17138 : int32_t arg0;
17139 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17140 0 : return JS_FALSE;
17141 : nsresult rv;
17142 0 : rv = self->DeleteRow(arg0);
17143 0 : if (NS_FAILED(rv))
17144 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17145 0 : *vp = JSVAL_VOID;
17146 0 : return JS_TRUE;
17147 : }
17148 :
17149 : // === interface nsIDOMHTMLTextAreaElement
17150 :
17151 : static JSBool
17152 0 : nsIDOMHTMLTextAreaElement_GetRows(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17153 : {
17154 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17155 : nsIDOMHTMLTextAreaElement *self;
17156 0 : xpc_qsSelfRef selfref;
17157 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17158 0 : return JS_FALSE;
17159 : nsresult rv;
17160 : PRUint32 result;
17161 0 : rv = self->GetRows(&result);
17162 0 : if (NS_FAILED(rv))
17163 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17164 0 : *vp = UINT_TO_JSVAL(result);
17165 0 : return JS_TRUE;
17166 : }
17167 :
17168 : static JSBool
17169 0 : nsIDOMHTMLTextAreaElement_SetRows(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17170 : {
17171 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17172 : nsIDOMHTMLTextAreaElement *self;
17173 0 : xpc_qsSelfRef selfref;
17174 0 : JS::AutoValueRooter tvr(cx);
17175 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17176 0 : return JS_FALSE;
17177 : uint32_t arg0;
17178 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17179 0 : return JS_FALSE;
17180 : nsresult rv;
17181 0 : rv = self->SetRows(arg0);
17182 0 : if (NS_FAILED(rv))
17183 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17184 0 : return JS_TRUE;
17185 : }
17186 :
17187 : static JSBool
17188 0 : nsIDOMHTMLTextAreaElement_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17189 : {
17190 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17191 : nsIDOMHTMLTextAreaElement *self;
17192 0 : xpc_qsSelfRef selfref;
17193 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17194 0 : return JS_FALSE;
17195 : nsresult rv;
17196 0 : nsString result;
17197 0 : rv = self->GetName(result);
17198 0 : if (NS_FAILED(rv))
17199 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17200 0 : return xpc::StringToJsval(cx, result, vp);
17201 : }
17202 :
17203 : static JSBool
17204 0 : nsIDOMHTMLTextAreaElement_SetName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17205 : {
17206 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17207 : nsIDOMHTMLTextAreaElement *self;
17208 0 : xpc_qsSelfRef selfref;
17209 0 : JS::AutoValueRooter tvr(cx);
17210 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17211 0 : return JS_FALSE;
17212 : xpc_qsDOMString arg0(cx, *vp, vp,
17213 : xpc_qsDOMString::eDefaultNullBehavior,
17214 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17215 0 : if (!arg0.IsValid())
17216 0 : return JS_FALSE;
17217 : nsresult rv;
17218 0 : rv = self->SetName(arg0);
17219 0 : if (NS_FAILED(rv))
17220 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17221 0 : return JS_TRUE;
17222 : }
17223 :
17224 : static JSBool
17225 0 : nsIDOMHTMLTextAreaElement_GetForm(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17226 : {
17227 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17228 0 : JSObject *callee = nsnull;
17229 : nsIDOMHTMLTextAreaElement *self;
17230 0 : xpc_qsSelfRef selfref;
17231 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17232 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17233 0 : return JS_FALSE;
17234 : nsresult rv;
17235 0 : nsCOMPtr<nsIDOMHTMLFormElement> result;
17236 0 : rv = self->GetForm(getter_AddRefs(result));
17237 0 : if (NS_FAILED(rv))
17238 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17239 0 : if (!result) {
17240 0 : *vp = JSVAL_NULL;
17241 0 : return JS_TRUE;
17242 : }
17243 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17244 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17245 0 : return JS_TRUE;
17246 : }
17247 : // After this point do not use 'result'!
17248 0 : qsObjectHelper helper(result, cache);
17249 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLFormElement), &interfaces[k_nsIDOMHTMLFormElement], vp);
17250 : }
17251 :
17252 : static JSBool
17253 0 : nsIDOMHTMLTextAreaElement_GetDefaultValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17254 : {
17255 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17256 : nsIDOMHTMLTextAreaElement *self;
17257 0 : xpc_qsSelfRef selfref;
17258 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17259 0 : return JS_FALSE;
17260 : nsresult rv;
17261 0 : nsString result;
17262 0 : rv = self->GetDefaultValue(result);
17263 0 : if (NS_FAILED(rv))
17264 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17265 0 : return xpc::StringToJsval(cx, result, vp);
17266 : }
17267 :
17268 : static JSBool
17269 0 : nsIDOMHTMLTextAreaElement_SetDefaultValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17270 : {
17271 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17272 : nsIDOMHTMLTextAreaElement *self;
17273 0 : xpc_qsSelfRef selfref;
17274 0 : JS::AutoValueRooter tvr(cx);
17275 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17276 0 : return JS_FALSE;
17277 : xpc_qsDOMString arg0(cx, *vp, vp,
17278 : xpc_qsDOMString::eDefaultNullBehavior,
17279 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17280 0 : if (!arg0.IsValid())
17281 0 : return JS_FALSE;
17282 : nsresult rv;
17283 0 : rv = self->SetDefaultValue(arg0);
17284 0 : if (NS_FAILED(rv))
17285 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17286 0 : return JS_TRUE;
17287 : }
17288 :
17289 : static JSBool
17290 0 : nsIDOMHTMLTextAreaElement_GetCols(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17291 : {
17292 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17293 : nsIDOMHTMLTextAreaElement *self;
17294 0 : xpc_qsSelfRef selfref;
17295 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17296 0 : return JS_FALSE;
17297 : nsresult rv;
17298 : PRUint32 result;
17299 0 : rv = self->GetCols(&result);
17300 0 : if (NS_FAILED(rv))
17301 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17302 0 : *vp = UINT_TO_JSVAL(result);
17303 0 : return JS_TRUE;
17304 : }
17305 :
17306 : static JSBool
17307 0 : nsIDOMHTMLTextAreaElement_SetCols(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17308 : {
17309 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17310 : nsIDOMHTMLTextAreaElement *self;
17311 0 : xpc_qsSelfRef selfref;
17312 0 : JS::AutoValueRooter tvr(cx);
17313 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17314 0 : return JS_FALSE;
17315 : uint32_t arg0;
17316 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17317 0 : return JS_FALSE;
17318 : nsresult rv;
17319 0 : rv = self->SetCols(arg0);
17320 0 : if (NS_FAILED(rv))
17321 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17322 0 : return JS_TRUE;
17323 : }
17324 :
17325 : static JSBool
17326 0 : nsIDOMHTMLTextAreaElement_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17327 : {
17328 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17329 : nsIDOMHTMLTextAreaElement *self;
17330 0 : xpc_qsSelfRef selfref;
17331 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17332 0 : return JS_FALSE;
17333 : nsresult rv;
17334 0 : nsString result;
17335 0 : rv = self->GetValue(result);
17336 0 : if (NS_FAILED(rv))
17337 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17338 0 : return xpc::StringToJsval(cx, result, vp);
17339 : }
17340 :
17341 : static JSBool
17342 0 : nsIDOMHTMLTextAreaElement_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17343 : {
17344 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17345 : nsIDOMHTMLTextAreaElement *self;
17346 0 : xpc_qsSelfRef selfref;
17347 0 : JS::AutoValueRooter tvr(cx);
17348 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17349 0 : return JS_FALSE;
17350 : xpc_qsDOMString arg0(cx, *vp, vp,
17351 : xpc_qsDOMString::eDefaultNullBehavior,
17352 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17353 0 : if (!arg0.IsValid())
17354 0 : return JS_FALSE;
17355 : nsresult rv;
17356 0 : rv = self->SetValue(arg0);
17357 0 : if (NS_FAILED(rv))
17358 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17359 0 : return JS_TRUE;
17360 : }
17361 :
17362 : static JSBool
17363 0 : nsIDOMHTMLTextAreaElement_GetType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17364 : {
17365 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17366 : nsIDOMHTMLTextAreaElement *self;
17367 0 : xpc_qsSelfRef selfref;
17368 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17369 0 : return JS_FALSE;
17370 : nsresult rv;
17371 0 : nsString result;
17372 0 : rv = self->GetType(result);
17373 0 : if (NS_FAILED(rv))
17374 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17375 0 : return xpc::StringToJsval(cx, result, vp);
17376 : }
17377 :
17378 : static JSBool
17379 0 : nsIDOMHTMLTextAreaElement_Select(JSContext *cx, unsigned argc, jsval *vp)
17380 : {
17381 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17382 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17383 0 : if (!obj)
17384 0 : return JS_FALSE;
17385 : nsIDOMHTMLTextAreaElement *self;
17386 0 : xpc_qsSelfRef selfref;
17387 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17388 0 : return JS_FALSE;
17389 : nsresult rv;
17390 0 : rv = self->Select();
17391 0 : if (NS_FAILED(rv))
17392 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17393 0 : *vp = JSVAL_VOID;
17394 0 : return JS_TRUE;
17395 : }
17396 :
17397 : static JSBool
17398 0 : nsIDOMHTMLTextAreaElement_SetSelectionRange(JSContext *cx, unsigned argc, jsval *vp)
17399 : {
17400 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17401 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17402 0 : if (!obj)
17403 0 : return JS_FALSE;
17404 : nsIDOMHTMLTextAreaElement *self;
17405 0 : xpc_qsSelfRef selfref;
17406 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17407 0 : return JS_FALSE;
17408 0 : if (argc < 2)
17409 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17410 0 : jsval *argv = JS_ARGV(cx, vp);
17411 : int32_t arg0;
17412 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
17413 0 : return JS_FALSE;
17414 : int32_t arg1;
17415 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
17416 0 : return JS_FALSE;
17417 : xpc_qsDOMString arg2(cx, (2 < argc ? argv[2] : JSVAL_NULL), (2 < argc ? &argv[2] : NULL),
17418 : xpc_qsDOMString::eDefaultNullBehavior,
17419 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17420 0 : if (!arg2.IsValid())
17421 0 : return JS_FALSE;
17422 : nsresult rv;
17423 0 : rv = self->SetSelectionRange(arg0, arg1, arg2);
17424 0 : if (NS_FAILED(rv))
17425 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17426 0 : *vp = JSVAL_VOID;
17427 0 : return JS_TRUE;
17428 : }
17429 :
17430 : static JSBool
17431 0 : nsIDOMHTMLTextAreaElement_GetSelectionStart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17432 : {
17433 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17434 : nsIDOMHTMLTextAreaElement *self;
17435 0 : xpc_qsSelfRef selfref;
17436 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17437 0 : return JS_FALSE;
17438 : nsresult rv;
17439 : PRInt32 result;
17440 0 : rv = self->GetSelectionStart(&result);
17441 0 : if (NS_FAILED(rv))
17442 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17443 0 : *vp = INT_TO_JSVAL(result);
17444 0 : return JS_TRUE;
17445 : }
17446 :
17447 : static JSBool
17448 0 : nsIDOMHTMLTextAreaElement_SetSelectionStart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17449 : {
17450 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17451 : nsIDOMHTMLTextAreaElement *self;
17452 0 : xpc_qsSelfRef selfref;
17453 0 : JS::AutoValueRooter tvr(cx);
17454 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17455 0 : return JS_FALSE;
17456 : int32_t arg0;
17457 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
17458 0 : return JS_FALSE;
17459 : nsresult rv;
17460 0 : rv = self->SetSelectionStart(arg0);
17461 0 : if (NS_FAILED(rv))
17462 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17463 0 : return JS_TRUE;
17464 : }
17465 :
17466 : static JSBool
17467 0 : nsIDOMHTMLTextAreaElement_GetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17468 : {
17469 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17470 : nsIDOMHTMLTextAreaElement *self;
17471 0 : xpc_qsSelfRef selfref;
17472 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17473 0 : return JS_FALSE;
17474 : nsresult rv;
17475 : PRInt32 result;
17476 0 : rv = self->GetSelectionEnd(&result);
17477 0 : if (NS_FAILED(rv))
17478 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17479 0 : *vp = INT_TO_JSVAL(result);
17480 0 : return JS_TRUE;
17481 : }
17482 :
17483 : static JSBool
17484 0 : nsIDOMHTMLTextAreaElement_SetSelectionEnd(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17485 : {
17486 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17487 : nsIDOMHTMLTextAreaElement *self;
17488 0 : xpc_qsSelfRef selfref;
17489 0 : JS::AutoValueRooter tvr(cx);
17490 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17491 0 : return JS_FALSE;
17492 : int32_t arg0;
17493 0 : if (!JS_ValueToECMAInt32(cx, *vp, &arg0))
17494 0 : return JS_FALSE;
17495 : nsresult rv;
17496 0 : rv = self->SetSelectionEnd(arg0);
17497 0 : if (NS_FAILED(rv))
17498 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17499 0 : return JS_TRUE;
17500 : }
17501 :
17502 : static JSBool
17503 0 : nsIDOMHTMLTextAreaElement_GetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17504 : {
17505 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17506 : nsIDOMHTMLTextAreaElement *self;
17507 0 : xpc_qsSelfRef selfref;
17508 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17509 0 : return JS_FALSE;
17510 : nsresult rv;
17511 0 : nsString result;
17512 0 : rv = self->GetSelectionDirection(result);
17513 0 : if (NS_FAILED(rv))
17514 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17515 0 : return xpc::StringToJsval(cx, result, vp);
17516 : }
17517 :
17518 : static JSBool
17519 0 : nsIDOMHTMLTextAreaElement_SetSelectionDirection(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17520 : {
17521 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17522 : nsIDOMHTMLTextAreaElement *self;
17523 0 : xpc_qsSelfRef selfref;
17524 0 : JS::AutoValueRooter tvr(cx);
17525 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17526 0 : return JS_FALSE;
17527 : xpc_qsDOMString arg0(cx, *vp, vp,
17528 : xpc_qsDOMString::eDefaultNullBehavior,
17529 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17530 0 : if (!arg0.IsValid())
17531 0 : return JS_FALSE;
17532 : nsresult rv;
17533 0 : rv = self->SetSelectionDirection(arg0);
17534 0 : if (NS_FAILED(rv))
17535 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17536 0 : return JS_TRUE;
17537 : }
17538 :
17539 : static JSBool
17540 0 : nsIDOMHTMLTextAreaElement_GetTextLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17541 : {
17542 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17543 : nsIDOMHTMLTextAreaElement *self;
17544 0 : xpc_qsSelfRef selfref;
17545 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17546 0 : return JS_FALSE;
17547 : nsresult rv;
17548 : PRInt32 result;
17549 0 : rv = self->GetTextLength(&result);
17550 0 : if (NS_FAILED(rv))
17551 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17552 0 : *vp = INT_TO_JSVAL(result);
17553 0 : return JS_TRUE;
17554 : }
17555 :
17556 : static JSBool
17557 0 : nsIDOMHTMLTextAreaElement_GetWrap(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17558 : {
17559 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17560 : nsIDOMHTMLTextAreaElement *self;
17561 0 : xpc_qsSelfRef selfref;
17562 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17563 0 : return JS_FALSE;
17564 : nsresult rv;
17565 0 : nsString result;
17566 0 : rv = self->GetWrap(result);
17567 0 : if (NS_FAILED(rv))
17568 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17569 0 : return xpc::StringToJsval(cx, result, vp);
17570 : }
17571 :
17572 : static JSBool
17573 0 : nsIDOMHTMLTextAreaElement_SetWrap(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17574 : {
17575 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17576 : nsIDOMHTMLTextAreaElement *self;
17577 0 : xpc_qsSelfRef selfref;
17578 0 : JS::AutoValueRooter tvr(cx);
17579 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17580 0 : return JS_FALSE;
17581 : xpc_qsDOMString arg0(cx, *vp, vp,
17582 : xpc_qsDOMString::eStringify,
17583 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17584 0 : if (!arg0.IsValid())
17585 0 : return JS_FALSE;
17586 : nsresult rv;
17587 0 : rv = self->SetWrap(arg0);
17588 0 : if (NS_FAILED(rv))
17589 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17590 0 : return JS_TRUE;
17591 : }
17592 :
17593 : // === interface nsIDOMHTMLTitleElement
17594 :
17595 : static JSBool
17596 0 : nsIDOMHTMLTitleElement_GetText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17597 : {
17598 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17599 : nsIDOMHTMLTitleElement *self;
17600 0 : xpc_qsSelfRef selfref;
17601 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17602 0 : return JS_FALSE;
17603 : nsresult rv;
17604 0 : nsString result;
17605 0 : rv = self->GetText(result);
17606 0 : if (NS_FAILED(rv))
17607 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17608 0 : return xpc::StringToJsval(cx, result, vp);
17609 : }
17610 :
17611 : static JSBool
17612 0 : nsIDOMHTMLTitleElement_SetText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17613 : {
17614 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17615 : nsIDOMHTMLTitleElement *self;
17616 0 : xpc_qsSelfRef selfref;
17617 0 : JS::AutoValueRooter tvr(cx);
17618 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17619 0 : return JS_FALSE;
17620 : xpc_qsDOMString arg0(cx, *vp, vp,
17621 : xpc_qsDOMString::eDefaultNullBehavior,
17622 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17623 0 : if (!arg0.IsValid())
17624 0 : return JS_FALSE;
17625 : nsresult rv;
17626 0 : rv = self->SetText(arg0);
17627 0 : if (NS_FAILED(rv))
17628 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17629 0 : return JS_TRUE;
17630 : }
17631 :
17632 : // === interface nsIDOMHTMLCanvasElement
17633 :
17634 : static JSBool
17635 0 : nsIDOMHTMLCanvasElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17636 : {
17637 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17638 : nsIDOMHTMLCanvasElement *self;
17639 0 : xpc_qsSelfRef selfref;
17640 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17641 0 : return JS_FALSE;
17642 : nsresult rv;
17643 : PRUint32 result;
17644 0 : rv = self->GetWidth(&result);
17645 0 : if (NS_FAILED(rv))
17646 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17647 0 : *vp = UINT_TO_JSVAL(result);
17648 0 : return JS_TRUE;
17649 : }
17650 :
17651 : static JSBool
17652 0 : nsIDOMHTMLCanvasElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17653 : {
17654 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17655 : nsIDOMHTMLCanvasElement *self;
17656 0 : xpc_qsSelfRef selfref;
17657 0 : JS::AutoValueRooter tvr(cx);
17658 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17659 0 : return JS_FALSE;
17660 : uint32_t arg0;
17661 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17662 0 : return JS_FALSE;
17663 : nsresult rv;
17664 0 : rv = self->SetWidth(arg0);
17665 0 : if (NS_FAILED(rv))
17666 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17667 0 : return JS_TRUE;
17668 : }
17669 :
17670 : static JSBool
17671 0 : nsIDOMHTMLCanvasElement_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17672 : {
17673 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17674 : nsIDOMHTMLCanvasElement *self;
17675 0 : xpc_qsSelfRef selfref;
17676 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17677 0 : return JS_FALSE;
17678 : nsresult rv;
17679 : PRUint32 result;
17680 0 : rv = self->GetHeight(&result);
17681 0 : if (NS_FAILED(rv))
17682 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17683 0 : *vp = UINT_TO_JSVAL(result);
17684 0 : return JS_TRUE;
17685 : }
17686 :
17687 : static JSBool
17688 0 : nsIDOMHTMLCanvasElement_SetHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
17689 : {
17690 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17691 : nsIDOMHTMLCanvasElement *self;
17692 0 : xpc_qsSelfRef selfref;
17693 0 : JS::AutoValueRooter tvr(cx);
17694 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
17695 0 : return JS_FALSE;
17696 : uint32_t arg0;
17697 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
17698 0 : return JS_FALSE;
17699 : nsresult rv;
17700 0 : rv = self->SetHeight(arg0);
17701 0 : if (NS_FAILED(rv))
17702 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
17703 0 : return JS_TRUE;
17704 : }
17705 :
17706 : static JSBool
17707 0 : nsIDOMHTMLCanvasElement_GetContext(JSContext *cx, unsigned argc, jsval *vp)
17708 : {
17709 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17710 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17711 0 : if (!obj)
17712 0 : return JS_FALSE;
17713 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
17714 : nsIDOMHTMLCanvasElement *self;
17715 0 : xpc_qsSelfRef selfref;
17716 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17717 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
17718 0 : return JS_FALSE;
17719 0 : if (argc < 1)
17720 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17721 0 : jsval *argv = JS_ARGV(cx, vp);
17722 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
17723 : xpc_qsDOMString::eDefaultNullBehavior,
17724 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17725 0 : if (!arg0.IsValid())
17726 0 : return JS_FALSE;
17727 0 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
17728 : nsresult rv;
17729 0 : nsCOMPtr<nsISupports> result;
17730 0 : rv = self->GetContext(arg0, arg1, getter_AddRefs(result));
17731 0 : if (NS_FAILED(rv))
17732 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17733 0 : if (!result) {
17734 0 : *vp = JSVAL_NULL;
17735 0 : return JS_TRUE;
17736 : }
17737 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17738 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17739 0 : return JS_TRUE;
17740 : }
17741 : // After this point do not use 'result'!
17742 0 : qsObjectHelper helper(result, cache);
17743 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
17744 : }
17745 :
17746 : static JSBool
17747 0 : nsIDOMHTMLCanvasElement_ToDataURL(JSContext *cx, unsigned argc, jsval *vp)
17748 : {
17749 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17750 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17751 0 : if (!obj)
17752 0 : return JS_FALSE;
17753 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
17754 : nsIDOMHTMLCanvasElement *self;
17755 0 : xpc_qsSelfRef selfref;
17756 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
17757 0 : return JS_FALSE;
17758 0 : jsval *argv = JS_ARGV(cx, vp);
17759 : xpc_qsDOMString arg0(cx, (0 < argc ? argv[0] : JSVAL_NULL), (0 < argc ? &argv[0] : NULL),
17760 : xpc_qsDOMString::eDefaultNullBehavior,
17761 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
17762 0 : if (!arg0.IsValid())
17763 0 : return JS_FALSE;
17764 0 : nsCOMPtr<nsIVariant> arg1(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (1 < argc ? argv[1] : JSVAL_NULL))));
17765 0 : if (!arg1) {
17766 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 1);
17767 0 : return JS_FALSE;
17768 : } nsresult rv;
17769 0 : nsString result;
17770 0 : rv = self->ToDataURL(arg0, arg1, NS_MIN<PRUint32>(argc, 2) - 0, result);
17771 0 : if (NS_FAILED(rv))
17772 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
17773 0 : return xpc::StringToJsval(cx, result, vp);
17774 : }
17775 :
17776 : // === interface nsIDOMRange
17777 :
17778 : static JSBool
17779 23 : nsIDOMRange_GetStartContainer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17780 : {
17781 23 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17782 23 : JSObject *callee = nsnull;
17783 : nsIDOMRange *self;
17784 46 : xpc_qsSelfRef selfref;
17785 46 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17786 23 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17787 0 : return JS_FALSE;
17788 : nsresult rv;
17789 46 : nsCOMPtr<nsIDOMNode> result;
17790 23 : rv = self->GetStartContainer(getter_AddRefs(result));
17791 23 : if (NS_FAILED(rv))
17792 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17793 23 : if (!result) {
17794 0 : *vp = JSVAL_NULL;
17795 0 : return JS_TRUE;
17796 : }
17797 23 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17798 23 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17799 0 : return JS_TRUE;
17800 : }
17801 : // After this point do not use 'result'!
17802 46 : qsObjectHelper helper(result, cache);
17803 23 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
17804 : }
17805 :
17806 : static JSBool
17807 5 : nsIDOMRange_GetStartOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17808 : {
17809 5 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17810 : nsIDOMRange *self;
17811 10 : xpc_qsSelfRef selfref;
17812 5 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17813 0 : return JS_FALSE;
17814 : nsresult rv;
17815 : PRInt32 result;
17816 5 : rv = self->GetStartOffset(&result);
17817 5 : if (NS_FAILED(rv))
17818 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17819 5 : *vp = INT_TO_JSVAL(result);
17820 5 : return JS_TRUE;
17821 : }
17822 :
17823 : static JSBool
17824 24 : nsIDOMRange_GetEndContainer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17825 : {
17826 24 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17827 24 : JSObject *callee = nsnull;
17828 : nsIDOMRange *self;
17829 48 : xpc_qsSelfRef selfref;
17830 48 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17831 24 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17832 0 : return JS_FALSE;
17833 : nsresult rv;
17834 48 : nsCOMPtr<nsIDOMNode> result;
17835 24 : rv = self->GetEndContainer(getter_AddRefs(result));
17836 24 : if (NS_FAILED(rv))
17837 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17838 24 : if (!result) {
17839 0 : *vp = JSVAL_NULL;
17840 0 : return JS_TRUE;
17841 : }
17842 24 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17843 24 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17844 0 : return JS_TRUE;
17845 : }
17846 : // After this point do not use 'result'!
17847 48 : qsObjectHelper helper(result, cache);
17848 24 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
17849 : }
17850 :
17851 : static JSBool
17852 2 : nsIDOMRange_GetEndOffset(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17853 : {
17854 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17855 : nsIDOMRange *self;
17856 4 : xpc_qsSelfRef selfref;
17857 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17858 0 : return JS_FALSE;
17859 : nsresult rv;
17860 : PRInt32 result;
17861 2 : rv = self->GetEndOffset(&result);
17862 2 : if (NS_FAILED(rv))
17863 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17864 2 : *vp = INT_TO_JSVAL(result);
17865 2 : return JS_TRUE;
17866 : }
17867 :
17868 : static JSBool
17869 3 : nsIDOMRange_GetCollapsed(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17870 : {
17871 3 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17872 : nsIDOMRange *self;
17873 6 : xpc_qsSelfRef selfref;
17874 3 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
17875 0 : return JS_FALSE;
17876 : nsresult rv;
17877 : bool result;
17878 3 : rv = self->GetCollapsed(&result);
17879 3 : if (NS_FAILED(rv))
17880 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17881 3 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
17882 3 : return JS_TRUE;
17883 : }
17884 :
17885 : static JSBool
17886 0 : nsIDOMRange_GetCommonAncestorContainer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
17887 : {
17888 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17889 0 : JSObject *callee = nsnull;
17890 : nsIDOMRange *self;
17891 0 : xpc_qsSelfRef selfref;
17892 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
17893 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
17894 0 : return JS_FALSE;
17895 : nsresult rv;
17896 0 : nsCOMPtr<nsIDOMNode> result;
17897 0 : rv = self->GetCommonAncestorContainer(getter_AddRefs(result));
17898 0 : if (NS_FAILED(rv))
17899 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
17900 0 : if (!result) {
17901 0 : *vp = JSVAL_NULL;
17902 0 : return JS_TRUE;
17903 : }
17904 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
17905 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
17906 0 : return JS_TRUE;
17907 : }
17908 : // After this point do not use 'result'!
17909 0 : qsObjectHelper helper(result, cache);
17910 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
17911 : }
17912 :
17913 : static JSBool
17914 36 : nsIDOMRange_SetStart(JSContext *cx, unsigned argc, jsval *vp)
17915 : {
17916 36 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17917 36 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17918 36 : if (!obj)
17919 0 : return JS_FALSE;
17920 : nsIDOMRange *self;
17921 72 : xpc_qsSelfRef selfref;
17922 36 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17923 0 : return JS_FALSE;
17924 36 : if (argc < 2)
17925 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17926 36 : jsval *argv = JS_ARGV(cx, vp);
17927 : nsresult rv;
17928 : nsIDOMNode *arg0;
17929 72 : xpc_qsSelfRef arg0ref;
17930 36 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
17931 36 : if (NS_FAILED(rv)) {
17932 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
17933 0 : return JS_FALSE;
17934 : }
17935 : int32_t arg1;
17936 36 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
17937 0 : return JS_FALSE;
17938 36 : rv = self->SetStart(arg0, arg1);
17939 36 : if (NS_FAILED(rv))
17940 4 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17941 32 : *vp = JSVAL_VOID;
17942 32 : return JS_TRUE;
17943 : }
17944 :
17945 : static JSBool
17946 33 : nsIDOMRange_SetEnd(JSContext *cx, unsigned argc, jsval *vp)
17947 : {
17948 33 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17949 33 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17950 33 : if (!obj)
17951 0 : return JS_FALSE;
17952 : nsIDOMRange *self;
17953 66 : xpc_qsSelfRef selfref;
17954 33 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17955 0 : return JS_FALSE;
17956 33 : if (argc < 2)
17957 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17958 33 : jsval *argv = JS_ARGV(cx, vp);
17959 : nsresult rv;
17960 : nsIDOMNode *arg0;
17961 66 : xpc_qsSelfRef arg0ref;
17962 33 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
17963 33 : if (NS_FAILED(rv)) {
17964 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
17965 0 : return JS_FALSE;
17966 : }
17967 : int32_t arg1;
17968 33 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
17969 0 : return JS_FALSE;
17970 33 : rv = self->SetEnd(arg0, arg1);
17971 33 : if (NS_FAILED(rv))
17972 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
17973 33 : *vp = JSVAL_VOID;
17974 33 : return JS_TRUE;
17975 : }
17976 :
17977 : static JSBool
17978 0 : nsIDOMRange_SetStartBefore(JSContext *cx, unsigned argc, jsval *vp)
17979 : {
17980 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
17981 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
17982 0 : if (!obj)
17983 0 : return JS_FALSE;
17984 : nsIDOMRange *self;
17985 0 : xpc_qsSelfRef selfref;
17986 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
17987 0 : return JS_FALSE;
17988 0 : if (argc < 1)
17989 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
17990 0 : jsval *argv = JS_ARGV(cx, vp);
17991 : nsresult rv;
17992 : nsIDOMNode *arg0;
17993 0 : xpc_qsSelfRef arg0ref;
17994 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
17995 0 : if (NS_FAILED(rv)) {
17996 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
17997 0 : return JS_FALSE;
17998 : }
17999 0 : rv = self->SetStartBefore(arg0);
18000 0 : if (NS_FAILED(rv))
18001 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18002 0 : *vp = JSVAL_VOID;
18003 0 : return JS_TRUE;
18004 : }
18005 :
18006 : static JSBool
18007 0 : nsIDOMRange_SetStartAfter(JSContext *cx, unsigned argc, jsval *vp)
18008 : {
18009 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18010 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18011 0 : if (!obj)
18012 0 : return JS_FALSE;
18013 : nsIDOMRange *self;
18014 0 : xpc_qsSelfRef selfref;
18015 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18016 0 : return JS_FALSE;
18017 0 : if (argc < 1)
18018 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18019 0 : jsval *argv = JS_ARGV(cx, vp);
18020 : nsresult rv;
18021 : nsIDOMNode *arg0;
18022 0 : xpc_qsSelfRef arg0ref;
18023 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18024 0 : if (NS_FAILED(rv)) {
18025 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18026 0 : return JS_FALSE;
18027 : }
18028 0 : rv = self->SetStartAfter(arg0);
18029 0 : if (NS_FAILED(rv))
18030 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18031 0 : *vp = JSVAL_VOID;
18032 0 : return JS_TRUE;
18033 : }
18034 :
18035 : static JSBool
18036 0 : nsIDOMRange_SetEndBefore(JSContext *cx, unsigned argc, jsval *vp)
18037 : {
18038 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18039 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18040 0 : if (!obj)
18041 0 : return JS_FALSE;
18042 : nsIDOMRange *self;
18043 0 : xpc_qsSelfRef selfref;
18044 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18045 0 : return JS_FALSE;
18046 0 : if (argc < 1)
18047 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18048 0 : jsval *argv = JS_ARGV(cx, vp);
18049 : nsresult rv;
18050 : nsIDOMNode *arg0;
18051 0 : xpc_qsSelfRef arg0ref;
18052 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18053 0 : if (NS_FAILED(rv)) {
18054 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18055 0 : return JS_FALSE;
18056 : }
18057 0 : rv = self->SetEndBefore(arg0);
18058 0 : if (NS_FAILED(rv))
18059 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18060 0 : *vp = JSVAL_VOID;
18061 0 : return JS_TRUE;
18062 : }
18063 :
18064 : static JSBool
18065 0 : nsIDOMRange_SetEndAfter(JSContext *cx, unsigned argc, jsval *vp)
18066 : {
18067 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18068 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18069 0 : if (!obj)
18070 0 : return JS_FALSE;
18071 : nsIDOMRange *self;
18072 0 : xpc_qsSelfRef selfref;
18073 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18074 0 : return JS_FALSE;
18075 0 : if (argc < 1)
18076 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18077 0 : jsval *argv = JS_ARGV(cx, vp);
18078 : nsresult rv;
18079 : nsIDOMNode *arg0;
18080 0 : xpc_qsSelfRef arg0ref;
18081 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18082 0 : if (NS_FAILED(rv)) {
18083 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18084 0 : return JS_FALSE;
18085 : }
18086 0 : rv = self->SetEndAfter(arg0);
18087 0 : if (NS_FAILED(rv))
18088 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18089 0 : *vp = JSVAL_VOID;
18090 0 : return JS_TRUE;
18091 : }
18092 :
18093 : static JSBool
18094 0 : nsIDOMRange_Collapse(JSContext *cx, unsigned argc, jsval *vp)
18095 : {
18096 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18097 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18098 0 : if (!obj)
18099 0 : return JS_FALSE;
18100 : nsIDOMRange *self;
18101 0 : xpc_qsSelfRef selfref;
18102 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18103 0 : return JS_FALSE;
18104 0 : if (argc < 1)
18105 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18106 0 : jsval *argv = JS_ARGV(cx, vp);
18107 : JSBool arg0;
18108 0 : JS_ValueToBoolean(cx, argv[0], &arg0);
18109 : nsresult rv;
18110 0 : rv = self->Collapse(arg0);
18111 0 : if (NS_FAILED(rv))
18112 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18113 0 : *vp = JSVAL_VOID;
18114 0 : return JS_TRUE;
18115 : }
18116 :
18117 : static JSBool
18118 0 : nsIDOMRange_SelectNode(JSContext *cx, unsigned argc, jsval *vp)
18119 : {
18120 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18121 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18122 0 : if (!obj)
18123 0 : return JS_FALSE;
18124 : nsIDOMRange *self;
18125 0 : xpc_qsSelfRef selfref;
18126 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18127 0 : return JS_FALSE;
18128 0 : if (argc < 1)
18129 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18130 0 : jsval *argv = JS_ARGV(cx, vp);
18131 : nsresult rv;
18132 : nsIDOMNode *arg0;
18133 0 : xpc_qsSelfRef arg0ref;
18134 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18135 0 : if (NS_FAILED(rv)) {
18136 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18137 0 : return JS_FALSE;
18138 : }
18139 0 : rv = self->SelectNode(arg0);
18140 0 : if (NS_FAILED(rv))
18141 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18142 0 : *vp = JSVAL_VOID;
18143 0 : return JS_TRUE;
18144 : }
18145 :
18146 : static JSBool
18147 0 : nsIDOMRange_SelectNodeContents(JSContext *cx, unsigned argc, jsval *vp)
18148 : {
18149 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18150 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18151 0 : if (!obj)
18152 0 : return JS_FALSE;
18153 : nsIDOMRange *self;
18154 0 : xpc_qsSelfRef selfref;
18155 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18156 0 : return JS_FALSE;
18157 0 : if (argc < 1)
18158 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18159 0 : jsval *argv = JS_ARGV(cx, vp);
18160 : nsresult rv;
18161 : nsIDOMNode *arg0;
18162 0 : xpc_qsSelfRef arg0ref;
18163 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18164 0 : if (NS_FAILED(rv)) {
18165 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18166 0 : return JS_FALSE;
18167 : }
18168 0 : rv = self->SelectNodeContents(arg0);
18169 0 : if (NS_FAILED(rv))
18170 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18171 0 : *vp = JSVAL_VOID;
18172 0 : return JS_TRUE;
18173 : }
18174 :
18175 : static JSBool
18176 0 : nsIDOMRange_CompareBoundaryPoints(JSContext *cx, unsigned argc, jsval *vp)
18177 : {
18178 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18179 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18180 0 : if (!obj)
18181 0 : return JS_FALSE;
18182 : nsIDOMRange *self;
18183 0 : xpc_qsSelfRef selfref;
18184 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18185 0 : return JS_FALSE;
18186 0 : if (argc < 2)
18187 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18188 0 : jsval *argv = JS_ARGV(cx, vp);
18189 : uint32_t arg0_u32;
18190 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0_u32))
18191 0 : return JS_FALSE;
18192 0 : uint16_t arg0 = (uint16_t) arg0_u32;
18193 : nsresult rv;
18194 : nsIDOMRange *arg1;
18195 0 : xpc_qsSelfRef arg1ref;
18196 0 : rv = xpc_qsUnwrapArg<nsIDOMRange>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
18197 0 : if (NS_FAILED(rv)) {
18198 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
18199 0 : return JS_FALSE;
18200 : }
18201 : PRInt16 result;
18202 0 : rv = self->CompareBoundaryPoints(arg0, arg1, &result);
18203 0 : if (NS_FAILED(rv))
18204 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18205 0 : *vp = INT_TO_JSVAL((int32_t) result);
18206 0 : return JS_TRUE;
18207 : }
18208 :
18209 : static JSBool
18210 18 : nsIDOMRange_DeleteContents(JSContext *cx, unsigned argc, jsval *vp)
18211 : {
18212 18 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18213 18 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18214 18 : if (!obj)
18215 0 : return JS_FALSE;
18216 : nsIDOMRange *self;
18217 36 : xpc_qsSelfRef selfref;
18218 18 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18219 0 : return JS_FALSE;
18220 : nsresult rv;
18221 18 : rv = self->DeleteContents();
18222 18 : if (NS_FAILED(rv))
18223 9 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18224 9 : *vp = JSVAL_VOID;
18225 9 : return JS_TRUE;
18226 : }
18227 :
18228 : static JSBool
18229 19 : nsIDOMRange_ExtractContents(JSContext *cx, unsigned argc, jsval *vp)
18230 : {
18231 19 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18232 19 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18233 19 : if (!obj)
18234 0 : return JS_FALSE;
18235 19 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18236 : nsIDOMRange *self;
18237 38 : xpc_qsSelfRef selfref;
18238 38 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18239 19 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18240 0 : return JS_FALSE;
18241 : nsresult rv;
18242 38 : nsCOMPtr<nsIDOMDocumentFragment> result;
18243 19 : rv = self->ExtractContents(getter_AddRefs(result));
18244 19 : if (NS_FAILED(rv))
18245 9 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18246 10 : if (!result) {
18247 0 : *vp = JSVAL_NULL;
18248 0 : return JS_TRUE;
18249 : }
18250 10 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18251 10 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18252 0 : return JS_TRUE;
18253 : }
18254 : // After this point do not use 'result'!
18255 20 : qsObjectHelper helper(result, cache);
18256 10 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentFragment), &interfaces[k_nsIDOMDocumentFragment], vp);
18257 : }
18258 :
18259 : static JSBool
18260 0 : nsIDOMRange_CloneContents(JSContext *cx, unsigned argc, jsval *vp)
18261 : {
18262 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18263 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18264 0 : if (!obj)
18265 0 : return JS_FALSE;
18266 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18267 : nsIDOMRange *self;
18268 0 : xpc_qsSelfRef selfref;
18269 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18270 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18271 0 : return JS_FALSE;
18272 : nsresult rv;
18273 0 : nsCOMPtr<nsIDOMDocumentFragment> result;
18274 0 : rv = self->CloneContents(getter_AddRefs(result));
18275 0 : if (NS_FAILED(rv))
18276 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18277 0 : if (!result) {
18278 0 : *vp = JSVAL_NULL;
18279 0 : return JS_TRUE;
18280 : }
18281 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18282 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18283 0 : return JS_TRUE;
18284 : }
18285 : // After this point do not use 'result'!
18286 0 : qsObjectHelper helper(result, cache);
18287 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentFragment), &interfaces[k_nsIDOMDocumentFragment], vp);
18288 : }
18289 :
18290 : static JSBool
18291 0 : nsIDOMRange_InsertNode(JSContext *cx, unsigned argc, jsval *vp)
18292 : {
18293 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18294 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18295 0 : if (!obj)
18296 0 : return JS_FALSE;
18297 : nsIDOMRange *self;
18298 0 : xpc_qsSelfRef selfref;
18299 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18300 0 : return JS_FALSE;
18301 0 : if (argc < 1)
18302 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18303 0 : jsval *argv = JS_ARGV(cx, vp);
18304 : nsresult rv;
18305 : nsIDOMNode *arg0;
18306 0 : xpc_qsSelfRef arg0ref;
18307 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18308 0 : if (NS_FAILED(rv)) {
18309 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18310 0 : return JS_FALSE;
18311 : }
18312 0 : rv = self->InsertNode(arg0);
18313 0 : if (NS_FAILED(rv))
18314 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18315 0 : *vp = JSVAL_VOID;
18316 0 : return JS_TRUE;
18317 : }
18318 :
18319 : static JSBool
18320 0 : nsIDOMRange_SurroundContents(JSContext *cx, unsigned argc, jsval *vp)
18321 : {
18322 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18323 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18324 0 : if (!obj)
18325 0 : return JS_FALSE;
18326 : nsIDOMRange *self;
18327 0 : xpc_qsSelfRef selfref;
18328 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18329 0 : return JS_FALSE;
18330 0 : if (argc < 1)
18331 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18332 0 : jsval *argv = JS_ARGV(cx, vp);
18333 : nsresult rv;
18334 : nsIDOMNode *arg0;
18335 0 : xpc_qsSelfRef arg0ref;
18336 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18337 0 : if (NS_FAILED(rv)) {
18338 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18339 0 : return JS_FALSE;
18340 : }
18341 0 : rv = self->SurroundContents(arg0);
18342 0 : if (NS_FAILED(rv))
18343 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18344 0 : *vp = JSVAL_VOID;
18345 0 : return JS_TRUE;
18346 : }
18347 :
18348 : static JSBool
18349 0 : nsIDOMRange_CloneRange(JSContext *cx, unsigned argc, jsval *vp)
18350 : {
18351 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18352 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18353 0 : if (!obj)
18354 0 : return JS_FALSE;
18355 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18356 : nsIDOMRange *self;
18357 0 : xpc_qsSelfRef selfref;
18358 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18359 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18360 0 : return JS_FALSE;
18361 : nsresult rv;
18362 0 : nsCOMPtr<nsIDOMRange> result;
18363 0 : rv = self->CloneRange(getter_AddRefs(result));
18364 0 : if (NS_FAILED(rv))
18365 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18366 0 : if (!result) {
18367 0 : *vp = JSVAL_NULL;
18368 0 : return JS_TRUE;
18369 : }
18370 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18371 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18372 0 : return JS_TRUE;
18373 : }
18374 : // After this point do not use 'result'!
18375 0 : qsObjectHelper helper(result, cache);
18376 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMRange), &interfaces[k_nsIDOMRange], vp);
18377 : }
18378 :
18379 : static JSBool
18380 0 : nsIDOMRange_ToString(JSContext *cx, unsigned argc, jsval *vp)
18381 : {
18382 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18383 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18384 0 : if (!obj)
18385 0 : return JS_FALSE;
18386 : nsIDOMRange *self;
18387 0 : xpc_qsSelfRef selfref;
18388 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18389 0 : return JS_FALSE;
18390 : nsresult rv;
18391 0 : nsString result;
18392 0 : rv = self->ToString(result);
18393 0 : if (NS_FAILED(rv))
18394 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18395 0 : return xpc::StringToJsval(cx, result, vp);
18396 : }
18397 :
18398 : static JSBool
18399 9 : nsIDOMRange_Detach(JSContext *cx, unsigned argc, jsval *vp)
18400 : {
18401 9 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18402 9 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18403 9 : if (!obj)
18404 0 : return JS_FALSE;
18405 : nsIDOMRange *self;
18406 18 : xpc_qsSelfRef selfref;
18407 9 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18408 0 : return JS_FALSE;
18409 : nsresult rv;
18410 9 : rv = self->Detach();
18411 9 : if (NS_FAILED(rv))
18412 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18413 9 : *vp = JSVAL_VOID;
18414 9 : return JS_TRUE;
18415 : }
18416 :
18417 : static JSBool
18418 0 : nsIDOMRange_CreateContextualFragment(JSContext *cx, unsigned argc, jsval *vp)
18419 : {
18420 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18421 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18422 0 : if (!obj)
18423 0 : return JS_FALSE;
18424 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18425 : nsIDOMRange *self;
18426 0 : xpc_qsSelfRef selfref;
18427 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18428 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18429 0 : return JS_FALSE;
18430 0 : if (argc < 1)
18431 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18432 0 : jsval *argv = JS_ARGV(cx, vp);
18433 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18434 : xpc_qsDOMString::eDefaultNullBehavior,
18435 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18436 0 : if (!arg0.IsValid())
18437 0 : return JS_FALSE;
18438 : nsresult rv;
18439 0 : nsCOMPtr<nsIDOMDocumentFragment> result;
18440 0 : rv = self->CreateContextualFragment(arg0, getter_AddRefs(result));
18441 0 : if (NS_FAILED(rv))
18442 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18443 0 : if (!result) {
18444 0 : *vp = JSVAL_NULL;
18445 0 : return JS_TRUE;
18446 : }
18447 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18448 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18449 0 : return JS_TRUE;
18450 : }
18451 : // After this point do not use 'result'!
18452 0 : qsObjectHelper helper(result, cache);
18453 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocumentFragment), &interfaces[k_nsIDOMDocumentFragment], vp);
18454 : }
18455 :
18456 : static JSBool
18457 0 : nsIDOMRange_IsPointInRange(JSContext *cx, unsigned argc, jsval *vp)
18458 : {
18459 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18460 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18461 0 : if (!obj)
18462 0 : return JS_FALSE;
18463 : nsIDOMRange *self;
18464 0 : xpc_qsSelfRef selfref;
18465 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18466 0 : return JS_FALSE;
18467 0 : if (argc < 2)
18468 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18469 0 : jsval *argv = JS_ARGV(cx, vp);
18470 : nsresult rv;
18471 : nsIDOMNode *arg0;
18472 0 : xpc_qsSelfRef arg0ref;
18473 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18474 0 : if (NS_FAILED(rv)) {
18475 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18476 0 : return JS_FALSE;
18477 : }
18478 : int32_t arg1;
18479 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
18480 0 : return JS_FALSE;
18481 : bool result;
18482 0 : rv = self->IsPointInRange(arg0, arg1, &result);
18483 0 : if (NS_FAILED(rv))
18484 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18485 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
18486 0 : return JS_TRUE;
18487 : }
18488 :
18489 : static JSBool
18490 0 : nsIDOMRange_ComparePoint(JSContext *cx, unsigned argc, jsval *vp)
18491 : {
18492 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18493 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18494 0 : if (!obj)
18495 0 : return JS_FALSE;
18496 : nsIDOMRange *self;
18497 0 : xpc_qsSelfRef selfref;
18498 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18499 0 : return JS_FALSE;
18500 0 : if (argc < 2)
18501 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18502 0 : jsval *argv = JS_ARGV(cx, vp);
18503 : nsresult rv;
18504 : nsIDOMNode *arg0;
18505 0 : xpc_qsSelfRef arg0ref;
18506 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
18507 0 : if (NS_FAILED(rv)) {
18508 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
18509 0 : return JS_FALSE;
18510 : }
18511 : int32_t arg1;
18512 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
18513 0 : return JS_FALSE;
18514 : PRInt16 result;
18515 0 : rv = self->ComparePoint(arg0, arg1, &result);
18516 0 : if (NS_FAILED(rv))
18517 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18518 0 : *vp = INT_TO_JSVAL((int32_t) result);
18519 0 : return JS_TRUE;
18520 : }
18521 :
18522 : static JSBool
18523 0 : nsIDOMRange_GetClientRects(JSContext *cx, unsigned argc, jsval *vp)
18524 : {
18525 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18526 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18527 0 : if (!obj)
18528 0 : return JS_FALSE;
18529 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18530 : nsIDOMRange *self;
18531 0 : xpc_qsSelfRef selfref;
18532 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18533 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18534 0 : return JS_FALSE;
18535 : nsresult rv;
18536 0 : nsCOMPtr<nsIDOMClientRectList> result;
18537 0 : rv = self->GetClientRects(getter_AddRefs(result));
18538 0 : if (NS_FAILED(rv))
18539 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18540 0 : if (!result) {
18541 0 : *vp = JSVAL_NULL;
18542 0 : return JS_TRUE;
18543 : }
18544 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18545 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18546 0 : return JS_TRUE;
18547 : }
18548 : // After this point do not use 'result'!
18549 0 : qsObjectHelper helper(result, cache);
18550 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRectList), &interfaces[k_nsIDOMClientRectList], vp);
18551 : }
18552 :
18553 : static JSBool
18554 0 : nsIDOMRange_GetBoundingClientRect(JSContext *cx, unsigned argc, jsval *vp)
18555 : {
18556 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18557 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18558 0 : if (!obj)
18559 0 : return JS_FALSE;
18560 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18561 : nsIDOMRange *self;
18562 0 : xpc_qsSelfRef selfref;
18563 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18564 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18565 0 : return JS_FALSE;
18566 : nsresult rv;
18567 0 : nsCOMPtr<nsIDOMClientRect> result;
18568 0 : rv = self->GetBoundingClientRect(getter_AddRefs(result));
18569 0 : if (NS_FAILED(rv))
18570 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18571 0 : if (!result) {
18572 0 : *vp = JSVAL_NULL;
18573 0 : return JS_TRUE;
18574 : }
18575 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18576 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18577 0 : return JS_TRUE;
18578 : }
18579 : // After this point do not use 'result'!
18580 0 : qsObjectHelper helper(result, cache);
18581 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMClientRect), &interfaces[k_nsIDOMClientRect], vp);
18582 : }
18583 :
18584 : // === interface nsIDOMToString
18585 :
18586 : static JSBool
18587 0 : nsIDOMToString_ToString(JSContext *cx, unsigned argc, jsval *vp)
18588 : {
18589 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18590 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18591 0 : if (!obj)
18592 0 : return JS_FALSE;
18593 : nsIDOMToString *self;
18594 0 : xpc_qsSelfRef selfref;
18595 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18596 0 : return JS_FALSE;
18597 : nsresult rv;
18598 0 : nsString result;
18599 0 : rv = self->ToString(result);
18600 0 : if (NS_FAILED(rv))
18601 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18602 0 : return xpc::StringToJsval(cx, result, vp);
18603 : }
18604 :
18605 : // === interface nsIDOMStorage
18606 :
18607 : static JSBool
18608 18 : nsIDOMStorage_SetItem(JSContext *cx, unsigned argc, jsval *vp)
18609 : {
18610 18 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18611 18 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18612 18 : if (!obj)
18613 0 : return JS_FALSE;
18614 : nsIDOMStorage *self;
18615 36 : xpc_qsSelfRef selfref;
18616 18 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18617 0 : return JS_FALSE;
18618 18 : if (argc < 2)
18619 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18620 18 : jsval *argv = JS_ARGV(cx, vp);
18621 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18622 : xpc_qsDOMString::eDefaultNullBehavior,
18623 36 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18624 18 : if (!arg0.IsValid())
18625 0 : return JS_FALSE;
18626 18 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
18627 : xpc_qsDOMString::eDefaultNullBehavior,
18628 54 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18629 18 : if (!arg1.IsValid())
18630 0 : return JS_FALSE;
18631 : nsresult rv;
18632 18 : rv = self->SetItem(arg0, arg1);
18633 18 : if (NS_FAILED(rv))
18634 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18635 18 : *vp = JSVAL_VOID;
18636 18 : return JS_TRUE;
18637 : }
18638 :
18639 : static JSBool
18640 44 : nsIDOMStorage_GetLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18641 : {
18642 44 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18643 : nsIDOMStorage *self;
18644 88 : xpc_qsSelfRef selfref;
18645 44 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
18646 0 : return JS_FALSE;
18647 : nsresult rv;
18648 : PRUint32 result;
18649 44 : rv = self->GetLength(&result);
18650 44 : if (NS_FAILED(rv))
18651 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18652 44 : *vp = UINT_TO_JSVAL(result);
18653 44 : return JS_TRUE;
18654 : }
18655 :
18656 : static JSBool
18657 44 : nsIDOMStorage_GetItem(JSContext *cx, unsigned argc, jsval *vp)
18658 : {
18659 44 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18660 44 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18661 44 : if (!obj)
18662 0 : return JS_FALSE;
18663 : nsIDOMStorage *self;
18664 88 : xpc_qsSelfRef selfref;
18665 44 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18666 0 : return JS_FALSE;
18667 44 : if (argc < 1)
18668 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18669 44 : jsval *argv = JS_ARGV(cx, vp);
18670 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18671 : xpc_qsDOMString::eDefaultNullBehavior,
18672 88 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18673 44 : if (!arg0.IsValid())
18674 0 : return JS_FALSE;
18675 : nsresult rv;
18676 88 : nsString result;
18677 44 : rv = self->GetItem(arg0, result);
18678 44 : if (NS_FAILED(rv))
18679 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18680 44 : return xpc::StringToJsval(cx, result, vp);
18681 : }
18682 :
18683 : static JSBool
18684 24 : nsIDOMStorage_Key(JSContext *cx, unsigned argc, jsval *vp)
18685 : {
18686 24 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18687 24 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18688 24 : if (!obj)
18689 0 : return JS_FALSE;
18690 : nsIDOMStorage *self;
18691 48 : xpc_qsSelfRef selfref;
18692 24 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18693 0 : return JS_FALSE;
18694 24 : if (argc < 1)
18695 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18696 24 : jsval *argv = JS_ARGV(cx, vp);
18697 : uint32_t arg0;
18698 24 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
18699 0 : return JS_FALSE;
18700 : nsresult rv;
18701 48 : nsString result;
18702 24 : rv = self->Key(arg0, result);
18703 24 : if (NS_FAILED(rv))
18704 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18705 24 : return xpc::StringToJsval(cx, result, vp);
18706 : }
18707 :
18708 : static JSBool
18709 6 : nsIDOMStorage_RemoveItem(JSContext *cx, unsigned argc, jsval *vp)
18710 : {
18711 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18712 6 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18713 6 : if (!obj)
18714 0 : return JS_FALSE;
18715 : nsIDOMStorage *self;
18716 12 : xpc_qsSelfRef selfref;
18717 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18718 0 : return JS_FALSE;
18719 6 : if (argc < 1)
18720 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18721 6 : jsval *argv = JS_ARGV(cx, vp);
18722 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18723 : xpc_qsDOMString::eDefaultNullBehavior,
18724 12 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18725 6 : if (!arg0.IsValid())
18726 0 : return JS_FALSE;
18727 : nsresult rv;
18728 6 : rv = self->RemoveItem(arg0);
18729 6 : if (NS_FAILED(rv))
18730 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18731 6 : *vp = JSVAL_VOID;
18732 6 : return JS_TRUE;
18733 : }
18734 :
18735 : static JSBool
18736 6 : nsIDOMStorage_Clear(JSContext *cx, unsigned argc, jsval *vp)
18737 : {
18738 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18739 6 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18740 6 : if (!obj)
18741 0 : return JS_FALSE;
18742 : nsIDOMStorage *self;
18743 12 : xpc_qsSelfRef selfref;
18744 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
18745 0 : return JS_FALSE;
18746 : nsresult rv;
18747 :
18748 6 : rv = self->Clear();
18749 6 : if (NS_SUCCEEDED(rv))
18750 6 : JS_ClearScope(cx, obj);
18751 :
18752 6 : if (NS_FAILED(rv))
18753 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18754 6 : *vp = JSVAL_VOID;
18755 6 : return JS_TRUE;
18756 : }
18757 :
18758 : // === interface nsIDOMStorageItem
18759 :
18760 : static JSBool
18761 0 : nsIDOMStorageItem_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18762 : {
18763 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18764 : nsIDOMStorageItem *self;
18765 0 : xpc_qsSelfRef selfref;
18766 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
18767 0 : return JS_FALSE;
18768 : nsresult rv;
18769 0 : nsString result;
18770 0 : rv = self->GetValue(result);
18771 0 : if (NS_FAILED(rv))
18772 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18773 0 : return xpc::StringToJsval(cx, result, vp);
18774 : }
18775 :
18776 : static JSBool
18777 0 : nsIDOMStorageItem_SetValue(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
18778 : {
18779 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18780 : nsIDOMStorageItem *self;
18781 0 : xpc_qsSelfRef selfref;
18782 0 : JS::AutoValueRooter tvr(cx);
18783 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
18784 0 : return JS_FALSE;
18785 : xpc_qsDOMString arg0(cx, *vp, vp,
18786 : xpc_qsDOMString::eDefaultNullBehavior,
18787 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18788 0 : if (!arg0.IsValid())
18789 0 : return JS_FALSE;
18790 : nsresult rv;
18791 0 : rv = self->SetValue(arg0);
18792 0 : if (NS_FAILED(rv))
18793 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
18794 0 : return JS_TRUE;
18795 : }
18796 :
18797 : // === interface nsIDOMSVGStylable
18798 :
18799 : static JSBool
18800 0 : nsIDOMSVGStylable_GetClassName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18801 : {
18802 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18803 0 : JSObject *callee = nsnull;
18804 : nsIDOMSVGStylable *self;
18805 0 : xpc_qsSelfRef selfref;
18806 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18807 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
18808 0 : return JS_FALSE;
18809 : nsresult rv;
18810 0 : nsCOMPtr<nsIDOMSVGAnimatedString> result;
18811 0 : rv = self->GetClassName(getter_AddRefs(result));
18812 0 : if (NS_FAILED(rv))
18813 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18814 0 : if (!result) {
18815 0 : *vp = JSVAL_NULL;
18816 0 : return JS_TRUE;
18817 : }
18818 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18819 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18820 0 : return JS_TRUE;
18821 : }
18822 : // After this point do not use 'result'!
18823 0 : qsObjectHelper helper(result, cache);
18824 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMSVGAnimatedString), &interfaces[k_nsIDOMSVGAnimatedString], vp);
18825 : }
18826 :
18827 : static JSBool
18828 0 : nsIDOMSVGStylable_GetStyle(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
18829 : {
18830 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18831 0 : JSObject *callee = nsnull;
18832 : nsSVGStylableElement *self;
18833 0 : xpc_qsSelfRef selfref;
18834 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18835 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
18836 0 : return JS_FALSE;
18837 : nsresult rv;
18838 0 : nsIDOMCSSStyleDeclaration* result = self->GetStyle(&rv);
18839 : #ifdef DEBUG
18840 : nsresult debug_rv;
18841 0 : nsCOMPtr<nsIDOMSVGStylable> debug_self;
18842 0 : CallQueryInterface(self, getter_AddRefs(debug_self));
18843 0 : nsCOMPtr<nsIDOMCSSStyleDeclaration> debug_result;
18844 0 : debug_rv = debug_self->GetStyle(getter_AddRefs(debug_result));
18845 0 : NS_ASSERTION(NS_SUCCEEDED(debug_rv) == NS_SUCCEEDED(rv) && xpc_qsSameResult(debug_result, result),
18846 : "Got the wrong answer from the custom method call!");
18847 : #endif
18848 0 : if (NS_FAILED(rv))
18849 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
18850 0 : if (!result) {
18851 0 : *vp = JSVAL_NULL;
18852 0 : return JS_TRUE;
18853 : }
18854 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18855 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18856 0 : return JS_TRUE;
18857 : }
18858 : // After this point do not use 'result'!
18859 0 : qsObjectHelper helper(result, cache);
18860 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSStyleDeclaration), &interfaces[k_nsIDOMCSSStyleDeclaration], vp);
18861 : }
18862 :
18863 : static JSBool
18864 0 : nsIDOMSVGStylable_GetPresentationAttribute(JSContext *cx, unsigned argc, jsval *vp)
18865 : {
18866 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18867 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18868 0 : if (!obj)
18869 0 : return JS_FALSE;
18870 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18871 : nsIDOMSVGStylable *self;
18872 0 : xpc_qsSelfRef selfref;
18873 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18874 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18875 0 : return JS_FALSE;
18876 0 : if (argc < 1)
18877 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18878 0 : jsval *argv = JS_ARGV(cx, vp);
18879 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18880 : xpc_qsDOMString::eDefaultNullBehavior,
18881 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18882 0 : if (!arg0.IsValid())
18883 0 : return JS_FALSE;
18884 : nsresult rv;
18885 0 : nsCOMPtr<nsIDOMCSSValue> result;
18886 0 : rv = self->GetPresentationAttribute(arg0, getter_AddRefs(result));
18887 0 : if (NS_FAILED(rv))
18888 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18889 0 : if (!result) {
18890 0 : *vp = JSVAL_NULL;
18891 0 : return JS_TRUE;
18892 : }
18893 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18894 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18895 0 : return JS_TRUE;
18896 : }
18897 : // After this point do not use 'result'!
18898 0 : qsObjectHelper helper(result, cache);
18899 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMCSSValue), &interfaces[k_nsIDOMCSSValue], vp);
18900 : }
18901 :
18902 : // === interface nsIDOMNodeIterator
18903 :
18904 : static JSBool
18905 0 : nsIDOMNodeIterator_NextNode(JSContext *cx, unsigned argc, jsval *vp)
18906 : {
18907 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18908 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18909 0 : if (!obj)
18910 0 : return JS_FALSE;
18911 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18912 : nsIDOMNodeIterator *self;
18913 0 : xpc_qsSelfRef selfref;
18914 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18915 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18916 0 : return JS_FALSE;
18917 : nsresult rv;
18918 0 : nsCOMPtr<nsIDOMNode> result;
18919 0 : rv = self->NextNode(getter_AddRefs(result));
18920 0 : if (NS_FAILED(rv))
18921 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18922 0 : if (!result) {
18923 0 : *vp = JSVAL_NULL;
18924 0 : return JS_TRUE;
18925 : }
18926 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18927 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18928 0 : return JS_TRUE;
18929 : }
18930 : // After this point do not use 'result'!
18931 0 : qsObjectHelper helper(result, cache);
18932 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
18933 : }
18934 :
18935 : // === interface nsIDOMXPathEvaluator
18936 :
18937 : static JSBool
18938 0 : nsIDOMXPathEvaluator_Evaluate(JSContext *cx, unsigned argc, jsval *vp)
18939 : {
18940 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
18941 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
18942 0 : if (!obj)
18943 0 : return JS_FALSE;
18944 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
18945 : nsIDOMXPathEvaluator *self;
18946 0 : xpc_qsSelfRef selfref;
18947 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
18948 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
18949 0 : return JS_FALSE;
18950 0 : if (argc < 5)
18951 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
18952 0 : jsval *argv = JS_ARGV(cx, vp);
18953 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
18954 : xpc_qsDOMString::eDefaultNullBehavior,
18955 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
18956 0 : if (!arg0.IsValid())
18957 0 : return JS_FALSE;
18958 : nsresult rv;
18959 : nsIDOMNode *arg1;
18960 0 : xpc_qsSelfRef arg1ref;
18961 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
18962 0 : if (NS_FAILED(rv)) {
18963 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
18964 0 : return JS_FALSE;
18965 : }
18966 : nsIDOMXPathNSResolver *arg2;
18967 0 : xpc_qsSelfRef arg2ref;
18968 0 : rv = xpc_qsUnwrapArg<nsIDOMXPathNSResolver>(cx, argv[2], &arg2, &arg2ref.ptr, &argv[2]);
18969 0 : if (NS_FAILED(rv)) {
18970 0 : xpc_qsThrowBadArg(cx, rv, vp, 2);
18971 0 : return JS_FALSE;
18972 : }
18973 : uint32_t arg3_u32;
18974 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3_u32))
18975 0 : return JS_FALSE;
18976 0 : uint16_t arg3 = (uint16_t) arg3_u32;
18977 : nsISupports *arg4;
18978 0 : xpc_qsSelfRef arg4ref;
18979 0 : rv = xpc_qsUnwrapArg<nsISupports>(cx, argv[4], &arg4, &arg4ref.ptr, &argv[4]);
18980 0 : if (NS_FAILED(rv)) {
18981 0 : xpc_qsThrowBadArg(cx, rv, vp, 4);
18982 0 : return JS_FALSE;
18983 : }
18984 0 : nsCOMPtr<nsISupports> result;
18985 0 : rv = self->Evaluate(arg0, arg1, arg2, arg3, arg4, getter_AddRefs(result));
18986 0 : if (NS_FAILED(rv))
18987 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
18988 0 : if (!result) {
18989 0 : *vp = JSVAL_NULL;
18990 0 : return JS_TRUE;
18991 : }
18992 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
18993 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
18994 0 : return JS_TRUE;
18995 : }
18996 : // After this point do not use 'result'!
18997 0 : qsObjectHelper helper(result, cache);
18998 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
18999 : }
19000 :
19001 : static JSBool
19002 42 : nsIDOMXPathEvaluator_CreateExpression(JSContext *cx, unsigned argc, jsval *vp)
19003 : {
19004 42 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19005 42 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19006 42 : if (!obj)
19007 0 : return JS_FALSE;
19008 42 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19009 : nsIDOMXPathEvaluator *self;
19010 84 : xpc_qsSelfRef selfref;
19011 84 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19012 42 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19013 0 : return JS_FALSE;
19014 42 : if (argc < 2)
19015 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19016 42 : jsval *argv = JS_ARGV(cx, vp);
19017 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
19018 : xpc_qsDOMString::eDefaultNullBehavior,
19019 84 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19020 42 : if (!arg0.IsValid())
19021 0 : return JS_FALSE;
19022 : nsresult rv;
19023 : nsIDOMXPathNSResolver *arg1;
19024 84 : xpc_qsSelfRef arg1ref;
19025 42 : rv = xpc_qsUnwrapArg<nsIDOMXPathNSResolver>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
19026 42 : if (NS_FAILED(rv)) {
19027 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
19028 0 : return JS_FALSE;
19029 : }
19030 84 : nsCOMPtr<nsIDOMXPathExpression> result;
19031 42 : rv = self->CreateExpression(arg0, arg1, getter_AddRefs(result));
19032 42 : if (NS_FAILED(rv))
19033 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19034 42 : if (!result) {
19035 0 : *vp = JSVAL_NULL;
19036 0 : return JS_TRUE;
19037 : }
19038 42 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19039 42 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19040 0 : return JS_TRUE;
19041 : }
19042 : // After this point do not use 'result'!
19043 84 : qsObjectHelper helper(result, cache);
19044 42 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMXPathExpression), &interfaces[k_nsIDOMXPathExpression], vp);
19045 : }
19046 :
19047 : static JSBool
19048 0 : nsIDOMXPathEvaluator_CreateNSResolver(JSContext *cx, unsigned argc, jsval *vp)
19049 : {
19050 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19051 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19052 0 : if (!obj)
19053 0 : return JS_FALSE;
19054 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19055 : nsIDOMXPathEvaluator *self;
19056 0 : xpc_qsSelfRef selfref;
19057 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19058 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19059 0 : return JS_FALSE;
19060 0 : if (argc < 1)
19061 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19062 0 : jsval *argv = JS_ARGV(cx, vp);
19063 : nsresult rv;
19064 : nsIDOMNode *arg0;
19065 0 : xpc_qsSelfRef arg0ref;
19066 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
19067 0 : if (NS_FAILED(rv)) {
19068 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
19069 0 : return JS_FALSE;
19070 : }
19071 0 : nsCOMPtr<nsIDOMXPathNSResolver> result;
19072 0 : rv = self->CreateNSResolver(arg0, getter_AddRefs(result));
19073 0 : if (NS_FAILED(rv))
19074 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19075 0 : if (!result) {
19076 0 : *vp = JSVAL_NULL;
19077 0 : return JS_TRUE;
19078 : }
19079 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19080 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19081 0 : return JS_TRUE;
19082 : }
19083 : // After this point do not use 'result'!
19084 0 : qsObjectHelper helper(result, cache);
19085 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMXPathNSResolver), &interfaces[k_nsIDOMXPathNSResolver], vp);
19086 : }
19087 :
19088 : // === interface nsIDOMXPathExpression
19089 :
19090 : static JSBool
19091 42 : nsIDOMXPathExpression_Evaluate(JSContext *cx, unsigned argc, jsval *vp)
19092 : {
19093 42 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19094 42 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19095 42 : if (!obj)
19096 0 : return JS_FALSE;
19097 42 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19098 : nsIDOMXPathExpression *self;
19099 84 : xpc_qsSelfRef selfref;
19100 84 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19101 42 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19102 0 : return JS_FALSE;
19103 42 : if (argc < 3)
19104 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19105 42 : jsval *argv = JS_ARGV(cx, vp);
19106 : nsresult rv;
19107 : nsIDOMNode *arg0;
19108 84 : xpc_qsSelfRef arg0ref;
19109 42 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
19110 42 : if (NS_FAILED(rv)) {
19111 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
19112 0 : return JS_FALSE;
19113 : }
19114 : uint32_t arg1_u32;
19115 42 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1_u32))
19116 0 : return JS_FALSE;
19117 42 : uint16_t arg1 = (uint16_t) arg1_u32;
19118 : nsISupports *arg2;
19119 84 : xpc_qsSelfRef arg2ref;
19120 42 : rv = xpc_qsUnwrapArg<nsISupports>(cx, argv[2], &arg2, &arg2ref.ptr, &argv[2]);
19121 42 : if (NS_FAILED(rv)) {
19122 0 : xpc_qsThrowBadArg(cx, rv, vp, 2);
19123 0 : return JS_FALSE;
19124 : }
19125 84 : nsCOMPtr<nsISupports> result;
19126 42 : rv = self->Evaluate(arg0, arg1, arg2, getter_AddRefs(result));
19127 42 : if (NS_FAILED(rv))
19128 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19129 42 : if (!result) {
19130 0 : *vp = JSVAL_NULL;
19131 0 : return JS_TRUE;
19132 : }
19133 42 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19134 42 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19135 0 : return JS_TRUE;
19136 : }
19137 : // After this point do not use 'result'!
19138 84 : qsObjectHelper helper(result, cache);
19139 42 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
19140 : }
19141 :
19142 : // === interface nsIDOMXPathNSResolver
19143 :
19144 : static JSBool
19145 0 : nsIDOMXPathNSResolver_LookupNamespaceURI(JSContext *cx, unsigned argc, jsval *vp)
19146 : {
19147 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19148 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19149 0 : if (!obj)
19150 0 : return JS_FALSE;
19151 : nsIDOMXPathNSResolver *self;
19152 0 : xpc_qsSelfRef selfref;
19153 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
19154 0 : return JS_FALSE;
19155 0 : if (argc < 1)
19156 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19157 0 : jsval *argv = JS_ARGV(cx, vp);
19158 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
19159 : xpc_qsDOMString::eDefaultNullBehavior,
19160 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19161 0 : if (!arg0.IsValid())
19162 0 : return JS_FALSE;
19163 : nsresult rv;
19164 0 : nsString result;
19165 0 : rv = self->LookupNamespaceURI(arg0, result);
19166 0 : if (NS_FAILED(rv))
19167 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19168 0 : return xpc::StringToJsval(cx, result, vp);
19169 : }
19170 :
19171 : // === interface nsIDOMXPathResult
19172 :
19173 : static JSBool
19174 0 : nsIDOMXPathResult_SnapshotItem(JSContext *cx, unsigned argc, jsval *vp)
19175 : {
19176 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19177 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19178 0 : if (!obj)
19179 0 : return JS_FALSE;
19180 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19181 : nsIDOMXPathResult *self;
19182 0 : xpc_qsSelfRef selfref;
19183 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19184 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19185 0 : return JS_FALSE;
19186 0 : if (argc < 1)
19187 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19188 0 : jsval *argv = JS_ARGV(cx, vp);
19189 : uint32_t arg0;
19190 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
19191 0 : return JS_FALSE;
19192 : nsresult rv;
19193 0 : nsCOMPtr<nsIDOMNode> result;
19194 0 : rv = self->SnapshotItem(arg0, getter_AddRefs(result));
19195 0 : if (NS_FAILED(rv))
19196 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19197 0 : if (!result) {
19198 0 : *vp = JSVAL_NULL;
19199 0 : return JS_TRUE;
19200 : }
19201 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19202 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19203 0 : return JS_TRUE;
19204 : }
19205 : // After this point do not use 'result'!
19206 0 : qsObjectHelper helper(result, cache);
19207 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
19208 : }
19209 :
19210 : static JSBool
19211 0 : nsIDOMXPathResult_IterateNext(JSContext *cx, unsigned argc, jsval *vp)
19212 : {
19213 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19214 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19215 0 : if (!obj)
19216 0 : return JS_FALSE;
19217 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19218 : nsIDOMXPathResult *self;
19219 0 : xpc_qsSelfRef selfref;
19220 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19221 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19222 0 : return JS_FALSE;
19223 : nsresult rv;
19224 0 : nsCOMPtr<nsIDOMNode> result;
19225 0 : rv = self->IterateNext(getter_AddRefs(result));
19226 0 : if (NS_FAILED(rv))
19227 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19228 0 : if (!result) {
19229 0 : *vp = JSVAL_NULL;
19230 0 : return JS_TRUE;
19231 : }
19232 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19233 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19234 0 : return JS_TRUE;
19235 : }
19236 : // After this point do not use 'result'!
19237 0 : qsObjectHelper helper(result, cache);
19238 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
19239 : }
19240 :
19241 : static JSBool
19242 0 : nsIDOMXPathResult_GetSnapshotLength(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19243 : {
19244 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19245 : nsIDOMXPathResult *self;
19246 0 : xpc_qsSelfRef selfref;
19247 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19248 0 : return JS_FALSE;
19249 : nsresult rv;
19250 : PRUint32 result;
19251 0 : rv = self->GetSnapshotLength(&result);
19252 0 : if (NS_FAILED(rv))
19253 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19254 0 : *vp = UINT_TO_JSVAL(result);
19255 0 : return JS_TRUE;
19256 : }
19257 :
19258 : static JSBool
19259 0 : nsIDOMXPathResult_GetResultType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19260 : {
19261 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19262 : nsIDOMXPathResult *self;
19263 0 : xpc_qsSelfRef selfref;
19264 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19265 0 : return JS_FALSE;
19266 : nsresult rv;
19267 : PRUint16 result;
19268 0 : rv = self->GetResultType(&result);
19269 0 : if (NS_FAILED(rv))
19270 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19271 0 : *vp = INT_TO_JSVAL((int32_t) result);
19272 0 : return JS_TRUE;
19273 : }
19274 :
19275 : static JSBool
19276 0 : nsIDOMXPathResult_GetNumberValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19277 : {
19278 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19279 : nsIDOMXPathResult *self;
19280 0 : xpc_qsSelfRef selfref;
19281 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19282 0 : return JS_FALSE;
19283 : nsresult rv;
19284 : double result;
19285 0 : rv = self->GetNumberValue(&result);
19286 0 : if (NS_FAILED(rv))
19287 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19288 0 : return JS_NewNumberValue(cx, result, vp);
19289 : }
19290 :
19291 : static JSBool
19292 0 : nsIDOMXPathResult_GetStringValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19293 : {
19294 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19295 : nsIDOMXPathResult *self;
19296 0 : xpc_qsSelfRef selfref;
19297 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19298 0 : return JS_FALSE;
19299 : nsresult rv;
19300 0 : nsString result;
19301 0 : rv = self->GetStringValue(result);
19302 0 : if (NS_FAILED(rv))
19303 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19304 0 : return xpc::StringToJsval(cx, result, vp);
19305 : }
19306 :
19307 : static JSBool
19308 0 : nsIDOMXPathResult_GetBooleanValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19309 : {
19310 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19311 : nsIDOMXPathResult *self;
19312 0 : xpc_qsSelfRef selfref;
19313 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19314 0 : return JS_FALSE;
19315 : nsresult rv;
19316 : bool result;
19317 0 : rv = self->GetBooleanValue(&result);
19318 0 : if (NS_FAILED(rv))
19319 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19320 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
19321 0 : return JS_TRUE;
19322 : }
19323 :
19324 : static JSBool
19325 42 : nsIDOMXPathResult_GetSingleNodeValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19326 : {
19327 42 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19328 42 : JSObject *callee = nsnull;
19329 : nsIDOMXPathResult *self;
19330 84 : xpc_qsSelfRef selfref;
19331 84 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19332 42 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
19333 0 : return JS_FALSE;
19334 : nsresult rv;
19335 84 : nsCOMPtr<nsIDOMNode> result;
19336 42 : rv = self->GetSingleNodeValue(getter_AddRefs(result));
19337 42 : if (NS_FAILED(rv))
19338 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19339 42 : if (!result) {
19340 0 : *vp = JSVAL_NULL;
19341 0 : return JS_TRUE;
19342 : }
19343 42 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19344 42 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19345 0 : return JS_TRUE;
19346 : }
19347 : // After this point do not use 'result'!
19348 84 : qsObjectHelper helper(result, cache);
19349 42 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNode), &interfaces[k_nsIDOMNode], vp);
19350 : }
19351 :
19352 : // === interface nsIDOMNSXPathExpression
19353 :
19354 : static JSBool
19355 0 : nsIDOMNSXPathExpression_EvaluateWithContext(JSContext *cx, unsigned argc, jsval *vp)
19356 : {
19357 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19358 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
19359 0 : if (!obj)
19360 0 : return JS_FALSE;
19361 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
19362 : nsIDOMNSXPathExpression *self;
19363 0 : xpc_qsSelfRef selfref;
19364 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
19365 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
19366 0 : return JS_FALSE;
19367 0 : if (argc < 5)
19368 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
19369 0 : jsval *argv = JS_ARGV(cx, vp);
19370 : nsresult rv;
19371 : nsIDOMNode *arg0;
19372 0 : xpc_qsSelfRef arg0ref;
19373 0 : rv = xpc_qsUnwrapArg<nsIDOMNode>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
19374 0 : if (NS_FAILED(rv)) {
19375 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
19376 0 : return JS_FALSE;
19377 : }
19378 : uint32_t arg1;
19379 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
19380 0 : return JS_FALSE;
19381 : uint32_t arg2;
19382 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
19383 0 : return JS_FALSE;
19384 : uint32_t arg3_u32;
19385 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3_u32))
19386 0 : return JS_FALSE;
19387 0 : uint16_t arg3 = (uint16_t) arg3_u32;
19388 : nsISupports *arg4;
19389 0 : xpc_qsSelfRef arg4ref;
19390 0 : rv = xpc_qsUnwrapArg<nsISupports>(cx, argv[4], &arg4, &arg4ref.ptr, &argv[4]);
19391 0 : if (NS_FAILED(rv)) {
19392 0 : xpc_qsThrowBadArg(cx, rv, vp, 4);
19393 0 : return JS_FALSE;
19394 : }
19395 0 : nsCOMPtr<nsISupports> result;
19396 0 : rv = self->EvaluateWithContext(arg0, arg1, arg2, arg3, arg4, getter_AddRefs(result));
19397 0 : if (NS_FAILED(rv))
19398 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
19399 0 : if (!result) {
19400 0 : *vp = JSVAL_NULL;
19401 0 : return JS_TRUE;
19402 : }
19403 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
19404 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
19405 0 : return JS_TRUE;
19406 : }
19407 : // After this point do not use 'result'!
19408 0 : qsObjectHelper helper(result, cache);
19409 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
19410 : }
19411 :
19412 : // === interface nsIDOMXULElement
19413 :
19414 : static JSBool
19415 0 : nsIDOMXULElement_GetId(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19416 : {
19417 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19418 : nsIDOMXULElement *self;
19419 0 : xpc_qsSelfRef selfref;
19420 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19421 0 : return JS_FALSE;
19422 : nsresult rv;
19423 0 : nsString result;
19424 0 : rv = self->GetId(result);
19425 0 : if (NS_FAILED(rv))
19426 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19427 0 : return xpc::StringToJsval(cx, result, vp);
19428 : }
19429 :
19430 : static JSBool
19431 0 : nsIDOMXULElement_SetId(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19432 : {
19433 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19434 : nsIDOMXULElement *self;
19435 0 : xpc_qsSelfRef selfref;
19436 0 : JS::AutoValueRooter tvr(cx);
19437 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19438 0 : return JS_FALSE;
19439 : xpc_qsDOMString arg0(cx, *vp, vp,
19440 : xpc_qsDOMString::eDefaultNullBehavior,
19441 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19442 0 : if (!arg0.IsValid())
19443 0 : return JS_FALSE;
19444 : nsresult rv;
19445 0 : rv = self->SetId(arg0);
19446 0 : if (NS_FAILED(rv))
19447 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19448 0 : return JS_TRUE;
19449 : }
19450 :
19451 : static JSBool
19452 0 : nsIDOMXULElement_GetClassName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19453 : {
19454 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19455 : nsIDOMXULElement *self;
19456 0 : xpc_qsSelfRef selfref;
19457 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19458 0 : return JS_FALSE;
19459 : nsresult rv;
19460 0 : nsString result;
19461 0 : rv = self->GetClassName(result);
19462 0 : if (NS_FAILED(rv))
19463 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19464 0 : return xpc::StringToJsval(cx, result, vp);
19465 : }
19466 :
19467 : static JSBool
19468 0 : nsIDOMXULElement_SetClassName(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19469 : {
19470 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19471 : nsIDOMXULElement *self;
19472 0 : xpc_qsSelfRef selfref;
19473 0 : JS::AutoValueRooter tvr(cx);
19474 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19475 0 : return JS_FALSE;
19476 : xpc_qsDOMString arg0(cx, *vp, vp,
19477 : xpc_qsDOMString::eDefaultNullBehavior,
19478 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19479 0 : if (!arg0.IsValid())
19480 0 : return JS_FALSE;
19481 : nsresult rv;
19482 0 : rv = self->SetClassName(arg0);
19483 0 : if (NS_FAILED(rv))
19484 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19485 0 : return JS_TRUE;
19486 : }
19487 :
19488 : static JSBool
19489 0 : nsIDOMXULElement_GetAlign(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19490 : {
19491 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19492 : nsIDOMXULElement *self;
19493 0 : xpc_qsSelfRef selfref;
19494 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19495 0 : return JS_FALSE;
19496 : nsresult rv;
19497 0 : nsString result;
19498 0 : rv = self->GetAlign(result);
19499 0 : if (NS_FAILED(rv))
19500 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19501 0 : return xpc::StringToJsval(cx, result, vp);
19502 : }
19503 :
19504 : static JSBool
19505 0 : nsIDOMXULElement_SetAlign(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19506 : {
19507 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19508 : nsIDOMXULElement *self;
19509 0 : xpc_qsSelfRef selfref;
19510 0 : JS::AutoValueRooter tvr(cx);
19511 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19512 0 : return JS_FALSE;
19513 : xpc_qsDOMString arg0(cx, *vp, vp,
19514 : xpc_qsDOMString::eDefaultNullBehavior,
19515 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19516 0 : if (!arg0.IsValid())
19517 0 : return JS_FALSE;
19518 : nsresult rv;
19519 0 : rv = self->SetAlign(arg0);
19520 0 : if (NS_FAILED(rv))
19521 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19522 0 : return JS_TRUE;
19523 : }
19524 :
19525 : static JSBool
19526 0 : nsIDOMXULElement_GetDir(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19527 : {
19528 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19529 : nsIDOMXULElement *self;
19530 0 : xpc_qsSelfRef selfref;
19531 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19532 0 : return JS_FALSE;
19533 : nsresult rv;
19534 0 : nsString result;
19535 0 : rv = self->GetDir(result);
19536 0 : if (NS_FAILED(rv))
19537 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19538 0 : return xpc::StringToJsval(cx, result, vp);
19539 : }
19540 :
19541 : static JSBool
19542 0 : nsIDOMXULElement_SetDir(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19543 : {
19544 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19545 : nsIDOMXULElement *self;
19546 0 : xpc_qsSelfRef selfref;
19547 0 : JS::AutoValueRooter tvr(cx);
19548 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19549 0 : return JS_FALSE;
19550 : xpc_qsDOMString arg0(cx, *vp, vp,
19551 : xpc_qsDOMString::eDefaultNullBehavior,
19552 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19553 0 : if (!arg0.IsValid())
19554 0 : return JS_FALSE;
19555 : nsresult rv;
19556 0 : rv = self->SetDir(arg0);
19557 0 : if (NS_FAILED(rv))
19558 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19559 0 : return JS_TRUE;
19560 : }
19561 :
19562 : static JSBool
19563 0 : nsIDOMXULElement_GetFlex(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19564 : {
19565 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19566 : nsIDOMXULElement *self;
19567 0 : xpc_qsSelfRef selfref;
19568 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19569 0 : return JS_FALSE;
19570 : nsresult rv;
19571 0 : nsString result;
19572 0 : rv = self->GetFlex(result);
19573 0 : if (NS_FAILED(rv))
19574 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19575 0 : return xpc::StringToJsval(cx, result, vp);
19576 : }
19577 :
19578 : static JSBool
19579 0 : nsIDOMXULElement_SetFlex(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19580 : {
19581 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19582 : nsIDOMXULElement *self;
19583 0 : xpc_qsSelfRef selfref;
19584 0 : JS::AutoValueRooter tvr(cx);
19585 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19586 0 : return JS_FALSE;
19587 : xpc_qsDOMString arg0(cx, *vp, vp,
19588 : xpc_qsDOMString::eDefaultNullBehavior,
19589 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19590 0 : if (!arg0.IsValid())
19591 0 : return JS_FALSE;
19592 : nsresult rv;
19593 0 : rv = self->SetFlex(arg0);
19594 0 : if (NS_FAILED(rv))
19595 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19596 0 : return JS_TRUE;
19597 : }
19598 :
19599 : static JSBool
19600 0 : nsIDOMXULElement_GetFlexGroup(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19601 : {
19602 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19603 : nsIDOMXULElement *self;
19604 0 : xpc_qsSelfRef selfref;
19605 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19606 0 : return JS_FALSE;
19607 : nsresult rv;
19608 0 : nsString result;
19609 0 : rv = self->GetFlexGroup(result);
19610 0 : if (NS_FAILED(rv))
19611 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19612 0 : return xpc::StringToJsval(cx, result, vp);
19613 : }
19614 :
19615 : static JSBool
19616 0 : nsIDOMXULElement_SetFlexGroup(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19617 : {
19618 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19619 : nsIDOMXULElement *self;
19620 0 : xpc_qsSelfRef selfref;
19621 0 : JS::AutoValueRooter tvr(cx);
19622 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19623 0 : return JS_FALSE;
19624 : xpc_qsDOMString arg0(cx, *vp, vp,
19625 : xpc_qsDOMString::eDefaultNullBehavior,
19626 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19627 0 : if (!arg0.IsValid())
19628 0 : return JS_FALSE;
19629 : nsresult rv;
19630 0 : rv = self->SetFlexGroup(arg0);
19631 0 : if (NS_FAILED(rv))
19632 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19633 0 : return JS_TRUE;
19634 : }
19635 :
19636 : static JSBool
19637 0 : nsIDOMXULElement_GetOrdinal(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19638 : {
19639 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19640 : nsIDOMXULElement *self;
19641 0 : xpc_qsSelfRef selfref;
19642 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19643 0 : return JS_FALSE;
19644 : nsresult rv;
19645 0 : nsString result;
19646 0 : rv = self->GetOrdinal(result);
19647 0 : if (NS_FAILED(rv))
19648 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19649 0 : return xpc::StringToJsval(cx, result, vp);
19650 : }
19651 :
19652 : static JSBool
19653 0 : nsIDOMXULElement_SetOrdinal(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19654 : {
19655 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19656 : nsIDOMXULElement *self;
19657 0 : xpc_qsSelfRef selfref;
19658 0 : JS::AutoValueRooter tvr(cx);
19659 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19660 0 : return JS_FALSE;
19661 : xpc_qsDOMString arg0(cx, *vp, vp,
19662 : xpc_qsDOMString::eDefaultNullBehavior,
19663 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19664 0 : if (!arg0.IsValid())
19665 0 : return JS_FALSE;
19666 : nsresult rv;
19667 0 : rv = self->SetOrdinal(arg0);
19668 0 : if (NS_FAILED(rv))
19669 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19670 0 : return JS_TRUE;
19671 : }
19672 :
19673 : static JSBool
19674 0 : nsIDOMXULElement_GetOrient(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19675 : {
19676 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19677 : nsIDOMXULElement *self;
19678 0 : xpc_qsSelfRef selfref;
19679 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19680 0 : return JS_FALSE;
19681 : nsresult rv;
19682 0 : nsString result;
19683 0 : rv = self->GetOrient(result);
19684 0 : if (NS_FAILED(rv))
19685 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19686 0 : return xpc::StringToJsval(cx, result, vp);
19687 : }
19688 :
19689 : static JSBool
19690 0 : nsIDOMXULElement_SetOrient(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19691 : {
19692 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19693 : nsIDOMXULElement *self;
19694 0 : xpc_qsSelfRef selfref;
19695 0 : JS::AutoValueRooter tvr(cx);
19696 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19697 0 : return JS_FALSE;
19698 : xpc_qsDOMString arg0(cx, *vp, vp,
19699 : xpc_qsDOMString::eDefaultNullBehavior,
19700 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19701 0 : if (!arg0.IsValid())
19702 0 : return JS_FALSE;
19703 : nsresult rv;
19704 0 : rv = self->SetOrient(arg0);
19705 0 : if (NS_FAILED(rv))
19706 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19707 0 : return JS_TRUE;
19708 : }
19709 :
19710 : static JSBool
19711 0 : nsIDOMXULElement_GetPack(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19712 : {
19713 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19714 : nsIDOMXULElement *self;
19715 0 : xpc_qsSelfRef selfref;
19716 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19717 0 : return JS_FALSE;
19718 : nsresult rv;
19719 0 : nsString result;
19720 0 : rv = self->GetPack(result);
19721 0 : if (NS_FAILED(rv))
19722 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19723 0 : return xpc::StringToJsval(cx, result, vp);
19724 : }
19725 :
19726 : static JSBool
19727 0 : nsIDOMXULElement_SetPack(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19728 : {
19729 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19730 : nsIDOMXULElement *self;
19731 0 : xpc_qsSelfRef selfref;
19732 0 : JS::AutoValueRooter tvr(cx);
19733 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19734 0 : return JS_FALSE;
19735 : xpc_qsDOMString arg0(cx, *vp, vp,
19736 : xpc_qsDOMString::eDefaultNullBehavior,
19737 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19738 0 : if (!arg0.IsValid())
19739 0 : return JS_FALSE;
19740 : nsresult rv;
19741 0 : rv = self->SetPack(arg0);
19742 0 : if (NS_FAILED(rv))
19743 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19744 0 : return JS_TRUE;
19745 : }
19746 :
19747 : static JSBool
19748 0 : nsIDOMXULElement_GetHidden(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19749 : {
19750 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19751 : nsIDOMXULElement *self;
19752 0 : xpc_qsSelfRef selfref;
19753 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19754 0 : return JS_FALSE;
19755 : nsresult rv;
19756 : bool result;
19757 0 : rv = self->GetHidden(&result);
19758 0 : if (NS_FAILED(rv))
19759 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19760 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
19761 0 : return JS_TRUE;
19762 : }
19763 :
19764 : static JSBool
19765 0 : nsIDOMXULElement_SetHidden(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19766 : {
19767 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19768 : nsIDOMXULElement *self;
19769 0 : xpc_qsSelfRef selfref;
19770 0 : JS::AutoValueRooter tvr(cx);
19771 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19772 0 : return JS_FALSE;
19773 : JSBool arg0;
19774 0 : JS_ValueToBoolean(cx, *vp, &arg0);
19775 : nsresult rv;
19776 0 : rv = self->SetHidden(arg0);
19777 0 : if (NS_FAILED(rv))
19778 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19779 0 : return JS_TRUE;
19780 : }
19781 :
19782 : static JSBool
19783 0 : nsIDOMXULElement_GetCollapsed(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19784 : {
19785 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19786 : nsIDOMXULElement *self;
19787 0 : xpc_qsSelfRef selfref;
19788 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19789 0 : return JS_FALSE;
19790 : nsresult rv;
19791 : bool result;
19792 0 : rv = self->GetCollapsed(&result);
19793 0 : if (NS_FAILED(rv))
19794 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19795 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
19796 0 : return JS_TRUE;
19797 : }
19798 :
19799 : static JSBool
19800 0 : nsIDOMXULElement_SetCollapsed(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19801 : {
19802 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19803 : nsIDOMXULElement *self;
19804 0 : xpc_qsSelfRef selfref;
19805 0 : JS::AutoValueRooter tvr(cx);
19806 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19807 0 : return JS_FALSE;
19808 : JSBool arg0;
19809 0 : JS_ValueToBoolean(cx, *vp, &arg0);
19810 : nsresult rv;
19811 0 : rv = self->SetCollapsed(arg0);
19812 0 : if (NS_FAILED(rv))
19813 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19814 0 : return JS_TRUE;
19815 : }
19816 :
19817 : static JSBool
19818 0 : nsIDOMXULElement_GetObserves(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19819 : {
19820 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19821 : nsIDOMXULElement *self;
19822 0 : xpc_qsSelfRef selfref;
19823 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19824 0 : return JS_FALSE;
19825 : nsresult rv;
19826 0 : nsString result;
19827 0 : rv = self->GetObserves(result);
19828 0 : if (NS_FAILED(rv))
19829 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19830 0 : return xpc::StringToJsval(cx, result, vp);
19831 : }
19832 :
19833 : static JSBool
19834 0 : nsIDOMXULElement_SetObserves(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19835 : {
19836 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19837 : nsIDOMXULElement *self;
19838 0 : xpc_qsSelfRef selfref;
19839 0 : JS::AutoValueRooter tvr(cx);
19840 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19841 0 : return JS_FALSE;
19842 : xpc_qsDOMString arg0(cx, *vp, vp,
19843 : xpc_qsDOMString::eDefaultNullBehavior,
19844 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19845 0 : if (!arg0.IsValid())
19846 0 : return JS_FALSE;
19847 : nsresult rv;
19848 0 : rv = self->SetObserves(arg0);
19849 0 : if (NS_FAILED(rv))
19850 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19851 0 : return JS_TRUE;
19852 : }
19853 :
19854 : static JSBool
19855 0 : nsIDOMXULElement_GetMenu(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19856 : {
19857 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19858 : nsIDOMXULElement *self;
19859 0 : xpc_qsSelfRef selfref;
19860 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19861 0 : return JS_FALSE;
19862 : nsresult rv;
19863 0 : nsString result;
19864 0 : rv = self->GetMenu(result);
19865 0 : if (NS_FAILED(rv))
19866 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19867 0 : return xpc::StringToJsval(cx, result, vp);
19868 : }
19869 :
19870 : static JSBool
19871 0 : nsIDOMXULElement_SetMenu(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19872 : {
19873 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19874 : nsIDOMXULElement *self;
19875 0 : xpc_qsSelfRef selfref;
19876 0 : JS::AutoValueRooter tvr(cx);
19877 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19878 0 : return JS_FALSE;
19879 : xpc_qsDOMString arg0(cx, *vp, vp,
19880 : xpc_qsDOMString::eDefaultNullBehavior,
19881 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19882 0 : if (!arg0.IsValid())
19883 0 : return JS_FALSE;
19884 : nsresult rv;
19885 0 : rv = self->SetMenu(arg0);
19886 0 : if (NS_FAILED(rv))
19887 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19888 0 : return JS_TRUE;
19889 : }
19890 :
19891 : static JSBool
19892 0 : nsIDOMXULElement_GetContextMenu(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19893 : {
19894 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19895 : nsIDOMXULElement *self;
19896 0 : xpc_qsSelfRef selfref;
19897 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19898 0 : return JS_FALSE;
19899 : nsresult rv;
19900 0 : nsString result;
19901 0 : rv = self->GetContextMenu(result);
19902 0 : if (NS_FAILED(rv))
19903 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19904 0 : return xpc::StringToJsval(cx, result, vp);
19905 : }
19906 :
19907 : static JSBool
19908 0 : nsIDOMXULElement_SetContextMenu(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19909 : {
19910 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19911 : nsIDOMXULElement *self;
19912 0 : xpc_qsSelfRef selfref;
19913 0 : JS::AutoValueRooter tvr(cx);
19914 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19915 0 : return JS_FALSE;
19916 : xpc_qsDOMString arg0(cx, *vp, vp,
19917 : xpc_qsDOMString::eDefaultNullBehavior,
19918 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19919 0 : if (!arg0.IsValid())
19920 0 : return JS_FALSE;
19921 : nsresult rv;
19922 0 : rv = self->SetContextMenu(arg0);
19923 0 : if (NS_FAILED(rv))
19924 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19925 0 : return JS_TRUE;
19926 : }
19927 :
19928 : static JSBool
19929 0 : nsIDOMXULElement_GetTooltip(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19930 : {
19931 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19932 : nsIDOMXULElement *self;
19933 0 : xpc_qsSelfRef selfref;
19934 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19935 0 : return JS_FALSE;
19936 : nsresult rv;
19937 0 : nsString result;
19938 0 : rv = self->GetTooltip(result);
19939 0 : if (NS_FAILED(rv))
19940 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19941 0 : return xpc::StringToJsval(cx, result, vp);
19942 : }
19943 :
19944 : static JSBool
19945 0 : nsIDOMXULElement_SetTooltip(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19946 : {
19947 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19948 : nsIDOMXULElement *self;
19949 0 : xpc_qsSelfRef selfref;
19950 0 : JS::AutoValueRooter tvr(cx);
19951 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19952 0 : return JS_FALSE;
19953 : xpc_qsDOMString arg0(cx, *vp, vp,
19954 : xpc_qsDOMString::eDefaultNullBehavior,
19955 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19956 0 : if (!arg0.IsValid())
19957 0 : return JS_FALSE;
19958 : nsresult rv;
19959 0 : rv = self->SetTooltip(arg0);
19960 0 : if (NS_FAILED(rv))
19961 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19962 0 : return JS_TRUE;
19963 : }
19964 :
19965 : static JSBool
19966 0 : nsIDOMXULElement_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
19967 : {
19968 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19969 : nsIDOMXULElement *self;
19970 0 : xpc_qsSelfRef selfref;
19971 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
19972 0 : return JS_FALSE;
19973 : nsresult rv;
19974 0 : nsString result;
19975 0 : rv = self->GetWidth(result);
19976 0 : if (NS_FAILED(rv))
19977 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
19978 0 : return xpc::StringToJsval(cx, result, vp);
19979 : }
19980 :
19981 : static JSBool
19982 0 : nsIDOMXULElement_SetWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
19983 : {
19984 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
19985 : nsIDOMXULElement *self;
19986 0 : xpc_qsSelfRef selfref;
19987 0 : JS::AutoValueRooter tvr(cx);
19988 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
19989 0 : return JS_FALSE;
19990 : xpc_qsDOMString arg0(cx, *vp, vp,
19991 : xpc_qsDOMString::eDefaultNullBehavior,
19992 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
19993 0 : if (!arg0.IsValid())
19994 0 : return JS_FALSE;
19995 : nsresult rv;
19996 0 : rv = self->SetWidth(arg0);
19997 0 : if (NS_FAILED(rv))
19998 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
19999 0 : return JS_TRUE;
20000 : }
20001 :
20002 : static JSBool
20003 0 : nsIDOMXULElement_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20004 : {
20005 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20006 : nsIDOMXULElement *self;
20007 0 : xpc_qsSelfRef selfref;
20008 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20009 0 : return JS_FALSE;
20010 : nsresult rv;
20011 0 : nsString result;
20012 0 : rv = self->GetHeight(result);
20013 0 : if (NS_FAILED(rv))
20014 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20015 0 : return xpc::StringToJsval(cx, result, vp);
20016 : }
20017 :
20018 : static JSBool
20019 0 : nsIDOMXULElement_SetHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20020 : {
20021 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20022 : nsIDOMXULElement *self;
20023 0 : xpc_qsSelfRef selfref;
20024 0 : JS::AutoValueRooter tvr(cx);
20025 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20026 0 : return JS_FALSE;
20027 : xpc_qsDOMString arg0(cx, *vp, vp,
20028 : xpc_qsDOMString::eDefaultNullBehavior,
20029 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20030 0 : if (!arg0.IsValid())
20031 0 : return JS_FALSE;
20032 : nsresult rv;
20033 0 : rv = self->SetHeight(arg0);
20034 0 : if (NS_FAILED(rv))
20035 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20036 0 : return JS_TRUE;
20037 : }
20038 :
20039 : static JSBool
20040 0 : nsIDOMXULElement_GetMinWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20041 : {
20042 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20043 : nsIDOMXULElement *self;
20044 0 : xpc_qsSelfRef selfref;
20045 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20046 0 : return JS_FALSE;
20047 : nsresult rv;
20048 0 : nsString result;
20049 0 : rv = self->GetMinWidth(result);
20050 0 : if (NS_FAILED(rv))
20051 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20052 0 : return xpc::StringToJsval(cx, result, vp);
20053 : }
20054 :
20055 : static JSBool
20056 0 : nsIDOMXULElement_SetMinWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20057 : {
20058 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20059 : nsIDOMXULElement *self;
20060 0 : xpc_qsSelfRef selfref;
20061 0 : JS::AutoValueRooter tvr(cx);
20062 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20063 0 : return JS_FALSE;
20064 : xpc_qsDOMString arg0(cx, *vp, vp,
20065 : xpc_qsDOMString::eDefaultNullBehavior,
20066 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20067 0 : if (!arg0.IsValid())
20068 0 : return JS_FALSE;
20069 : nsresult rv;
20070 0 : rv = self->SetMinWidth(arg0);
20071 0 : if (NS_FAILED(rv))
20072 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20073 0 : return JS_TRUE;
20074 : }
20075 :
20076 : static JSBool
20077 0 : nsIDOMXULElement_GetMinHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20078 : {
20079 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20080 : nsIDOMXULElement *self;
20081 0 : xpc_qsSelfRef selfref;
20082 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20083 0 : return JS_FALSE;
20084 : nsresult rv;
20085 0 : nsString result;
20086 0 : rv = self->GetMinHeight(result);
20087 0 : if (NS_FAILED(rv))
20088 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20089 0 : return xpc::StringToJsval(cx, result, vp);
20090 : }
20091 :
20092 : static JSBool
20093 0 : nsIDOMXULElement_SetMinHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20094 : {
20095 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20096 : nsIDOMXULElement *self;
20097 0 : xpc_qsSelfRef selfref;
20098 0 : JS::AutoValueRooter tvr(cx);
20099 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20100 0 : return JS_FALSE;
20101 : xpc_qsDOMString arg0(cx, *vp, vp,
20102 : xpc_qsDOMString::eDefaultNullBehavior,
20103 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20104 0 : if (!arg0.IsValid())
20105 0 : return JS_FALSE;
20106 : nsresult rv;
20107 0 : rv = self->SetMinHeight(arg0);
20108 0 : if (NS_FAILED(rv))
20109 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20110 0 : return JS_TRUE;
20111 : }
20112 :
20113 : static JSBool
20114 0 : nsIDOMXULElement_GetMaxWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20115 : {
20116 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20117 : nsIDOMXULElement *self;
20118 0 : xpc_qsSelfRef selfref;
20119 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20120 0 : return JS_FALSE;
20121 : nsresult rv;
20122 0 : nsString result;
20123 0 : rv = self->GetMaxWidth(result);
20124 0 : if (NS_FAILED(rv))
20125 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20126 0 : return xpc::StringToJsval(cx, result, vp);
20127 : }
20128 :
20129 : static JSBool
20130 0 : nsIDOMXULElement_SetMaxWidth(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20131 : {
20132 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20133 : nsIDOMXULElement *self;
20134 0 : xpc_qsSelfRef selfref;
20135 0 : JS::AutoValueRooter tvr(cx);
20136 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20137 0 : return JS_FALSE;
20138 : xpc_qsDOMString arg0(cx, *vp, vp,
20139 : xpc_qsDOMString::eDefaultNullBehavior,
20140 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20141 0 : if (!arg0.IsValid())
20142 0 : return JS_FALSE;
20143 : nsresult rv;
20144 0 : rv = self->SetMaxWidth(arg0);
20145 0 : if (NS_FAILED(rv))
20146 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20147 0 : return JS_TRUE;
20148 : }
20149 :
20150 : static JSBool
20151 0 : nsIDOMXULElement_GetMaxHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20152 : {
20153 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20154 : nsIDOMXULElement *self;
20155 0 : xpc_qsSelfRef selfref;
20156 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20157 0 : return JS_FALSE;
20158 : nsresult rv;
20159 0 : nsString result;
20160 0 : rv = self->GetMaxHeight(result);
20161 0 : if (NS_FAILED(rv))
20162 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20163 0 : return xpc::StringToJsval(cx, result, vp);
20164 : }
20165 :
20166 : static JSBool
20167 0 : nsIDOMXULElement_SetMaxHeight(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20168 : {
20169 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20170 : nsIDOMXULElement *self;
20171 0 : xpc_qsSelfRef selfref;
20172 0 : JS::AutoValueRooter tvr(cx);
20173 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20174 0 : return JS_FALSE;
20175 : xpc_qsDOMString arg0(cx, *vp, vp,
20176 : xpc_qsDOMString::eDefaultNullBehavior,
20177 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20178 0 : if (!arg0.IsValid())
20179 0 : return JS_FALSE;
20180 : nsresult rv;
20181 0 : rv = self->SetMaxHeight(arg0);
20182 0 : if (NS_FAILED(rv))
20183 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20184 0 : return JS_TRUE;
20185 : }
20186 :
20187 : static JSBool
20188 0 : nsIDOMXULElement_GetPersist(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20189 : {
20190 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20191 : nsIDOMXULElement *self;
20192 0 : xpc_qsSelfRef selfref;
20193 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20194 0 : return JS_FALSE;
20195 : nsresult rv;
20196 0 : nsString result;
20197 0 : rv = self->GetPersist(result);
20198 0 : if (NS_FAILED(rv))
20199 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20200 0 : return xpc::StringToJsval(cx, result, vp);
20201 : }
20202 :
20203 : static JSBool
20204 0 : nsIDOMXULElement_SetPersist(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20205 : {
20206 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20207 : nsIDOMXULElement *self;
20208 0 : xpc_qsSelfRef selfref;
20209 0 : JS::AutoValueRooter tvr(cx);
20210 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20211 0 : return JS_FALSE;
20212 : xpc_qsDOMString arg0(cx, *vp, vp,
20213 : xpc_qsDOMString::eDefaultNullBehavior,
20214 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20215 0 : if (!arg0.IsValid())
20216 0 : return JS_FALSE;
20217 : nsresult rv;
20218 0 : rv = self->SetPersist(arg0);
20219 0 : if (NS_FAILED(rv))
20220 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20221 0 : return JS_TRUE;
20222 : }
20223 :
20224 : static JSBool
20225 0 : nsIDOMXULElement_GetLeft(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20226 : {
20227 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20228 : nsIDOMXULElement *self;
20229 0 : xpc_qsSelfRef selfref;
20230 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20231 0 : return JS_FALSE;
20232 : nsresult rv;
20233 0 : nsString result;
20234 0 : rv = self->GetLeft(result);
20235 0 : if (NS_FAILED(rv))
20236 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20237 0 : return xpc::StringToJsval(cx, result, vp);
20238 : }
20239 :
20240 : static JSBool
20241 0 : nsIDOMXULElement_SetLeft(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20242 : {
20243 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20244 : nsIDOMXULElement *self;
20245 0 : xpc_qsSelfRef selfref;
20246 0 : JS::AutoValueRooter tvr(cx);
20247 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20248 0 : return JS_FALSE;
20249 : xpc_qsDOMString arg0(cx, *vp, vp,
20250 : xpc_qsDOMString::eDefaultNullBehavior,
20251 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20252 0 : if (!arg0.IsValid())
20253 0 : return JS_FALSE;
20254 : nsresult rv;
20255 0 : rv = self->SetLeft(arg0);
20256 0 : if (NS_FAILED(rv))
20257 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20258 0 : return JS_TRUE;
20259 : }
20260 :
20261 : static JSBool
20262 0 : nsIDOMXULElement_GetTop(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20263 : {
20264 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20265 : nsIDOMXULElement *self;
20266 0 : xpc_qsSelfRef selfref;
20267 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20268 0 : return JS_FALSE;
20269 : nsresult rv;
20270 0 : nsString result;
20271 0 : rv = self->GetTop(result);
20272 0 : if (NS_FAILED(rv))
20273 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20274 0 : return xpc::StringToJsval(cx, result, vp);
20275 : }
20276 :
20277 : static JSBool
20278 0 : nsIDOMXULElement_SetTop(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20279 : {
20280 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20281 : nsIDOMXULElement *self;
20282 0 : xpc_qsSelfRef selfref;
20283 0 : JS::AutoValueRooter tvr(cx);
20284 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20285 0 : return JS_FALSE;
20286 : xpc_qsDOMString arg0(cx, *vp, vp,
20287 : xpc_qsDOMString::eDefaultNullBehavior,
20288 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20289 0 : if (!arg0.IsValid())
20290 0 : return JS_FALSE;
20291 : nsresult rv;
20292 0 : rv = self->SetTop(arg0);
20293 0 : if (NS_FAILED(rv))
20294 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20295 0 : return JS_TRUE;
20296 : }
20297 :
20298 : static JSBool
20299 0 : nsIDOMXULElement_GetDatasources(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20300 : {
20301 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20302 : nsIDOMXULElement *self;
20303 0 : xpc_qsSelfRef selfref;
20304 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20305 0 : return JS_FALSE;
20306 : nsresult rv;
20307 0 : nsString result;
20308 0 : rv = self->GetDatasources(result);
20309 0 : if (NS_FAILED(rv))
20310 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20311 0 : return xpc::StringToJsval(cx, result, vp);
20312 : }
20313 :
20314 : static JSBool
20315 0 : nsIDOMXULElement_SetDatasources(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20316 : {
20317 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20318 : nsIDOMXULElement *self;
20319 0 : xpc_qsSelfRef selfref;
20320 0 : JS::AutoValueRooter tvr(cx);
20321 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20322 0 : return JS_FALSE;
20323 : xpc_qsDOMString arg0(cx, *vp, vp,
20324 : xpc_qsDOMString::eDefaultNullBehavior,
20325 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20326 0 : if (!arg0.IsValid())
20327 0 : return JS_FALSE;
20328 : nsresult rv;
20329 0 : rv = self->SetDatasources(arg0);
20330 0 : if (NS_FAILED(rv))
20331 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20332 0 : return JS_TRUE;
20333 : }
20334 :
20335 : static JSBool
20336 0 : nsIDOMXULElement_GetRef(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20337 : {
20338 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20339 : nsIDOMXULElement *self;
20340 0 : xpc_qsSelfRef selfref;
20341 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20342 0 : return JS_FALSE;
20343 : nsresult rv;
20344 0 : nsString result;
20345 0 : rv = self->GetRef(result);
20346 0 : if (NS_FAILED(rv))
20347 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20348 0 : return xpc::StringToJsval(cx, result, vp);
20349 : }
20350 :
20351 : static JSBool
20352 0 : nsIDOMXULElement_SetRef(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20353 : {
20354 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20355 : nsIDOMXULElement *self;
20356 0 : xpc_qsSelfRef selfref;
20357 0 : JS::AutoValueRooter tvr(cx);
20358 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20359 0 : return JS_FALSE;
20360 : xpc_qsDOMString arg0(cx, *vp, vp,
20361 : xpc_qsDOMString::eDefaultNullBehavior,
20362 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20363 0 : if (!arg0.IsValid())
20364 0 : return JS_FALSE;
20365 : nsresult rv;
20366 0 : rv = self->SetRef(arg0);
20367 0 : if (NS_FAILED(rv))
20368 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20369 0 : return JS_TRUE;
20370 : }
20371 :
20372 : static JSBool
20373 0 : nsIDOMXULElement_GetTooltipText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20374 : {
20375 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20376 : nsIDOMXULElement *self;
20377 0 : xpc_qsSelfRef selfref;
20378 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20379 0 : return JS_FALSE;
20380 : nsresult rv;
20381 0 : nsString result;
20382 0 : rv = self->GetTooltipText(result);
20383 0 : if (NS_FAILED(rv))
20384 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20385 0 : return xpc::StringToJsval(cx, result, vp);
20386 : }
20387 :
20388 : static JSBool
20389 0 : nsIDOMXULElement_SetTooltipText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20390 : {
20391 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20392 : nsIDOMXULElement *self;
20393 0 : xpc_qsSelfRef selfref;
20394 0 : JS::AutoValueRooter tvr(cx);
20395 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20396 0 : return JS_FALSE;
20397 : xpc_qsDOMString arg0(cx, *vp, vp,
20398 : xpc_qsDOMString::eDefaultNullBehavior,
20399 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20400 0 : if (!arg0.IsValid())
20401 0 : return JS_FALSE;
20402 : nsresult rv;
20403 0 : rv = self->SetTooltipText(arg0);
20404 0 : if (NS_FAILED(rv))
20405 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20406 0 : return JS_TRUE;
20407 : }
20408 :
20409 : static JSBool
20410 0 : nsIDOMXULElement_GetStatusText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20411 : {
20412 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20413 : nsIDOMXULElement *self;
20414 0 : xpc_qsSelfRef selfref;
20415 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20416 0 : return JS_FALSE;
20417 : nsresult rv;
20418 0 : nsString result;
20419 0 : rv = self->GetStatusText(result);
20420 0 : if (NS_FAILED(rv))
20421 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20422 0 : return xpc::StringToJsval(cx, result, vp);
20423 : }
20424 :
20425 : static JSBool
20426 0 : nsIDOMXULElement_SetStatusText(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20427 : {
20428 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20429 : nsIDOMXULElement *self;
20430 0 : xpc_qsSelfRef selfref;
20431 0 : JS::AutoValueRooter tvr(cx);
20432 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20433 0 : return JS_FALSE;
20434 : xpc_qsDOMString arg0(cx, *vp, vp,
20435 : xpc_qsDOMString::eDefaultNullBehavior,
20436 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20437 0 : if (!arg0.IsValid())
20438 0 : return JS_FALSE;
20439 : nsresult rv;
20440 0 : rv = self->SetStatusText(arg0);
20441 0 : if (NS_FAILED(rv))
20442 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20443 0 : return JS_TRUE;
20444 : }
20445 :
20446 : static JSBool
20447 0 : nsIDOMXULElement_GetAllowEvents(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20448 : {
20449 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20450 : nsIDOMXULElement *self;
20451 0 : xpc_qsSelfRef selfref;
20452 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20453 0 : return JS_FALSE;
20454 : nsresult rv;
20455 : bool result;
20456 0 : rv = self->GetAllowEvents(&result);
20457 0 : if (NS_FAILED(rv))
20458 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20459 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
20460 0 : return JS_TRUE;
20461 : }
20462 :
20463 : static JSBool
20464 0 : nsIDOMXULElement_SetAllowEvents(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
20465 : {
20466 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20467 : nsIDOMXULElement *self;
20468 0 : xpc_qsSelfRef selfref;
20469 0 : JS::AutoValueRooter tvr(cx);
20470 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
20471 0 : return JS_FALSE;
20472 : JSBool arg0;
20473 0 : JS_ValueToBoolean(cx, *vp, &arg0);
20474 : nsresult rv;
20475 0 : rv = self->SetAllowEvents(arg0);
20476 0 : if (NS_FAILED(rv))
20477 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
20478 0 : return JS_TRUE;
20479 : }
20480 :
20481 : static JSBool
20482 0 : nsIDOMXULElement_GetDatabase(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20483 : {
20484 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20485 0 : JSObject *callee = nsnull;
20486 : nsIDOMXULElement *self;
20487 0 : xpc_qsSelfRef selfref;
20488 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20489 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20490 0 : return JS_FALSE;
20491 : nsresult rv;
20492 0 : nsCOMPtr<nsIRDFCompositeDataSource> result;
20493 0 : rv = self->GetDatabase(getter_AddRefs(result));
20494 0 : if (NS_FAILED(rv))
20495 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20496 0 : if (!result) {
20497 0 : *vp = JSVAL_NULL;
20498 0 : return JS_TRUE;
20499 : }
20500 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20501 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20502 0 : return JS_TRUE;
20503 : }
20504 : // After this point do not use 'result'!
20505 0 : qsObjectHelper helper(result, cache);
20506 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIRDFCompositeDataSource), &interfaces[k_nsIRDFCompositeDataSource], vp);
20507 : }
20508 :
20509 : static JSBool
20510 0 : nsIDOMXULElement_GetBuilder(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20511 : {
20512 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20513 0 : JSObject *callee = nsnull;
20514 : nsIDOMXULElement *self;
20515 0 : xpc_qsSelfRef selfref;
20516 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20517 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20518 0 : return JS_FALSE;
20519 : nsresult rv;
20520 0 : nsCOMPtr<nsIXULTemplateBuilder> result;
20521 0 : rv = self->GetBuilder(getter_AddRefs(result));
20522 0 : if (NS_FAILED(rv))
20523 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20524 0 : if (!result) {
20525 0 : *vp = JSVAL_NULL;
20526 0 : return JS_TRUE;
20527 : }
20528 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20529 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20530 0 : return JS_TRUE;
20531 : }
20532 : // After this point do not use 'result'!
20533 0 : qsObjectHelper helper(result, cache);
20534 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIXULTemplateBuilder), &interfaces[k_nsIXULTemplateBuilder], vp);
20535 : }
20536 :
20537 : static JSBool
20538 0 : nsIDOMXULElement_GetResource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20539 : {
20540 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20541 0 : JSObject *callee = nsnull;
20542 : nsIDOMXULElement *self;
20543 0 : xpc_qsSelfRef selfref;
20544 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20545 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20546 0 : return JS_FALSE;
20547 : nsresult rv;
20548 0 : nsCOMPtr<nsIRDFResource> result;
20549 0 : rv = self->GetResource(getter_AddRefs(result));
20550 0 : if (NS_FAILED(rv))
20551 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20552 0 : if (!result) {
20553 0 : *vp = JSVAL_NULL;
20554 0 : return JS_TRUE;
20555 : }
20556 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20557 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20558 0 : return JS_TRUE;
20559 : }
20560 : // After this point do not use 'result'!
20561 0 : qsObjectHelper helper(result, cache);
20562 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIRDFResource), &interfaces[k_nsIRDFResource], vp);
20563 : }
20564 :
20565 : static JSBool
20566 0 : nsIDOMXULElement_GetControllers(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20567 : {
20568 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20569 0 : JSObject *callee = nsnull;
20570 : nsIDOMXULElement *self;
20571 0 : xpc_qsSelfRef selfref;
20572 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20573 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20574 0 : return JS_FALSE;
20575 : nsresult rv;
20576 0 : nsCOMPtr<nsIControllers> result;
20577 0 : rv = self->GetControllers(getter_AddRefs(result));
20578 0 : if (NS_FAILED(rv))
20579 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20580 0 : if (!result) {
20581 0 : *vp = JSVAL_NULL;
20582 0 : return JS_TRUE;
20583 : }
20584 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20585 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20586 0 : return JS_TRUE;
20587 : }
20588 : // After this point do not use 'result'!
20589 0 : qsObjectHelper helper(result, cache);
20590 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIControllers), &interfaces[k_nsIControllers], vp);
20591 : }
20592 :
20593 : static JSBool
20594 0 : nsIDOMXULElement_GetBoxObject(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20595 : {
20596 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20597 0 : JSObject *callee = nsnull;
20598 : nsIDOMXULElement *self;
20599 0 : xpc_qsSelfRef selfref;
20600 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20601 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
20602 0 : return JS_FALSE;
20603 : nsresult rv;
20604 0 : nsCOMPtr<nsIBoxObject> result;
20605 0 : rv = self->GetBoxObject(getter_AddRefs(result));
20606 0 : if (NS_FAILED(rv))
20607 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20608 0 : if (!result) {
20609 0 : *vp = JSVAL_NULL;
20610 0 : return JS_TRUE;
20611 : }
20612 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20613 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20614 0 : return JS_TRUE;
20615 : }
20616 : // After this point do not use 'result'!
20617 0 : qsObjectHelper helper(result, cache);
20618 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIBoxObject), &interfaces[k_nsIBoxObject], vp);
20619 : }
20620 :
20621 : static JSBool
20622 0 : nsIDOMXULElement_Focus(JSContext *cx, unsigned argc, jsval *vp)
20623 : {
20624 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20625 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20626 0 : if (!obj)
20627 0 : return JS_FALSE;
20628 : nsIDOMXULElement *self;
20629 0 : xpc_qsSelfRef selfref;
20630 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20631 0 : return JS_FALSE;
20632 : nsresult rv;
20633 0 : rv = self->Focus();
20634 0 : if (NS_FAILED(rv))
20635 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20636 0 : *vp = JSVAL_VOID;
20637 0 : return JS_TRUE;
20638 : }
20639 :
20640 : static JSBool
20641 0 : nsIDOMXULElement_Blur(JSContext *cx, unsigned argc, jsval *vp)
20642 : {
20643 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20644 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20645 0 : if (!obj)
20646 0 : return JS_FALSE;
20647 : nsIDOMXULElement *self;
20648 0 : xpc_qsSelfRef selfref;
20649 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20650 0 : return JS_FALSE;
20651 : nsresult rv;
20652 0 : rv = self->Blur();
20653 0 : if (NS_FAILED(rv))
20654 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20655 0 : *vp = JSVAL_VOID;
20656 0 : return JS_TRUE;
20657 : }
20658 :
20659 : static JSBool
20660 0 : nsIDOMXULElement_Click(JSContext *cx, unsigned argc, jsval *vp)
20661 : {
20662 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20663 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20664 0 : if (!obj)
20665 0 : return JS_FALSE;
20666 : nsIDOMXULElement *self;
20667 0 : xpc_qsSelfRef selfref;
20668 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20669 0 : return JS_FALSE;
20670 : nsresult rv;
20671 0 : rv = self->Click();
20672 0 : if (NS_FAILED(rv))
20673 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20674 0 : *vp = JSVAL_VOID;
20675 0 : return JS_TRUE;
20676 : }
20677 :
20678 : static JSBool
20679 0 : nsIDOMXULElement_DoCommand(JSContext *cx, unsigned argc, jsval *vp)
20680 : {
20681 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20682 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20683 0 : if (!obj)
20684 0 : return JS_FALSE;
20685 : nsIDOMXULElement *self;
20686 0 : xpc_qsSelfRef selfref;
20687 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20688 0 : return JS_FALSE;
20689 : nsresult rv;
20690 0 : rv = self->DoCommand();
20691 0 : if (NS_FAILED(rv))
20692 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20693 0 : *vp = JSVAL_VOID;
20694 0 : return JS_TRUE;
20695 : }
20696 :
20697 : static JSBool
20698 45 : nsIDOMXULElement_GetElementsByAttribute(JSContext *cx, unsigned argc, jsval *vp)
20699 : {
20700 45 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20701 45 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20702 45 : if (!obj)
20703 0 : return JS_FALSE;
20704 45 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
20705 : nsIDOMXULElement *self;
20706 90 : xpc_qsSelfRef selfref;
20707 90 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20708 45 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
20709 0 : return JS_FALSE;
20710 45 : if (argc < 2)
20711 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20712 45 : jsval *argv = JS_ARGV(cx, vp);
20713 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
20714 : xpc_qsDOMString::eDefaultNullBehavior,
20715 90 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20716 45 : if (!arg0.IsValid())
20717 0 : return JS_FALSE;
20718 45 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
20719 : xpc_qsDOMString::eDefaultNullBehavior,
20720 135 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20721 45 : if (!arg1.IsValid())
20722 0 : return JS_FALSE;
20723 : nsresult rv;
20724 90 : nsCOMPtr<nsIDOMNodeList> result;
20725 45 : rv = self->GetElementsByAttribute(arg0, arg1, getter_AddRefs(result));
20726 45 : if (NS_FAILED(rv))
20727 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20728 45 : if (!result) {
20729 0 : *vp = JSVAL_NULL;
20730 0 : return JS_TRUE;
20731 : }
20732 45 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20733 45 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20734 0 : return JS_TRUE;
20735 : }
20736 : // After this point do not use 'result'!
20737 90 : qsObjectHelper helper(result, cache);
20738 45 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
20739 : }
20740 :
20741 : static JSBool
20742 37 : nsIDOMXULElement_GetElementsByAttributeNS(JSContext *cx, unsigned argc, jsval *vp)
20743 : {
20744 37 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20745 37 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20746 37 : if (!obj)
20747 0 : return JS_FALSE;
20748 37 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
20749 : nsIDOMXULElement *self;
20750 74 : xpc_qsSelfRef selfref;
20751 74 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
20752 37 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
20753 0 : return JS_FALSE;
20754 37 : if (argc < 3)
20755 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20756 37 : jsval *argv = JS_ARGV(cx, vp);
20757 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
20758 : xpc_qsDOMString::eDefaultNullBehavior,
20759 74 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20760 37 : if (!arg0.IsValid())
20761 0 : return JS_FALSE;
20762 37 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
20763 : xpc_qsDOMString::eDefaultNullBehavior,
20764 111 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20765 37 : if (!arg1.IsValid())
20766 0 : return JS_FALSE;
20767 37 : xpc_qsDOMString arg2(cx, argv[2], &argv[2],
20768 : xpc_qsDOMString::eDefaultNullBehavior,
20769 111 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20770 37 : if (!arg2.IsValid())
20771 0 : return JS_FALSE;
20772 : nsresult rv;
20773 74 : nsCOMPtr<nsIDOMNodeList> result;
20774 37 : rv = self->GetElementsByAttributeNS(arg0, arg1, arg2, getter_AddRefs(result));
20775 37 : if (NS_FAILED(rv))
20776 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20777 37 : if (!result) {
20778 0 : *vp = JSVAL_NULL;
20779 0 : return JS_TRUE;
20780 : }
20781 37 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
20782 37 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
20783 0 : return JS_TRUE;
20784 : }
20785 : // After this point do not use 'result'!
20786 74 : qsObjectHelper helper(result, cache);
20787 37 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMNodeList), &interfaces[k_nsIDOMNodeList], vp);
20788 : }
20789 :
20790 : // === interface nsIBoxObject
20791 :
20792 : static JSBool
20793 0 : nsIBoxObject_GetX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20794 : {
20795 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20796 : nsIBoxObject *self;
20797 0 : xpc_qsSelfRef selfref;
20798 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20799 0 : return JS_FALSE;
20800 : nsresult rv;
20801 : PRInt32 result;
20802 0 : rv = self->GetX(&result);
20803 0 : if (NS_FAILED(rv))
20804 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20805 0 : *vp = INT_TO_JSVAL(result);
20806 0 : return JS_TRUE;
20807 : }
20808 :
20809 : static JSBool
20810 0 : nsIBoxObject_GetY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20811 : {
20812 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20813 : nsIBoxObject *self;
20814 0 : xpc_qsSelfRef selfref;
20815 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20816 0 : return JS_FALSE;
20817 : nsresult rv;
20818 : PRInt32 result;
20819 0 : rv = self->GetY(&result);
20820 0 : if (NS_FAILED(rv))
20821 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20822 0 : *vp = INT_TO_JSVAL(result);
20823 0 : return JS_TRUE;
20824 : }
20825 :
20826 : static JSBool
20827 0 : nsIBoxObject_GetScreenX(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20828 : {
20829 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20830 : nsIBoxObject *self;
20831 0 : xpc_qsSelfRef selfref;
20832 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20833 0 : return JS_FALSE;
20834 : nsresult rv;
20835 : PRInt32 result;
20836 0 : rv = self->GetScreenX(&result);
20837 0 : if (NS_FAILED(rv))
20838 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20839 0 : *vp = INT_TO_JSVAL(result);
20840 0 : return JS_TRUE;
20841 : }
20842 :
20843 : static JSBool
20844 0 : nsIBoxObject_GetScreenY(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20845 : {
20846 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20847 : nsIBoxObject *self;
20848 0 : xpc_qsSelfRef selfref;
20849 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20850 0 : return JS_FALSE;
20851 : nsresult rv;
20852 : PRInt32 result;
20853 0 : rv = self->GetScreenY(&result);
20854 0 : if (NS_FAILED(rv))
20855 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20856 0 : *vp = INT_TO_JSVAL(result);
20857 0 : return JS_TRUE;
20858 : }
20859 :
20860 : static JSBool
20861 0 : nsIBoxObject_GetWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20862 : {
20863 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20864 : nsIBoxObject *self;
20865 0 : xpc_qsSelfRef selfref;
20866 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20867 0 : return JS_FALSE;
20868 : nsresult rv;
20869 : PRInt32 result;
20870 0 : rv = self->GetWidth(&result);
20871 0 : if (NS_FAILED(rv))
20872 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20873 0 : *vp = INT_TO_JSVAL(result);
20874 0 : return JS_TRUE;
20875 : }
20876 :
20877 : static JSBool
20878 0 : nsIBoxObject_GetHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
20879 : {
20880 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20881 : nsIBoxObject *self;
20882 0 : xpc_qsSelfRef selfref;
20883 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
20884 0 : return JS_FALSE;
20885 : nsresult rv;
20886 : PRInt32 result;
20887 0 : rv = self->GetHeight(&result);
20888 0 : if (NS_FAILED(rv))
20889 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
20890 0 : *vp = INT_TO_JSVAL(result);
20891 0 : return JS_TRUE;
20892 : }
20893 :
20894 : // === interface nsIDOMFileReader
20895 :
20896 : static JSBool
20897 2 : nsIDOMFileReader_ReadAsArrayBuffer(JSContext *cx, unsigned argc, jsval *vp)
20898 : {
20899 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20900 2 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20901 2 : if (!obj)
20902 0 : return JS_FALSE;
20903 : nsIDOMFileReader *self;
20904 4 : xpc_qsSelfRef selfref;
20905 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20906 0 : return JS_FALSE;
20907 2 : if (argc < 1)
20908 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20909 2 : jsval *argv = JS_ARGV(cx, vp);
20910 : nsresult rv;
20911 : nsIDOMBlob *arg0;
20912 4 : xpc_qsSelfRef arg0ref;
20913 2 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
20914 2 : if (NS_FAILED(rv)) {
20915 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
20916 0 : return JS_FALSE;
20917 : }
20918 2 : rv = self->ReadAsArrayBuffer(arg0, cx);
20919 2 : if (NS_FAILED(rv))
20920 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20921 2 : *vp = JSVAL_VOID;
20922 2 : return JS_TRUE;
20923 : }
20924 :
20925 : static JSBool
20926 0 : nsIDOMFileReader_ReadAsBinaryString(JSContext *cx, unsigned argc, jsval *vp)
20927 : {
20928 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20929 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20930 0 : if (!obj)
20931 0 : return JS_FALSE;
20932 : nsIDOMFileReader *self;
20933 0 : xpc_qsSelfRef selfref;
20934 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20935 0 : return JS_FALSE;
20936 0 : if (argc < 1)
20937 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20938 0 : jsval *argv = JS_ARGV(cx, vp);
20939 : nsresult rv;
20940 : nsIDOMBlob *arg0;
20941 0 : xpc_qsSelfRef arg0ref;
20942 0 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
20943 0 : if (NS_FAILED(rv)) {
20944 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
20945 0 : return JS_FALSE;
20946 : }
20947 0 : rv = self->ReadAsBinaryString(arg0);
20948 0 : if (NS_FAILED(rv))
20949 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20950 0 : *vp = JSVAL_VOID;
20951 0 : return JS_TRUE;
20952 : }
20953 :
20954 : static JSBool
20955 0 : nsIDOMFileReader_ReadAsText(JSContext *cx, unsigned argc, jsval *vp)
20956 : {
20957 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20958 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20959 0 : if (!obj)
20960 0 : return JS_FALSE;
20961 : nsIDOMFileReader *self;
20962 0 : xpc_qsSelfRef selfref;
20963 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20964 0 : return JS_FALSE;
20965 0 : if (argc < 1)
20966 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
20967 0 : jsval *argv = JS_ARGV(cx, vp);
20968 : nsresult rv;
20969 : nsIDOMBlob *arg0;
20970 0 : xpc_qsSelfRef arg0ref;
20971 0 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
20972 0 : if (NS_FAILED(rv)) {
20973 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
20974 0 : return JS_FALSE;
20975 : }
20976 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
20977 : xpc_qsDOMString::eDefaultNullBehavior,
20978 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
20979 0 : if (!arg1.IsValid())
20980 0 : return JS_FALSE;
20981 0 : rv = self->ReadAsText(arg0, arg1);
20982 0 : if (NS_FAILED(rv))
20983 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
20984 0 : *vp = JSVAL_VOID;
20985 0 : return JS_TRUE;
20986 : }
20987 :
20988 : static JSBool
20989 0 : nsIDOMFileReader_ReadAsDataURL(JSContext *cx, unsigned argc, jsval *vp)
20990 : {
20991 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
20992 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
20993 0 : if (!obj)
20994 0 : return JS_FALSE;
20995 : nsIDOMFileReader *self;
20996 0 : xpc_qsSelfRef selfref;
20997 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
20998 0 : return JS_FALSE;
20999 0 : if (argc < 1)
21000 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
21001 0 : jsval *argv = JS_ARGV(cx, vp);
21002 : nsresult rv;
21003 : nsIDOMBlob *arg0;
21004 0 : xpc_qsSelfRef arg0ref;
21005 0 : rv = xpc_qsUnwrapArg<nsIDOMBlob>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
21006 0 : if (NS_FAILED(rv)) {
21007 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
21008 0 : return JS_FALSE;
21009 : }
21010 0 : rv = self->ReadAsDataURL(arg0);
21011 0 : if (NS_FAILED(rv))
21012 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21013 0 : *vp = JSVAL_VOID;
21014 0 : return JS_TRUE;
21015 : }
21016 :
21017 : static JSBool
21018 0 : nsIDOMFileReader_Abort(JSContext *cx, unsigned argc, jsval *vp)
21019 : {
21020 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21021 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21022 0 : if (!obj)
21023 0 : return JS_FALSE;
21024 : nsIDOMFileReader *self;
21025 0 : xpc_qsSelfRef selfref;
21026 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21027 0 : return JS_FALSE;
21028 : nsresult rv;
21029 0 : rv = self->Abort();
21030 0 : if (NS_FAILED(rv))
21031 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21032 0 : *vp = JSVAL_VOID;
21033 0 : return JS_TRUE;
21034 : }
21035 :
21036 : static JSBool
21037 2 : nsIDOMFileReader_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21038 : {
21039 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21040 : nsIDOMFileReader *self;
21041 4 : xpc_qsSelfRef selfref;
21042 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21043 0 : return JS_FALSE;
21044 : nsresult rv;
21045 : PRUint16 result;
21046 2 : rv = self->GetReadyState(&result);
21047 2 : if (NS_FAILED(rv))
21048 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21049 2 : *vp = INT_TO_JSVAL((int32_t) result);
21050 2 : return JS_TRUE;
21051 : }
21052 :
21053 : static JSBool
21054 2 : nsIDOMFileReader_GetResult(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21055 : {
21056 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21057 : nsIDOMFileReader *self;
21058 4 : xpc_qsSelfRef selfref;
21059 2 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21060 0 : return JS_FALSE;
21061 : nsresult rv;
21062 2 : rv = self->GetResult(cx, vp);
21063 2 : if (NS_FAILED(rv))
21064 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21065 2 : return JS_TRUE;
21066 : }
21067 :
21068 : static JSBool
21069 0 : nsIDOMFileReader_GetError(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21070 : {
21071 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21072 0 : JSObject *callee = nsnull;
21073 : nsIDOMFileReader *self;
21074 0 : xpc_qsSelfRef selfref;
21075 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21076 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21077 0 : return JS_FALSE;
21078 : nsresult rv;
21079 0 : nsCOMPtr<nsIDOMDOMError> result;
21080 0 : rv = self->GetError(getter_AddRefs(result));
21081 0 : if (NS_FAILED(rv))
21082 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21083 0 : if (!result) {
21084 0 : *vp = JSVAL_NULL;
21085 0 : return JS_TRUE;
21086 : }
21087 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21088 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21089 0 : return JS_TRUE;
21090 : }
21091 : // After this point do not use 'result'!
21092 0 : qsObjectHelper helper(result, cache);
21093 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMError), &interfaces[k_nsIDOMDOMError], vp);
21094 : }
21095 :
21096 : static JSBool
21097 0 : nsIDOMFileReader_GetOnloadstart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21098 : {
21099 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21100 0 : JSObject *callee = nsnull;
21101 : nsIDOMFileReader *self;
21102 0 : xpc_qsSelfRef selfref;
21103 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21104 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21105 0 : return JS_FALSE;
21106 : nsresult rv;
21107 0 : nsCOMPtr<nsIDOMEventListener> result;
21108 0 : rv = self->GetOnloadstart(getter_AddRefs(result));
21109 0 : if (NS_FAILED(rv))
21110 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21111 0 : if (!result) {
21112 0 : *vp = JSVAL_NULL;
21113 0 : return JS_TRUE;
21114 : }
21115 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21116 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21117 0 : return JS_TRUE;
21118 : }
21119 : // After this point do not use 'result'!
21120 0 : qsObjectHelper helper(result, cache);
21121 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21122 : }
21123 :
21124 : static JSBool
21125 0 : nsIDOMFileReader_SetOnloadstart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21126 : {
21127 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21128 : nsIDOMFileReader *self;
21129 0 : xpc_qsSelfRef selfref;
21130 0 : JS::AutoValueRooter tvr(cx);
21131 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21132 0 : return JS_FALSE;
21133 : nsresult rv;
21134 : nsIDOMEventListener *arg0;
21135 0 : xpc_qsSelfRef arg0ref;
21136 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21137 0 : if (NS_FAILED(rv)) {
21138 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21139 0 : return JS_FALSE;
21140 : }
21141 0 : rv = self->SetOnloadstart(arg0);
21142 0 : if (NS_FAILED(rv))
21143 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21144 0 : return JS_TRUE;
21145 : }
21146 :
21147 : static JSBool
21148 0 : nsIDOMFileReader_GetOnprogress(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21149 : {
21150 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21151 0 : JSObject *callee = nsnull;
21152 : nsIDOMFileReader *self;
21153 0 : xpc_qsSelfRef selfref;
21154 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21155 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21156 0 : return JS_FALSE;
21157 : nsresult rv;
21158 0 : nsCOMPtr<nsIDOMEventListener> result;
21159 0 : rv = self->GetOnprogress(getter_AddRefs(result));
21160 0 : if (NS_FAILED(rv))
21161 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21162 0 : if (!result) {
21163 0 : *vp = JSVAL_NULL;
21164 0 : return JS_TRUE;
21165 : }
21166 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21167 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21168 0 : return JS_TRUE;
21169 : }
21170 : // After this point do not use 'result'!
21171 0 : qsObjectHelper helper(result, cache);
21172 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21173 : }
21174 :
21175 : static JSBool
21176 0 : nsIDOMFileReader_SetOnprogress(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21177 : {
21178 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21179 : nsIDOMFileReader *self;
21180 0 : xpc_qsSelfRef selfref;
21181 0 : JS::AutoValueRooter tvr(cx);
21182 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21183 0 : return JS_FALSE;
21184 : nsresult rv;
21185 : nsIDOMEventListener *arg0;
21186 0 : xpc_qsSelfRef arg0ref;
21187 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21188 0 : if (NS_FAILED(rv)) {
21189 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21190 0 : return JS_FALSE;
21191 : }
21192 0 : rv = self->SetOnprogress(arg0);
21193 0 : if (NS_FAILED(rv))
21194 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21195 0 : return JS_TRUE;
21196 : }
21197 :
21198 : static JSBool
21199 0 : nsIDOMFileReader_GetOnload(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21200 : {
21201 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21202 0 : JSObject *callee = nsnull;
21203 : nsIDOMFileReader *self;
21204 0 : xpc_qsSelfRef selfref;
21205 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21206 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21207 0 : return JS_FALSE;
21208 : nsresult rv;
21209 0 : nsCOMPtr<nsIDOMEventListener> result;
21210 0 : rv = self->GetOnload(getter_AddRefs(result));
21211 0 : if (NS_FAILED(rv))
21212 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21213 0 : if (!result) {
21214 0 : *vp = JSVAL_NULL;
21215 0 : return JS_TRUE;
21216 : }
21217 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21218 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21219 0 : return JS_TRUE;
21220 : }
21221 : // After this point do not use 'result'!
21222 0 : qsObjectHelper helper(result, cache);
21223 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21224 : }
21225 :
21226 : static JSBool
21227 0 : nsIDOMFileReader_SetOnload(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21228 : {
21229 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21230 : nsIDOMFileReader *self;
21231 0 : xpc_qsSelfRef selfref;
21232 0 : JS::AutoValueRooter tvr(cx);
21233 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21234 0 : return JS_FALSE;
21235 : nsresult rv;
21236 : nsIDOMEventListener *arg0;
21237 0 : xpc_qsSelfRef arg0ref;
21238 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21239 0 : if (NS_FAILED(rv)) {
21240 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21241 0 : return JS_FALSE;
21242 : }
21243 0 : rv = self->SetOnload(arg0);
21244 0 : if (NS_FAILED(rv))
21245 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21246 0 : return JS_TRUE;
21247 : }
21248 :
21249 : static JSBool
21250 0 : nsIDOMFileReader_GetOnabort(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21251 : {
21252 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21253 0 : JSObject *callee = nsnull;
21254 : nsIDOMFileReader *self;
21255 0 : xpc_qsSelfRef selfref;
21256 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21257 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21258 0 : return JS_FALSE;
21259 : nsresult rv;
21260 0 : nsCOMPtr<nsIDOMEventListener> result;
21261 0 : rv = self->GetOnabort(getter_AddRefs(result));
21262 0 : if (NS_FAILED(rv))
21263 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21264 0 : if (!result) {
21265 0 : *vp = JSVAL_NULL;
21266 0 : return JS_TRUE;
21267 : }
21268 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21269 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21270 0 : return JS_TRUE;
21271 : }
21272 : // After this point do not use 'result'!
21273 0 : qsObjectHelper helper(result, cache);
21274 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21275 : }
21276 :
21277 : static JSBool
21278 0 : nsIDOMFileReader_SetOnabort(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21279 : {
21280 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21281 : nsIDOMFileReader *self;
21282 0 : xpc_qsSelfRef selfref;
21283 0 : JS::AutoValueRooter tvr(cx);
21284 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21285 0 : return JS_FALSE;
21286 : nsresult rv;
21287 : nsIDOMEventListener *arg0;
21288 0 : xpc_qsSelfRef arg0ref;
21289 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21290 0 : if (NS_FAILED(rv)) {
21291 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21292 0 : return JS_FALSE;
21293 : }
21294 0 : rv = self->SetOnabort(arg0);
21295 0 : if (NS_FAILED(rv))
21296 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21297 0 : return JS_TRUE;
21298 : }
21299 :
21300 : static JSBool
21301 0 : nsIDOMFileReader_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21302 : {
21303 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21304 0 : JSObject *callee = nsnull;
21305 : nsIDOMFileReader *self;
21306 0 : xpc_qsSelfRef selfref;
21307 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21308 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21309 0 : return JS_FALSE;
21310 : nsresult rv;
21311 0 : nsCOMPtr<nsIDOMEventListener> result;
21312 0 : rv = self->GetOnerror(getter_AddRefs(result));
21313 0 : if (NS_FAILED(rv))
21314 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21315 0 : if (!result) {
21316 0 : *vp = JSVAL_NULL;
21317 0 : return JS_TRUE;
21318 : }
21319 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21320 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21321 0 : return JS_TRUE;
21322 : }
21323 : // After this point do not use 'result'!
21324 0 : qsObjectHelper helper(result, cache);
21325 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21326 : }
21327 :
21328 : static JSBool
21329 0 : nsIDOMFileReader_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21330 : {
21331 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21332 : nsIDOMFileReader *self;
21333 0 : xpc_qsSelfRef selfref;
21334 0 : JS::AutoValueRooter tvr(cx);
21335 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21336 0 : return JS_FALSE;
21337 : nsresult rv;
21338 : nsIDOMEventListener *arg0;
21339 0 : xpc_qsSelfRef arg0ref;
21340 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21341 0 : if (NS_FAILED(rv)) {
21342 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21343 0 : return JS_FALSE;
21344 : }
21345 0 : rv = self->SetOnerror(arg0);
21346 0 : if (NS_FAILED(rv))
21347 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21348 0 : return JS_TRUE;
21349 : }
21350 :
21351 : static JSBool
21352 0 : nsIDOMFileReader_GetOnloadend(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21353 : {
21354 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21355 0 : JSObject *callee = nsnull;
21356 : nsIDOMFileReader *self;
21357 0 : xpc_qsSelfRef selfref;
21358 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21359 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21360 0 : return JS_FALSE;
21361 : nsresult rv;
21362 0 : nsCOMPtr<nsIDOMEventListener> result;
21363 0 : rv = self->GetOnloadend(getter_AddRefs(result));
21364 0 : if (NS_FAILED(rv))
21365 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21366 0 : if (!result) {
21367 0 : *vp = JSVAL_NULL;
21368 0 : return JS_TRUE;
21369 : }
21370 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21371 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21372 0 : return JS_TRUE;
21373 : }
21374 : // After this point do not use 'result'!
21375 0 : qsObjectHelper helper(result, cache);
21376 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21377 : }
21378 :
21379 : static JSBool
21380 0 : nsIDOMFileReader_SetOnloadend(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21381 : {
21382 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21383 : nsIDOMFileReader *self;
21384 0 : xpc_qsSelfRef selfref;
21385 0 : JS::AutoValueRooter tvr(cx);
21386 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21387 0 : return JS_FALSE;
21388 : nsresult rv;
21389 : nsIDOMEventListener *arg0;
21390 0 : xpc_qsSelfRef arg0ref;
21391 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21392 0 : if (NS_FAILED(rv)) {
21393 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21394 0 : return JS_FALSE;
21395 : }
21396 0 : rv = self->SetOnloadend(arg0);
21397 0 : if (NS_FAILED(rv))
21398 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21399 0 : return JS_TRUE;
21400 : }
21401 :
21402 : // === interface nsIXMLHttpRequest
21403 :
21404 : static JSBool
21405 392 : nsIXMLHttpRequest_GetResponseXML(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21406 : {
21407 392 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21408 392 : JSObject *callee = nsnull;
21409 : nsIXMLHttpRequest *self;
21410 784 : xpc_qsSelfRef selfref;
21411 784 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21412 392 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21413 0 : return JS_FALSE;
21414 : nsresult rv;
21415 784 : nsCOMPtr<nsIDOMDocument> result;
21416 392 : rv = self->GetResponseXML(getter_AddRefs(result));
21417 392 : if (NS_FAILED(rv))
21418 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21419 392 : if (!result) {
21420 0 : *vp = JSVAL_NULL;
21421 0 : return JS_TRUE;
21422 : }
21423 392 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21424 392 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21425 0 : return JS_TRUE;
21426 : }
21427 : // After this point do not use 'result'!
21428 784 : qsObjectHelper helper(result, cache);
21429 392 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDocument), &interfaces[k_nsIDOMDocument], vp);
21430 : }
21431 :
21432 : static JSBool
21433 351 : nsIXMLHttpRequest_GetResponseText(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21434 : {
21435 351 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21436 : nsIXMLHttpRequest *self;
21437 702 : xpc_qsSelfRef selfref;
21438 351 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21439 0 : return JS_FALSE;
21440 : nsresult rv;
21441 702 : nsString result;
21442 351 : rv = self->GetResponseText(result);
21443 351 : if (NS_FAILED(rv))
21444 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21445 351 : return xpc::StringToJsval(cx, result, vp);
21446 : }
21447 :
21448 : static JSBool
21449 0 : nsIXMLHttpRequest_GetResponseType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21450 : {
21451 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21452 : nsIXMLHttpRequest *self;
21453 0 : xpc_qsSelfRef selfref;
21454 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21455 0 : return JS_FALSE;
21456 : nsresult rv;
21457 0 : nsString result;
21458 0 : rv = self->GetResponseType(result);
21459 0 : if (NS_FAILED(rv))
21460 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21461 0 : return xpc::StringToJsval(cx, result, vp);
21462 : }
21463 :
21464 : static JSBool
21465 1 : nsIXMLHttpRequest_SetResponseType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21466 : {
21467 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21468 : nsIXMLHttpRequest *self;
21469 2 : xpc_qsSelfRef selfref;
21470 2 : JS::AutoValueRooter tvr(cx);
21471 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21472 0 : return JS_FALSE;
21473 2 : xpc_qsAString arg0(cx, *vp, vp);
21474 1 : if (!arg0.IsValid())
21475 0 : return JS_FALSE;
21476 : nsresult rv;
21477 1 : rv = self->SetResponseType(arg0);
21478 1 : if (NS_FAILED(rv))
21479 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21480 1 : return JS_TRUE;
21481 : }
21482 :
21483 : static JSBool
21484 0 : nsIXMLHttpRequest_GetResponse(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21485 : {
21486 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21487 : nsIXMLHttpRequest *self;
21488 0 : xpc_qsSelfRef selfref;
21489 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21490 0 : return JS_FALSE;
21491 : nsresult rv;
21492 0 : rv = self->GetResponse(cx, vp);
21493 0 : if (NS_FAILED(rv))
21494 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21495 0 : return JS_TRUE;
21496 : }
21497 :
21498 : static JSBool
21499 538 : nsIXMLHttpRequest_GetStatus(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21500 : {
21501 538 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21502 : nsIXMLHttpRequest *self;
21503 1076 : xpc_qsSelfRef selfref;
21504 538 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21505 0 : return JS_FALSE;
21506 : nsresult rv;
21507 : PRUint32 result;
21508 538 : rv = self->GetStatus(&result);
21509 538 : if (NS_FAILED(rv))
21510 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21511 538 : *vp = UINT_TO_JSVAL(result);
21512 538 : return JS_TRUE;
21513 : }
21514 :
21515 : static JSBool
21516 12 : nsIXMLHttpRequest_Abort(JSContext *cx, unsigned argc, jsval *vp)
21517 : {
21518 12 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21519 12 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21520 12 : if (!obj)
21521 0 : return JS_FALSE;
21522 : nsIXMLHttpRequest *self;
21523 24 : xpc_qsSelfRef selfref;
21524 12 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21525 0 : return JS_FALSE;
21526 : nsresult rv;
21527 12 : rv = self->Abort();
21528 12 : if (NS_FAILED(rv))
21529 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21530 12 : *vp = JSVAL_VOID;
21531 12 : return JS_TRUE;
21532 : }
21533 :
21534 : static JSBool
21535 597 : nsIXMLHttpRequest_Open(JSContext *cx, unsigned argc, jsval *vp)
21536 : {
21537 597 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21538 597 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21539 597 : if (!obj)
21540 0 : return JS_FALSE;
21541 : nsIXMLHttpRequest *self;
21542 1194 : xpc_qsSelfRef selfref;
21543 597 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21544 0 : return JS_FALSE;
21545 597 : if (argc < 2)
21546 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
21547 597 : jsval *argv = JS_ARGV(cx, vp);
21548 1194 : xpc_qsAUTF8String arg0(cx, argv[0], &argv[0]);
21549 597 : if (!arg0.IsValid())
21550 0 : return JS_FALSE;
21551 1194 : xpc_qsAUTF8String arg1(cx, argv[1], &argv[1]);
21552 597 : if (!arg1.IsValid())
21553 0 : return JS_FALSE;
21554 : JSBool arg2;
21555 597 : JS_ValueToBoolean(cx, (2 < argc ? argv[2] : JSVAL_NULL), &arg2);
21556 : xpc_qsDOMString arg3(cx, (3 < argc ? argv[3] : JSVAL_NULL), (3 < argc ? &argv[3] : NULL),
21557 : xpc_qsDOMString::eDefaultNullBehavior,
21558 1194 : xpc_qsDOMString::eEmpty);
21559 597 : if (!arg3.IsValid())
21560 0 : return JS_FALSE;
21561 : xpc_qsDOMString arg4(cx, (4 < argc ? argv[4] : JSVAL_NULL), (4 < argc ? &argv[4] : NULL),
21562 : xpc_qsDOMString::eDefaultNullBehavior,
21563 1194 : xpc_qsDOMString::eEmpty);
21564 597 : if (!arg4.IsValid())
21565 0 : return JS_FALSE;
21566 : nsresult rv;
21567 597 : rv = self->Open(arg0, arg1, arg2, arg3, arg4, NS_MIN<PRUint32>(argc, 5) - 2);
21568 597 : if (NS_FAILED(rv))
21569 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21570 597 : *vp = JSVAL_VOID;
21571 597 : return JS_TRUE;
21572 : }
21573 :
21574 : static JSBool
21575 596 : nsIXMLHttpRequest_Send(JSContext *cx, unsigned argc, jsval *vp)
21576 : {
21577 596 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21578 596 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21579 596 : if (!obj)
21580 0 : return JS_FALSE;
21581 1192 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
21582 : nsIXMLHttpRequest *self;
21583 1192 : xpc_qsSelfRef selfref;
21584 596 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
21585 0 : return JS_FALSE;
21586 596 : jsval *argv = JS_ARGV(cx, vp);
21587 1192 : nsCOMPtr<nsIVariant> arg0(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, (0 < argc ? argv[0] : JSVAL_NULL))));
21588 596 : if (!arg0) {
21589 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 0);
21590 0 : return JS_FALSE;
21591 : } nsresult rv;
21592 596 : rv = self->Send(arg0);
21593 596 : if (NS_FAILED(rv))
21594 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
21595 596 : *vp = JSVAL_VOID;
21596 596 : return JS_TRUE;
21597 : }
21598 :
21599 : static JSBool
21600 0 : nsIXMLHttpRequest_SendAsBinary(JSContext *cx, unsigned argc, jsval *vp)
21601 : {
21602 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21603 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
21604 0 : if (!obj)
21605 0 : return JS_FALSE;
21606 : nsIXMLHttpRequest *self;
21607 0 : xpc_qsSelfRef selfref;
21608 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
21609 0 : return JS_FALSE;
21610 0 : if (argc < 1)
21611 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
21612 0 : jsval *argv = JS_ARGV(cx, vp);
21613 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
21614 : xpc_qsDOMString::eDefaultNullBehavior,
21615 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
21616 0 : if (!arg0.IsValid())
21617 0 : return JS_FALSE;
21618 : nsresult rv;
21619 0 : rv = self->SendAsBinary(arg0);
21620 0 : if (NS_FAILED(rv))
21621 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
21622 0 : *vp = JSVAL_VOID;
21623 0 : return JS_TRUE;
21624 : }
21625 :
21626 : static JSBool
21627 0 : nsIXMLHttpRequest_GetTimeout(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21628 : {
21629 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21630 : nsIXMLHttpRequest *self;
21631 0 : xpc_qsSelfRef selfref;
21632 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21633 0 : return JS_FALSE;
21634 : nsresult rv;
21635 : PRUint32 result;
21636 0 : rv = self->GetTimeout(&result);
21637 0 : if (NS_FAILED(rv))
21638 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21639 0 : *vp = UINT_TO_JSVAL(result);
21640 0 : return JS_TRUE;
21641 : }
21642 :
21643 : static JSBool
21644 0 : nsIXMLHttpRequest_SetTimeout(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21645 : {
21646 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21647 : nsIXMLHttpRequest *self;
21648 0 : xpc_qsSelfRef selfref;
21649 0 : JS::AutoValueRooter tvr(cx);
21650 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21651 0 : return JS_FALSE;
21652 : uint32_t arg0;
21653 0 : if (!JS_ValueToECMAUint32(cx, *vp, &arg0))
21654 0 : return JS_FALSE;
21655 : nsresult rv;
21656 0 : rv = self->SetTimeout(arg0);
21657 0 : if (NS_FAILED(rv))
21658 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21659 0 : return JS_TRUE;
21660 : }
21661 :
21662 : static JSBool
21663 56 : nsIXMLHttpRequest_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21664 : {
21665 56 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21666 : nsIXMLHttpRequest *self;
21667 112 : xpc_qsSelfRef selfref;
21668 56 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21669 0 : return JS_FALSE;
21670 : nsresult rv;
21671 : PRUint16 result;
21672 56 : rv = self->GetReadyState(&result);
21673 56 : if (NS_FAILED(rv))
21674 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21675 56 : *vp = INT_TO_JSVAL((int32_t) result);
21676 56 : return JS_TRUE;
21677 : }
21678 :
21679 : static JSBool
21680 0 : nsIXMLHttpRequest_GetMultipart(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21681 : {
21682 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21683 : nsIXMLHttpRequest *self;
21684 0 : xpc_qsSelfRef selfref;
21685 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21686 0 : return JS_FALSE;
21687 : nsresult rv;
21688 : bool result;
21689 0 : rv = self->GetMultipart(&result);
21690 0 : if (NS_FAILED(rv))
21691 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21692 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
21693 0 : return JS_TRUE;
21694 : }
21695 :
21696 : static JSBool
21697 0 : nsIXMLHttpRequest_SetMultipart(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21698 : {
21699 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21700 : nsIXMLHttpRequest *self;
21701 0 : xpc_qsSelfRef selfref;
21702 0 : JS::AutoValueRooter tvr(cx);
21703 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21704 0 : return JS_FALSE;
21705 : JSBool arg0;
21706 0 : JS_ValueToBoolean(cx, *vp, &arg0);
21707 : nsresult rv;
21708 0 : rv = self->SetMultipart(arg0);
21709 0 : if (NS_FAILED(rv))
21710 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21711 0 : return JS_TRUE;
21712 : }
21713 :
21714 : static JSBool
21715 0 : nsIXMLHttpRequest_GetMozBackgroundRequest(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21716 : {
21717 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21718 : nsIXMLHttpRequest *self;
21719 0 : xpc_qsSelfRef selfref;
21720 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21721 0 : return JS_FALSE;
21722 : nsresult rv;
21723 : bool result;
21724 0 : rv = self->GetMozBackgroundRequest(&result);
21725 0 : if (NS_FAILED(rv))
21726 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21727 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
21728 0 : return JS_TRUE;
21729 : }
21730 :
21731 : static JSBool
21732 87 : nsIXMLHttpRequest_SetMozBackgroundRequest(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21733 : {
21734 87 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21735 : nsIXMLHttpRequest *self;
21736 174 : xpc_qsSelfRef selfref;
21737 174 : JS::AutoValueRooter tvr(cx);
21738 87 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21739 0 : return JS_FALSE;
21740 : JSBool arg0;
21741 87 : JS_ValueToBoolean(cx, *vp, &arg0);
21742 : nsresult rv;
21743 87 : rv = self->SetMozBackgroundRequest(arg0);
21744 87 : if (NS_FAILED(rv))
21745 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21746 87 : return JS_TRUE;
21747 : }
21748 :
21749 : static JSBool
21750 0 : nsIXMLHttpRequest_GetWithCredentials(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21751 : {
21752 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21753 : nsIXMLHttpRequest *self;
21754 0 : xpc_qsSelfRef selfref;
21755 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21756 0 : return JS_FALSE;
21757 : nsresult rv;
21758 : bool result;
21759 0 : rv = self->GetWithCredentials(&result);
21760 0 : if (NS_FAILED(rv))
21761 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21762 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
21763 0 : return JS_TRUE;
21764 : }
21765 :
21766 : static JSBool
21767 1 : nsIXMLHttpRequest_SetWithCredentials(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21768 : {
21769 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21770 : nsIXMLHttpRequest *self;
21771 2 : xpc_qsSelfRef selfref;
21772 2 : JS::AutoValueRooter tvr(cx);
21773 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21774 0 : return JS_FALSE;
21775 : JSBool arg0;
21776 1 : JS_ValueToBoolean(cx, *vp, &arg0);
21777 : nsresult rv;
21778 1 : rv = self->SetWithCredentials(arg0);
21779 1 : if (NS_FAILED(rv))
21780 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21781 1 : return JS_TRUE;
21782 : }
21783 :
21784 : static JSBool
21785 0 : nsIXMLHttpRequest_GetOnreadystatechange(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21786 : {
21787 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21788 0 : JSObject *callee = nsnull;
21789 : nsIXMLHttpRequest *self;
21790 0 : xpc_qsSelfRef selfref;
21791 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21792 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21793 0 : return JS_FALSE;
21794 : nsresult rv;
21795 0 : nsCOMPtr<nsIDOMEventListener> result;
21796 0 : rv = self->GetOnreadystatechange(getter_AddRefs(result));
21797 0 : if (NS_FAILED(rv))
21798 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21799 0 : if (!result) {
21800 0 : *vp = JSVAL_NULL;
21801 0 : return JS_TRUE;
21802 : }
21803 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21804 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21805 0 : return JS_TRUE;
21806 : }
21807 : // After this point do not use 'result'!
21808 0 : qsObjectHelper helper(result, cache);
21809 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21810 : }
21811 :
21812 : static JSBool
21813 0 : nsIXMLHttpRequest_SetOnreadystatechange(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21814 : {
21815 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21816 : nsIXMLHttpRequest *self;
21817 0 : xpc_qsSelfRef selfref;
21818 0 : JS::AutoValueRooter tvr(cx);
21819 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21820 0 : return JS_FALSE;
21821 : nsresult rv;
21822 : nsIDOMEventListener *arg0;
21823 0 : xpc_qsSelfRef arg0ref;
21824 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21825 0 : if (NS_FAILED(rv)) {
21826 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21827 0 : return JS_FALSE;
21828 : }
21829 0 : rv = self->SetOnreadystatechange(arg0);
21830 0 : if (NS_FAILED(rv))
21831 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21832 0 : return JS_TRUE;
21833 : }
21834 :
21835 : // === interface nsIWebSocket
21836 :
21837 : static JSBool
21838 0 : nsIWebSocket_GetUrl(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21839 : {
21840 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21841 : nsIWebSocket *self;
21842 0 : xpc_qsSelfRef selfref;
21843 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21844 0 : return JS_FALSE;
21845 : nsresult rv;
21846 0 : nsString result;
21847 0 : rv = self->GetUrl(result);
21848 0 : if (NS_FAILED(rv))
21849 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21850 0 : return xpc::StringToJsval(cx, result, vp);
21851 : }
21852 :
21853 : static JSBool
21854 0 : nsIWebSocket_GetExtensions(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21855 : {
21856 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21857 : nsIWebSocket *self;
21858 0 : xpc_qsSelfRef selfref;
21859 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21860 0 : return JS_FALSE;
21861 : nsresult rv;
21862 0 : nsString result;
21863 0 : rv = self->GetExtensions(result);
21864 0 : if (NS_FAILED(rv))
21865 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21866 0 : return xpc::StringToJsval(cx, result, vp);
21867 : }
21868 :
21869 : static JSBool
21870 0 : nsIWebSocket_GetProtocol(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21871 : {
21872 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21873 : nsIWebSocket *self;
21874 0 : xpc_qsSelfRef selfref;
21875 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21876 0 : return JS_FALSE;
21877 : nsresult rv;
21878 0 : nsString result;
21879 0 : rv = self->GetProtocol(result);
21880 0 : if (NS_FAILED(rv))
21881 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21882 0 : return xpc::StringToJsval(cx, result, vp);
21883 : }
21884 :
21885 : static JSBool
21886 0 : nsIWebSocket_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21887 : {
21888 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21889 : nsIWebSocket *self;
21890 0 : xpc_qsSelfRef selfref;
21891 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21892 0 : return JS_FALSE;
21893 : nsresult rv;
21894 : PRUint16 result;
21895 0 : rv = self->GetReadyState(&result);
21896 0 : if (NS_FAILED(rv))
21897 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21898 0 : *vp = INT_TO_JSVAL((int32_t) result);
21899 0 : return JS_TRUE;
21900 : }
21901 :
21902 : static JSBool
21903 0 : nsIWebSocket_GetBufferedAmount(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21904 : {
21905 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21906 : nsIWebSocket *self;
21907 0 : xpc_qsSelfRef selfref;
21908 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21909 0 : return JS_FALSE;
21910 : nsresult rv;
21911 : PRUint32 result;
21912 0 : rv = self->GetBufferedAmount(&result);
21913 0 : if (NS_FAILED(rv))
21914 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21915 0 : *vp = UINT_TO_JSVAL(result);
21916 0 : return JS_TRUE;
21917 : }
21918 :
21919 : static JSBool
21920 0 : nsIWebSocket_GetBinaryType(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21921 : {
21922 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21923 : nsIWebSocket *self;
21924 0 : xpc_qsSelfRef selfref;
21925 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
21926 0 : return JS_FALSE;
21927 : nsresult rv;
21928 0 : nsString result;
21929 0 : rv = self->GetBinaryType(result);
21930 0 : if (NS_FAILED(rv))
21931 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21932 0 : return xpc::StringToJsval(cx, result, vp);
21933 : }
21934 :
21935 : static JSBool
21936 0 : nsIWebSocket_SetBinaryType(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21937 : {
21938 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21939 : nsIWebSocket *self;
21940 0 : xpc_qsSelfRef selfref;
21941 0 : JS::AutoValueRooter tvr(cx);
21942 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21943 0 : return JS_FALSE;
21944 : xpc_qsDOMString arg0(cx, *vp, vp,
21945 : xpc_qsDOMString::eDefaultNullBehavior,
21946 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
21947 0 : if (!arg0.IsValid())
21948 0 : return JS_FALSE;
21949 : nsresult rv;
21950 0 : rv = self->SetBinaryType(arg0);
21951 0 : if (NS_FAILED(rv))
21952 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21953 0 : return JS_TRUE;
21954 : }
21955 :
21956 : static JSBool
21957 0 : nsIWebSocket_GetOnopen(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
21958 : {
21959 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21960 0 : JSObject *callee = nsnull;
21961 : nsIWebSocket *self;
21962 0 : xpc_qsSelfRef selfref;
21963 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
21964 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
21965 0 : return JS_FALSE;
21966 : nsresult rv;
21967 0 : nsCOMPtr<nsIDOMEventListener> result;
21968 0 : rv = self->GetOnopen(getter_AddRefs(result));
21969 0 : if (NS_FAILED(rv))
21970 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
21971 0 : if (!result) {
21972 0 : *vp = JSVAL_NULL;
21973 0 : return JS_TRUE;
21974 : }
21975 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
21976 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
21977 0 : return JS_TRUE;
21978 : }
21979 : // After this point do not use 'result'!
21980 0 : qsObjectHelper helper(result, cache);
21981 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
21982 : }
21983 :
21984 : static JSBool
21985 0 : nsIWebSocket_SetOnopen(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
21986 : {
21987 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
21988 : nsIWebSocket *self;
21989 0 : xpc_qsSelfRef selfref;
21990 0 : JS::AutoValueRooter tvr(cx);
21991 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
21992 0 : return JS_FALSE;
21993 : nsresult rv;
21994 : nsIDOMEventListener *arg0;
21995 0 : xpc_qsSelfRef arg0ref;
21996 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
21997 0 : if (NS_FAILED(rv)) {
21998 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
21999 0 : return JS_FALSE;
22000 : }
22001 0 : rv = self->SetOnopen(arg0);
22002 0 : if (NS_FAILED(rv))
22003 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22004 0 : return JS_TRUE;
22005 : }
22006 :
22007 : static JSBool
22008 0 : nsIWebSocket_GetOnmessage(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
22009 : {
22010 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22011 0 : JSObject *callee = nsnull;
22012 : nsIWebSocket *self;
22013 0 : xpc_qsSelfRef selfref;
22014 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22015 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22016 0 : return JS_FALSE;
22017 : nsresult rv;
22018 0 : nsCOMPtr<nsIDOMEventListener> result;
22019 0 : rv = self->GetOnmessage(getter_AddRefs(result));
22020 0 : if (NS_FAILED(rv))
22021 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22022 0 : if (!result) {
22023 0 : *vp = JSVAL_NULL;
22024 0 : return JS_TRUE;
22025 : }
22026 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22027 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22028 0 : return JS_TRUE;
22029 : }
22030 : // After this point do not use 'result'!
22031 0 : qsObjectHelper helper(result, cache);
22032 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
22033 : }
22034 :
22035 : static JSBool
22036 0 : nsIWebSocket_SetOnmessage(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
22037 : {
22038 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22039 : nsIWebSocket *self;
22040 0 : xpc_qsSelfRef selfref;
22041 0 : JS::AutoValueRooter tvr(cx);
22042 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
22043 0 : return JS_FALSE;
22044 : nsresult rv;
22045 : nsIDOMEventListener *arg0;
22046 0 : xpc_qsSelfRef arg0ref;
22047 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
22048 0 : if (NS_FAILED(rv)) {
22049 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22050 0 : return JS_FALSE;
22051 : }
22052 0 : rv = self->SetOnmessage(arg0);
22053 0 : if (NS_FAILED(rv))
22054 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22055 0 : return JS_TRUE;
22056 : }
22057 :
22058 : static JSBool
22059 0 : nsIWebSocket_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
22060 : {
22061 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22062 0 : JSObject *callee = nsnull;
22063 : nsIWebSocket *self;
22064 0 : xpc_qsSelfRef selfref;
22065 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22066 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22067 0 : return JS_FALSE;
22068 : nsresult rv;
22069 0 : nsCOMPtr<nsIDOMEventListener> result;
22070 0 : rv = self->GetOnerror(getter_AddRefs(result));
22071 0 : if (NS_FAILED(rv))
22072 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22073 0 : if (!result) {
22074 0 : *vp = JSVAL_NULL;
22075 0 : return JS_TRUE;
22076 : }
22077 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22078 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22079 0 : return JS_TRUE;
22080 : }
22081 : // After this point do not use 'result'!
22082 0 : qsObjectHelper helper(result, cache);
22083 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
22084 : }
22085 :
22086 : static JSBool
22087 0 : nsIWebSocket_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
22088 : {
22089 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22090 : nsIWebSocket *self;
22091 0 : xpc_qsSelfRef selfref;
22092 0 : JS::AutoValueRooter tvr(cx);
22093 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
22094 0 : return JS_FALSE;
22095 : nsresult rv;
22096 : nsIDOMEventListener *arg0;
22097 0 : xpc_qsSelfRef arg0ref;
22098 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
22099 0 : if (NS_FAILED(rv)) {
22100 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22101 0 : return JS_FALSE;
22102 : }
22103 0 : rv = self->SetOnerror(arg0);
22104 0 : if (NS_FAILED(rv))
22105 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22106 0 : return JS_TRUE;
22107 : }
22108 :
22109 : static JSBool
22110 0 : nsIWebSocket_GetOnclose(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
22111 : {
22112 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22113 0 : JSObject *callee = nsnull;
22114 : nsIWebSocket *self;
22115 0 : xpc_qsSelfRef selfref;
22116 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22117 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22118 0 : return JS_FALSE;
22119 : nsresult rv;
22120 0 : nsCOMPtr<nsIDOMEventListener> result;
22121 0 : rv = self->GetOnclose(getter_AddRefs(result));
22122 0 : if (NS_FAILED(rv))
22123 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22124 0 : if (!result) {
22125 0 : *vp = JSVAL_NULL;
22126 0 : return JS_TRUE;
22127 : }
22128 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22129 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22130 0 : return JS_TRUE;
22131 : }
22132 : // After this point do not use 'result'!
22133 0 : qsObjectHelper helper(result, cache);
22134 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
22135 : }
22136 :
22137 : static JSBool
22138 0 : nsIWebSocket_SetOnclose(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
22139 : {
22140 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22141 : nsIWebSocket *self;
22142 0 : xpc_qsSelfRef selfref;
22143 0 : JS::AutoValueRooter tvr(cx);
22144 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
22145 0 : return JS_FALSE;
22146 : nsresult rv;
22147 : nsIDOMEventListener *arg0;
22148 0 : xpc_qsSelfRef arg0ref;
22149 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
22150 0 : if (NS_FAILED(rv)) {
22151 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22152 0 : return JS_FALSE;
22153 : }
22154 0 : rv = self->SetOnclose(arg0);
22155 0 : if (NS_FAILED(rv))
22156 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
22157 0 : return JS_TRUE;
22158 : }
22159 :
22160 : static JSBool
22161 0 : nsIWebSocket_Send(JSContext *cx, unsigned argc, jsval *vp)
22162 : {
22163 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22164 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22165 0 : if (!obj)
22166 0 : return JS_FALSE;
22167 0 : XPCCallContext ccx(JS_CALLER, cx, obj, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));
22168 : nsIWebSocket *self;
22169 0 : xpc_qsSelfRef selfref;
22170 0 : if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, &vp[1]))
22171 0 : return JS_FALSE;
22172 0 : if (argc < 1)
22173 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22174 0 : jsval *argv = JS_ARGV(cx, vp);
22175 0 : nsCOMPtr<nsIVariant> arg0(already_AddRefed<nsIVariant>(XPCVariant::newVariant(ccx, argv[0])));
22176 0 : if (!arg0) {
22177 0 : xpc_qsThrowBadArgWithCcx(ccx, NS_ERROR_XPC_BAD_CONVERT_JS, 0);
22178 0 : return JS_FALSE;
22179 : } nsresult rv;
22180 0 : rv = self->Send(arg0);
22181 0 : if (NS_FAILED(rv))
22182 0 : return xpc_qsThrowMethodFailedWithCcx(ccx, rv);
22183 0 : *vp = JSVAL_VOID;
22184 0 : return JS_TRUE;
22185 : }
22186 :
22187 : static JSBool
22188 0 : nsIWebSocket_Close(JSContext *cx, unsigned argc, jsval *vp)
22189 : {
22190 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22191 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22192 0 : if (!obj)
22193 0 : return JS_FALSE;
22194 : nsIWebSocket *self;
22195 0 : xpc_qsSelfRef selfref;
22196 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22197 0 : return JS_FALSE;
22198 0 : jsval *argv = JS_ARGV(cx, vp);
22199 : uint32_t arg0_u32;
22200 0 : if (!JS_ValueToECMAUint32(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0_u32))
22201 0 : return JS_FALSE;
22202 0 : uint16_t arg0 = (uint16_t) arg0_u32;
22203 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
22204 : xpc_qsDOMString::eDefaultNullBehavior,
22205 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
22206 0 : if (!arg1.IsValid())
22207 0 : return JS_FALSE;
22208 : nsresult rv;
22209 0 : rv = self->Close(arg0, arg1, NS_MIN<PRUint32>(argc, 2) - 0);
22210 0 : if (NS_FAILED(rv))
22211 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22212 0 : *vp = JSVAL_VOID;
22213 0 : return JS_TRUE;
22214 : }
22215 :
22216 : // === interface nsIDOMWebGLRenderingContext
22217 :
22218 : static JSBool
22219 0 : nsIDOMWebGLRenderingContext_GetCanvas(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
22220 : {
22221 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22222 0 : JSObject *callee = nsnull;
22223 : nsIDOMWebGLRenderingContext *self;
22224 0 : xpc_qsSelfRef selfref;
22225 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22226 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
22227 0 : return JS_FALSE;
22228 : nsresult rv;
22229 0 : nsCOMPtr<nsIDOMHTMLCanvasElement> result;
22230 0 : rv = self->GetCanvas(getter_AddRefs(result));
22231 0 : if (NS_FAILED(rv))
22232 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
22233 0 : if (!result) {
22234 0 : *vp = JSVAL_NULL;
22235 0 : return JS_TRUE;
22236 : }
22237 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22238 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22239 0 : return JS_TRUE;
22240 : }
22241 : // After this point do not use 'result'!
22242 0 : qsObjectHelper helper(result, cache);
22243 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMHTMLCanvasElement), &interfaces[k_nsIDOMHTMLCanvasElement], vp);
22244 : }
22245 :
22246 : static JSBool
22247 0 : nsIDOMWebGLRenderingContext_ActiveTexture(JSContext *cx, unsigned argc, jsval *vp)
22248 : {
22249 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22250 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22251 0 : if (!obj)
22252 0 : return JS_FALSE;
22253 : nsIDOMWebGLRenderingContext *self;
22254 0 : xpc_qsSelfRef selfref;
22255 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22256 0 : return JS_FALSE;
22257 0 : if (argc < 1)
22258 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22259 0 : jsval *argv = JS_ARGV(cx, vp);
22260 : uint32_t arg0;
22261 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22262 0 : return JS_FALSE;
22263 : nsresult rv;
22264 0 : rv = self->ActiveTexture(arg0);
22265 0 : if (NS_FAILED(rv))
22266 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22267 0 : *vp = JSVAL_VOID;
22268 0 : return JS_TRUE;
22269 : }
22270 :
22271 : static JSBool
22272 0 : nsIDOMWebGLRenderingContext_AttachShader(JSContext *cx, unsigned argc, jsval *vp)
22273 : {
22274 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22275 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22276 0 : if (!obj)
22277 0 : return JS_FALSE;
22278 : nsIDOMWebGLRenderingContext *self;
22279 0 : xpc_qsSelfRef selfref;
22280 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22281 0 : return JS_FALSE;
22282 0 : jsval *argv = JS_ARGV(cx, vp);
22283 : nsresult rv;
22284 : nsIWebGLProgram *arg0;
22285 0 : xpc_qsSelfRef arg0ref;
22286 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
22287 0 : if (NS_FAILED(rv)) {
22288 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
22289 0 : return JS_FALSE;
22290 : }
22291 : nsIWebGLShader *arg1;
22292 0 : xpc_qsSelfRef arg1ref;
22293 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1, &arg1ref.ptr, (1 < argc ? &argv[1] : NULL));
22294 0 : if (NS_FAILED(rv)) {
22295 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22296 0 : return JS_FALSE;
22297 : }
22298 0 : rv = self->AttachShader(arg0, arg1);
22299 0 : if (NS_FAILED(rv))
22300 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22301 0 : *vp = JSVAL_VOID;
22302 0 : return JS_TRUE;
22303 : }
22304 :
22305 : static JSBool
22306 0 : nsIDOMWebGLRenderingContext_BindAttribLocation(JSContext *cx, unsigned argc, jsval *vp)
22307 : {
22308 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22309 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22310 0 : if (!obj)
22311 0 : return JS_FALSE;
22312 : nsIDOMWebGLRenderingContext *self;
22313 0 : xpc_qsSelfRef selfref;
22314 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22315 0 : return JS_FALSE;
22316 0 : if (argc < 3)
22317 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22318 0 : jsval *argv = JS_ARGV(cx, vp);
22319 : nsresult rv;
22320 : nsIWebGLProgram *arg0;
22321 0 : xpc_qsSelfRef arg0ref;
22322 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
22323 0 : if (NS_FAILED(rv)) {
22324 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
22325 0 : return JS_FALSE;
22326 : }
22327 : uint32_t arg1;
22328 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22329 0 : return JS_FALSE;
22330 0 : xpc_qsDOMString arg2(cx, argv[2], &argv[2],
22331 : xpc_qsDOMString::eDefaultNullBehavior,
22332 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
22333 0 : if (!arg2.IsValid())
22334 0 : return JS_FALSE;
22335 0 : rv = self->BindAttribLocation(arg0, arg1, arg2);
22336 0 : if (NS_FAILED(rv))
22337 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22338 0 : *vp = JSVAL_VOID;
22339 0 : return JS_TRUE;
22340 : }
22341 :
22342 : static JSBool
22343 0 : nsIDOMWebGLRenderingContext_BindBuffer(JSContext *cx, unsigned argc, jsval *vp)
22344 : {
22345 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22346 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22347 0 : if (!obj)
22348 0 : return JS_FALSE;
22349 : nsIDOMWebGLRenderingContext *self;
22350 0 : xpc_qsSelfRef selfref;
22351 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22352 0 : return JS_FALSE;
22353 0 : if (argc < 2)
22354 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22355 0 : jsval *argv = JS_ARGV(cx, vp);
22356 : uint32_t arg0;
22357 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22358 0 : return JS_FALSE;
22359 : nsresult rv;
22360 : nsIWebGLBuffer *arg1;
22361 0 : xpc_qsSelfRef arg1ref;
22362 0 : rv = xpc_qsUnwrapArg<nsIWebGLBuffer>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22363 0 : if (NS_FAILED(rv)) {
22364 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22365 0 : return JS_FALSE;
22366 : }
22367 0 : rv = self->BindBuffer(arg0, arg1);
22368 0 : if (NS_FAILED(rv))
22369 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22370 0 : *vp = JSVAL_VOID;
22371 0 : return JS_TRUE;
22372 : }
22373 :
22374 : static JSBool
22375 0 : nsIDOMWebGLRenderingContext_BindFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
22376 : {
22377 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22378 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22379 0 : if (!obj)
22380 0 : return JS_FALSE;
22381 : nsIDOMWebGLRenderingContext *self;
22382 0 : xpc_qsSelfRef selfref;
22383 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22384 0 : return JS_FALSE;
22385 0 : if (argc < 2)
22386 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22387 0 : jsval *argv = JS_ARGV(cx, vp);
22388 : uint32_t arg0;
22389 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22390 0 : return JS_FALSE;
22391 : nsresult rv;
22392 : nsIWebGLFramebuffer *arg1;
22393 0 : xpc_qsSelfRef arg1ref;
22394 0 : rv = xpc_qsUnwrapArg<nsIWebGLFramebuffer>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22395 0 : if (NS_FAILED(rv)) {
22396 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22397 0 : return JS_FALSE;
22398 : }
22399 0 : rv = self->BindFramebuffer(arg0, arg1);
22400 0 : if (NS_FAILED(rv))
22401 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22402 0 : *vp = JSVAL_VOID;
22403 0 : return JS_TRUE;
22404 : }
22405 :
22406 : static JSBool
22407 0 : nsIDOMWebGLRenderingContext_BindRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
22408 : {
22409 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22410 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22411 0 : if (!obj)
22412 0 : return JS_FALSE;
22413 : nsIDOMWebGLRenderingContext *self;
22414 0 : xpc_qsSelfRef selfref;
22415 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22416 0 : return JS_FALSE;
22417 0 : if (argc < 2)
22418 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22419 0 : jsval *argv = JS_ARGV(cx, vp);
22420 : uint32_t arg0;
22421 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22422 0 : return JS_FALSE;
22423 : nsresult rv;
22424 : nsIWebGLRenderbuffer *arg1;
22425 0 : xpc_qsSelfRef arg1ref;
22426 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22427 0 : if (NS_FAILED(rv)) {
22428 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22429 0 : return JS_FALSE;
22430 : }
22431 0 : rv = self->BindRenderbuffer(arg0, arg1);
22432 0 : if (NS_FAILED(rv))
22433 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22434 0 : *vp = JSVAL_VOID;
22435 0 : return JS_TRUE;
22436 : }
22437 :
22438 : static JSBool
22439 0 : nsIDOMWebGLRenderingContext_BindTexture(JSContext *cx, unsigned argc, jsval *vp)
22440 : {
22441 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22442 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22443 0 : if (!obj)
22444 0 : return JS_FALSE;
22445 : nsIDOMWebGLRenderingContext *self;
22446 0 : xpc_qsSelfRef selfref;
22447 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22448 0 : return JS_FALSE;
22449 0 : if (argc < 2)
22450 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22451 0 : jsval *argv = JS_ARGV(cx, vp);
22452 : uint32_t arg0;
22453 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22454 0 : return JS_FALSE;
22455 : nsresult rv;
22456 : nsIWebGLTexture *arg1;
22457 0 : xpc_qsSelfRef arg1ref;
22458 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
22459 0 : if (NS_FAILED(rv)) {
22460 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
22461 0 : return JS_FALSE;
22462 : }
22463 0 : rv = self->BindTexture(arg0, arg1);
22464 0 : if (NS_FAILED(rv))
22465 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22466 0 : *vp = JSVAL_VOID;
22467 0 : return JS_TRUE;
22468 : }
22469 :
22470 : static JSBool
22471 0 : nsIDOMWebGLRenderingContext_BlendColor(JSContext *cx, unsigned argc, jsval *vp)
22472 : {
22473 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22474 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22475 0 : if (!obj)
22476 0 : return JS_FALSE;
22477 : nsIDOMWebGLRenderingContext *self;
22478 0 : xpc_qsSelfRef selfref;
22479 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22480 0 : return JS_FALSE;
22481 0 : if (argc < 4)
22482 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22483 0 : jsval *argv = JS_ARGV(cx, vp);
22484 : double arg0_dbl;
22485 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
22486 0 : return JS_FALSE;
22487 0 : float arg0 = (float) arg0_dbl;
22488 : double arg1_dbl;
22489 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
22490 0 : return JS_FALSE;
22491 0 : float arg1 = (float) arg1_dbl;
22492 : double arg2_dbl;
22493 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
22494 0 : return JS_FALSE;
22495 0 : float arg2 = (float) arg2_dbl;
22496 : double arg3_dbl;
22497 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
22498 0 : return JS_FALSE;
22499 0 : float arg3 = (float) arg3_dbl;
22500 : nsresult rv;
22501 0 : rv = self->BlendColor(arg0, arg1, arg2, arg3);
22502 0 : if (NS_FAILED(rv))
22503 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22504 0 : *vp = JSVAL_VOID;
22505 0 : return JS_TRUE;
22506 : }
22507 :
22508 : static JSBool
22509 0 : nsIDOMWebGLRenderingContext_BlendEquation(JSContext *cx, unsigned argc, jsval *vp)
22510 : {
22511 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22512 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22513 0 : if (!obj)
22514 0 : return JS_FALSE;
22515 : nsIDOMWebGLRenderingContext *self;
22516 0 : xpc_qsSelfRef selfref;
22517 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22518 0 : return JS_FALSE;
22519 0 : if (argc < 1)
22520 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22521 0 : jsval *argv = JS_ARGV(cx, vp);
22522 : uint32_t arg0;
22523 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22524 0 : return JS_FALSE;
22525 : nsresult rv;
22526 0 : rv = self->BlendEquation(arg0);
22527 0 : if (NS_FAILED(rv))
22528 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22529 0 : *vp = JSVAL_VOID;
22530 0 : return JS_TRUE;
22531 : }
22532 :
22533 : static JSBool
22534 0 : nsIDOMWebGLRenderingContext_BlendEquationSeparate(JSContext *cx, unsigned argc, jsval *vp)
22535 : {
22536 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22537 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22538 0 : if (!obj)
22539 0 : return JS_FALSE;
22540 : nsIDOMWebGLRenderingContext *self;
22541 0 : xpc_qsSelfRef selfref;
22542 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22543 0 : return JS_FALSE;
22544 0 : if (argc < 2)
22545 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22546 0 : jsval *argv = JS_ARGV(cx, vp);
22547 : uint32_t arg0;
22548 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22549 0 : return JS_FALSE;
22550 : uint32_t arg1;
22551 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22552 0 : return JS_FALSE;
22553 : nsresult rv;
22554 0 : rv = self->BlendEquationSeparate(arg0, arg1);
22555 0 : if (NS_FAILED(rv))
22556 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22557 0 : *vp = JSVAL_VOID;
22558 0 : return JS_TRUE;
22559 : }
22560 :
22561 : static JSBool
22562 0 : nsIDOMWebGLRenderingContext_BlendFunc(JSContext *cx, unsigned argc, jsval *vp)
22563 : {
22564 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22565 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22566 0 : if (!obj)
22567 0 : return JS_FALSE;
22568 : nsIDOMWebGLRenderingContext *self;
22569 0 : xpc_qsSelfRef selfref;
22570 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22571 0 : return JS_FALSE;
22572 0 : if (argc < 2)
22573 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22574 0 : jsval *argv = JS_ARGV(cx, vp);
22575 : uint32_t arg0;
22576 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22577 0 : return JS_FALSE;
22578 : uint32_t arg1;
22579 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22580 0 : return JS_FALSE;
22581 : nsresult rv;
22582 0 : rv = self->BlendFunc(arg0, arg1);
22583 0 : if (NS_FAILED(rv))
22584 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22585 0 : *vp = JSVAL_VOID;
22586 0 : return JS_TRUE;
22587 : }
22588 :
22589 : static JSBool
22590 0 : nsIDOMWebGLRenderingContext_BlendFuncSeparate(JSContext *cx, unsigned argc, jsval *vp)
22591 : {
22592 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22593 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22594 0 : if (!obj)
22595 0 : return JS_FALSE;
22596 : nsIDOMWebGLRenderingContext *self;
22597 0 : xpc_qsSelfRef selfref;
22598 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22599 0 : return JS_FALSE;
22600 0 : if (argc < 4)
22601 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22602 0 : jsval *argv = JS_ARGV(cx, vp);
22603 : uint32_t arg0;
22604 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22605 0 : return JS_FALSE;
22606 : uint32_t arg1;
22607 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
22608 0 : return JS_FALSE;
22609 : uint32_t arg2;
22610 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
22611 0 : return JS_FALSE;
22612 : uint32_t arg3;
22613 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3))
22614 0 : return JS_FALSE;
22615 : nsresult rv;
22616 0 : rv = self->BlendFuncSeparate(arg0, arg1, arg2, arg3);
22617 0 : if (NS_FAILED(rv))
22618 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22619 0 : *vp = JSVAL_VOID;
22620 0 : return JS_TRUE;
22621 : }
22622 :
22623 : static JSBool
22624 0 : nsIDOMWebGLRenderingContext_CheckFramebufferStatus(JSContext *cx, unsigned argc, jsval *vp)
22625 : {
22626 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22627 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22628 0 : if (!obj)
22629 0 : return JS_FALSE;
22630 : nsIDOMWebGLRenderingContext *self;
22631 0 : xpc_qsSelfRef selfref;
22632 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22633 0 : return JS_FALSE;
22634 0 : if (argc < 1)
22635 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22636 0 : jsval *argv = JS_ARGV(cx, vp);
22637 : uint32_t arg0;
22638 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22639 0 : return JS_FALSE;
22640 : nsresult rv;
22641 : WebGLenum result;
22642 0 : rv = self->CheckFramebufferStatus(arg0, &result);
22643 0 : if (NS_FAILED(rv))
22644 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22645 0 : *vp = UINT_TO_JSVAL(result);
22646 0 : return JS_TRUE;
22647 : }
22648 :
22649 : static JSBool
22650 0 : nsIDOMWebGLRenderingContext_Clear(JSContext *cx, unsigned argc, jsval *vp)
22651 : {
22652 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22653 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22654 0 : if (!obj)
22655 0 : return JS_FALSE;
22656 : nsIDOMWebGLRenderingContext *self;
22657 0 : xpc_qsSelfRef selfref;
22658 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22659 0 : return JS_FALSE;
22660 0 : if (argc < 1)
22661 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22662 0 : jsval *argv = JS_ARGV(cx, vp);
22663 : uint32_t arg0;
22664 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22665 0 : return JS_FALSE;
22666 : nsresult rv;
22667 0 : rv = self->Clear(arg0);
22668 0 : if (NS_FAILED(rv))
22669 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22670 0 : *vp = JSVAL_VOID;
22671 0 : return JS_TRUE;
22672 : }
22673 :
22674 : static JSBool
22675 0 : nsIDOMWebGLRenderingContext_ClearColor(JSContext *cx, unsigned argc, jsval *vp)
22676 : {
22677 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22678 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22679 0 : if (!obj)
22680 0 : return JS_FALSE;
22681 : nsIDOMWebGLRenderingContext *self;
22682 0 : xpc_qsSelfRef selfref;
22683 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22684 0 : return JS_FALSE;
22685 0 : if (argc < 4)
22686 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22687 0 : jsval *argv = JS_ARGV(cx, vp);
22688 : double arg0_dbl;
22689 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
22690 0 : return JS_FALSE;
22691 0 : float arg0 = (float) arg0_dbl;
22692 : double arg1_dbl;
22693 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
22694 0 : return JS_FALSE;
22695 0 : float arg1 = (float) arg1_dbl;
22696 : double arg2_dbl;
22697 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
22698 0 : return JS_FALSE;
22699 0 : float arg2 = (float) arg2_dbl;
22700 : double arg3_dbl;
22701 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
22702 0 : return JS_FALSE;
22703 0 : float arg3 = (float) arg3_dbl;
22704 : nsresult rv;
22705 0 : rv = self->ClearColor(arg0, arg1, arg2, arg3);
22706 0 : if (NS_FAILED(rv))
22707 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22708 0 : *vp = JSVAL_VOID;
22709 0 : return JS_TRUE;
22710 : }
22711 :
22712 : static JSBool
22713 0 : nsIDOMWebGLRenderingContext_ClearDepth(JSContext *cx, unsigned argc, jsval *vp)
22714 : {
22715 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22716 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22717 0 : if (!obj)
22718 0 : return JS_FALSE;
22719 : nsIDOMWebGLRenderingContext *self;
22720 0 : xpc_qsSelfRef selfref;
22721 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22722 0 : return JS_FALSE;
22723 0 : if (argc < 1)
22724 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22725 0 : jsval *argv = JS_ARGV(cx, vp);
22726 : double arg0_dbl;
22727 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
22728 0 : return JS_FALSE;
22729 0 : float arg0 = (float) arg0_dbl;
22730 : nsresult rv;
22731 0 : rv = self->ClearDepth(arg0);
22732 0 : if (NS_FAILED(rv))
22733 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22734 0 : *vp = JSVAL_VOID;
22735 0 : return JS_TRUE;
22736 : }
22737 :
22738 : static JSBool
22739 0 : nsIDOMWebGLRenderingContext_ClearStencil(JSContext *cx, unsigned argc, jsval *vp)
22740 : {
22741 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22742 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22743 0 : if (!obj)
22744 0 : return JS_FALSE;
22745 : nsIDOMWebGLRenderingContext *self;
22746 0 : xpc_qsSelfRef selfref;
22747 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22748 0 : return JS_FALSE;
22749 0 : if (argc < 1)
22750 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22751 0 : jsval *argv = JS_ARGV(cx, vp);
22752 : int32_t arg0;
22753 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
22754 0 : return JS_FALSE;
22755 : nsresult rv;
22756 0 : rv = self->ClearStencil(arg0);
22757 0 : if (NS_FAILED(rv))
22758 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22759 0 : *vp = JSVAL_VOID;
22760 0 : return JS_TRUE;
22761 : }
22762 :
22763 : static JSBool
22764 0 : nsIDOMWebGLRenderingContext_ColorMask(JSContext *cx, unsigned argc, jsval *vp)
22765 : {
22766 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22767 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22768 0 : if (!obj)
22769 0 : return JS_FALSE;
22770 : nsIDOMWebGLRenderingContext *self;
22771 0 : xpc_qsSelfRef selfref;
22772 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22773 0 : return JS_FALSE;
22774 0 : if (argc < 4)
22775 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22776 0 : jsval *argv = JS_ARGV(cx, vp);
22777 : JSBool arg0;
22778 0 : JS_ValueToBoolean(cx, argv[0], &arg0);
22779 : JSBool arg1;
22780 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
22781 : JSBool arg2;
22782 0 : JS_ValueToBoolean(cx, argv[2], &arg2);
22783 : JSBool arg3;
22784 0 : JS_ValueToBoolean(cx, argv[3], &arg3);
22785 : nsresult rv;
22786 0 : rv = self->ColorMask(arg0, arg1, arg2, arg3);
22787 0 : if (NS_FAILED(rv))
22788 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22789 0 : *vp = JSVAL_VOID;
22790 0 : return JS_TRUE;
22791 : }
22792 :
22793 : static JSBool
22794 0 : nsIDOMWebGLRenderingContext_CompileShader(JSContext *cx, unsigned argc, jsval *vp)
22795 : {
22796 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22797 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22798 0 : if (!obj)
22799 0 : return JS_FALSE;
22800 : nsIDOMWebGLRenderingContext *self;
22801 0 : xpc_qsSelfRef selfref;
22802 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22803 0 : return JS_FALSE;
22804 0 : jsval *argv = JS_ARGV(cx, vp);
22805 : nsresult rv;
22806 : nsIWebGLShader *arg0;
22807 0 : xpc_qsSelfRef arg0ref;
22808 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
22809 0 : if (NS_FAILED(rv)) {
22810 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
22811 0 : return JS_FALSE;
22812 : }
22813 0 : rv = self->CompileShader(arg0);
22814 0 : if (NS_FAILED(rv))
22815 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22816 0 : *vp = JSVAL_VOID;
22817 0 : return JS_TRUE;
22818 : }
22819 :
22820 : static JSBool
22821 0 : nsIDOMWebGLRenderingContext_CopyTexImage2D(JSContext *cx, unsigned argc, jsval *vp)
22822 : {
22823 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22824 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22825 0 : if (!obj)
22826 0 : return JS_FALSE;
22827 : nsIDOMWebGLRenderingContext *self;
22828 0 : xpc_qsSelfRef selfref;
22829 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22830 0 : return JS_FALSE;
22831 0 : if (argc < 8)
22832 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22833 0 : jsval *argv = JS_ARGV(cx, vp);
22834 : uint32_t arg0;
22835 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22836 0 : return JS_FALSE;
22837 : int32_t arg1;
22838 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
22839 0 : return JS_FALSE;
22840 : uint32_t arg2;
22841 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
22842 0 : return JS_FALSE;
22843 : int32_t arg3;
22844 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
22845 0 : return JS_FALSE;
22846 : int32_t arg4;
22847 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
22848 0 : return JS_FALSE;
22849 : int32_t arg5;
22850 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
22851 0 : return JS_FALSE;
22852 : int32_t arg6;
22853 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
22854 0 : return JS_FALSE;
22855 : int32_t arg7;
22856 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
22857 0 : return JS_FALSE;
22858 : nsresult rv;
22859 0 : rv = self->CopyTexImage2D(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
22860 0 : if (NS_FAILED(rv))
22861 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22862 0 : *vp = JSVAL_VOID;
22863 0 : return JS_TRUE;
22864 : }
22865 :
22866 : static JSBool
22867 0 : nsIDOMWebGLRenderingContext_CopyTexSubImage2D(JSContext *cx, unsigned argc, jsval *vp)
22868 : {
22869 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22870 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22871 0 : if (!obj)
22872 0 : return JS_FALSE;
22873 : nsIDOMWebGLRenderingContext *self;
22874 0 : xpc_qsSelfRef selfref;
22875 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
22876 0 : return JS_FALSE;
22877 0 : if (argc < 8)
22878 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
22879 0 : jsval *argv = JS_ARGV(cx, vp);
22880 : uint32_t arg0;
22881 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
22882 0 : return JS_FALSE;
22883 : int32_t arg1;
22884 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
22885 0 : return JS_FALSE;
22886 : int32_t arg2;
22887 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
22888 0 : return JS_FALSE;
22889 : int32_t arg3;
22890 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
22891 0 : return JS_FALSE;
22892 : int32_t arg4;
22893 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
22894 0 : return JS_FALSE;
22895 : int32_t arg5;
22896 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
22897 0 : return JS_FALSE;
22898 : int32_t arg6;
22899 0 : if (!JS_ValueToECMAInt32(cx, argv[6], &arg6))
22900 0 : return JS_FALSE;
22901 : int32_t arg7;
22902 0 : if (!JS_ValueToECMAInt32(cx, argv[7], &arg7))
22903 0 : return JS_FALSE;
22904 : nsresult rv;
22905 0 : rv = self->CopyTexSubImage2D(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
22906 0 : if (NS_FAILED(rv))
22907 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22908 0 : *vp = JSVAL_VOID;
22909 0 : return JS_TRUE;
22910 : }
22911 :
22912 : static JSBool
22913 0 : nsIDOMWebGLRenderingContext_CreateBuffer(JSContext *cx, unsigned argc, jsval *vp)
22914 : {
22915 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22916 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22917 0 : if (!obj)
22918 0 : return JS_FALSE;
22919 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
22920 : nsIDOMWebGLRenderingContext *self;
22921 0 : xpc_qsSelfRef selfref;
22922 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22923 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
22924 0 : return JS_FALSE;
22925 : nsresult rv;
22926 0 : nsCOMPtr<nsIWebGLBuffer> result;
22927 0 : rv = self->CreateBuffer(getter_AddRefs(result));
22928 0 : if (NS_FAILED(rv))
22929 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22930 0 : if (!result) {
22931 0 : *vp = JSVAL_NULL;
22932 0 : return JS_TRUE;
22933 : }
22934 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22935 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22936 0 : return JS_TRUE;
22937 : }
22938 : // After this point do not use 'result'!
22939 0 : qsObjectHelper helper(result, cache);
22940 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLBuffer), &interfaces[k_nsIWebGLBuffer], vp);
22941 : }
22942 :
22943 : static JSBool
22944 0 : nsIDOMWebGLRenderingContext_CreateProgram(JSContext *cx, unsigned argc, jsval *vp)
22945 : {
22946 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22947 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22948 0 : if (!obj)
22949 0 : return JS_FALSE;
22950 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
22951 : nsIDOMWebGLRenderingContext *self;
22952 0 : xpc_qsSelfRef selfref;
22953 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22954 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
22955 0 : return JS_FALSE;
22956 : nsresult rv;
22957 0 : nsCOMPtr<nsIWebGLProgram> result;
22958 0 : rv = self->CreateProgram(getter_AddRefs(result));
22959 0 : if (NS_FAILED(rv))
22960 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22961 0 : if (!result) {
22962 0 : *vp = JSVAL_NULL;
22963 0 : return JS_TRUE;
22964 : }
22965 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22966 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22967 0 : return JS_TRUE;
22968 : }
22969 : // After this point do not use 'result'!
22970 0 : qsObjectHelper helper(result, cache);
22971 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLProgram), &interfaces[k_nsIWebGLProgram], vp);
22972 : }
22973 :
22974 : static JSBool
22975 0 : nsIDOMWebGLRenderingContext_CreateFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
22976 : {
22977 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
22978 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
22979 0 : if (!obj)
22980 0 : return JS_FALSE;
22981 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
22982 : nsIDOMWebGLRenderingContext *self;
22983 0 : xpc_qsSelfRef selfref;
22984 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
22985 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
22986 0 : return JS_FALSE;
22987 : nsresult rv;
22988 0 : nsCOMPtr<nsIWebGLFramebuffer> result;
22989 0 : rv = self->CreateFramebuffer(getter_AddRefs(result));
22990 0 : if (NS_FAILED(rv))
22991 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
22992 0 : if (!result) {
22993 0 : *vp = JSVAL_NULL;
22994 0 : return JS_TRUE;
22995 : }
22996 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
22997 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
22998 0 : return JS_TRUE;
22999 : }
23000 : // After this point do not use 'result'!
23001 0 : qsObjectHelper helper(result, cache);
23002 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLFramebuffer), &interfaces[k_nsIWebGLFramebuffer], vp);
23003 : }
23004 :
23005 : static JSBool
23006 0 : nsIDOMWebGLRenderingContext_CreateRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
23007 : {
23008 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23009 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23010 0 : if (!obj)
23011 0 : return JS_FALSE;
23012 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23013 : nsIDOMWebGLRenderingContext *self;
23014 0 : xpc_qsSelfRef selfref;
23015 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23016 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23017 0 : return JS_FALSE;
23018 : nsresult rv;
23019 0 : nsCOMPtr<nsIWebGLRenderbuffer> result;
23020 0 : rv = self->CreateRenderbuffer(getter_AddRefs(result));
23021 0 : if (NS_FAILED(rv))
23022 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23023 0 : if (!result) {
23024 0 : *vp = JSVAL_NULL;
23025 0 : return JS_TRUE;
23026 : }
23027 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23028 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23029 0 : return JS_TRUE;
23030 : }
23031 : // After this point do not use 'result'!
23032 0 : qsObjectHelper helper(result, cache);
23033 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLRenderbuffer), &interfaces[k_nsIWebGLRenderbuffer], vp);
23034 : }
23035 :
23036 : static JSBool
23037 0 : nsIDOMWebGLRenderingContext_CreateShader(JSContext *cx, unsigned argc, jsval *vp)
23038 : {
23039 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23040 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23041 0 : if (!obj)
23042 0 : return JS_FALSE;
23043 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23044 : nsIDOMWebGLRenderingContext *self;
23045 0 : xpc_qsSelfRef selfref;
23046 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23047 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23048 0 : return JS_FALSE;
23049 0 : if (argc < 1)
23050 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23051 0 : jsval *argv = JS_ARGV(cx, vp);
23052 : uint32_t arg0;
23053 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23054 0 : return JS_FALSE;
23055 : nsresult rv;
23056 0 : nsCOMPtr<nsIWebGLShader> result;
23057 0 : rv = self->CreateShader(arg0, getter_AddRefs(result));
23058 0 : if (NS_FAILED(rv))
23059 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23060 0 : if (!result) {
23061 0 : *vp = JSVAL_NULL;
23062 0 : return JS_TRUE;
23063 : }
23064 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23065 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23066 0 : return JS_TRUE;
23067 : }
23068 : // After this point do not use 'result'!
23069 0 : qsObjectHelper helper(result, cache);
23070 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLShader), &interfaces[k_nsIWebGLShader], vp);
23071 : }
23072 :
23073 : static JSBool
23074 0 : nsIDOMWebGLRenderingContext_CreateTexture(JSContext *cx, unsigned argc, jsval *vp)
23075 : {
23076 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23077 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23078 0 : if (!obj)
23079 0 : return JS_FALSE;
23080 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23081 : nsIDOMWebGLRenderingContext *self;
23082 0 : xpc_qsSelfRef selfref;
23083 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23084 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23085 0 : return JS_FALSE;
23086 : nsresult rv;
23087 0 : nsCOMPtr<nsIWebGLTexture> result;
23088 0 : rv = self->CreateTexture(getter_AddRefs(result));
23089 0 : if (NS_FAILED(rv))
23090 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23091 0 : if (!result) {
23092 0 : *vp = JSVAL_NULL;
23093 0 : return JS_TRUE;
23094 : }
23095 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23096 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23097 0 : return JS_TRUE;
23098 : }
23099 : // After this point do not use 'result'!
23100 0 : qsObjectHelper helper(result, cache);
23101 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLTexture), &interfaces[k_nsIWebGLTexture], vp);
23102 : }
23103 :
23104 : static JSBool
23105 0 : nsIDOMWebGLRenderingContext_CullFace(JSContext *cx, unsigned argc, jsval *vp)
23106 : {
23107 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23108 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23109 0 : if (!obj)
23110 0 : return JS_FALSE;
23111 : nsIDOMWebGLRenderingContext *self;
23112 0 : xpc_qsSelfRef selfref;
23113 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23114 0 : return JS_FALSE;
23115 0 : if (argc < 1)
23116 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23117 0 : jsval *argv = JS_ARGV(cx, vp);
23118 : uint32_t arg0;
23119 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23120 0 : return JS_FALSE;
23121 : nsresult rv;
23122 0 : rv = self->CullFace(arg0);
23123 0 : if (NS_FAILED(rv))
23124 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23125 0 : *vp = JSVAL_VOID;
23126 0 : return JS_TRUE;
23127 : }
23128 :
23129 : static JSBool
23130 0 : nsIDOMWebGLRenderingContext_DeleteBuffer(JSContext *cx, unsigned argc, jsval *vp)
23131 : {
23132 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23133 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23134 0 : if (!obj)
23135 0 : return JS_FALSE;
23136 : nsIDOMWebGLRenderingContext *self;
23137 0 : xpc_qsSelfRef selfref;
23138 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23139 0 : return JS_FALSE;
23140 0 : if (argc < 1)
23141 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23142 0 : jsval *argv = JS_ARGV(cx, vp);
23143 : nsresult rv;
23144 : nsIWebGLBuffer *arg0;
23145 0 : xpc_qsSelfRef arg0ref;
23146 0 : rv = xpc_qsUnwrapArg<nsIWebGLBuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23147 0 : if (NS_FAILED(rv)) {
23148 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23149 0 : return JS_FALSE;
23150 : }
23151 0 : rv = self->DeleteBuffer(arg0);
23152 0 : if (NS_FAILED(rv))
23153 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23154 0 : *vp = JSVAL_VOID;
23155 0 : return JS_TRUE;
23156 : }
23157 :
23158 : static JSBool
23159 0 : nsIDOMWebGLRenderingContext_DeleteProgram(JSContext *cx, unsigned argc, jsval *vp)
23160 : {
23161 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23162 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23163 0 : if (!obj)
23164 0 : return JS_FALSE;
23165 : nsIDOMWebGLRenderingContext *self;
23166 0 : xpc_qsSelfRef selfref;
23167 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23168 0 : return JS_FALSE;
23169 0 : if (argc < 1)
23170 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23171 0 : jsval *argv = JS_ARGV(cx, vp);
23172 : nsresult rv;
23173 : nsIWebGLProgram *arg0;
23174 0 : xpc_qsSelfRef arg0ref;
23175 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23176 0 : if (NS_FAILED(rv)) {
23177 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23178 0 : return JS_FALSE;
23179 : }
23180 0 : rv = self->DeleteProgram(arg0);
23181 0 : if (NS_FAILED(rv))
23182 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23183 0 : *vp = JSVAL_VOID;
23184 0 : return JS_TRUE;
23185 : }
23186 :
23187 : static JSBool
23188 0 : nsIDOMWebGLRenderingContext_DeleteFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
23189 : {
23190 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23191 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23192 0 : if (!obj)
23193 0 : return JS_FALSE;
23194 : nsIDOMWebGLRenderingContext *self;
23195 0 : xpc_qsSelfRef selfref;
23196 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23197 0 : return JS_FALSE;
23198 0 : if (argc < 1)
23199 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23200 0 : jsval *argv = JS_ARGV(cx, vp);
23201 : nsresult rv;
23202 : nsIWebGLFramebuffer *arg0;
23203 0 : xpc_qsSelfRef arg0ref;
23204 0 : rv = xpc_qsUnwrapArg<nsIWebGLFramebuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23205 0 : if (NS_FAILED(rv)) {
23206 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23207 0 : return JS_FALSE;
23208 : }
23209 0 : rv = self->DeleteFramebuffer(arg0);
23210 0 : if (NS_FAILED(rv))
23211 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23212 0 : *vp = JSVAL_VOID;
23213 0 : return JS_TRUE;
23214 : }
23215 :
23216 : static JSBool
23217 0 : nsIDOMWebGLRenderingContext_DeleteRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
23218 : {
23219 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23220 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23221 0 : if (!obj)
23222 0 : return JS_FALSE;
23223 : nsIDOMWebGLRenderingContext *self;
23224 0 : xpc_qsSelfRef selfref;
23225 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23226 0 : return JS_FALSE;
23227 0 : if (argc < 1)
23228 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23229 0 : jsval *argv = JS_ARGV(cx, vp);
23230 : nsresult rv;
23231 : nsIWebGLRenderbuffer *arg0;
23232 0 : xpc_qsSelfRef arg0ref;
23233 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23234 0 : if (NS_FAILED(rv)) {
23235 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23236 0 : return JS_FALSE;
23237 : }
23238 0 : rv = self->DeleteRenderbuffer(arg0);
23239 0 : if (NS_FAILED(rv))
23240 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23241 0 : *vp = JSVAL_VOID;
23242 0 : return JS_TRUE;
23243 : }
23244 :
23245 : static JSBool
23246 0 : nsIDOMWebGLRenderingContext_DeleteShader(JSContext *cx, unsigned argc, jsval *vp)
23247 : {
23248 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23249 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23250 0 : if (!obj)
23251 0 : return JS_FALSE;
23252 : nsIDOMWebGLRenderingContext *self;
23253 0 : xpc_qsSelfRef selfref;
23254 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23255 0 : return JS_FALSE;
23256 0 : if (argc < 1)
23257 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23258 0 : jsval *argv = JS_ARGV(cx, vp);
23259 : nsresult rv;
23260 : nsIWebGLShader *arg0;
23261 0 : xpc_qsSelfRef arg0ref;
23262 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23263 0 : if (NS_FAILED(rv)) {
23264 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23265 0 : return JS_FALSE;
23266 : }
23267 0 : rv = self->DeleteShader(arg0);
23268 0 : if (NS_FAILED(rv))
23269 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23270 0 : *vp = JSVAL_VOID;
23271 0 : return JS_TRUE;
23272 : }
23273 :
23274 : static JSBool
23275 0 : nsIDOMWebGLRenderingContext_DeleteTexture(JSContext *cx, unsigned argc, jsval *vp)
23276 : {
23277 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23278 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23279 0 : if (!obj)
23280 0 : return JS_FALSE;
23281 : nsIDOMWebGLRenderingContext *self;
23282 0 : xpc_qsSelfRef selfref;
23283 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23284 0 : return JS_FALSE;
23285 0 : if (argc < 1)
23286 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23287 0 : jsval *argv = JS_ARGV(cx, vp);
23288 : nsresult rv;
23289 : nsIWebGLTexture *arg0;
23290 0 : xpc_qsSelfRef arg0ref;
23291 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23292 0 : if (NS_FAILED(rv)) {
23293 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23294 0 : return JS_FALSE;
23295 : }
23296 0 : rv = self->DeleteTexture(arg0);
23297 0 : if (NS_FAILED(rv))
23298 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23299 0 : *vp = JSVAL_VOID;
23300 0 : return JS_TRUE;
23301 : }
23302 :
23303 : static JSBool
23304 0 : nsIDOMWebGLRenderingContext_DepthFunc(JSContext *cx, unsigned argc, jsval *vp)
23305 : {
23306 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23307 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23308 0 : if (!obj)
23309 0 : return JS_FALSE;
23310 : nsIDOMWebGLRenderingContext *self;
23311 0 : xpc_qsSelfRef selfref;
23312 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23313 0 : return JS_FALSE;
23314 0 : if (argc < 1)
23315 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23316 0 : jsval *argv = JS_ARGV(cx, vp);
23317 : uint32_t arg0;
23318 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23319 0 : return JS_FALSE;
23320 : nsresult rv;
23321 0 : rv = self->DepthFunc(arg0);
23322 0 : if (NS_FAILED(rv))
23323 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23324 0 : *vp = JSVAL_VOID;
23325 0 : return JS_TRUE;
23326 : }
23327 :
23328 : static JSBool
23329 0 : nsIDOMWebGLRenderingContext_DepthMask(JSContext *cx, unsigned argc, jsval *vp)
23330 : {
23331 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23332 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23333 0 : if (!obj)
23334 0 : return JS_FALSE;
23335 : nsIDOMWebGLRenderingContext *self;
23336 0 : xpc_qsSelfRef selfref;
23337 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23338 0 : return JS_FALSE;
23339 0 : if (argc < 1)
23340 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23341 0 : jsval *argv = JS_ARGV(cx, vp);
23342 : JSBool arg0;
23343 0 : JS_ValueToBoolean(cx, argv[0], &arg0);
23344 : nsresult rv;
23345 0 : rv = self->DepthMask(arg0);
23346 0 : if (NS_FAILED(rv))
23347 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23348 0 : *vp = JSVAL_VOID;
23349 0 : return JS_TRUE;
23350 : }
23351 :
23352 : static JSBool
23353 0 : nsIDOMWebGLRenderingContext_DepthRange(JSContext *cx, unsigned argc, jsval *vp)
23354 : {
23355 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23356 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23357 0 : if (!obj)
23358 0 : return JS_FALSE;
23359 : nsIDOMWebGLRenderingContext *self;
23360 0 : xpc_qsSelfRef selfref;
23361 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23362 0 : return JS_FALSE;
23363 0 : if (argc < 2)
23364 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23365 0 : jsval *argv = JS_ARGV(cx, vp);
23366 : double arg0_dbl;
23367 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
23368 0 : return JS_FALSE;
23369 0 : float arg0 = (float) arg0_dbl;
23370 : double arg1_dbl;
23371 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
23372 0 : return JS_FALSE;
23373 0 : float arg1 = (float) arg1_dbl;
23374 : nsresult rv;
23375 0 : rv = self->DepthRange(arg0, arg1);
23376 0 : if (NS_FAILED(rv))
23377 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23378 0 : *vp = JSVAL_VOID;
23379 0 : return JS_TRUE;
23380 : }
23381 :
23382 : static JSBool
23383 0 : nsIDOMWebGLRenderingContext_DetachShader(JSContext *cx, unsigned argc, jsval *vp)
23384 : {
23385 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23386 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23387 0 : if (!obj)
23388 0 : return JS_FALSE;
23389 : nsIDOMWebGLRenderingContext *self;
23390 0 : xpc_qsSelfRef selfref;
23391 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23392 0 : return JS_FALSE;
23393 0 : if (argc < 2)
23394 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23395 0 : jsval *argv = JS_ARGV(cx, vp);
23396 : nsresult rv;
23397 : nsIWebGLProgram *arg0;
23398 0 : xpc_qsSelfRef arg0ref;
23399 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23400 0 : if (NS_FAILED(rv)) {
23401 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23402 0 : return JS_FALSE;
23403 : }
23404 : nsIWebGLShader *arg1;
23405 0 : xpc_qsSelfRef arg1ref;
23406 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
23407 0 : if (NS_FAILED(rv)) {
23408 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
23409 0 : return JS_FALSE;
23410 : }
23411 0 : rv = self->DetachShader(arg0, arg1);
23412 0 : if (NS_FAILED(rv))
23413 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23414 0 : *vp = JSVAL_VOID;
23415 0 : return JS_TRUE;
23416 : }
23417 :
23418 : static JSBool
23419 0 : nsIDOMWebGLRenderingContext_Disable(JSContext *cx, unsigned argc, jsval *vp)
23420 : {
23421 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23422 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23423 0 : if (!obj)
23424 0 : return JS_FALSE;
23425 : nsIDOMWebGLRenderingContext *self;
23426 0 : xpc_qsSelfRef selfref;
23427 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23428 0 : return JS_FALSE;
23429 0 : if (argc < 1)
23430 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23431 0 : jsval *argv = JS_ARGV(cx, vp);
23432 : uint32_t arg0;
23433 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23434 0 : return JS_FALSE;
23435 : nsresult rv;
23436 0 : rv = self->Disable(arg0);
23437 0 : if (NS_FAILED(rv))
23438 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23439 0 : *vp = JSVAL_VOID;
23440 0 : return JS_TRUE;
23441 : }
23442 :
23443 : static JSBool
23444 0 : nsIDOMWebGLRenderingContext_DisableVertexAttribArray(JSContext *cx, unsigned argc, jsval *vp)
23445 : {
23446 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23447 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23448 0 : if (!obj)
23449 0 : return JS_FALSE;
23450 : nsIDOMWebGLRenderingContext *self;
23451 0 : xpc_qsSelfRef selfref;
23452 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23453 0 : return JS_FALSE;
23454 0 : if (argc < 1)
23455 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23456 0 : jsval *argv = JS_ARGV(cx, vp);
23457 : uint32_t arg0;
23458 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23459 0 : return JS_FALSE;
23460 : nsresult rv;
23461 0 : rv = self->DisableVertexAttribArray(arg0);
23462 0 : if (NS_FAILED(rv))
23463 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23464 0 : *vp = JSVAL_VOID;
23465 0 : return JS_TRUE;
23466 : }
23467 :
23468 : static JSBool
23469 0 : nsIDOMWebGLRenderingContext_DrawArrays(JSContext *cx, unsigned argc, jsval *vp)
23470 : {
23471 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23472 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23473 0 : if (!obj)
23474 0 : return JS_FALSE;
23475 : nsIDOMWebGLRenderingContext *self;
23476 0 : xpc_qsSelfRef selfref;
23477 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23478 0 : return JS_FALSE;
23479 0 : if (argc < 3)
23480 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23481 0 : jsval *argv = JS_ARGV(cx, vp);
23482 : uint32_t arg0;
23483 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23484 0 : return JS_FALSE;
23485 : int32_t arg1;
23486 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
23487 0 : return JS_FALSE;
23488 : int32_t arg2;
23489 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
23490 0 : return JS_FALSE;
23491 : nsresult rv;
23492 0 : rv = self->DrawArrays(arg0, arg1, arg2);
23493 0 : if (NS_FAILED(rv))
23494 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23495 0 : *vp = JSVAL_VOID;
23496 0 : return JS_TRUE;
23497 : }
23498 :
23499 : static JSBool
23500 0 : nsIDOMWebGLRenderingContext_DrawElements(JSContext *cx, unsigned argc, jsval *vp)
23501 : {
23502 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23503 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23504 0 : if (!obj)
23505 0 : return JS_FALSE;
23506 : nsIDOMWebGLRenderingContext *self;
23507 0 : xpc_qsSelfRef selfref;
23508 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23509 0 : return JS_FALSE;
23510 0 : if (argc < 4)
23511 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23512 0 : jsval *argv = JS_ARGV(cx, vp);
23513 : uint32_t arg0;
23514 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23515 0 : return JS_FALSE;
23516 : int32_t arg1;
23517 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
23518 0 : return JS_FALSE;
23519 : uint32_t arg2;
23520 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
23521 0 : return JS_FALSE;
23522 : int32_t arg3;
23523 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
23524 0 : return JS_FALSE;
23525 : nsresult rv;
23526 0 : rv = self->DrawElements(arg0, arg1, arg2, arg3);
23527 0 : if (NS_FAILED(rv))
23528 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23529 0 : *vp = JSVAL_VOID;
23530 0 : return JS_TRUE;
23531 : }
23532 :
23533 : static JSBool
23534 0 : nsIDOMWebGLRenderingContext_Enable(JSContext *cx, unsigned argc, jsval *vp)
23535 : {
23536 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23537 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23538 0 : if (!obj)
23539 0 : return JS_FALSE;
23540 : nsIDOMWebGLRenderingContext *self;
23541 0 : xpc_qsSelfRef selfref;
23542 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23543 0 : return JS_FALSE;
23544 0 : if (argc < 1)
23545 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23546 0 : jsval *argv = JS_ARGV(cx, vp);
23547 : uint32_t arg0;
23548 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23549 0 : return JS_FALSE;
23550 : nsresult rv;
23551 0 : rv = self->Enable(arg0);
23552 0 : if (NS_FAILED(rv))
23553 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23554 0 : *vp = JSVAL_VOID;
23555 0 : return JS_TRUE;
23556 : }
23557 :
23558 : static JSBool
23559 0 : nsIDOMWebGLRenderingContext_EnableVertexAttribArray(JSContext *cx, unsigned argc, jsval *vp)
23560 : {
23561 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23562 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23563 0 : if (!obj)
23564 0 : return JS_FALSE;
23565 : nsIDOMWebGLRenderingContext *self;
23566 0 : xpc_qsSelfRef selfref;
23567 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23568 0 : return JS_FALSE;
23569 0 : if (argc < 1)
23570 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23571 0 : jsval *argv = JS_ARGV(cx, vp);
23572 : uint32_t arg0;
23573 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23574 0 : return JS_FALSE;
23575 : nsresult rv;
23576 0 : rv = self->EnableVertexAttribArray(arg0);
23577 0 : if (NS_FAILED(rv))
23578 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23579 0 : *vp = JSVAL_VOID;
23580 0 : return JS_TRUE;
23581 : }
23582 :
23583 : static JSBool
23584 0 : nsIDOMWebGLRenderingContext_Finish(JSContext *cx, unsigned argc, jsval *vp)
23585 : {
23586 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23587 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23588 0 : if (!obj)
23589 0 : return JS_FALSE;
23590 : nsIDOMWebGLRenderingContext *self;
23591 0 : xpc_qsSelfRef selfref;
23592 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23593 0 : return JS_FALSE;
23594 : nsresult rv;
23595 0 : rv = self->Finish();
23596 0 : if (NS_FAILED(rv))
23597 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23598 0 : *vp = JSVAL_VOID;
23599 0 : return JS_TRUE;
23600 : }
23601 :
23602 : static JSBool
23603 0 : nsIDOMWebGLRenderingContext_Flush(JSContext *cx, unsigned argc, jsval *vp)
23604 : {
23605 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23606 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23607 0 : if (!obj)
23608 0 : return JS_FALSE;
23609 : nsIDOMWebGLRenderingContext *self;
23610 0 : xpc_qsSelfRef selfref;
23611 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23612 0 : return JS_FALSE;
23613 : nsresult rv;
23614 0 : rv = self->Flush();
23615 0 : if (NS_FAILED(rv))
23616 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23617 0 : *vp = JSVAL_VOID;
23618 0 : return JS_TRUE;
23619 : }
23620 :
23621 : static JSBool
23622 0 : nsIDOMWebGLRenderingContext_FramebufferRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
23623 : {
23624 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23625 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23626 0 : if (!obj)
23627 0 : return JS_FALSE;
23628 : nsIDOMWebGLRenderingContext *self;
23629 0 : xpc_qsSelfRef selfref;
23630 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23631 0 : return JS_FALSE;
23632 0 : if (argc < 4)
23633 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23634 0 : jsval *argv = JS_ARGV(cx, vp);
23635 : uint32_t arg0;
23636 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23637 0 : return JS_FALSE;
23638 : uint32_t arg1;
23639 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23640 0 : return JS_FALSE;
23641 : uint32_t arg2;
23642 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
23643 0 : return JS_FALSE;
23644 : nsresult rv;
23645 : nsIWebGLRenderbuffer *arg3;
23646 0 : xpc_qsSelfRef arg3ref;
23647 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
23648 0 : if (NS_FAILED(rv)) {
23649 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
23650 0 : return JS_FALSE;
23651 : }
23652 0 : rv = self->FramebufferRenderbuffer(arg0, arg1, arg2, arg3);
23653 0 : if (NS_FAILED(rv))
23654 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23655 0 : *vp = JSVAL_VOID;
23656 0 : return JS_TRUE;
23657 : }
23658 :
23659 : static JSBool
23660 0 : nsIDOMWebGLRenderingContext_FramebufferTexture2D(JSContext *cx, unsigned argc, jsval *vp)
23661 : {
23662 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23663 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23664 0 : if (!obj)
23665 0 : return JS_FALSE;
23666 : nsIDOMWebGLRenderingContext *self;
23667 0 : xpc_qsSelfRef selfref;
23668 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23669 0 : return JS_FALSE;
23670 0 : if (argc < 5)
23671 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23672 0 : jsval *argv = JS_ARGV(cx, vp);
23673 : uint32_t arg0;
23674 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23675 0 : return JS_FALSE;
23676 : uint32_t arg1;
23677 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23678 0 : return JS_FALSE;
23679 : uint32_t arg2;
23680 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
23681 0 : return JS_FALSE;
23682 : nsresult rv;
23683 : nsIWebGLTexture *arg3;
23684 0 : xpc_qsSelfRef arg3ref;
23685 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(cx, argv[3], &arg3, &arg3ref.ptr, &argv[3]);
23686 0 : if (NS_FAILED(rv)) {
23687 0 : xpc_qsThrowBadArg(cx, rv, vp, 3);
23688 0 : return JS_FALSE;
23689 : }
23690 : int32_t arg4;
23691 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
23692 0 : return JS_FALSE;
23693 0 : rv = self->FramebufferTexture2D(arg0, arg1, arg2, arg3, arg4);
23694 0 : if (NS_FAILED(rv))
23695 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23696 0 : *vp = JSVAL_VOID;
23697 0 : return JS_TRUE;
23698 : }
23699 :
23700 : static JSBool
23701 0 : nsIDOMWebGLRenderingContext_FrontFace(JSContext *cx, unsigned argc, jsval *vp)
23702 : {
23703 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23704 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23705 0 : if (!obj)
23706 0 : return JS_FALSE;
23707 : nsIDOMWebGLRenderingContext *self;
23708 0 : xpc_qsSelfRef selfref;
23709 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23710 0 : return JS_FALSE;
23711 0 : if (argc < 1)
23712 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23713 0 : jsval *argv = JS_ARGV(cx, vp);
23714 : uint32_t arg0;
23715 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23716 0 : return JS_FALSE;
23717 : nsresult rv;
23718 0 : rv = self->FrontFace(arg0);
23719 0 : if (NS_FAILED(rv))
23720 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23721 0 : *vp = JSVAL_VOID;
23722 0 : return JS_TRUE;
23723 : }
23724 :
23725 : static JSBool
23726 0 : nsIDOMWebGLRenderingContext_GenerateMipmap(JSContext *cx, unsigned argc, jsval *vp)
23727 : {
23728 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23729 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23730 0 : if (!obj)
23731 0 : return JS_FALSE;
23732 : nsIDOMWebGLRenderingContext *self;
23733 0 : xpc_qsSelfRef selfref;
23734 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23735 0 : return JS_FALSE;
23736 0 : if (argc < 1)
23737 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23738 0 : jsval *argv = JS_ARGV(cx, vp);
23739 : uint32_t arg0;
23740 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23741 0 : return JS_FALSE;
23742 : nsresult rv;
23743 0 : rv = self->GenerateMipmap(arg0);
23744 0 : if (NS_FAILED(rv))
23745 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23746 0 : *vp = JSVAL_VOID;
23747 0 : return JS_TRUE;
23748 : }
23749 :
23750 : static JSBool
23751 0 : nsIDOMWebGLRenderingContext_GetActiveAttrib(JSContext *cx, unsigned argc, jsval *vp)
23752 : {
23753 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23754 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23755 0 : if (!obj)
23756 0 : return JS_FALSE;
23757 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23758 : nsIDOMWebGLRenderingContext *self;
23759 0 : xpc_qsSelfRef selfref;
23760 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23761 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23762 0 : return JS_FALSE;
23763 0 : if (argc < 2)
23764 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23765 0 : jsval *argv = JS_ARGV(cx, vp);
23766 : nsresult rv;
23767 : nsIWebGLProgram *arg0;
23768 0 : xpc_qsSelfRef arg0ref;
23769 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23770 0 : if (NS_FAILED(rv)) {
23771 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23772 0 : return JS_FALSE;
23773 : }
23774 : uint32_t arg1;
23775 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23776 0 : return JS_FALSE;
23777 0 : nsCOMPtr<nsIWebGLActiveInfo> result;
23778 0 : rv = self->GetActiveAttrib(arg0, arg1, getter_AddRefs(result));
23779 0 : if (NS_FAILED(rv))
23780 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23781 0 : if (!result) {
23782 0 : *vp = JSVAL_NULL;
23783 0 : return JS_TRUE;
23784 : }
23785 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23786 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23787 0 : return JS_TRUE;
23788 : }
23789 : // After this point do not use 'result'!
23790 0 : qsObjectHelper helper(result, cache);
23791 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLActiveInfo), &interfaces[k_nsIWebGLActiveInfo], vp);
23792 : }
23793 :
23794 : static JSBool
23795 0 : nsIDOMWebGLRenderingContext_GetActiveUniform(JSContext *cx, unsigned argc, jsval *vp)
23796 : {
23797 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23798 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23799 0 : if (!obj)
23800 0 : return JS_FALSE;
23801 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23802 : nsIDOMWebGLRenderingContext *self;
23803 0 : xpc_qsSelfRef selfref;
23804 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23805 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23806 0 : return JS_FALSE;
23807 0 : if (argc < 2)
23808 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23809 0 : jsval *argv = JS_ARGV(cx, vp);
23810 : nsresult rv;
23811 : nsIWebGLProgram *arg0;
23812 0 : xpc_qsSelfRef arg0ref;
23813 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23814 0 : if (NS_FAILED(rv)) {
23815 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23816 0 : return JS_FALSE;
23817 : }
23818 : uint32_t arg1;
23819 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23820 0 : return JS_FALSE;
23821 0 : nsCOMPtr<nsIWebGLActiveInfo> result;
23822 0 : rv = self->GetActiveUniform(arg0, arg1, getter_AddRefs(result));
23823 0 : if (NS_FAILED(rv))
23824 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23825 0 : if (!result) {
23826 0 : *vp = JSVAL_NULL;
23827 0 : return JS_TRUE;
23828 : }
23829 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
23830 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
23831 0 : return JS_TRUE;
23832 : }
23833 : // After this point do not use 'result'!
23834 0 : qsObjectHelper helper(result, cache);
23835 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLActiveInfo), &interfaces[k_nsIWebGLActiveInfo], vp);
23836 : }
23837 :
23838 : static JSBool
23839 0 : nsIDOMWebGLRenderingContext_GetAttachedShaders(JSContext *cx, unsigned argc, jsval *vp)
23840 : {
23841 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23842 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23843 0 : if (!obj)
23844 0 : return JS_FALSE;
23845 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23846 : nsIDOMWebGLRenderingContext *self;
23847 0 : xpc_qsSelfRef selfref;
23848 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23849 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23850 0 : return JS_FALSE;
23851 0 : if (argc < 1)
23852 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23853 0 : jsval *argv = JS_ARGV(cx, vp);
23854 : nsresult rv;
23855 : nsIWebGLProgram *arg0;
23856 0 : xpc_qsSelfRef arg0ref;
23857 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23858 0 : if (NS_FAILED(rv)) {
23859 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23860 0 : return JS_FALSE;
23861 : }
23862 0 : nsCOMPtr<nsIVariant> result;
23863 0 : rv = self->GetAttachedShaders(arg0, getter_AddRefs(result));
23864 0 : if (NS_FAILED(rv))
23865 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23866 0 : return xpc_qsVariantToJsval(lccx, result, vp);
23867 : }
23868 :
23869 : static JSBool
23870 0 : nsIDOMWebGLRenderingContext_GetAttribLocation(JSContext *cx, unsigned argc, jsval *vp)
23871 : {
23872 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23873 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23874 0 : if (!obj)
23875 0 : return JS_FALSE;
23876 : nsIDOMWebGLRenderingContext *self;
23877 0 : xpc_qsSelfRef selfref;
23878 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23879 0 : return JS_FALSE;
23880 0 : if (argc < 2)
23881 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23882 0 : jsval *argv = JS_ARGV(cx, vp);
23883 : nsresult rv;
23884 : nsIWebGLProgram *arg0;
23885 0 : xpc_qsSelfRef arg0ref;
23886 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
23887 0 : if (NS_FAILED(rv)) {
23888 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
23889 0 : return JS_FALSE;
23890 : }
23891 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
23892 : xpc_qsDOMString::eDefaultNullBehavior,
23893 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
23894 0 : if (!arg1.IsValid())
23895 0 : return JS_FALSE;
23896 : WebGLint result;
23897 0 : rv = self->GetAttribLocation(arg0, arg1, &result);
23898 0 : if (NS_FAILED(rv))
23899 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23900 0 : *vp = INT_TO_JSVAL(result);
23901 0 : return JS_TRUE;
23902 : }
23903 :
23904 : static JSBool
23905 0 : nsIDOMWebGLRenderingContext_GetParameter(JSContext *cx, unsigned argc, jsval *vp)
23906 : {
23907 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23908 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23909 0 : if (!obj)
23910 0 : return JS_FALSE;
23911 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23912 : nsIDOMWebGLRenderingContext *self;
23913 0 : xpc_qsSelfRef selfref;
23914 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23915 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23916 0 : return JS_FALSE;
23917 0 : if (argc < 1)
23918 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23919 0 : jsval *argv = JS_ARGV(cx, vp);
23920 : uint32_t arg0;
23921 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23922 0 : return JS_FALSE;
23923 : nsresult rv;
23924 0 : nsCOMPtr<nsIVariant> result;
23925 0 : rv = self->GetParameter(arg0, getter_AddRefs(result));
23926 0 : if (NS_FAILED(rv))
23927 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23928 0 : return xpc_qsVariantToJsval(lccx, result, vp);
23929 : }
23930 :
23931 : static JSBool
23932 0 : nsIDOMWebGLRenderingContext_GetBufferParameter(JSContext *cx, unsigned argc, jsval *vp)
23933 : {
23934 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23935 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23936 0 : if (!obj)
23937 0 : return JS_FALSE;
23938 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23939 : nsIDOMWebGLRenderingContext *self;
23940 0 : xpc_qsSelfRef selfref;
23941 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23942 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23943 0 : return JS_FALSE;
23944 0 : if (argc < 2)
23945 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23946 0 : jsval *argv = JS_ARGV(cx, vp);
23947 : uint32_t arg0;
23948 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23949 0 : return JS_FALSE;
23950 : uint32_t arg1;
23951 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
23952 0 : return JS_FALSE;
23953 : nsresult rv;
23954 0 : nsCOMPtr<nsIVariant> result;
23955 0 : rv = self->GetBufferParameter(arg0, arg1, getter_AddRefs(result));
23956 0 : if (NS_FAILED(rv))
23957 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23958 0 : return xpc_qsVariantToJsval(lccx, result, vp);
23959 : }
23960 :
23961 : static JSBool
23962 0 : nsIDOMWebGLRenderingContext_GetError(JSContext *cx, unsigned argc, jsval *vp)
23963 : {
23964 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23965 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23966 0 : if (!obj)
23967 0 : return JS_FALSE;
23968 : nsIDOMWebGLRenderingContext *self;
23969 0 : xpc_qsSelfRef selfref;
23970 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
23971 0 : return JS_FALSE;
23972 : nsresult rv;
23973 : WebGLenum result;
23974 0 : rv = self->GetError(&result);
23975 0 : if (NS_FAILED(rv))
23976 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
23977 0 : *vp = UINT_TO_JSVAL(result);
23978 0 : return JS_TRUE;
23979 : }
23980 :
23981 : static JSBool
23982 0 : nsIDOMWebGLRenderingContext_GetFramebufferAttachmentParameter(JSContext *cx, unsigned argc, jsval *vp)
23983 : {
23984 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
23985 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
23986 0 : if (!obj)
23987 0 : return JS_FALSE;
23988 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
23989 : nsIDOMWebGLRenderingContext *self;
23990 0 : xpc_qsSelfRef selfref;
23991 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
23992 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
23993 0 : return JS_FALSE;
23994 0 : if (argc < 3)
23995 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
23996 0 : jsval *argv = JS_ARGV(cx, vp);
23997 : uint32_t arg0;
23998 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
23999 0 : return JS_FALSE;
24000 : uint32_t arg1;
24001 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24002 0 : return JS_FALSE;
24003 : uint32_t arg2;
24004 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
24005 0 : return JS_FALSE;
24006 : nsresult rv;
24007 0 : nsCOMPtr<nsIVariant> result;
24008 0 : rv = self->GetFramebufferAttachmentParameter(arg0, arg1, arg2, getter_AddRefs(result));
24009 0 : if (NS_FAILED(rv))
24010 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24011 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24012 : }
24013 :
24014 : static JSBool
24015 0 : nsIDOMWebGLRenderingContext_GetProgramParameter(JSContext *cx, unsigned argc, jsval *vp)
24016 : {
24017 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24018 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24019 0 : if (!obj)
24020 0 : return JS_FALSE;
24021 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24022 : nsIDOMWebGLRenderingContext *self;
24023 0 : xpc_qsSelfRef selfref;
24024 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24025 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24026 0 : return JS_FALSE;
24027 0 : if (argc < 2)
24028 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24029 0 : jsval *argv = JS_ARGV(cx, vp);
24030 : nsresult rv;
24031 : nsIWebGLProgram *arg0;
24032 0 : xpc_qsSelfRef arg0ref;
24033 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24034 0 : if (NS_FAILED(rv)) {
24035 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24036 0 : return JS_FALSE;
24037 : }
24038 : uint32_t arg1;
24039 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24040 0 : return JS_FALSE;
24041 0 : nsCOMPtr<nsIVariant> result;
24042 0 : rv = self->GetProgramParameter(arg0, arg1, getter_AddRefs(result));
24043 0 : if (NS_FAILED(rv))
24044 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24045 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24046 : }
24047 :
24048 : static JSBool
24049 0 : nsIDOMWebGLRenderingContext_GetProgramInfoLog(JSContext *cx, unsigned argc, jsval *vp)
24050 : {
24051 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24052 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24053 0 : if (!obj)
24054 0 : return JS_FALSE;
24055 : nsIDOMWebGLRenderingContext *self;
24056 0 : xpc_qsSelfRef selfref;
24057 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24058 0 : return JS_FALSE;
24059 0 : if (argc < 1)
24060 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24061 0 : jsval *argv = JS_ARGV(cx, vp);
24062 : nsresult rv;
24063 : nsIWebGLProgram *arg0;
24064 0 : xpc_qsSelfRef arg0ref;
24065 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24066 0 : if (NS_FAILED(rv)) {
24067 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24068 0 : return JS_FALSE;
24069 : }
24070 0 : nsString result;
24071 0 : rv = self->GetProgramInfoLog(arg0, result);
24072 0 : if (NS_FAILED(rv))
24073 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24074 0 : return xpc::StringToJsval(cx, result, vp);
24075 : }
24076 :
24077 : static JSBool
24078 0 : nsIDOMWebGLRenderingContext_GetRenderbufferParameter(JSContext *cx, unsigned argc, jsval *vp)
24079 : {
24080 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24081 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24082 0 : if (!obj)
24083 0 : return JS_FALSE;
24084 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24085 : nsIDOMWebGLRenderingContext *self;
24086 0 : xpc_qsSelfRef selfref;
24087 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24088 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24089 0 : return JS_FALSE;
24090 0 : if (argc < 2)
24091 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24092 0 : jsval *argv = JS_ARGV(cx, vp);
24093 : uint32_t arg0;
24094 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24095 0 : return JS_FALSE;
24096 : uint32_t arg1;
24097 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24098 0 : return JS_FALSE;
24099 : nsresult rv;
24100 0 : nsCOMPtr<nsIVariant> result;
24101 0 : rv = self->GetRenderbufferParameter(arg0, arg1, getter_AddRefs(result));
24102 0 : if (NS_FAILED(rv))
24103 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24104 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24105 : }
24106 :
24107 : static JSBool
24108 0 : nsIDOMWebGLRenderingContext_GetShaderParameter(JSContext *cx, unsigned argc, jsval *vp)
24109 : {
24110 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24111 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24112 0 : if (!obj)
24113 0 : return JS_FALSE;
24114 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24115 : nsIDOMWebGLRenderingContext *self;
24116 0 : xpc_qsSelfRef selfref;
24117 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24118 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24119 0 : return JS_FALSE;
24120 0 : if (argc < 2)
24121 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24122 0 : jsval *argv = JS_ARGV(cx, vp);
24123 : nsresult rv;
24124 : nsIWebGLShader *arg0;
24125 0 : xpc_qsSelfRef arg0ref;
24126 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24127 0 : if (NS_FAILED(rv)) {
24128 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24129 0 : return JS_FALSE;
24130 : }
24131 : uint32_t arg1;
24132 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24133 0 : return JS_FALSE;
24134 0 : nsCOMPtr<nsIVariant> result;
24135 0 : rv = self->GetShaderParameter(arg0, arg1, getter_AddRefs(result));
24136 0 : if (NS_FAILED(rv))
24137 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24138 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24139 : }
24140 :
24141 : static JSBool
24142 0 : nsIDOMWebGLRenderingContext_GetShaderInfoLog(JSContext *cx, unsigned argc, jsval *vp)
24143 : {
24144 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24145 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24146 0 : if (!obj)
24147 0 : return JS_FALSE;
24148 : nsIDOMWebGLRenderingContext *self;
24149 0 : xpc_qsSelfRef selfref;
24150 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24151 0 : return JS_FALSE;
24152 0 : if (argc < 1)
24153 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24154 0 : jsval *argv = JS_ARGV(cx, vp);
24155 : nsresult rv;
24156 : nsIWebGLShader *arg0;
24157 0 : xpc_qsSelfRef arg0ref;
24158 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24159 0 : if (NS_FAILED(rv)) {
24160 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24161 0 : return JS_FALSE;
24162 : }
24163 0 : nsString result;
24164 0 : rv = self->GetShaderInfoLog(arg0, result);
24165 0 : if (NS_FAILED(rv))
24166 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24167 0 : return xpc::StringToJsval(cx, result, vp);
24168 : }
24169 :
24170 : static JSBool
24171 0 : nsIDOMWebGLRenderingContext_GetShaderPrecisionFormat(JSContext *cx, unsigned argc, jsval *vp)
24172 : {
24173 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24174 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24175 0 : if (!obj)
24176 0 : return JS_FALSE;
24177 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24178 : nsIDOMWebGLRenderingContext *self;
24179 0 : xpc_qsSelfRef selfref;
24180 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24181 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24182 0 : return JS_FALSE;
24183 0 : if (argc < 2)
24184 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24185 0 : jsval *argv = JS_ARGV(cx, vp);
24186 : uint32_t arg0;
24187 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24188 0 : return JS_FALSE;
24189 : uint32_t arg1;
24190 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24191 0 : return JS_FALSE;
24192 : nsresult rv;
24193 0 : nsCOMPtr<nsIWebGLShaderPrecisionFormat> result;
24194 0 : rv = self->GetShaderPrecisionFormat(arg0, arg1, getter_AddRefs(result));
24195 0 : if (NS_FAILED(rv))
24196 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24197 0 : if (!result) {
24198 0 : *vp = JSVAL_NULL;
24199 0 : return JS_TRUE;
24200 : }
24201 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
24202 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
24203 0 : return JS_TRUE;
24204 : }
24205 : // After this point do not use 'result'!
24206 0 : qsObjectHelper helper(result, cache);
24207 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLShaderPrecisionFormat), &interfaces[k_nsIWebGLShaderPrecisionFormat], vp);
24208 : }
24209 :
24210 : static JSBool
24211 0 : nsIDOMWebGLRenderingContext_GetShaderSource(JSContext *cx, unsigned argc, jsval *vp)
24212 : {
24213 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24214 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24215 0 : if (!obj)
24216 0 : return JS_FALSE;
24217 : nsIDOMWebGLRenderingContext *self;
24218 0 : xpc_qsSelfRef selfref;
24219 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24220 0 : return JS_FALSE;
24221 0 : if (argc < 1)
24222 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24223 0 : jsval *argv = JS_ARGV(cx, vp);
24224 : nsresult rv;
24225 : nsIWebGLShader *arg0;
24226 0 : xpc_qsSelfRef arg0ref;
24227 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24228 0 : if (NS_FAILED(rv)) {
24229 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24230 0 : return JS_FALSE;
24231 : }
24232 0 : nsString result;
24233 0 : rv = self->GetShaderSource(arg0, result);
24234 0 : if (NS_FAILED(rv))
24235 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24236 0 : return xpc::StringToJsval(cx, result, vp);
24237 : }
24238 :
24239 : static JSBool
24240 0 : nsIDOMWebGLRenderingContext_GetTexParameter(JSContext *cx, unsigned argc, jsval *vp)
24241 : {
24242 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24243 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24244 0 : if (!obj)
24245 0 : return JS_FALSE;
24246 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24247 : nsIDOMWebGLRenderingContext *self;
24248 0 : xpc_qsSelfRef selfref;
24249 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24250 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24251 0 : return JS_FALSE;
24252 0 : if (argc < 2)
24253 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24254 0 : jsval *argv = JS_ARGV(cx, vp);
24255 : uint32_t arg0;
24256 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24257 0 : return JS_FALSE;
24258 : uint32_t arg1;
24259 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24260 0 : return JS_FALSE;
24261 : nsresult rv;
24262 0 : nsCOMPtr<nsIVariant> result;
24263 0 : rv = self->GetTexParameter(arg0, arg1, getter_AddRefs(result));
24264 0 : if (NS_FAILED(rv))
24265 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24266 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24267 : }
24268 :
24269 : static JSBool
24270 0 : nsIDOMWebGLRenderingContext_GetUniform(JSContext *cx, unsigned argc, jsval *vp)
24271 : {
24272 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24273 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24274 0 : if (!obj)
24275 0 : return JS_FALSE;
24276 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24277 : nsIDOMWebGLRenderingContext *self;
24278 0 : xpc_qsSelfRef selfref;
24279 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24280 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24281 0 : return JS_FALSE;
24282 0 : if (argc < 2)
24283 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24284 0 : jsval *argv = JS_ARGV(cx, vp);
24285 : nsresult rv;
24286 : nsIWebGLProgram *arg0;
24287 0 : xpc_qsSelfRef arg0ref;
24288 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24289 0 : if (NS_FAILED(rv)) {
24290 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24291 0 : return JS_FALSE;
24292 : }
24293 : nsIWebGLUniformLocation *arg1;
24294 0 : xpc_qsSelfRef arg1ref;
24295 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
24296 0 : if (NS_FAILED(rv)) {
24297 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
24298 0 : return JS_FALSE;
24299 : }
24300 0 : nsCOMPtr<nsIVariant> result;
24301 0 : rv = self->GetUniform(arg0, arg1, getter_AddRefs(result));
24302 0 : if (NS_FAILED(rv))
24303 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24304 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24305 : }
24306 :
24307 : static JSBool
24308 0 : nsIDOMWebGLRenderingContext_GetUniformLocation(JSContext *cx, unsigned argc, jsval *vp)
24309 : {
24310 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24311 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24312 0 : if (!obj)
24313 0 : return JS_FALSE;
24314 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24315 : nsIDOMWebGLRenderingContext *self;
24316 0 : xpc_qsSelfRef selfref;
24317 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24318 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24319 0 : return JS_FALSE;
24320 0 : if (argc < 2)
24321 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24322 0 : jsval *argv = JS_ARGV(cx, vp);
24323 : nsresult rv;
24324 : nsIWebGLProgram *arg0;
24325 0 : xpc_qsSelfRef arg0ref;
24326 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24327 0 : if (NS_FAILED(rv)) {
24328 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24329 0 : return JS_FALSE;
24330 : }
24331 0 : xpc_qsDOMString arg1(cx, argv[1], &argv[1],
24332 : xpc_qsDOMString::eDefaultNullBehavior,
24333 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
24334 0 : if (!arg1.IsValid())
24335 0 : return JS_FALSE;
24336 0 : nsCOMPtr<nsIWebGLUniformLocation> result;
24337 0 : rv = self->GetUniformLocation(arg0, arg1, getter_AddRefs(result));
24338 0 : if (NS_FAILED(rv))
24339 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24340 0 : if (!result) {
24341 0 : *vp = JSVAL_NULL;
24342 0 : return JS_TRUE;
24343 : }
24344 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
24345 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
24346 0 : return JS_TRUE;
24347 : }
24348 : // After this point do not use 'result'!
24349 0 : qsObjectHelper helper(result, cache);
24350 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLUniformLocation), &interfaces[k_nsIWebGLUniformLocation], vp);
24351 : }
24352 :
24353 : static JSBool
24354 0 : nsIDOMWebGLRenderingContext_GetVertexAttrib(JSContext *cx, unsigned argc, jsval *vp)
24355 : {
24356 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24357 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24358 0 : if (!obj)
24359 0 : return JS_FALSE;
24360 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
24361 : nsIDOMWebGLRenderingContext *self;
24362 0 : xpc_qsSelfRef selfref;
24363 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
24364 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
24365 0 : return JS_FALSE;
24366 0 : if (argc < 2)
24367 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24368 0 : jsval *argv = JS_ARGV(cx, vp);
24369 : uint32_t arg0;
24370 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24371 0 : return JS_FALSE;
24372 : uint32_t arg1;
24373 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24374 0 : return JS_FALSE;
24375 : nsresult rv;
24376 0 : nsCOMPtr<nsIVariant> result;
24377 0 : rv = self->GetVertexAttrib(arg0, arg1, getter_AddRefs(result));
24378 0 : if (NS_FAILED(rv))
24379 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24380 0 : return xpc_qsVariantToJsval(lccx, result, vp);
24381 : }
24382 :
24383 : static JSBool
24384 0 : nsIDOMWebGLRenderingContext_GetVertexAttribOffset(JSContext *cx, unsigned argc, jsval *vp)
24385 : {
24386 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24387 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24388 0 : if (!obj)
24389 0 : return JS_FALSE;
24390 : nsIDOMWebGLRenderingContext *self;
24391 0 : xpc_qsSelfRef selfref;
24392 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24393 0 : return JS_FALSE;
24394 0 : if (argc < 2)
24395 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24396 0 : jsval *argv = JS_ARGV(cx, vp);
24397 : uint32_t arg0;
24398 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24399 0 : return JS_FALSE;
24400 : uint32_t arg1;
24401 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24402 0 : return JS_FALSE;
24403 : nsresult rv;
24404 : WebGLuint result;
24405 0 : rv = self->GetVertexAttribOffset(arg0, arg1, &result);
24406 0 : if (NS_FAILED(rv))
24407 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24408 0 : *vp = UINT_TO_JSVAL(result);
24409 0 : return JS_TRUE;
24410 : }
24411 :
24412 : static JSBool
24413 0 : nsIDOMWebGLRenderingContext_Hint(JSContext *cx, unsigned argc, jsval *vp)
24414 : {
24415 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24416 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24417 0 : if (!obj)
24418 0 : return JS_FALSE;
24419 : nsIDOMWebGLRenderingContext *self;
24420 0 : xpc_qsSelfRef selfref;
24421 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24422 0 : return JS_FALSE;
24423 0 : if (argc < 2)
24424 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24425 0 : jsval *argv = JS_ARGV(cx, vp);
24426 : uint32_t arg0;
24427 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24428 0 : return JS_FALSE;
24429 : uint32_t arg1;
24430 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24431 0 : return JS_FALSE;
24432 : nsresult rv;
24433 0 : rv = self->Hint(arg0, arg1);
24434 0 : if (NS_FAILED(rv))
24435 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24436 0 : *vp = JSVAL_VOID;
24437 0 : return JS_TRUE;
24438 : }
24439 :
24440 : static JSBool
24441 0 : nsIDOMWebGLRenderingContext_IsBuffer(JSContext *cx, unsigned argc, jsval *vp)
24442 : {
24443 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24444 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24445 0 : if (!obj)
24446 0 : return JS_FALSE;
24447 : nsIDOMWebGLRenderingContext *self;
24448 0 : xpc_qsSelfRef selfref;
24449 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24450 0 : return JS_FALSE;
24451 0 : if (argc < 1)
24452 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24453 0 : jsval *argv = JS_ARGV(cx, vp);
24454 : nsresult rv;
24455 : nsIWebGLBuffer *arg0;
24456 0 : xpc_qsSelfRef arg0ref;
24457 0 : rv = xpc_qsUnwrapArg<nsIWebGLBuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24458 0 : if (NS_FAILED(rv)) {
24459 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24460 0 : return JS_FALSE;
24461 : }
24462 : WebGLboolean result;
24463 0 : rv = self->IsBuffer(arg0, &result);
24464 0 : if (NS_FAILED(rv))
24465 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24466 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24467 0 : return JS_TRUE;
24468 : }
24469 :
24470 : static JSBool
24471 0 : nsIDOMWebGLRenderingContext_IsFramebuffer(JSContext *cx, unsigned argc, jsval *vp)
24472 : {
24473 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24474 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24475 0 : if (!obj)
24476 0 : return JS_FALSE;
24477 : nsIDOMWebGLRenderingContext *self;
24478 0 : xpc_qsSelfRef selfref;
24479 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24480 0 : return JS_FALSE;
24481 0 : if (argc < 1)
24482 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24483 0 : jsval *argv = JS_ARGV(cx, vp);
24484 : nsresult rv;
24485 : nsIWebGLFramebuffer *arg0;
24486 0 : xpc_qsSelfRef arg0ref;
24487 0 : rv = xpc_qsUnwrapArg<nsIWebGLFramebuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24488 0 : if (NS_FAILED(rv)) {
24489 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24490 0 : return JS_FALSE;
24491 : }
24492 : WebGLboolean result;
24493 0 : rv = self->IsFramebuffer(arg0, &result);
24494 0 : if (NS_FAILED(rv))
24495 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24496 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24497 0 : return JS_TRUE;
24498 : }
24499 :
24500 : static JSBool
24501 0 : nsIDOMWebGLRenderingContext_IsProgram(JSContext *cx, unsigned argc, jsval *vp)
24502 : {
24503 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24504 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24505 0 : if (!obj)
24506 0 : return JS_FALSE;
24507 : nsIDOMWebGLRenderingContext *self;
24508 0 : xpc_qsSelfRef selfref;
24509 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24510 0 : return JS_FALSE;
24511 0 : if (argc < 1)
24512 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24513 0 : jsval *argv = JS_ARGV(cx, vp);
24514 : nsresult rv;
24515 : nsIWebGLProgram *arg0;
24516 0 : xpc_qsSelfRef arg0ref;
24517 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24518 0 : if (NS_FAILED(rv)) {
24519 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24520 0 : return JS_FALSE;
24521 : }
24522 : WebGLboolean result;
24523 0 : rv = self->IsProgram(arg0, &result);
24524 0 : if (NS_FAILED(rv))
24525 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24526 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24527 0 : return JS_TRUE;
24528 : }
24529 :
24530 : static JSBool
24531 0 : nsIDOMWebGLRenderingContext_IsRenderbuffer(JSContext *cx, unsigned argc, jsval *vp)
24532 : {
24533 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24534 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24535 0 : if (!obj)
24536 0 : return JS_FALSE;
24537 : nsIDOMWebGLRenderingContext *self;
24538 0 : xpc_qsSelfRef selfref;
24539 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24540 0 : return JS_FALSE;
24541 0 : if (argc < 1)
24542 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24543 0 : jsval *argv = JS_ARGV(cx, vp);
24544 : nsresult rv;
24545 : nsIWebGLRenderbuffer *arg0;
24546 0 : xpc_qsSelfRef arg0ref;
24547 0 : rv = xpc_qsUnwrapArg<nsIWebGLRenderbuffer>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24548 0 : if (NS_FAILED(rv)) {
24549 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24550 0 : return JS_FALSE;
24551 : }
24552 : WebGLboolean result;
24553 0 : rv = self->IsRenderbuffer(arg0, &result);
24554 0 : if (NS_FAILED(rv))
24555 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24556 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24557 0 : return JS_TRUE;
24558 : }
24559 :
24560 : static JSBool
24561 0 : nsIDOMWebGLRenderingContext_IsShader(JSContext *cx, unsigned argc, jsval *vp)
24562 : {
24563 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24564 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24565 0 : if (!obj)
24566 0 : return JS_FALSE;
24567 : nsIDOMWebGLRenderingContext *self;
24568 0 : xpc_qsSelfRef selfref;
24569 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24570 0 : return JS_FALSE;
24571 0 : if (argc < 1)
24572 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24573 0 : jsval *argv = JS_ARGV(cx, vp);
24574 : nsresult rv;
24575 : nsIWebGLShader *arg0;
24576 0 : xpc_qsSelfRef arg0ref;
24577 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24578 0 : if (NS_FAILED(rv)) {
24579 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24580 0 : return JS_FALSE;
24581 : }
24582 : WebGLboolean result;
24583 0 : rv = self->IsShader(arg0, &result);
24584 0 : if (NS_FAILED(rv))
24585 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24586 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24587 0 : return JS_TRUE;
24588 : }
24589 :
24590 : static JSBool
24591 0 : nsIDOMWebGLRenderingContext_IsTexture(JSContext *cx, unsigned argc, jsval *vp)
24592 : {
24593 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24594 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24595 0 : if (!obj)
24596 0 : return JS_FALSE;
24597 : nsIDOMWebGLRenderingContext *self;
24598 0 : xpc_qsSelfRef selfref;
24599 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24600 0 : return JS_FALSE;
24601 0 : if (argc < 1)
24602 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24603 0 : jsval *argv = JS_ARGV(cx, vp);
24604 : nsresult rv;
24605 : nsIWebGLTexture *arg0;
24606 0 : xpc_qsSelfRef arg0ref;
24607 0 : rv = xpc_qsUnwrapArg<nsIWebGLTexture>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
24608 0 : if (NS_FAILED(rv)) {
24609 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24610 0 : return JS_FALSE;
24611 : }
24612 : WebGLboolean result;
24613 0 : rv = self->IsTexture(arg0, &result);
24614 0 : if (NS_FAILED(rv))
24615 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24616 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24617 0 : return JS_TRUE;
24618 : }
24619 :
24620 : static JSBool
24621 0 : nsIDOMWebGLRenderingContext_IsEnabled(JSContext *cx, unsigned argc, jsval *vp)
24622 : {
24623 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24624 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24625 0 : if (!obj)
24626 0 : return JS_FALSE;
24627 : nsIDOMWebGLRenderingContext *self;
24628 0 : xpc_qsSelfRef selfref;
24629 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24630 0 : return JS_FALSE;
24631 0 : if (argc < 1)
24632 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24633 0 : jsval *argv = JS_ARGV(cx, vp);
24634 : uint32_t arg0;
24635 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24636 0 : return JS_FALSE;
24637 : nsresult rv;
24638 : WebGLboolean result;
24639 0 : rv = self->IsEnabled(arg0, &result);
24640 0 : if (NS_FAILED(rv))
24641 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24642 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
24643 0 : return JS_TRUE;
24644 : }
24645 :
24646 : static JSBool
24647 0 : nsIDOMWebGLRenderingContext_LineWidth(JSContext *cx, unsigned argc, jsval *vp)
24648 : {
24649 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24650 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24651 0 : if (!obj)
24652 0 : return JS_FALSE;
24653 : nsIDOMWebGLRenderingContext *self;
24654 0 : xpc_qsSelfRef selfref;
24655 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24656 0 : return JS_FALSE;
24657 0 : if (argc < 1)
24658 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24659 0 : jsval *argv = JS_ARGV(cx, vp);
24660 : double arg0_dbl;
24661 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
24662 0 : return JS_FALSE;
24663 0 : float arg0 = (float) arg0_dbl;
24664 : nsresult rv;
24665 0 : rv = self->LineWidth(arg0);
24666 0 : if (NS_FAILED(rv))
24667 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24668 0 : *vp = JSVAL_VOID;
24669 0 : return JS_TRUE;
24670 : }
24671 :
24672 : static JSBool
24673 0 : nsIDOMWebGLRenderingContext_LinkProgram(JSContext *cx, unsigned argc, jsval *vp)
24674 : {
24675 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24676 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24677 0 : if (!obj)
24678 0 : return JS_FALSE;
24679 : nsIDOMWebGLRenderingContext *self;
24680 0 : xpc_qsSelfRef selfref;
24681 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24682 0 : return JS_FALSE;
24683 0 : jsval *argv = JS_ARGV(cx, vp);
24684 : nsresult rv;
24685 : nsIWebGLProgram *arg0;
24686 0 : xpc_qsSelfRef arg0ref;
24687 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
24688 0 : if (NS_FAILED(rv)) {
24689 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24690 0 : return JS_FALSE;
24691 : }
24692 0 : rv = self->LinkProgram(arg0);
24693 0 : if (NS_FAILED(rv))
24694 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24695 0 : *vp = JSVAL_VOID;
24696 0 : return JS_TRUE;
24697 : }
24698 :
24699 : static JSBool
24700 0 : nsIDOMWebGLRenderingContext_PixelStorei(JSContext *cx, unsigned argc, jsval *vp)
24701 : {
24702 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24703 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24704 0 : if (!obj)
24705 0 : return JS_FALSE;
24706 : nsIDOMWebGLRenderingContext *self;
24707 0 : xpc_qsSelfRef selfref;
24708 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24709 0 : return JS_FALSE;
24710 0 : if (argc < 2)
24711 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24712 0 : jsval *argv = JS_ARGV(cx, vp);
24713 : uint32_t arg0;
24714 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24715 0 : return JS_FALSE;
24716 : int32_t arg1;
24717 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
24718 0 : return JS_FALSE;
24719 : nsresult rv;
24720 0 : rv = self->PixelStorei(arg0, arg1);
24721 0 : if (NS_FAILED(rv))
24722 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24723 0 : *vp = JSVAL_VOID;
24724 0 : return JS_TRUE;
24725 : }
24726 :
24727 : static JSBool
24728 0 : nsIDOMWebGLRenderingContext_PolygonOffset(JSContext *cx, unsigned argc, jsval *vp)
24729 : {
24730 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24731 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24732 0 : if (!obj)
24733 0 : return JS_FALSE;
24734 : nsIDOMWebGLRenderingContext *self;
24735 0 : xpc_qsSelfRef selfref;
24736 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24737 0 : return JS_FALSE;
24738 0 : if (argc < 2)
24739 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24740 0 : jsval *argv = JS_ARGV(cx, vp);
24741 : double arg0_dbl;
24742 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
24743 0 : return JS_FALSE;
24744 0 : float arg0 = (float) arg0_dbl;
24745 : double arg1_dbl;
24746 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
24747 0 : return JS_FALSE;
24748 0 : float arg1 = (float) arg1_dbl;
24749 : nsresult rv;
24750 0 : rv = self->PolygonOffset(arg0, arg1);
24751 0 : if (NS_FAILED(rv))
24752 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24753 0 : *vp = JSVAL_VOID;
24754 0 : return JS_TRUE;
24755 : }
24756 :
24757 : static JSBool
24758 0 : nsIDOMWebGLRenderingContext_RenderbufferStorage(JSContext *cx, unsigned argc, jsval *vp)
24759 : {
24760 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24761 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24762 0 : if (!obj)
24763 0 : return JS_FALSE;
24764 : nsIDOMWebGLRenderingContext *self;
24765 0 : xpc_qsSelfRef selfref;
24766 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24767 0 : return JS_FALSE;
24768 0 : if (argc < 4)
24769 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24770 0 : jsval *argv = JS_ARGV(cx, vp);
24771 : uint32_t arg0;
24772 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24773 0 : return JS_FALSE;
24774 : uint32_t arg1;
24775 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24776 0 : return JS_FALSE;
24777 : int32_t arg2;
24778 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
24779 0 : return JS_FALSE;
24780 : int32_t arg3;
24781 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
24782 0 : return JS_FALSE;
24783 : nsresult rv;
24784 0 : rv = self->RenderbufferStorage(arg0, arg1, arg2, arg3);
24785 0 : if (NS_FAILED(rv))
24786 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24787 0 : *vp = JSVAL_VOID;
24788 0 : return JS_TRUE;
24789 : }
24790 :
24791 : static JSBool
24792 0 : nsIDOMWebGLRenderingContext_SampleCoverage(JSContext *cx, unsigned argc, jsval *vp)
24793 : {
24794 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24795 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24796 0 : if (!obj)
24797 0 : return JS_FALSE;
24798 : nsIDOMWebGLRenderingContext *self;
24799 0 : xpc_qsSelfRef selfref;
24800 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24801 0 : return JS_FALSE;
24802 0 : if (argc < 2)
24803 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24804 0 : jsval *argv = JS_ARGV(cx, vp);
24805 : double arg0_dbl;
24806 0 : if (!JS_ValueToNumber(cx, argv[0], &arg0_dbl))
24807 0 : return JS_FALSE;
24808 0 : float arg0 = (float) arg0_dbl;
24809 : JSBool arg1;
24810 0 : JS_ValueToBoolean(cx, argv[1], &arg1);
24811 : nsresult rv;
24812 0 : rv = self->SampleCoverage(arg0, arg1);
24813 0 : if (NS_FAILED(rv))
24814 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24815 0 : *vp = JSVAL_VOID;
24816 0 : return JS_TRUE;
24817 : }
24818 :
24819 : static JSBool
24820 0 : nsIDOMWebGLRenderingContext_Scissor(JSContext *cx, unsigned argc, jsval *vp)
24821 : {
24822 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24823 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24824 0 : if (!obj)
24825 0 : return JS_FALSE;
24826 : nsIDOMWebGLRenderingContext *self;
24827 0 : xpc_qsSelfRef selfref;
24828 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24829 0 : return JS_FALSE;
24830 0 : if (argc < 4)
24831 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24832 0 : jsval *argv = JS_ARGV(cx, vp);
24833 : int32_t arg0;
24834 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
24835 0 : return JS_FALSE;
24836 : int32_t arg1;
24837 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
24838 0 : return JS_FALSE;
24839 : int32_t arg2;
24840 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
24841 0 : return JS_FALSE;
24842 : int32_t arg3;
24843 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
24844 0 : return JS_FALSE;
24845 : nsresult rv;
24846 0 : rv = self->Scissor(arg0, arg1, arg2, arg3);
24847 0 : if (NS_FAILED(rv))
24848 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24849 0 : *vp = JSVAL_VOID;
24850 0 : return JS_TRUE;
24851 : }
24852 :
24853 : static JSBool
24854 0 : nsIDOMWebGLRenderingContext_ShaderSource(JSContext *cx, unsigned argc, jsval *vp)
24855 : {
24856 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24857 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24858 0 : if (!obj)
24859 0 : return JS_FALSE;
24860 : nsIDOMWebGLRenderingContext *self;
24861 0 : xpc_qsSelfRef selfref;
24862 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24863 0 : return JS_FALSE;
24864 0 : jsval *argv = JS_ARGV(cx, vp);
24865 : nsresult rv;
24866 : nsIWebGLShader *arg0;
24867 0 : xpc_qsSelfRef arg0ref;
24868 0 : rv = xpc_qsUnwrapArg<nsIWebGLShader>(cx, (0 < argc ? argv[0] : JSVAL_NULL), &arg0, &arg0ref.ptr, (0 < argc ? &argv[0] : NULL));
24869 0 : if (NS_FAILED(rv)) {
24870 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
24871 0 : return JS_FALSE;
24872 : }
24873 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
24874 : xpc_qsDOMString::eDefaultNullBehavior,
24875 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
24876 0 : if (!arg1.IsValid())
24877 0 : return JS_FALSE;
24878 0 : rv = self->ShaderSource(arg0, arg1);
24879 0 : if (NS_FAILED(rv))
24880 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24881 0 : *vp = JSVAL_VOID;
24882 0 : return JS_TRUE;
24883 : }
24884 :
24885 : static JSBool
24886 0 : nsIDOMWebGLRenderingContext_StencilFunc(JSContext *cx, unsigned argc, jsval *vp)
24887 : {
24888 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24889 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24890 0 : if (!obj)
24891 0 : return JS_FALSE;
24892 : nsIDOMWebGLRenderingContext *self;
24893 0 : xpc_qsSelfRef selfref;
24894 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24895 0 : return JS_FALSE;
24896 0 : if (argc < 3)
24897 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24898 0 : jsval *argv = JS_ARGV(cx, vp);
24899 : uint32_t arg0;
24900 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24901 0 : return JS_FALSE;
24902 : int32_t arg1;
24903 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
24904 0 : return JS_FALSE;
24905 : uint32_t arg2;
24906 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
24907 0 : return JS_FALSE;
24908 : nsresult rv;
24909 0 : rv = self->StencilFunc(arg0, arg1, arg2);
24910 0 : if (NS_FAILED(rv))
24911 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24912 0 : *vp = JSVAL_VOID;
24913 0 : return JS_TRUE;
24914 : }
24915 :
24916 : static JSBool
24917 0 : nsIDOMWebGLRenderingContext_StencilFuncSeparate(JSContext *cx, unsigned argc, jsval *vp)
24918 : {
24919 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24920 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24921 0 : if (!obj)
24922 0 : return JS_FALSE;
24923 : nsIDOMWebGLRenderingContext *self;
24924 0 : xpc_qsSelfRef selfref;
24925 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24926 0 : return JS_FALSE;
24927 0 : if (argc < 4)
24928 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24929 0 : jsval *argv = JS_ARGV(cx, vp);
24930 : uint32_t arg0;
24931 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24932 0 : return JS_FALSE;
24933 : uint32_t arg1;
24934 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24935 0 : return JS_FALSE;
24936 : int32_t arg2;
24937 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
24938 0 : return JS_FALSE;
24939 : uint32_t arg3;
24940 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3))
24941 0 : return JS_FALSE;
24942 : nsresult rv;
24943 0 : rv = self->StencilFuncSeparate(arg0, arg1, arg2, arg3);
24944 0 : if (NS_FAILED(rv))
24945 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24946 0 : *vp = JSVAL_VOID;
24947 0 : return JS_TRUE;
24948 : }
24949 :
24950 : static JSBool
24951 0 : nsIDOMWebGLRenderingContext_StencilMask(JSContext *cx, unsigned argc, jsval *vp)
24952 : {
24953 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24954 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24955 0 : if (!obj)
24956 0 : return JS_FALSE;
24957 : nsIDOMWebGLRenderingContext *self;
24958 0 : xpc_qsSelfRef selfref;
24959 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24960 0 : return JS_FALSE;
24961 0 : if (argc < 1)
24962 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24963 0 : jsval *argv = JS_ARGV(cx, vp);
24964 : uint32_t arg0;
24965 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24966 0 : return JS_FALSE;
24967 : nsresult rv;
24968 0 : rv = self->StencilMask(arg0);
24969 0 : if (NS_FAILED(rv))
24970 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24971 0 : *vp = JSVAL_VOID;
24972 0 : return JS_TRUE;
24973 : }
24974 :
24975 : static JSBool
24976 0 : nsIDOMWebGLRenderingContext_StencilMaskSeparate(JSContext *cx, unsigned argc, jsval *vp)
24977 : {
24978 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
24979 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
24980 0 : if (!obj)
24981 0 : return JS_FALSE;
24982 : nsIDOMWebGLRenderingContext *self;
24983 0 : xpc_qsSelfRef selfref;
24984 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
24985 0 : return JS_FALSE;
24986 0 : if (argc < 2)
24987 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
24988 0 : jsval *argv = JS_ARGV(cx, vp);
24989 : uint32_t arg0;
24990 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
24991 0 : return JS_FALSE;
24992 : uint32_t arg1;
24993 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
24994 0 : return JS_FALSE;
24995 : nsresult rv;
24996 0 : rv = self->StencilMaskSeparate(arg0, arg1);
24997 0 : if (NS_FAILED(rv))
24998 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
24999 0 : *vp = JSVAL_VOID;
25000 0 : return JS_TRUE;
25001 : }
25002 :
25003 : static JSBool
25004 0 : nsIDOMWebGLRenderingContext_StencilOp(JSContext *cx, unsigned argc, jsval *vp)
25005 : {
25006 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25007 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25008 0 : if (!obj)
25009 0 : return JS_FALSE;
25010 : nsIDOMWebGLRenderingContext *self;
25011 0 : xpc_qsSelfRef selfref;
25012 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25013 0 : return JS_FALSE;
25014 0 : if (argc < 3)
25015 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25016 0 : jsval *argv = JS_ARGV(cx, vp);
25017 : uint32_t arg0;
25018 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25019 0 : return JS_FALSE;
25020 : uint32_t arg1;
25021 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25022 0 : return JS_FALSE;
25023 : uint32_t arg2;
25024 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
25025 0 : return JS_FALSE;
25026 : nsresult rv;
25027 0 : rv = self->StencilOp(arg0, arg1, arg2);
25028 0 : if (NS_FAILED(rv))
25029 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25030 0 : *vp = JSVAL_VOID;
25031 0 : return JS_TRUE;
25032 : }
25033 :
25034 : static JSBool
25035 0 : nsIDOMWebGLRenderingContext_StencilOpSeparate(JSContext *cx, unsigned argc, jsval *vp)
25036 : {
25037 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25038 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25039 0 : if (!obj)
25040 0 : return JS_FALSE;
25041 : nsIDOMWebGLRenderingContext *self;
25042 0 : xpc_qsSelfRef selfref;
25043 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25044 0 : return JS_FALSE;
25045 0 : if (argc < 4)
25046 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25047 0 : jsval *argv = JS_ARGV(cx, vp);
25048 : uint32_t arg0;
25049 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25050 0 : return JS_FALSE;
25051 : uint32_t arg1;
25052 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25053 0 : return JS_FALSE;
25054 : uint32_t arg2;
25055 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
25056 0 : return JS_FALSE;
25057 : uint32_t arg3;
25058 0 : if (!JS_ValueToECMAUint32(cx, argv[3], &arg3))
25059 0 : return JS_FALSE;
25060 : nsresult rv;
25061 0 : rv = self->StencilOpSeparate(arg0, arg1, arg2, arg3);
25062 0 : if (NS_FAILED(rv))
25063 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25064 0 : *vp = JSVAL_VOID;
25065 0 : return JS_TRUE;
25066 : }
25067 :
25068 : static JSBool
25069 0 : nsIDOMWebGLRenderingContext_TexParameterf(JSContext *cx, unsigned argc, jsval *vp)
25070 : {
25071 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25072 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25073 0 : if (!obj)
25074 0 : return JS_FALSE;
25075 : nsIDOMWebGLRenderingContext *self;
25076 0 : xpc_qsSelfRef selfref;
25077 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25078 0 : return JS_FALSE;
25079 0 : if (argc < 3)
25080 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25081 0 : jsval *argv = JS_ARGV(cx, vp);
25082 : uint32_t arg0;
25083 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25084 0 : return JS_FALSE;
25085 : uint32_t arg1;
25086 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25087 0 : return JS_FALSE;
25088 : double arg2_dbl;
25089 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25090 0 : return JS_FALSE;
25091 0 : float arg2 = (float) arg2_dbl;
25092 : nsresult rv;
25093 0 : rv = self->TexParameterf(arg0, arg1, arg2);
25094 0 : if (NS_FAILED(rv))
25095 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25096 0 : *vp = JSVAL_VOID;
25097 0 : return JS_TRUE;
25098 : }
25099 :
25100 : static JSBool
25101 0 : nsIDOMWebGLRenderingContext_TexParameteri(JSContext *cx, unsigned argc, jsval *vp)
25102 : {
25103 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25104 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25105 0 : if (!obj)
25106 0 : return JS_FALSE;
25107 : nsIDOMWebGLRenderingContext *self;
25108 0 : xpc_qsSelfRef selfref;
25109 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25110 0 : return JS_FALSE;
25111 0 : if (argc < 3)
25112 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25113 0 : jsval *argv = JS_ARGV(cx, vp);
25114 : uint32_t arg0;
25115 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25116 0 : return JS_FALSE;
25117 : uint32_t arg1;
25118 0 : if (!JS_ValueToECMAUint32(cx, argv[1], &arg1))
25119 0 : return JS_FALSE;
25120 : int32_t arg2;
25121 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25122 0 : return JS_FALSE;
25123 : nsresult rv;
25124 0 : rv = self->TexParameteri(arg0, arg1, arg2);
25125 0 : if (NS_FAILED(rv))
25126 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25127 0 : *vp = JSVAL_VOID;
25128 0 : return JS_TRUE;
25129 : }
25130 :
25131 : static JSBool
25132 0 : nsIDOMWebGLRenderingContext_Uniform1f(JSContext *cx, unsigned argc, jsval *vp)
25133 : {
25134 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25135 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25136 0 : if (!obj)
25137 0 : return JS_FALSE;
25138 : nsIDOMWebGLRenderingContext *self;
25139 0 : xpc_qsSelfRef selfref;
25140 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25141 0 : return JS_FALSE;
25142 0 : if (argc < 2)
25143 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25144 0 : jsval *argv = JS_ARGV(cx, vp);
25145 : nsresult rv;
25146 : nsIWebGLUniformLocation *arg0;
25147 0 : xpc_qsSelfRef arg0ref;
25148 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25149 0 : if (NS_FAILED(rv)) {
25150 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25151 0 : return JS_FALSE;
25152 : }
25153 : double arg1_dbl;
25154 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25155 0 : return JS_FALSE;
25156 0 : float arg1 = (float) arg1_dbl;
25157 0 : rv = self->Uniform1f(arg0, arg1);
25158 0 : if (NS_FAILED(rv))
25159 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25160 0 : *vp = JSVAL_VOID;
25161 0 : return JS_TRUE;
25162 : }
25163 :
25164 : static JSBool
25165 0 : nsIDOMWebGLRenderingContext_Uniform1i(JSContext *cx, unsigned argc, jsval *vp)
25166 : {
25167 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25168 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25169 0 : if (!obj)
25170 0 : return JS_FALSE;
25171 : nsIDOMWebGLRenderingContext *self;
25172 0 : xpc_qsSelfRef selfref;
25173 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25174 0 : return JS_FALSE;
25175 0 : if (argc < 2)
25176 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25177 0 : jsval *argv = JS_ARGV(cx, vp);
25178 : nsresult rv;
25179 : nsIWebGLUniformLocation *arg0;
25180 0 : xpc_qsSelfRef arg0ref;
25181 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25182 0 : if (NS_FAILED(rv)) {
25183 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25184 0 : return JS_FALSE;
25185 : }
25186 : int32_t arg1;
25187 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25188 0 : return JS_FALSE;
25189 0 : rv = self->Uniform1i(arg0, arg1);
25190 0 : if (NS_FAILED(rv))
25191 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25192 0 : *vp = JSVAL_VOID;
25193 0 : return JS_TRUE;
25194 : }
25195 :
25196 : static JSBool
25197 0 : nsIDOMWebGLRenderingContext_Uniform2f(JSContext *cx, unsigned argc, jsval *vp)
25198 : {
25199 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25200 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25201 0 : if (!obj)
25202 0 : return JS_FALSE;
25203 : nsIDOMWebGLRenderingContext *self;
25204 0 : xpc_qsSelfRef selfref;
25205 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25206 0 : return JS_FALSE;
25207 0 : if (argc < 3)
25208 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25209 0 : jsval *argv = JS_ARGV(cx, vp);
25210 : nsresult rv;
25211 : nsIWebGLUniformLocation *arg0;
25212 0 : xpc_qsSelfRef arg0ref;
25213 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25214 0 : if (NS_FAILED(rv)) {
25215 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25216 0 : return JS_FALSE;
25217 : }
25218 : double arg1_dbl;
25219 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25220 0 : return JS_FALSE;
25221 0 : float arg1 = (float) arg1_dbl;
25222 : double arg2_dbl;
25223 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25224 0 : return JS_FALSE;
25225 0 : float arg2 = (float) arg2_dbl;
25226 0 : rv = self->Uniform2f(arg0, arg1, arg2);
25227 0 : if (NS_FAILED(rv))
25228 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25229 0 : *vp = JSVAL_VOID;
25230 0 : return JS_TRUE;
25231 : }
25232 :
25233 : static JSBool
25234 0 : nsIDOMWebGLRenderingContext_Uniform2i(JSContext *cx, unsigned argc, jsval *vp)
25235 : {
25236 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25237 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25238 0 : if (!obj)
25239 0 : return JS_FALSE;
25240 : nsIDOMWebGLRenderingContext *self;
25241 0 : xpc_qsSelfRef selfref;
25242 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25243 0 : return JS_FALSE;
25244 0 : if (argc < 3)
25245 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25246 0 : jsval *argv = JS_ARGV(cx, vp);
25247 : nsresult rv;
25248 : nsIWebGLUniformLocation *arg0;
25249 0 : xpc_qsSelfRef arg0ref;
25250 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25251 0 : if (NS_FAILED(rv)) {
25252 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25253 0 : return JS_FALSE;
25254 : }
25255 : int32_t arg1;
25256 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25257 0 : return JS_FALSE;
25258 : int32_t arg2;
25259 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25260 0 : return JS_FALSE;
25261 0 : rv = self->Uniform2i(arg0, arg1, arg2);
25262 0 : if (NS_FAILED(rv))
25263 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25264 0 : *vp = JSVAL_VOID;
25265 0 : return JS_TRUE;
25266 : }
25267 :
25268 : static JSBool
25269 0 : nsIDOMWebGLRenderingContext_Uniform3f(JSContext *cx, unsigned argc, jsval *vp)
25270 : {
25271 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25272 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25273 0 : if (!obj)
25274 0 : return JS_FALSE;
25275 : nsIDOMWebGLRenderingContext *self;
25276 0 : xpc_qsSelfRef selfref;
25277 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25278 0 : return JS_FALSE;
25279 0 : if (argc < 4)
25280 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25281 0 : jsval *argv = JS_ARGV(cx, vp);
25282 : nsresult rv;
25283 : nsIWebGLUniformLocation *arg0;
25284 0 : xpc_qsSelfRef arg0ref;
25285 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25286 0 : if (NS_FAILED(rv)) {
25287 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25288 0 : return JS_FALSE;
25289 : }
25290 : double arg1_dbl;
25291 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25292 0 : return JS_FALSE;
25293 0 : float arg1 = (float) arg1_dbl;
25294 : double arg2_dbl;
25295 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25296 0 : return JS_FALSE;
25297 0 : float arg2 = (float) arg2_dbl;
25298 : double arg3_dbl;
25299 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25300 0 : return JS_FALSE;
25301 0 : float arg3 = (float) arg3_dbl;
25302 0 : rv = self->Uniform3f(arg0, arg1, arg2, arg3);
25303 0 : if (NS_FAILED(rv))
25304 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25305 0 : *vp = JSVAL_VOID;
25306 0 : return JS_TRUE;
25307 : }
25308 :
25309 : static JSBool
25310 0 : nsIDOMWebGLRenderingContext_Uniform3i(JSContext *cx, unsigned argc, jsval *vp)
25311 : {
25312 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25313 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25314 0 : if (!obj)
25315 0 : return JS_FALSE;
25316 : nsIDOMWebGLRenderingContext *self;
25317 0 : xpc_qsSelfRef selfref;
25318 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25319 0 : return JS_FALSE;
25320 0 : if (argc < 4)
25321 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25322 0 : jsval *argv = JS_ARGV(cx, vp);
25323 : nsresult rv;
25324 : nsIWebGLUniformLocation *arg0;
25325 0 : xpc_qsSelfRef arg0ref;
25326 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25327 0 : if (NS_FAILED(rv)) {
25328 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25329 0 : return JS_FALSE;
25330 : }
25331 : int32_t arg1;
25332 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25333 0 : return JS_FALSE;
25334 : int32_t arg2;
25335 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25336 0 : return JS_FALSE;
25337 : int32_t arg3;
25338 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
25339 0 : return JS_FALSE;
25340 0 : rv = self->Uniform3i(arg0, arg1, arg2, arg3);
25341 0 : if (NS_FAILED(rv))
25342 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25343 0 : *vp = JSVAL_VOID;
25344 0 : return JS_TRUE;
25345 : }
25346 :
25347 : static JSBool
25348 0 : nsIDOMWebGLRenderingContext_Uniform4f(JSContext *cx, unsigned argc, jsval *vp)
25349 : {
25350 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25351 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25352 0 : if (!obj)
25353 0 : return JS_FALSE;
25354 : nsIDOMWebGLRenderingContext *self;
25355 0 : xpc_qsSelfRef selfref;
25356 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25357 0 : return JS_FALSE;
25358 0 : if (argc < 5)
25359 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25360 0 : jsval *argv = JS_ARGV(cx, vp);
25361 : nsresult rv;
25362 : nsIWebGLUniformLocation *arg0;
25363 0 : xpc_qsSelfRef arg0ref;
25364 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25365 0 : if (NS_FAILED(rv)) {
25366 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25367 0 : return JS_FALSE;
25368 : }
25369 : double arg1_dbl;
25370 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25371 0 : return JS_FALSE;
25372 0 : float arg1 = (float) arg1_dbl;
25373 : double arg2_dbl;
25374 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25375 0 : return JS_FALSE;
25376 0 : float arg2 = (float) arg2_dbl;
25377 : double arg3_dbl;
25378 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25379 0 : return JS_FALSE;
25380 0 : float arg3 = (float) arg3_dbl;
25381 : double arg4_dbl;
25382 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
25383 0 : return JS_FALSE;
25384 0 : float arg4 = (float) arg4_dbl;
25385 0 : rv = self->Uniform4f(arg0, arg1, arg2, arg3, arg4);
25386 0 : if (NS_FAILED(rv))
25387 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25388 0 : *vp = JSVAL_VOID;
25389 0 : return JS_TRUE;
25390 : }
25391 :
25392 : static JSBool
25393 0 : nsIDOMWebGLRenderingContext_Uniform4i(JSContext *cx, unsigned argc, jsval *vp)
25394 : {
25395 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25396 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25397 0 : if (!obj)
25398 0 : return JS_FALSE;
25399 : nsIDOMWebGLRenderingContext *self;
25400 0 : xpc_qsSelfRef selfref;
25401 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25402 0 : return JS_FALSE;
25403 0 : if (argc < 5)
25404 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25405 0 : jsval *argv = JS_ARGV(cx, vp);
25406 : nsresult rv;
25407 : nsIWebGLUniformLocation *arg0;
25408 0 : xpc_qsSelfRef arg0ref;
25409 0 : rv = xpc_qsUnwrapArg<nsIWebGLUniformLocation>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25410 0 : if (NS_FAILED(rv)) {
25411 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25412 0 : return JS_FALSE;
25413 : }
25414 : int32_t arg1;
25415 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25416 0 : return JS_FALSE;
25417 : int32_t arg2;
25418 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25419 0 : return JS_FALSE;
25420 : int32_t arg3;
25421 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
25422 0 : return JS_FALSE;
25423 : int32_t arg4;
25424 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
25425 0 : return JS_FALSE;
25426 0 : rv = self->Uniform4i(arg0, arg1, arg2, arg3, arg4);
25427 0 : if (NS_FAILED(rv))
25428 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25429 0 : *vp = JSVAL_VOID;
25430 0 : return JS_TRUE;
25431 : }
25432 :
25433 : static JSBool
25434 0 : nsIDOMWebGLRenderingContext_UseProgram(JSContext *cx, unsigned argc, jsval *vp)
25435 : {
25436 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25437 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25438 0 : if (!obj)
25439 0 : return JS_FALSE;
25440 : nsIDOMWebGLRenderingContext *self;
25441 0 : xpc_qsSelfRef selfref;
25442 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25443 0 : return JS_FALSE;
25444 0 : if (argc < 1)
25445 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25446 0 : jsval *argv = JS_ARGV(cx, vp);
25447 : nsresult rv;
25448 : nsIWebGLProgram *arg0;
25449 0 : xpc_qsSelfRef arg0ref;
25450 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25451 0 : if (NS_FAILED(rv)) {
25452 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25453 0 : return JS_FALSE;
25454 : }
25455 0 : rv = self->UseProgram(arg0);
25456 0 : if (NS_FAILED(rv))
25457 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25458 0 : *vp = JSVAL_VOID;
25459 0 : return JS_TRUE;
25460 : }
25461 :
25462 : static JSBool
25463 0 : nsIDOMWebGLRenderingContext_ValidateProgram(JSContext *cx, unsigned argc, jsval *vp)
25464 : {
25465 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25466 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25467 0 : if (!obj)
25468 0 : return JS_FALSE;
25469 : nsIDOMWebGLRenderingContext *self;
25470 0 : xpc_qsSelfRef selfref;
25471 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25472 0 : return JS_FALSE;
25473 0 : if (argc < 1)
25474 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25475 0 : jsval *argv = JS_ARGV(cx, vp);
25476 : nsresult rv;
25477 : nsIWebGLProgram *arg0;
25478 0 : xpc_qsSelfRef arg0ref;
25479 0 : rv = xpc_qsUnwrapArg<nsIWebGLProgram>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
25480 0 : if (NS_FAILED(rv)) {
25481 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
25482 0 : return JS_FALSE;
25483 : }
25484 0 : rv = self->ValidateProgram(arg0);
25485 0 : if (NS_FAILED(rv))
25486 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25487 0 : *vp = JSVAL_VOID;
25488 0 : return JS_TRUE;
25489 : }
25490 :
25491 : static JSBool
25492 0 : nsIDOMWebGLRenderingContext_VertexAttrib1f(JSContext *cx, unsigned argc, jsval *vp)
25493 : {
25494 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25495 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25496 0 : if (!obj)
25497 0 : return JS_FALSE;
25498 : nsIDOMWebGLRenderingContext *self;
25499 0 : xpc_qsSelfRef selfref;
25500 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25501 0 : return JS_FALSE;
25502 0 : if (argc < 2)
25503 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25504 0 : jsval *argv = JS_ARGV(cx, vp);
25505 : uint32_t arg0;
25506 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25507 0 : return JS_FALSE;
25508 : double arg1_dbl;
25509 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25510 0 : return JS_FALSE;
25511 0 : float arg1 = (float) arg1_dbl;
25512 : nsresult rv;
25513 0 : rv = self->VertexAttrib1f(arg0, arg1);
25514 0 : if (NS_FAILED(rv))
25515 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25516 0 : *vp = JSVAL_VOID;
25517 0 : return JS_TRUE;
25518 : }
25519 :
25520 : static JSBool
25521 0 : nsIDOMWebGLRenderingContext_VertexAttrib2f(JSContext *cx, unsigned argc, jsval *vp)
25522 : {
25523 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25524 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25525 0 : if (!obj)
25526 0 : return JS_FALSE;
25527 : nsIDOMWebGLRenderingContext *self;
25528 0 : xpc_qsSelfRef selfref;
25529 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25530 0 : return JS_FALSE;
25531 0 : if (argc < 3)
25532 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25533 0 : jsval *argv = JS_ARGV(cx, vp);
25534 : uint32_t arg0;
25535 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25536 0 : return JS_FALSE;
25537 : double arg1_dbl;
25538 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25539 0 : return JS_FALSE;
25540 0 : float arg1 = (float) arg1_dbl;
25541 : double arg2_dbl;
25542 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25543 0 : return JS_FALSE;
25544 0 : float arg2 = (float) arg2_dbl;
25545 : nsresult rv;
25546 0 : rv = self->VertexAttrib2f(arg0, arg1, arg2);
25547 0 : if (NS_FAILED(rv))
25548 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25549 0 : *vp = JSVAL_VOID;
25550 0 : return JS_TRUE;
25551 : }
25552 :
25553 : static JSBool
25554 0 : nsIDOMWebGLRenderingContext_VertexAttrib3f(JSContext *cx, unsigned argc, jsval *vp)
25555 : {
25556 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25557 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25558 0 : if (!obj)
25559 0 : return JS_FALSE;
25560 : nsIDOMWebGLRenderingContext *self;
25561 0 : xpc_qsSelfRef selfref;
25562 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25563 0 : return JS_FALSE;
25564 0 : if (argc < 4)
25565 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25566 0 : jsval *argv = JS_ARGV(cx, vp);
25567 : uint32_t arg0;
25568 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25569 0 : return JS_FALSE;
25570 : double arg1_dbl;
25571 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25572 0 : return JS_FALSE;
25573 0 : float arg1 = (float) arg1_dbl;
25574 : double arg2_dbl;
25575 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25576 0 : return JS_FALSE;
25577 0 : float arg2 = (float) arg2_dbl;
25578 : double arg3_dbl;
25579 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25580 0 : return JS_FALSE;
25581 0 : float arg3 = (float) arg3_dbl;
25582 : nsresult rv;
25583 0 : rv = self->VertexAttrib3f(arg0, arg1, arg2, arg3);
25584 0 : if (NS_FAILED(rv))
25585 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25586 0 : *vp = JSVAL_VOID;
25587 0 : return JS_TRUE;
25588 : }
25589 :
25590 : static JSBool
25591 0 : nsIDOMWebGLRenderingContext_VertexAttrib4f(JSContext *cx, unsigned argc, jsval *vp)
25592 : {
25593 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25594 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25595 0 : if (!obj)
25596 0 : return JS_FALSE;
25597 : nsIDOMWebGLRenderingContext *self;
25598 0 : xpc_qsSelfRef selfref;
25599 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25600 0 : return JS_FALSE;
25601 0 : if (argc < 5)
25602 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25603 0 : jsval *argv = JS_ARGV(cx, vp);
25604 : uint32_t arg0;
25605 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25606 0 : return JS_FALSE;
25607 : double arg1_dbl;
25608 0 : if (!JS_ValueToNumber(cx, argv[1], &arg1_dbl))
25609 0 : return JS_FALSE;
25610 0 : float arg1 = (float) arg1_dbl;
25611 : double arg2_dbl;
25612 0 : if (!JS_ValueToNumber(cx, argv[2], &arg2_dbl))
25613 0 : return JS_FALSE;
25614 0 : float arg2 = (float) arg2_dbl;
25615 : double arg3_dbl;
25616 0 : if (!JS_ValueToNumber(cx, argv[3], &arg3_dbl))
25617 0 : return JS_FALSE;
25618 0 : float arg3 = (float) arg3_dbl;
25619 : double arg4_dbl;
25620 0 : if (!JS_ValueToNumber(cx, argv[4], &arg4_dbl))
25621 0 : return JS_FALSE;
25622 0 : float arg4 = (float) arg4_dbl;
25623 : nsresult rv;
25624 0 : rv = self->VertexAttrib4f(arg0, arg1, arg2, arg3, arg4);
25625 0 : if (NS_FAILED(rv))
25626 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25627 0 : *vp = JSVAL_VOID;
25628 0 : return JS_TRUE;
25629 : }
25630 :
25631 : static JSBool
25632 0 : nsIDOMWebGLRenderingContext_VertexAttribPointer(JSContext *cx, unsigned argc, jsval *vp)
25633 : {
25634 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25635 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25636 0 : if (!obj)
25637 0 : return JS_FALSE;
25638 : nsIDOMWebGLRenderingContext *self;
25639 0 : xpc_qsSelfRef selfref;
25640 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25641 0 : return JS_FALSE;
25642 0 : if (argc < 6)
25643 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25644 0 : jsval *argv = JS_ARGV(cx, vp);
25645 : uint32_t arg0;
25646 0 : if (!JS_ValueToECMAUint32(cx, argv[0], &arg0))
25647 0 : return JS_FALSE;
25648 : int32_t arg1;
25649 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25650 0 : return JS_FALSE;
25651 : uint32_t arg2;
25652 0 : if (!JS_ValueToECMAUint32(cx, argv[2], &arg2))
25653 0 : return JS_FALSE;
25654 : JSBool arg3;
25655 0 : JS_ValueToBoolean(cx, argv[3], &arg3);
25656 : int32_t arg4;
25657 0 : if (!JS_ValueToECMAInt32(cx, argv[4], &arg4))
25658 0 : return JS_FALSE;
25659 : int32_t arg5;
25660 0 : if (!JS_ValueToECMAInt32(cx, argv[5], &arg5))
25661 0 : return JS_FALSE;
25662 : nsresult rv;
25663 0 : rv = self->VertexAttribPointer(arg0, arg1, arg2, arg3, arg4, arg5);
25664 0 : if (NS_FAILED(rv))
25665 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25666 0 : *vp = JSVAL_VOID;
25667 0 : return JS_TRUE;
25668 : }
25669 :
25670 : static JSBool
25671 0 : nsIDOMWebGLRenderingContext_Viewport(JSContext *cx, unsigned argc, jsval *vp)
25672 : {
25673 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25674 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25675 0 : if (!obj)
25676 0 : return JS_FALSE;
25677 : nsIDOMWebGLRenderingContext *self;
25678 0 : xpc_qsSelfRef selfref;
25679 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25680 0 : return JS_FALSE;
25681 0 : if (argc < 4)
25682 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25683 0 : jsval *argv = JS_ARGV(cx, vp);
25684 : int32_t arg0;
25685 0 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
25686 0 : return JS_FALSE;
25687 : int32_t arg1;
25688 0 : if (!JS_ValueToECMAInt32(cx, argv[1], &arg1))
25689 0 : return JS_FALSE;
25690 : int32_t arg2;
25691 0 : if (!JS_ValueToECMAInt32(cx, argv[2], &arg2))
25692 0 : return JS_FALSE;
25693 : int32_t arg3;
25694 0 : if (!JS_ValueToECMAInt32(cx, argv[3], &arg3))
25695 0 : return JS_FALSE;
25696 : nsresult rv;
25697 0 : rv = self->Viewport(arg0, arg1, arg2, arg3);
25698 0 : if (NS_FAILED(rv))
25699 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25700 0 : *vp = JSVAL_VOID;
25701 0 : return JS_TRUE;
25702 : }
25703 :
25704 : static JSBool
25705 0 : nsIDOMWebGLRenderingContext_GetExtension(JSContext *cx, unsigned argc, jsval *vp)
25706 : {
25707 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25708 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25709 0 : if (!obj)
25710 0 : return JS_FALSE;
25711 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
25712 : nsIDOMWebGLRenderingContext *self;
25713 0 : xpc_qsSelfRef selfref;
25714 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25715 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
25716 0 : return JS_FALSE;
25717 0 : if (argc < 1)
25718 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25719 0 : jsval *argv = JS_ARGV(cx, vp);
25720 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
25721 : xpc_qsDOMString::eDefaultNullBehavior,
25722 0 : xpc_qsDOMString::eDefaultUndefinedBehavior);
25723 0 : if (!arg0.IsValid())
25724 0 : return JS_FALSE;
25725 : nsresult rv;
25726 0 : nsCOMPtr<nsIWebGLExtension> result;
25727 0 : rv = self->GetExtension(arg0, getter_AddRefs(result));
25728 0 : if (NS_FAILED(rv))
25729 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25730 0 : if (!result) {
25731 0 : *vp = JSVAL_NULL;
25732 0 : return JS_TRUE;
25733 : }
25734 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
25735 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
25736 0 : return JS_TRUE;
25737 : }
25738 : // After this point do not use 'result'!
25739 0 : qsObjectHelper helper(result, cache);
25740 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIWebGLExtension), &interfaces[k_nsIWebGLExtension], vp);
25741 : }
25742 :
25743 : static JSBool
25744 0 : nsIDOMWebGLRenderingContext_GetSupportedExtensions(JSContext *cx, unsigned argc, jsval *vp)
25745 : {
25746 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25747 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25748 0 : if (!obj)
25749 0 : return JS_FALSE;
25750 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
25751 : nsIDOMWebGLRenderingContext *self;
25752 0 : xpc_qsSelfRef selfref;
25753 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25754 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
25755 0 : return JS_FALSE;
25756 : nsresult rv;
25757 0 : nsCOMPtr<nsIVariant> result;
25758 0 : rv = self->GetSupportedExtensions(getter_AddRefs(result));
25759 0 : if (NS_FAILED(rv))
25760 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25761 0 : return xpc_qsVariantToJsval(lccx, result, vp);
25762 : }
25763 :
25764 : static JSBool
25765 0 : nsIDOMWebGLRenderingContext_IsContextLost(JSContext *cx, unsigned argc, jsval *vp)
25766 : {
25767 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25768 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25769 0 : if (!obj)
25770 0 : return JS_FALSE;
25771 : nsIDOMWebGLRenderingContext *self;
25772 0 : xpc_qsSelfRef selfref;
25773 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25774 0 : return JS_FALSE;
25775 : nsresult rv;
25776 : WebGLboolean result;
25777 0 : rv = self->IsContextLost(&result);
25778 0 : if (NS_FAILED(rv))
25779 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25780 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
25781 0 : return JS_TRUE;
25782 : }
25783 :
25784 : static JSBool
25785 0 : nsIDOMWebGLRenderingContext_GetDrawingBufferWidth(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25786 : {
25787 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25788 : nsIDOMWebGLRenderingContext *self;
25789 0 : xpc_qsSelfRef selfref;
25790 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25791 0 : return JS_FALSE;
25792 : nsresult rv;
25793 : WebGLsizei result;
25794 0 : rv = self->GetDrawingBufferWidth(&result);
25795 0 : if (NS_FAILED(rv))
25796 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25797 0 : *vp = INT_TO_JSVAL(result);
25798 0 : return JS_TRUE;
25799 : }
25800 :
25801 : static JSBool
25802 0 : nsIDOMWebGLRenderingContext_GetDrawingBufferHeight(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25803 : {
25804 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25805 : nsIDOMWebGLRenderingContext *self;
25806 0 : xpc_qsSelfRef selfref;
25807 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25808 0 : return JS_FALSE;
25809 : nsresult rv;
25810 : WebGLsizei result;
25811 0 : rv = self->GetDrawingBufferHeight(&result);
25812 0 : if (NS_FAILED(rv))
25813 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25814 0 : *vp = INT_TO_JSVAL(result);
25815 0 : return JS_TRUE;
25816 : }
25817 :
25818 : // === interface nsIDOMNotifyAudioAvailableEvent
25819 :
25820 : static JSBool
25821 0 : nsIDOMNotifyAudioAvailableEvent_GetFrameBuffer(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25822 : {
25823 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25824 : nsIDOMNotifyAudioAvailableEvent *self;
25825 0 : xpc_qsSelfRef selfref;
25826 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25827 0 : return JS_FALSE;
25828 : nsresult rv;
25829 0 : rv = self->GetFrameBuffer(cx, vp);
25830 0 : if (NS_FAILED(rv))
25831 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25832 0 : return JS_TRUE;
25833 : }
25834 :
25835 : static JSBool
25836 0 : nsIDOMNotifyAudioAvailableEvent_GetTime(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25837 : {
25838 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25839 : nsIDOMNotifyAudioAvailableEvent *self;
25840 0 : xpc_qsSelfRef selfref;
25841 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25842 0 : return JS_FALSE;
25843 : nsresult rv;
25844 : float result;
25845 0 : rv = self->GetTime(&result);
25846 0 : if (NS_FAILED(rv))
25847 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25848 0 : return JS_NewNumberValue(cx, result, vp);
25849 : }
25850 :
25851 : // === interface nsIDOMHTMLAudioElement
25852 :
25853 : static JSBool
25854 0 : nsIDOMHTMLAudioElement_MozWriteAudio(JSContext *cx, unsigned argc, jsval *vp)
25855 : {
25856 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25857 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25858 0 : if (!obj)
25859 0 : return JS_FALSE;
25860 : nsIDOMHTMLAudioElement *self;
25861 0 : xpc_qsSelfRef selfref;
25862 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25863 0 : return JS_FALSE;
25864 0 : if (argc < 1)
25865 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25866 0 : jsval *argv = JS_ARGV(cx, vp);
25867 0 : jsval arg0 = argv[0];
25868 : nsresult rv;
25869 : PRUint32 result;
25870 0 : rv = self->MozWriteAudio(arg0, cx, &result);
25871 0 : if (NS_FAILED(rv))
25872 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25873 0 : *vp = UINT_TO_JSVAL(result);
25874 0 : return JS_TRUE;
25875 : }
25876 :
25877 : // === interface nsIIDBCursor
25878 :
25879 : static JSBool
25880 0 : nsIIDBCursor_GetDirection(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25881 : {
25882 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25883 : nsIIDBCursor *self;
25884 0 : xpc_qsSelfRef selfref;
25885 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25886 0 : return JS_FALSE;
25887 : nsresult rv;
25888 0 : nsString result;
25889 0 : rv = self->GetDirection(result);
25890 0 : if (NS_FAILED(rv))
25891 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25892 0 : return xpc::StringToJsval(cx, result, vp);
25893 : }
25894 :
25895 : static JSBool
25896 0 : nsIIDBCursor_GetSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25897 : {
25898 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25899 0 : JSObject *callee = nsnull;
25900 : nsIIDBCursor *self;
25901 0 : xpc_qsSelfRef selfref;
25902 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25903 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
25904 0 : return JS_FALSE;
25905 : nsresult rv;
25906 0 : nsCOMPtr<nsISupports> result;
25907 0 : rv = self->GetSource(getter_AddRefs(result));
25908 0 : if (NS_FAILED(rv))
25909 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25910 0 : if (!result) {
25911 0 : *vp = JSVAL_NULL;
25912 0 : return JS_TRUE;
25913 : }
25914 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
25915 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
25916 0 : return JS_TRUE;
25917 : }
25918 : // After this point do not use 'result'!
25919 0 : qsObjectHelper helper(result, cache);
25920 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
25921 : }
25922 :
25923 : static JSBool
25924 659 : nsIIDBCursor_GetKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25925 : {
25926 659 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25927 : nsIIDBCursor *self;
25928 1318 : xpc_qsSelfRef selfref;
25929 659 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25930 0 : return JS_FALSE;
25931 : nsresult rv;
25932 659 : rv = self->GetKey(cx, vp);
25933 659 : if (NS_FAILED(rv))
25934 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25935 659 : return JS_TRUE;
25936 : }
25937 :
25938 : static JSBool
25939 469 : nsIIDBCursor_GetPrimaryKey(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
25940 : {
25941 469 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25942 : nsIIDBCursor *self;
25943 938 : xpc_qsSelfRef selfref;
25944 469 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
25945 0 : return JS_FALSE;
25946 : nsresult rv;
25947 469 : rv = self->GetPrimaryKey(cx, vp);
25948 469 : if (NS_FAILED(rv))
25949 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
25950 469 : return JS_TRUE;
25951 : }
25952 :
25953 : static JSBool
25954 1782 : nsIIDBCursor_Continue(JSContext *cx, unsigned argc, jsval *vp)
25955 : {
25956 1782 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25957 1782 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25958 1782 : if (!obj)
25959 0 : return JS_FALSE;
25960 : nsIIDBCursor *self;
25961 3564 : xpc_qsSelfRef selfref;
25962 1782 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
25963 0 : return JS_FALSE;
25964 1782 : jsval *argv = JS_ARGV(cx, vp);
25965 1782 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
25966 : nsresult rv;
25967 1782 : rv = self->Continue(arg0, cx);
25968 1782 : if (NS_FAILED(rv))
25969 10 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25970 1772 : *vp = JSVAL_VOID;
25971 1772 : return JS_TRUE;
25972 : }
25973 :
25974 : static JSBool
25975 21 : nsIIDBCursor_Update(JSContext *cx, unsigned argc, jsval *vp)
25976 : {
25977 21 : XPC_QS_ASSERT_CONTEXT_OK(cx);
25978 21 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
25979 21 : if (!obj)
25980 0 : return JS_FALSE;
25981 21 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
25982 : nsIIDBCursor *self;
25983 42 : xpc_qsSelfRef selfref;
25984 42 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
25985 21 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
25986 0 : return JS_FALSE;
25987 21 : if (argc < 1)
25988 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
25989 21 : jsval *argv = JS_ARGV(cx, vp);
25990 21 : jsval arg0 = argv[0];
25991 : nsresult rv;
25992 42 : nsCOMPtr<nsIIDBRequest> result;
25993 21 : rv = self->Update(arg0, cx, getter_AddRefs(result));
25994 21 : if (NS_FAILED(rv))
25995 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
25996 21 : if (!result) {
25997 0 : *vp = JSVAL_NULL;
25998 0 : return JS_TRUE;
25999 : }
26000 21 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26001 21 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26002 0 : return JS_TRUE;
26003 : }
26004 : // After this point do not use 'result'!
26005 42 : qsObjectHelper helper(result, cache);
26006 21 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26007 : }
26008 :
26009 : static JSBool
26010 9 : nsIIDBCursor_Delete(JSContext *cx, unsigned argc, jsval *vp)
26011 : {
26012 9 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26013 9 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26014 9 : if (!obj)
26015 0 : return JS_FALSE;
26016 9 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26017 : nsIIDBCursor *self;
26018 18 : xpc_qsSelfRef selfref;
26019 18 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26020 9 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26021 0 : return JS_FALSE;
26022 : nsresult rv;
26023 18 : nsCOMPtr<nsIIDBRequest> result;
26024 9 : rv = self->Delete(cx, getter_AddRefs(result));
26025 9 : if (NS_FAILED(rv))
26026 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26027 9 : if (!result) {
26028 0 : *vp = JSVAL_NULL;
26029 0 : return JS_TRUE;
26030 : }
26031 9 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26032 9 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26033 0 : return JS_TRUE;
26034 : }
26035 : // After this point do not use 'result'!
26036 18 : qsObjectHelper helper(result, cache);
26037 9 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26038 : }
26039 :
26040 : static JSBool
26041 6 : nsIIDBCursor_Advance(JSContext *cx, unsigned argc, jsval *vp)
26042 : {
26043 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26044 6 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26045 6 : if (!obj)
26046 0 : return JS_FALSE;
26047 : nsIIDBCursor *self;
26048 12 : xpc_qsSelfRef selfref;
26049 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
26050 0 : return JS_FALSE;
26051 6 : if (argc < 1)
26052 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26053 6 : jsval *argv = JS_ARGV(cx, vp);
26054 : int32_t arg0;
26055 6 : if (!JS_ValueToECMAInt32(cx, argv[0], &arg0))
26056 0 : return JS_FALSE;
26057 : nsresult rv;
26058 6 : rv = self->Advance(arg0);
26059 6 : if (NS_FAILED(rv))
26060 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26061 6 : *vp = JSVAL_VOID;
26062 6 : return JS_TRUE;
26063 : }
26064 :
26065 : // === interface nsIIDBCursorWithValue
26066 :
26067 : static JSBool
26068 697 : nsIIDBCursorWithValue_GetValue(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26069 : {
26070 697 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26071 : nsIIDBCursorWithValue *self;
26072 1394 : xpc_qsSelfRef selfref;
26073 697 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26074 0 : return JS_FALSE;
26075 : nsresult rv;
26076 697 : rv = self->GetValue(cx, vp);
26077 697 : if (NS_FAILED(rv))
26078 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26079 697 : return JS_TRUE;
26080 : }
26081 :
26082 : // === interface nsIIDBDatabase
26083 :
26084 : static JSBool
26085 9 : nsIIDBDatabase_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26086 : {
26087 9 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26088 : nsIIDBDatabase *self;
26089 18 : xpc_qsSelfRef selfref;
26090 9 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26091 0 : return JS_FALSE;
26092 : nsresult rv;
26093 18 : nsString result;
26094 9 : rv = self->GetName(result);
26095 9 : if (NS_FAILED(rv))
26096 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26097 9 : return xpc::StringToJsval(cx, result, vp);
26098 : }
26099 :
26100 : static JSBool
26101 24 : nsIIDBDatabase_GetVersion(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26102 : {
26103 24 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26104 : nsIIDBDatabase *self;
26105 48 : xpc_qsSelfRef selfref;
26106 24 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26107 0 : return JS_FALSE;
26108 : nsresult rv;
26109 : PRUint64 result;
26110 24 : rv = self->GetVersion(&result);
26111 24 : if (NS_FAILED(rv))
26112 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26113 24 : return xpc_qsUint64ToJsval(cx, result, vp);
26114 : }
26115 :
26116 : static JSBool
26117 219 : nsIIDBDatabase_GetObjectStoreNames(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26118 : {
26119 219 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26120 219 : JSObject *callee = nsnull;
26121 : nsIIDBDatabase *self;
26122 438 : xpc_qsSelfRef selfref;
26123 438 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26124 219 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26125 0 : return JS_FALSE;
26126 : nsresult rv;
26127 438 : nsCOMPtr<nsIDOMDOMStringList> result;
26128 219 : rv = self->GetObjectStoreNames(getter_AddRefs(result));
26129 219 : if (NS_FAILED(rv))
26130 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26131 219 : if (!result) {
26132 0 : *vp = JSVAL_NULL;
26133 0 : return JS_TRUE;
26134 : }
26135 219 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26136 219 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26137 0 : return JS_TRUE;
26138 : }
26139 : // After this point do not use 'result'!
26140 438 : qsObjectHelper helper(result, cache);
26141 219 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringList), &interfaces[k_nsIDOMDOMStringList], vp);
26142 : }
26143 :
26144 : static JSBool
26145 202 : nsIIDBDatabase_CreateObjectStore(JSContext *cx, unsigned argc, jsval *vp)
26146 : {
26147 202 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26148 202 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26149 202 : if (!obj)
26150 0 : return JS_FALSE;
26151 202 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26152 : nsIIDBDatabase *self;
26153 404 : xpc_qsSelfRef selfref;
26154 404 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26155 202 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26156 0 : return JS_FALSE;
26157 202 : if (argc < 1)
26158 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26159 202 : jsval *argv = JS_ARGV(cx, vp);
26160 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
26161 : xpc_qsDOMString::eStringify,
26162 404 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26163 202 : if (!arg0.IsValid())
26164 0 : return JS_FALSE;
26165 202 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
26166 : nsresult rv;
26167 404 : nsCOMPtr<nsIIDBObjectStore> result;
26168 202 : rv = self->CreateObjectStore(arg0, arg1, cx, getter_AddRefs(result));
26169 202 : if (NS_FAILED(rv))
26170 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26171 201 : if (!result) {
26172 0 : *vp = JSVAL_NULL;
26173 0 : return JS_TRUE;
26174 : }
26175 201 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26176 201 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26177 0 : return JS_TRUE;
26178 : }
26179 : // After this point do not use 'result'!
26180 402 : qsObjectHelper helper(result, cache);
26181 201 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBObjectStore), &interfaces[k_nsIIDBObjectStore], vp);
26182 : }
26183 :
26184 : static JSBool
26185 123 : nsIIDBDatabase_DeleteObjectStore(JSContext *cx, unsigned argc, jsval *vp)
26186 : {
26187 123 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26188 123 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26189 123 : if (!obj)
26190 0 : return JS_FALSE;
26191 : nsIIDBDatabase *self;
26192 246 : xpc_qsSelfRef selfref;
26193 123 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
26194 0 : return JS_FALSE;
26195 123 : if (argc < 1)
26196 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26197 123 : jsval *argv = JS_ARGV(cx, vp);
26198 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
26199 : xpc_qsDOMString::eStringify,
26200 246 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26201 123 : if (!arg0.IsValid())
26202 0 : return JS_FALSE;
26203 : nsresult rv;
26204 123 : rv = self->DeleteObjectStore(arg0);
26205 123 : if (NS_FAILED(rv))
26206 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26207 123 : *vp = JSVAL_VOID;
26208 123 : return JS_TRUE;
26209 : }
26210 :
26211 : static JSBool
26212 470 : nsIIDBDatabase_Transaction(JSContext *cx, unsigned argc, jsval *vp)
26213 : {
26214 470 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26215 470 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26216 470 : if (!obj)
26217 0 : return JS_FALSE;
26218 470 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26219 : nsIIDBDatabase *self;
26220 940 : xpc_qsSelfRef selfref;
26221 940 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26222 470 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26223 0 : return JS_FALSE;
26224 470 : if (argc < 1)
26225 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26226 470 : jsval *argv = JS_ARGV(cx, vp);
26227 470 : jsval arg0 = argv[0];
26228 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
26229 : xpc_qsDOMString::eDefaultNullBehavior,
26230 940 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26231 470 : if (!arg1.IsValid())
26232 0 : return JS_FALSE;
26233 : nsresult rv;
26234 940 : nsCOMPtr<nsIIDBTransaction> result;
26235 470 : rv = self->Transaction(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
26236 470 : if (NS_FAILED(rv))
26237 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26238 468 : if (!result) {
26239 0 : *vp = JSVAL_NULL;
26240 0 : return JS_TRUE;
26241 : }
26242 468 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26243 468 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26244 0 : return JS_TRUE;
26245 : }
26246 : // After this point do not use 'result'!
26247 936 : qsObjectHelper helper(result, cache);
26248 468 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBTransaction), &interfaces[k_nsIIDBTransaction], vp);
26249 : }
26250 :
26251 : static JSBool
26252 25 : nsIIDBDatabase_Close(JSContext *cx, unsigned argc, jsval *vp)
26253 : {
26254 25 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26255 25 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26256 25 : if (!obj)
26257 0 : return JS_FALSE;
26258 : nsIIDBDatabase *self;
26259 50 : xpc_qsSelfRef selfref;
26260 25 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
26261 0 : return JS_FALSE;
26262 : nsresult rv;
26263 25 : rv = self->Close();
26264 25 : if (NS_FAILED(rv))
26265 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26266 25 : *vp = JSVAL_VOID;
26267 25 : return JS_TRUE;
26268 : }
26269 :
26270 : static JSBool
26271 0 : nsIIDBDatabase_GetOnabort(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26272 : {
26273 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26274 0 : JSObject *callee = nsnull;
26275 : nsIIDBDatabase *self;
26276 0 : xpc_qsSelfRef selfref;
26277 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26278 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26279 0 : return JS_FALSE;
26280 : nsresult rv;
26281 0 : nsCOMPtr<nsIDOMEventListener> result;
26282 0 : rv = self->GetOnabort(getter_AddRefs(result));
26283 0 : if (NS_FAILED(rv))
26284 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26285 0 : if (!result) {
26286 0 : *vp = JSVAL_NULL;
26287 0 : return JS_TRUE;
26288 : }
26289 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26290 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26291 0 : return JS_TRUE;
26292 : }
26293 : // After this point do not use 'result'!
26294 0 : qsObjectHelper helper(result, cache);
26295 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
26296 : }
26297 :
26298 : static JSBool
26299 1 : nsIIDBDatabase_SetOnabort(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
26300 : {
26301 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26302 : nsIIDBDatabase *self;
26303 2 : xpc_qsSelfRef selfref;
26304 2 : JS::AutoValueRooter tvr(cx);
26305 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
26306 0 : return JS_FALSE;
26307 : nsresult rv;
26308 : nsIDOMEventListener *arg0;
26309 2 : xpc_qsSelfRef arg0ref;
26310 1 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
26311 1 : if (NS_FAILED(rv)) {
26312 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26313 0 : return JS_FALSE;
26314 : }
26315 1 : rv = self->SetOnabort(arg0);
26316 1 : if (NS_FAILED(rv))
26317 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26318 1 : return JS_TRUE;
26319 : }
26320 :
26321 : static JSBool
26322 0 : nsIIDBDatabase_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26323 : {
26324 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26325 0 : JSObject *callee = nsnull;
26326 : nsIIDBDatabase *self;
26327 0 : xpc_qsSelfRef selfref;
26328 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26329 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26330 0 : return JS_FALSE;
26331 : nsresult rv;
26332 0 : nsCOMPtr<nsIDOMEventListener> result;
26333 0 : rv = self->GetOnerror(getter_AddRefs(result));
26334 0 : if (NS_FAILED(rv))
26335 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26336 0 : if (!result) {
26337 0 : *vp = JSVAL_NULL;
26338 0 : return JS_TRUE;
26339 : }
26340 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26341 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26342 0 : return JS_TRUE;
26343 : }
26344 : // After this point do not use 'result'!
26345 0 : qsObjectHelper helper(result, cache);
26346 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
26347 : }
26348 :
26349 : static JSBool
26350 13 : nsIIDBDatabase_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
26351 : {
26352 13 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26353 : nsIIDBDatabase *self;
26354 26 : xpc_qsSelfRef selfref;
26355 26 : JS::AutoValueRooter tvr(cx);
26356 13 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
26357 0 : return JS_FALSE;
26358 : nsresult rv;
26359 : nsIDOMEventListener *arg0;
26360 26 : xpc_qsSelfRef arg0ref;
26361 13 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
26362 13 : if (NS_FAILED(rv)) {
26363 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26364 0 : return JS_FALSE;
26365 : }
26366 13 : rv = self->SetOnerror(arg0);
26367 13 : if (NS_FAILED(rv))
26368 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26369 13 : return JS_TRUE;
26370 : }
26371 :
26372 : static JSBool
26373 0 : nsIIDBDatabase_GetOnversionchange(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26374 : {
26375 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26376 0 : JSObject *callee = nsnull;
26377 : nsIIDBDatabase *self;
26378 0 : xpc_qsSelfRef selfref;
26379 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26380 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26381 0 : return JS_FALSE;
26382 : nsresult rv;
26383 0 : nsCOMPtr<nsIDOMEventListener> result;
26384 0 : rv = self->GetOnversionchange(getter_AddRefs(result));
26385 0 : if (NS_FAILED(rv))
26386 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26387 0 : if (!result) {
26388 0 : *vp = JSVAL_NULL;
26389 0 : return JS_TRUE;
26390 : }
26391 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26392 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26393 0 : return JS_TRUE;
26394 : }
26395 : // After this point do not use 'result'!
26396 0 : qsObjectHelper helper(result, cache);
26397 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
26398 : }
26399 :
26400 : static JSBool
26401 1 : nsIIDBDatabase_SetOnversionchange(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
26402 : {
26403 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26404 : nsIIDBDatabase *self;
26405 2 : xpc_qsSelfRef selfref;
26406 2 : JS::AutoValueRooter tvr(cx);
26407 1 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
26408 0 : return JS_FALSE;
26409 : nsresult rv;
26410 : nsIDOMEventListener *arg0;
26411 2 : xpc_qsSelfRef arg0ref;
26412 1 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
26413 1 : if (NS_FAILED(rv)) {
26414 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26415 0 : return JS_FALSE;
26416 : }
26417 1 : rv = self->SetOnversionchange(arg0);
26418 1 : if (NS_FAILED(rv))
26419 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
26420 1 : return JS_TRUE;
26421 : }
26422 :
26423 : // === interface nsIIDBDatabaseException
26424 :
26425 : static JSBool
26426 170 : nsIIDBDatabaseException_GetCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26427 : {
26428 170 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26429 : nsIIDBDatabaseException *self;
26430 340 : xpc_qsSelfRef selfref;
26431 170 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26432 0 : return JS_FALSE;
26433 : nsresult rv;
26434 : PRUint16 result;
26435 170 : rv = self->GetCode(&result);
26436 170 : if (NS_FAILED(rv))
26437 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26438 170 : *vp = INT_TO_JSVAL((int32_t) result);
26439 170 : return JS_TRUE;
26440 : }
26441 :
26442 : // === interface nsIIDBIndex
26443 :
26444 : static JSBool
26445 15 : nsIIDBIndex_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26446 : {
26447 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26448 : nsIIDBIndex *self;
26449 30 : xpc_qsSelfRef selfref;
26450 15 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26451 0 : return JS_FALSE;
26452 : nsresult rv;
26453 30 : nsString result;
26454 15 : rv = self->GetName(result);
26455 15 : if (NS_FAILED(rv))
26456 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26457 15 : return xpc::StringToJsval(cx, result, vp);
26458 : }
26459 :
26460 : static JSBool
26461 3 : nsIIDBIndex_GetStoreName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26462 : {
26463 3 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26464 : nsIIDBIndex *self;
26465 6 : xpc_qsSelfRef selfref;
26466 3 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26467 0 : return JS_FALSE;
26468 : nsresult rv;
26469 6 : nsString result;
26470 3 : rv = self->GetStoreName(result);
26471 3 : if (NS_FAILED(rv))
26472 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26473 3 : return xpc::StringToJsval(cx, result, vp);
26474 : }
26475 :
26476 : static JSBool
26477 15 : nsIIDBIndex_GetKeyPath(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26478 : {
26479 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26480 : nsIIDBIndex *self;
26481 30 : xpc_qsSelfRef selfref;
26482 15 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26483 0 : return JS_FALSE;
26484 : nsresult rv;
26485 15 : rv = self->GetKeyPath(cx, vp);
26486 15 : if (NS_FAILED(rv))
26487 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26488 15 : return JS_TRUE;
26489 : }
26490 :
26491 : static JSBool
26492 15 : nsIIDBIndex_GetUnique(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26493 : {
26494 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26495 : nsIIDBIndex *self;
26496 30 : xpc_qsSelfRef selfref;
26497 15 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26498 0 : return JS_FALSE;
26499 : nsresult rv;
26500 : bool result;
26501 15 : rv = self->GetUnique(&result);
26502 15 : if (NS_FAILED(rv))
26503 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26504 15 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26505 15 : return JS_TRUE;
26506 : }
26507 :
26508 : static JSBool
26509 3 : nsIIDBIndex_GetMultiEntry(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26510 : {
26511 3 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26512 : nsIIDBIndex *self;
26513 6 : xpc_qsSelfRef selfref;
26514 3 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26515 0 : return JS_FALSE;
26516 : nsresult rv;
26517 : bool result;
26518 3 : rv = self->GetMultiEntry(&result);
26519 3 : if (NS_FAILED(rv))
26520 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26521 3 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26522 3 : return JS_TRUE;
26523 : }
26524 :
26525 : static JSBool
26526 0 : nsIIDBIndex_GetObjectStore(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26527 : {
26528 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26529 0 : JSObject *callee = nsnull;
26530 : nsIIDBIndex *self;
26531 0 : xpc_qsSelfRef selfref;
26532 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26533 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26534 0 : return JS_FALSE;
26535 : nsresult rv;
26536 0 : nsCOMPtr<nsIIDBObjectStore> result;
26537 0 : rv = self->GetObjectStore(getter_AddRefs(result));
26538 0 : if (NS_FAILED(rv))
26539 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26540 0 : if (!result) {
26541 0 : *vp = JSVAL_NULL;
26542 0 : return JS_TRUE;
26543 : }
26544 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26545 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26546 0 : return JS_TRUE;
26547 : }
26548 : // After this point do not use 'result'!
26549 0 : qsObjectHelper helper(result, cache);
26550 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBObjectStore), &interfaces[k_nsIIDBObjectStore], vp);
26551 : }
26552 :
26553 : static JSBool
26554 28 : nsIIDBIndex_Get(JSContext *cx, unsigned argc, jsval *vp)
26555 : {
26556 28 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26557 28 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26558 28 : if (!obj)
26559 0 : return JS_FALSE;
26560 28 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26561 : nsIIDBIndex *self;
26562 56 : xpc_qsSelfRef selfref;
26563 56 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26564 28 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26565 0 : return JS_FALSE;
26566 28 : if (argc < 1)
26567 1 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26568 27 : jsval *argv = JS_ARGV(cx, vp);
26569 27 : jsval arg0 = argv[0];
26570 : nsresult rv;
26571 54 : nsCOMPtr<nsIIDBRequest> result;
26572 27 : rv = self->Get(arg0, cx, getter_AddRefs(result));
26573 27 : if (NS_FAILED(rv))
26574 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26575 25 : if (!result) {
26576 0 : *vp = JSVAL_NULL;
26577 0 : return JS_TRUE;
26578 : }
26579 25 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26580 25 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26581 0 : return JS_TRUE;
26582 : }
26583 : // After this point do not use 'result'!
26584 50 : qsObjectHelper helper(result, cache);
26585 25 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26586 : }
26587 :
26588 : static JSBool
26589 15 : nsIIDBIndex_GetKey(JSContext *cx, unsigned argc, jsval *vp)
26590 : {
26591 15 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26592 15 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26593 15 : if (!obj)
26594 0 : return JS_FALSE;
26595 15 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26596 : nsIIDBIndex *self;
26597 30 : xpc_qsSelfRef selfref;
26598 30 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26599 15 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26600 0 : return JS_FALSE;
26601 15 : if (argc < 1)
26602 1 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26603 14 : jsval *argv = JS_ARGV(cx, vp);
26604 14 : jsval arg0 = argv[0];
26605 : nsresult rv;
26606 28 : nsCOMPtr<nsIIDBRequest> result;
26607 14 : rv = self->GetKey(arg0, cx, getter_AddRefs(result));
26608 14 : if (NS_FAILED(rv))
26609 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26610 12 : if (!result) {
26611 0 : *vp = JSVAL_NULL;
26612 0 : return JS_TRUE;
26613 : }
26614 12 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26615 12 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26616 0 : return JS_TRUE;
26617 : }
26618 : // After this point do not use 'result'!
26619 24 : qsObjectHelper helper(result, cache);
26620 12 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26621 : }
26622 :
26623 : static JSBool
26624 12 : nsIIDBIndex_GetAll(JSContext *cx, unsigned argc, jsval *vp)
26625 : {
26626 12 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26627 12 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26628 12 : if (!obj)
26629 0 : return JS_FALSE;
26630 12 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26631 : nsIIDBIndex *self;
26632 24 : xpc_qsSelfRef selfref;
26633 24 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26634 12 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26635 0 : return JS_FALSE;
26636 12 : jsval *argv = JS_ARGV(cx, vp);
26637 12 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26638 : uint32_t arg1;
26639 12 : if (!JS_ValueToECMAUint32(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
26640 0 : return JS_FALSE;
26641 : nsresult rv;
26642 24 : nsCOMPtr<nsIIDBRequest> result;
26643 12 : rv = self->GetAll(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26644 12 : if (NS_FAILED(rv))
26645 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26646 12 : if (!result) {
26647 0 : *vp = JSVAL_NULL;
26648 0 : return JS_TRUE;
26649 : }
26650 12 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26651 12 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26652 0 : return JS_TRUE;
26653 : }
26654 : // After this point do not use 'result'!
26655 24 : qsObjectHelper helper(result, cache);
26656 12 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26657 : }
26658 :
26659 : static JSBool
26660 12 : nsIIDBIndex_GetAllKeys(JSContext *cx, unsigned argc, jsval *vp)
26661 : {
26662 12 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26663 12 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26664 12 : if (!obj)
26665 0 : return JS_FALSE;
26666 12 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26667 : nsIIDBIndex *self;
26668 24 : xpc_qsSelfRef selfref;
26669 24 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26670 12 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26671 0 : return JS_FALSE;
26672 12 : jsval *argv = JS_ARGV(cx, vp);
26673 12 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26674 : uint32_t arg1;
26675 12 : if (!JS_ValueToECMAUint32(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
26676 0 : return JS_FALSE;
26677 : nsresult rv;
26678 24 : nsCOMPtr<nsIIDBRequest> result;
26679 12 : rv = self->GetAllKeys(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26680 12 : if (NS_FAILED(rv))
26681 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26682 12 : if (!result) {
26683 0 : *vp = JSVAL_NULL;
26684 0 : return JS_TRUE;
26685 : }
26686 12 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26687 12 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26688 0 : return JS_TRUE;
26689 : }
26690 : // After this point do not use 'result'!
26691 24 : qsObjectHelper helper(result, cache);
26692 12 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26693 : }
26694 :
26695 : static JSBool
26696 57 : nsIIDBIndex_OpenCursor(JSContext *cx, unsigned argc, jsval *vp)
26697 : {
26698 57 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26699 57 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26700 57 : if (!obj)
26701 0 : return JS_FALSE;
26702 57 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26703 : nsIIDBIndex *self;
26704 114 : xpc_qsSelfRef selfref;
26705 114 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26706 57 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26707 0 : return JS_FALSE;
26708 57 : jsval *argv = JS_ARGV(cx, vp);
26709 57 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26710 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
26711 : xpc_qsDOMString::eDefaultNullBehavior,
26712 114 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26713 57 : if (!arg1.IsValid())
26714 0 : return JS_FALSE;
26715 : nsresult rv;
26716 114 : nsCOMPtr<nsIIDBRequest> result;
26717 57 : rv = self->OpenCursor(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26718 57 : if (NS_FAILED(rv))
26719 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26720 57 : if (!result) {
26721 0 : *vp = JSVAL_NULL;
26722 0 : return JS_TRUE;
26723 : }
26724 57 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26725 57 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26726 0 : return JS_TRUE;
26727 : }
26728 : // After this point do not use 'result'!
26729 114 : qsObjectHelper helper(result, cache);
26730 57 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26731 : }
26732 :
26733 : static JSBool
26734 89 : nsIIDBIndex_OpenKeyCursor(JSContext *cx, unsigned argc, jsval *vp)
26735 : {
26736 89 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26737 89 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26738 89 : if (!obj)
26739 0 : return JS_FALSE;
26740 89 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26741 : nsIIDBIndex *self;
26742 178 : xpc_qsSelfRef selfref;
26743 178 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26744 89 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26745 0 : return JS_FALSE;
26746 89 : jsval *argv = JS_ARGV(cx, vp);
26747 89 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26748 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
26749 : xpc_qsDOMString::eDefaultNullBehavior,
26750 178 : xpc_qsDOMString::eDefaultUndefinedBehavior);
26751 89 : if (!arg1.IsValid())
26752 0 : return JS_FALSE;
26753 : nsresult rv;
26754 178 : nsCOMPtr<nsIIDBRequest> result;
26755 89 : rv = self->OpenKeyCursor(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
26756 89 : if (NS_FAILED(rv))
26757 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26758 89 : if (!result) {
26759 0 : *vp = JSVAL_NULL;
26760 0 : return JS_TRUE;
26761 : }
26762 89 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26763 89 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26764 0 : return JS_TRUE;
26765 : }
26766 : // After this point do not use 'result'!
26767 178 : qsObjectHelper helper(result, cache);
26768 89 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26769 : }
26770 :
26771 : static JSBool
26772 39 : nsIIDBIndex_Count(JSContext *cx, unsigned argc, jsval *vp)
26773 : {
26774 39 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26775 39 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26776 39 : if (!obj)
26777 0 : return JS_FALSE;
26778 39 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26779 : nsIIDBIndex *self;
26780 78 : xpc_qsSelfRef selfref;
26781 78 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26782 39 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26783 0 : return JS_FALSE;
26784 39 : jsval *argv = JS_ARGV(cx, vp);
26785 39 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
26786 : nsresult rv;
26787 78 : nsCOMPtr<nsIIDBRequest> result;
26788 39 : rv = self->Count(arg0, cx, NS_MIN<PRUint32>(argc, 1) - 0, getter_AddRefs(result));
26789 39 : if (NS_FAILED(rv))
26790 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26791 39 : if (!result) {
26792 0 : *vp = JSVAL_NULL;
26793 0 : return JS_TRUE;
26794 : }
26795 39 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26796 39 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26797 0 : return JS_TRUE;
26798 : }
26799 : // After this point do not use 'result'!
26800 78 : qsObjectHelper helper(result, cache);
26801 39 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
26802 : }
26803 :
26804 : // === interface nsIIDBKeyRange
26805 :
26806 : static JSBool
26807 0 : nsIIDBKeyRange_GetLower(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26808 : {
26809 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26810 : nsIIDBKeyRange *self;
26811 0 : xpc_qsSelfRef selfref;
26812 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26813 0 : return JS_FALSE;
26814 : nsresult rv;
26815 0 : rv = self->GetLower(cx, vp);
26816 0 : if (NS_FAILED(rv))
26817 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26818 0 : return JS_TRUE;
26819 : }
26820 :
26821 : static JSBool
26822 0 : nsIIDBKeyRange_GetUpper(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26823 : {
26824 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26825 : nsIIDBKeyRange *self;
26826 0 : xpc_qsSelfRef selfref;
26827 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26828 0 : return JS_FALSE;
26829 : nsresult rv;
26830 0 : rv = self->GetUpper(cx, vp);
26831 0 : if (NS_FAILED(rv))
26832 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26833 0 : return JS_TRUE;
26834 : }
26835 :
26836 : static JSBool
26837 0 : nsIIDBKeyRange_GetLowerOpen(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26838 : {
26839 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26840 : nsIIDBKeyRange *self;
26841 0 : xpc_qsSelfRef selfref;
26842 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26843 0 : return JS_FALSE;
26844 : nsresult rv;
26845 : bool result;
26846 0 : rv = self->GetLowerOpen(&result);
26847 0 : if (NS_FAILED(rv))
26848 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26849 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26850 0 : return JS_TRUE;
26851 : }
26852 :
26853 : static JSBool
26854 0 : nsIIDBKeyRange_GetUpperOpen(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26855 : {
26856 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26857 : nsIIDBKeyRange *self;
26858 0 : xpc_qsSelfRef selfref;
26859 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26860 0 : return JS_FALSE;
26861 : nsresult rv;
26862 : bool result;
26863 0 : rv = self->GetUpperOpen(&result);
26864 0 : if (NS_FAILED(rv))
26865 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26866 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26867 0 : return JS_TRUE;
26868 : }
26869 :
26870 : // === interface nsIIDBObjectStore
26871 :
26872 : static JSBool
26873 25 : nsIIDBObjectStore_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26874 : {
26875 25 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26876 : nsIIDBObjectStore *self;
26877 50 : xpc_qsSelfRef selfref;
26878 25 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26879 0 : return JS_FALSE;
26880 : nsresult rv;
26881 50 : nsString result;
26882 25 : rv = self->GetName(result);
26883 25 : if (NS_FAILED(rv))
26884 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26885 25 : return xpc::StringToJsval(cx, result, vp);
26886 : }
26887 :
26888 : static JSBool
26889 20 : nsIIDBObjectStore_GetKeyPath(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26890 : {
26891 20 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26892 : nsIIDBObjectStore *self;
26893 40 : xpc_qsSelfRef selfref;
26894 20 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26895 0 : return JS_FALSE;
26896 : nsresult rv;
26897 20 : rv = self->GetKeyPath(cx, vp);
26898 20 : if (NS_FAILED(rv))
26899 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26900 20 : return JS_TRUE;
26901 : }
26902 :
26903 : static JSBool
26904 150 : nsIIDBObjectStore_GetIndexNames(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26905 : {
26906 150 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26907 150 : JSObject *callee = nsnull;
26908 : nsIIDBObjectStore *self;
26909 300 : xpc_qsSelfRef selfref;
26910 300 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26911 150 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26912 0 : return JS_FALSE;
26913 : nsresult rv;
26914 300 : nsCOMPtr<nsIDOMDOMStringList> result;
26915 150 : rv = self->GetIndexNames(getter_AddRefs(result));
26916 150 : if (NS_FAILED(rv))
26917 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26918 150 : if (!result) {
26919 0 : *vp = JSVAL_NULL;
26920 0 : return JS_TRUE;
26921 : }
26922 150 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26923 150 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26924 0 : return JS_TRUE;
26925 : }
26926 : // After this point do not use 'result'!
26927 300 : qsObjectHelper helper(result, cache);
26928 150 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringList), &interfaces[k_nsIDOMDOMStringList], vp);
26929 : }
26930 :
26931 : static JSBool
26932 1 : nsIIDBObjectStore_GetTransaction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26933 : {
26934 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26935 1 : JSObject *callee = nsnull;
26936 : nsIIDBObjectStore *self;
26937 2 : xpc_qsSelfRef selfref;
26938 2 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26939 1 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
26940 0 : return JS_FALSE;
26941 : nsresult rv;
26942 2 : nsCOMPtr<nsIIDBTransaction> result;
26943 1 : rv = self->GetTransaction(getter_AddRefs(result));
26944 1 : if (NS_FAILED(rv))
26945 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26946 1 : if (!result) {
26947 0 : *vp = JSVAL_NULL;
26948 0 : return JS_TRUE;
26949 : }
26950 1 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
26951 1 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
26952 0 : return JS_TRUE;
26953 : }
26954 : // After this point do not use 'result'!
26955 2 : qsObjectHelper helper(result, cache);
26956 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBTransaction), &interfaces[k_nsIIDBTransaction], vp);
26957 : }
26958 :
26959 : static JSBool
26960 0 : nsIIDBObjectStore_GetAutoIncrement(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
26961 : {
26962 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26963 : nsIIDBObjectStore *self;
26964 0 : xpc_qsSelfRef selfref;
26965 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
26966 0 : return JS_FALSE;
26967 : nsresult rv;
26968 : bool result;
26969 0 : rv = self->GetAutoIncrement(&result);
26970 0 : if (NS_FAILED(rv))
26971 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
26972 0 : *vp = (result ? JSVAL_TRUE : JSVAL_FALSE);
26973 0 : return JS_TRUE;
26974 : }
26975 :
26976 : static JSBool
26977 175 : nsIIDBObjectStore_Get(JSContext *cx, unsigned argc, jsval *vp)
26978 : {
26979 175 : XPC_QS_ASSERT_CONTEXT_OK(cx);
26980 175 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
26981 175 : if (!obj)
26982 0 : return JS_FALSE;
26983 175 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
26984 : nsIIDBObjectStore *self;
26985 350 : xpc_qsSelfRef selfref;
26986 350 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
26987 175 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
26988 0 : return JS_FALSE;
26989 175 : if (argc < 1)
26990 1 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
26991 174 : jsval *argv = JS_ARGV(cx, vp);
26992 174 : jsval arg0 = argv[0];
26993 : nsresult rv;
26994 348 : nsCOMPtr<nsIIDBRequest> result;
26995 174 : rv = self->Get(arg0, cx, getter_AddRefs(result));
26996 174 : if (NS_FAILED(rv))
26997 3 : return xpc_qsThrowMethodFailed(cx, rv, vp);
26998 171 : if (!result) {
26999 0 : *vp = JSVAL_NULL;
27000 0 : return JS_TRUE;
27001 : }
27002 171 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27003 171 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27004 0 : return JS_TRUE;
27005 : }
27006 : // After this point do not use 'result'!
27007 342 : qsObjectHelper helper(result, cache);
27008 171 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27009 : }
27010 :
27011 : static JSBool
27012 18 : nsIIDBObjectStore_GetAll(JSContext *cx, unsigned argc, jsval *vp)
27013 : {
27014 18 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27015 18 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27016 18 : if (!obj)
27017 0 : return JS_FALSE;
27018 18 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27019 : nsIIDBObjectStore *self;
27020 36 : xpc_qsSelfRef selfref;
27021 36 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27022 18 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27023 0 : return JS_FALSE;
27024 18 : jsval *argv = JS_ARGV(cx, vp);
27025 18 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
27026 : uint32_t arg1;
27027 18 : if (!JS_ValueToECMAUint32(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
27028 0 : return JS_FALSE;
27029 : nsresult rv;
27030 36 : nsCOMPtr<nsIIDBRequest> result;
27031 18 : rv = self->GetAll(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
27032 18 : if (NS_FAILED(rv))
27033 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27034 17 : if (!result) {
27035 0 : *vp = JSVAL_NULL;
27036 0 : return JS_TRUE;
27037 : }
27038 17 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27039 17 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27040 0 : return JS_TRUE;
27041 : }
27042 : // After this point do not use 'result'!
27043 34 : qsObjectHelper helper(result, cache);
27044 17 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27045 : }
27046 :
27047 : static JSBool
27048 1827 : nsIIDBObjectStore_Add(JSContext *cx, unsigned argc, jsval *vp)
27049 : {
27050 1827 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27051 1827 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27052 1827 : if (!obj)
27053 0 : return JS_FALSE;
27054 1827 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27055 : nsIIDBObjectStore *self;
27056 3654 : xpc_qsSelfRef selfref;
27057 3654 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27058 1827 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27059 0 : return JS_FALSE;
27060 1827 : if (argc < 1)
27061 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27062 1827 : jsval *argv = JS_ARGV(cx, vp);
27063 1827 : jsval arg0 = argv[0];
27064 1827 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
27065 : nsresult rv;
27066 3654 : nsCOMPtr<nsIIDBRequest> result;
27067 1827 : rv = self->Add(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
27068 1827 : if (NS_FAILED(rv))
27069 50 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27070 1777 : if (!result) {
27071 0 : *vp = JSVAL_NULL;
27072 0 : return JS_TRUE;
27073 : }
27074 1777 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27075 1777 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27076 0 : return JS_TRUE;
27077 : }
27078 : // After this point do not use 'result'!
27079 3554 : qsObjectHelper helper(result, cache);
27080 1777 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27081 : }
27082 :
27083 : static JSBool
27084 111 : nsIIDBObjectStore_Put(JSContext *cx, unsigned argc, jsval *vp)
27085 : {
27086 111 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27087 111 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27088 111 : if (!obj)
27089 0 : return JS_FALSE;
27090 111 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27091 : nsIIDBObjectStore *self;
27092 222 : xpc_qsSelfRef selfref;
27093 222 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27094 111 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27095 0 : return JS_FALSE;
27096 111 : if (argc < 1)
27097 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27098 111 : jsval *argv = JS_ARGV(cx, vp);
27099 111 : jsval arg0 = argv[0];
27100 111 : jsval arg1 = (1 < argc ? argv[1] : JSVAL_VOID);
27101 : nsresult rv;
27102 222 : nsCOMPtr<nsIIDBRequest> result;
27103 111 : rv = self->Put(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
27104 111 : if (NS_FAILED(rv))
27105 72 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27106 39 : if (!result) {
27107 0 : *vp = JSVAL_NULL;
27108 0 : return JS_TRUE;
27109 : }
27110 39 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27111 39 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27112 0 : return JS_TRUE;
27113 : }
27114 : // After this point do not use 'result'!
27115 78 : qsObjectHelper helper(result, cache);
27116 39 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27117 : }
27118 :
27119 : static JSBool
27120 26 : nsIIDBObjectStore_Delete(JSContext *cx, unsigned argc, jsval *vp)
27121 : {
27122 26 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27123 26 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27124 26 : if (!obj)
27125 0 : return JS_FALSE;
27126 26 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27127 : nsIIDBObjectStore *self;
27128 52 : xpc_qsSelfRef selfref;
27129 52 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27130 26 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27131 0 : return JS_FALSE;
27132 26 : if (argc < 1)
27133 5 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27134 21 : jsval *argv = JS_ARGV(cx, vp);
27135 21 : jsval arg0 = argv[0];
27136 : nsresult rv;
27137 42 : nsCOMPtr<nsIIDBRequest> result;
27138 21 : rv = self->Delete(arg0, cx, getter_AddRefs(result));
27139 21 : if (NS_FAILED(rv))
27140 4 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27141 17 : if (!result) {
27142 0 : *vp = JSVAL_NULL;
27143 0 : return JS_TRUE;
27144 : }
27145 17 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27146 17 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27147 0 : return JS_TRUE;
27148 : }
27149 : // After this point do not use 'result'!
27150 34 : qsObjectHelper helper(result, cache);
27151 17 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27152 : }
27153 :
27154 : static JSBool
27155 11 : nsIIDBObjectStore_Clear(JSContext *cx, unsigned argc, jsval *vp)
27156 : {
27157 11 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27158 11 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27159 11 : if (!obj)
27160 0 : return JS_FALSE;
27161 11 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27162 : nsIIDBObjectStore *self;
27163 22 : xpc_qsSelfRef selfref;
27164 22 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27165 11 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27166 0 : return JS_FALSE;
27167 : nsresult rv;
27168 22 : nsCOMPtr<nsIIDBRequest> result;
27169 11 : rv = self->Clear(getter_AddRefs(result));
27170 11 : if (NS_FAILED(rv))
27171 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27172 10 : if (!result) {
27173 0 : *vp = JSVAL_NULL;
27174 0 : return JS_TRUE;
27175 : }
27176 10 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27177 10 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27178 0 : return JS_TRUE;
27179 : }
27180 : // After this point do not use 'result'!
27181 20 : qsObjectHelper helper(result, cache);
27182 10 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27183 : }
27184 :
27185 : static JSBool
27186 48 : nsIIDBObjectStore_OpenCursor(JSContext *cx, unsigned argc, jsval *vp)
27187 : {
27188 48 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27189 48 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27190 48 : if (!obj)
27191 0 : return JS_FALSE;
27192 48 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27193 : nsIIDBObjectStore *self;
27194 96 : xpc_qsSelfRef selfref;
27195 96 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27196 48 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27197 0 : return JS_FALSE;
27198 48 : jsval *argv = JS_ARGV(cx, vp);
27199 48 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
27200 : xpc_qsDOMString arg1(cx, (1 < argc ? argv[1] : JSVAL_NULL), (1 < argc ? &argv[1] : NULL),
27201 : xpc_qsDOMString::eDefaultNullBehavior,
27202 96 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27203 48 : if (!arg1.IsValid())
27204 0 : return JS_FALSE;
27205 : nsresult rv;
27206 96 : nsCOMPtr<nsIIDBRequest> result;
27207 48 : rv = self->OpenCursor(arg0, arg1, cx, NS_MIN<PRUint32>(argc, 2) - 0, getter_AddRefs(result));
27208 48 : if (NS_FAILED(rv))
27209 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27210 47 : if (!result) {
27211 0 : *vp = JSVAL_NULL;
27212 0 : return JS_TRUE;
27213 : }
27214 47 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27215 47 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27216 0 : return JS_TRUE;
27217 : }
27218 : // After this point do not use 'result'!
27219 94 : qsObjectHelper helper(result, cache);
27220 47 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27221 : }
27222 :
27223 : static JSBool
27224 94 : nsIIDBObjectStore_CreateIndex(JSContext *cx, unsigned argc, jsval *vp)
27225 : {
27226 94 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27227 94 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27228 94 : if (!obj)
27229 0 : return JS_FALSE;
27230 94 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27231 : nsIIDBObjectStore *self;
27232 188 : xpc_qsSelfRef selfref;
27233 188 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27234 94 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27235 0 : return JS_FALSE;
27236 94 : if (argc < 2)
27237 2 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27238 92 : jsval *argv = JS_ARGV(cx, vp);
27239 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27240 : xpc_qsDOMString::eStringify,
27241 184 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27242 92 : if (!arg0.IsValid())
27243 0 : return JS_FALSE;
27244 92 : jsval arg1 = argv[1];
27245 92 : jsval arg2 = (2 < argc ? argv[2] : JSVAL_VOID);
27246 : nsresult rv;
27247 184 : nsCOMPtr<nsIIDBIndex> result;
27248 92 : rv = self->CreateIndex(arg0, arg1, arg2, cx, getter_AddRefs(result));
27249 92 : if (NS_FAILED(rv))
27250 7 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27251 85 : if (!result) {
27252 0 : *vp = JSVAL_NULL;
27253 0 : return JS_TRUE;
27254 : }
27255 85 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27256 85 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27257 0 : return JS_TRUE;
27258 : }
27259 : // After this point do not use 'result'!
27260 170 : qsObjectHelper helper(result, cache);
27261 85 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBIndex), &interfaces[k_nsIIDBIndex], vp);
27262 : }
27263 :
27264 : static JSBool
27265 94 : nsIIDBObjectStore_Index(JSContext *cx, unsigned argc, jsval *vp)
27266 : {
27267 94 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27268 94 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27269 94 : if (!obj)
27270 0 : return JS_FALSE;
27271 94 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27272 : nsIIDBObjectStore *self;
27273 188 : xpc_qsSelfRef selfref;
27274 188 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27275 94 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27276 0 : return JS_FALSE;
27277 94 : if (argc < 1)
27278 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27279 94 : jsval *argv = JS_ARGV(cx, vp);
27280 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27281 : xpc_qsDOMString::eStringify,
27282 188 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27283 94 : if (!arg0.IsValid())
27284 0 : return JS_FALSE;
27285 : nsresult rv;
27286 188 : nsCOMPtr<nsIIDBIndex> result;
27287 94 : rv = self->Index(arg0, getter_AddRefs(result));
27288 94 : if (NS_FAILED(rv))
27289 2 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27290 92 : if (!result) {
27291 0 : *vp = JSVAL_NULL;
27292 0 : return JS_TRUE;
27293 : }
27294 92 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27295 92 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27296 0 : return JS_TRUE;
27297 : }
27298 : // After this point do not use 'result'!
27299 184 : qsObjectHelper helper(result, cache);
27300 92 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBIndex), &interfaces[k_nsIIDBIndex], vp);
27301 : }
27302 :
27303 : static JSBool
27304 25 : nsIIDBObjectStore_DeleteIndex(JSContext *cx, unsigned argc, jsval *vp)
27305 : {
27306 25 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27307 25 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27308 25 : if (!obj)
27309 0 : return JS_FALSE;
27310 : nsIIDBObjectStore *self;
27311 50 : xpc_qsSelfRef selfref;
27312 25 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
27313 0 : return JS_FALSE;
27314 25 : if (argc < 1)
27315 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27316 25 : jsval *argv = JS_ARGV(cx, vp);
27317 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27318 : xpc_qsDOMString::eStringify,
27319 50 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27320 25 : if (!arg0.IsValid())
27321 0 : return JS_FALSE;
27322 : nsresult rv;
27323 25 : rv = self->DeleteIndex(arg0);
27324 25 : if (NS_FAILED(rv))
27325 1 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27326 24 : *vp = JSVAL_VOID;
27327 24 : return JS_TRUE;
27328 : }
27329 :
27330 : static JSBool
27331 32 : nsIIDBObjectStore_Count(JSContext *cx, unsigned argc, jsval *vp)
27332 : {
27333 32 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27334 32 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27335 32 : if (!obj)
27336 0 : return JS_FALSE;
27337 32 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27338 : nsIIDBObjectStore *self;
27339 64 : xpc_qsSelfRef selfref;
27340 64 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27341 32 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27342 0 : return JS_FALSE;
27343 32 : jsval *argv = JS_ARGV(cx, vp);
27344 32 : jsval arg0 = (0 < argc ? argv[0] : JSVAL_VOID);
27345 : nsresult rv;
27346 64 : nsCOMPtr<nsIIDBRequest> result;
27347 32 : rv = self->Count(arg0, cx, NS_MIN<PRUint32>(argc, 1) - 0, getter_AddRefs(result));
27348 32 : if (NS_FAILED(rv))
27349 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27350 32 : if (!result) {
27351 0 : *vp = JSVAL_NULL;
27352 0 : return JS_TRUE;
27353 : }
27354 32 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27355 32 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27356 0 : return JS_TRUE;
27357 : }
27358 : // After this point do not use 'result'!
27359 64 : qsObjectHelper helper(result, cache);
27360 32 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBRequest), &interfaces[k_nsIIDBRequest], vp);
27361 : }
27362 :
27363 : // === interface nsIIDBRequest
27364 :
27365 : static JSBool
27366 6 : nsIIDBRequest_GetReadyState(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27367 : {
27368 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27369 : nsIIDBRequest *self;
27370 12 : xpc_qsSelfRef selfref;
27371 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27372 0 : return JS_FALSE;
27373 : nsresult rv;
27374 12 : nsString result;
27375 6 : rv = self->GetReadyState(result);
27376 6 : if (NS_FAILED(rv))
27377 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27378 6 : return xpc::StringToJsval(cx, result, vp);
27379 : }
27380 :
27381 : static JSBool
27382 4 : nsIIDBRequest_GetSource(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27383 : {
27384 4 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27385 4 : JSObject *callee = nsnull;
27386 : nsIIDBRequest *self;
27387 8 : xpc_qsSelfRef selfref;
27388 8 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27389 4 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27390 0 : return JS_FALSE;
27391 : nsresult rv;
27392 8 : nsCOMPtr<nsISupports> result;
27393 4 : rv = self->GetSource(getter_AddRefs(result));
27394 4 : if (NS_FAILED(rv))
27395 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27396 4 : if (!result) {
27397 3 : *vp = JSVAL_NULL;
27398 3 : return JS_TRUE;
27399 : }
27400 1 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27401 1 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27402 0 : return JS_TRUE;
27403 : }
27404 : // After this point do not use 'result'!
27405 2 : qsObjectHelper helper(result, cache);
27406 1 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsISupports), &interfaces[k_nsISupports], vp);
27407 : }
27408 :
27409 : static JSBool
27410 587 : nsIIDBRequest_GetTransaction(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27411 : {
27412 587 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27413 587 : JSObject *callee = nsnull;
27414 : nsIIDBRequest *self;
27415 1174 : xpc_qsSelfRef selfref;
27416 1174 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27417 587 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27418 0 : return JS_FALSE;
27419 : nsresult rv;
27420 1174 : nsCOMPtr<nsIIDBTransaction> result;
27421 587 : rv = self->GetTransaction(getter_AddRefs(result));
27422 587 : if (NS_FAILED(rv))
27423 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27424 587 : if (!result) {
27425 1 : *vp = JSVAL_NULL;
27426 1 : return JS_TRUE;
27427 : }
27428 586 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27429 586 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27430 0 : return JS_TRUE;
27431 : }
27432 : // After this point do not use 'result'!
27433 1172 : qsObjectHelper helper(result, cache);
27434 586 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBTransaction), &interfaces[k_nsIIDBTransaction], vp);
27435 : }
27436 :
27437 : static JSBool
27438 3099 : nsIIDBRequest_GetResult(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27439 : {
27440 3099 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27441 : nsIIDBRequest *self;
27442 6198 : xpc_qsSelfRef selfref;
27443 3099 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27444 0 : return JS_FALSE;
27445 : nsresult rv;
27446 3099 : rv = self->GetResult(vp);
27447 3099 : if (NS_FAILED(rv))
27448 1 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27449 3098 : return JS_TRUE;
27450 : }
27451 :
27452 : static JSBool
27453 19 : nsIIDBRequest_GetErrorCode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27454 : {
27455 19 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27456 : nsIIDBRequest *self;
27457 38 : xpc_qsSelfRef selfref;
27458 19 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27459 0 : return JS_FALSE;
27460 : nsresult rv;
27461 : PRUint16 result;
27462 19 : rv = self->GetErrorCode(&result);
27463 19 : if (NS_FAILED(rv))
27464 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27465 19 : *vp = INT_TO_JSVAL((int32_t) result);
27466 19 : return JS_TRUE;
27467 : }
27468 :
27469 : static JSBool
27470 0 : nsIIDBRequest_GetOnsuccess(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27471 : {
27472 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27473 0 : JSObject *callee = nsnull;
27474 : nsIIDBRequest *self;
27475 0 : xpc_qsSelfRef selfref;
27476 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27477 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27478 0 : return JS_FALSE;
27479 : nsresult rv;
27480 0 : nsCOMPtr<nsIDOMEventListener> result;
27481 0 : rv = self->GetOnsuccess(getter_AddRefs(result));
27482 0 : if (NS_FAILED(rv))
27483 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27484 0 : if (!result) {
27485 0 : *vp = JSVAL_NULL;
27486 0 : return JS_TRUE;
27487 : }
27488 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27489 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27490 0 : return JS_TRUE;
27491 : }
27492 : // After this point do not use 'result'!
27493 0 : qsObjectHelper helper(result, cache);
27494 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27495 : }
27496 :
27497 : static JSBool
27498 1317 : nsIIDBRequest_SetOnsuccess(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27499 : {
27500 1317 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27501 : nsIIDBRequest *self;
27502 2634 : xpc_qsSelfRef selfref;
27503 2634 : JS::AutoValueRooter tvr(cx);
27504 1317 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27505 0 : return JS_FALSE;
27506 : nsresult rv;
27507 : nsIDOMEventListener *arg0;
27508 2634 : xpc_qsSelfRef arg0ref;
27509 1317 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27510 1317 : if (NS_FAILED(rv)) {
27511 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27512 0 : return JS_FALSE;
27513 : }
27514 1317 : rv = self->SetOnsuccess(arg0);
27515 1317 : if (NS_FAILED(rv))
27516 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27517 1317 : return JS_TRUE;
27518 : }
27519 :
27520 : static JSBool
27521 0 : nsIIDBRequest_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27522 : {
27523 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27524 0 : JSObject *callee = nsnull;
27525 : nsIIDBRequest *self;
27526 0 : xpc_qsSelfRef selfref;
27527 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27528 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27529 0 : return JS_FALSE;
27530 : nsresult rv;
27531 0 : nsCOMPtr<nsIDOMEventListener> result;
27532 0 : rv = self->GetOnerror(getter_AddRefs(result));
27533 0 : if (NS_FAILED(rv))
27534 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27535 0 : if (!result) {
27536 0 : *vp = JSVAL_NULL;
27537 0 : return JS_TRUE;
27538 : }
27539 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27540 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27541 0 : return JS_TRUE;
27542 : }
27543 : // After this point do not use 'result'!
27544 0 : qsObjectHelper helper(result, cache);
27545 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27546 : }
27547 :
27548 : static JSBool
27549 1812 : nsIIDBRequest_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27550 : {
27551 1812 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27552 : nsIIDBRequest *self;
27553 3624 : xpc_qsSelfRef selfref;
27554 3624 : JS::AutoValueRooter tvr(cx);
27555 1812 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27556 0 : return JS_FALSE;
27557 : nsresult rv;
27558 : nsIDOMEventListener *arg0;
27559 3624 : xpc_qsSelfRef arg0ref;
27560 1812 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27561 1812 : if (NS_FAILED(rv)) {
27562 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27563 0 : return JS_FALSE;
27564 : }
27565 1812 : rv = self->SetOnerror(arg0);
27566 1812 : if (NS_FAILED(rv))
27567 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27568 1812 : return JS_TRUE;
27569 : }
27570 :
27571 : // === interface nsIIDBTransaction
27572 :
27573 : static JSBool
27574 28 : nsIIDBTransaction_GetDb(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27575 : {
27576 28 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27577 28 : JSObject *callee = nsnull;
27578 : nsIIDBTransaction *self;
27579 56 : xpc_qsSelfRef selfref;
27580 56 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27581 28 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27582 0 : return JS_FALSE;
27583 : nsresult rv;
27584 56 : nsCOMPtr<nsIIDBDatabase> result;
27585 28 : rv = self->GetDb(getter_AddRefs(result));
27586 28 : if (NS_FAILED(rv))
27587 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27588 28 : if (!result) {
27589 0 : *vp = JSVAL_NULL;
27590 0 : return JS_TRUE;
27591 : }
27592 28 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27593 28 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27594 0 : return JS_TRUE;
27595 : }
27596 : // After this point do not use 'result'!
27597 56 : qsObjectHelper helper(result, cache);
27598 28 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBDatabase), &interfaces[k_nsIIDBDatabase], vp);
27599 : }
27600 :
27601 : static JSBool
27602 117 : nsIIDBTransaction_GetMode(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27603 : {
27604 117 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27605 : nsIIDBTransaction *self;
27606 234 : xpc_qsSelfRef selfref;
27607 117 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
27608 0 : return JS_FALSE;
27609 : nsresult rv;
27610 234 : nsString result;
27611 117 : rv = self->GetMode(result);
27612 117 : if (NS_FAILED(rv))
27613 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27614 117 : return xpc::StringToJsval(cx, result, vp);
27615 : }
27616 :
27617 : static JSBool
27618 142 : nsIIDBTransaction_GetObjectStoreNames(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27619 : {
27620 142 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27621 142 : JSObject *callee = nsnull;
27622 : nsIIDBTransaction *self;
27623 284 : xpc_qsSelfRef selfref;
27624 284 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27625 142 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27626 0 : return JS_FALSE;
27627 : nsresult rv;
27628 284 : nsCOMPtr<nsIDOMDOMStringList> result;
27629 142 : rv = self->GetObjectStoreNames(getter_AddRefs(result));
27630 142 : if (NS_FAILED(rv))
27631 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27632 142 : if (!result) {
27633 0 : *vp = JSVAL_NULL;
27634 0 : return JS_TRUE;
27635 : }
27636 142 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27637 142 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27638 0 : return JS_TRUE;
27639 : }
27640 : // After this point do not use 'result'!
27641 284 : qsObjectHelper helper(result, cache);
27642 142 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMDOMStringList), &interfaces[k_nsIDOMDOMStringList], vp);
27643 : }
27644 :
27645 : static JSBool
27646 479 : nsIIDBTransaction_ObjectStore(JSContext *cx, unsigned argc, jsval *vp)
27647 : {
27648 479 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27649 479 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27650 479 : if (!obj)
27651 0 : return JS_FALSE;
27652 479 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27653 : nsIIDBTransaction *self;
27654 958 : xpc_qsSelfRef selfref;
27655 958 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27656 479 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27657 0 : return JS_FALSE;
27658 479 : if (argc < 1)
27659 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27660 479 : jsval *argv = JS_ARGV(cx, vp);
27661 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27662 : xpc_qsDOMString::eStringify,
27663 958 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27664 479 : if (!arg0.IsValid())
27665 0 : return JS_FALSE;
27666 : nsresult rv;
27667 958 : nsCOMPtr<nsIIDBObjectStore> result;
27668 479 : rv = self->ObjectStore(arg0, getter_AddRefs(result));
27669 479 : if (NS_FAILED(rv))
27670 3 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27671 476 : if (!result) {
27672 0 : *vp = JSVAL_NULL;
27673 0 : return JS_TRUE;
27674 : }
27675 476 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27676 476 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27677 0 : return JS_TRUE;
27678 : }
27679 : // After this point do not use 'result'!
27680 952 : qsObjectHelper helper(result, cache);
27681 476 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBObjectStore), &interfaces[k_nsIIDBObjectStore], vp);
27682 : }
27683 :
27684 : static JSBool
27685 14 : nsIIDBTransaction_Abort(JSContext *cx, unsigned argc, jsval *vp)
27686 : {
27687 14 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27688 14 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27689 14 : if (!obj)
27690 0 : return JS_FALSE;
27691 : nsIIDBTransaction *self;
27692 28 : xpc_qsSelfRef selfref;
27693 14 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
27694 0 : return JS_FALSE;
27695 : nsresult rv;
27696 14 : rv = self->Abort();
27697 14 : if (NS_FAILED(rv))
27698 4 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27699 10 : *vp = JSVAL_VOID;
27700 10 : return JS_TRUE;
27701 : }
27702 :
27703 : static JSBool
27704 0 : nsIIDBTransaction_GetOnerror(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27705 : {
27706 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27707 0 : JSObject *callee = nsnull;
27708 : nsIIDBTransaction *self;
27709 0 : xpc_qsSelfRef selfref;
27710 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27711 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27712 0 : return JS_FALSE;
27713 : nsresult rv;
27714 0 : nsCOMPtr<nsIDOMEventListener> result;
27715 0 : rv = self->GetOnerror(getter_AddRefs(result));
27716 0 : if (NS_FAILED(rv))
27717 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27718 0 : if (!result) {
27719 0 : *vp = JSVAL_NULL;
27720 0 : return JS_TRUE;
27721 : }
27722 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27723 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27724 0 : return JS_TRUE;
27725 : }
27726 : // After this point do not use 'result'!
27727 0 : qsObjectHelper helper(result, cache);
27728 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27729 : }
27730 :
27731 : static JSBool
27732 0 : nsIIDBTransaction_SetOnerror(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27733 : {
27734 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27735 : nsIIDBTransaction *self;
27736 0 : xpc_qsSelfRef selfref;
27737 0 : JS::AutoValueRooter tvr(cx);
27738 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27739 0 : return JS_FALSE;
27740 : nsresult rv;
27741 : nsIDOMEventListener *arg0;
27742 0 : xpc_qsSelfRef arg0ref;
27743 0 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27744 0 : if (NS_FAILED(rv)) {
27745 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27746 0 : return JS_FALSE;
27747 : }
27748 0 : rv = self->SetOnerror(arg0);
27749 0 : if (NS_FAILED(rv))
27750 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27751 0 : return JS_TRUE;
27752 : }
27753 :
27754 : static JSBool
27755 1 : nsIIDBTransaction_GetOncomplete(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27756 : {
27757 1 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27758 1 : JSObject *callee = nsnull;
27759 : nsIIDBTransaction *self;
27760 2 : xpc_qsSelfRef selfref;
27761 2 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27762 1 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27763 0 : return JS_FALSE;
27764 : nsresult rv;
27765 2 : nsCOMPtr<nsIDOMEventListener> result;
27766 1 : rv = self->GetOncomplete(getter_AddRefs(result));
27767 1 : if (NS_FAILED(rv))
27768 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27769 1 : if (!result) {
27770 1 : *vp = JSVAL_NULL;
27771 1 : return JS_TRUE;
27772 : }
27773 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27774 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27775 0 : return JS_TRUE;
27776 : }
27777 : // After this point do not use 'result'!
27778 0 : qsObjectHelper helper(result, cache);
27779 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27780 : }
27781 :
27782 : static JSBool
27783 277 : nsIIDBTransaction_SetOncomplete(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27784 : {
27785 277 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27786 : nsIIDBTransaction *self;
27787 554 : xpc_qsSelfRef selfref;
27788 554 : JS::AutoValueRooter tvr(cx);
27789 277 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27790 0 : return JS_FALSE;
27791 : nsresult rv;
27792 : nsIDOMEventListener *arg0;
27793 554 : xpc_qsSelfRef arg0ref;
27794 277 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27795 277 : if (NS_FAILED(rv)) {
27796 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27797 0 : return JS_FALSE;
27798 : }
27799 277 : rv = self->SetOncomplete(arg0);
27800 277 : if (NS_FAILED(rv))
27801 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27802 277 : return JS_TRUE;
27803 : }
27804 :
27805 : static JSBool
27806 2 : nsIIDBTransaction_GetOnabort(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27807 : {
27808 2 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27809 2 : JSObject *callee = nsnull;
27810 : nsIIDBTransaction *self;
27811 4 : xpc_qsSelfRef selfref;
27812 4 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27813 2 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27814 0 : return JS_FALSE;
27815 : nsresult rv;
27816 4 : nsCOMPtr<nsIDOMEventListener> result;
27817 2 : rv = self->GetOnabort(getter_AddRefs(result));
27818 2 : if (NS_FAILED(rv))
27819 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27820 2 : if (!result) {
27821 2 : *vp = JSVAL_NULL;
27822 2 : return JS_TRUE;
27823 : }
27824 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27825 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27826 0 : return JS_TRUE;
27827 : }
27828 : // After this point do not use 'result'!
27829 0 : qsObjectHelper helper(result, cache);
27830 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27831 : }
27832 :
27833 : static JSBool
27834 6 : nsIIDBTransaction_SetOnabort(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27835 : {
27836 6 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27837 : nsIIDBTransaction *self;
27838 12 : xpc_qsSelfRef selfref;
27839 12 : JS::AutoValueRooter tvr(cx);
27840 6 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
27841 0 : return JS_FALSE;
27842 : nsresult rv;
27843 : nsIDOMEventListener *arg0;
27844 12 : xpc_qsSelfRef arg0ref;
27845 6 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
27846 6 : if (NS_FAILED(rv)) {
27847 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27848 0 : return JS_FALSE;
27849 : }
27850 6 : rv = self->SetOnabort(arg0);
27851 6 : if (NS_FAILED(rv))
27852 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
27853 6 : return JS_TRUE;
27854 : }
27855 :
27856 : // === interface nsIIDBFactory
27857 :
27858 : static JSBool
27859 76 : nsIIDBFactory_Open(JSContext *cx, unsigned argc, jsval *vp)
27860 : {
27861 76 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27862 76 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27863 76 : if (!obj)
27864 0 : return JS_FALSE;
27865 76 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27866 : nsIIDBFactory *self;
27867 152 : xpc_qsSelfRef selfref;
27868 152 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27869 76 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27870 0 : return JS_FALSE;
27871 76 : if (argc < 1)
27872 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27873 76 : jsval *argv = JS_ARGV(cx, vp);
27874 : xpc_qsDOMString arg0(cx, argv[0], &argv[0],
27875 : xpc_qsDOMString::eStringify,
27876 152 : xpc_qsDOMString::eDefaultUndefinedBehavior);
27877 76 : if (!arg0.IsValid())
27878 0 : return JS_FALSE;
27879 : PRInt64 arg1;
27880 76 : if (!xpc_qsValueToInt64(cx, (1 < argc ? argv[1] : JSVAL_NULL), &arg1))
27881 0 : return JS_FALSE;
27882 : nsresult rv;
27883 152 : nsCOMPtr<nsIIDBOpenDBRequest> result;
27884 76 : rv = self->Open(arg0, arg1, NS_MIN<PRUint32>(argc, 2) - 1, getter_AddRefs(result));
27885 76 : if (NS_FAILED(rv))
27886 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27887 76 : if (!result) {
27888 0 : *vp = JSVAL_NULL;
27889 0 : return JS_TRUE;
27890 : }
27891 76 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27892 76 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27893 0 : return JS_TRUE;
27894 : }
27895 : // After this point do not use 'result'!
27896 152 : qsObjectHelper helper(result, cache);
27897 76 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBOpenDBRequest), &interfaces[k_nsIIDBOpenDBRequest], vp);
27898 : }
27899 :
27900 : static JSBool
27901 0 : nsIIDBFactory_DeleteDatabase(JSContext *cx, unsigned argc, jsval *vp)
27902 : {
27903 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27904 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27905 0 : if (!obj)
27906 0 : return JS_FALSE;
27907 0 : JSObject *callee = JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));
27908 : nsIIDBFactory *self;
27909 0 : xpc_qsSelfRef selfref;
27910 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27911 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, &vp[1], &lccx, true))
27912 0 : return JS_FALSE;
27913 0 : if (argc < 1)
27914 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27915 0 : jsval *argv = JS_ARGV(cx, vp);
27916 0 : xpc_qsAString arg0(cx, argv[0], &argv[0]);
27917 0 : if (!arg0.IsValid())
27918 0 : return JS_FALSE;
27919 : nsresult rv;
27920 0 : nsCOMPtr<nsIIDBOpenDBRequest> result;
27921 0 : rv = self->DeleteDatabase(arg0, getter_AddRefs(result));
27922 0 : if (NS_FAILED(rv))
27923 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27924 0 : if (!result) {
27925 0 : *vp = JSVAL_NULL;
27926 0 : return JS_TRUE;
27927 : }
27928 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27929 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27930 0 : return JS_TRUE;
27931 : }
27932 : // After this point do not use 'result'!
27933 0 : qsObjectHelper helper(result, cache);
27934 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIIDBOpenDBRequest), &interfaces[k_nsIIDBOpenDBRequest], vp);
27935 : }
27936 :
27937 : static JSBool
27938 2864 : nsIIDBFactory_Cmp(JSContext *cx, unsigned argc, jsval *vp)
27939 : {
27940 2864 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27941 2864 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
27942 2864 : if (!obj)
27943 0 : return JS_FALSE;
27944 : nsIIDBFactory *self;
27945 5728 : xpc_qsSelfRef selfref;
27946 2864 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
27947 0 : return JS_FALSE;
27948 2864 : if (argc < 2)
27949 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
27950 2864 : jsval *argv = JS_ARGV(cx, vp);
27951 2864 : jsval arg0 = argv[0];
27952 2864 : jsval arg1 = argv[1];
27953 : nsresult rv;
27954 : PRInt16 result;
27955 2864 : rv = self->Cmp(arg0, arg1, cx, &result);
27956 2864 : if (NS_FAILED(rv))
27957 40 : return xpc_qsThrowMethodFailed(cx, rv, vp);
27958 2824 : *vp = INT_TO_JSVAL((int32_t) result);
27959 2824 : return JS_TRUE;
27960 : }
27961 :
27962 : // === interface nsIIDBOpenDBRequest
27963 :
27964 : static JSBool
27965 0 : nsIIDBOpenDBRequest_GetOnblocked(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
27966 : {
27967 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27968 0 : JSObject *callee = nsnull;
27969 : nsIIDBOpenDBRequest *self;
27970 0 : xpc_qsSelfRef selfref;
27971 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
27972 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
27973 0 : return JS_FALSE;
27974 : nsresult rv;
27975 0 : nsCOMPtr<nsIDOMEventListener> result;
27976 0 : rv = self->GetOnblocked(getter_AddRefs(result));
27977 0 : if (NS_FAILED(rv))
27978 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
27979 0 : if (!result) {
27980 0 : *vp = JSVAL_NULL;
27981 0 : return JS_TRUE;
27982 : }
27983 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
27984 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
27985 0 : return JS_TRUE;
27986 : }
27987 : // After this point do not use 'result'!
27988 0 : qsObjectHelper helper(result, cache);
27989 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
27990 : }
27991 :
27992 : static JSBool
27993 4 : nsIIDBOpenDBRequest_SetOnblocked(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
27994 : {
27995 4 : XPC_QS_ASSERT_CONTEXT_OK(cx);
27996 : nsIIDBOpenDBRequest *self;
27997 8 : xpc_qsSelfRef selfref;
27998 8 : JS::AutoValueRooter tvr(cx);
27999 4 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
28000 0 : return JS_FALSE;
28001 : nsresult rv;
28002 : nsIDOMEventListener *arg0;
28003 8 : xpc_qsSelfRef arg0ref;
28004 4 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
28005 4 : if (NS_FAILED(rv)) {
28006 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
28007 0 : return JS_FALSE;
28008 : }
28009 4 : rv = self->SetOnblocked(arg0);
28010 4 : if (NS_FAILED(rv))
28011 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
28012 4 : return JS_TRUE;
28013 : }
28014 :
28015 : static JSBool
28016 0 : nsIIDBOpenDBRequest_GetOnupgradeneeded(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28017 : {
28018 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28019 0 : JSObject *callee = nsnull;
28020 : nsIIDBOpenDBRequest *self;
28021 0 : xpc_qsSelfRef selfref;
28022 0 : XPCLazyCallContext lccx(JS_CALLER, cx, obj);
28023 0 : if (!xpc_qsUnwrapThis(cx, obj, callee, &self, &selfref.ptr, vp, &lccx, true))
28024 0 : return JS_FALSE;
28025 : nsresult rv;
28026 0 : nsCOMPtr<nsIDOMEventListener> result;
28027 0 : rv = self->GetOnupgradeneeded(getter_AddRefs(result));
28028 0 : if (NS_FAILED(rv))
28029 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28030 0 : if (!result) {
28031 0 : *vp = JSVAL_NULL;
28032 0 : return JS_TRUE;
28033 : }
28034 0 : nsWrapperCache* cache = xpc_qsGetWrapperCache(result);
28035 0 : if (xpc_FastGetCachedWrapper(cache, obj, vp)) {
28036 0 : return JS_TRUE;
28037 : }
28038 : // After this point do not use 'result'!
28039 0 : qsObjectHelper helper(result, cache);
28040 0 : return xpc_qsXPCOMObjectToJsval(lccx, helper, &NS_GET_IID(nsIDOMEventListener), &interfaces[k_nsIDOMEventListener], vp);
28041 : }
28042 :
28043 : static JSBool
28044 73 : nsIIDBOpenDBRequest_SetOnupgradeneeded(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
28045 : {
28046 73 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28047 : nsIIDBOpenDBRequest *self;
28048 146 : xpc_qsSelfRef selfref;
28049 146 : JS::AutoValueRooter tvr(cx);
28050 73 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull, true))
28051 0 : return JS_FALSE;
28052 : nsresult rv;
28053 : nsIDOMEventListener *arg0;
28054 146 : xpc_qsSelfRef arg0ref;
28055 73 : rv = xpc_qsUnwrapArg<nsIDOMEventListener>(cx, *vp, &arg0, &arg0ref.ptr, vp);
28056 73 : if (NS_FAILED(rv)) {
28057 0 : xpc_qsThrowBadSetterValue(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
28058 0 : return JS_FALSE;
28059 : }
28060 73 : rv = self->SetOnupgradeneeded(arg0);
28061 73 : if (NS_FAILED(rv))
28062 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);
28063 73 : return JS_TRUE;
28064 : }
28065 :
28066 : // === interface nsIIDBVersionChangeEvent
28067 :
28068 : static JSBool
28069 5 : nsIIDBVersionChangeEvent_GetOldVersion(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28070 : {
28071 5 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28072 : nsIIDBVersionChangeEvent *self;
28073 10 : xpc_qsSelfRef selfref;
28074 5 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
28075 0 : return JS_FALSE;
28076 : nsresult rv;
28077 : PRUint64 result;
28078 5 : rv = self->GetOldVersion(&result);
28079 5 : if (NS_FAILED(rv))
28080 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28081 5 : return xpc_qsUint64ToJsval(cx, result, vp);
28082 : }
28083 :
28084 : static JSBool
28085 5 : nsIIDBVersionChangeEvent_GetNewVersion(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28086 : {
28087 5 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28088 : nsIIDBVersionChangeEvent *self;
28089 10 : xpc_qsSelfRef selfref;
28090 5 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
28091 0 : return JS_FALSE;
28092 : nsresult rv;
28093 : PRUint64 result;
28094 5 : rv = self->GetNewVersion(&result);
28095 5 : if (NS_FAILED(rv))
28096 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28097 5 : return xpc_qsUint64ToJsval(cx, result, vp);
28098 : }
28099 :
28100 : // === interface nsIIndexedDatabaseUsageCallback
28101 :
28102 : static JSBool
28103 0 : nsIIndexedDatabaseUsageCallback_OnUsageResult(JSContext *cx, unsigned argc, jsval *vp)
28104 : {
28105 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28106 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28107 0 : if (!obj)
28108 0 : return JS_FALSE;
28109 : nsIIndexedDatabaseUsageCallback *self;
28110 0 : xpc_qsSelfRef selfref;
28111 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28112 0 : return JS_FALSE;
28113 0 : if (argc < 3)
28114 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28115 0 : jsval *argv = JS_ARGV(cx, vp);
28116 : nsresult rv;
28117 : nsIURI *arg0;
28118 0 : xpc_qsSelfRef arg0ref;
28119 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28120 0 : if (NS_FAILED(rv)) {
28121 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28122 0 : return JS_FALSE;
28123 : }
28124 : PRUint64 arg1;
28125 0 : if (!xpc_qsValueToUint64(cx, argv[1], &arg1))
28126 0 : return JS_FALSE;
28127 : PRUint64 arg2;
28128 0 : if (!xpc_qsValueToUint64(cx, argv[2], &arg2))
28129 0 : return JS_FALSE;
28130 0 : rv = self->OnUsageResult(arg0, arg1, arg2);
28131 0 : if (NS_FAILED(rv))
28132 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28133 0 : *vp = JSVAL_VOID;
28134 0 : return JS_TRUE;
28135 : }
28136 :
28137 : // === interface nsIIndexedDatabaseManager
28138 :
28139 : static JSBool
28140 0 : nsIIndexedDatabaseManager_GetUsageForURI(JSContext *cx, unsigned argc, jsval *vp)
28141 : {
28142 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28143 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28144 0 : if (!obj)
28145 0 : return JS_FALSE;
28146 : nsIIndexedDatabaseManager *self;
28147 0 : xpc_qsSelfRef selfref;
28148 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28149 0 : return JS_FALSE;
28150 0 : if (argc < 2)
28151 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28152 0 : jsval *argv = JS_ARGV(cx, vp);
28153 : nsresult rv;
28154 : nsIURI *arg0;
28155 0 : xpc_qsSelfRef arg0ref;
28156 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28157 0 : if (NS_FAILED(rv)) {
28158 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28159 0 : return JS_FALSE;
28160 : }
28161 : nsIIndexedDatabaseUsageCallback *arg1;
28162 0 : xpc_qsSelfRef arg1ref;
28163 0 : rv = xpc_qsUnwrapArg<nsIIndexedDatabaseUsageCallback>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
28164 0 : if (NS_FAILED(rv)) {
28165 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
28166 0 : return JS_FALSE;
28167 : }
28168 0 : rv = self->GetUsageForURI(arg0, arg1);
28169 0 : if (NS_FAILED(rv))
28170 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28171 0 : *vp = JSVAL_VOID;
28172 0 : return JS_TRUE;
28173 : }
28174 :
28175 : static JSBool
28176 0 : nsIIndexedDatabaseManager_CancelGetUsageForURI(JSContext *cx, unsigned argc, jsval *vp)
28177 : {
28178 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28179 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28180 0 : if (!obj)
28181 0 : return JS_FALSE;
28182 : nsIIndexedDatabaseManager *self;
28183 0 : xpc_qsSelfRef selfref;
28184 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28185 0 : return JS_FALSE;
28186 0 : if (argc < 2)
28187 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28188 0 : jsval *argv = JS_ARGV(cx, vp);
28189 : nsresult rv;
28190 : nsIURI *arg0;
28191 0 : xpc_qsSelfRef arg0ref;
28192 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28193 0 : if (NS_FAILED(rv)) {
28194 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28195 0 : return JS_FALSE;
28196 : }
28197 : nsIIndexedDatabaseUsageCallback *arg1;
28198 0 : xpc_qsSelfRef arg1ref;
28199 0 : rv = xpc_qsUnwrapArg<nsIIndexedDatabaseUsageCallback>(cx, argv[1], &arg1, &arg1ref.ptr, &argv[1]);
28200 0 : if (NS_FAILED(rv)) {
28201 0 : xpc_qsThrowBadArg(cx, rv, vp, 1);
28202 0 : return JS_FALSE;
28203 : }
28204 0 : rv = self->CancelGetUsageForURI(arg0, arg1);
28205 0 : if (NS_FAILED(rv))
28206 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28207 0 : *vp = JSVAL_VOID;
28208 0 : return JS_TRUE;
28209 : }
28210 :
28211 : static JSBool
28212 0 : nsIIndexedDatabaseManager_ClearDatabasesForURI(JSContext *cx, unsigned argc, jsval *vp)
28213 : {
28214 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28215 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28216 0 : if (!obj)
28217 0 : return JS_FALSE;
28218 : nsIIndexedDatabaseManager *self;
28219 0 : xpc_qsSelfRef selfref;
28220 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28221 0 : return JS_FALSE;
28222 0 : if (argc < 1)
28223 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28224 0 : jsval *argv = JS_ARGV(cx, vp);
28225 : nsresult rv;
28226 : nsIURI *arg0;
28227 0 : xpc_qsSelfRef arg0ref;
28228 0 : rv = xpc_qsUnwrapArg<nsIURI>(cx, argv[0], &arg0, &arg0ref.ptr, &argv[0]);
28229 0 : if (NS_FAILED(rv)) {
28230 0 : xpc_qsThrowBadArg(cx, rv, vp, 0);
28231 0 : return JS_FALSE;
28232 : }
28233 0 : rv = self->ClearDatabasesForURI(arg0);
28234 0 : if (NS_FAILED(rv))
28235 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28236 0 : *vp = JSVAL_VOID;
28237 0 : return JS_TRUE;
28238 : }
28239 :
28240 : static JSBool
28241 0 : nsIIndexedDatabaseManager_InitWindowless(JSContext *cx, unsigned argc, jsval *vp)
28242 : {
28243 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28244 0 : JSObject *obj = JS_THIS_OBJECT(cx, vp);
28245 0 : if (!obj)
28246 0 : return JS_FALSE;
28247 : nsIIndexedDatabaseManager *self;
28248 0 : xpc_qsSelfRef selfref;
28249 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, &vp[1], nsnull, true))
28250 0 : return JS_FALSE;
28251 0 : if (argc < 1)
28252 0 : return xpc_qsThrow(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
28253 0 : jsval *argv = JS_ARGV(cx, vp);
28254 0 : jsval arg0 = argv[0];
28255 : nsresult rv;
28256 0 : rv = self->InitWindowless(arg0, cx);
28257 0 : if (NS_FAILED(rv))
28258 0 : return xpc_qsThrowMethodFailed(cx, rv, vp);
28259 0 : *vp = JSVAL_VOID;
28260 0 : return JS_TRUE;
28261 : }
28262 :
28263 : // === interface nsIDOMDOMError
28264 :
28265 : static JSBool
28266 0 : nsIDOMDOMError_GetName(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
28267 : {
28268 0 : XPC_QS_ASSERT_CONTEXT_OK(cx);
28269 : nsIDOMDOMError *self;
28270 0 : xpc_qsSelfRef selfref;
28271 0 : if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull, true))
28272 0 : return JS_FALSE;
28273 : nsresult rv;
28274 0 : nsString result;
28275 0 : rv = self->GetName(result);
28276 0 : if (NS_FAILED(rv))
28277 0 : return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
28278 0 : return xpc::StringToJsval(cx, result, vp);
28279 : }
28280 :
28281 : // === Definer
28282 :
28283 : static const xpc_qsPropertySpec all_properties[] = {
28284 : // nsIDOMWindow (index 0)
28285 : {0, nsIDOMWindow_GetName, nsIDOMWindow_SetName},
28286 : {5, nsIDOMWindow_GetScriptableParent, xpc_qsGetterOnlyPropertyStub},
28287 : {12, nsIDOMWindow_GetScriptableTop, xpc_qsGetterOnlyPropertyStub},
28288 : {16, nsIDOMWindow_GetSelf, xpc_qsGetterOnlyPropertyStub},
28289 : {65, nsIDOMWindow_GetSessionStorage, xpc_qsGetterOnlyPropertyStub},
28290 : {80, nsIDOMWindow_GetLocalStorage, xpc_qsGetterOnlyPropertyStub},
28291 : {93, nsIDOMWindow_GetOnmouseenter, nsIDOMWindow_SetOnmouseenter},
28292 : {106, nsIDOMWindow_GetOnmouseleave, nsIDOMWindow_SetOnmouseleave},
28293 : // nsIDOMWindow_globalStorage (index 8)
28294 : {119, nsIDOMWindow_globalStorage_GetGlobalStorage, xpc_qsGetterOnlyPropertyStub},
28295 : // nsIDOMScreen (index 9)
28296 : {12, nsIDOMScreen_GetTop, xpc_qsGetterOnlyPropertyStub},
28297 : {138, nsIDOMScreen_GetHeight, xpc_qsGetterOnlyPropertyStub},
28298 : {145, nsIDOMScreen_GetWidth, xpc_qsGetterOnlyPropertyStub},
28299 : {151, nsIDOMScreen_GetLeft, xpc_qsGetterOnlyPropertyStub},
28300 : // nsIDOMClientRect (index 13)
28301 : {151, nsIDOMClientRect_GetLeft, xpc_qsGetterOnlyPropertyStub},
28302 : {12, nsIDOMClientRect_GetTop, xpc_qsGetterOnlyPropertyStub},
28303 : {156, nsIDOMClientRect_GetRight, xpc_qsGetterOnlyPropertyStub},
28304 : {162, nsIDOMClientRect_GetBottom, xpc_qsGetterOnlyPropertyStub},
28305 : {145, nsIDOMClientRect_GetWidth, xpc_qsGetterOnlyPropertyStub},
28306 : {138, nsIDOMClientRect_GetHeight, xpc_qsGetterOnlyPropertyStub},
28307 : // nsIDOMClientRectList (index 19)
28308 : {169, nsIDOMClientRectList_GetLength, xpc_qsGetterOnlyPropertyStub},
28309 : // nsIDOMPaintRequest (index 20)
28310 : {181, nsIDOMPaintRequest_GetClientRect, xpc_qsGetterOnlyPropertyStub},
28311 : {192, nsIDOMPaintRequest_GetReason, xpc_qsGetterOnlyPropertyStub},
28312 : // nsIDOMPaintRequestList (index 22)
28313 : {169, nsIDOMPaintRequestList_GetLength, xpc_qsGetterOnlyPropertyStub},
28314 : // nsIDOMCanvasRenderingContext2D (index 23)
28315 : {199, nsIDOMCanvasRenderingContext2D_GetCanvas, xpc_qsGetterOnlyPropertyStub},
28316 : {265, nsIDOMCanvasRenderingContext2D_GetMozCurrentTransform, nsIDOMCanvasRenderingContext2D_SetMozCurrentTransform},
28317 : {285, nsIDOMCanvasRenderingContext2D_GetMozCurrentTransformInverse, nsIDOMCanvasRenderingContext2D_SetMozCurrentTransformInverse},
28318 : {312, nsIDOMCanvasRenderingContext2D_GetGlobalAlpha, nsIDOMCanvasRenderingContext2D_SetGlobalAlpha},
28319 : {324, nsIDOMCanvasRenderingContext2D_GetGlobalCompositeOperation, nsIDOMCanvasRenderingContext2D_SetGlobalCompositeOperation},
28320 : {349, nsIDOMCanvasRenderingContext2D_GetStrokeStyle, nsIDOMCanvasRenderingContext2D_SetStrokeStyle},
28321 : {361, nsIDOMCanvasRenderingContext2D_GetFillStyle, nsIDOMCanvasRenderingContext2D_SetFillStyle},
28322 : {371, nsIDOMCanvasRenderingContext2D_GetMozFillRule, nsIDOMCanvasRenderingContext2D_SetMozFillRule},
28323 : {439, nsIDOMCanvasRenderingContext2D_GetLineWidth, nsIDOMCanvasRenderingContext2D_SetLineWidth},
28324 : {449, nsIDOMCanvasRenderingContext2D_GetLineCap, nsIDOMCanvasRenderingContext2D_SetLineCap},
28325 : {457, nsIDOMCanvasRenderingContext2D_GetLineJoin, nsIDOMCanvasRenderingContext2D_SetLineJoin},
28326 : {466, nsIDOMCanvasRenderingContext2D_GetMiterLimit, nsIDOMCanvasRenderingContext2D_SetMiterLimit},
28327 : {477, nsIDOMCanvasRenderingContext2D_GetMozDash, nsIDOMCanvasRenderingContext2D_SetMozDash},
28328 : {485, nsIDOMCanvasRenderingContext2D_GetMozDashOffset, nsIDOMCanvasRenderingContext2D_SetMozDashOffset},
28329 : {499, nsIDOMCanvasRenderingContext2D_GetShadowOffsetX, nsIDOMCanvasRenderingContext2D_SetShadowOffsetX},
28330 : {513, nsIDOMCanvasRenderingContext2D_GetShadowOffsetY, nsIDOMCanvasRenderingContext2D_SetShadowOffsetY},
28331 : {527, nsIDOMCanvasRenderingContext2D_GetShadowBlur, nsIDOMCanvasRenderingContext2D_SetShadowBlur},
28332 : {538, nsIDOMCanvasRenderingContext2D_GetShadowColor, nsIDOMCanvasRenderingContext2D_SetShadowColor},
28333 : {677, nsIDOMCanvasRenderingContext2D_GetFont, nsIDOMCanvasRenderingContext2D_SetFont},
28334 : {682, nsIDOMCanvasRenderingContext2D_GetTextAlign, nsIDOMCanvasRenderingContext2D_SetTextAlign},
28335 : {692, nsIDOMCanvasRenderingContext2D_GetTextBaseline, nsIDOMCanvasRenderingContext2D_SetTextBaseline},
28336 : {737, nsIDOMCanvasRenderingContext2D_GetMozTextStyle, nsIDOMCanvasRenderingContext2D_SetMozTextStyle},
28337 : {816, nsIDOMCanvasRenderingContext2D_GetMozImageSmoothingEnabled, nsIDOMCanvasRenderingContext2D_SetMozImageSmoothingEnabled},
28338 : // nsIDOMTextMetrics (index 46)
28339 : {145, nsIDOMTextMetrics_GetWidth, xpc_qsGetterOnlyPropertyStub},
28340 : // nsIDOMCharacterData (index 47)
28341 : {885, nsIDOMCharacterData_GetData, nsIDOMCharacterData_SetData},
28342 : {169, nsIDOMCharacterData_GetLength, xpc_qsGetterOnlyPropertyStub},
28343 : // nsIDOMDocument (index 49)
28344 : {890, nsIDOMDocument_GetDocumentElement, xpc_qsGetterOnlyPropertyStub},
28345 : {906, nsIDOMDocument_GetImplementation, xpc_qsGetterOnlyPropertyStub},
28346 : {942, nsIDOMDocument_GetDoctype, xpc_qsGetterOnlyPropertyStub},
28347 : {1067, nsIDOMDocument_GetDocumentURI, xpc_qsGetterOnlyPropertyStub},
28348 : {1089, nsIDOMDocument_GetDefaultView, xpc_qsGetterOnlyPropertyStub},
28349 : {1155, nsIDOMDocument_GetTitle, nsIDOMDocument_SetTitle},
28350 : {1161, nsIDOMDocument_GetReferrer, xpc_qsGetterOnlyPropertyStub},
28351 : {1196, nsIDOMDocument_GetActiveElement, xpc_qsGetterOnlyPropertyStub},
28352 : {1210, nsIDOMDocument_GetOnreadystatechange, nsIDOMDocument_SetOnreadystatechange},
28353 : {93, nsIDOMDocument_GetOnmouseenter, nsIDOMDocument_SetOnmouseenter},
28354 : {106, nsIDOMDocument_GetOnmouseleave, nsIDOMDocument_SetOnmouseleave},
28355 : // nsIDOMElement (index 60)
28356 : {1304, nsIDOMElement_GetTagName, xpc_qsGetterOnlyPropertyStub},
28357 : {93, nsIDOMElement_GetOnmouseenter, nsIDOMElement_SetOnmouseenter},
28358 : {106, nsIDOMElement_GetOnmouseleave, nsIDOMElement_SetOnmouseleave},
28359 : // nsIDOMNamedNodeMap (index 63)
28360 : {169, nsIDOMNamedNodeMap_GetLength, xpc_qsGetterOnlyPropertyStub},
28361 : // nsIDOMNode (index 64)
28362 : {1355, nsIDOMNode_GetNodeName, xpc_qsGetterOnlyPropertyStub},
28363 : {1364, nsIDOMNode_GetNodeValue, nsIDOMNode_SetNodeValue},
28364 : {1374, nsIDOMNode_GetNodeType, xpc_qsGetterOnlyPropertyStub},
28365 : {1383, nsIDOMNode_GetParentNode, xpc_qsGetterOnlyPropertyStub},
28366 : {1394, nsIDOMNode_GetParentElement, xpc_qsGetterOnlyPropertyStub},
28367 : {1408, nsIDOMNode_GetChildNodes, xpc_qsGetterOnlyPropertyStub},
28368 : {1419, nsIDOMNode_GetFirstChild, xpc_qsGetterOnlyPropertyStub},
28369 : {1430, nsIDOMNode_GetLastChild, xpc_qsGetterOnlyPropertyStub},
28370 : {1440, nsIDOMNode_GetPreviousSibling, xpc_qsGetterOnlyPropertyStub},
28371 : {1456, nsIDOMNode_GetNextSibling, xpc_qsGetterOnlyPropertyStub},
28372 : {1468, nsIDOMNode_GetAttributes, xpc_qsGetterOnlyPropertyStub},
28373 : {1479, nsIDOMNode_GetOwnerDocument, xpc_qsGetterOnlyPropertyStub},
28374 : {1589, nsIDOMNode_GetNamespaceURI, xpc_qsGetterOnlyPropertyStub},
28375 : {1602, nsIDOMNode_GetPrefix, xpc_qsGetterOnlyPropertyStub},
28376 : {1609, nsIDOMNode_GetLocalName, xpc_qsGetterOnlyPropertyStub},
28377 : {1633, nsIDOMNode_GetDOMBaseURI, xpc_qsGetterOnlyPropertyStub},
28378 : {1665, nsIDOMNode_GetTextContent, nsIDOMNode_SetTextContent},
28379 : // nsIDOMNodeList (index 81)
28380 : {169, nsIDOMNodeList_GetLength, xpc_qsGetterOnlyPropertyStub},
28381 : // nsIDOMDOMStringList (index 82)
28382 : {169, nsIDOMDOMStringList_GetLength, xpc_qsGetterOnlyPropertyStub},
28383 : // nsIDOMDOMTokenList (index 83)
28384 : {169, nsIDOMDOMTokenList_GetLength, xpc_qsGetterOnlyPropertyStub},
28385 : // nsIDOMDOMSettableTokenList (index 84)
28386 : {1905, nsIDOMDOMSettableTokenList_GetValue, nsIDOMDOMSettableTokenList_SetValue},
28387 : // nsIDOMNSElement (index 85)
28388 : {1964, nsIDOMNSElement_GetScrollTop, nsIDOMNSElement_SetScrollTop},
28389 : {1974, nsIDOMNSElement_GetScrollLeft, nsIDOMNSElement_SetScrollLeft},
28390 : {1985, nsIDOMNSElement_GetScrollHeight, xpc_qsGetterOnlyPropertyStub},
28391 : {1998, nsIDOMNSElement_GetScrollWidth, xpc_qsGetterOnlyPropertyStub},
28392 : {2010, nsIDOMNSElement_GetClientTop, xpc_qsGetterOnlyPropertyStub},
28393 : {2020, nsIDOMNSElement_GetClientLeft, xpc_qsGetterOnlyPropertyStub},
28394 : {2031, nsIDOMNSElement_GetClientHeight, xpc_qsGetterOnlyPropertyStub},
28395 : {2044, nsIDOMNSElement_GetClientWidth, xpc_qsGetterOnlyPropertyStub},
28396 : {2056, nsIDOMNSElement_GetFirstElementChild, xpc_qsGetterOnlyPropertyStub},
28397 : {2074, nsIDOMNSElement_GetLastElementChild, xpc_qsGetterOnlyPropertyStub},
28398 : {2091, nsIDOMNSElement_GetPreviousElementSibling, xpc_qsGetterOnlyPropertyStub},
28399 : {2114, nsIDOMNSElement_GetNextElementSibling, xpc_qsGetterOnlyPropertyStub},
28400 : {2133, nsIDOMNSElement_GetChildElementCount, xpc_qsGetterOnlyPropertyStub},
28401 : {2151, nsIDOMNSElement_GetChildren, xpc_qsGetterOnlyPropertyStub},
28402 : {2160, nsIDOMNSElement_GetClassList, xpc_qsGetterOnlyPropertyStub},
28403 : // nsIDOMElementCSSInlineStyle (index 100)
28404 : {2215, nsIDOMElementCSSInlineStyle_GetStyle, xpc_qsGetterOnlyPropertyStub},
28405 : // nsIDOMCSS2Properties (index 101)
28406 : {2221, nsIDOMCSS2Properties_GetBackground, nsIDOMCSS2Properties_SetBackground},
28407 : {2232, nsIDOMCSS2Properties_GetBackgroundAttachment, nsIDOMCSS2Properties_SetBackgroundAttachment},
28408 : {2253, nsIDOMCSS2Properties_GetBackgroundColor, nsIDOMCSS2Properties_SetBackgroundColor},
28409 : {2269, nsIDOMCSS2Properties_GetBackgroundImage, nsIDOMCSS2Properties_SetBackgroundImage},
28410 : {2285, nsIDOMCSS2Properties_GetBackgroundPosition, nsIDOMCSS2Properties_SetBackgroundPosition},
28411 : {2304, nsIDOMCSS2Properties_GetBackgroundRepeat, nsIDOMCSS2Properties_SetBackgroundRepeat},
28412 : {2321, nsIDOMCSS2Properties_GetBorder, nsIDOMCSS2Properties_SetBorder},
28413 : {2328, nsIDOMCSS2Properties_GetBorderCollapse, nsIDOMCSS2Properties_SetBorderCollapse},
28414 : {2343, nsIDOMCSS2Properties_GetBorderColor, nsIDOMCSS2Properties_SetBorderColor},
28415 : {2355, nsIDOMCSS2Properties_GetBorderSpacing, nsIDOMCSS2Properties_SetBorderSpacing},
28416 : {2369, nsIDOMCSS2Properties_GetBorderStyle, nsIDOMCSS2Properties_SetBorderStyle},
28417 : {2381, nsIDOMCSS2Properties_GetBorderTop, nsIDOMCSS2Properties_SetBorderTop},
28418 : {2391, nsIDOMCSS2Properties_GetBorderRight, nsIDOMCSS2Properties_SetBorderRight},
28419 : {2403, nsIDOMCSS2Properties_GetBorderBottom, nsIDOMCSS2Properties_SetBorderBottom},
28420 : {2416, nsIDOMCSS2Properties_GetBorderLeft, nsIDOMCSS2Properties_SetBorderLeft},
28421 : {2427, nsIDOMCSS2Properties_GetBorderTopColor, nsIDOMCSS2Properties_SetBorderTopColor},
28422 : {2442, nsIDOMCSS2Properties_GetBorderRightColor, nsIDOMCSS2Properties_SetBorderRightColor},
28423 : {2459, nsIDOMCSS2Properties_GetBorderBottomColor, nsIDOMCSS2Properties_SetBorderBottomColor},
28424 : {2477, nsIDOMCSS2Properties_GetBorderLeftColor, nsIDOMCSS2Properties_SetBorderLeftColor},
28425 : {2493, nsIDOMCSS2Properties_GetBorderTopStyle, nsIDOMCSS2Properties_SetBorderTopStyle},
28426 : {2508, nsIDOMCSS2Properties_GetBorderRightStyle, nsIDOMCSS2Properties_SetBorderRightStyle},
28427 : {2525, nsIDOMCSS2Properties_GetBorderBottomStyle, nsIDOMCSS2Properties_SetBorderBottomStyle},
28428 : {2543, nsIDOMCSS2Properties_GetBorderLeftStyle, nsIDOMCSS2Properties_SetBorderLeftStyle},
28429 : {2559, nsIDOMCSS2Properties_GetBorderTopWidth, nsIDOMCSS2Properties_SetBorderTopWidth},
28430 : {2574, nsIDOMCSS2Properties_GetBorderRightWidth, nsIDOMCSS2Properties_SetBorderRightWidth},
28431 : {2591, nsIDOMCSS2Properties_GetBorderBottomWidth, nsIDOMCSS2Properties_SetBorderBottomWidth},
28432 : {2609, nsIDOMCSS2Properties_GetBorderLeftWidth, nsIDOMCSS2Properties_SetBorderLeftWidth},
28433 : {2625, nsIDOMCSS2Properties_GetBorderWidth, nsIDOMCSS2Properties_SetBorderWidth},
28434 : {2637, nsIDOMCSS2Properties_GetBorderRadius, nsIDOMCSS2Properties_SetBorderRadius},
28435 : {2650, nsIDOMCSS2Properties_GetBorderTopLeftRadius, nsIDOMCSS2Properties_SetBorderTopLeftRadius},
28436 : {2670, nsIDOMCSS2Properties_GetBorderTopRightRadius, nsIDOMCSS2Properties_SetBorderTopRightRadius},
28437 : {2691, nsIDOMCSS2Properties_GetBorderBottomLeftRadius, nsIDOMCSS2Properties_SetBorderBottomLeftRadius},
28438 : {2714, nsIDOMCSS2Properties_GetBorderBottomRightRadius, nsIDOMCSS2Properties_SetBorderBottomRightRadius},
28439 : {162, nsIDOMCSS2Properties_GetBottom, nsIDOMCSS2Properties_SetBottom},
28440 : {2738, nsIDOMCSS2Properties_GetBoxShadow, nsIDOMCSS2Properties_SetBoxShadow},
28441 : {2748, nsIDOMCSS2Properties_GetCaptionSide, nsIDOMCSS2Properties_SetCaptionSide},
28442 : {2760, nsIDOMCSS2Properties_GetClear, nsIDOMCSS2Properties_SetClear},
28443 : {672, nsIDOMCSS2Properties_GetClip, nsIDOMCSS2Properties_SetClip},
28444 : {2766, nsIDOMCSS2Properties_GetColor, nsIDOMCSS2Properties_SetColor},
28445 : {2772, nsIDOMCSS2Properties_GetContent, nsIDOMCSS2Properties_SetContent},
28446 : {2780, nsIDOMCSS2Properties_GetCounterIncrement, nsIDOMCSS2Properties_SetCounterIncrement},
28447 : {2797, nsIDOMCSS2Properties_GetCounterReset, nsIDOMCSS2Properties_SetCounterReset},
28448 : {2810, nsIDOMCSS2Properties_GetCursor, nsIDOMCSS2Properties_SetCursor},
28449 : {2817, nsIDOMCSS2Properties_GetDirection, nsIDOMCSS2Properties_SetDirection},
28450 : {2827, nsIDOMCSS2Properties_GetDisplay, nsIDOMCSS2Properties_SetDisplay},
28451 : {2835, nsIDOMCSS2Properties_GetEmptyCells, nsIDOMCSS2Properties_SetEmptyCells},
28452 : {2846, nsIDOMCSS2Properties_GetCssFloat, nsIDOMCSS2Properties_SetCssFloat},
28453 : {677, nsIDOMCSS2Properties_GetFont, nsIDOMCSS2Properties_SetFont},
28454 : {2855, nsIDOMCSS2Properties_GetFontFamily, nsIDOMCSS2Properties_SetFontFamily},
28455 : {2866, nsIDOMCSS2Properties_GetFontSize, nsIDOMCSS2Properties_SetFontSize},
28456 : {2875, nsIDOMCSS2Properties_GetFontSizeAdjust, nsIDOMCSS2Properties_SetFontSizeAdjust},
28457 : {2890, nsIDOMCSS2Properties_GetFontStretch, nsIDOMCSS2Properties_SetFontStretch},
28458 : {2902, nsIDOMCSS2Properties_GetFontStyle, nsIDOMCSS2Properties_SetFontStyle},
28459 : {2912, nsIDOMCSS2Properties_GetFontVariant, nsIDOMCSS2Properties_SetFontVariant},
28460 : {2924, nsIDOMCSS2Properties_GetFontWeight, nsIDOMCSS2Properties_SetFontWeight},
28461 : {138, nsIDOMCSS2Properties_GetHeight, nsIDOMCSS2Properties_SetHeight},
28462 : {151, nsIDOMCSS2Properties_GetLeft, nsIDOMCSS2Properties_SetLeft},
28463 : {2935, nsIDOMCSS2Properties_GetLetterSpacing, nsIDOMCSS2Properties_SetLetterSpacing},
28464 : {2949, nsIDOMCSS2Properties_GetLineHeight, nsIDOMCSS2Properties_SetLineHeight},
28465 : {2960, nsIDOMCSS2Properties_GetListStyle, nsIDOMCSS2Properties_SetListStyle},
28466 : {2970, nsIDOMCSS2Properties_GetListStyleImage, nsIDOMCSS2Properties_SetListStyleImage},
28467 : {2985, nsIDOMCSS2Properties_GetListStylePosition, nsIDOMCSS2Properties_SetListStylePosition},
28468 : {3003, nsIDOMCSS2Properties_GetListStyleType, nsIDOMCSS2Properties_SetListStyleType},
28469 : {3017, nsIDOMCSS2Properties_GetMargin, nsIDOMCSS2Properties_SetMargin},
28470 : {3024, nsIDOMCSS2Properties_GetMarginTop, nsIDOMCSS2Properties_SetMarginTop},
28471 : {3034, nsIDOMCSS2Properties_GetMarginRight, nsIDOMCSS2Properties_SetMarginRight},
28472 : {3046, nsIDOMCSS2Properties_GetMarginBottom, nsIDOMCSS2Properties_SetMarginBottom},
28473 : {3059, nsIDOMCSS2Properties_GetMarginLeft, nsIDOMCSS2Properties_SetMarginLeft},
28474 : {3070, nsIDOMCSS2Properties_GetMarkerOffset, nsIDOMCSS2Properties_SetMarkerOffset},
28475 : {3083, nsIDOMCSS2Properties_GetMarks, nsIDOMCSS2Properties_SetMarks},
28476 : {3089, nsIDOMCSS2Properties_GetMaxHeight, nsIDOMCSS2Properties_SetMaxHeight},
28477 : {3099, nsIDOMCSS2Properties_GetMaxWidth, nsIDOMCSS2Properties_SetMaxWidth},
28478 : {3108, nsIDOMCSS2Properties_GetMinHeight, nsIDOMCSS2Properties_SetMinHeight},
28479 : {3118, nsIDOMCSS2Properties_GetMinWidth, nsIDOMCSS2Properties_SetMinWidth},
28480 : {3127, nsIDOMCSS2Properties_GetOrphans, nsIDOMCSS2Properties_SetOrphans},
28481 : {3135, nsIDOMCSS2Properties_GetOutline, nsIDOMCSS2Properties_SetOutline},
28482 : {3143, nsIDOMCSS2Properties_GetOutlineColor, nsIDOMCSS2Properties_SetOutlineColor},
28483 : {3156, nsIDOMCSS2Properties_GetOutlineStyle, nsIDOMCSS2Properties_SetOutlineStyle},
28484 : {3169, nsIDOMCSS2Properties_GetOutlineWidth, nsIDOMCSS2Properties_SetOutlineWidth},
28485 : {3182, nsIDOMCSS2Properties_GetOverflow, nsIDOMCSS2Properties_SetOverflow},
28486 : {3191, nsIDOMCSS2Properties_GetPadding, nsIDOMCSS2Properties_SetPadding},
28487 : {3199, nsIDOMCSS2Properties_GetPaddingTop, nsIDOMCSS2Properties_SetPaddingTop},
28488 : {3210, nsIDOMCSS2Properties_GetPaddingRight, nsIDOMCSS2Properties_SetPaddingRight},
28489 : {3223, nsIDOMCSS2Properties_GetPaddingBottom, nsIDOMCSS2Properties_SetPaddingBottom},
28490 : {3237, nsIDOMCSS2Properties_GetPaddingLeft, nsIDOMCSS2Properties_SetPaddingLeft},
28491 : {3249, nsIDOMCSS2Properties_GetPage, nsIDOMCSS2Properties_SetPage},
28492 : {3254, nsIDOMCSS2Properties_GetPageBreakAfter, nsIDOMCSS2Properties_SetPageBreakAfter},
28493 : {3269, nsIDOMCSS2Properties_GetPageBreakBefore, nsIDOMCSS2Properties_SetPageBreakBefore},
28494 : {3285, nsIDOMCSS2Properties_GetPageBreakInside, nsIDOMCSS2Properties_SetPageBreakInside},
28495 : {3301, nsIDOMCSS2Properties_GetPosition, nsIDOMCSS2Properties_SetPosition},
28496 : {3310, nsIDOMCSS2Properties_GetQuotes, nsIDOMCSS2Properties_SetQuotes},
28497 : {156, nsIDOMCSS2Properties_GetRight, nsIDOMCSS2Properties_SetRight},
28498 : {3317, nsIDOMCSS2Properties_GetSize, nsIDOMCSS2Properties_SetSize},
28499 : {3322, nsIDOMCSS2Properties_GetTableLayout, nsIDOMCSS2Properties_SetTableLayout},
28500 : {682, nsIDOMCSS2Properties_GetTextAlign, nsIDOMCSS2Properties_SetTextAlign},
28501 : {3334, nsIDOMCSS2Properties_GetTextDecoration, nsIDOMCSS2Properties_SetTextDecoration},
28502 : {3349, nsIDOMCSS2Properties_GetTextIndent, nsIDOMCSS2Properties_SetTextIndent},
28503 : {3360, nsIDOMCSS2Properties_GetTextOverflow, nsIDOMCSS2Properties_SetTextOverflow},
28504 : {3373, nsIDOMCSS2Properties_GetTextShadow, nsIDOMCSS2Properties_SetTextShadow},
28505 : {3384, nsIDOMCSS2Properties_GetTextTransform, nsIDOMCSS2Properties_SetTextTransform},
28506 : {12, nsIDOMCSS2Properties_GetTop, nsIDOMCSS2Properties_SetTop},
28507 : {3398, nsIDOMCSS2Properties_GetUnicodeBidi, nsIDOMCSS2Properties_SetUnicodeBidi},
28508 : {3410, nsIDOMCSS2Properties_GetVerticalAlign, nsIDOMCSS2Properties_SetVerticalAlign},
28509 : {3424, nsIDOMCSS2Properties_GetVisibility, nsIDOMCSS2Properties_SetVisibility},
28510 : {3435, nsIDOMCSS2Properties_GetWhiteSpace, nsIDOMCSS2Properties_SetWhiteSpace},
28511 : {3446, nsIDOMCSS2Properties_GetWidows, nsIDOMCSS2Properties_SetWidows},
28512 : {145, nsIDOMCSS2Properties_GetWidth, nsIDOMCSS2Properties_SetWidth},
28513 : {3453, nsIDOMCSS2Properties_GetWordSpacing, nsIDOMCSS2Properties_SetWordSpacing},
28514 : {3465, nsIDOMCSS2Properties_GetZIndex, nsIDOMCSS2Properties_SetZIndex},
28515 : {3472, nsIDOMCSS2Properties_GetClipPath, nsIDOMCSS2Properties_SetClipPath},
28516 : {3481, nsIDOMCSS2Properties_GetClipRule, nsIDOMCSS2Properties_SetClipRule},
28517 : {3490, nsIDOMCSS2Properties_GetColorInterpolation, nsIDOMCSS2Properties_SetColorInterpolation},
28518 : {3509, nsIDOMCSS2Properties_GetColorInterpolationFilters, nsIDOMCSS2Properties_SetColorInterpolationFilters},
28519 : {3535, nsIDOMCSS2Properties_GetDominantBaseline, nsIDOMCSS2Properties_SetDominantBaseline},
28520 : {660, nsIDOMCSS2Properties_GetFill, nsIDOMCSS2Properties_SetFill},
28521 : {3552, nsIDOMCSS2Properties_GetFillOpacity, nsIDOMCSS2Properties_SetFillOpacity},
28522 : {3564, nsIDOMCSS2Properties_GetFillRule, nsIDOMCSS2Properties_SetFillRule},
28523 : {3573, nsIDOMCSS2Properties_GetFilter, nsIDOMCSS2Properties_SetFilter},
28524 : {3580, nsIDOMCSS2Properties_GetFloodColor, nsIDOMCSS2Properties_SetFloodColor},
28525 : {3591, nsIDOMCSS2Properties_GetFloodOpacity, nsIDOMCSS2Properties_SetFloodOpacity},
28526 : {3604, nsIDOMCSS2Properties_GetImageRendering, nsIDOMCSS2Properties_SetImageRendering},
28527 : {3619, nsIDOMCSS2Properties_GetLightingColor, nsIDOMCSS2Properties_SetLightingColor},
28528 : {3633, nsIDOMCSS2Properties_GetMarker, nsIDOMCSS2Properties_SetMarker},
28529 : {3640, nsIDOMCSS2Properties_GetMarkerEnd, nsIDOMCSS2Properties_SetMarkerEnd},
28530 : {3650, nsIDOMCSS2Properties_GetMarkerMid, nsIDOMCSS2Properties_SetMarkerMid},
28531 : {3660, nsIDOMCSS2Properties_GetMarkerStart, nsIDOMCSS2Properties_SetMarkerStart},
28532 : {3672, nsIDOMCSS2Properties_GetMask, nsIDOMCSS2Properties_SetMask},
28533 : {3677, nsIDOMCSS2Properties_GetShapeRendering, nsIDOMCSS2Properties_SetShapeRendering},
28534 : {3692, nsIDOMCSS2Properties_GetStopColor, nsIDOMCSS2Properties_SetStopColor},
28535 : {3702, nsIDOMCSS2Properties_GetStopOpacity, nsIDOMCSS2Properties_SetStopOpacity},
28536 : {665, nsIDOMCSS2Properties_GetStroke, nsIDOMCSS2Properties_SetStroke},
28537 : {3714, nsIDOMCSS2Properties_GetStrokeDasharray, nsIDOMCSS2Properties_SetStrokeDasharray},
28538 : {3730, nsIDOMCSS2Properties_GetStrokeDashoffset, nsIDOMCSS2Properties_SetStrokeDashoffset},
28539 : {3747, nsIDOMCSS2Properties_GetStrokeLinecap, nsIDOMCSS2Properties_SetStrokeLinecap},
28540 : {3761, nsIDOMCSS2Properties_GetStrokeLinejoin, nsIDOMCSS2Properties_SetStrokeLinejoin},
28541 : {3776, nsIDOMCSS2Properties_GetStrokeMiterlimit, nsIDOMCSS2Properties_SetStrokeMiterlimit},
28542 : {3793, nsIDOMCSS2Properties_GetStrokeOpacity, nsIDOMCSS2Properties_SetStrokeOpacity},
28543 : {3807, nsIDOMCSS2Properties_GetStrokeWidth, nsIDOMCSS2Properties_SetStrokeWidth},
28544 : {3819, nsIDOMCSS2Properties_GetTextAnchor, nsIDOMCSS2Properties_SetTextAnchor},
28545 : {3830, nsIDOMCSS2Properties_GetTextRendering, nsIDOMCSS2Properties_SetTextRendering},
28546 : {3844, nsIDOMCSS2Properties_GetMozAppearance, nsIDOMCSS2Properties_SetMozAppearance},
28547 : {3858, nsIDOMCSS2Properties_GetBackgroundClip, nsIDOMCSS2Properties_SetBackgroundClip},
28548 : {3873, nsIDOMCSS2Properties_GetMozBackgroundInlinePolicy, nsIDOMCSS2Properties_SetMozBackgroundInlinePolicy},
28549 : {3899, nsIDOMCSS2Properties_GetBackgroundOrigin, nsIDOMCSS2Properties_SetBackgroundOrigin},
28550 : {3916, nsIDOMCSS2Properties_GetMozBinding, nsIDOMCSS2Properties_SetMozBinding},
28551 : {3927, nsIDOMCSS2Properties_GetMozBorderBottomColors, nsIDOMCSS2Properties_SetMozBorderBottomColors},
28552 : {3949, nsIDOMCSS2Properties_GetMozBorderLeftColors, nsIDOMCSS2Properties_SetMozBorderLeftColors},
28553 : {3969, nsIDOMCSS2Properties_GetMozBorderRightColors, nsIDOMCSS2Properties_SetMozBorderRightColors},
28554 : {3990, nsIDOMCSS2Properties_GetMozBorderTopColors, nsIDOMCSS2Properties_SetMozBorderTopColors},
28555 : {4009, nsIDOMCSS2Properties_GetMozBoxAlign, nsIDOMCSS2Properties_SetMozBoxAlign},
28556 : {4021, nsIDOMCSS2Properties_GetMozBoxDirection, nsIDOMCSS2Properties_SetMozBoxDirection},
28557 : {4037, nsIDOMCSS2Properties_GetMozBoxFlex, nsIDOMCSS2Properties_SetMozBoxFlex},
28558 : {4048, nsIDOMCSS2Properties_GetMozBoxOrient, nsIDOMCSS2Properties_SetMozBoxOrient},
28559 : {4061, nsIDOMCSS2Properties_GetMozBoxOrdinalGroup, nsIDOMCSS2Properties_SetMozBoxOrdinalGroup},
28560 : {4080, nsIDOMCSS2Properties_GetMozBoxPack, nsIDOMCSS2Properties_SetMozBoxPack},
28561 : {4091, nsIDOMCSS2Properties_GetMozBoxSizing, nsIDOMCSS2Properties_SetMozBoxSizing},
28562 : {4104, nsIDOMCSS2Properties_GetMozColumnCount, nsIDOMCSS2Properties_SetMozColumnCount},
28563 : {4119, nsIDOMCSS2Properties_GetMozColumnWidth, nsIDOMCSS2Properties_SetMozColumnWidth},
28564 : {4134, nsIDOMCSS2Properties_GetMozColumnGap, nsIDOMCSS2Properties_SetMozColumnGap},
28565 : {4147, nsIDOMCSS2Properties_GetMozFloatEdge, nsIDOMCSS2Properties_SetMozFloatEdge},
28566 : {4160, nsIDOMCSS2Properties_GetMozFontFeatureSettings, nsIDOMCSS2Properties_SetMozFontFeatureSettings},
28567 : {4183, nsIDOMCSS2Properties_GetMozFontLanguageOverride, nsIDOMCSS2Properties_SetMozFontLanguageOverride},
28568 : {4207, nsIDOMCSS2Properties_GetMozForceBrokenImageIcon, nsIDOMCSS2Properties_SetMozForceBrokenImageIcon},
28569 : {4231, nsIDOMCSS2Properties_GetMozImageRegion, nsIDOMCSS2Properties_SetMozImageRegion},
28570 : {4246, nsIDOMCSS2Properties_GetMozMarginEnd, nsIDOMCSS2Properties_SetMozMarginEnd},
28571 : {4259, nsIDOMCSS2Properties_GetMozMarginStart, nsIDOMCSS2Properties_SetMozMarginStart},
28572 : {4274, nsIDOMCSS2Properties_GetMozOrient, nsIDOMCSS2Properties_SetMozOrient},
28573 : {4284, nsIDOMCSS2Properties_GetMozOutlineRadius, nsIDOMCSS2Properties_SetMozOutlineRadius},
28574 : {4301, nsIDOMCSS2Properties_GetMozOutlineRadiusTopleft, nsIDOMCSS2Properties_SetMozOutlineRadiusTopleft},
28575 : {4325, nsIDOMCSS2Properties_GetMozOutlineRadiusTopright, nsIDOMCSS2Properties_SetMozOutlineRadiusTopright},
28576 : {4350, nsIDOMCSS2Properties_GetMozOutlineRadiusBottomleft, nsIDOMCSS2Properties_SetMozOutlineRadiusBottomleft},
28577 : {4377, nsIDOMCSS2Properties_GetMozOutlineRadiusBottomright, nsIDOMCSS2Properties_SetMozOutlineRadiusBottomright},
28578 : {4405, nsIDOMCSS2Properties_GetMozPaddingEnd, nsIDOMCSS2Properties_SetMozPaddingEnd},
28579 : {4419, nsIDOMCSS2Properties_GetMozPaddingStart, nsIDOMCSS2Properties_SetMozPaddingStart},
28580 : {4435, nsIDOMCSS2Properties_GetMozUserFocus, nsIDOMCSS2Properties_SetMozUserFocus},
28581 : {4448, nsIDOMCSS2Properties_GetMozUserInput, nsIDOMCSS2Properties_SetMozUserInput},
28582 : {4461, nsIDOMCSS2Properties_GetMozUserModify, nsIDOMCSS2Properties_SetMozUserModify},
28583 : {4475, nsIDOMCSS2Properties_GetMozUserSelect, nsIDOMCSS2Properties_SetMozUserSelect},
28584 : {4489, nsIDOMCSS2Properties_GetOpacity, nsIDOMCSS2Properties_SetOpacity},
28585 : {4497, nsIDOMCSS2Properties_GetOutlineOffset, nsIDOMCSS2Properties_SetOutlineOffset},
28586 : {4511, nsIDOMCSS2Properties_GetMozTextAlignLast, nsIDOMCSS2Properties_SetMozTextAlignLast},
28587 : {4528, nsIDOMCSS2Properties_GetOverflowX, nsIDOMCSS2Properties_SetOverflowX},
28588 : {4538, nsIDOMCSS2Properties_GetOverflowY, nsIDOMCSS2Properties_SetOverflowY},
28589 : {4548, nsIDOMCSS2Properties_GetImeMode, nsIDOMCSS2Properties_SetImeMode},
28590 : {4556, nsIDOMCSS2Properties_GetMozBorderEnd, nsIDOMCSS2Properties_SetMozBorderEnd},
28591 : {4569, nsIDOMCSS2Properties_GetMozBorderEndColor, nsIDOMCSS2Properties_SetMozBorderEndColor},
28592 : {4587, nsIDOMCSS2Properties_GetMozBorderEndStyle, nsIDOMCSS2Properties_SetMozBorderEndStyle},
28593 : {4605, nsIDOMCSS2Properties_GetMozBorderEndWidth, nsIDOMCSS2Properties_SetMozBorderEndWidth},
28594 : {4623, nsIDOMCSS2Properties_GetMozBorderStart, nsIDOMCSS2Properties_SetMozBorderStart},
28595 : {4638, nsIDOMCSS2Properties_GetMozBorderStartColor, nsIDOMCSS2Properties_SetMozBorderStartColor},
28596 : {4658, nsIDOMCSS2Properties_GetMozBorderStartStyle, nsIDOMCSS2Properties_SetMozBorderStartStyle},
28597 : {4678, nsIDOMCSS2Properties_GetMozBorderStartWidth, nsIDOMCSS2Properties_SetMozBorderStartWidth},
28598 : {4698, nsIDOMCSS2Properties_GetMozStackSizing, nsIDOMCSS2Properties_SetMozStackSizing},
28599 : {4713, nsIDOMCSS2Properties_GetMozBorderImage, nsIDOMCSS2Properties_SetMozBorderImage},
28600 : {4728, nsIDOMCSS2Properties_GetMozColumns, nsIDOMCSS2Properties_SetMozColumns},
28601 : {4739, nsIDOMCSS2Properties_GetMozColumnRule, nsIDOMCSS2Properties_SetMozColumnRule},
28602 : {4753, nsIDOMCSS2Properties_GetMozColumnRuleWidth, nsIDOMCSS2Properties_SetMozColumnRuleWidth},
28603 : {4772, nsIDOMCSS2Properties_GetMozColumnRuleStyle, nsIDOMCSS2Properties_SetMozColumnRuleStyle},
28604 : {4791, nsIDOMCSS2Properties_GetMozColumnRuleColor, nsIDOMCSS2Properties_SetMozColumnRuleColor},
28605 : {4810, nsIDOMCSS2Properties_GetWordWrap, nsIDOMCSS2Properties_SetWordWrap},
28606 : {4819, nsIDOMCSS2Properties_GetMozHyphens, nsIDOMCSS2Properties_SetMozHyphens},
28607 : {4830, nsIDOMCSS2Properties_GetMozTransform, nsIDOMCSS2Properties_SetMozTransform},
28608 : {4843, nsIDOMCSS2Properties_GetMozTransformOrigin, nsIDOMCSS2Properties_SetMozTransformOrigin},
28609 : {4862, nsIDOMCSS2Properties_GetMozPerspective, nsIDOMCSS2Properties_SetMozPerspective},
28610 : {4877, nsIDOMCSS2Properties_GetMozPerspectiveOrigin, nsIDOMCSS2Properties_SetMozPerspectiveOrigin},
28611 : {4898, nsIDOMCSS2Properties_GetMozBackfaceVisibility, nsIDOMCSS2Properties_SetMozBackfaceVisibility},
28612 : {4920, nsIDOMCSS2Properties_GetMozTransformStyle, nsIDOMCSS2Properties_SetMozTransformStyle},
28613 : {4938, nsIDOMCSS2Properties_GetMozWindowShadow, nsIDOMCSS2Properties_SetMozWindowShadow},
28614 : {4954, nsIDOMCSS2Properties_GetBackgroundSize, nsIDOMCSS2Properties_SetBackgroundSize},
28615 : {4969, nsIDOMCSS2Properties_GetMozTextBlink, nsIDOMCSS2Properties_SetMozTextBlink},
28616 : {4982, nsIDOMCSS2Properties_GetMozTextDecorationColor, nsIDOMCSS2Properties_SetMozTextDecorationColor},
28617 : {5005, nsIDOMCSS2Properties_GetMozTextDecorationLine, nsIDOMCSS2Properties_SetMozTextDecorationLine},
28618 : {5027, nsIDOMCSS2Properties_GetMozTextDecorationStyle, nsIDOMCSS2Properties_SetMozTextDecorationStyle},
28619 : {5050, nsIDOMCSS2Properties_GetMozTransitionProperty, nsIDOMCSS2Properties_SetMozTransitionProperty},
28620 : {5072, nsIDOMCSS2Properties_GetMozTransitionDuration, nsIDOMCSS2Properties_SetMozTransitionDuration},
28621 : {5094, nsIDOMCSS2Properties_GetMozTransitionDelay, nsIDOMCSS2Properties_SetMozTransitionDelay},
28622 : {5113, nsIDOMCSS2Properties_GetMozTransitionTimingFunction, nsIDOMCSS2Properties_SetMozTransitionTimingFunction},
28623 : {5141, nsIDOMCSS2Properties_GetMozTransition, nsIDOMCSS2Properties_SetMozTransition},
28624 : {5155, nsIDOMCSS2Properties_GetPointerEvents, nsIDOMCSS2Properties_SetPointerEvents},
28625 : {5169, nsIDOMCSS2Properties_GetMozTabSize, nsIDOMCSS2Properties_SetMozTabSize},
28626 : {5180, nsIDOMCSS2Properties_GetResize, nsIDOMCSS2Properties_SetResize},
28627 : {5187, nsIDOMCSS2Properties_GetMozAnimationName, nsIDOMCSS2Properties_SetMozAnimationName},
28628 : {5204, nsIDOMCSS2Properties_GetMozAnimationDuration, nsIDOMCSS2Properties_SetMozAnimationDuration},
28629 : {5225, nsIDOMCSS2Properties_GetMozAnimationDelay, nsIDOMCSS2Properties_SetMozAnimationDelay},
28630 : {5243, nsIDOMCSS2Properties_GetMozAnimationTimingFunction, nsIDOMCSS2Properties_SetMozAnimationTimingFunction},
28631 : {5270, nsIDOMCSS2Properties_GetMozAnimationDirection, nsIDOMCSS2Properties_SetMozAnimationDirection},
28632 : {5292, nsIDOMCSS2Properties_GetMozAnimationFillMode, nsIDOMCSS2Properties_SetMozAnimationFillMode},
28633 : {5313, nsIDOMCSS2Properties_GetMozAnimationIterationCount, nsIDOMCSS2Properties_SetMozAnimationIterationCount},
28634 : {5340, nsIDOMCSS2Properties_GetMozAnimationPlayState, nsIDOMCSS2Properties_SetMozAnimationPlayState},
28635 : {5362, nsIDOMCSS2Properties_GetMozAnimation, nsIDOMCSS2Properties_SetMozAnimation},
28636 : {5375, nsIDOMCSS2Properties_GetMozTextSizeAdjust, nsIDOMCSS2Properties_SetMozTextSizeAdjust},
28637 : // nsIDOMRect (index 332)
28638 : {12, nsIDOMRect_GetTop, xpc_qsGetterOnlyPropertyStub},
28639 : {156, nsIDOMRect_GetRight, xpc_qsGetterOnlyPropertyStub},
28640 : {162, nsIDOMRect_GetBottom, xpc_qsGetterOnlyPropertyStub},
28641 : {151, nsIDOMRect_GetLeft, xpc_qsGetterOnlyPropertyStub},
28642 : // nsIDOMCSSStyleDeclaration (index 336)
28643 : {5393, nsIDOMCSSStyleDeclaration_GetCssText, nsIDOMCSSStyleDeclaration_SetCssText},
28644 : {169, nsIDOMCSSStyleDeclaration_GetLength, xpc_qsGetterOnlyPropertyStub},
28645 : {5485, nsIDOMCSSStyleDeclaration_GetParentRule, xpc_qsGetterOnlyPropertyStub},
28646 : // nsIDOMEvent (index 339)
28647 : {5547, nsIDOMEvent_GetType, xpc_qsGetterOnlyPropertyStub},
28648 : {5552, nsIDOMEvent_GetTarget, xpc_qsGetterOnlyPropertyStub},
28649 : {5559, nsIDOMEvent_GetCurrentTarget, xpc_qsGetterOnlyPropertyStub},
28650 : {5573, nsIDOMEvent_GetEventPhase, xpc_qsGetterOnlyPropertyStub},
28651 : {5584, nsIDOMEvent_GetBubbles, xpc_qsGetterOnlyPropertyStub},
28652 : {5592, nsIDOMEvent_GetCancelable, xpc_qsGetterOnlyPropertyStub},
28653 : {5603, nsIDOMEvent_GetTimeStamp, xpc_qsGetterOnlyPropertyStub},
28654 : {5654, nsIDOMEvent_GetDefaultPrevented, xpc_qsGetterOnlyPropertyStub},
28655 : // nsIDOMMouseEvent (index 347)
28656 : {5696, nsIDOMMouseEvent_GetScreenX, xpc_qsGetterOnlyPropertyStub},
28657 : {5704, nsIDOMMouseEvent_GetScreenY, xpc_qsGetterOnlyPropertyStub},
28658 : {5712, nsIDOMMouseEvent_GetClientX, xpc_qsGetterOnlyPropertyStub},
28659 : {5720, nsIDOMMouseEvent_GetClientY, xpc_qsGetterOnlyPropertyStub},
28660 : {5728, nsIDOMMouseEvent_GetCtrlKey, xpc_qsGetterOnlyPropertyStub},
28661 : {5736, nsIDOMMouseEvent_GetShiftKey, xpc_qsGetterOnlyPropertyStub},
28662 : {5745, nsIDOMMouseEvent_GetAltKey, xpc_qsGetterOnlyPropertyStub},
28663 : {5752, nsIDOMMouseEvent_GetMetaKey, xpc_qsGetterOnlyPropertyStub},
28664 : {5760, nsIDOMMouseEvent_GetButton, xpc_qsGetterOnlyPropertyStub},
28665 : {5767, nsIDOMMouseEvent_GetRelatedTarget, xpc_qsGetterOnlyPropertyStub},
28666 : {5796, nsIDOMMouseEvent_GetMozPressure, xpc_qsGetterOnlyPropertyStub},
28667 : {5808, nsIDOMMouseEvent_GetMozInputSource, xpc_qsGetterOnlyPropertyStub},
28668 : // nsIDOMKeyEvent (index 359)
28669 : {5840, nsIDOMKeyEvent_GetCharCode, xpc_qsGetterOnlyPropertyStub},
28670 : {5849, nsIDOMKeyEvent_GetKeyCode, xpc_qsGetterOnlyPropertyStub},
28671 : {5745, nsIDOMKeyEvent_GetAltKey, xpc_qsGetterOnlyPropertyStub},
28672 : {5728, nsIDOMKeyEvent_GetCtrlKey, xpc_qsGetterOnlyPropertyStub},
28673 : {5736, nsIDOMKeyEvent_GetShiftKey, xpc_qsGetterOnlyPropertyStub},
28674 : {5752, nsIDOMKeyEvent_GetMetaKey, xpc_qsGetterOnlyPropertyStub},
28675 : // nsIDOMMutationEvent (index 365)
28676 : {5870, nsIDOMMutationEvent_GetRelatedNode, xpc_qsGetterOnlyPropertyStub},
28677 : {5882, nsIDOMMutationEvent_GetPrevValue, xpc_qsGetterOnlyPropertyStub},
28678 : {5892, nsIDOMMutationEvent_GetNewValue, xpc_qsGetterOnlyPropertyStub},
28679 : {5901, nsIDOMMutationEvent_GetAttrName, xpc_qsGetterOnlyPropertyStub},
28680 : {5910, nsIDOMMutationEvent_GetAttrChange, xpc_qsGetterOnlyPropertyStub},
28681 : // nsIDOMDragEvent (index 370)
28682 : {5939, nsIDOMDragEvent_GetDataTransfer, xpc_qsGetterOnlyPropertyStub},
28683 : // nsIDOMScrollAreaEvent (index 371)
28684 : {5966, nsIDOMScrollAreaEvent_GetX, xpc_qsGetterOnlyPropertyStub},
28685 : {5968, nsIDOMScrollAreaEvent_GetY, xpc_qsGetterOnlyPropertyStub},
28686 : {145, nsIDOMScrollAreaEvent_GetWidth, xpc_qsGetterOnlyPropertyStub},
28687 : {138, nsIDOMScrollAreaEvent_GetHeight, xpc_qsGetterOnlyPropertyStub},
28688 : // nsIDOMNotifyPaintEvent (index 375)
28689 : {5990, nsIDOMNotifyPaintEvent_GetClientRects, xpc_qsGetterOnlyPropertyStub},
28690 : {6002, nsIDOMNotifyPaintEvent_GetBoundingClientRect, xpc_qsGetterOnlyPropertyStub},
28691 : {6021, nsIDOMNotifyPaintEvent_GetPaintRequests, xpc_qsGetterOnlyPropertyStub},
28692 : // nsIDOMMessageEvent (index 378)
28693 : {885, nsIDOMMessageEvent_GetData, xpc_qsGetterOnlyPropertyStub},
28694 : {6035, nsIDOMMessageEvent_GetOrigin, xpc_qsGetterOnlyPropertyStub},
28695 : {6042, nsIDOMMessageEvent_GetLastEventId, xpc_qsGetterOnlyPropertyStub},
28696 : {6054, nsIDOMMessageEvent_GetSource, xpc_qsGetterOnlyPropertyStub},
28697 : // nsIDOMMouseScrollEvent (index 382)
28698 : {6078, nsIDOMMouseScrollEvent_GetAxis, xpc_qsGetterOnlyPropertyStub},
28699 : // nsIDOMProgressEvent (index 383)
28700 : {6104, nsIDOMProgressEvent_GetLengthComputable, xpc_qsGetterOnlyPropertyStub},
28701 : {6121, nsIDOMProgressEvent_GetLoaded, xpc_qsGetterOnlyPropertyStub},
28702 : {6128, nsIDOMProgressEvent_GetTotal, xpc_qsGetterOnlyPropertyStub},
28703 : // nsIDOMNSEvent (index 386)
28704 : {6134, nsIDOMNSEvent_GetOriginalTarget, xpc_qsGetterOnlyPropertyStub},
28705 : // nsIDOMUIEvent (index 387)
28706 : {6167, nsIDOMUIEvent_GetWhich, xpc_qsGetterOnlyPropertyStub},
28707 : {6173, nsIDOMUIEvent_GetRangeParent, xpc_qsGetterOnlyPropertyStub},
28708 : {6185, nsIDOMUIEvent_GetRangeOffset, xpc_qsGetterOnlyPropertyStub},
28709 : {6197, nsIDOMUIEvent_GetPageX, xpc_qsGetterOnlyPropertyStub},
28710 : {6203, nsIDOMUIEvent_GetPageY, xpc_qsGetterOnlyPropertyStub},
28711 : {6209, nsIDOMUIEvent_GetIsChar, xpc_qsGetterOnlyPropertyStub},
28712 : // nsIDOMTouch (index 393)
28713 : {6216, nsIDOMTouch_GetIdentifier, xpc_qsGetterOnlyPropertyStub},
28714 : {5552, nsIDOMTouch_GetTarget, xpc_qsGetterOnlyPropertyStub},
28715 : {6197, nsIDOMTouch_GetPageX, xpc_qsGetterOnlyPropertyStub},
28716 : {6203, nsIDOMTouch_GetPageY, xpc_qsGetterOnlyPropertyStub},
28717 : {5696, nsIDOMTouch_GetScreenX, xpc_qsGetterOnlyPropertyStub},
28718 : {5704, nsIDOMTouch_GetScreenY, xpc_qsGetterOnlyPropertyStub},
28719 : {5712, nsIDOMTouch_GetClientX, xpc_qsGetterOnlyPropertyStub},
28720 : {5720, nsIDOMTouch_GetClientY, xpc_qsGetterOnlyPropertyStub},
28721 : {6227, nsIDOMTouch_GetRadiusX, xpc_qsGetterOnlyPropertyStub},
28722 : {6235, nsIDOMTouch_GetRadiusY, xpc_qsGetterOnlyPropertyStub},
28723 : {6243, nsIDOMTouch_GetRotationAngle, xpc_qsGetterOnlyPropertyStub},
28724 : {6257, nsIDOMTouch_GetForce, xpc_qsGetterOnlyPropertyStub},
28725 : // nsIDOMTouchList (index 405)
28726 : {169, nsIDOMTouchList_GetLength, xpc_qsGetterOnlyPropertyStub},
28727 : // nsIDOMTouchEvent (index 406)
28728 : {6279, nsIDOMTouchEvent_GetTouches, xpc_qsGetterOnlyPropertyStub},
28729 : {6287, nsIDOMTouchEvent_GetTargetTouches, xpc_qsGetterOnlyPropertyStub},
28730 : {6301, nsIDOMTouchEvent_GetChangedTouches, xpc_qsGetterOnlyPropertyStub},
28731 : {5745, nsIDOMTouchEvent_GetAltKey, xpc_qsGetterOnlyPropertyStub},
28732 : {5752, nsIDOMTouchEvent_GetMetaKey, xpc_qsGetterOnlyPropertyStub},
28733 : {5728, nsIDOMTouchEvent_GetCtrlKey, xpc_qsGetterOnlyPropertyStub},
28734 : {5736, nsIDOMTouchEvent_GetShiftKey, xpc_qsGetterOnlyPropertyStub},
28735 : // nsIDOMHTMLAnchorElement (index 413)
28736 : {6331, nsIDOMHTMLAnchorElement_GetHref, nsIDOMHTMLAnchorElement_SetHref},
28737 : {6336, nsIDOMHTMLAnchorElement_GetRel, nsIDOMHTMLAnchorElement_SetRel},
28738 : {5552, nsIDOMHTMLAnchorElement_GetTarget, nsIDOMHTMLAnchorElement_SetTarget},
28739 : {0, nsIDOMHTMLAnchorElement_GetName, nsIDOMHTMLAnchorElement_SetName},
28740 : {6340, nsIDOMHTMLAnchorElement_GetText, nsIDOMHTMLAnchorElement_SetText},
28741 : {6345, nsIDOMHTMLAnchorElement_GetSearch, nsIDOMHTMLAnchorElement_SetSearch},
28742 : {6352, nsIDOMHTMLAnchorElement_GetHash, nsIDOMHTMLAnchorElement_SetHash},
28743 : // nsIDOMHTMLBaseElement (index 420)
28744 : {6331, nsIDOMHTMLBaseElement_GetHref, nsIDOMHTMLBaseElement_SetHref},
28745 : {5552, nsIDOMHTMLBaseElement_GetTarget, nsIDOMHTMLBaseElement_SetTarget},
28746 : // nsIDOMHTMLButtonElement (index 422)
28747 : {0, nsIDOMHTMLButtonElement_GetName, nsIDOMHTMLButtonElement_SetName},
28748 : {6357, nsIDOMHTMLButtonElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28749 : {1905, nsIDOMHTMLButtonElement_GetValue, nsIDOMHTMLButtonElement_SetValue},
28750 : {6362, nsIDOMHTMLButtonElement_GetDisabled, nsIDOMHTMLButtonElement_SetDisabled},
28751 : // nsIDOMHTMLCollection (index 426)
28752 : {169, nsIDOMHTMLCollection_GetLength, xpc_qsGetterOnlyPropertyStub},
28753 : // nsIDOMHTMLCommandElement (index 427)
28754 : {5547, nsIDOMHTMLCommandElement_GetType, nsIDOMHTMLCommandElement_SetType},
28755 : {6371, nsIDOMHTMLCommandElement_GetLabel, nsIDOMHTMLCommandElement_SetLabel},
28756 : {6377, nsIDOMHTMLCommandElement_GetIcon, nsIDOMHTMLCommandElement_SetIcon},
28757 : {6362, nsIDOMHTMLCommandElement_GetDisabled, nsIDOMHTMLCommandElement_SetDisabled},
28758 : {6382, nsIDOMHTMLCommandElement_GetDefaultChecked, nsIDOMHTMLCommandElement_SetDefaultChecked},
28759 : {6397, nsIDOMHTMLCommandElement_GetChecked, nsIDOMHTMLCommandElement_SetChecked},
28760 : {6405, nsIDOMHTMLCommandElement_GetRadiogroup, nsIDOMHTMLCommandElement_SetRadiogroup},
28761 : // nsIDOMHTMLDocument (index 434)
28762 : {6416, nsIDOMHTMLDocument_GetBody, nsIDOMHTMLDocument_SetBody},
28763 : {6439, nsIDOMHTMLDocument_GetAnchors, xpc_qsGetterOnlyPropertyStub},
28764 : {6447, nsIDOMHTMLDocument_GetLinks, xpc_qsGetterOnlyPropertyStub},
28765 : {6453, nsIDOMHTMLDocument_GetURL, xpc_qsGetterOnlyPropertyStub},
28766 : {6457, nsIDOMHTMLDocument_GetForms, xpc_qsGetterOnlyPropertyStub},
28767 : {6463, nsIDOMHTMLDocument_GetCookie, nsIDOMHTMLDocument_SetCookie},
28768 : {6470, nsIDOMHTMLDocument_GetImages, xpc_qsGetterOnlyPropertyStub},
28769 : {6491, nsIDOMHTMLDocument_GetDomain, nsIDOMHTMLDocument_SetDomain},
28770 : {6498, nsIDOMHTMLDocument_GetDesignMode, nsIDOMHTMLDocument_SetDesignMode},
28771 : {6509, nsIDOMHTMLDocument_GetHead, xpc_qsGetterOnlyPropertyStub},
28772 : // nsIDOMHTMLElement (index 444)
28773 : {6514, nsIDOMHTMLElement_GetId, nsIDOMHTMLElement_SetId},
28774 : {1155, nsIDOMHTMLElement_GetTitle, nsIDOMHTMLElement_SetTitle},
28775 : {6517, nsIDOMHTMLElement_GetLang, nsIDOMHTMLElement_SetLang},
28776 : {6522, nsIDOMHTMLElement_GetDir, nsIDOMHTMLElement_SetDir},
28777 : {6526, nsIDOMHTMLElement_GetClassName, nsIDOMHTMLElement_SetClassName},
28778 : {6536, nsIDOMHTMLElement_GetDataset, xpc_qsGetterOnlyPropertyStub},
28779 : {6544, nsIDOMHTMLElement_GetHidden, nsIDOMHTMLElement_SetHidden},
28780 : {6557, nsIDOMHTMLElement_GetTabIndex, nsIDOMHTMLElement_SetTabIndex},
28781 : {6577, nsIDOMHTMLElement_GetAccessKey, nsIDOMHTMLElement_SetAccessKey},
28782 : {6587, nsIDOMHTMLElement_GetAccessKeyLabel, xpc_qsGetterOnlyPropertyStub},
28783 : {6602, nsIDOMHTMLElement_GetDraggable, nsIDOMHTMLElement_SetDraggable},
28784 : {6612, nsIDOMHTMLElement_GetContentEditable, nsIDOMHTMLElement_SetContentEditable},
28785 : {6628, nsIDOMHTMLElement_GetIsContentEditable, xpc_qsGetterOnlyPropertyStub},
28786 : {6646, nsIDOMHTMLElement_GetContextMenu, xpc_qsGetterOnlyPropertyStub},
28787 : {6658, nsIDOMHTMLElement_GetSpellcheck, nsIDOMHTMLElement_SetSpellcheck},
28788 : {6669, nsIDOMHTMLElement_GetInnerHTML, nsIDOMHTMLElement_SetInnerHTML},
28789 : {6679, nsIDOMHTMLElement_GetOuterHTML, nsIDOMHTMLElement_SetOuterHTML},
28790 : {6723, nsIDOMHTMLElement_GetOffsetParent, xpc_qsGetterOnlyPropertyStub},
28791 : {6736, nsIDOMHTMLElement_GetOffsetTop, xpc_qsGetterOnlyPropertyStub},
28792 : {6746, nsIDOMHTMLElement_GetOffsetLeft, xpc_qsGetterOnlyPropertyStub},
28793 : {6757, nsIDOMHTMLElement_GetOffsetWidth, xpc_qsGetterOnlyPropertyStub},
28794 : {6769, nsIDOMHTMLElement_GetOffsetHeight, xpc_qsGetterOnlyPropertyStub},
28795 : // nsIDOMHTMLFormElement (index 466)
28796 : {6803, nsIDOMHTMLFormElement_GetElements, xpc_qsGetterOnlyPropertyStub},
28797 : {0, nsIDOMHTMLFormElement_GetName, nsIDOMHTMLFormElement_SetName},
28798 : {169, nsIDOMHTMLFormElement_GetLength, xpc_qsGetterOnlyPropertyStub},
28799 : {5552, nsIDOMHTMLFormElement_GetTarget, nsIDOMHTMLFormElement_SetTarget},
28800 : {6819, nsIDOMHTMLFormElement_GetAction, nsIDOMHTMLFormElement_SetAction},
28801 : // nsIDOMHTMLFrameElement (index 471)
28802 : {6826, nsIDOMHTMLFrameElement_GetSrc, nsIDOMHTMLFrameElement_SetSrc},
28803 : {6830, nsIDOMHTMLFrameElement_GetContentDocument, xpc_qsGetterOnlyPropertyStub},
28804 : {6846, nsIDOMHTMLFrameElement_GetContentWindow, xpc_qsGetterOnlyPropertyStub},
28805 : {0, nsIDOMHTMLFrameElement_GetName, nsIDOMHTMLFrameElement_SetName},
28806 : // nsIDOMHTMLFrameSetElement (index 475)
28807 : {6860, nsIDOMHTMLFrameSetElement_GetRows, nsIDOMHTMLFrameSetElement_SetRows},
28808 : {6865, nsIDOMHTMLFrameSetElement_GetCols, nsIDOMHTMLFrameSetElement_SetCols},
28809 : // nsIDOMHTMLIFrameElement (index 477)
28810 : {6826, nsIDOMHTMLIFrameElement_GetSrc, nsIDOMHTMLIFrameElement_SetSrc},
28811 : {6830, nsIDOMHTMLIFrameElement_GetContentDocument, xpc_qsGetterOnlyPropertyStub},
28812 : {6846, nsIDOMHTMLIFrameElement_GetContentWindow, xpc_qsGetterOnlyPropertyStub},
28813 : // nsIDOMHTMLImageElement (index 480)
28814 : {6826, nsIDOMHTMLImageElement_GetSrc, nsIDOMHTMLImageElement_SetSrc},
28815 : {0, nsIDOMHTMLImageElement_GetName, nsIDOMHTMLImageElement_SetName},
28816 : {138, nsIDOMHTMLImageElement_GetHeight, nsIDOMHTMLImageElement_SetHeight},
28817 : {145, nsIDOMHTMLImageElement_GetWidth, nsIDOMHTMLImageElement_SetWidth},
28818 : {6870, nsIDOMHTMLImageElement_GetComplete, xpc_qsGetterOnlyPropertyStub},
28819 : // nsIDOMHTMLInputElement (index 485)
28820 : {6382, nsIDOMHTMLInputElement_GetDefaultChecked, nsIDOMHTMLInputElement_SetDefaultChecked},
28821 : {6362, nsIDOMHTMLInputElement_GetDisabled, nsIDOMHTMLInputElement_SetDisabled},
28822 : {6397, nsIDOMHTMLInputElement_GetChecked, nsIDOMHTMLInputElement_SetChecked},
28823 : {5547, nsIDOMHTMLInputElement_GetType, nsIDOMHTMLInputElement_SetType},
28824 : {6357, nsIDOMHTMLInputElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28825 : {6826, nsIDOMHTMLInputElement_GetSrc, nsIDOMHTMLInputElement_SetSrc},
28826 : {0, nsIDOMHTMLInputElement_GetName, nsIDOMHTMLInputElement_SetName},
28827 : {1905, nsIDOMHTMLInputElement_GetValue, nsIDOMHTMLInputElement_SetValue},
28828 : {6886, nsIDOMHTMLInputElement_GetFiles, xpc_qsGetterOnlyPropertyStub},
28829 : {6892, nsIDOMHTMLInputElement_GetTextLength, xpc_qsGetterOnlyPropertyStub},
28830 : {6903, nsIDOMHTMLInputElement_GetSelectionStart, nsIDOMHTMLInputElement_SetSelectionStart},
28831 : {6918, nsIDOMHTMLInputElement_GetSelectionEnd, nsIDOMHTMLInputElement_SetSelectionEnd},
28832 : {6931, nsIDOMHTMLInputElement_GetSelectionDirection, nsIDOMHTMLInputElement_SetSelectionDirection},
28833 : // nsIDOMHTMLLinkElement (index 498)
28834 : {6362, nsIDOMHTMLLinkElement_GetDisabled, nsIDOMHTMLLinkElement_SetDisabled},
28835 : // nsIDOMHTMLMenuElement (index 499)
28836 : {6968, nsIDOMHTMLMenuElement_GetCompact, nsIDOMHTMLMenuElement_SetCompact},
28837 : {5547, nsIDOMHTMLMenuElement_GetType, nsIDOMHTMLMenuElement_SetType},
28838 : {6371, nsIDOMHTMLMenuElement_GetLabel, nsIDOMHTMLMenuElement_SetLabel},
28839 : // nsIDOMHTMLOptionElement (index 502)
28840 : {6976, nsIDOMHTMLOptionElement_GetIndex, xpc_qsGetterOnlyPropertyStub},
28841 : {6982, nsIDOMHTMLOptionElement_GetSelected, nsIDOMHTMLOptionElement_SetSelected},
28842 : {6357, nsIDOMHTMLOptionElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28843 : {6340, nsIDOMHTMLOptionElement_GetText, nsIDOMHTMLOptionElement_SetText},
28844 : {6991, nsIDOMHTMLOptionElement_GetDefaultSelected, nsIDOMHTMLOptionElement_SetDefaultSelected},
28845 : {1905, nsIDOMHTMLOptionElement_GetValue, nsIDOMHTMLOptionElement_SetValue},
28846 : {6371, nsIDOMHTMLOptionElement_GetLabel, nsIDOMHTMLOptionElement_SetLabel},
28847 : {6362, nsIDOMHTMLOptionElement_GetDisabled, nsIDOMHTMLOptionElement_SetDisabled},
28848 : // nsIDOMHTMLOptionsCollection (index 510)
28849 : {169, nsIDOMHTMLOptionsCollection_GetLength, nsIDOMHTMLOptionsCollection_SetLength},
28850 : {7007, nsIDOMHTMLOptionsCollection_GetSelectedIndex, nsIDOMHTMLOptionsCollection_SetSelectedIndex},
28851 : // nsIDOMHTMLProgressElement (index 512)
28852 : {1905, nsIDOMHTMLProgressElement_GetValue, nsIDOMHTMLProgressElement_SetValue},
28853 : {7021, nsIDOMHTMLProgressElement_GetMax, nsIDOMHTMLProgressElement_SetMax},
28854 : {3301, nsIDOMHTMLProgressElement_GetPosition, xpc_qsGetterOnlyPropertyStub},
28855 : {6357, nsIDOMHTMLProgressElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28856 : // nsIDOMHTMLSelectElement (index 516)
28857 : {0, nsIDOMHTMLSelectElement_GetName, nsIDOMHTMLSelectElement_SetName},
28858 : {6357, nsIDOMHTMLSelectElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28859 : {1905, nsIDOMHTMLSelectElement_GetValue, nsIDOMHTMLSelectElement_SetValue},
28860 : {6362, nsIDOMHTMLSelectElement_GetDisabled, nsIDOMHTMLSelectElement_SetDisabled},
28861 : {169, nsIDOMHTMLSelectElement_GetLength, nsIDOMHTMLSelectElement_SetLength},
28862 : {7007, nsIDOMHTMLSelectElement_GetSelectedIndex, nsIDOMHTMLSelectElement_SetSelectedIndex},
28863 : {5547, nsIDOMHTMLSelectElement_GetType, xpc_qsGetterOnlyPropertyStub},
28864 : {7025, nsIDOMHTMLSelectElement_GetOptions, xpc_qsGetterOnlyPropertyStub},
28865 : {3317, nsIDOMHTMLSelectElement_GetSize, nsIDOMHTMLSelectElement_SetSize},
28866 : // nsIDOMHTMLStyleElement (index 525)
28867 : {6362, nsIDOMHTMLStyleElement_GetDisabled, nsIDOMHTMLStyleElement_SetDisabled},
28868 : // nsIDOMHTMLTableCellElement (index 526)
28869 : {7033, nsIDOMHTMLTableCellElement_GetColSpan, nsIDOMHTMLTableCellElement_SetColSpan},
28870 : {7041, nsIDOMHTMLTableCellElement_GetHeaders, nsIDOMHTMLTableCellElement_SetHeaders},
28871 : {7049, nsIDOMHTMLTableCellElement_GetCellIndex, xpc_qsGetterOnlyPropertyStub},
28872 : {7059, nsIDOMHTMLTableCellElement_GetRowSpan, nsIDOMHTMLTableCellElement_SetRowSpan},
28873 : {7067, nsIDOMHTMLTableCellElement_GetAbbr, nsIDOMHTMLTableCellElement_SetAbbr},
28874 : {7072, nsIDOMHTMLTableCellElement_GetScope, nsIDOMHTMLTableCellElement_SetScope},
28875 : {7078, nsIDOMHTMLTableCellElement_GetNoWrap, nsIDOMHTMLTableCellElement_SetNoWrap},
28876 : {145, nsIDOMHTMLTableCellElement_GetWidth, nsIDOMHTMLTableCellElement_SetWidth},
28877 : // nsIDOMHTMLTableColElement (index 534)
28878 : {7085, nsIDOMHTMLTableColElement_GetSpan, nsIDOMHTMLTableColElement_SetSpan},
28879 : {145, nsIDOMHTMLTableColElement_GetWidth, nsIDOMHTMLTableColElement_SetWidth},
28880 : // nsIDOMHTMLTableElement (index 536)
28881 : {6860, nsIDOMHTMLTableElement_GetRows, xpc_qsGetterOnlyPropertyStub},
28882 : {7100, nsIDOMHTMLTableElement_GetSummary, nsIDOMHTMLTableElement_SetSummary},
28883 : // nsIDOMHTMLTableRowElement (index 538)
28884 : {7118, nsIDOMHTMLTableRowElement_GetSectionRowIndex, xpc_qsGetterOnlyPropertyStub},
28885 : {7134, nsIDOMHTMLTableRowElement_GetRowIndex, xpc_qsGetterOnlyPropertyStub},
28886 : {7143, nsIDOMHTMLTableRowElement_GetCells, xpc_qsGetterOnlyPropertyStub},
28887 : // nsIDOMHTMLTableSectionElement (index 541)
28888 : {6860, nsIDOMHTMLTableSectionElement_GetRows, xpc_qsGetterOnlyPropertyStub},
28889 : // nsIDOMHTMLTextAreaElement (index 542)
28890 : {6860, nsIDOMHTMLTextAreaElement_GetRows, nsIDOMHTMLTextAreaElement_SetRows},
28891 : {0, nsIDOMHTMLTextAreaElement_GetName, nsIDOMHTMLTextAreaElement_SetName},
28892 : {6357, nsIDOMHTMLTextAreaElement_GetForm, xpc_qsGetterOnlyPropertyStub},
28893 : {7171, nsIDOMHTMLTextAreaElement_GetDefaultValue, nsIDOMHTMLTextAreaElement_SetDefaultValue},
28894 : {6865, nsIDOMHTMLTextAreaElement_GetCols, nsIDOMHTMLTextAreaElement_SetCols},
28895 : {1905, nsIDOMHTMLTextAreaElement_GetValue, nsIDOMHTMLTextAreaElement_SetValue},
28896 : {5547, nsIDOMHTMLTextAreaElement_GetType, xpc_qsGetterOnlyPropertyStub},
28897 : {6903, nsIDOMHTMLTextAreaElement_GetSelectionStart, nsIDOMHTMLTextAreaElement_SetSelectionStart},
28898 : {6918, nsIDOMHTMLTextAreaElement_GetSelectionEnd, nsIDOMHTMLTextAreaElement_SetSelectionEnd},
28899 : {6931, nsIDOMHTMLTextAreaElement_GetSelectionDirection, nsIDOMHTMLTextAreaElement_SetSelectionDirection},
28900 : {6892, nsIDOMHTMLTextAreaElement_GetTextLength, xpc_qsGetterOnlyPropertyStub},
28901 : {7184, nsIDOMHTMLTextAreaElement_GetWrap, nsIDOMHTMLTextAreaElement_SetWrap},
28902 : // nsIDOMHTMLTitleElement (index 554)
28903 : {6340, nsIDOMHTMLTitleElement_GetText, nsIDOMHTMLTitleElement_SetText},
28904 : // nsIDOMHTMLCanvasElement (index 555)
28905 : {145, nsIDOMHTMLCanvasElement_GetWidth, nsIDOMHTMLCanvasElement_SetWidth},
28906 : {138, nsIDOMHTMLCanvasElement_GetHeight, nsIDOMHTMLCanvasElement_SetHeight},
28907 : // nsIDOMRange (index 557)
28908 : {7210, nsIDOMRange_GetStartContainer, xpc_qsGetterOnlyPropertyStub},
28909 : {7225, nsIDOMRange_GetStartOffset, xpc_qsGetterOnlyPropertyStub},
28910 : {7237, nsIDOMRange_GetEndContainer, xpc_qsGetterOnlyPropertyStub},
28911 : {7250, nsIDOMRange_GetEndOffset, xpc_qsGetterOnlyPropertyStub},
28912 : {7260, nsIDOMRange_GetCollapsed, xpc_qsGetterOnlyPropertyStub},
28913 : {7270, nsIDOMRange_GetCommonAncestorContainer, xpc_qsGetterOnlyPropertyStub},
28914 : // nsIDOMStorage (index 563)
28915 : {169, nsIDOMStorage_GetLength, xpc_qsGetterOnlyPropertyStub},
28916 : // nsIDOMStorageItem (index 564)
28917 : {1905, nsIDOMStorageItem_GetValue, nsIDOMStorageItem_SetValue},
28918 : // nsIDOMSVGStylable (index 565)
28919 : {6526, nsIDOMSVGStylable_GetClassName, xpc_qsGetterOnlyPropertyStub},
28920 : {2215, nsIDOMSVGStylable_GetStyle, xpc_qsGetterOnlyPropertyStub},
28921 : // nsIDOMXPathResult (index 567)
28922 : {7702, nsIDOMXPathResult_GetSnapshotLength, xpc_qsGetterOnlyPropertyStub},
28923 : {7717, nsIDOMXPathResult_GetResultType, xpc_qsGetterOnlyPropertyStub},
28924 : {7728, nsIDOMXPathResult_GetNumberValue, xpc_qsGetterOnlyPropertyStub},
28925 : {7740, nsIDOMXPathResult_GetStringValue, xpc_qsGetterOnlyPropertyStub},
28926 : {7752, nsIDOMXPathResult_GetBooleanValue, xpc_qsGetterOnlyPropertyStub},
28927 : {7765, nsIDOMXPathResult_GetSingleNodeValue, xpc_qsGetterOnlyPropertyStub},
28928 : // nsIDOMXULElement (index 573)
28929 : {6514, nsIDOMXULElement_GetId, nsIDOMXULElement_SetId},
28930 : {6526, nsIDOMXULElement_GetClassName, nsIDOMXULElement_SetClassName},
28931 : {7801, nsIDOMXULElement_GetAlign, nsIDOMXULElement_SetAlign},
28932 : {6522, nsIDOMXULElement_GetDir, nsIDOMXULElement_SetDir},
28933 : {7807, nsIDOMXULElement_GetFlex, nsIDOMXULElement_SetFlex},
28934 : {7812, nsIDOMXULElement_GetFlexGroup, nsIDOMXULElement_SetFlexGroup},
28935 : {7822, nsIDOMXULElement_GetOrdinal, nsIDOMXULElement_SetOrdinal},
28936 : {7830, nsIDOMXULElement_GetOrient, nsIDOMXULElement_SetOrient},
28937 : {7837, nsIDOMXULElement_GetPack, nsIDOMXULElement_SetPack},
28938 : {6544, nsIDOMXULElement_GetHidden, nsIDOMXULElement_SetHidden},
28939 : {7260, nsIDOMXULElement_GetCollapsed, nsIDOMXULElement_SetCollapsed},
28940 : {7842, nsIDOMXULElement_GetObserves, nsIDOMXULElement_SetObserves},
28941 : {7851, nsIDOMXULElement_GetMenu, nsIDOMXULElement_SetMenu},
28942 : {6646, nsIDOMXULElement_GetContextMenu, nsIDOMXULElement_SetContextMenu},
28943 : {7856, nsIDOMXULElement_GetTooltip, nsIDOMXULElement_SetTooltip},
28944 : {145, nsIDOMXULElement_GetWidth, nsIDOMXULElement_SetWidth},
28945 : {138, nsIDOMXULElement_GetHeight, nsIDOMXULElement_SetHeight},
28946 : {3118, nsIDOMXULElement_GetMinWidth, nsIDOMXULElement_SetMinWidth},
28947 : {3108, nsIDOMXULElement_GetMinHeight, nsIDOMXULElement_SetMinHeight},
28948 : {3099, nsIDOMXULElement_GetMaxWidth, nsIDOMXULElement_SetMaxWidth},
28949 : {3089, nsIDOMXULElement_GetMaxHeight, nsIDOMXULElement_SetMaxHeight},
28950 : {7864, nsIDOMXULElement_GetPersist, nsIDOMXULElement_SetPersist},
28951 : {151, nsIDOMXULElement_GetLeft, nsIDOMXULElement_SetLeft},
28952 : {12, nsIDOMXULElement_GetTop, nsIDOMXULElement_SetTop},
28953 : {7872, nsIDOMXULElement_GetDatasources, nsIDOMXULElement_SetDatasources},
28954 : {7884, nsIDOMXULElement_GetRef, nsIDOMXULElement_SetRef},
28955 : {7888, nsIDOMXULElement_GetTooltipText, nsIDOMXULElement_SetTooltipText},
28956 : {7900, nsIDOMXULElement_GetStatusText, nsIDOMXULElement_SetStatusText},
28957 : {7911, nsIDOMXULElement_GetAllowEvents, nsIDOMXULElement_SetAllowEvents},
28958 : {7923, nsIDOMXULElement_GetDatabase, xpc_qsGetterOnlyPropertyStub},
28959 : {7932, nsIDOMXULElement_GetBuilder, xpc_qsGetterOnlyPropertyStub},
28960 : {7940, nsIDOMXULElement_GetResource, xpc_qsGetterOnlyPropertyStub},
28961 : {7949, nsIDOMXULElement_GetControllers, xpc_qsGetterOnlyPropertyStub},
28962 : {7961, nsIDOMXULElement_GetBoxObject, xpc_qsGetterOnlyPropertyStub},
28963 : // nsIBoxObject (index 607)
28964 : {5966, nsIBoxObject_GetX, xpc_qsGetterOnlyPropertyStub},
28965 : {5968, nsIBoxObject_GetY, xpc_qsGetterOnlyPropertyStub},
28966 : {5696, nsIBoxObject_GetScreenX, xpc_qsGetterOnlyPropertyStub},
28967 : {5704, nsIBoxObject_GetScreenY, xpc_qsGetterOnlyPropertyStub},
28968 : {145, nsIBoxObject_GetWidth, xpc_qsGetterOnlyPropertyStub},
28969 : {138, nsIBoxObject_GetHeight, xpc_qsGetterOnlyPropertyStub},
28970 : // nsIDOMFileReader (index 613)
28971 : {8097, nsIDOMFileReader_GetReadyState, xpc_qsGetterOnlyPropertyStub},
28972 : {8108, nsIDOMFileReader_GetResult, xpc_qsGetterOnlyPropertyStub},
28973 : {8115, nsIDOMFileReader_GetError, xpc_qsGetterOnlyPropertyStub},
28974 : {8121, nsIDOMFileReader_GetOnloadstart, nsIDOMFileReader_SetOnloadstart},
28975 : {8133, nsIDOMFileReader_GetOnprogress, nsIDOMFileReader_SetOnprogress},
28976 : {8144, nsIDOMFileReader_GetOnload, nsIDOMFileReader_SetOnload},
28977 : {8151, nsIDOMFileReader_GetOnabort, nsIDOMFileReader_SetOnabort},
28978 : {8159, nsIDOMFileReader_GetOnerror, nsIDOMFileReader_SetOnerror},
28979 : {8167, nsIDOMFileReader_GetOnloadend, nsIDOMFileReader_SetOnloadend},
28980 : // nsIXMLHttpRequest (index 622)
28981 : {8177, nsIXMLHttpRequest_GetResponseXML, xpc_qsGetterOnlyPropertyStub},
28982 : {8189, nsIXMLHttpRequest_GetResponseText, xpc_qsGetterOnlyPropertyStub},
28983 : {8202, nsIXMLHttpRequest_GetResponseType, nsIXMLHttpRequest_SetResponseType},
28984 : {8215, nsIXMLHttpRequest_GetResponse, xpc_qsGetterOnlyPropertyStub},
28985 : {8224, nsIXMLHttpRequest_GetStatus, xpc_qsGetterOnlyPropertyStub},
28986 : {8254, nsIXMLHttpRequest_GetTimeout, nsIXMLHttpRequest_SetTimeout},
28987 : {8097, nsIXMLHttpRequest_GetReadyState, xpc_qsGetterOnlyPropertyStub},
28988 : {8262, nsIXMLHttpRequest_GetMultipart, nsIXMLHttpRequest_SetMultipart},
28989 : {8272, nsIXMLHttpRequest_GetMozBackgroundRequest, nsIXMLHttpRequest_SetMozBackgroundRequest},
28990 : {8293, nsIXMLHttpRequest_GetWithCredentials, nsIXMLHttpRequest_SetWithCredentials},
28991 : {1210, nsIXMLHttpRequest_GetOnreadystatechange, nsIXMLHttpRequest_SetOnreadystatechange},
28992 : // nsIWebSocket (index 633)
28993 : {8309, nsIWebSocket_GetUrl, xpc_qsGetterOnlyPropertyStub},
28994 : {8313, nsIWebSocket_GetExtensions, xpc_qsGetterOnlyPropertyStub},
28995 : {8324, nsIWebSocket_GetProtocol, xpc_qsGetterOnlyPropertyStub},
28996 : {8097, nsIWebSocket_GetReadyState, xpc_qsGetterOnlyPropertyStub},
28997 : {8333, nsIWebSocket_GetBufferedAmount, xpc_qsGetterOnlyPropertyStub},
28998 : {8348, nsIWebSocket_GetBinaryType, nsIWebSocket_SetBinaryType},
28999 : {8359, nsIWebSocket_GetOnopen, nsIWebSocket_SetOnopen},
29000 : {8366, nsIWebSocket_GetOnmessage, nsIWebSocket_SetOnmessage},
29001 : {8159, nsIWebSocket_GetOnerror, nsIWebSocket_SetOnerror},
29002 : {8376, nsIWebSocket_GetOnclose, nsIWebSocket_SetOnclose},
29003 : // nsIDOMWebGLRenderingContext (index 643)
29004 : {199, nsIDOMWebGLRenderingContext_GetCanvas, xpc_qsGetterOnlyPropertyStub},
29005 : {10308, nsIDOMWebGLRenderingContext_GetDrawingBufferWidth, xpc_qsGetterOnlyPropertyStub},
29006 : {10327, nsIDOMWebGLRenderingContext_GetDrawingBufferHeight, xpc_qsGetterOnlyPropertyStub},
29007 : // nsIDOMNotifyAudioAvailableEvent (index 646)
29008 : {10347, nsIDOMNotifyAudioAvailableEvent_GetFrameBuffer, xpc_qsGetterOnlyPropertyStub},
29009 : {10359, nsIDOMNotifyAudioAvailableEvent_GetTime, xpc_qsGetterOnlyPropertyStub},
29010 : // nsIIDBCursor (index 648)
29011 : {2817, nsIIDBCursor_GetDirection, xpc_qsGetterOnlyPropertyStub},
29012 : {6054, nsIIDBCursor_GetSource, xpc_qsGetterOnlyPropertyStub},
29013 : {7585, nsIIDBCursor_GetKey, xpc_qsGetterOnlyPropertyStub},
29014 : {10378, nsIIDBCursor_GetPrimaryKey, xpc_qsGetterOnlyPropertyStub},
29015 : // nsIIDBCursorWithValue (index 652)
29016 : {1905, nsIIDBCursorWithValue_GetValue, xpc_qsGetterOnlyPropertyStub},
29017 : // nsIIDBDatabase (index 653)
29018 : {0, nsIIDBDatabase_GetName, xpc_qsGetterOnlyPropertyStub},
29019 : {10420, nsIIDBDatabase_GetVersion, xpc_qsGetterOnlyPropertyStub},
29020 : {10428, nsIIDBDatabase_GetObjectStoreNames, xpc_qsGetterOnlyPropertyStub},
29021 : {8151, nsIIDBDatabase_GetOnabort, nsIIDBDatabase_SetOnabort},
29022 : {8159, nsIIDBDatabase_GetOnerror, nsIIDBDatabase_SetOnerror},
29023 : {10493, nsIIDBDatabase_GetOnversionchange, nsIIDBDatabase_SetOnversionchange},
29024 : // nsIIDBDatabaseException (index 659)
29025 : {10509, nsIIDBDatabaseException_GetCode, xpc_qsGetterOnlyPropertyStub},
29026 : // nsIIDBIndex (index 660)
29027 : {0, nsIIDBIndex_GetName, xpc_qsGetterOnlyPropertyStub},
29028 : {10514, nsIIDBIndex_GetStoreName, xpc_qsGetterOnlyPropertyStub},
29029 : {10524, nsIIDBIndex_GetKeyPath, xpc_qsGetterOnlyPropertyStub},
29030 : {10532, nsIIDBIndex_GetUnique, xpc_qsGetterOnlyPropertyStub},
29031 : {10539, nsIIDBIndex_GetMultiEntry, xpc_qsGetterOnlyPropertyStub},
29032 : {10550, nsIIDBIndex_GetObjectStore, xpc_qsGetterOnlyPropertyStub},
29033 : // nsIIDBKeyRange (index 666)
29034 : {10622, nsIIDBKeyRange_GetLower, xpc_qsGetterOnlyPropertyStub},
29035 : {10628, nsIIDBKeyRange_GetUpper, xpc_qsGetterOnlyPropertyStub},
29036 : {10634, nsIIDBKeyRange_GetLowerOpen, xpc_qsGetterOnlyPropertyStub},
29037 : {10644, nsIIDBKeyRange_GetUpperOpen, xpc_qsGetterOnlyPropertyStub},
29038 : // nsIIDBObjectStore (index 670)
29039 : {0, nsIIDBObjectStore_GetName, xpc_qsGetterOnlyPropertyStub},
29040 : {10524, nsIIDBObjectStore_GetKeyPath, xpc_qsGetterOnlyPropertyStub},
29041 : {10654, nsIIDBObjectStore_GetIndexNames, xpc_qsGetterOnlyPropertyStub},
29042 : {10481, nsIIDBObjectStore_GetTransaction, xpc_qsGetterOnlyPropertyStub},
29043 : {10665, nsIIDBObjectStore_GetAutoIncrement, xpc_qsGetterOnlyPropertyStub},
29044 : // nsIIDBRequest (index 675)
29045 : {8097, nsIIDBRequest_GetReadyState, xpc_qsGetterOnlyPropertyStub},
29046 : {6054, nsIIDBRequest_GetSource, xpc_qsGetterOnlyPropertyStub},
29047 : {10481, nsIIDBRequest_GetTransaction, xpc_qsGetterOnlyPropertyStub},
29048 : {8108, nsIIDBRequest_GetResult, xpc_qsGetterOnlyPropertyStub},
29049 : {10707, nsIIDBRequest_GetErrorCode, xpc_qsGetterOnlyPropertyStub},
29050 : {10717, nsIIDBRequest_GetOnsuccess, nsIIDBRequest_SetOnsuccess},
29051 : {8159, nsIIDBRequest_GetOnerror, nsIIDBRequest_SetOnerror},
29052 : // nsIIDBTransaction (index 682)
29053 : {10727, nsIIDBTransaction_GetDb, xpc_qsGetterOnlyPropertyStub},
29054 : {10730, nsIIDBTransaction_GetMode, xpc_qsGetterOnlyPropertyStub},
29055 : {10428, nsIIDBTransaction_GetObjectStoreNames, xpc_qsGetterOnlyPropertyStub},
29056 : {8159, nsIIDBTransaction_GetOnerror, nsIIDBTransaction_SetOnerror},
29057 : {10735, nsIIDBTransaction_GetOncomplete, nsIIDBTransaction_SetOncomplete},
29058 : {8151, nsIIDBTransaction_GetOnabort, nsIIDBTransaction_SetOnabort},
29059 : // nsIIDBOpenDBRequest (index 688)
29060 : {10765, nsIIDBOpenDBRequest_GetOnblocked, nsIIDBOpenDBRequest_SetOnblocked},
29061 : {10775, nsIIDBOpenDBRequest_GetOnupgradeneeded, nsIIDBOpenDBRequest_SetOnupgradeneeded},
29062 : // nsIIDBVersionChangeEvent (index 690)
29063 : {10791, nsIIDBVersionChangeEvent_GetOldVersion, xpc_qsGetterOnlyPropertyStub},
29064 : {10802, nsIIDBVersionChangeEvent_GetNewVersion, xpc_qsGetterOnlyPropertyStub},
29065 : // nsIDOMDOMError (index 692)
29066 : {0, nsIDOMDOMError_GetName, xpc_qsGetterOnlyPropertyStub},
29067 : };
29068 :
29069 : static const xpc_qsFunctionSpec all_functions[] = {
29070 : // nsIDOMWindow (index 0)
29071 : {21, 0, nsIDOMWindow_GetSelection},
29072 : {34, 1, nsIDOMWindow_ScrollByLines},
29073 : {48, 2, nsIDOMWindow_GetComputedStyle},
29074 : // nsIDOMJSWindow (index 3)
29075 : {133, 1, nsIDOMJSWindow_Dump},
29076 : // nsIDOMClientRectList (index 4)
29077 : {176, 1, nsIDOMClientRectList_Item},
29078 : // nsIDOMPaintRequestList (index 5)
29079 : {176, 1, nsIDOMPaintRequestList_Item},
29080 : // nsIDOMCanvasRenderingContext2D (index 6)
29081 : {206, 0, nsIDOMCanvasRenderingContext2D_Save},
29082 : {211, 0, nsIDOMCanvasRenderingContext2D_Restore},
29083 : {219, 2, nsIDOMCanvasRenderingContext2D_Scale},
29084 : {225, 1, nsIDOMCanvasRenderingContext2D_Rotate},
29085 : {232, 2, nsIDOMCanvasRenderingContext2D_Translate},
29086 : {242, 6, nsIDOMCanvasRenderingContext2D_Transform},
29087 : {252, 6, nsIDOMCanvasRenderingContext2D_SetTransform},
29088 : {383, 4, nsIDOMCanvasRenderingContext2D_CreateLinearGradient},
29089 : {404, 6, nsIDOMCanvasRenderingContext2D_CreateRadialGradient},
29090 : {425, 2, nsIDOMCanvasRenderingContext2D_CreatePattern},
29091 : {550, 4, nsIDOMCanvasRenderingContext2D_ClearRect},
29092 : {560, 4, nsIDOMCanvasRenderingContext2D_FillRect},
29093 : {569, 4, nsIDOMCanvasRenderingContext2D_StrokeRect},
29094 : {580, 0, nsIDOMCanvasRenderingContext2D_BeginPath},
29095 : {590, 0, nsIDOMCanvasRenderingContext2D_ClosePath},
29096 : {600, 2, nsIDOMCanvasRenderingContext2D_MoveTo},
29097 : {607, 2, nsIDOMCanvasRenderingContext2D_LineTo},
29098 : {614, 4, nsIDOMCanvasRenderingContext2D_QuadraticCurveTo},
29099 : {631, 6, nsIDOMCanvasRenderingContext2D_BezierCurveTo},
29100 : {645, 5, nsIDOMCanvasRenderingContext2D_ArcTo},
29101 : {651, 6, nsIDOMCanvasRenderingContext2D_Arc},
29102 : {655, 4, nsIDOMCanvasRenderingContext2D_Rect},
29103 : {660, 0, nsIDOMCanvasRenderingContext2D_Fill},
29104 : {665, 0, nsIDOMCanvasRenderingContext2D_Stroke},
29105 : {672, 0, nsIDOMCanvasRenderingContext2D_Clip},
29106 : {705, 4, nsIDOMCanvasRenderingContext2D_FillText},
29107 : {714, 4, nsIDOMCanvasRenderingContext2D_StrokeText},
29108 : {725, 1, nsIDOMCanvasRenderingContext2D_MeasureText},
29109 : {750, 9, nsIDOMCanvasRenderingContext2D_DrawImage},
29110 : {760, 2, nsIDOMCanvasRenderingContext2D_IsPointInPath},
29111 : {774, 0, nsIDOMCanvasRenderingContext2D_GetImageData},
29112 : {787, 0, nsIDOMCanvasRenderingContext2D_PutImageData},
29113 : {800, 0, nsIDOMCanvasRenderingContext2D_CreateImageData},
29114 : {841, 7, nsIDOMCanvasRenderingContext2D_DrawWindow},
29115 : {852, 7, nsIDOMCanvasRenderingContext2D_AsyncDrawXULElement},
29116 : // nsIDOMCanvasGradient (index 41)
29117 : {872, 2, nsIDOMCanvasGradient_AddColorStop},
29118 : // nsIDOMDocument (index 42)
29119 : {921, 1, nsIDOMDocument_GetElementsByTagName},
29120 : {950, 2, nsIDOMDocument_GetElementsByTagNameNS},
29121 : {973, 1, nsIDOMDocument_GetElementById},
29122 : {988, 0, nsIDOMDocument_CreateDocumentFragment},
29123 : {1011, 1, nsIDOMDocument_CreateElement},
29124 : {1025, 2, nsIDOMDocument_CreateElementNS},
29125 : {1041, 2, nsIDOMDocument_ImportNode},
29126 : {1052, 1, nsIDOMDocument_CreateTextNode},
29127 : {1079, 1, nsIDOMDocument_AdoptNode},
29128 : {1101, 3, nsIDOMDocument_CreateNodeIterator},
29129 : {1120, 1, nsIDOMDocument_CreateEvent},
29130 : {1132, 1, nsIDOMDocument_GetElementsByClassName},
29131 : {1170, 0, nsIDOMDocument_HasFocus},
29132 : {1179, 2, nsIDOMDocument_ElementFromPoint},
29133 : // nsIDOMElement (index 56)
29134 : {1229, 2, nsIDOMElement_RemoveAttributeNS},
29135 : {1247, 1, nsIDOMElement_RemoveAttribute},
29136 : {1263, 1, nsIDOMElement_GetAttribute},
29137 : {921, 1, nsIDOMElement_GetElementsByTagName},
29138 : {1276, 2, nsIDOMElement_SetAttribute},
29139 : {950, 2, nsIDOMElement_GetElementsByTagNameNS},
29140 : {1289, 2, nsIDOMElement_HasAttributeNS},
29141 : {1312, 3, nsIDOMElement_SetAttributeNS},
29142 : {1327, 1, nsIDOMElement_HasAttribute},
29143 : {1340, 2, nsIDOMElement_GetAttributeNS},
29144 : // nsIDOMNamedNodeMap (index 66)
29145 : {176, 1, nsIDOMNamedNodeMap_Item},
29146 : // nsIDOMNode (index 67)
29147 : {1493, 2, nsIDOMNode_InsertBefore},
29148 : {1506, 2, nsIDOMNode_ReplaceChild},
29149 : {1519, 1, nsIDOMNode_RemoveChild},
29150 : {1531, 1, nsIDOMNode_AppendChild},
29151 : {1543, 0, nsIDOMNode_HasChildNodes},
29152 : {1557, 1, nsIDOMNode_CloneNode},
29153 : {1567, 0, nsIDOMNode_Normalize},
29154 : {1577, 2, nsIDOMNode_IsSupported},
29155 : {1619, 0, nsIDOMNode_HasAttributes},
29156 : {1641, 1, nsIDOMNode_CompareDocumentPosition},
29157 : {1677, 1, nsIDOMNode_LookupPrefix},
29158 : {1690, 1, nsIDOMNode_IsDefaultNamespace},
29159 : {1709, 1, nsIDOMNode_LookupNamespaceURI},
29160 : {1728, 1, nsIDOMNode_IsEqualNode},
29161 : {1740, 3, nsIDOMNode_SetUserData},
29162 : {1752, 1, nsIDOMNode_GetUserData},
29163 : {1764, 1, nsIDOMNode_Contains},
29164 : // nsIDOMNodeList (index 84)
29165 : {176, 1, nsIDOMNodeList_Item},
29166 : // nsIDOMNodeSelector (index 85)
29167 : {1773, 1, nsIDOMNodeSelector_QuerySelector},
29168 : {1787, 1, nsIDOMNodeSelector_QuerySelectorAll},
29169 : // nsIDOMText (index 87)
29170 : {1804, 1, nsIDOMText_SplitText},
29171 : // nsIDOMDOMImplementation (index 88)
29172 : {1814, 2, nsIDOMDOMImplementation_HasFeature},
29173 : {1825, 3, nsIDOMDOMImplementation_CreateDocumentType},
29174 : {1844, 3, nsIDOMDOMImplementation_CreateDocument},
29175 : {1859, 1, nsIDOMDOMImplementation_CreateHTMLDocument},
29176 : // nsIDOMDOMStringList (index 92)
29177 : {176, 1, nsIDOMDOMStringList_Item},
29178 : {1764, 1, nsIDOMDOMStringList_Contains},
29179 : // nsIDOMDOMTokenList (index 94)
29180 : {176, 1, nsIDOMDOMTokenList_Item},
29181 : {1764, 1, nsIDOMDOMTokenList_Contains},
29182 : {1878, 1, nsIDOMDOMTokenList_Add},
29183 : {1882, 1, nsIDOMDOMTokenList_Remove},
29184 : {1889, 1, nsIDOMDOMTokenList_Toggle},
29185 : {1896, 0, nsIDOMDOMTokenList_ToString},
29186 : // nsIDOMXULDocument (index 100)
29187 : {1911, 1, nsIDOMXULDocument_GetBoxObjectFor},
29188 : // nsIDOMNSElement (index 101)
29189 : {1132, 1, nsIDOMNSElement_GetElementsByClassName},
29190 : {1927, 0, nsIDOMNSElement_GetClientRects},
29191 : {1942, 0, nsIDOMNSElement_GetBoundingClientRect},
29192 : {2170, 1, nsIDOMNSElement_SetCapture},
29193 : {2181, 0, nsIDOMNSElement_ReleaseCapture},
29194 : {2196, 1, nsIDOMNSElement_MozMatchesSelector},
29195 : // nsIDOMCSSStyleDeclaration (index 107)
29196 : {5401, 1, nsIDOMCSSStyleDeclaration_GetPropertyValue},
29197 : {5418, 1, nsIDOMCSSStyleDeclaration_GetPropertyCSSValue},
29198 : {5438, 1, nsIDOMCSSStyleDeclaration_RemoveProperty},
29199 : {5453, 1, nsIDOMCSSStyleDeclaration_GetPropertyPriority},
29200 : {5473, 3, nsIDOMCSSStyleDeclaration_SetProperty},
29201 : {176, 1, nsIDOMCSSStyleDeclaration_Item},
29202 : // nsIDOMEventTarget (index 113)
29203 : {5496, 4, nsIDOMEventTarget_AddEventListener},
29204 : {5513, 3, nsIDOMEventTarget_RemoveEventListener},
29205 : {5533, 1, nsIDOMEventTarget_DispatchEvent},
29206 : // nsIDOMEvent (index 116)
29207 : {5613, 0, nsIDOMEvent_StopPropagation},
29208 : {5629, 0, nsIDOMEvent_PreventDefault},
29209 : {5644, 3, nsIDOMEvent_InitEvent},
29210 : {5671, 0, nsIDOMEvent_StopImmediatePropagation},
29211 : // nsIDOMMouseEvent (index 120)
29212 : {5781, 15, nsIDOMMouseEvent_InitMouseEvent},
29213 : {5823, 17, nsIDOMMouseEvent_InitNSMouseEvent},
29214 : // nsIDOMKeyEvent (index 122)
29215 : {5857, 10, nsIDOMKeyEvent_InitKeyEvent},
29216 : // nsIDOMMutationEvent (index 123)
29217 : {5921, 8, nsIDOMMutationEvent_InitMutationEvent},
29218 : // nsIDOMDragEvent (index 124)
29219 : {5952, 16, nsIDOMDragEvent_InitDragEvent},
29220 : // nsIDOMScrollAreaEvent (index 125)
29221 : {5970, 9, nsIDOMScrollAreaEvent_InitScrollAreaEvent},
29222 : // nsIDOMMessageEvent (index 126)
29223 : {6061, 7, nsIDOMMessageEvent_InitMessageEvent},
29224 : // nsIDOMMouseScrollEvent (index 127)
29225 : {6083, 16, nsIDOMMouseScrollEvent_InitMouseScrollEvent},
29226 : // nsIDOMNSEvent (index 128)
29227 : {6149, 0, nsIDOMNSEvent_GetPreventDefault},
29228 : // nsIDOMTouchList (index 129)
29229 : {176, 1, nsIDOMTouchList_Item},
29230 : {6263, 1, nsIDOMTouchList_IdentifiedTouch},
29231 : // nsIDOMTouchEvent (index 131)
29232 : {6316, 12, nsIDOMTouchEvent_InitTouchEvent},
29233 : // nsIDOMHTMLCollection (index 132)
29234 : {176, 1, nsIDOMHTMLCollection_Item},
29235 : // nsIDOMHTMLDocument (index 133)
29236 : {6421, 1, nsIDOMHTMLDocument_GetElementsByName},
29237 : {6477, 1, nsIDOMHTMLDocument_Write},
29238 : {6483, 1, nsIDOMHTMLDocument_Writeln},
29239 : {21, 0, nsIDOMHTMLDocument_GetSelection},
29240 : // nsIDOMHTMLElement (index 137)
29241 : {6551, 0, nsIDOMHTMLElement_Click},
29242 : {6566, 0, nsIDOMHTMLElement_Focus},
29243 : {6572, 0, nsIDOMHTMLElement_Blur},
29244 : {6689, 2, nsIDOMHTMLElement_InsertAdjacentHTML},
29245 : {6708, 1, nsIDOMHTMLElement_ScrollIntoView},
29246 : {6782, 0, nsIDOMHTMLElement_MozRequestFullScreen},
29247 : // nsIDOMHTMLFormElement (index 143)
29248 : {6812, 0, nsIDOMHTMLFormElement_Submit},
29249 : // nsIDOMHTMLInputElement (index 144)
29250 : {6879, 0, nsIDOMHTMLInputElement_Select},
29251 : {6950, 3, nsIDOMHTMLInputElement_SetSelectionRange},
29252 : // nsIDOMHTMLOptionsCollection (index 146)
29253 : {176, 1, nsIDOMHTMLOptionsCollection_Item},
29254 : {1878, 2, nsIDOMHTMLOptionsCollection_Add},
29255 : // nsIDOMHTMLSelectElement (index 148)
29256 : {1878, 2, nsIDOMHTMLSelectElement_Add},
29257 : {1882, 1, nsIDOMHTMLSelectElement_Remove},
29258 : {176, 1, nsIDOMHTMLSelectElement_Item},
29259 : // nsIDOMHTMLTableElement (index 151)
29260 : {7090, 1, nsIDOMHTMLTableElement_DeleteRow},
29261 : {7108, 1, nsIDOMHTMLTableElement_InsertRow},
29262 : // nsIDOMHTMLTableRowElement (index 153)
29263 : {7149, 1, nsIDOMHTMLTableRowElement_DeleteCell},
29264 : {7160, 1, nsIDOMHTMLTableRowElement_InsertCell},
29265 : // nsIDOMHTMLTableSectionElement (index 155)
29266 : {7108, 1, nsIDOMHTMLTableSectionElement_InsertRow},
29267 : {7090, 1, nsIDOMHTMLTableSectionElement_DeleteRow},
29268 : // nsIDOMHTMLTextAreaElement (index 157)
29269 : {6879, 0, nsIDOMHTMLTextAreaElement_Select},
29270 : {6950, 3, nsIDOMHTMLTextAreaElement_SetSelectionRange},
29271 : // nsIDOMHTMLCanvasElement (index 159)
29272 : {7189, 2, nsIDOMHTMLCanvasElement_GetContext},
29273 : {7200, 2, nsIDOMHTMLCanvasElement_ToDataURL},
29274 : // nsIDOMRange (index 161)
29275 : {7294, 2, nsIDOMRange_SetStart},
29276 : {7303, 2, nsIDOMRange_SetEnd},
29277 : {7310, 1, nsIDOMRange_SetStartBefore},
29278 : {7325, 1, nsIDOMRange_SetStartAfter},
29279 : {7339, 1, nsIDOMRange_SetEndBefore},
29280 : {7352, 1, nsIDOMRange_SetEndAfter},
29281 : {7364, 1, nsIDOMRange_Collapse},
29282 : {7373, 1, nsIDOMRange_SelectNode},
29283 : {7384, 1, nsIDOMRange_SelectNodeContents},
29284 : {7403, 2, nsIDOMRange_CompareBoundaryPoints},
29285 : {7425, 0, nsIDOMRange_DeleteContents},
29286 : {7440, 0, nsIDOMRange_ExtractContents},
29287 : {7456, 0, nsIDOMRange_CloneContents},
29288 : {7470, 1, nsIDOMRange_InsertNode},
29289 : {7481, 1, nsIDOMRange_SurroundContents},
29290 : {7498, 0, nsIDOMRange_CloneRange},
29291 : {1896, 0, nsIDOMRange_ToString},
29292 : {7509, 0, nsIDOMRange_Detach},
29293 : {7516, 1, nsIDOMRange_CreateContextualFragment},
29294 : {7541, 2, nsIDOMRange_IsPointInRange},
29295 : {7556, 2, nsIDOMRange_ComparePoint},
29296 : {1927, 0, nsIDOMRange_GetClientRects},
29297 : {1942, 0, nsIDOMRange_GetBoundingClientRect},
29298 : // nsIDOMToString (index 184)
29299 : {1896, 0, nsIDOMToString_ToString},
29300 : // nsIDOMStorage (index 185)
29301 : {7569, 2, nsIDOMStorage_SetItem},
29302 : {7577, 1, nsIDOMStorage_GetItem},
29303 : {7585, 1, nsIDOMStorage_Key},
29304 : {7589, 1, nsIDOMStorage_RemoveItem},
29305 : {2760, 0, nsIDOMStorage_Clear},
29306 : // nsIDOMSVGStylable (index 190)
29307 : {7600, 1, nsIDOMSVGStylable_GetPresentationAttribute},
29308 : // nsIDOMNodeIterator (index 191)
29309 : {7625, 0, nsIDOMNodeIterator_NextNode},
29310 : // nsIDOMXPathEvaluator (index 192)
29311 : {7634, 5, nsIDOMXPathEvaluator_Evaluate},
29312 : {7643, 2, nsIDOMXPathEvaluator_CreateExpression},
29313 : {7660, 1, nsIDOMXPathEvaluator_CreateNSResolver},
29314 : // nsIDOMXPathExpression (index 195)
29315 : {7634, 3, nsIDOMXPathExpression_Evaluate},
29316 : // nsIDOMXPathNSResolver (index 196)
29317 : {1709, 1, nsIDOMXPathNSResolver_LookupNamespaceURI},
29318 : // nsIDOMXPathResult (index 197)
29319 : {7677, 1, nsIDOMXPathResult_SnapshotItem},
29320 : {7690, 0, nsIDOMXPathResult_IterateNext},
29321 : // nsIDOMNSXPathExpression (index 199)
29322 : {7781, 5, nsIDOMNSXPathExpression_EvaluateWithContext},
29323 : // nsIDOMXULElement (index 200)
29324 : {6566, 0, nsIDOMXULElement_Focus},
29325 : {6572, 0, nsIDOMXULElement_Blur},
29326 : {6551, 0, nsIDOMXULElement_Click},
29327 : {7971, 0, nsIDOMXULElement_DoCommand},
29328 : {7981, 2, nsIDOMXULElement_GetElementsByAttribute},
29329 : {8004, 3, nsIDOMXULElement_GetElementsByAttributeNS},
29330 : // nsIDOMFileReader (index 206)
29331 : {8029, 1, nsIDOMFileReader_ReadAsArrayBuffer},
29332 : {8047, 1, nsIDOMFileReader_ReadAsBinaryString},
29333 : {8066, 2, nsIDOMFileReader_ReadAsText},
29334 : {8077, 1, nsIDOMFileReader_ReadAsDataURL},
29335 : {8091, 0, nsIDOMFileReader_Abort},
29336 : // nsIXMLHttpRequest (index 211)
29337 : {8091, 0, nsIXMLHttpRequest_Abort},
29338 : {8231, 5, nsIXMLHttpRequest_Open},
29339 : {8236, 1, nsIXMLHttpRequest_Send},
29340 : {8241, 1, nsIXMLHttpRequest_SendAsBinary},
29341 : // nsIWebSocket (index 215)
29342 : {8236, 1, nsIWebSocket_Send},
29343 : {8384, 2, nsIWebSocket_Close},
29344 : // nsIDOMWebGLRenderingContext (index 217)
29345 : {8390, 1, nsIDOMWebGLRenderingContext_ActiveTexture},
29346 : {8404, 2, nsIDOMWebGLRenderingContext_AttachShader},
29347 : {8417, 3, nsIDOMWebGLRenderingContext_BindAttribLocation},
29348 : {8436, 2, nsIDOMWebGLRenderingContext_BindBuffer},
29349 : {8447, 2, nsIDOMWebGLRenderingContext_BindFramebuffer},
29350 : {8463, 2, nsIDOMWebGLRenderingContext_BindRenderbuffer},
29351 : {8480, 2, nsIDOMWebGLRenderingContext_BindTexture},
29352 : {8492, 4, nsIDOMWebGLRenderingContext_BlendColor},
29353 : {8503, 1, nsIDOMWebGLRenderingContext_BlendEquation},
29354 : {8517, 2, nsIDOMWebGLRenderingContext_BlendEquationSeparate},
29355 : {8539, 2, nsIDOMWebGLRenderingContext_BlendFunc},
29356 : {8549, 4, nsIDOMWebGLRenderingContext_BlendFuncSeparate},
29357 : {8567, 1, nsIDOMWebGLRenderingContext_BufferData},
29358 : {8578, 1, nsIDOMWebGLRenderingContext_BufferSubData},
29359 : {8592, 1, nsIDOMWebGLRenderingContext_CheckFramebufferStatus},
29360 : {2760, 1, nsIDOMWebGLRenderingContext_Clear},
29361 : {8615, 4, nsIDOMWebGLRenderingContext_ClearColor},
29362 : {8626, 1, nsIDOMWebGLRenderingContext_ClearDepth},
29363 : {8637, 1, nsIDOMWebGLRenderingContext_ClearStencil},
29364 : {8650, 4, nsIDOMWebGLRenderingContext_ColorMask},
29365 : {8660, 1, nsIDOMWebGLRenderingContext_CompileShader},
29366 : {8674, 1, nsIDOMWebGLRenderingContext_CompressedTexImage2D},
29367 : {8695, 1, nsIDOMWebGLRenderingContext_CompressedTexSubImage2D},
29368 : {8719, 8, nsIDOMWebGLRenderingContext_CopyTexImage2D},
29369 : {8734, 8, nsIDOMWebGLRenderingContext_CopyTexSubImage2D},
29370 : {8752, 0, nsIDOMWebGLRenderingContext_CreateBuffer},
29371 : {8765, 0, nsIDOMWebGLRenderingContext_CreateProgram},
29372 : {8779, 0, nsIDOMWebGLRenderingContext_CreateFramebuffer},
29373 : {8797, 0, nsIDOMWebGLRenderingContext_CreateRenderbuffer},
29374 : {8816, 1, nsIDOMWebGLRenderingContext_CreateShader},
29375 : {8829, 0, nsIDOMWebGLRenderingContext_CreateTexture},
29376 : {8843, 1, nsIDOMWebGLRenderingContext_CullFace},
29377 : {8852, 1, nsIDOMWebGLRenderingContext_DeleteBuffer},
29378 : {8865, 1, nsIDOMWebGLRenderingContext_DeleteProgram},
29379 : {8879, 1, nsIDOMWebGLRenderingContext_DeleteFramebuffer},
29380 : {8897, 1, nsIDOMWebGLRenderingContext_DeleteRenderbuffer},
29381 : {8916, 1, nsIDOMWebGLRenderingContext_DeleteShader},
29382 : {8929, 1, nsIDOMWebGLRenderingContext_DeleteTexture},
29383 : {8943, 1, nsIDOMWebGLRenderingContext_DepthFunc},
29384 : {8953, 1, nsIDOMWebGLRenderingContext_DepthMask},
29385 : {8963, 2, nsIDOMWebGLRenderingContext_DepthRange},
29386 : {8974, 2, nsIDOMWebGLRenderingContext_DetachShader},
29387 : {8987, 1, nsIDOMWebGLRenderingContext_Disable},
29388 : {8995, 1, nsIDOMWebGLRenderingContext_DisableVertexAttribArray},
29389 : {9020, 3, nsIDOMWebGLRenderingContext_DrawArrays},
29390 : {9031, 4, nsIDOMWebGLRenderingContext_DrawElements},
29391 : {9044, 1, nsIDOMWebGLRenderingContext_Enable},
29392 : {9051, 1, nsIDOMWebGLRenderingContext_EnableVertexAttribArray},
29393 : {9075, 0, nsIDOMWebGLRenderingContext_Finish},
29394 : {9082, 0, nsIDOMWebGLRenderingContext_Flush},
29395 : {9088, 4, nsIDOMWebGLRenderingContext_FramebufferRenderbuffer},
29396 : {9112, 5, nsIDOMWebGLRenderingContext_FramebufferTexture2D},
29397 : {9133, 1, nsIDOMWebGLRenderingContext_FrontFace},
29398 : {9143, 1, nsIDOMWebGLRenderingContext_GenerateMipmap},
29399 : {9158, 2, nsIDOMWebGLRenderingContext_GetActiveAttrib},
29400 : {9174, 2, nsIDOMWebGLRenderingContext_GetActiveUniform},
29401 : {9191, 1, nsIDOMWebGLRenderingContext_GetAttachedShaders},
29402 : {9210, 2, nsIDOMWebGLRenderingContext_GetAttribLocation},
29403 : {9228, 1, nsIDOMWebGLRenderingContext_GetParameter},
29404 : {9241, 2, nsIDOMWebGLRenderingContext_GetBufferParameter},
29405 : {9260, 0, nsIDOMWebGLRenderingContext_GetError},
29406 : {9269, 3, nsIDOMWebGLRenderingContext_GetFramebufferAttachmentParameter},
29407 : {9303, 2, nsIDOMWebGLRenderingContext_GetProgramParameter},
29408 : {9323, 1, nsIDOMWebGLRenderingContext_GetProgramInfoLog},
29409 : {9341, 2, nsIDOMWebGLRenderingContext_GetRenderbufferParameter},
29410 : {9366, 2, nsIDOMWebGLRenderingContext_GetShaderParameter},
29411 : {9385, 1, nsIDOMWebGLRenderingContext_GetShaderInfoLog},
29412 : {9402, 2, nsIDOMWebGLRenderingContext_GetShaderPrecisionFormat},
29413 : {9427, 1, nsIDOMWebGLRenderingContext_GetShaderSource},
29414 : {9443, 2, nsIDOMWebGLRenderingContext_GetTexParameter},
29415 : {9459, 2, nsIDOMWebGLRenderingContext_GetUniform},
29416 : {9470, 2, nsIDOMWebGLRenderingContext_GetUniformLocation},
29417 : {9489, 2, nsIDOMWebGLRenderingContext_GetVertexAttrib},
29418 : {9505, 2, nsIDOMWebGLRenderingContext_GetVertexAttribOffset},
29419 : {9527, 2, nsIDOMWebGLRenderingContext_Hint},
29420 : {9532, 1, nsIDOMWebGLRenderingContext_IsBuffer},
29421 : {9541, 1, nsIDOMWebGLRenderingContext_IsFramebuffer},
29422 : {9555, 1, nsIDOMWebGLRenderingContext_IsProgram},
29423 : {9565, 1, nsIDOMWebGLRenderingContext_IsRenderbuffer},
29424 : {9580, 1, nsIDOMWebGLRenderingContext_IsShader},
29425 : {9589, 1, nsIDOMWebGLRenderingContext_IsTexture},
29426 : {9599, 1, nsIDOMWebGLRenderingContext_IsEnabled},
29427 : {439, 1, nsIDOMWebGLRenderingContext_LineWidth},
29428 : {9609, 1, nsIDOMWebGLRenderingContext_LinkProgram},
29429 : {9621, 2, nsIDOMWebGLRenderingContext_PixelStorei},
29430 : {9633, 2, nsIDOMWebGLRenderingContext_PolygonOffset},
29431 : {9647, 1, nsIDOMWebGLRenderingContext_ReadPixels},
29432 : {9658, 4, nsIDOMWebGLRenderingContext_RenderbufferStorage},
29433 : {9678, 2, nsIDOMWebGLRenderingContext_SampleCoverage},
29434 : {9693, 4, nsIDOMWebGLRenderingContext_Scissor},
29435 : {9701, 2, nsIDOMWebGLRenderingContext_ShaderSource},
29436 : {9714, 3, nsIDOMWebGLRenderingContext_StencilFunc},
29437 : {9726, 4, nsIDOMWebGLRenderingContext_StencilFuncSeparate},
29438 : {9746, 1, nsIDOMWebGLRenderingContext_StencilMask},
29439 : {9758, 2, nsIDOMWebGLRenderingContext_StencilMaskSeparate},
29440 : {9778, 3, nsIDOMWebGLRenderingContext_StencilOp},
29441 : {9788, 4, nsIDOMWebGLRenderingContext_StencilOpSeparate},
29442 : {9806, 1, nsIDOMWebGLRenderingContext_TexImage2D},
29443 : {9817, 1, nsIDOMWebGLRenderingContext_TexSubImage2D},
29444 : {9831, 3, nsIDOMWebGLRenderingContext_TexParameterf},
29445 : {9845, 3, nsIDOMWebGLRenderingContext_TexParameteri},
29446 : {9859, 2, nsIDOMWebGLRenderingContext_Uniform1f},
29447 : {9869, 2, nsIDOMWebGLRenderingContext_Uniform1i},
29448 : {9879, 3, nsIDOMWebGLRenderingContext_Uniform2f},
29449 : {9889, 3, nsIDOMWebGLRenderingContext_Uniform2i},
29450 : {9899, 4, nsIDOMWebGLRenderingContext_Uniform3f},
29451 : {9909, 4, nsIDOMWebGLRenderingContext_Uniform3i},
29452 : {9919, 5, nsIDOMWebGLRenderingContext_Uniform4f},
29453 : {9929, 5, nsIDOMWebGLRenderingContext_Uniform4i},
29454 : {9939, 1, nsIDOMWebGLRenderingContext_Uniform1fv},
29455 : {9950, 1, nsIDOMWebGLRenderingContext_Uniform1iv},
29456 : {9961, 1, nsIDOMWebGLRenderingContext_Uniform2fv},
29457 : {9972, 1, nsIDOMWebGLRenderingContext_Uniform2iv},
29458 : {9983, 1, nsIDOMWebGLRenderingContext_Uniform3fv},
29459 : {9994, 1, nsIDOMWebGLRenderingContext_Uniform3iv},
29460 : {10005, 1, nsIDOMWebGLRenderingContext_Uniform4fv},
29461 : {10016, 1, nsIDOMWebGLRenderingContext_Uniform4iv},
29462 : {10027, 1, nsIDOMWebGLRenderingContext_UniformMatrix2fv},
29463 : {10044, 1, nsIDOMWebGLRenderingContext_UniformMatrix3fv},
29464 : {10061, 1, nsIDOMWebGLRenderingContext_UniformMatrix4fv},
29465 : {10078, 1, nsIDOMWebGLRenderingContext_UseProgram},
29466 : {10089, 1, nsIDOMWebGLRenderingContext_ValidateProgram},
29467 : {10105, 2, nsIDOMWebGLRenderingContext_VertexAttrib1f},
29468 : {10120, 3, nsIDOMWebGLRenderingContext_VertexAttrib2f},
29469 : {10135, 4, nsIDOMWebGLRenderingContext_VertexAttrib3f},
29470 : {10150, 5, nsIDOMWebGLRenderingContext_VertexAttrib4f},
29471 : {10165, 1, nsIDOMWebGLRenderingContext_VertexAttrib1fv},
29472 : {10181, 1, nsIDOMWebGLRenderingContext_VertexAttrib2fv},
29473 : {10197, 1, nsIDOMWebGLRenderingContext_VertexAttrib3fv},
29474 : {10213, 1, nsIDOMWebGLRenderingContext_VertexAttrib4fv},
29475 : {10229, 6, nsIDOMWebGLRenderingContext_VertexAttribPointer},
29476 : {10249, 4, nsIDOMWebGLRenderingContext_Viewport},
29477 : {10258, 1, nsIDOMWebGLRenderingContext_GetExtension},
29478 : {10271, 0, nsIDOMWebGLRenderingContext_GetSupportedExtensions},
29479 : {10294, 0, nsIDOMWebGLRenderingContext_IsContextLost},
29480 : // nsIDOMHTMLAudioElement (index 352)
29481 : {10364, 1, nsIDOMHTMLAudioElement_MozWriteAudio},
29482 : // nsIIDBCursor (index 353)
29483 : {10389, 1, nsIIDBCursor_Continue},
29484 : {10398, 1, nsIIDBCursor_Update},
29485 : {10405, 0, nsIIDBCursor_Delete},
29486 : {10412, 1, nsIIDBCursor_Advance},
29487 : // nsIIDBDatabase (index 357)
29488 : {10445, 2, nsIIDBDatabase_CreateObjectStore},
29489 : {10463, 1, nsIIDBDatabase_DeleteObjectStore},
29490 : {10481, 2, nsIIDBDatabase_Transaction},
29491 : {8384, 0, nsIIDBDatabase_Close},
29492 : // nsIIDBIndex (index 361)
29493 : {10562, 1, nsIIDBIndex_Get},
29494 : {10566, 1, nsIIDBIndex_GetKey},
29495 : {10573, 2, nsIIDBIndex_GetAll},
29496 : {10580, 2, nsIIDBIndex_GetAllKeys},
29497 : {10591, 2, nsIIDBIndex_OpenCursor},
29498 : {10602, 2, nsIIDBIndex_OpenKeyCursor},
29499 : {10616, 1, nsIIDBIndex_Count},
29500 : // nsIIDBObjectStore (index 368)
29501 : {10562, 1, nsIIDBObjectStore_Get},
29502 : {10573, 2, nsIIDBObjectStore_GetAll},
29503 : {1878, 2, nsIIDBObjectStore_Add},
29504 : {10679, 2, nsIIDBObjectStore_Put},
29505 : {10405, 1, nsIIDBObjectStore_Delete},
29506 : {2760, 0, nsIIDBObjectStore_Clear},
29507 : {10591, 2, nsIIDBObjectStore_OpenCursor},
29508 : {10683, 3, nsIIDBObjectStore_CreateIndex},
29509 : {6976, 1, nsIIDBObjectStore_Index},
29510 : {10695, 1, nsIIDBObjectStore_DeleteIndex},
29511 : {10616, 1, nsIIDBObjectStore_Count},
29512 : // nsIIDBTransaction (index 379)
29513 : {10550, 1, nsIIDBTransaction_ObjectStore},
29514 : {8091, 0, nsIIDBTransaction_Abort},
29515 : // nsIIDBFactory (index 381)
29516 : {8231, 2, nsIIDBFactory_Open},
29517 : {10746, 1, nsIIDBFactory_DeleteDatabase},
29518 : {10761, 2, nsIIDBFactory_Cmp},
29519 : // nsIIndexedDatabaseUsageCallback (index 384)
29520 : {10813, 3, nsIIndexedDatabaseUsageCallback_OnUsageResult},
29521 : // nsIIndexedDatabaseManager (index 385)
29522 : {10827, 2, nsIIndexedDatabaseManager_GetUsageForURI},
29523 : {10842, 2, nsIIndexedDatabaseManager_CancelGetUsageForURI},
29524 : {10863, 1, nsIIndexedDatabaseManager_ClearDatabasesForURI},
29525 : {10884, 1, nsIIndexedDatabaseManager_InitWindowless},
29526 : };
29527 :
29528 : static const xpc_qsHashEntry tableData[] = {
29529 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29530 : /* nsIDOMNSEvent */ {{0x07f905c1, 0x9170, 0x4103, {0x86, 0xca, 0x76, 0x63, 0x74, 0xda, 0x14, 0x9a}}, 386, 1, 128, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29531 : /* nsIDOMDOMStringList */ {{0x0bbae65c, 0x1dde, 0x11d9, {0x8c, 0x46, 0x00, 0x0a, 0x95, 0xdc, 0x23, 0x4c}}, 82, 1, 92, 2, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29532 : /* nsIDOMUIEvent */ {{0xaf3f130e, 0x0c22, 0x4613, {0xa1, 0x50, 0x78, 0x0a, 0x46, 0xc2, 0x2e, 0x3a}}, 387, 6, 0, 0, 50, XPC_QS_NULL_INDEX},
29533 : /* nsIDOMDOMTokenList */ {{0xc6f1e160, 0xeeeb, 0x404a, {0x98, 0xb0, 0x6f, 0x12, 0x46, 0x52, 0x0b, 0x6e}}, 83, 1, 94, 6, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
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 : /* nsIDOMHTMLProgressElement */ {{0x9b1d2263, 0xb60f, 0x4d18, {0xb4, 0xd1, 0x66, 0xe8, 0xc3, 0x86, 0x7c, 0x79}}, 512, 4, 0, 0, 168, XPC_QS_NULL_INDEX},
29539 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29540 : /* nsIDOMMouseScrollEvent */ {{0x159f24b9, 0x2058, 0x40b9, {0xb5, 0xbc, 0x64, 0x77, 0xd1, 0x92, 0x95, 0x5a}}, 382, 1, 127, 1, 53, 181},
29541 : /* nsIDOMDocument */ {{0xd7cdd08e, 0x1bfd, 0x4bc3, {0x97, 0x42, 0xd6, 0x65, 0x86, 0x78, 0x1e, 0xe2}}, 49, 11, 42, 14, 138, 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 : /* nsIDOMHTMLInputElement */ {{0x7330cd35, 0xc930, 0x4f45, {0xae, 0x61, 0xf5, 0x38, 0x0c, 0x30, 0x22, 0x2d}}, 485, 13, 144, 2, 168, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29547 : /* nsIDOMTouchEvent */ {{0x0cc687df, 0x0ed5, 0x4b7f, {0xb8, 0x9d, 0xcb, 0xb9, 0x9b, 0x21, 0xd2, 0x3a}}, 406, 7, 131, 1, 3, XPC_QS_NULL_INDEX},
29548 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, 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 : /* nsIDOMDOMSettableTokenList */ {{0xcdac274e, 0x6619, 0x4b5f, {0xba, 0x1a, 0xcd, 0x1d, 0xbf, 0xae, 0x44, 0xb8}}, 84, 1, 0, 0, 4, XPC_QS_NULL_INDEX},
29552 : /* nsIDOMMessageEvent */ {{0x3aca4a44, 0x8e5f, 0x4829, {0x9d, 0x59, 0xce, 0x4a, 0xdb, 0xba, 0x2b, 0x12}}, 378, 4, 126, 1, 50, XPC_QS_NULL_INDEX},
29553 : /* nsIDOMHTMLIFrameElement */ {{0x5ef30718, 0xfe45, 0x43a2, {0xa4, 0x78, 0xa9, 0xe3, 0xcb, 0xf3, 0xa1, 0x18}}, 477, 3, 0, 0, 168, XPC_QS_NULL_INDEX},
29554 : /* nsIDOMCSS2Properties */ {{0x0640c095, 0x3d15, 0x4b18, {0xac, 0xa9, 0x5a, 0x65, 0xd8, 0x66, 0x97, 0x8f}}, 101, 231, 0, 0, XPC_QS_NULL_INDEX, 182},
29555 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29556 : /* nsIDOMCanvasRenderingContext2D */ {{0x274213a8, 0xdf51, 0x4b52, {0xbf, 0xad, 0xd3, 0x06, 0xa1, 0xd5, 0xf6, 0x42}}, 23, 23, 6, 35, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29557 : /* nsIDOMElementCSSInlineStyle */ {{0x99715845, 0x95fc, 0x4a56, {0xaa, 0x53, 0x21, 0x4b, 0x65, 0xc2, 0x6e, 0x22}}, 100, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29558 : /* nsIDOMText */ {{0x437ed60c, 0xfebd, 0x4bd0, {0x89, 0x2f, 0xcf, 0x35, 0x8a, 0xdc, 0x3c, 0x96}}, 0, 0, 87, 1, 92, 183},
29559 : /* nsIDOMHTMLTableRowElement */ {{0xd24a80d4, 0x491d, 0x4e36, {0x93, 0x49, 0xaf, 0xd3, 0xc6, 0x99, 0x9b, 0x3e}}, 538, 3, 153, 2, 168, 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 : /* nsIDOMXULDocument */ {{0xb16d13c3, 0x837d, 0x445d, {0x8f, 0x56, 0x05, 0xd8, 0x3d, 0x9b, 0x9e, 0xae}}, 0, 0, 100, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29562 : /* nsIIDBObjectStore */ {{0x43157a3c, 0xbed1, 0x4ce7, {0x98, 0xc0, 0x11, 0x36, 0x5b, 0x85, 0x25, 0x60}}, 670, 5, 368, 11, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29563 : /* nsIDOMHTMLAnchorElement */ {{0xbcb54394, 0xd9f8, 0x4bcb, {0xbb, 0xbb, 0xec, 0xa9, 0x82, 0x6c, 0xdb, 0xca}}, 413, 7, 0, 0, 168, XPC_QS_NULL_INDEX},
29564 : /* nsIDOMToString */ {{0x2a72e20f, 0xe337, 0x4822, {0x89, 0x94, 0x2e, 0x35, 0xb5, 0x55, 0x0d, 0x03}}, 0, 0, 184, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29565 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29566 : /* nsIBoxObject */ {{0xce572460, 0xb0f2, 0x4650, {0xa9, 0xe7, 0xc5, 0x3a, 0x99, 0xd3, 0xb6, 0xad}}, 607, 6, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29567 : /* nsIDOMCanvasGradient */ {{0xbbb20a59, 0x524e, 0x4662, {0x98, 0x1e, 0x5e, 0x14, 0x28, 0x14, 0xb2, 0x0c}}, 0, 0, 41, 1, XPC_QS_NULL_INDEX, 185},
29568 : /* nsIDOMTouch */ {{0x98bc0f7d, 0x5bff, 0x4387, {0x9c, 0x42, 0x58, 0xaf, 0x54, 0xb4, 0x8d, 0xd5}}, 393, 12, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29569 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 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 : /* nsIDOMKeyEvent */ {{0xdef974c3, 0xb491, 0x481b, {0xbc, 0x67, 0x29, 0x17, 0x4a, 0xf4, 0xb2, 0x6a}}, 359, 6, 122, 1, 3, XPC_QS_NULL_INDEX},
29575 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29576 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29577 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29578 : /* nsIDOMPaintRequest */ {{0x4802360b, 0xf1c0, 0x4d84, {0xbb, 0x9e, 0x9d, 0x2c, 0xcb, 0x9d, 0xe4, 0x61}}, 20, 2, 0, 0, XPC_QS_NULL_INDEX, 187},
29579 : /* nsIDOMEvent */ {{0xe85cff74, 0x951f, 0x45c1, {0xbe, 0x0c, 0x89, 0x44, 0x2e, 0xa2, 0xf5, 0x00}}, 339, 8, 116, 4, XPC_QS_NULL_INDEX, 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 : /* nsIIndexedDatabaseUsageCallback */ {{0xef1795ec, 0x7050, 0x4658, {0xb8, 0x0f, 0x0e, 0x48, 0xcb, 0xe1, 0xd6, 0x4b}}, 0, 0, 384, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29582 : /* nsIDOMMouseEvent */ {{0x7f57aa45, 0x6792, 0x4d8b, {0xba, 0x5b, 0x20, 0x15, 0x33, 0xcf, 0x0b, 0x2f}}, 347, 12, 120, 2, 3, XPC_QS_NULL_INDEX},
29583 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29584 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29585 : /* nsIDOMHTMLTextAreaElement */ {{0x16db703d, 0x4816, 0x440c, {0xbc, 0xb3, 0xc1, 0xae, 0x0c, 0xae, 0x65, 0x32}}, 542, 12, 157, 2, 168, 188},
29586 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 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 : /* nsIDOMRect */ {{0x71735f62, 0xac5c, 0x4236, {0x9a, 0x1f, 0x5f, 0xfb, 0x28, 0x0d, 0x53, 0x1c}}, 332, 4, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29589 : /* nsIDOMHTMLTitleElement */ {{0xe20fd651, 0x6240, 0x4f20, {0xb8, 0xf0, 0x6c, 0xc2, 0x5c, 0xb6, 0x99, 0xb7}}, 554, 1, 0, 0, 168, 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 : /* nsIDOMNamedNodeMap */ {{0xa6cf907b, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}, 63, 1, 66, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29592 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29593 : /* nsIDOMNSXPathExpression */ {{0xce600ca8, 0xe98a, 0x4419, {0xad, 0x61, 0x2f, 0x6d, 0x0c, 0xb0, 0xec, 0xc8}}, 0, 0, 199, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29594 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29595 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29596 : /* nsIDOMHTMLButtonElement */ {{0x79f034f0, 0x5c13, 0x4101, {0x95, 0x98, 0x41, 0x2e, 0x1e, 0xac, 0x19, 0x86}}, 422, 4, 0, 0, 168, XPC_QS_NULL_INDEX},
29597 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, 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 : /* nsIXMLHttpRequest */ {{0x88ffc45a, 0x22e2, 0x44f4, {0x9a, 0x6e, 0xf4, 0x58, 0x6f, 0xbd, 0xe3, 0x76}}, 622, 11, 211, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29600 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29601 : /* nsIDOMScrollAreaEvent */ {{0xa382424b, 0x464f, 0x475f, {0x88, 0x80, 0xf4, 0xce, 0xac, 0xa9, 0xfd, 0xe9}}, 371, 4, 125, 1, 3, XPC_QS_NULL_INDEX},
29602 : /* nsIDOMDOMImplementation */ {{0x03a6f574, 0x99ec, 0x42f8, {0x9e, 0x6c, 0x81, 0x2a, 0x4a, 0x9b, 0xcb, 0xf7}}, 0, 0, 88, 4, XPC_QS_NULL_INDEX, 190},
29603 : /* nsIDOMClientRectList */ {{0x917da19d, 0x62f5, 0x441d, {0xb4, 0x7e, 0x9e, 0x35, 0xf0, 0x56, 0x39, 0xc9}}, 19, 1, 4, 1, XPC_QS_NULL_INDEX, 191},
29604 : /* nsIDOMWindow */ {{0x17400e2b, 0xf78b, 0x4e69, {0xb5, 0x00, 0xc2, 0xa3, 0x13, 0x5a, 0x40, 0xfd}}, 0, 8, 0, 3, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29605 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29606 : /* nsIIDBRequest */ {{0xfe30ca60, 0xbb90, 0x4d68, {0xaf, 0x2f, 0x47, 0x35, 0xf9, 0x22, 0x8a, 0x54}}, 675, 7, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29607 : /* nsIDOMJSWindow */ {{0x6652c4d2, 0x6b49, 0x424b, {0xaa, 0xf9, 0x91, 0xf9, 0x10, 0x06, 0xfa, 0xb7}}, 0, 0, 3, 1, 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 : /* nsIDOMDOMError */ {{0xe4e28307, 0xd409, 0x4cf7, {0x93, 0xcd, 0x6e, 0xa8, 0xe8, 0x89, 0xf8, 0x7a}}, 692, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29612 : /* nsIDOMTextMetrics */ {{0x2d01715c, 0xec7d, 0x424a, {0xab, 0x85, 0xe0, 0xfd, 0x70, 0xc8, 0x66, 0x5c}}, 46, 1, 0, 0, XPC_QS_NULL_INDEX, 192},
29613 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29614 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29615 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29616 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, 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 : /* nsIDOMPaintRequestList */ {{0x01627136, 0xfdd8, 0x44b4, {0xaa, 0xc0, 0x7d, 0x61, 0x36, 0x08, 0xa3, 0xd4}}, 22, 1, 5, 1, XPC_QS_NULL_INDEX, 193},
29621 : /* nsIDOMCharacterData */ {{0xcb75c251, 0xafc7, 0x444f, {0xb2, 0xd6, 0xb9, 0x63, 0x55, 0x55, 0xf3, 0xed}}, 47, 2, 0, 0, 138, XPC_QS_NULL_INDEX},
29622 : /* nsIDOMHTMLMenuElement */ {{0x06d48250, 0x45e0, 0x4f26, {0x9a, 0x07, 0xd9, 0xb5, 0xa3, 0xf0, 0x8b, 0xb6}}, 499, 3, 0, 0, 168, XPC_QS_NULL_INDEX},
29623 : /* nsIDOMWindow_globalStorage */ {{0xb3da2cba, 0x486e, 0x4e94, {0xac, 0x99, 0xb7, 0x3c, 0xc1, 0xdb, 0x79, 0x02}}, 8, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29624 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29625 : /* nsIDOMNodeList */ {{0x496852ba, 0xe48d, 0x4fa5, {0x98, 0x2e, 0xe0, 0xdc, 0x1b, 0x47, 0x5b, 0xf1}}, 81, 1, 84, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29626 : /* nsIIDBCursorWithValue */ {{0xb6b7e08a, 0x4379, 0x4441, {0xa1, 0x76, 0x44, 0x7c, 0x5c, 0x96, 0xdf, 0x69}}, 652, 1, 0, 0, 201, 194},
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 : /* nsIDOMStorage */ {{0x43e5edad, 0x1e02, 0x42c4, {0x9d, 0x99, 0xc3, 0xd9, 0xde, 0xe2, 0x2a, 0x20}}, 563, 1, 185, 5, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29629 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29630 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29631 : /* nsIDOMNotifyPaintEvent */ {{0x5e9e91ad, 0x8638, 0x4e1c, {0xbd, 0xed, 0x35, 0xb5, 0x1b, 0x6d, 0xf2, 0x79}}, 375, 3, 0, 0, 50, XPC_QS_NULL_INDEX},
29632 : /* nsIDOMHTMLCommandElement */ {{0x13032f74, 0x4150, 0x4768, {0xab, 0x5e, 0x51, 0xf4, 0xde, 0x39, 0xa3, 0x00}}, 427, 7, 0, 0, 168, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29635 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29636 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29637 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29638 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29639 : /* nsIDOMRange */ {{0xa059eea8, 0xfece, 0x4c14, {0x93, 0xd3, 0x7f, 0x50, 0xa9, 0x44, 0xae, 0x43}}, 557, 6, 161, 23, 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 : /* nsIDOMHTMLStyleElement */ {{0x247fc8c4, 0x92f3, 0x427b, {0xaf, 0x6f, 0x41, 0xb1, 0x3f, 0x28, 0x28, 0x7d}}, 525, 1, 0, 0, 168, 195},
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 : /* nsIDOMXPathExpression */ {{0x75506f82, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 0, 0, 195, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29644 : /* nsIDOMXPathNSResolver */ {{0x75506f83, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 0, 0, 196, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29645 : /* nsIDOMScreen */ {{0x4507e43f, 0x097c, 0x452a, {0xbf, 0xc4, 0xdb, 0xb9, 0x97, 0x48, 0xf6, 0xfd}}, 9, 4, 0, 0, XPC_QS_NULL_INDEX, 196},
29646 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29647 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29648 : /* nsIDOMNSElement */ {{0xd894b5d4, 0x44f3, 0x422a, {0xa2, 0x20, 0x77, 0x63, 0xc1, 0x2d, 0x4a, 0x94}}, 85, 15, 101, 6, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29649 : /* nsIDOMProgressEvent */ {{0x2377d8a6, 0x9e27, 0x4eb2, {0xa3, 0x77, 0x99, 0x10, 0x77, 0x2b, 0x33, 0xd3}}, 383, 3, 0, 0, 50, XPC_QS_NULL_INDEX},
29650 : /* nsIDOMHTMLOptionsCollection */ {{0x429b041b, 0x06df, 0x486c, {0x9a, 0x3a, 0xa1, 0xd9, 0x01, 0xcc, 0x76, 0xa2}}, 510, 2, 146, 2, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29651 : /* nsIDOMXPathEvaluator */ {{0x75506f8a, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 0, 0, 192, 3, 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 : /* nsIDOMHTMLSelectElement */ {{0x98f111e0, 0x2b7e, 0x4abd, {0x98, 0x4b, 0x2c, 0xc1, 0xd1, 0x74, 0xfe, 0x44}}, 516, 9, 148, 3, 168, XPC_QS_NULL_INDEX},
29655 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29656 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
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 : /* nsIDOMCSSStyleDeclaration */ {{0xa6cf90be, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}, 336, 3, 107, 6, XPC_QS_NULL_INDEX, 197},
29659 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29660 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29661 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29662 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29663 : /* nsIDOMStorageItem */ {{0x0cc37c78, 0x4c5f, 0x48e1, {0xad, 0xfc, 0x74, 0x80, 0xb8, 0xfe, 0x9d, 0xc4}}, 564, 1, 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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29666 : /* nsIDOMHTMLTableColElement */ {{0x9a4d1f6a, 0xfb19, 0x4886, {0xb0, 0xd8, 0xdc, 0xd2, 0x01, 0x56, 0x65, 0x80}}, 534, 2, 0, 0, 168, XPC_QS_NULL_INDEX},
29667 : /* nsIDOMNode */ {{0x5e9bcec9, 0x5928, 0x4f77, {0x8a, 0x9c, 0x42, 0x4e, 0xf0, 0x1c, 0x20, 0xe1}}, 64, 17, 67, 17, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29668 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29669 : /* nsIDOMMutationEvent */ {{0x72b3ddba, 0x6cbb, 0x4011, {0xac, 0x3b, 0x50, 0xbd, 0x90, 0x0b, 0x22, 0x3d}}, 365, 5, 123, 1, 50, 198},
29670 : /* nsIDOMClientRect */ {{0xb2f824c4, 0xd9d3, 0x499b, {0x8d, 0x3b, 0x45, 0xc8, 0x24, 0x54, 0x97, 0xc6}}, 13, 6, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29671 : /* nsIDOMHTMLBaseElement */ {{0xe55cd224, 0xb603, 0x4976, {0x89, 0x2a, 0x20, 0xb1, 0x1d, 0x46, 0x93, 0x94}}, 420, 2, 0, 0, 168, 199},
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 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29674 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29675 : /* nsIDOMFileReader */ {{0xfaed1779, 0xb523, 0x4060, {0x8c, 0x3b, 0x71, 0x99, 0xf3, 0x47, 0xb2, 0x73}}, 613, 9, 206, 5, 183, XPC_QS_NULL_INDEX},
29676 : /* nsIIDBDatabaseException */ {{0x7aad2542, 0xa5cb, 0x4a57, {0xb2, 0x0c, 0xc7, 0xd1, 0x6b, 0x85, 0x82, 0xab}}, 659, 1, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29677 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29678 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29679 : /* nsIDOMNodeIterator */ {{0x5af83f50, 0xc8d5, 0x4824, {0xbe, 0x29, 0x1a, 0xa9, 0xd6, 0x40, 0xba, 0xcb}}, 0, 0, 191, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29680 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29681 : {{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 : /* nsIDOMElement */ {{0x1f249e8b, 0x7b41, 0x44c0, {0xa8, 0xd5, 0x15, 0x29, 0x8c, 0x11, 0x98, 0xcd}}, 60, 3, 56, 10, 138, XPC_QS_NULL_INDEX},
29685 : /* nsIDOMSVGStylable */ {{0xea8a6cb1, 0x9176, 0x45db, {0x98, 0x9d, 0xd0, 0xe8, 0x9f, 0x56, 0x3d, 0x7e}}, 565, 2, 190, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29686 : /* nsIDOMXULElement */ {{0xa98a4472, 0xa549, 0x4b84, {0xb9, 0xea, 0xe6, 0xeb, 0x67, 0x92, 0x28, 0xdd}}, 573, 34, 200, 6, 155, XPC_QS_NULL_INDEX},
29687 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29688 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29689 : /* nsIDOMHTMLFrameElement */ {{0x318fdc4a, 0x3fca, 0x4099, {0x94, 0xaa, 0xc9, 0xa1, 0xc3, 0x0c, 0xa2, 0xb9}}, 471, 4, 0, 0, 168, XPC_QS_NULL_INDEX},
29690 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29691 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29692 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29693 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29694 : /* nsIDOMHTMLTableCellElement */ {{0x4caa7af0, 0xfec4, 0x44c1, {0x9a, 0x81, 0xe1, 0xf1, 0x41, 0x66, 0xe6, 0x0c}}, 526, 8, 0, 0, 168, XPC_QS_NULL_INDEX},
29695 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29696 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29697 : /* nsIDOMHTMLElement */ {{0x4eccf8a3, 0x8bf5, 0x43f3, {0xa7, 0x28, 0xf5, 0xb6, 0x32, 0xf7, 0xdb, 0x3a}}, 444, 22, 137, 6, 155, 201},
29698 : /* nsIDOMHTMLTableSectionElement */ {{0x6acc106e, 0x96a2, 0x4519, {0x8f, 0x3a, 0x14, 0x2e, 0xbb, 0xdc, 0x1b, 0xb1}}, 541, 1, 155, 2, 168, XPC_QS_NULL_INDEX},
29699 : /* nsIDOMHTMLFrameSetElement */ {{0x6eefbe6d, 0x182c, 0x42e9, {0x98, 0x50, 0xaf, 0x18, 0x92, 0xb6, 0xf2, 0xe4}}, 475, 2, 0, 0, 168, 202},
29700 : /* nsIDOMNodeSelector */ {{0x7cebc153, 0x168a, 0x416c, {0xba, 0x5a, 0x56, 0xa8, 0xc2, 0xdd, 0xb2, 0xec}}, 0, 0, 85, 2, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29701 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29702 : /* nsIDOMWebGLRenderingContext */ {{0x020474b1, 0x2d3f, 0x403b, {0xb8, 0x5d, 0x11, 0xd9, 0x08, 0x2c, 0xcd, 0x92}}, 643, 3, 217, 135, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29703 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29704 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29705 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29706 : /* nsIDOMHTMLTableElement */ {{0x0f809b97, 0x9311, 0x45c4, {0xa4, 0x4e, 0x71, 0x45, 0xf3, 0x54, 0x43, 0x8b}}, 536, 2, 151, 2, 168, 203},
29707 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29708 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29709 : {{0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29710 : /* nsIDOMHTMLDocument */ {{0xcc1af020, 0x6543, 0x429c, {0x82, 0xd7, 0x84, 0x0c, 0xda, 0x3b, 0xe0, 0xb9}}, 434, 10, 133, 4, 12, XPC_QS_NULL_INDEX},
29711 : /* nsIDOMHTMLFormElement */ {{0xd873b251, 0x6f96, 0x4e70, {0xba, 0xf5, 0xaa, 0xa9, 0x35, 0xaa, 0xbe, 0x59}}, 466, 5, 143, 1, 168, XPC_QS_NULL_INDEX},
29712 : /* nsIDOMEventTarget */ {{0x8e375931, 0x298d, 0x4d0a, {0x9c, 0xb4, 0x56, 0x68, 0xf0, 0xcd, 0xc5, 0xa8}}, 0, 0, 113, 3, XPC_QS_NULL_INDEX, 184},
29713 : /* nsIDOMTouchList */ {{0x60706eb7, 0xd50d, 0x4379, {0xb0, 0x1c, 0xe7, 0x8e, 0x6a, 0xf8, 0x42, 0x13}}, 405, 1, 129, 2, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29714 : /* nsIDOMHTMLImageElement */ {{0x56d9191f, 0x5a94, 0x432f, {0xaf, 0x70, 0x6f, 0xcc, 0xde, 0xaf, 0x61, 0x4b}}, 480, 5, 0, 0, 168, 186},
29715 : /* nsIIDBIndex */ {{0xa859747a, 0x0f05, 0x4dfb, {0x8f, 0x42, 0x05, 0xc6, 0x14, 0x15, 0xd4, 0xe4}}, 660, 6, 361, 7, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29716 : /* nsIDOMHTMLLinkElement */ {{0x2ece79f4, 0x83d7, 0x499c, {0x94, 0x6f, 0xae, 0x9a, 0xb9, 0x31, 0x47, 0xb7}}, 498, 1, 0, 0, 168, XPC_QS_NULL_INDEX},
29717 : /* nsIDOMNotifyAudioAvailableEvent */ {{0xcd362d2f, 0xa9a1, 0x4127, {0x94, 0x0d, 0x47, 0x7b, 0xa0, 0xe8, 0x2b, 0xd6}}, 646, 2, 0, 0, 50, 189},
29718 : /* nsIIndexedDatabaseManager */ {{0x02256aa7, 0x70d8, 0x473f, {0xbf, 0x3b, 0x8c, 0xb3, 0x5d, 0x28, 0xfd, 0x75}}, 0, 0, 385, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29719 : /* nsIDOMHTMLCanvasElement */ {{0xdbbeeba1, 0x3c20, 0x4d9d, {0xac, 0x82, 0x98, 0xb6, 0x9f, 0xd8, 0x19, 0xa9}}, 555, 2, 159, 2, 168, XPC_QS_NULL_INDEX},
29720 : /* nsIIDBFactory */ {{0x885abbb7, 0xcf81, 0x4945, {0xb5, 0xf1, 0x07, 0xfe, 0xd0, 0x7a, 0xda, 0x82}}, 0, 0, 381, 3, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29721 : /* nsIDOMHTMLCollection */ {{0xb7ccd7b3, 0x86aa, 0x4322, {0xa5, 0x0c, 0xb9, 0x72, 0x64, 0x3b, 0xb6, 0x62}}, 426, 1, 132, 1, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29722 : /* nsIIDBOpenDBRequest */ {{0x91010fbe, 0x1dfb, 0x435d, {0x85, 0x2e, 0x28, 0x8d, 0x28, 0x04, 0xc0, 0xa7}}, 688, 2, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29723 : /* nsIIDBVersionChangeEvent */ {{0x52e21085, 0xd6cd, 0x4886, {0xa5, 0xeb, 0x19, 0xb4, 0x7d, 0x13, 0xab, 0xf6}}, 690, 2, 0, 0, 50, XPC_QS_NULL_INDEX},
29724 : /* nsIIDBDatabase */ {{0xbedee48a, 0xf47f, 0x44f2, {0xba, 0x1e, 0xd8, 0xfe, 0x59, 0x5b, 0xbf, 0xee}}, 653, 6, 357, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29725 : /* nsIDOMXPathResult */ {{0x75506f84, 0xb504, 0x11d5, {0xa7, 0xf2, 0xca, 0x10, 0x8a, 0xb8, 0xb6, 0xfc}}, 567, 6, 197, 2, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29726 : /* nsIDOMDragEvent */ {{0x74fb5f01, 0xe473, 0x4302, {0x93, 0xf5, 0x6f, 0x74, 0xbd, 0xaa, 0xdd, 0xf2}}, 370, 1, 124, 1, 53, XPC_QS_NULL_INDEX},
29727 : /* nsIDOMHTMLOptionElement */ {{0x7c5bf0ac, 0x6230, 0x4ee0, {0x8b, 0x82, 0xe7, 0xeb, 0xf2, 0x11, 0xaf, 0x03}}, 502, 8, 0, 0, 168, XPC_QS_NULL_INDEX},
29728 : /* nsIWebSocket */ {{0xf463b9b5, 0x1408, 0x4057, {0x92, 0x24, 0xe4, 0xf5, 0xbc, 0x33, 0xf1, 0x7b}}, 633, 10, 215, 2, XPC_QS_NULL_INDEX, 200},
29729 : /* nsIIDBKeyRange */ {{0x8aeb8660, 0x76b3, 0x4651, {0xb8, 0xc2, 0x98, 0x94, 0xae, 0x6d, 0xfe, 0x68}}, 666, 4, 0, 0, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29730 : /* nsIIDBCursor */ {{0x01136b3a, 0xd84c, 0x487c, {0xb9, 0x29, 0xf5, 0xd0, 0x12, 0x34, 0x6c, 0x44}}, 648, 4, 353, 4, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX},
29731 : /* nsIDOMHTMLAudioElement */ {{0x0969143a, 0xfe20, 0x4924, {0xa9, 0x50, 0x55, 0xde, 0xb4, 0xd0, 0xd1, 0xab}}, 0, 0, 352, 1, 168, XPC_QS_NULL_INDEX},
29732 : /* nsIIDBTransaction */ {{0xe4927c76, 0x4f1f, 0x4d7d, {0x80, 0xad, 0x81, 0x86, 0xe1, 0x67, 0x7d, 0xa6}}, 682, 6, 379, 2, XPC_QS_NULL_INDEX, XPC_QS_NULL_INDEX}
29733 : };
29734 :
29735 : // Make sure our table indices aren't overflowed
29736 : PR_STATIC_ASSERT((sizeof(tableData) / sizeof(tableData[0])) < (1 << (8 * sizeof(tableData[0].parentInterface))));
29737 : PR_STATIC_ASSERT((sizeof(tableData) / sizeof(tableData[0])) < (1 << (8 * sizeof(tableData[0].chain))));
29738 :
29739 : static const char stringtab[] = {
29740 : /* 0 */ 'n', 'a', 'm', 'e', '\0',
29741 : /* 5 */ 'p', 'a', 'r', 'e', 'n', 't', '\0',
29742 : /* 12 */ 't', 'o', 'p', '\0',
29743 : /* 16 */ 's', 'e', 'l', 'f', '\0',
29744 : /* 21 */ 'g', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', '\0',
29745 : /* 34 */ 's', 'c', 'r', 'o', 'l', 'l', 'B', 'y', 'L', 'i', 'n', 'e', 's', '\0',
29746 : /* 48 */ 'g', 'e', 't', 'C', 'o', 'm', 'p', 'u', 't', 'e', 'd', 'S', 't', 'y', 'l', 'e', '\0',
29747 : /* 65 */ 's', 'e', 's', 's', 'i', 'o', 'n', 'S', 't', 'o', 'r', 'a', 'g', 'e', '\0',
29748 : /* 80 */ 'l', 'o', 'c', 'a', 'l', 'S', 't', 'o', 'r', 'a', 'g', 'e', '\0',
29749 : /* 93 */ 'o', 'n', 'm', 'o', 'u', 's', 'e', 'e', 'n', 't', 'e', 'r', '\0',
29750 : /* 106 */ 'o', 'n', 'm', 'o', 'u', 's', 'e', 'l', 'e', 'a', 'v', 'e', '\0',
29751 : /* 119 */ 'g', 'l', 'o', 'b', 'a', 'l', 'S', 't', 'o', 'r', 'a', 'g', 'e', '\0',
29752 : /* 133 */ 'd', 'u', 'm', 'p', '\0',
29753 : /* 138 */ 'h', 'e', 'i', 'g', 'h', 't', '\0',
29754 : /* 145 */ 'w', 'i', 'd', 't', 'h', '\0',
29755 : /* 151 */ 'l', 'e', 'f', 't', '\0',
29756 : /* 156 */ 'r', 'i', 'g', 'h', 't', '\0',
29757 : /* 162 */ 'b', 'o', 't', 't', 'o', 'm', '\0',
29758 : /* 169 */ 'l', 'e', 'n', 'g', 't', 'h', '\0',
29759 : /* 176 */ 'i', 't', 'e', 'm', '\0',
29760 : /* 181 */ 'c', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', '\0',
29761 : /* 192 */ 'r', 'e', 'a', 's', 'o', 'n', '\0',
29762 : /* 199 */ 'c', 'a', 'n', 'v', 'a', 's', '\0',
29763 : /* 206 */ 's', 'a', 'v', 'e', '\0',
29764 : /* 211 */ 'r', 'e', 's', 't', 'o', 'r', 'e', '\0',
29765 : /* 219 */ 's', 'c', 'a', 'l', 'e', '\0',
29766 : /* 225 */ 'r', 'o', 't', 'a', 't', 'e', '\0',
29767 : /* 232 */ 't', 'r', 'a', 'n', 's', 'l', 'a', 't', 'e', '\0',
29768 : /* 242 */ 't', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
29769 : /* 252 */ 's', 'e', 't', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
29770 : /* 265 */ 'm', 'o', 'z', 'C', 'u', 'r', 'r', 'e', 'n', 't', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
29771 : /* 285 */ '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',
29772 : /* 312 */ 'g', 'l', 'o', 'b', 'a', 'l', 'A', 'l', 'p', 'h', 'a', '\0',
29773 : /* 324 */ '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',
29774 : /* 349 */ 's', 't', 'r', 'o', 'k', 'e', 'S', 't', 'y', 'l', 'e', '\0',
29775 : /* 361 */ 'f', 'i', 'l', 'l', 'S', 't', 'y', 'l', 'e', '\0',
29776 : /* 371 */ 'm', 'o', 'z', 'F', 'i', 'l', 'l', 'R', 'u', 'l', 'e', '\0',
29777 : /* 383 */ 'c', 'r', 'e', 'a', 't', 'e', 'L', 'i', 'n', 'e', 'a', 'r', 'G', 'r', 'a', 'd', 'i', 'e', 'n', 't', '\0',
29778 : /* 404 */ 'c', 'r', 'e', 'a', 't', 'e', 'R', 'a', 'd', 'i', 'a', 'l', 'G', 'r', 'a', 'd', 'i', 'e', 'n', 't', '\0',
29779 : /* 425 */ 'c', 'r', 'e', 'a', 't', 'e', 'P', 'a', 't', 't', 'e', 'r', 'n', '\0',
29780 : /* 439 */ 'l', 'i', 'n', 'e', 'W', 'i', 'd', 't', 'h', '\0',
29781 : /* 449 */ 'l', 'i', 'n', 'e', 'C', 'a', 'p', '\0',
29782 : /* 457 */ 'l', 'i', 'n', 'e', 'J', 'o', 'i', 'n', '\0',
29783 : /* 466 */ 'm', 'i', 't', 'e', 'r', 'L', 'i', 'm', 'i', 't', '\0',
29784 : /* 477 */ 'm', 'o', 'z', 'D', 'a', 's', 'h', '\0',
29785 : /* 485 */ 'm', 'o', 'z', 'D', 'a', 's', 'h', 'O', 'f', 'f', 's', 'e', 't', '\0',
29786 : /* 499 */ 's', 'h', 'a', 'd', 'o', 'w', 'O', 'f', 'f', 's', 'e', 't', 'X', '\0',
29787 : /* 513 */ 's', 'h', 'a', 'd', 'o', 'w', 'O', 'f', 'f', 's', 'e', 't', 'Y', '\0',
29788 : /* 527 */ 's', 'h', 'a', 'd', 'o', 'w', 'B', 'l', 'u', 'r', '\0',
29789 : /* 538 */ 's', 'h', 'a', 'd', 'o', 'w', 'C', 'o', 'l', 'o', 'r', '\0',
29790 : /* 550 */ 'c', 'l', 'e', 'a', 'r', 'R', 'e', 'c', 't', '\0',
29791 : /* 560 */ 'f', 'i', 'l', 'l', 'R', 'e', 'c', 't', '\0',
29792 : /* 569 */ 's', 't', 'r', 'o', 'k', 'e', 'R', 'e', 'c', 't', '\0',
29793 : /* 580 */ 'b', 'e', 'g', 'i', 'n', 'P', 'a', 't', 'h', '\0',
29794 : /* 590 */ 'c', 'l', 'o', 's', 'e', 'P', 'a', 't', 'h', '\0',
29795 : /* 600 */ 'm', 'o', 'v', 'e', 'T', 'o', '\0',
29796 : /* 607 */ 'l', 'i', 'n', 'e', 'T', 'o', '\0',
29797 : /* 614 */ 'q', 'u', 'a', 'd', 'r', 'a', 't', 'i', 'c', 'C', 'u', 'r', 'v', 'e', 'T', 'o', '\0',
29798 : /* 631 */ 'b', 'e', 'z', 'i', 'e', 'r', 'C', 'u', 'r', 'v', 'e', 'T', 'o', '\0',
29799 : /* 645 */ 'a', 'r', 'c', 'T', 'o', '\0',
29800 : /* 651 */ 'a', 'r', 'c', '\0',
29801 : /* 655 */ 'r', 'e', 'c', 't', '\0',
29802 : /* 660 */ 'f', 'i', 'l', 'l', '\0',
29803 : /* 665 */ 's', 't', 'r', 'o', 'k', 'e', '\0',
29804 : /* 672 */ 'c', 'l', 'i', 'p', '\0',
29805 : /* 677 */ 'f', 'o', 'n', 't', '\0',
29806 : /* 682 */ 't', 'e', 'x', 't', 'A', 'l', 'i', 'g', 'n', '\0',
29807 : /* 692 */ 't', 'e', 'x', 't', 'B', 'a', 's', 'e', 'l', 'i', 'n', 'e', '\0',
29808 : /* 705 */ 'f', 'i', 'l', 'l', 'T', 'e', 'x', 't', '\0',
29809 : /* 714 */ 's', 't', 'r', 'o', 'k', 'e', 'T', 'e', 'x', 't', '\0',
29810 : /* 725 */ 'm', 'e', 'a', 's', 'u', 'r', 'e', 'T', 'e', 'x', 't', '\0',
29811 : /* 737 */ 'm', 'o', 'z', 'T', 'e', 'x', 't', 'S', 't', 'y', 'l', 'e', '\0',
29812 : /* 750 */ 'd', 'r', 'a', 'w', 'I', 'm', 'a', 'g', 'e', '\0',
29813 : /* 760 */ 'i', 's', 'P', 'o', 'i', 'n', 't', 'I', 'n', 'P', 'a', 't', 'h', '\0',
29814 : /* 774 */ 'g', 'e', 't', 'I', 'm', 'a', 'g', 'e', 'D', 'a', 't', 'a', '\0',
29815 : /* 787 */ 'p', 'u', 't', 'I', 'm', 'a', 'g', 'e', 'D', 'a', 't', 'a', '\0',
29816 : /* 800 */ 'c', 'r', 'e', 'a', 't', 'e', 'I', 'm', 'a', 'g', 'e', 'D', 'a', 't', 'a', '\0',
29817 : /* 816 */ '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',
29818 : /* 841 */ 'd', 'r', 'a', 'w', 'W', 'i', 'n', 'd', 'o', 'w', '\0',
29819 : /* 852 */ 'a', 's', 'y', 'n', 'c', 'D', 'r', 'a', 'w', 'X', 'U', 'L', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29820 : /* 872 */ 'a', 'd', 'd', 'C', 'o', 'l', 'o', 'r', 'S', 't', 'o', 'p', '\0',
29821 : /* 885 */ 'd', 'a', 't', 'a', '\0',
29822 : /* 890 */ 'd', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29823 : /* 906 */ 'i', 'm', 'p', 'l', 'e', 'm', 'e', 'n', 't', 'a', 't', 'i', 'o', 'n', '\0',
29824 : /* 921 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'T', 'a', 'g', 'N', 'a', 'm', 'e', '\0',
29825 : /* 942 */ 'd', 'o', 'c', 't', 'y', 'p', 'e', '\0',
29826 : /* 950 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'T', 'a', 'g', 'N', 'a', 'm', 'e', 'N', 'S', '\0',
29827 : /* 973 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'B', 'y', 'I', 'd', '\0',
29828 : /* 988 */ 'c', 'r', 'e', 'a', 't', 'e', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', '\0',
29829 : /* 1011 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29830 : /* 1025 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'N', 'S', '\0',
29831 : /* 1041 */ 'i', 'm', 'p', 'o', 'r', 't', 'N', 'o', 'd', 'e', '\0',
29832 : /* 1052 */ 'c', 'r', 'e', 'a', 't', 'e', 'T', 'e', 'x', 't', 'N', 'o', 'd', 'e', '\0',
29833 : /* 1067 */ 'd', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'U', 'R', 'I', '\0',
29834 : /* 1079 */ 'a', 'd', 'o', 'p', 't', 'N', 'o', 'd', 'e', '\0',
29835 : /* 1089 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'i', 'e', 'w', '\0',
29836 : /* 1101 */ 'c', 'r', 'e', 'a', 't', 'e', 'N', 'o', 'd', 'e', 'I', 't', 'e', 'r', 'a', 't', 'o', 'r', '\0',
29837 : /* 1120 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'v', 'e', 'n', 't', '\0',
29838 : /* 1132 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'C', 'l', 'a', 's', 's', 'N', 'a', 'm', 'e', '\0',
29839 : /* 1155 */ 't', 'i', 't', 'l', 'e', '\0',
29840 : /* 1161 */ 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'r', '\0',
29841 : /* 1170 */ 'h', 'a', 's', 'F', 'o', 'c', 'u', 's', '\0',
29842 : /* 1179 */ 'e', 'l', 'e', 'm', 'e', 'n', 't', 'F', 'r', 'o', 'm', 'P', 'o', 'i', 'n', 't', '\0',
29843 : /* 1196 */ 'a', 'c', 't', 'i', 'v', 'e', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29844 : /* 1210 */ 'o', 'n', 'r', 'e', 'a', 'd', 'y', 's', 't', 'a', 't', 'e', 'c', 'h', 'a', 'n', 'g', 'e', '\0',
29845 : /* 1229 */ 'r', 'e', 'm', 'o', 'v', 'e', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29846 : /* 1247 */ 'r', 'e', 'm', 'o', 'v', 'e', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29847 : /* 1263 */ 'g', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29848 : /* 1276 */ 's', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29849 : /* 1289 */ 'h', 'a', 's', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29850 : /* 1304 */ 't', 'a', 'g', 'N', 'a', 'm', 'e', '\0',
29851 : /* 1312 */ 's', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29852 : /* 1327 */ 'h', 'a', 's', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
29853 : /* 1340 */ 'g', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 'N', 'S', '\0',
29854 : /* 1355 */ 'n', 'o', 'd', 'e', 'N', 'a', 'm', 'e', '\0',
29855 : /* 1364 */ 'n', 'o', 'd', 'e', 'V', 'a', 'l', 'u', 'e', '\0',
29856 : /* 1374 */ 'n', 'o', 'd', 'e', 'T', 'y', 'p', 'e', '\0',
29857 : /* 1383 */ 'p', 'a', 'r', 'e', 'n', 't', 'N', 'o', 'd', 'e', '\0',
29858 : /* 1394 */ 'p', 'a', 'r', 'e', 'n', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\0',
29859 : /* 1408 */ 'c', 'h', 'i', 'l', 'd', 'N', 'o', 'd', 'e', 's', '\0',
29860 : /* 1419 */ 'f', 'i', 'r', 's', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29861 : /* 1430 */ 'l', 'a', 's', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29862 : /* 1440 */ 'p', 'r', 'e', 'v', 'i', 'o', 'u', 's', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29863 : /* 1456 */ 'n', 'e', 'x', 't', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29864 : /* 1468 */ 'a', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 's', '\0',
29865 : /* 1479 */ 'o', 'w', 'n', 'e', 'r', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
29866 : /* 1493 */ 'i', 'n', 's', 'e', 'r', 't', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
29867 : /* 1506 */ 'r', 'e', 'p', 'l', 'a', 'c', 'e', 'C', 'h', 'i', 'l', 'd', '\0',
29868 : /* 1519 */ 'r', 'e', 'm', 'o', 'v', 'e', 'C', 'h', 'i', 'l', 'd', '\0',
29869 : /* 1531 */ 'a', 'p', 'p', 'e', 'n', 'd', 'C', 'h', 'i', 'l', 'd', '\0',
29870 : /* 1543 */ 'h', 'a', 's', 'C', 'h', 'i', 'l', 'd', 'N', 'o', 'd', 'e', 's', '\0',
29871 : /* 1557 */ 'c', 'l', 'o', 'n', 'e', 'N', 'o', 'd', 'e', '\0',
29872 : /* 1567 */ 'n', 'o', 'r', 'm', 'a', 'l', 'i', 'z', 'e', '\0',
29873 : /* 1577 */ 'i', 's', 'S', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', '\0',
29874 : /* 1589 */ 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', 'U', 'R', 'I', '\0',
29875 : /* 1602 */ 'p', 'r', 'e', 'f', 'i', 'x', '\0',
29876 : /* 1609 */ 'l', 'o', 'c', 'a', 'l', 'N', 'a', 'm', 'e', '\0',
29877 : /* 1619 */ 'h', 'a', 's', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 's', '\0',
29878 : /* 1633 */ 'b', 'a', 's', 'e', 'U', 'R', 'I', '\0',
29879 : /* 1641 */ 'c', 'o', 'm', 'p', 'a', 'r', 'e', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'P', 'o', 's', 'i', 't', 'i', 'o', 'n', '\0',
29880 : /* 1665 */ 't', 'e', 'x', 't', 'C', 'o', 'n', 't', 'e', 'n', 't', '\0',
29881 : /* 1677 */ 'l', 'o', 'o', 'k', 'u', 'p', 'P', 'r', 'e', 'f', 'i', 'x', '\0',
29882 : /* 1690 */ 'i', 's', 'D', 'e', 'f', 'a', 'u', 'l', 't', 'N', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\0',
29883 : /* 1709 */ 'l', 'o', 'o', 'k', 'u', 'p', 'N', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', 'U', 'R', 'I', '\0',
29884 : /* 1728 */ 'i', 's', 'E', 'q', 'u', 'a', 'l', 'N', 'o', 'd', 'e', '\0',
29885 : /* 1740 */ 's', 'e', 't', 'U', 's', 'e', 'r', 'D', 'a', 't', 'a', '\0',
29886 : /* 1752 */ 'g', 'e', 't', 'U', 's', 'e', 'r', 'D', 'a', 't', 'a', '\0',
29887 : /* 1764 */ 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\0',
29888 : /* 1773 */ 'q', 'u', 'e', 'r', 'y', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\0',
29889 : /* 1787 */ 'q', 'u', 'e', 'r', 'y', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', 'A', 'l', 'l', '\0',
29890 : /* 1804 */ 's', 'p', 'l', 'i', 't', 'T', 'e', 'x', 't', '\0',
29891 : /* 1814 */ 'h', 'a', 's', 'F', 'e', 'a', 't', 'u', 'r', 'e', '\0',
29892 : /* 1825 */ 'c', 'r', 'e', 'a', 't', 'e', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'T', 'y', 'p', 'e', '\0',
29893 : /* 1844 */ 'c', 'r', 'e', 'a', 't', 'e', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
29894 : /* 1859 */ 'c', 'r', 'e', 'a', 't', 'e', 'H', 'T', 'M', 'L', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
29895 : /* 1878 */ 'a', 'd', 'd', '\0',
29896 : /* 1882 */ 'r', 'e', 'm', 'o', 'v', 'e', '\0',
29897 : /* 1889 */ 't', 'o', 'g', 'g', 'l', 'e', '\0',
29898 : /* 1896 */ 't', 'o', 'S', 't', 'r', 'i', 'n', 'g', '\0',
29899 : /* 1905 */ 'v', 'a', 'l', 'u', 'e', '\0',
29900 : /* 1911 */ 'g', 'e', 't', 'B', 'o', 'x', 'O', 'b', 'j', 'e', 'c', 't', 'F', 'o', 'r', '\0',
29901 : /* 1927 */ 'g', 'e', 't', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', 's', '\0',
29902 : /* 1942 */ 'g', 'e', 't', 'B', 'o', 'u', 'n', 'd', 'i', 'n', 'g', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', '\0',
29903 : /* 1964 */ 's', 'c', 'r', 'o', 'l', 'l', 'T', 'o', 'p', '\0',
29904 : /* 1974 */ 's', 'c', 'r', 'o', 'l', 'l', 'L', 'e', 'f', 't', '\0',
29905 : /* 1985 */ 's', 'c', 'r', 'o', 'l', 'l', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29906 : /* 1998 */ 's', 'c', 'r', 'o', 'l', 'l', 'W', 'i', 'd', 't', 'h', '\0',
29907 : /* 2010 */ 'c', 'l', 'i', 'e', 'n', 't', 'T', 'o', 'p', '\0',
29908 : /* 2020 */ 'c', 'l', 'i', 'e', 'n', 't', 'L', 'e', 'f', 't', '\0',
29909 : /* 2031 */ 'c', 'l', 'i', 'e', 'n', 't', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29910 : /* 2044 */ 'c', 'l', 'i', 'e', 'n', 't', 'W', 'i', 'd', 't', 'h', '\0',
29911 : /* 2056 */ 'f', 'i', 'r', 's', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29912 : /* 2074 */ 'l', 'a', 's', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'C', 'h', 'i', 'l', 'd', '\0',
29913 : /* 2091 */ 'p', 'r', 'e', 'v', 'i', 'o', 'u', 's', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29914 : /* 2114 */ 'n', 'e', 'x', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'S', 'i', 'b', 'l', 'i', 'n', 'g', '\0',
29915 : /* 2133 */ 'c', 'h', 'i', 'l', 'd', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'C', 'o', 'u', 'n', 't', '\0',
29916 : /* 2151 */ 'c', 'h', 'i', 'l', 'd', 'r', 'e', 'n', '\0',
29917 : /* 2160 */ 'c', 'l', 'a', 's', 's', 'L', 'i', 's', 't', '\0',
29918 : /* 2170 */ 's', 'e', 't', 'C', 'a', 'p', 't', 'u', 'r', 'e', '\0',
29919 : /* 2181 */ 'r', 'e', 'l', 'e', 'a', 's', 'e', 'C', 'a', 'p', 't', 'u', 'r', 'e', '\0',
29920 : /* 2196 */ 'm', 'o', 'z', 'M', 'a', 't', 'c', 'h', 'e', 's', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\0',
29921 : /* 2215 */ 's', 't', 'y', 'l', 'e', '\0',
29922 : /* 2221 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', '\0',
29923 : /* 2232 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'A', 't', 't', 'a', 'c', 'h', 'm', 'e', 'n', 't', '\0',
29924 : /* 2253 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
29925 : /* 2269 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'I', 'm', 'a', 'g', 'e', '\0',
29926 : /* 2285 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'P', 'o', 's', 'i', 't', 'i', 'o', 'n', '\0',
29927 : /* 2304 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'R', 'e', 'p', 'e', 'a', 't', '\0',
29928 : /* 2321 */ 'b', 'o', 'r', 'd', 'e', 'r', '\0',
29929 : /* 2328 */ 'b', 'o', 'r', 'd', 'e', 'r', 'C', 'o', 'l', 'l', 'a', 'p', 's', 'e', '\0',
29930 : /* 2343 */ 'b', 'o', 'r', 'd', 'e', 'r', 'C', 'o', 'l', 'o', 'r', '\0',
29931 : /* 2355 */ 'b', 'o', 'r', 'd', 'e', 'r', 'S', 'p', 'a', 'c', 'i', 'n', 'g', '\0',
29932 : /* 2369 */ 'b', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'y', 'l', 'e', '\0',
29933 : /* 2381 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', '\0',
29934 : /* 2391 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', '\0',
29935 : /* 2403 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', '\0',
29936 : /* 2416 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', '\0',
29937 : /* 2427 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'C', 'o', 'l', 'o', 'r', '\0',
29938 : /* 2442 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'C', 'o', 'l', 'o', 'r', '\0',
29939 : /* 2459 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'C', 'o', 'l', 'o', 'r', '\0',
29940 : /* 2477 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'C', 'o', 'l', 'o', 'r', '\0',
29941 : /* 2493 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'S', 't', 'y', 'l', 'e', '\0',
29942 : /* 2508 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'S', 't', 'y', 'l', 'e', '\0',
29943 : /* 2525 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'S', 't', 'y', 'l', 'e', '\0',
29944 : /* 2543 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'S', 't', 'y', 'l', 'e', '\0',
29945 : /* 2559 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'W', 'i', 'd', 't', 'h', '\0',
29946 : /* 2574 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'W', 'i', 'd', 't', 'h', '\0',
29947 : /* 2591 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'W', 'i', 'd', 't', 'h', '\0',
29948 : /* 2609 */ 'b', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'W', 'i', 'd', 't', 'h', '\0',
29949 : /* 2625 */ 'b', 'o', 'r', 'd', 'e', 'r', 'W', 'i', 'd', 't', 'h', '\0',
29950 : /* 2637 */ 'b', 'o', 'r', 'd', 'e', 'r', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29951 : /* 2650 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'L', 'e', 'f', 't', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29952 : /* 2670 */ 'b', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'R', 'i', 'g', 'h', 't', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29953 : /* 2691 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'L', 'e', 'f', 't', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29954 : /* 2714 */ 'b', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'R', 'i', 'g', 'h', 't', 'R', 'a', 'd', 'i', 'u', 's', '\0',
29955 : /* 2738 */ 'b', 'o', 'x', 'S', 'h', 'a', 'd', 'o', 'w', '\0',
29956 : /* 2748 */ 'c', 'a', 'p', 't', 'i', 'o', 'n', 'S', 'i', 'd', 'e', '\0',
29957 : /* 2760 */ 'c', 'l', 'e', 'a', 'r', '\0',
29958 : /* 2766 */ 'c', 'o', 'l', 'o', 'r', '\0',
29959 : /* 2772 */ 'c', 'o', 'n', 't', 'e', 'n', 't', '\0',
29960 : /* 2780 */ 'c', 'o', 'u', 'n', 't', 'e', 'r', 'I', 'n', 'c', 'r', 'e', 'm', 'e', 'n', 't', '\0',
29961 : /* 2797 */ 'c', 'o', 'u', 'n', 't', 'e', 'r', 'R', 'e', 's', 'e', 't', '\0',
29962 : /* 2810 */ 'c', 'u', 'r', 's', 'o', 'r', '\0',
29963 : /* 2817 */ 'd', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
29964 : /* 2827 */ 'd', 'i', 's', 'p', 'l', 'a', 'y', '\0',
29965 : /* 2835 */ 'e', 'm', 'p', 't', 'y', 'C', 'e', 'l', 'l', 's', '\0',
29966 : /* 2846 */ 'c', 's', 's', 'F', 'l', 'o', 'a', 't', '\0',
29967 : /* 2855 */ 'f', 'o', 'n', 't', 'F', 'a', 'm', 'i', 'l', 'y', '\0',
29968 : /* 2866 */ 'f', 'o', 'n', 't', 'S', 'i', 'z', 'e', '\0',
29969 : /* 2875 */ 'f', 'o', 'n', 't', 'S', 'i', 'z', 'e', 'A', 'd', 'j', 'u', 's', 't', '\0',
29970 : /* 2890 */ 'f', 'o', 'n', 't', 'S', 't', 'r', 'e', 't', 'c', 'h', '\0',
29971 : /* 2902 */ 'f', 'o', 'n', 't', 'S', 't', 'y', 'l', 'e', '\0',
29972 : /* 2912 */ 'f', 'o', 'n', 't', 'V', 'a', 'r', 'i', 'a', 'n', 't', '\0',
29973 : /* 2924 */ 'f', 'o', 'n', 't', 'W', 'e', 'i', 'g', 'h', 't', '\0',
29974 : /* 2935 */ 'l', 'e', 't', 't', 'e', 'r', 'S', 'p', 'a', 'c', 'i', 'n', 'g', '\0',
29975 : /* 2949 */ 'l', 'i', 'n', 'e', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29976 : /* 2960 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', '\0',
29977 : /* 2970 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', 'I', 'm', 'a', 'g', 'e', '\0',
29978 : /* 2985 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', 'P', 'o', 's', 'i', 't', 'i', 'o', 'n', '\0',
29979 : /* 3003 */ 'l', 'i', 's', 't', 'S', 't', 'y', 'l', 'e', 'T', 'y', 'p', 'e', '\0',
29980 : /* 3017 */ 'm', 'a', 'r', 'g', 'i', 'n', '\0',
29981 : /* 3024 */ 'm', 'a', 'r', 'g', 'i', 'n', 'T', 'o', 'p', '\0',
29982 : /* 3034 */ 'm', 'a', 'r', 'g', 'i', 'n', 'R', 'i', 'g', 'h', 't', '\0',
29983 : /* 3046 */ 'm', 'a', 'r', 'g', 'i', 'n', 'B', 'o', 't', 't', 'o', 'm', '\0',
29984 : /* 3059 */ 'm', 'a', 'r', 'g', 'i', 'n', 'L', 'e', 'f', 't', '\0',
29985 : /* 3070 */ 'm', 'a', 'r', 'k', 'e', 'r', 'O', 'f', 'f', 's', 'e', 't', '\0',
29986 : /* 3083 */ 'm', 'a', 'r', 'k', 's', '\0',
29987 : /* 3089 */ 'm', 'a', 'x', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29988 : /* 3099 */ 'm', 'a', 'x', 'W', 'i', 'd', 't', 'h', '\0',
29989 : /* 3108 */ 'm', 'i', 'n', 'H', 'e', 'i', 'g', 'h', 't', '\0',
29990 : /* 3118 */ 'm', 'i', 'n', 'W', 'i', 'd', 't', 'h', '\0',
29991 : /* 3127 */ 'o', 'r', 'p', 'h', 'a', 'n', 's', '\0',
29992 : /* 3135 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', '\0',
29993 : /* 3143 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'C', 'o', 'l', 'o', 'r', '\0',
29994 : /* 3156 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'S', 't', 'y', 'l', 'e', '\0',
29995 : /* 3169 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'W', 'i', 'd', 't', 'h', '\0',
29996 : /* 3182 */ 'o', 'v', 'e', 'r', 'f', 'l', 'o', 'w', '\0',
29997 : /* 3191 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', '\0',
29998 : /* 3199 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'T', 'o', 'p', '\0',
29999 : /* 3210 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'R', 'i', 'g', 'h', 't', '\0',
30000 : /* 3223 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'B', 'o', 't', 't', 'o', 'm', '\0',
30001 : /* 3237 */ 'p', 'a', 'd', 'd', 'i', 'n', 'g', 'L', 'e', 'f', 't', '\0',
30002 : /* 3249 */ 'p', 'a', 'g', 'e', '\0',
30003 : /* 3254 */ 'p', 'a', 'g', 'e', 'B', 'r', 'e', 'a', 'k', 'A', 'f', 't', 'e', 'r', '\0',
30004 : /* 3269 */ 'p', 'a', 'g', 'e', 'B', 'r', 'e', 'a', 'k', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
30005 : /* 3285 */ 'p', 'a', 'g', 'e', 'B', 'r', 'e', 'a', 'k', 'I', 'n', 's', 'i', 'd', 'e', '\0',
30006 : /* 3301 */ 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', '\0',
30007 : /* 3310 */ 'q', 'u', 'o', 't', 'e', 's', '\0',
30008 : /* 3317 */ 's', 'i', 'z', 'e', '\0',
30009 : /* 3322 */ 't', 'a', 'b', 'l', 'e', 'L', 'a', 'y', 'o', 'u', 't', '\0',
30010 : /* 3334 */ 't', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', '\0',
30011 : /* 3349 */ 't', 'e', 'x', 't', 'I', 'n', 'd', 'e', 'n', 't', '\0',
30012 : /* 3360 */ 't', 'e', 'x', 't', 'O', 'v', 'e', 'r', 'f', 'l', 'o', 'w', '\0',
30013 : /* 3373 */ 't', 'e', 'x', 't', 'S', 'h', 'a', 'd', 'o', 'w', '\0',
30014 : /* 3384 */ 't', 'e', 'x', 't', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
30015 : /* 3398 */ 'u', 'n', 'i', 'c', 'o', 'd', 'e', 'B', 'i', 'd', 'i', '\0',
30016 : /* 3410 */ 'v', 'e', 'r', 't', 'i', 'c', 'a', 'l', 'A', 'l', 'i', 'g', 'n', '\0',
30017 : /* 3424 */ 'v', 'i', 's', 'i', 'b', 'i', 'l', 'i', 't', 'y', '\0',
30018 : /* 3435 */ 'w', 'h', 'i', 't', 'e', 'S', 'p', 'a', 'c', 'e', '\0',
30019 : /* 3446 */ 'w', 'i', 'd', 'o', 'w', 's', '\0',
30020 : /* 3453 */ 'w', 'o', 'r', 'd', 'S', 'p', 'a', 'c', 'i', 'n', 'g', '\0',
30021 : /* 3465 */ 'z', 'I', 'n', 'd', 'e', 'x', '\0',
30022 : /* 3472 */ 'c', 'l', 'i', 'p', 'P', 'a', 't', 'h', '\0',
30023 : /* 3481 */ 'c', 'l', 'i', 'p', 'R', 'u', 'l', 'e', '\0',
30024 : /* 3490 */ 'c', 'o', 'l', 'o', 'r', 'I', 'n', 't', 'e', 'r', 'p', 'o', 'l', 'a', 't', 'i', 'o', 'n', '\0',
30025 : /* 3509 */ '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',
30026 : /* 3535 */ 'd', 'o', 'm', 'i', 'n', 'a', 'n', 't', 'B', 'a', 's', 'e', 'l', 'i', 'n', 'e', '\0',
30027 : /* 3552 */ 'f', 'i', 'l', 'l', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30028 : /* 3564 */ 'f', 'i', 'l', 'l', 'R', 'u', 'l', 'e', '\0',
30029 : /* 3573 */ 'f', 'i', 'l', 't', 'e', 'r', '\0',
30030 : /* 3580 */ 'f', 'l', 'o', 'o', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
30031 : /* 3591 */ 'f', 'l', 'o', 'o', 'd', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30032 : /* 3604 */ 'i', 'm', 'a', 'g', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'i', 'n', 'g', '\0',
30033 : /* 3619 */ 'l', 'i', 'g', 'h', 't', 'i', 'n', 'g', 'C', 'o', 'l', 'o', 'r', '\0',
30034 : /* 3633 */ 'm', 'a', 'r', 'k', 'e', 'r', '\0',
30035 : /* 3640 */ 'm', 'a', 'r', 'k', 'e', 'r', 'E', 'n', 'd', '\0',
30036 : /* 3650 */ 'm', 'a', 'r', 'k', 'e', 'r', 'M', 'i', 'd', '\0',
30037 : /* 3660 */ 'm', 'a', 'r', 'k', 'e', 'r', 'S', 't', 'a', 'r', 't', '\0',
30038 : /* 3672 */ 'm', 'a', 's', 'k', '\0',
30039 : /* 3677 */ 's', 'h', 'a', 'p', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'i', 'n', 'g', '\0',
30040 : /* 3692 */ 's', 't', 'o', 'p', 'C', 'o', 'l', 'o', 'r', '\0',
30041 : /* 3702 */ 's', 't', 'o', 'p', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30042 : /* 3714 */ 's', 't', 'r', 'o', 'k', 'e', 'D', 'a', 's', 'h', 'a', 'r', 'r', 'a', 'y', '\0',
30043 : /* 3730 */ 's', 't', 'r', 'o', 'k', 'e', 'D', 'a', 's', 'h', 'o', 'f', 'f', 's', 'e', 't', '\0',
30044 : /* 3747 */ 's', 't', 'r', 'o', 'k', 'e', 'L', 'i', 'n', 'e', 'c', 'a', 'p', '\0',
30045 : /* 3761 */ 's', 't', 'r', 'o', 'k', 'e', 'L', 'i', 'n', 'e', 'j', 'o', 'i', 'n', '\0',
30046 : /* 3776 */ 's', 't', 'r', 'o', 'k', 'e', 'M', 'i', 't', 'e', 'r', 'l', 'i', 'm', 'i', 't', '\0',
30047 : /* 3793 */ 's', 't', 'r', 'o', 'k', 'e', 'O', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30048 : /* 3807 */ 's', 't', 'r', 'o', 'k', 'e', 'W', 'i', 'd', 't', 'h', '\0',
30049 : /* 3819 */ 't', 'e', 'x', 't', 'A', 'n', 'c', 'h', 'o', 'r', '\0',
30050 : /* 3830 */ 't', 'e', 'x', 't', 'R', 'e', 'n', 'd', 'e', 'r', 'i', 'n', 'g', '\0',
30051 : /* 3844 */ 'M', 'o', 'z', 'A', 'p', 'p', 'e', 'a', 'r', 'a', 'n', 'c', 'e', '\0',
30052 : /* 3858 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'C', 'l', 'i', 'p', '\0',
30053 : /* 3873 */ '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',
30054 : /* 3899 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'O', 'r', 'i', 'g', 'i', 'n', '\0',
30055 : /* 3916 */ 'M', 'o', 'z', 'B', 'i', 'n', 'd', 'i', 'n', 'g', '\0',
30056 : /* 3927 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'B', 'o', 't', 't', 'o', 'm', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30057 : /* 3949 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'L', 'e', 'f', 't', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30058 : /* 3969 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'R', 'i', 'g', 'h', 't', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30059 : /* 3990 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'T', 'o', 'p', 'C', 'o', 'l', 'o', 'r', 's', '\0',
30060 : /* 4009 */ 'M', 'o', 'z', 'B', 'o', 'x', 'A', 'l', 'i', 'g', 'n', '\0',
30061 : /* 4021 */ 'M', 'o', 'z', 'B', 'o', 'x', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
30062 : /* 4037 */ 'M', 'o', 'z', 'B', 'o', 'x', 'F', 'l', 'e', 'x', '\0',
30063 : /* 4048 */ 'M', 'o', 'z', 'B', 'o', 'x', 'O', 'r', 'i', 'e', 'n', 't', '\0',
30064 : /* 4061 */ 'M', 'o', 'z', 'B', 'o', 'x', 'O', 'r', 'd', 'i', 'n', 'a', 'l', 'G', 'r', 'o', 'u', 'p', '\0',
30065 : /* 4080 */ 'M', 'o', 'z', 'B', 'o', 'x', 'P', 'a', 'c', 'k', '\0',
30066 : /* 4091 */ 'M', 'o', 'z', 'B', 'o', 'x', 'S', 'i', 'z', 'i', 'n', 'g', '\0',
30067 : /* 4104 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'C', 'o', 'u', 'n', 't', '\0',
30068 : /* 4119 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'W', 'i', 'd', 't', 'h', '\0',
30069 : /* 4134 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'G', 'a', 'p', '\0',
30070 : /* 4147 */ 'M', 'o', 'z', 'F', 'l', 'o', 'a', 't', 'E', 'd', 'g', 'e', '\0',
30071 : /* 4160 */ 'M', 'o', 'z', 'F', 'o', 'n', 't', 'F', 'e', 'a', 't', 'u', 'r', 'e', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', '\0',
30072 : /* 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',
30073 : /* 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',
30074 : /* 4231 */ 'M', 'o', 'z', 'I', 'm', 'a', 'g', 'e', 'R', 'e', 'g', 'i', 'o', 'n', '\0',
30075 : /* 4246 */ 'M', 'o', 'z', 'M', 'a', 'r', 'g', 'i', 'n', 'E', 'n', 'd', '\0',
30076 : /* 4259 */ 'M', 'o', 'z', 'M', 'a', 'r', 'g', 'i', 'n', 'S', 't', 'a', 'r', 't', '\0',
30077 : /* 4274 */ 'M', 'o', 'z', 'O', 'r', 'i', 'e', 'n', 't', '\0',
30078 : /* 4284 */ 'M', 'o', 'z', 'O', 'u', 't', 'l', 'i', 'n', 'e', 'R', 'a', 'd', 'i', 'u', 's', '\0',
30079 : /* 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',
30080 : /* 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',
30081 : /* 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',
30082 : /* 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',
30083 : /* 4405 */ 'M', 'o', 'z', 'P', 'a', 'd', 'd', 'i', 'n', 'g', 'E', 'n', 'd', '\0',
30084 : /* 4419 */ 'M', 'o', 'z', 'P', 'a', 'd', 'd', 'i', 'n', 'g', 'S', 't', 'a', 'r', 't', '\0',
30085 : /* 4435 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'F', 'o', 'c', 'u', 's', '\0',
30086 : /* 4448 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'I', 'n', 'p', 'u', 't', '\0',
30087 : /* 4461 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'M', 'o', 'd', 'i', 'f', 'y', '\0',
30088 : /* 4475 */ 'M', 'o', 'z', 'U', 's', 'e', 'r', 'S', 'e', 'l', 'e', 'c', 't', '\0',
30089 : /* 4489 */ 'o', 'p', 'a', 'c', 'i', 't', 'y', '\0',
30090 : /* 4497 */ 'o', 'u', 't', 'l', 'i', 'n', 'e', 'O', 'f', 'f', 's', 'e', 't', '\0',
30091 : /* 4511 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'A', 'l', 'i', 'g', 'n', 'L', 'a', 's', 't', '\0',
30092 : /* 4528 */ 'o', 'v', 'e', 'r', 'f', 'l', 'o', 'w', 'X', '\0',
30093 : /* 4538 */ 'o', 'v', 'e', 'r', 'f', 'l', 'o', 'w', 'Y', '\0',
30094 : /* 4548 */ 'i', 'm', 'e', 'M', 'o', 'd', 'e', '\0',
30095 : /* 4556 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', '\0',
30096 : /* 4569 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
30097 : /* 4587 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', 'S', 't', 'y', 'l', 'e', '\0',
30098 : /* 4605 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'E', 'n', 'd', 'W', 'i', 'd', 't', 'h', '\0',
30099 : /* 4623 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', '\0',
30100 : /* 4638 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', 'C', 'o', 'l', 'o', 'r', '\0',
30101 : /* 4658 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', 'S', 't', 'y', 'l', 'e', '\0',
30102 : /* 4678 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'S', 't', 'a', 'r', 't', 'W', 'i', 'd', 't', 'h', '\0',
30103 : /* 4698 */ 'M', 'o', 'z', 'S', 't', 'a', 'c', 'k', 'S', 'i', 'z', 'i', 'n', 'g', '\0',
30104 : /* 4713 */ 'M', 'o', 'z', 'B', 'o', 'r', 'd', 'e', 'r', 'I', 'm', 'a', 'g', 'e', '\0',
30105 : /* 4728 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 's', '\0',
30106 : /* 4739 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', '\0',
30107 : /* 4753 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', 'W', 'i', 'd', 't', 'h', '\0',
30108 : /* 4772 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', 'S', 't', 'y', 'l', 'e', '\0',
30109 : /* 4791 */ 'M', 'o', 'z', 'C', 'o', 'l', 'u', 'm', 'n', 'R', 'u', 'l', 'e', 'C', 'o', 'l', 'o', 'r', '\0',
30110 : /* 4810 */ 'w', 'o', 'r', 'd', 'W', 'r', 'a', 'p', '\0',
30111 : /* 4819 */ 'M', 'o', 'z', 'H', 'y', 'p', 'h', 'e', 'n', 's', '\0',
30112 : /* 4830 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', '\0',
30113 : /* 4843 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'O', 'r', 'i', 'g', 'i', 'n', '\0',
30114 : /* 4862 */ 'M', 'o', 'z', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', '\0',
30115 : /* 4877 */ 'M', 'o', 'z', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', 'O', 'r', 'i', 'g', 'i', 'n', '\0',
30116 : /* 4898 */ 'M', 'o', 'z', 'B', 'a', 'c', 'k', 'f', 'a', 'c', 'e', 'V', 'i', 's', 'i', 'b', 'i', 'l', 'i', 't', 'y', '\0',
30117 : /* 4920 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'S', 't', 'y', 'l', 'e', '\0',
30118 : /* 4938 */ 'M', 'o', 'z', 'W', 'i', 'n', 'd', 'o', 'w', 'S', 'h', 'a', 'd', 'o', 'w', '\0',
30119 : /* 4954 */ 'b', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'S', 'i', 'z', 'e', '\0',
30120 : /* 4969 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'B', 'l', 'i', 'n', 'k', '\0',
30121 : /* 4982 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'l', 'o', 'r', '\0',
30122 : /* 5005 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', 'L', 'i', 'n', 'e', '\0',
30123 : /* 5027 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'i', 'o', 'n', 'S', 't', 'y', 'l', 'e', '\0',
30124 : /* 5050 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', '\0',
30125 : /* 5072 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\0',
30126 : /* 5094 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', 'D', 'e', 'l', 'a', 'y', '\0',
30127 : /* 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',
30128 : /* 5141 */ 'M', 'o', 'z', 'T', 'r', 'a', 'n', 's', 'i', 't', 'i', 'o', 'n', '\0',
30129 : /* 5155 */ 'p', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'v', 'e', 'n', 't', 's', '\0',
30130 : /* 5169 */ 'M', 'o', 'z', 'T', 'a', 'b', 'S', 'i', 'z', 'e', '\0',
30131 : /* 5180 */ 'r', 'e', 's', 'i', 'z', 'e', '\0',
30132 : /* 5187 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'N', 'a', 'm', 'e', '\0',
30133 : /* 5204 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\0',
30134 : /* 5225 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'D', 'e', 'l', 'a', 'y', '\0',
30135 : /* 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',
30136 : /* 5270 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
30137 : /* 5292 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'F', 'i', 'l', 'l', 'M', 'o', 'd', 'e', '\0',
30138 : /* 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',
30139 : /* 5340 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', 'P', 'l', 'a', 'y', 'S', 't', 'a', 't', 'e', '\0',
30140 : /* 5362 */ 'M', 'o', 'z', 'A', 'n', 'i', 'm', 'a', 't', 'i', 'o', 'n', '\0',
30141 : /* 5375 */ 'M', 'o', 'z', 'T', 'e', 'x', 't', 'S', 'i', 'z', 'e', 'A', 'd', 'j', 'u', 's', 't', '\0',
30142 : /* 5393 */ 'c', 's', 's', 'T', 'e', 'x', 't', '\0',
30143 : /* 5401 */ 'g', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', 'V', 'a', 'l', 'u', 'e', '\0',
30144 : /* 5418 */ 'g', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', 'C', 'S', 'S', 'V', 'a', 'l', 'u', 'e', '\0',
30145 : /* 5438 */ 'r', 'e', 'm', 'o', 'v', 'e', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', '\0',
30146 : /* 5453 */ 'g', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\0',
30147 : /* 5473 */ 's', 'e', 't', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', '\0',
30148 : /* 5485 */ 'p', 'a', 'r', 'e', 'n', 't', 'R', 'u', 'l', 'e', '\0',
30149 : /* 5496 */ 'a', 'd', 'd', 'E', 'v', 'e', 'n', 't', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\0',
30150 : /* 5513 */ 'r', 'e', 'm', 'o', 'v', 'e', 'E', 'v', 'e', 'n', 't', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\0',
30151 : /* 5533 */ 'd', 'i', 's', 'p', 'a', 't', 'c', 'h', 'E', 'v', 'e', 'n', 't', '\0',
30152 : /* 5547 */ 't', 'y', 'p', 'e', '\0',
30153 : /* 5552 */ 't', 'a', 'r', 'g', 'e', 't', '\0',
30154 : /* 5559 */ 'c', 'u', 'r', 'r', 'e', 'n', 't', 'T', 'a', 'r', 'g', 'e', 't', '\0',
30155 : /* 5573 */ 'e', 'v', 'e', 'n', 't', 'P', 'h', 'a', 's', 'e', '\0',
30156 : /* 5584 */ 'b', 'u', 'b', 'b', 'l', 'e', 's', '\0',
30157 : /* 5592 */ 'c', 'a', 'n', 'c', 'e', 'l', 'a', 'b', 'l', 'e', '\0',
30158 : /* 5603 */ 't', 'i', 'm', 'e', 'S', 't', 'a', 'm', 'p', '\0',
30159 : /* 5613 */ 's', 't', 'o', 'p', 'P', 'r', 'o', 'p', 'a', 'g', 'a', 't', 'i', 'o', 'n', '\0',
30160 : /* 5629 */ 'p', 'r', 'e', 'v', 'e', 'n', 't', 'D', 'e', 'f', 'a', 'u', 'l', 't', '\0',
30161 : /* 5644 */ 'i', 'n', 'i', 't', 'E', 'v', 'e', 'n', 't', '\0',
30162 : /* 5654 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'P', 'r', 'e', 'v', 'e', 'n', 't', 'e', 'd', '\0',
30163 : /* 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',
30164 : /* 5696 */ 's', 'c', 'r', 'e', 'e', 'n', 'X', '\0',
30165 : /* 5704 */ 's', 'c', 'r', 'e', 'e', 'n', 'Y', '\0',
30166 : /* 5712 */ 'c', 'l', 'i', 'e', 'n', 't', 'X', '\0',
30167 : /* 5720 */ 'c', 'l', 'i', 'e', 'n', 't', 'Y', '\0',
30168 : /* 5728 */ 'c', 't', 'r', 'l', 'K', 'e', 'y', '\0',
30169 : /* 5736 */ 's', 'h', 'i', 'f', 't', 'K', 'e', 'y', '\0',
30170 : /* 5745 */ 'a', 'l', 't', 'K', 'e', 'y', '\0',
30171 : /* 5752 */ 'm', 'e', 't', 'a', 'K', 'e', 'y', '\0',
30172 : /* 5760 */ 'b', 'u', 't', 't', 'o', 'n', '\0',
30173 : /* 5767 */ 'r', 'e', 'l', 'a', 't', 'e', 'd', 'T', 'a', 'r', 'g', 'e', 't', '\0',
30174 : /* 5781 */ 'i', 'n', 'i', 't', 'M', 'o', 'u', 's', 'e', 'E', 'v', 'e', 'n', 't', '\0',
30175 : /* 5796 */ 'm', 'o', 'z', 'P', 'r', 'e', 's', 's', 'u', 'r', 'e', '\0',
30176 : /* 5808 */ 'm', 'o', 'z', 'I', 'n', 'p', 'u', 't', 'S', 'o', 'u', 'r', 'c', 'e', '\0',
30177 : /* 5823 */ 'i', 'n', 'i', 't', 'N', 'S', 'M', 'o', 'u', 's', 'e', 'E', 'v', 'e', 'n', 't', '\0',
30178 : /* 5840 */ 'c', 'h', 'a', 'r', 'C', 'o', 'd', 'e', '\0',
30179 : /* 5849 */ 'k', 'e', 'y', 'C', 'o', 'd', 'e', '\0',
30180 : /* 5857 */ 'i', 'n', 'i', 't', 'K', 'e', 'y', 'E', 'v', 'e', 'n', 't', '\0',
30181 : /* 5870 */ 'r', 'e', 'l', 'a', 't', 'e', 'd', 'N', 'o', 'd', 'e', '\0',
30182 : /* 5882 */ 'p', 'r', 'e', 'v', 'V', 'a', 'l', 'u', 'e', '\0',
30183 : /* 5892 */ 'n', 'e', 'w', 'V', 'a', 'l', 'u', 'e', '\0',
30184 : /* 5901 */ 'a', 't', 't', 'r', 'N', 'a', 'm', 'e', '\0',
30185 : /* 5910 */ 'a', 't', 't', 'r', 'C', 'h', 'a', 'n', 'g', 'e', '\0',
30186 : /* 5921 */ 'i', 'n', 'i', 't', 'M', 'u', 't', 'a', 't', 'i', 'o', 'n', 'E', 'v', 'e', 'n', 't', '\0',
30187 : /* 5939 */ 'd', 'a', 't', 'a', 'T', 'r', 'a', 'n', 's', 'f', 'e', 'r', '\0',
30188 : /* 5952 */ 'i', 'n', 'i', 't', 'D', 'r', 'a', 'g', 'E', 'v', 'e', 'n', 't', '\0',
30189 : /* 5966 */ 'x', '\0',
30190 : /* 5968 */ 'y', '\0',
30191 : /* 5970 */ 'i', 'n', 'i', 't', 'S', 'c', 'r', 'o', 'l', 'l', 'A', 'r', 'e', 'a', 'E', 'v', 'e', 'n', 't', '\0',
30192 : /* 5990 */ 'c', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', 's', '\0',
30193 : /* 6002 */ 'b', 'o', 'u', 'n', 'd', 'i', 'n', 'g', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 'c', 't', '\0',
30194 : /* 6021 */ 'p', 'a', 'i', 'n', 't', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\0',
30195 : /* 6035 */ 'o', 'r', 'i', 'g', 'i', 'n', '\0',
30196 : /* 6042 */ 'l', 'a', 's', 't', 'E', 'v', 'e', 'n', 't', 'I', 'd', '\0',
30197 : /* 6054 */ 's', 'o', 'u', 'r', 'c', 'e', '\0',
30198 : /* 6061 */ 'i', 'n', 'i', 't', 'M', 'e', 's', 's', 'a', 'g', 'e', 'E', 'v', 'e', 'n', 't', '\0',
30199 : /* 6078 */ 'a', 'x', 'i', 's', '\0',
30200 : /* 6083 */ 'i', 'n', 'i', 't', 'M', 'o', 'u', 's', 'e', 'S', 'c', 'r', 'o', 'l', 'l', 'E', 'v', 'e', 'n', 't', '\0',
30201 : /* 6104 */ 'l', 'e', 'n', 'g', 't', 'h', 'C', 'o', 'm', 'p', 'u', 't', 'a', 'b', 'l', 'e', '\0',
30202 : /* 6121 */ 'l', 'o', 'a', 'd', 'e', 'd', '\0',
30203 : /* 6128 */ 't', 'o', 't', 'a', 'l', '\0',
30204 : /* 6134 */ 'o', 'r', 'i', 'g', 'i', 'n', 'a', 'l', 'T', 'a', 'r', 'g', 'e', 't', '\0',
30205 : /* 6149 */ 'g', 'e', 't', 'P', 'r', 'e', 'v', 'e', 'n', 't', 'D', 'e', 'f', 'a', 'u', 'l', 't', '\0',
30206 : /* 6167 */ 'w', 'h', 'i', 'c', 'h', '\0',
30207 : /* 6173 */ 'r', 'a', 'n', 'g', 'e', 'P', 'a', 'r', 'e', 'n', 't', '\0',
30208 : /* 6185 */ 'r', 'a', 'n', 'g', 'e', 'O', 'f', 'f', 's', 'e', 't', '\0',
30209 : /* 6197 */ 'p', 'a', 'g', 'e', 'X', '\0',
30210 : /* 6203 */ 'p', 'a', 'g', 'e', 'Y', '\0',
30211 : /* 6209 */ 'i', 's', 'C', 'h', 'a', 'r', '\0',
30212 : /* 6216 */ 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', '\0',
30213 : /* 6227 */ 'r', 'a', 'd', 'i', 'u', 's', 'X', '\0',
30214 : /* 6235 */ 'r', 'a', 'd', 'i', 'u', 's', 'Y', '\0',
30215 : /* 6243 */ 'r', 'o', 't', 'a', 't', 'i', 'o', 'n', 'A', 'n', 'g', 'l', 'e', '\0',
30216 : /* 6257 */ 'f', 'o', 'r', 'c', 'e', '\0',
30217 : /* 6263 */ 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'd', 'T', 'o', 'u', 'c', 'h', '\0',
30218 : /* 6279 */ 't', 'o', 'u', 'c', 'h', 'e', 's', '\0',
30219 : /* 6287 */ 't', 'a', 'r', 'g', 'e', 't', 'T', 'o', 'u', 'c', 'h', 'e', 's', '\0',
30220 : /* 6301 */ 'c', 'h', 'a', 'n', 'g', 'e', 'd', 'T', 'o', 'u', 'c', 'h', 'e', 's', '\0',
30221 : /* 6316 */ 'i', 'n', 'i', 't', 'T', 'o', 'u', 'c', 'h', 'E', 'v', 'e', 'n', 't', '\0',
30222 : /* 6331 */ 'h', 'r', 'e', 'f', '\0',
30223 : /* 6336 */ 'r', 'e', 'l', '\0',
30224 : /* 6340 */ 't', 'e', 'x', 't', '\0',
30225 : /* 6345 */ 's', 'e', 'a', 'r', 'c', 'h', '\0',
30226 : /* 6352 */ 'h', 'a', 's', 'h', '\0',
30227 : /* 6357 */ 'f', 'o', 'r', 'm', '\0',
30228 : /* 6362 */ 'd', 'i', 's', 'a', 'b', 'l', 'e', 'd', '\0',
30229 : /* 6371 */ 'l', 'a', 'b', 'e', 'l', '\0',
30230 : /* 6377 */ 'i', 'c', 'o', 'n', '\0',
30231 : /* 6382 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'C', 'h', 'e', 'c', 'k', 'e', 'd', '\0',
30232 : /* 6397 */ 'c', 'h', 'e', 'c', 'k', 'e', 'd', '\0',
30233 : /* 6405 */ 'r', 'a', 'd', 'i', 'o', 'g', 'r', 'o', 'u', 'p', '\0',
30234 : /* 6416 */ 'b', 'o', 'd', 'y', '\0',
30235 : /* 6421 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'N', 'a', 'm', 'e', '\0',
30236 : /* 6439 */ 'a', 'n', 'c', 'h', 'o', 'r', 's', '\0',
30237 : /* 6447 */ 'l', 'i', 'n', 'k', 's', '\0',
30238 : /* 6453 */ 'U', 'R', 'L', '\0',
30239 : /* 6457 */ 'f', 'o', 'r', 'm', 's', '\0',
30240 : /* 6463 */ 'c', 'o', 'o', 'k', 'i', 'e', '\0',
30241 : /* 6470 */ 'i', 'm', 'a', 'g', 'e', 's', '\0',
30242 : /* 6477 */ 'w', 'r', 'i', 't', 'e', '\0',
30243 : /* 6483 */ 'w', 'r', 'i', 't', 'e', 'l', 'n', '\0',
30244 : /* 6491 */ 'd', 'o', 'm', 'a', 'i', 'n', '\0',
30245 : /* 6498 */ 'd', 'e', 's', 'i', 'g', 'n', 'M', 'o', 'd', 'e', '\0',
30246 : /* 6509 */ 'h', 'e', 'a', 'd', '\0',
30247 : /* 6514 */ 'i', 'd', '\0',
30248 : /* 6517 */ 'l', 'a', 'n', 'g', '\0',
30249 : /* 6522 */ 'd', 'i', 'r', '\0',
30250 : /* 6526 */ 'c', 'l', 'a', 's', 's', 'N', 'a', 'm', 'e', '\0',
30251 : /* 6536 */ 'd', 'a', 't', 'a', 's', 'e', 't', '\0',
30252 : /* 6544 */ 'h', 'i', 'd', 'd', 'e', 'n', '\0',
30253 : /* 6551 */ 'c', 'l', 'i', 'c', 'k', '\0',
30254 : /* 6557 */ 't', 'a', 'b', 'I', 'n', 'd', 'e', 'x', '\0',
30255 : /* 6566 */ 'f', 'o', 'c', 'u', 's', '\0',
30256 : /* 6572 */ 'b', 'l', 'u', 'r', '\0',
30257 : /* 6577 */ 'a', 'c', 'c', 'e', 's', 's', 'K', 'e', 'y', '\0',
30258 : /* 6587 */ 'a', 'c', 'c', 'e', 's', 's', 'K', 'e', 'y', 'L', 'a', 'b', 'e', 'l', '\0',
30259 : /* 6602 */ 'd', 'r', 'a', 'g', 'g', 'a', 'b', 'l', 'e', '\0',
30260 : /* 6612 */ 'c', 'o', 'n', 't', 'e', 'n', 't', 'E', 'd', 'i', 't', 'a', 'b', 'l', 'e', '\0',
30261 : /* 6628 */ 'i', 's', 'C', 'o', 'n', 't', 'e', 'n', 't', 'E', 'd', 'i', 't', 'a', 'b', 'l', 'e', '\0',
30262 : /* 6646 */ 'c', 'o', 'n', 't', 'e', 'x', 't', 'M', 'e', 'n', 'u', '\0',
30263 : /* 6658 */ 's', 'p', 'e', 'l', 'l', 'c', 'h', 'e', 'c', 'k', '\0',
30264 : /* 6669 */ 'i', 'n', 'n', 'e', 'r', 'H', 'T', 'M', 'L', '\0',
30265 : /* 6679 */ 'o', 'u', 't', 'e', 'r', 'H', 'T', 'M', 'L', '\0',
30266 : /* 6689 */ 'i', 'n', 's', 'e', 'r', 't', 'A', 'd', 'j', 'a', 'c', 'e', 'n', 't', 'H', 'T', 'M', 'L', '\0',
30267 : /* 6708 */ 's', 'c', 'r', 'o', 'l', 'l', 'I', 'n', 't', 'o', 'V', 'i', 'e', 'w', '\0',
30268 : /* 6723 */ 'o', 'f', 'f', 's', 'e', 't', 'P', 'a', 'r', 'e', 'n', 't', '\0',
30269 : /* 6736 */ 'o', 'f', 'f', 's', 'e', 't', 'T', 'o', 'p', '\0',
30270 : /* 6746 */ 'o', 'f', 'f', 's', 'e', 't', 'L', 'e', 'f', 't', '\0',
30271 : /* 6757 */ 'o', 'f', 'f', 's', 'e', 't', 'W', 'i', 'd', 't', 'h', '\0',
30272 : /* 6769 */ 'o', 'f', 'f', 's', 'e', 't', 'H', 'e', 'i', 'g', 'h', 't', '\0',
30273 : /* 6782 */ 'm', 'o', 'z', 'R', 'e', 'q', 'u', 'e', 's', 't', 'F', 'u', 'l', 'l', 'S', 'c', 'r', 'e', 'e', 'n', '\0',
30274 : /* 6803 */ 'e', 'l', 'e', 'm', 'e', 'n', 't', 's', '\0',
30275 : /* 6812 */ 's', 'u', 'b', 'm', 'i', 't', '\0',
30276 : /* 6819 */ 'a', 'c', 't', 'i', 'o', 'n', '\0',
30277 : /* 6826 */ 's', 'r', 'c', '\0',
30278 : /* 6830 */ 'c', 'o', 'n', 't', 'e', 'n', 't', 'D', 'o', 'c', 'u', 'm', 'e', 'n', 't', '\0',
30279 : /* 6846 */ 'c', 'o', 'n', 't', 'e', 'n', 't', 'W', 'i', 'n', 'd', 'o', 'w', '\0',
30280 : /* 6860 */ 'r', 'o', 'w', 's', '\0',
30281 : /* 6865 */ 'c', 'o', 'l', 's', '\0',
30282 : /* 6870 */ 'c', 'o', 'm', 'p', 'l', 'e', 't', 'e', '\0',
30283 : /* 6879 */ 's', 'e', 'l', 'e', 'c', 't', '\0',
30284 : /* 6886 */ 'f', 'i', 'l', 'e', 's', '\0',
30285 : /* 6892 */ 't', 'e', 'x', 't', 'L', 'e', 'n', 'g', 't', 'h', '\0',
30286 : /* 6903 */ 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'S', 't', 'a', 'r', 't', '\0',
30287 : /* 6918 */ 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'E', 'n', 'd', '\0',
30288 : /* 6931 */ 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\0',
30289 : /* 6950 */ 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', '\0',
30290 : /* 6968 */ 'c', 'o', 'm', 'p', 'a', 'c', 't', '\0',
30291 : /* 6976 */ 'i', 'n', 'd', 'e', 'x', '\0',
30292 : /* 6982 */ 's', 'e', 'l', 'e', 'c', 't', 'e', 'd', '\0',
30293 : /* 6991 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'S', 'e', 'l', 'e', 'c', 't', 'e', 'd', '\0',
30294 : /* 7007 */ 's', 'e', 'l', 'e', 'c', 't', 'e', 'd', 'I', 'n', 'd', 'e', 'x', '\0',
30295 : /* 7021 */ 'm', 'a', 'x', '\0',
30296 : /* 7025 */ 'o', 'p', 't', 'i', 'o', 'n', 's', '\0',
30297 : /* 7033 */ 'c', 'o', 'l', 'S', 'p', 'a', 'n', '\0',
30298 : /* 7041 */ 'h', 'e', 'a', 'd', 'e', 'r', 's', '\0',
30299 : /* 7049 */ 'c', 'e', 'l', 'l', 'I', 'n', 'd', 'e', 'x', '\0',
30300 : /* 7059 */ 'r', 'o', 'w', 'S', 'p', 'a', 'n', '\0',
30301 : /* 7067 */ 'a', 'b', 'b', 'r', '\0',
30302 : /* 7072 */ 's', 'c', 'o', 'p', 'e', '\0',
30303 : /* 7078 */ 'n', 'o', 'W', 'r', 'a', 'p', '\0',
30304 : /* 7085 */ 's', 'p', 'a', 'n', '\0',
30305 : /* 7090 */ 'd', 'e', 'l', 'e', 't', 'e', 'R', 'o', 'w', '\0',
30306 : /* 7100 */ 's', 'u', 'm', 'm', 'a', 'r', 'y', '\0',
30307 : /* 7108 */ 'i', 'n', 's', 'e', 'r', 't', 'R', 'o', 'w', '\0',
30308 : /* 7118 */ 's', 'e', 'c', 't', 'i', 'o', 'n', 'R', 'o', 'w', 'I', 'n', 'd', 'e', 'x', '\0',
30309 : /* 7134 */ 'r', 'o', 'w', 'I', 'n', 'd', 'e', 'x', '\0',
30310 : /* 7143 */ 'c', 'e', 'l', 'l', 's', '\0',
30311 : /* 7149 */ 'd', 'e', 'l', 'e', 't', 'e', 'C', 'e', 'l', 'l', '\0',
30312 : /* 7160 */ 'i', 'n', 's', 'e', 'r', 't', 'C', 'e', 'l', 'l', '\0',
30313 : /* 7171 */ 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\0',
30314 : /* 7184 */ 'w', 'r', 'a', 'p', '\0',
30315 : /* 7189 */ 'g', 'e', 't', 'C', 'o', 'n', 't', 'e', 'x', 't', '\0',
30316 : /* 7200 */ 't', 'o', 'D', 'a', 't', 'a', 'U', 'R', 'L', '\0',
30317 : /* 7210 */ 's', 't', 'a', 'r', 't', 'C', 'o', 'n', 't', 'a', 'i', 'n', 'e', 'r', '\0',
30318 : /* 7225 */ 's', 't', 'a', 'r', 't', 'O', 'f', 'f', 's', 'e', 't', '\0',
30319 : /* 7237 */ 'e', 'n', 'd', 'C', 'o', 'n', 't', 'a', 'i', 'n', 'e', 'r', '\0',
30320 : /* 7250 */ 'e', 'n', 'd', 'O', 'f', 'f', 's', 'e', 't', '\0',
30321 : /* 7260 */ 'c', 'o', 'l', 'l', 'a', 'p', 's', 'e', 'd', '\0',
30322 : /* 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',
30323 : /* 7294 */ 's', 'e', 't', 'S', 't', 'a', 'r', 't', '\0',
30324 : /* 7303 */ 's', 'e', 't', 'E', 'n', 'd', '\0',
30325 : /* 7310 */ 's', 'e', 't', 'S', 't', 'a', 'r', 't', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
30326 : /* 7325 */ 's', 'e', 't', 'S', 't', 'a', 'r', 't', 'A', 'f', 't', 'e', 'r', '\0',
30327 : /* 7339 */ 's', 'e', 't', 'E', 'n', 'd', 'B', 'e', 'f', 'o', 'r', 'e', '\0',
30328 : /* 7352 */ 's', 'e', 't', 'E', 'n', 'd', 'A', 'f', 't', 'e', 'r', '\0',
30329 : /* 7364 */ 'c', 'o', 'l', 'l', 'a', 'p', 's', 'e', '\0',
30330 : /* 7373 */ 's', 'e', 'l', 'e', 'c', 't', 'N', 'o', 'd', 'e', '\0',
30331 : /* 7384 */ 's', 'e', 'l', 'e', 'c', 't', 'N', 'o', 'd', 'e', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30332 : /* 7403 */ 'c', 'o', 'm', 'p', 'a', 'r', 'e', 'B', 'o', 'u', 'n', 'd', 'a', 'r', 'y', 'P', 'o', 'i', 'n', 't', 's', '\0',
30333 : /* 7425 */ 'd', 'e', 'l', 'e', 't', 'e', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30334 : /* 7440 */ 'e', 'x', 't', 'r', 'a', 'c', 't', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30335 : /* 7456 */ 'c', 'l', 'o', 'n', 'e', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30336 : /* 7470 */ 'i', 'n', 's', 'e', 'r', 't', 'N', 'o', 'd', 'e', '\0',
30337 : /* 7481 */ 's', 'u', 'r', 'r', 'o', 'u', 'n', 'd', 'C', 'o', 'n', 't', 'e', 'n', 't', 's', '\0',
30338 : /* 7498 */ 'c', 'l', 'o', 'n', 'e', 'R', 'a', 'n', 'g', 'e', '\0',
30339 : /* 7509 */ 'd', 'e', 't', 'a', 'c', 'h', '\0',
30340 : /* 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',
30341 : /* 7541 */ 'i', 's', 'P', 'o', 'i', 'n', 't', 'I', 'n', 'R', 'a', 'n', 'g', 'e', '\0',
30342 : /* 7556 */ 'c', 'o', 'm', 'p', 'a', 'r', 'e', 'P', 'o', 'i', 'n', 't', '\0',
30343 : /* 7569 */ 's', 'e', 't', 'I', 't', 'e', 'm', '\0',
30344 : /* 7577 */ 'g', 'e', 't', 'I', 't', 'e', 'm', '\0',
30345 : /* 7585 */ 'k', 'e', 'y', '\0',
30346 : /* 7589 */ 'r', 'e', 'm', 'o', 'v', 'e', 'I', 't', 'e', 'm', '\0',
30347 : /* 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',
30348 : /* 7625 */ 'n', 'e', 'x', 't', 'N', 'o', 'd', 'e', '\0',
30349 : /* 7634 */ 'e', 'v', 'a', 'l', 'u', 'a', 't', 'e', '\0',
30350 : /* 7643 */ 'c', 'r', 'e', 'a', 't', 'e', 'E', 'x', 'p', 'r', 'e', 's', 's', 'i', 'o', 'n', '\0',
30351 : /* 7660 */ 'c', 'r', 'e', 'a', 't', 'e', 'N', 'S', 'R', 'e', 's', 'o', 'l', 'v', 'e', 'r', '\0',
30352 : /* 7677 */ 's', 'n', 'a', 'p', 's', 'h', 'o', 't', 'I', 't', 'e', 'm', '\0',
30353 : /* 7690 */ 'i', 't', 'e', 'r', 'a', 't', 'e', 'N', 'e', 'x', 't', '\0',
30354 : /* 7702 */ 's', 'n', 'a', 'p', 's', 'h', 'o', 't', 'L', 'e', 'n', 'g', 't', 'h', '\0',
30355 : /* 7717 */ 'r', 'e', 's', 'u', 'l', 't', 'T', 'y', 'p', 'e', '\0',
30356 : /* 7728 */ 'n', 'u', 'm', 'b', 'e', 'r', 'V', 'a', 'l', 'u', 'e', '\0',
30357 : /* 7740 */ 's', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\0',
30358 : /* 7752 */ 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'V', 'a', 'l', 'u', 'e', '\0',
30359 : /* 7765 */ 's', 'i', 'n', 'g', 'l', 'e', 'N', 'o', 'd', 'e', 'V', 'a', 'l', 'u', 'e', '\0',
30360 : /* 7781 */ 'e', 'v', 'a', 'l', 'u', 'a', 't', 'e', 'W', 'i', 't', 'h', 'C', 'o', 'n', 't', 'e', 'x', 't', '\0',
30361 : /* 7801 */ 'a', 'l', 'i', 'g', 'n', '\0',
30362 : /* 7807 */ 'f', 'l', 'e', 'x', '\0',
30363 : /* 7812 */ 'f', 'l', 'e', 'x', 'G', 'r', 'o', 'u', 'p', '\0',
30364 : /* 7822 */ 'o', 'r', 'd', 'i', 'n', 'a', 'l', '\0',
30365 : /* 7830 */ 'o', 'r', 'i', 'e', 'n', 't', '\0',
30366 : /* 7837 */ 'p', 'a', 'c', 'k', '\0',
30367 : /* 7842 */ 'o', 'b', 's', 'e', 'r', 'v', 'e', 's', '\0',
30368 : /* 7851 */ 'm', 'e', 'n', 'u', '\0',
30369 : /* 7856 */ 't', 'o', 'o', 'l', 't', 'i', 'p', '\0',
30370 : /* 7864 */ 'p', 'e', 'r', 's', 'i', 's', 't', '\0',
30371 : /* 7872 */ 'd', 'a', 't', 'a', 's', 'o', 'u', 'r', 'c', 'e', 's', '\0',
30372 : /* 7884 */ 'r', 'e', 'f', '\0',
30373 : /* 7888 */ 't', 'o', 'o', 'l', 't', 'i', 'p', 'T', 'e', 'x', 't', '\0',
30374 : /* 7900 */ 's', 't', 'a', 't', 'u', 's', 'T', 'e', 'x', 't', '\0',
30375 : /* 7911 */ 'a', 'l', 'l', 'o', 'w', 'E', 'v', 'e', 'n', 't', 's', '\0',
30376 : /* 7923 */ 'd', 'a', 't', 'a', 'b', 'a', 's', 'e', '\0',
30377 : /* 7932 */ 'b', 'u', 'i', 'l', 'd', 'e', 'r', '\0',
30378 : /* 7940 */ 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\0',
30379 : /* 7949 */ 'c', 'o', 'n', 't', 'r', 'o', 'l', 'l', 'e', 'r', 's', '\0',
30380 : /* 7961 */ 'b', 'o', 'x', 'O', 'b', 'j', 'e', 'c', 't', '\0',
30381 : /* 7971 */ 'd', 'o', 'C', 'o', 'm', 'm', 'a', 'n', 'd', '\0',
30382 : /* 7981 */ 'g', 'e', 't', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', 'B', 'y', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', '\0',
30383 : /* 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',
30384 : /* 8029 */ 'r', 'e', 'a', 'd', 'A', 's', 'A', 'r', 'r', 'a', 'y', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30385 : /* 8047 */ 'r', 'e', 'a', 'd', 'A', 's', 'B', 'i', 'n', 'a', 'r', 'y', 'S', 't', 'r', 'i', 'n', 'g', '\0',
30386 : /* 8066 */ 'r', 'e', 'a', 'd', 'A', 's', 'T', 'e', 'x', 't', '\0',
30387 : /* 8077 */ 'r', 'e', 'a', 'd', 'A', 's', 'D', 'a', 't', 'a', 'U', 'R', 'L', '\0',
30388 : /* 8091 */ 'a', 'b', 'o', 'r', 't', '\0',
30389 : /* 8097 */ 'r', 'e', 'a', 'd', 'y', 'S', 't', 'a', 't', 'e', '\0',
30390 : /* 8108 */ 'r', 'e', 's', 'u', 'l', 't', '\0',
30391 : /* 8115 */ 'e', 'r', 'r', 'o', 'r', '\0',
30392 : /* 8121 */ 'o', 'n', 'l', 'o', 'a', 'd', 's', 't', 'a', 'r', 't', '\0',
30393 : /* 8133 */ 'o', 'n', 'p', 'r', 'o', 'g', 'r', 'e', 's', 's', '\0',
30394 : /* 8144 */ 'o', 'n', 'l', 'o', 'a', 'd', '\0',
30395 : /* 8151 */ 'o', 'n', 'a', 'b', 'o', 'r', 't', '\0',
30396 : /* 8159 */ 'o', 'n', 'e', 'r', 'r', 'o', 'r', '\0',
30397 : /* 8167 */ 'o', 'n', 'l', 'o', 'a', 'd', 'e', 'n', 'd', '\0',
30398 : /* 8177 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'X', 'M', 'L', '\0',
30399 : /* 8189 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'T', 'e', 'x', 't', '\0',
30400 : /* 8202 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'T', 'y', 'p', 'e', '\0',
30401 : /* 8215 */ 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '\0',
30402 : /* 8224 */ 's', 't', 'a', 't', 'u', 's', '\0',
30403 : /* 8231 */ 'o', 'p', 'e', 'n', '\0',
30404 : /* 8236 */ 's', 'e', 'n', 'd', '\0',
30405 : /* 8241 */ 's', 'e', 'n', 'd', 'A', 's', 'B', 'i', 'n', 'a', 'r', 'y', '\0',
30406 : /* 8254 */ 't', 'i', 'm', 'e', 'o', 'u', 't', '\0',
30407 : /* 8262 */ 'm', 'u', 'l', 't', 'i', 'p', 'a', 'r', 't', '\0',
30408 : /* 8272 */ 'm', 'o', 'z', 'B', 'a', 'c', 'k', 'g', 'r', 'o', 'u', 'n', 'd', 'R', 'e', 'q', 'u', 'e', 's', 't', '\0',
30409 : /* 8293 */ 'w', 'i', 't', 'h', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\0',
30410 : /* 8309 */ 'u', 'r', 'l', '\0',
30411 : /* 8313 */ 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '\0',
30412 : /* 8324 */ 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\0',
30413 : /* 8333 */ 'b', 'u', 'f', 'f', 'e', 'r', 'e', 'd', 'A', 'm', 'o', 'u', 'n', 't', '\0',
30414 : /* 8348 */ 'b', 'i', 'n', 'a', 'r', 'y', 'T', 'y', 'p', 'e', '\0',
30415 : /* 8359 */ 'o', 'n', 'o', 'p', 'e', 'n', '\0',
30416 : /* 8366 */ 'o', 'n', 'm', 'e', 's', 's', 'a', 'g', 'e', '\0',
30417 : /* 8376 */ 'o', 'n', 'c', 'l', 'o', 's', 'e', '\0',
30418 : /* 8384 */ 'c', 'l', 'o', 's', 'e', '\0',
30419 : /* 8390 */ 'a', 'c', 't', 'i', 'v', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30420 : /* 8404 */ 'a', 't', 't', 'a', 'c', 'h', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30421 : /* 8417 */ 'b', 'i', 'n', 'd', 'A', 't', 't', 'r', 'i', 'b', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\0',
30422 : /* 8436 */ 'b', 'i', 'n', 'd', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30423 : /* 8447 */ 'b', 'i', 'n', 'd', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30424 : /* 8463 */ 'b', 'i', 'n', 'd', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30425 : /* 8480 */ 'b', 'i', 'n', 'd', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30426 : /* 8492 */ 'b', 'l', 'e', 'n', 'd', 'C', 'o', 'l', 'o', 'r', '\0',
30427 : /* 8503 */ 'b', 'l', 'e', 'n', 'd', 'E', 'q', 'u', 'a', 't', 'i', 'o', 'n', '\0',
30428 : /* 8517 */ 'b', 'l', 'e', 'n', 'd', 'E', 'q', 'u', 'a', 't', 'i', 'o', 'n', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30429 : /* 8539 */ 'b', 'l', 'e', 'n', 'd', 'F', 'u', 'n', 'c', '\0',
30430 : /* 8549 */ 'b', 'l', 'e', 'n', 'd', 'F', 'u', 'n', 'c', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30431 : /* 8567 */ 'b', 'u', 'f', 'f', 'e', 'r', 'D', 'a', 't', 'a', '\0',
30432 : /* 8578 */ 'b', 'u', 'f', 'f', 'e', 'r', 'S', 'u', 'b', 'D', 'a', 't', 'a', '\0',
30433 : /* 8592 */ 'c', 'h', 'e', 'c', 'k', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', 'S', 't', 'a', 't', 'u', 's', '\0',
30434 : /* 8615 */ 'c', 'l', 'e', 'a', 'r', 'C', 'o', 'l', 'o', 'r', '\0',
30435 : /* 8626 */ 'c', 'l', 'e', 'a', 'r', 'D', 'e', 'p', 't', 'h', '\0',
30436 : /* 8637 */ 'c', 'l', 'e', 'a', 'r', 'S', 't', 'e', 'n', 'c', 'i', 'l', '\0',
30437 : /* 8650 */ 'c', 'o', 'l', 'o', 'r', 'M', 'a', 's', 'k', '\0',
30438 : /* 8660 */ 'c', 'o', 'm', 'p', 'i', 'l', 'e', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30439 : /* 8674 */ 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 'e', 'd', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30440 : /* 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',
30441 : /* 8719 */ 'c', 'o', 'p', 'y', 'T', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30442 : /* 8734 */ 'c', 'o', 'p', 'y', 'T', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30443 : /* 8752 */ 'c', 'r', 'e', 'a', 't', 'e', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30444 : /* 8765 */ 'c', 'r', 'e', 'a', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30445 : /* 8779 */ 'c', 'r', 'e', 'a', 't', 'e', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30446 : /* 8797 */ 'c', 'r', 'e', 'a', 't', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30447 : /* 8816 */ 'c', 'r', 'e', 'a', 't', 'e', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30448 : /* 8829 */ 'c', 'r', 'e', 'a', 't', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30449 : /* 8843 */ 'c', 'u', 'l', 'l', 'F', 'a', 'c', 'e', '\0',
30450 : /* 8852 */ 'd', 'e', 'l', 'e', 't', 'e', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30451 : /* 8865 */ 'd', 'e', 'l', 'e', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30452 : /* 8879 */ 'd', 'e', 'l', 'e', 't', 'e', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30453 : /* 8897 */ 'd', 'e', 'l', 'e', 't', 'e', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30454 : /* 8916 */ 'd', 'e', 'l', 'e', 't', 'e', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30455 : /* 8929 */ 'd', 'e', 'l', 'e', 't', 'e', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30456 : /* 8943 */ 'd', 'e', 'p', 't', 'h', 'F', 'u', 'n', 'c', '\0',
30457 : /* 8953 */ 'd', 'e', 'p', 't', 'h', 'M', 'a', 's', 'k', '\0',
30458 : /* 8963 */ 'd', 'e', 'p', 't', 'h', 'R', 'a', 'n', 'g', 'e', '\0',
30459 : /* 8974 */ 'd', 'e', 't', 'a', 'c', 'h', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30460 : /* 8987 */ 'd', 'i', 's', 'a', 'b', 'l', 'e', '\0',
30461 : /* 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',
30462 : /* 9020 */ 'd', 'r', 'a', 'w', 'A', 'r', 'r', 'a', 'y', 's', '\0',
30463 : /* 9031 */ 'd', 'r', 'a', 'w', 'E', 'l', 'e', 'm', 'e', 'n', 't', 's', '\0',
30464 : /* 9044 */ 'e', 'n', 'a', 'b', 'l', 'e', '\0',
30465 : /* 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',
30466 : /* 9075 */ 'f', 'i', 'n', 'i', 's', 'h', '\0',
30467 : /* 9082 */ 'f', 'l', 'u', 's', 'h', '\0',
30468 : /* 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',
30469 : /* 9112 */ 'f', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', 'T', 'e', 'x', 't', 'u', 'r', 'e', '2', 'D', '\0',
30470 : /* 9133 */ 'f', 'r', 'o', 'n', 't', 'F', 'a', 'c', 'e', '\0',
30471 : /* 9143 */ 'g', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'M', 'i', 'p', 'm', 'a', 'p', '\0',
30472 : /* 9158 */ 'g', 'e', 't', 'A', 'c', 't', 'i', 'v', 'e', 'A', 't', 't', 'r', 'i', 'b', '\0',
30473 : /* 9174 */ 'g', 'e', 't', 'A', 'c', 't', 'i', 'v', 'e', 'U', 'n', 'i', 'f', 'o', 'r', 'm', '\0',
30474 : /* 9191 */ 'g', 'e', 't', 'A', 't', 't', 'a', 'c', 'h', 'e', 'd', 'S', 'h', 'a', 'd', 'e', 'r', 's', '\0',
30475 : /* 9210 */ 'g', 'e', 't', 'A', 't', 't', 'r', 'i', 'b', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\0',
30476 : /* 9228 */ 'g', 'e', 't', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30477 : /* 9241 */ 'g', 'e', 't', 'B', 'u', 'f', 'f', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30478 : /* 9260 */ 'g', 'e', 't', 'E', 'r', 'r', 'o', 'r', '\0',
30479 : /* 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',
30480 : /* 9303 */ 'g', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30481 : /* 9323 */ 'g', 'e', 't', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'I', 'n', 'f', 'o', 'L', 'o', 'g', '\0',
30482 : /* 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',
30483 : /* 9366 */ 'g', 'e', 't', 'S', 'h', 'a', 'd', 'e', 'r', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30484 : /* 9385 */ 'g', 'e', 't', 'S', 'h', 'a', 'd', 'e', 'r', 'I', 'n', 'f', 'o', 'L', 'o', 'g', '\0',
30485 : /* 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',
30486 : /* 9427 */ 'g', 'e', 't', 'S', 'h', 'a', 'd', 'e', 'r', 'S', 'o', 'u', 'r', 'c', 'e', '\0',
30487 : /* 9443 */ 'g', 'e', 't', 'T', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\0',
30488 : /* 9459 */ 'g', 'e', 't', 'U', 'n', 'i', 'f', 'o', 'r', 'm', '\0',
30489 : /* 9470 */ 'g', 'e', 't', 'U', 'n', 'i', 'f', 'o', 'r', 'm', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\0',
30490 : /* 9489 */ 'g', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '\0',
30491 : /* 9505 */ 'g', 'e', 't', 'V', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'O', 'f', 'f', 's', 'e', 't', '\0',
30492 : /* 9527 */ 'h', 'i', 'n', 't', '\0',
30493 : /* 9532 */ 'i', 's', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30494 : /* 9541 */ 'i', 's', 'F', 'r', 'a', 'm', 'e', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30495 : /* 9555 */ 'i', 's', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30496 : /* 9565 */ 'i', 's', 'R', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', '\0',
30497 : /* 9580 */ 'i', 's', 'S', 'h', 'a', 'd', 'e', 'r', '\0',
30498 : /* 9589 */ 'i', 's', 'T', 'e', 'x', 't', 'u', 'r', 'e', '\0',
30499 : /* 9599 */ 'i', 's', 'E', 'n', 'a', 'b', 'l', 'e', 'd', '\0',
30500 : /* 9609 */ 'l', 'i', 'n', 'k', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30501 : /* 9621 */ 'p', 'i', 'x', 'e', 'l', 'S', 't', 'o', 'r', 'e', 'i', '\0',
30502 : /* 9633 */ 'p', 'o', 'l', 'y', 'g', 'o', 'n', 'O', 'f', 'f', 's', 'e', 't', '\0',
30503 : /* 9647 */ 'r', 'e', 'a', 'd', 'P', 'i', 'x', 'e', 'l', 's', '\0',
30504 : /* 9658 */ 'r', 'e', 'n', 'd', 'e', 'r', 'b', 'u', 'f', 'f', 'e', 'r', 'S', 't', 'o', 'r', 'a', 'g', 'e', '\0',
30505 : /* 9678 */ 's', 'a', 'm', 'p', 'l', 'e', 'C', 'o', 'v', 'e', 'r', 'a', 'g', 'e', '\0',
30506 : /* 9693 */ 's', 'c', 'i', 's', 's', 'o', 'r', '\0',
30507 : /* 9701 */ 's', 'h', 'a', 'd', 'e', 'r', 'S', 'o', 'u', 'r', 'c', 'e', '\0',
30508 : /* 9714 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'F', 'u', 'n', 'c', '\0',
30509 : /* 9726 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'F', 'u', 'n', 'c', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30510 : /* 9746 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'M', 'a', 's', 'k', '\0',
30511 : /* 9758 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'M', 'a', 's', 'k', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30512 : /* 9778 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'O', 'p', '\0',
30513 : /* 9788 */ 's', 't', 'e', 'n', 'c', 'i', 'l', 'O', 'p', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'e', '\0',
30514 : /* 9806 */ 't', 'e', 'x', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30515 : /* 9817 */ 't', 'e', 'x', 'S', 'u', 'b', 'I', 'm', 'a', 'g', 'e', '2', 'D', '\0',
30516 : /* 9831 */ 't', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'f', '\0',
30517 : /* 9845 */ 't', 'e', 'x', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'i', '\0',
30518 : /* 9859 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'f', '\0',
30519 : /* 9869 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'i', '\0',
30520 : /* 9879 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'f', '\0',
30521 : /* 9889 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'i', '\0',
30522 : /* 9899 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'f', '\0',
30523 : /* 9909 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'i', '\0',
30524 : /* 9919 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'f', '\0',
30525 : /* 9929 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'i', '\0',
30526 : /* 9939 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'f', 'v', '\0',
30527 : /* 9950 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '1', 'i', 'v', '\0',
30528 : /* 9961 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'f', 'v', '\0',
30529 : /* 9972 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '2', 'i', 'v', '\0',
30530 : /* 9983 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'f', 'v', '\0',
30531 : /* 9994 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '3', 'i', 'v', '\0',
30532 : /* 10005 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'f', 'v', '\0',
30533 : /* 10016 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', '4', 'i', 'v', '\0',
30534 : /* 10027 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', 'M', 'a', 't', 'r', 'i', 'x', '2', 'f', 'v', '\0',
30535 : /* 10044 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', 'M', 'a', 't', 'r', 'i', 'x', '3', 'f', 'v', '\0',
30536 : /* 10061 */ 'u', 'n', 'i', 'f', 'o', 'r', 'm', 'M', 'a', 't', 'r', 'i', 'x', '4', 'f', 'v', '\0',
30537 : /* 10078 */ 'u', 's', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30538 : /* 10089 */ 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', 'P', 'r', 'o', 'g', 'r', 'a', 'm', '\0',
30539 : /* 10105 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'f', '\0',
30540 : /* 10120 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'f', '\0',
30541 : /* 10135 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'f', '\0',
30542 : /* 10150 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'f', '\0',
30543 : /* 10165 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '1', 'f', 'v', '\0',
30544 : /* 10181 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '2', 'f', 'v', '\0',
30545 : /* 10197 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '3', 'f', 'v', '\0',
30546 : /* 10213 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', '4', 'f', 'v', '\0',
30547 : /* 10229 */ 'v', 'e', 'r', 't', 'e', 'x', 'A', 't', 't', 'r', 'i', 'b', 'P', 'o', 'i', 'n', 't', 'e', 'r', '\0',
30548 : /* 10249 */ 'v', 'i', 'e', 'w', 'p', 'o', 'r', 't', '\0',
30549 : /* 10258 */ 'g', 'e', 't', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\0',
30550 : /* 10271 */ 'g', 'e', 't', 'S', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '\0',
30551 : /* 10294 */ 'i', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'L', 'o', 's', 't', '\0',
30552 : /* 10308 */ 'd', 'r', 'a', 'w', 'i', 'n', 'g', 'B', 'u', 'f', 'f', 'e', 'r', 'W', 'i', 'd', 't', 'h', '\0',
30553 : /* 10327 */ 'd', 'r', 'a', 'w', 'i', 'n', 'g', 'B', 'u', 'f', 'f', 'e', 'r', 'H', 'e', 'i', 'g', 'h', 't', '\0',
30554 : /* 10347 */ 'f', 'r', 'a', 'm', 'e', 'B', 'u', 'f', 'f', 'e', 'r', '\0',
30555 : /* 10359 */ 't', 'i', 'm', 'e', '\0',
30556 : /* 10364 */ 'm', 'o', 'z', 'W', 'r', 'i', 't', 'e', 'A', 'u', 'd', 'i', 'o', '\0',
30557 : /* 10378 */ 'p', 'r', 'i', 'm', 'a', 'r', 'y', 'K', 'e', 'y', '\0',
30558 : /* 10389 */ 'c', 'o', 'n', 't', 'i', 'n', 'u', 'e', '\0',
30559 : /* 10398 */ 'u', 'p', 'd', 'a', 't', 'e', '\0',
30560 : /* 10405 */ 'd', 'e', 'l', 'e', 't', 'e', '\0',
30561 : /* 10412 */ 'a', 'd', 'v', 'a', 'n', 'c', 'e', '\0',
30562 : /* 10420 */ 'v', 'e', 'r', 's', 'i', 'o', 'n', '\0',
30563 : /* 10428 */ 'o', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', 'N', 'a', 'm', 'e', 's', '\0',
30564 : /* 10445 */ 'c', 'r', 'e', 'a', 't', 'e', 'O', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', '\0',
30565 : /* 10463 */ 'd', 'e', 'l', 'e', 't', 'e', 'O', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', '\0',
30566 : /* 10481 */ 't', 'r', 'a', 'n', 's', 'a', 'c', 't', 'i', 'o', 'n', '\0',
30567 : /* 10493 */ 'o', 'n', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'c', 'h', 'a', 'n', 'g', 'e', '\0',
30568 : /* 10509 */ 'c', 'o', 'd', 'e', '\0',
30569 : /* 10514 */ 's', 't', 'o', 'r', 'e', 'N', 'a', 'm', 'e', '\0',
30570 : /* 10524 */ 'k', 'e', 'y', 'P', 'a', 't', 'h', '\0',
30571 : /* 10532 */ 'u', 'n', 'i', 'q', 'u', 'e', '\0',
30572 : /* 10539 */ 'm', 'u', 'l', 't', 'i', 'E', 'n', 't', 'r', 'y', '\0',
30573 : /* 10550 */ 'o', 'b', 'j', 'e', 'c', 't', 'S', 't', 'o', 'r', 'e', '\0',
30574 : /* 10562 */ 'g', 'e', 't', '\0',
30575 : /* 10566 */ 'g', 'e', 't', 'K', 'e', 'y', '\0',
30576 : /* 10573 */ 'g', 'e', 't', 'A', 'l', 'l', '\0',
30577 : /* 10580 */ 'g', 'e', 't', 'A', 'l', 'l', 'K', 'e', 'y', 's', '\0',
30578 : /* 10591 */ 'o', 'p', 'e', 'n', 'C', 'u', 'r', 's', 'o', 'r', '\0',
30579 : /* 10602 */ 'o', 'p', 'e', 'n', 'K', 'e', 'y', 'C', 'u', 'r', 's', 'o', 'r', '\0',
30580 : /* 10616 */ 'c', 'o', 'u', 'n', 't', '\0',
30581 : /* 10622 */ 'l', 'o', 'w', 'e', 'r', '\0',
30582 : /* 10628 */ 'u', 'p', 'p', 'e', 'r', '\0',
30583 : /* 10634 */ 'l', 'o', 'w', 'e', 'r', 'O', 'p', 'e', 'n', '\0',
30584 : /* 10644 */ 'u', 'p', 'p', 'e', 'r', 'O', 'p', 'e', 'n', '\0',
30585 : /* 10654 */ 'i', 'n', 'd', 'e', 'x', 'N', 'a', 'm', 'e', 's', '\0',
30586 : /* 10665 */ 'a', 'u', 't', 'o', 'I', 'n', 'c', 'r', 'e', 'm', 'e', 'n', 't', '\0',
30587 : /* 10679 */ 'p', 'u', 't', '\0',
30588 : /* 10683 */ 'c', 'r', 'e', 'a', 't', 'e', 'I', 'n', 'd', 'e', 'x', '\0',
30589 : /* 10695 */ 'd', 'e', 'l', 'e', 't', 'e', 'I', 'n', 'd', 'e', 'x', '\0',
30590 : /* 10707 */ 'e', 'r', 'r', 'o', 'r', 'C', 'o', 'd', 'e', '\0',
30591 : /* 10717 */ 'o', 'n', 's', 'u', 'c', 'c', 'e', 's', 's', '\0',
30592 : /* 10727 */ 'd', 'b', '\0',
30593 : /* 10730 */ 'm', 'o', 'd', 'e', '\0',
30594 : /* 10735 */ 'o', 'n', 'c', 'o', 'm', 'p', 'l', 'e', 't', 'e', '\0',
30595 : /* 10746 */ 'd', 'e', 'l', 'e', 't', 'e', 'D', 'a', 't', 'a', 'b', 'a', 's', 'e', '\0',
30596 : /* 10761 */ 'c', 'm', 'p', '\0',
30597 : /* 10765 */ 'o', 'n', 'b', 'l', 'o', 'c', 'k', 'e', 'd', '\0',
30598 : /* 10775 */ 'o', 'n', 'u', 'p', 'g', 'r', 'a', 'd', 'e', 'n', 'e', 'e', 'd', 'e', 'd', '\0',
30599 : /* 10791 */ 'o', 'l', 'd', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\0',
30600 : /* 10802 */ 'n', 'e', 'w', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\0',
30601 : /* 10813 */ 'o', 'n', 'U', 's', 'a', 'g', 'e', 'R', 'e', 's', 'u', 'l', 't', '\0',
30602 : /* 10827 */ 'g', 'e', 't', 'U', 's', 'a', 'g', 'e', 'F', 'o', 'r', 'U', 'R', 'I', '\0',
30603 : /* 10842 */ 'c', 'a', 'n', 'c', 'e', 'l', 'G', 'e', 't', 'U', 's', 'a', 'g', 'e', 'F', 'o', 'r', 'U', 'R', 'I', '\0',
30604 : /* 10863 */ 'c', 'l', 'e', 'a', 'r', 'D', 'a', 't', 'a', 'b', 'a', 's', 'e', 's', 'F', 'o', 'r', 'U', 'R', 'I', '\0',
30605 : /* 10884 */ 'i', 'n', 'i', 't', 'W', 'i', 'n', 'd', 'o', 'w', 'l', 'e', 's', 's', '\0' };
30606 :
30607 : PR_STATIC_ASSERT(sizeof(stringtab) < (1 << (8 * sizeof(all_properties[0].name_index))));
30608 : PR_STATIC_ASSERT(sizeof(stringtab) < (1 << (8 * sizeof(all_functions[0].name_index))));
30609 :
30610 2779 : JSBool DOM_DefineQuickStubs(JSContext *cx, JSObject *proto, unsigned flags, PRUint32 count, const nsID **iids)
30611 : {
30612 2779 : return xpc_qsDefineQuickStubs(cx, proto, flags, count, iids, 181, tableData, all_properties, all_functions, stringtab);
30613 : }
30614 :
30615 :
|