xmllite: Fail to set input for external IXmlReaderInput.
[wine] / dlls / mshtml / nsiface.idl
1 /*
2  * Copyright 2005-2012 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 /*
20  * NOTE:
21  * This file is not a typical idl file. Interfaces in this file are XPCOM
22  * interfaces (NOT MSCOM!), but we generate the header file with WIDL
23  * compatible with XPCOM, usable in C code.
24  */
25
26 cpp_quote("#define GECKO_VERSION \"1.9\"")
27 cpp_quote("#define GECKO_VERSION_STRING \"Wine Gecko \" GECKO_VERSION")
28
29 import "wtypes.idl";
30
31 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
32 cpp_quote("#undef GetForm")
33 cpp_quote("#undef SetPort")
34 cpp_quote("#endif")
35
36 typedef HRESULT nsresult;
37 typedef ULONG nsrefcnt;
38
39 typedef IID nsID;
40 typedef IID nsIID;
41 typedef nsIID nsCID;
42 typedef REFIID nsIIDRef;
43 typedef nsIIDRef nsCIDRef;
44
45 typedef WCHAR PRUnichar;
46
47 /*
48  * Mozilla uses stdint.h types for its headers. Following defines make this IDL file
49  * more similar to original declarations. Note that it's only a widl trick, we can't
50  * use stdint.h types in C.
51  */
52 #define int16_t short
53 #define int32_t LONG
54 #define int64_t INT64
55
56 #define uint8_t UINT8
57 #define uint16_t UINT16
58 #define uint32_t UINT32
59 #define uint64_t UINT64
60
61 typedef uint64_t DOMTimeStamp;
62 typedef uint32_t nsLoadFlags;
63 typedef int64_t PRTime;
64
65 /* Similar trick to stdint.h types for C++ bool type */
66 typedef unsigned char cpp_bool;
67 #define bool cpp_bool
68
69 typedef struct {
70     void *v;
71     void *d1;
72     uint32_t d2;
73     void *d3;
74 } nsCStringContainer;
75
76 typedef struct {
77     void *v;
78     void *d1;
79     uint32_t d2;
80     void *d3;
81 } nsStringContainer;
82
83 typedef nsCStringContainer nsACString;
84 typedef nsStringContainer nsAString;
85
86 interface nsIWebBrowserChrome;
87 interface nsILoadGroup;
88 interface nsIDOMNode;
89 interface nsIDOMDocument;
90 interface nsIDOMEvent;
91 interface nsIEditor;
92 interface nsISelectionController;
93 interface nsITransactionManager;
94 interface nsITransaction;
95 interface nsIInlineSpellChecker;
96 interface nsIOutputStream;
97 interface nsIEditorObserver;
98 interface nsIEditActionListener;
99 interface nsIDocumentStateListener;
100 interface nsIDOMCSSStyleSheet;
101 interface nsIDOMDocumentView;
102 interface nsIDOMWindow;
103 interface nsIDOMElement;
104 interface nsIDOMRange;
105 interface nsIDOMEventTarget;
106 interface nsISelection;
107 interface nsIDOMHTMLSelectElement;
108 interface nsIFile;
109
110 interface IMoniker;
111
112 [
113     object,
114     uuid(00000000-0000-0000-c000-000000000046),
115     local
116 ]
117 interface nsISupports
118 {
119     nsresult QueryInterface(nsIIDRef riid, void **result);
120     nsrefcnt AddRef();
121     nsrefcnt Release();
122 }
123
124 /* Currently we don't need a full declaration of these interfaces */
125 typedef nsISupports nsISHistory;
126 typedef nsISupports nsIWidget;
127 typedef nsISupports nsIDOMBarProp;
128 typedef nsISupports nsIPrompt;
129 typedef nsISupports nsIAuthPrompt;
130 typedef nsISupports nsIDOMDocumentType;
131 typedef nsISupports nsIDOMDOMImplementation;
132 typedef nsISupports nsIDOMCDATASection;
133 typedef nsISupports nsIDOMProcessingInstruction;
134 typedef nsISupports nsIDOMEntityReference;
135 typedef nsISupports nsIWebProgressListener;
136 typedef nsISupports nsIDOMCSSValue;
137 typedef nsISupports nsIPrintSession;
138 typedef nsISupports nsIControllerCommandTable;
139 typedef nsISupports nsIPrincipal;
140 typedef nsISupports nsIAtom;
141 typedef nsISupports nsISupportsArray;
142 typedef nsISupports nsIContentFilter;
143 typedef nsISupports nsIDOMMediaList;
144 typedef nsISupports nsIDOMHTMLTableCaptionElement;
145 typedef nsISupports nsIDOMHTMLTableSectionElement;
146 typedef nsISupports nsIDOMClientRectList;
147 typedef nsISupports nsINode;
148 typedef nsISupports nsIStyleSheet;
149 typedef nsISupports nsIStyleRule;
150 typedef nsISupports nsIDOMUserDataHandler;
151 typedef nsISupports nsIDocShellLoadInfo;
152 typedef nsISupports nsISHEntry;
153 typedef nsISupports nsIPresShell;
154 typedef nsISupports nsIContentViewer;
155 typedef nsISupports nsIDocumentCharsetInfo;
156 typedef nsISupports nsILayoutHistoryState;
157 typedef nsISupports nsISecureBrowserUI;
158 typedef nsISupports nsIDOMStorage;
159 typedef nsISupports nsIDOMDOMTokenList;
160 typedef nsISupports nsITransferable;
161 typedef nsISupports nsIDOMFileList;
162 typedef nsISupports nsIDOMFile;
163 typedef nsISupports nsIControllers;
164 typedef nsISupports nsIDOMValidityState;
165 typedef nsISupports nsIPluginInstanceOwner;
166 typedef nsISupports nsIPluginStreamListener;
167 typedef nsISupports nsIContentSink;
168 typedef nsISupports nsIParserFilter;
169 typedef nsISupports nsIDTD;
170 typedef nsISupports nsIObserver;
171 typedef nsISupports nsIDOMNodeFilter;
172 typedef nsISupports nsIDOMNodeIterator;
173 typedef nsISupports nsIDOMTreeWalker;
174 typedef nsISupports nsIHttpUpgradeListener;
175 typedef nsISupports nsIDOMDOMStringMap;
176 typedef nsISupports nsIDOMDOMStringList;
177 typedef nsISupports nsIDOMOfflineResourceList;
178 typedef nsISupports nsIDOMHistory;
179 typedef nsISupports nsIDOMNavigator;
180 typedef nsISupports nsIDOMMediaQueryList;
181 typedef nsISupports nsIDOMScreen;
182 typedef nsISupports nsIDOMCrypto;
183 typedef nsISupports nsIDOMPkcs11;
184 typedef nsISupports nsIAnimationFrameListener;
185 typedef nsISupports nsIDOMMozURLProperty;
186 typedef nsISupports nsIDOMStorageList;
187 typedef nsISupports nsILocalFile;
188 typedef nsISupports nsIDOMHTMLMenuElement;
189 typedef nsISupports nsIDOMCaretPosition;
190 typedef nsISupports nsIFrameRequestCallback;
191 typedef nsISupports nsICycleCollectorListener;
192 typedef nsISupports nsIDOMHTMLCanvasElement;
193 typedef nsISupports nsIQueryContentEventResult;
194 typedef nsISupports nsIDOMBlob;
195 typedef nsISupports nsIPrivacyTransitionObserver;
196 typedef nsISupports nsIDOMHTMLPropertiesCollection;
197 typedef nsISupports mozIDOMApplication;
198
199 typedef void *JSContext;
200 typedef void *JSObject;
201 typedef uint64_t jsval;
202
203 [
204     object,
205     uuid(8bb35ed9-e332-462d-9155-4a002ab5c958),
206     local
207 ]
208 interface nsIServiceManager : nsISupports
209 {
210     nsresult GetService(nsCIDRef aClass, nsIIDRef aIID, void **result);
211     nsresult GetServiceByContractID(const char *aContractID, nsIIDRef aIID, void **result);
212     nsresult IsServiceInstantiated(nsCIDRef aClass, nsIIDRef aIID, BOOL *_retval);
213     nsresult IsServiceInstantiatedByContractID(const char *aContractID, nsIIDRef aIID, BOOL *_retval);
214 }
215
216 [
217     object,
218     uuid(00000001-0000-0000-c000-000000000046),
219     local
220 ]
221 interface nsIFactory : nsISupports
222 {
223     nsresult CreateInstance(nsISupports *aOuter, const nsIID *iid, void **result);
224     nsresult LockFactory(bool lock);
225 }
226
227 [
228     object,
229     uuid(59e7e77a-38e4-11d4-8cf5-0060b0fc14a3),
230     local
231 ]
232 interface nsIMemory : nsISupports
233 {
234     void *Alloc(/*size_t*/ int size);
235     void *Realloc(void *_ptr, /*size_t*/ int newSize);
236     void Free(void *_ptr);
237     nsresult HeapMinimize(bool immediate);
238     nsresult IsLowMemory(bool *_retval);
239 }
240
241 [
242     object,
243     uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf),
244     local
245 ]
246 interface nsIWeakReference : nsISupports
247 {
248     nsresult QueryReferent(const nsIID *riid, void **result);
249 }
250
251 [
252     object,
253     uuid(9188bc86-f92e-11d2-81ef-0060083a0bcf),
254     local
255 ]
256 interface nsISupportsWeakReference : nsISupports
257 {
258     nsresult GetWeakReference(nsIWeakReference **_retval);
259 }
260
261 [
262     object,
263     uuid(033a1470-8b2a-11d3-af88-00a024ffc08c),
264     local
265 ]
266 interface nsIInterfaceRequestor : nsISupports
267 {
268     nsresult GetInterface(const nsIID *riid, void **result);
269 }
270
271 [
272     object,
273     uuid(4a2abaf0-6886-11d3-9382-00104ba0fd40),
274     local
275 ]
276 interface nsIRunnable : nsISupports
277 {
278     nsresult Run();
279 }
280
281 [
282     object,
283     uuid(d1899240-f9d2-11d2-bdd6-000064657374),
284     local
285 ]
286 interface nsISimpleEnumerator : nsISupports
287 {
288     nsresult HasMoreElements(bool *_retval);
289     nsresult GetNext(nsISupports **_retval);
290 }
291
292 [
293     object,
294     uuid(81e4c2de-acac-4ad6-901a-b5fb1b851a0d),
295     local
296 ]
297 interface nsIVariant : nsISupports
298 {
299     nsresult GetDataType(uint16_t *aDataType);
300     nsresult GetAsInt8(uint8_t *_retval);
301     nsresult GetAsInt16(int16_t *_retval);
302     nsresult GetAsInt32(int32_t *_retval);
303     nsresult GetAsInt64(int64_t *_retval);
304     nsresult GetAsUint8(uint8_t *_retval);
305     nsresult GetAsUint16(uint16_t *_retval);
306     nsresult GetAsUint32(uint32_t *_retval);
307     nsresult GetAsUint64(uint64_t *_retval);
308     nsresult GetAsFloat(float *_retval);
309     nsresult GetAsDouble(double *_retval);
310     nsresult GetAsBool(bool *_retval);
311     nsresult GetAsChar(char *_retval);
312     nsresult GetAsWChar(PRUnichar *_retval);
313     nsresult GetAsID(nsID *retval);
314     nsresult GetAsAString(nsAString *_retval);
315     nsresult GetAsDOMString(nsAString *_retval);
316     nsresult GetAsACString(nsACString *_retval);
317     nsresult GetAsAUTF8String(nsACString *_retval);
318     nsresult GetAsString(char * *_retval);
319     nsresult GetAsWString(PRUnichar * *_retval);
320     nsresult GetAsISupports(nsISupports * *_retval);
321     nsresult GetAsJSVal(long /*jsval*/ *_retval);
322     nsresult GetAsInterface(nsIID **iid, void **iface);
323     nsresult GetAsArray(uint16_t *type, nsIID *iid, uint32_t *count, void **ptr);
324     nsresult GetAsStringWithSize(uint32_t *size, char **str);
325     nsresult GetAsWStringWithSize(uint32_t *size, PRUnichar **str);
326 }
327
328 [
329     object,
330     uuid(5586a590-8c82-11d5-90f3-0010a4e73d9a),
331     local
332 ]
333 interface nsIWritableVariant : nsIVariant
334 {
335     nsresult GetWritable(bool *aWritable);
336     nsresult SetWritable(bool aWritable);
337     nsresult SetAsInt8(uint8_t aValue);
338     nsresult SetAsInt16(int16_t aValue);
339     nsresult SetAsInt32(int32_t aValue);
340     nsresult SetAsInt64(int64_t aValue);
341     nsresult SetAsUint8(uint8_t aValue);
342     nsresult SetAsUint16(uint16_t aValue);
343     nsresult SetAsUint32(uint32_t aValue);
344     nsresult SetAsUint64(uint64_t aValue);
345     nsresult SetAsFloat(float aValue);
346     nsresult SetAsDouble(double aValue);
347     nsresult SetAsBool(bool aValue);
348     nsresult SetAsChar(char aValue);
349     nsresult SetAsWChar(PRUnichar aValue);
350     nsresult SetAsID(const nsID *aValue);
351     nsresult SetAsAString(const nsAString *aValue);
352     nsresult SetAsDOMString(const nsAString *aValue);
353     nsresult SetAsACString(const nsACString *aValue);
354     nsresult SetAsAUTF8String(const nsACString *aValue);
355     nsresult SetAsString(const char * aValue);
356     nsresult SetAsWString(const PRUnichar * aValue);
357     nsresult SetAsISupports(nsISupports *aValue);
358     nsresult SetAsInterface(const nsIID *iid, void *iface);
359     nsresult SetAsArray(uint16_t type, const nsIID *iid, uint32_t count, void *ptr);
360     nsresult SetAsStringWithSize(uint32_t size, const char *str);
361     nsresult SetAsWStringWithSize(uint32_t size, const PRUnichar *str);
362     nsresult SetAsVoid();
363     nsresult SetAsEmpty();
364     nsresult SetAsEmptyArray();
365     nsresult SetFromVariant(nsIVariant *aValue);
366 }
367
368 [
369     object,
370     uuid(53cdbc97-c2d7-4e30-b2c3-45b2ee79db18),
371     local
372 ]
373 interface nsIInputStream : nsISupports
374 {
375     nsresult Close();
376     nsresult Available(uint64_t *_retval);
377     nsresult Read(char *aBuf, uint32_t aCount, uint32_t *_retval);
378     nsresult ReadSegments(nsresult (*aWriter)(nsIInputStream *aInStream,
379             void *aClosure, const char *aFromSegment, uint32_t aToOffset,
380             uint32_t aCount, uint32_t *aWriteCount),
381             void *aClosure, uint32_t aCount, uint32_t *_retval);
382     nsresult IsNonBlocking(bool *_retval);
383 }
384
385 [
386     object,
387     uuid(395fe045-7d18-4adb-a3fd-af98c8a1af11),
388     local
389 ]
390 interface nsIURI : nsISupports
391 {
392     nsresult GetSpec(nsACString *aSpec);
393     nsresult SetSpec(const nsACString *aSpec);
394     nsresult GetPrePath(nsACString *aPrePath);
395     nsresult GetScheme(nsACString *aScheme);
396     nsresult SetScheme(const nsACString *aScheme);
397     nsresult GetUserPass(nsACString *aUserPass);
398     nsresult SetUserPass(const nsACString *aUserPass);
399     nsresult GetUsername(nsACString *aUsername);
400     nsresult SetUsername(const nsACString *aUsername);
401     nsresult GetPassword(nsACString *aPassword);
402     nsresult SetPassword(const nsACString *aPassword);
403     nsresult GetHostPort(nsACString *aHostPort);
404     nsresult SetHostPort(const nsACString *aHostPort);
405     nsresult GetHost(nsACString *aHost);
406     nsresult SetHost(const nsACString *aHost);
407     nsresult GetPort(int32_t *aPort);
408     nsresult SetPort(int32_t aPort);
409     nsresult GetPath(nsACString *aPath);
410     nsresult SetPath(const nsACString *aPath);
411     nsresult Equals(nsIURI *other, bool *_retval);
412     nsresult SchemeIs(const char *scheme, bool *_retval);
413     nsresult Clone(nsIURI **_retval);
414     nsresult Resolve(const nsACString *relativePath, nsACString *_retval);
415     nsresult GetAsciiSpec(nsACString *aAsciiSpec);
416     nsresult GetAsciiHost(nsACString *aAsciiHost);
417     nsresult GetOriginCharset(nsACString *aOriginCharset);
418     nsresult GetRef(nsACString *aRef);
419     nsresult SetRef(const nsACString *aRef);
420     nsresult EqualsExceptRef(nsIURI *other, bool *_retval);
421     nsresult CloneIgnoringRef(nsIURI **_retval);
422     nsresult GetSpecIgnoringRef(nsACString *aSpecIgnoringRef);
423     nsresult GetHasRef(bool *aHasRef);
424 }
425
426 [
427     object,
428     uuid(1419aa16-f134-4154-9886-00c7c5147a13),
429     local
430 ]
431 interface nsIURL : nsIURI
432 {
433     nsresult GetFilePath(nsACString *aFilePath);
434     nsresult SetFilePath(const nsACString *aFilePath);
435     nsresult GetQuery(nsACString *aQuery);
436     nsresult SetQuery(const nsACString *aQuery);
437     nsresult GetDirectory(nsACString *aDirectory);
438     nsresult SetDirectory(const nsACString *aDirectory);
439     nsresult GetFileName(nsACString *aFileName);
440     nsresult SetFileName(const nsACString *aFileName);
441     nsresult GetFileBaseName(nsACString *aFileBaseName);
442     nsresult SetFileBaseName(const nsACString *aFileBaseName);
443     nsresult GetFileExtension(nsACString *aFileExtension);
444     nsresult SetFileExtension(const nsACString *aFileExtension);
445     nsresult GetCommonBaseSpec(nsIURI *aURIToCompare, nsACString *_retval);
446     nsresult GetRelativeSpec(nsIURI *aURIToCompare, nsACString *_retval);
447 }
448
449 [
450     object,
451     uuid(7750029c-1b0a-414e-8359-a77f24a2a0a6),
452     local
453 ]
454 interface nsIFileURL : nsIURL
455 {
456     nsresult GetFile(nsIFile **aFile);
457     nsresult SetFile(nsIFile *aFile);
458 }
459
460 [
461     object,
462     uuid(321578d0-03c1-4d95-8821-021ac612d18d),
463     local
464 ]
465 interface nsIMutable : nsISupports
466 {
467     nsresult GetMutable(bool *aMutable);
468     nsresult SetMutable(bool aMutable);
469 }
470
471 [
472     object,
473     uuid(babd6cca-ebe7-4329-967c-d6b9e33caa81),
474     local
475 ]
476 interface nsIStandardURL : nsIMutable
477 {
478     nsresult Init(uint32_t aUrlType, int32_t aDefaultPort, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI);
479 }
480
481 [
482     object,
483     uuid(ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe),
484     local
485 ]
486 interface nsIRequest : nsISupports
487 {
488     nsresult GetName(nsACString *aName);
489     nsresult IsPending(bool *_retval);
490     nsresult GetStatus(nsresult *aStatus);
491     nsresult Cancel(nsresult aStatus);
492     nsresult Suspend();
493     nsresult Resume();
494     nsresult GetLoadGroup(nsILoadGroup **aLoadGroup);
495     nsresult SetLoadGroup(nsILoadGroup *aLoadGroup);
496     nsresult GetLoadFlags(nsLoadFlags *aLoadFlags);
497     nsresult SetLoadFlags(nsLoadFlags aLoadFlags);
498 }
499
500 [
501     object,
502     uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40),
503     local
504 ]
505 interface nsIRequestObserver : nsISupports
506 {
507     nsresult OnStartRequest(nsIRequest *aRequest, nsISupports *aContext);
508     nsresult OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode);
509 }
510
511 [
512     object,
513     uuid(3b4c8a77-76ba-4610-b316-678c73a3b88c),
514     local
515 ]
516 interface nsIStreamListener : nsIRequestObserver
517 {
518     nsresult OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
519                              nsIInputStream *aInputStream, uint64_t aOffset, uint32_t aCount);
520 }
521
522 [
523     object,
524     uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc),
525     local
526 ]
527 interface nsILoadGroup : nsIRequest
528 {
529     nsresult GetGroupObserver(nsIRequestObserver **aGroupObserver);
530     nsresult SetGroupObserver(nsIRequestObserver *aGroupObserver);
531     nsresult GetDefaultLoadRequest(nsIRequest **aDefaultLoadRequest);
532     nsresult SetDefaultLoadRequest(nsIRequest *aDefaultLoadRequest);
533     nsresult AddRequest(nsIRequest *aRequest, nsISupports *aContext);
534     nsresult RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus);
535     nsresult GetRequests(nsISimpleEnumerator **aRequests);
536     nsresult GetActiveCount(uint32_t *aActiveCount);
537     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
538     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
539 }
540
541 [
542     object,
543     uuid(98f3b51b-bb55-4276-a43c-db636f8d77e3),
544     local
545 ]
546 interface nsIChannel : nsIRequest
547 {
548     nsresult GetOriginalURI(nsIURI **aOriginalURI);
549     nsresult SetOriginalURI(nsIURI *aOriginalURI);
550     nsresult GetURI(nsIURI **aURI);
551     nsresult GetOwner(nsISupports **aOwner);
552     nsresult SetOwner(nsISupports *aOwner);
553     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
554     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
555     nsresult GetSecurityInfo(nsISupports **aSecurityInfo);
556     nsresult GetContentType(nsACString *aContentType);
557     nsresult SetContentType(const nsACString *aContentType);
558     nsresult GetContentCharset(nsACString *aContentCharset);
559     nsresult SetContentCharset(const nsACString *aContentCharset);
560     nsresult GetContentLength(int32_t *aContentLength);
561     nsresult SetContentLength(int32_t aContentLength);
562     nsresult Open(nsIInputStream **_retval);
563     nsresult AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext);
564     nsresult GetContentDisposition(uint32_t *aContentDisposition);
565     nsresult SetContentDisposition(uint32_t aContentDisposition);
566     nsresult GetContentDispositionFilename(nsAString *aContentDispositionFilename);
567     nsresult SetContentDispositionFilename(const nsAString *aContentDispositionFilename);
568     nsresult GetContentDispositionHeader(nsACString *aContentDispositionHeader);
569 }
570
571 [
572     object,
573     uuid(35412859-b9d9-423c-8866-2d4559fdd2be),
574     local
575 ]
576 interface nsIHttpHeaderVisitor : nsISupports
577 {
578     nsresult VisitHeader(const nsACString *aHeader, const nsACString *aValue);
579 }
580
581 [
582     object,
583     uuid(9277fe09-f0cc-4cd9-bbce-581dd94b0260),
584     local
585 ]
586 interface nsIHttpChannel : nsIChannel
587 {
588     nsresult GetRequestMethod(nsACString *aRequestMethod);
589     nsresult SetRequestMethod(const nsACString *aRequestMethod);
590     nsresult GetReferrer(nsIURI **aReferrer);
591     nsresult SetReferrer(nsIURI *aReferrer);
592     nsresult GetRequestHeader(const nsACString *aHeader, nsACString *_retval);
593     nsresult SetRequestHeader(const nsACString *aHeader, const nsACString *aValue, bool aMerge);
594     nsresult VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor);
595     nsresult GetAllowPipelining(bool *aAllowPipelining);
596     nsresult SetAllowPipelining(bool aAllowPipelining);
597     nsresult GetRedirectionLimit(uint32_t *aRedirectionLimit);
598     nsresult SetRedirectionLimit(uint32_t aRedirectionLimit);
599     nsresult GetResponseStatus(uint32_t *aResponseStatus);
600     nsresult GetResponseStatusText(nsACString *aResponseStatusText);
601     nsresult GetRequestSucceeded(bool *aRequestSucceeded);
602     nsresult GetResponseHeader(const nsACString *header, nsACString *_retval);
603     nsresult SetResponseHeader(const nsACString *header, const nsACString *value, bool merge);
604     nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor);
605     nsresult IsNoStoreResponse(bool *_retval);
606     nsresult IsNoCacheResponse(bool *_retval);
607 }
608
609 [
610     object,
611     uuid(9363fd96-af59-47e8-bddf-1d5e91acd336),
612     local
613 ]
614 interface nsIHttpChannelInternal : nsISupports
615 {
616     nsresult GetDocumentURI(nsIURI **aDocumentURI);
617     nsresult SetDocumentURI(nsIURI *aDocumentURI);
618     nsresult GetRequestVersion(uint32_t *major, uint32_t *minor);
619     nsresult GetResponseVersion(uint32_t *major, uint32_t *minor);
620     nsresult SetCookie(const char *aCookieHeader);
621     nsresult SetupFallbackChannel(const char *aFallbackKey);
622     nsresult GetForceAllowThirdPartyCookie(bool *aForceAllowThirdPartyCookie);
623     nsresult SetForceAllowThirdPartyCookie(bool aForceAllowThirdPartyCookie);
624     nsresult GetCanceled(bool *aCanceled);
625     nsresult GetChannelIsForDownload(bool *aChannelIsForDownload);
626     nsresult SetChannelIsForDownload(bool aChannelIsForDownload);
627     nsresult GetLocalAddress(nsACString *aLocalAddress);
628     nsresult GetLocalPort(int32_t *aLocalPort);
629     nsresult GetRemoteAddress(nsACString *aRemoteAddress);
630     nsresult GetRemotePort(int32_t *aRemotePort);
631     nsresult SetCacheKeysRedirectChain(void /*nsTArray<nsCString>*/ *cacheKeys);
632     nsresult HTTPUpgrade(const nsACString *aProtocolName, nsIHttpUpgradeListener *aListener);
633     nsresult GetAllowSpdy(bool *aAllowSpdy);
634     nsresult SetAllowSpdy(bool aAllowSpdy);
635 }
636
637 [
638     object,
639     uuid(5cfe15bd-5adb-4a7f-9e55-4f5a67d15794),
640     local
641 ]
642 interface nsIUploadChannel : nsISupports
643 {
644     nsresult SetUploadStream(nsIInputStream *aStream, const nsACString *aContentType,
645                              int64_t aContentLength);
646     nsresult GetUploadStream(nsIInputStream **aUploadStream);
647 }
648
649 [
650     object,
651     uuid(8d171460-a716-41f1-92be-8c659db39b45),
652     local
653 ]
654 interface nsIAsyncVerifyRedirectCallback : nsISupports
655 {
656     nsresult OnRedirectVerifyCallback(nsresult result);
657 }
658
659 [
660     object,
661     uuid(a430d870-df77-4502-9570-d46a8de33154),
662     local
663 ]
664 interface nsIChannelEventSink : nsISupports
665 {
666     cpp_quote("#define REDIRECT_TEMPORARY 1")
667     cpp_quote("#define REDIRECT_PERMANENT 2")
668     cpp_quote("#define REDIRECT_INTERNAL  4")
669
670     nsresult AsyncOnChannelRedirect(nsIChannel *oldChannel, nsIChannel *newChannel, uint32_t flags,
671                                     nsIAsyncVerifyRedirectCallback *callback);
672 }
673
674 [
675     object,
676     uuid(a6cf906d-15b3-11d2-932e-00805f8add32),
677     local
678 ]
679 interface nsIDOMLocation : nsISupports
680 {
681     nsresult GetHash(nsAString *aHash);
682     nsresult SetHash(const nsAString *aHash);
683     nsresult GetHost(nsAString *aHost);
684     nsresult SetHost(const nsAString *aHost);
685     nsresult GetHostname(nsAString *aHostname);
686     nsresult SetHostname(const nsAString *aHostname);
687     nsresult GetHref(nsAString *aHref);
688     nsresult SetHref(const nsAString *aHref);
689     nsresult GetPathname(nsAString *aPathname);
690     nsresult SetPathname(const nsAString *aPathname);
691     nsresult GetPort(nsAString *aPort);
692     nsresult SetPort(const nsAString *aPort);
693     nsresult GetProtocol(nsAString *aProtocol);
694     nsresult SetProtocol(const nsAString *aProtocol);
695     nsresult GetSearch(nsAString *aSearch);
696     nsresult SetSearch(const nsAString *aSearch);
697     nsresult Reload(bool forceget);
698     nsresult Replace(const nsAString *url);
699     nsresult Assign(const nsAString *url);
700     nsresult ToString(nsAString *_retval);
701 }
702
703 [
704     object,
705     uuid(2938307a-9d70-4b63-8afc-0197e82318ad),
706     local
707 ]
708 interface nsIDOMCSSRule : nsISupports
709 {
710     nsresult GetType(uint16_t *aType);
711     nsresult GetCssText(nsAString *aCssText);
712     nsresult SetCssText(const nsAString *aCssText);
713     nsresult GetParentStyleSheet(nsIDOMCSSStyleSheet **aParentStyleSheet);
714     nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
715 }
716
717 [
718     object,
719     uuid(a6cf90be-15b3-11d2-932e-00805f8add32),
720     local
721 ]
722 interface nsIDOMCSSStyleDeclaration : nsISupports
723 {
724     nsresult GetCssText(nsAString *aCssText);
725     nsresult SetCssText(const nsAString *aCssText);
726     nsresult GetPropertyValue(const nsAString *propertyName, nsAString *_retval);
727     nsresult GetPropertyCSSValue(const nsAString *propertyName, nsIDOMCSSValue **_retval);
728     nsresult RemoveProperty(const nsAString *propertyName, nsAString *_retval);
729     nsresult GetPropertyPriority(const nsAString *propertyName, nsAString *_retval);
730     nsresult SetProperty(const nsAString *propertyName, const nsAString *value,
731                          const nsAString *priority);
732     nsresult GetLength(uint32_t *aLength);
733     nsresult Item(uint32_t index, nsAString *_retval);
734     nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
735 }
736
737 [
738     object,
739     uuid(a6cf90c0-15b3-11d2-932e-00805f8add32),
740     local
741 ]
742 interface nsIDOMCSSRuleList : nsISupports
743 {
744     nsresult GetLength(uint32_t *aLength);
745     nsresult Item(uint32_t index, nsIDOMCSSRule **_retval);
746 }
747
748 [
749     object,
750     uuid(a6cf9080-15b3-11d2-932e-00805f8add32),
751     local
752 ]
753 interface nsIDOMStyleSheet : nsISupports
754 {
755     nsresult GetType(nsAString *aType);
756     nsresult GetDisabled(bool *aDisabled);
757     nsresult SetDisabled(bool aDisabled);
758     nsresult GetOwnerNode(nsIDOMNode **aOwnerNode);
759     nsresult GetParentStyleSheet(nsIDOMStyleSheet **aParentStyleSheet);
760     nsresult GetHref(nsAString *aHref);
761     nsresult GetTitle(nsAString *aTitle);
762     nsresult GetMedia(nsIDOMMediaList **aMedia);
763 }
764
765 [
766     object,
767     uuid(a6cf90c2-15b3-11d2-932e-00805f8add32),
768     local
769 ]
770 interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet
771 {
772     nsresult GetOwnerRule(nsIDOMCSSRule **aOwnerRule);
773     nsresult GetCssRules(nsIDOMCSSRuleList **aCssRules);
774     nsresult InsertRule(const nsAString *rule, uint32_t index, uint32_t *_retval);
775     nsresult DeleteRule(uint32_t index);
776 }
777
778 [
779     object,
780     uuid(a6cf9081-15b3-11d2-932e-00805f8add32),
781     local
782 ]
783 interface nsIDOMStyleSheetList : nsISupports
784 {
785     nsresult GetLength(uint32_t *aLength);
786     nsresult Item(uint32_t index, nsIDOMStyleSheet **_retval);
787 }
788
789 [
790     object,
791     uuid(496852ba-e48d-4fa5-982e-e0dc1b475bf1),
792     local
793 ]
794 interface nsIDOMNodeList : nsISupports
795 {
796     nsresult Item(uint32_t index, nsIDOMNode **_retval);
797     nsresult GetLength(uint32_t *aLength);
798     /* Followed by semi-internal API that we don't want to use */
799 }
800
801 [
802     object,
803     uuid(a6cf907b-15b3-11d2-932e-00805f8add32),
804     local
805 ]
806 interface nsIDOMNamedNodeMap : nsISupports
807 {
808     nsresult GetNamedItem(const nsAString *name, nsIDOMNode **_retval);
809     nsresult SetNamedItem(nsIDOMNode *arg, nsIDOMNode **_retval);
810     nsresult RemoveNamedItem(const nsAString *name, nsIDOMNode **_retval);
811     nsresult Item(uint32_t index, nsIDOMNode **_retval);
812     nsresult GetLength(uint32_t *aLength);
813     nsresult GetNamedItemNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMNode **_retval);
814     nsresult SetNamedItemNS(nsIDOMNode *arg, nsIDOMNode **_retval);
815     nsresult RemoveNamedItemNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMNode **_retval);
816 }
817
818 [
819     object,
820     uuid(5e9bcec9-5928-4f77-8a9c-424ef01c20e1),
821     local
822 ]
823 interface nsIDOMNode : nsISupports
824 {
825     enum NSNODETYPE {
826         ELEMENT_NODE = 1,
827         ATTRIBUTE_NODE = 2,
828         TEXT_NODE = 3,
829         CDATA_SELECTION_NODE = 4,
830         ENTITY_REFERENCE_NODE = 5,
831         ENTITY_NODE = 6,
832         PROCESSING_INSTRUCTION_NODE = 7,
833         COMMENT_NODE = 8,
834         DOCUMENT_NODE = 9,
835         DOCUMENT_TYPE_NODE = 10,
836         DOCUMENT_FRAGMENT_NODE = 11,
837         NOTATION_NODE = 12
838     };
839
840     enum {
841         DOCUMENT_POSITION_DISCONNECTED = 1,
842         DOCUMENT_POSITION_PRECEDING = 2,
843         DOCUMENT_POSITION_FOLLOWING = 4,
844         DOCUMENT_POSITION_CONTAINS = 8,
845         DOCUMENT_POSITION_CONTAINED_BY = 16,
846         DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32
847     };
848
849     nsresult GetNodeName(nsAString *aNodeName);
850     nsresult GetNodeValue(nsAString *aNodeValue);
851     nsresult SetNodeValue(const nsAString *aNodeValue);
852     nsresult GetNodeType(uint16_t *aNodeType);
853     nsresult GetParentNode(nsIDOMNode **aParentNode);
854     nsresult GetParentElement(nsIDOMElement **aParentElement);
855     nsresult GetChildNodes(nsIDOMNodeList **aChildNodes);
856     nsresult GetFirstChild(nsIDOMNode **aFirstChild);
857     nsresult GetLastChild(nsIDOMNode **aLastChild);
858     nsresult GetPreviousSibling(nsIDOMNode **aPreviousSibling);
859     nsresult GetNextSibling(nsIDOMNode **aNextSibling);
860     nsresult GetAttributes(nsIDOMNamedNodeMap **aAttributes);
861     nsresult GetOwnerDocument(nsIDOMDocument **aOwnerDocument);
862     nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval);
863     nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval);
864     nsresult RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval);
865     nsresult AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval);
866     nsresult HasChildNodes(bool *_retval);
867     nsresult CloneNode(bool deep, uint8_t _argc, nsIDOMNode **_retval);
868     nsresult Normalize();
869     nsresult IsSupported(const nsAString *feature, const nsAString *version, bool *_retval);
870     nsresult GetNamespaceURI(nsAString *aNamespaceURI);
871     nsresult GetPrefix(nsAString *aPrefix);
872     nsresult GetLocalName(nsAString *aLocalName);
873     nsresult HasAttributes(bool *_retval);
874     nsresult GetDOMBaseURI(nsAString *aBaseURI);
875     nsresult CompareDocumentPosition(nsIDOMNode *other, uint16_t *_retval);
876     nsresult GetTextContent(nsAString *aTextContent);
877     nsresult SetTextContent(const nsAString *aTextContent);
878     nsresult LookupPrefix(const nsAString *namespaceURI, nsAString *_retval);
879     nsresult IsDefaultNamespace(const nsAString *namespaceURI, bool *_retval);
880     nsresult LookupNamespaceURI(const nsAString *prefix, nsAString *_retval);
881     nsresult IsEqualNode(nsIDOMNode *arg, bool *_retval);
882     nsresult SetUserData(const nsAString *key, nsIVariant *data, nsIDOMUserDataHandler *handler, nsIVariant **_retval);
883     nsresult GetUserData(const nsAString *key, nsIVariant **_retval);
884     nsresult Contains(nsIDOMNode *aOther, bool *_retval);
885
886     nsresult GetMshtmlNode(nsISupports **aMshtmlNode);
887     nsresult SetMshtmlNode(nsISupports *aMshtmlNode);
888 }
889
890 [
891     object,
892     uuid(03da4bc9-1b9a-41dc-a1a4-32414d48d704),
893     local
894 ]
895 interface nsIDOMAttr : nsIDOMNode
896 {
897     nsresult GetName(nsAString *aName);
898     nsresult GetSpecified(bool *aSpecified);
899     nsresult GetValue(nsAString *aValue);
900     nsresult SetValue(const nsAString *aValue);
901     nsresult GetOwnerElement(nsIDOMElement **aOwnerElement);
902     nsresult GetIsId(bool *aIsId);
903 }
904
905 [
906     object,
907     uuid(b2f824c4-d9d3-499b-8d3b-45c8245497c6),
908     local
909 ]
910 interface nsIDOMClientRect : nsISupports
911 {
912     nsresult GetLeft(float *aLeft);
913     nsresult GetTop(float *aTop);
914     nsresult GetRight(float *aRight);
915     nsresult GetBottom(float *aBottom);
916     nsresult GetWidth(float *aWidth);
917     nsresult GetHeight(float *aHeight);
918 }
919
920 [
921     object,
922     uuid(69d44ce2-b544-49a8-bb5f-87804b971ee4),
923     local
924 ]
925 interface nsIDOMElement : nsIDOMNode
926 {
927     nsresult GetTagName(nsAString *aTagName);
928     nsresult GetClassList(nsIDOMDOMTokenList **aClassList);
929     nsresult GetAttribute(const nsAString *name, nsAString *_retval);
930     nsresult GetAttributeNS(const nsAString *namespaceURI, const nsAString *localName, nsAString *_retval);
931     nsresult SetAttribute(const nsAString *name, const nsAString *value);
932     nsresult SetAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName, const nsAString *value);
933     nsresult RemoveAttribute(const nsAString *name);
934     nsresult RemoveAttributeNS(const nsAString *namespaceURI, const nsAString *localName);
935     nsresult HasAttribute(const nsAString *name, bool *_retval);
936     nsresult HasAttributeNS(const nsAString *namespaceURI, const nsAString *localName, bool *_retval);
937     nsresult GetAttributeNode(const nsAString *name, nsIDOMAttr **_retval);
938     nsresult SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
939     nsresult RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval);
940     nsresult GetAttributeNodeNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMAttr **_retval);
941     nsresult SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
942     nsresult GetElementsByTagName(const nsAString *name, nsIDOMNodeList **_retval);
943     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMNodeList **_retval);
944     nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval);
945     nsresult GetChildElements(nsIDOMNodeList **aChildren);
946     nsresult GetFirstElementChild(nsIDOMElement **aFirstElementChild);
947     nsresult GetLastElementChild(nsIDOMElement **aLastElementChild);
948     nsresult GetPreviousElementSibling(nsIDOMElement **aPreviousElementSibling);
949     nsresult GetNextElementSibling(nsIDOMElement **aNextElementSibling);
950     nsresult GetChildElementCount(uint32_t *aChildElementCount);
951     nsresult GetOnmouseenter(JSContext *cx, jsval *aOnmouseenter);
952     nsresult SetOnmouseenter(JSContext *cx, const jsval *aOnmouseenter);
953     nsresult GetOnmouseleave(JSContext *cx, jsval *aOnmouseleave);
954     nsresult SetOnmouseleave(JSContext *cx, const jsval *aOnmouseleave);
955     nsresult GetClientRects(nsIDOMClientRectList **_retval);
956     nsresult GetBoundingClientRect(nsIDOMClientRect **_retval);
957     nsresult GetScrollTop(int32_t *aScrollTop);
958     nsresult SetScrollTop(int32_t aScrollTop);
959     nsresult GetScrollLeft(int32_t *aScrollLeft);
960     nsresult SetScrollLeft(int32_t aScrollLeft);
961     nsresult GetScrollWidth(int32_t *aScrollWidth);
962     nsresult GetScrollHeight(int32_t *aScrollHeight);
963     nsresult GetClientTop(int32_t *aClientTop);
964     nsresult GetClientLeft(int32_t *aClientLeft);
965     nsresult GetClientWidth(int32_t *aClientWidth);
966     nsresult GetClientHeight(int32_t *aClientHeight);
967     nsresult GetScrollLeftMax(int32_t *aScrollLeftMax);
968     nsresult GetScrollTopMax(int32_t *aScrollTopMax);
969     nsresult MozMatchesSelector(const nsAString *selector, bool *_retval);
970     nsresult SetCapture(bool retargetToElement);
971     nsresult ReleaseCapture();
972     nsresult MozRequestFullScreen();
973     nsresult MozRequestPointerLock();
974 }
975
976 [
977     object,
978     uuid(99715845-95fc-4a56-aa53-214b65c26e22),
979     local
980 ]
981 interface nsIDOMElementCSSInlineStyle : nsISupports
982 {
983     nsresult GetStyle(nsIDOMCSSStyleDeclaration **aStyle);
984 }
985
986 cpp_quote("#undef GetClassName")
987
988 [
989     object,
990     uuid(9a677a5b-e6f7-4e2e-9ef9-22c2ac9967b3),
991     local
992 ]
993 interface nsIDOMHTMLElement : nsIDOMElement
994 {
995     nsresult GetId(nsAString *aId);
996     nsresult SetId(const nsAString *aId);
997     nsresult GetTitle(nsAString *aTitle);
998     nsresult SetTitle(const nsAString *aTitle);
999     nsresult GetLang(nsAString *aLang);
1000     nsresult SetLang(const nsAString *aLang);
1001     nsresult GetDir(nsAString *aDir);
1002     nsresult SetDir(const nsAString *aDir);
1003     nsresult GetClassName(nsAString *aClassName);
1004     nsresult SetClassName(const nsAString *aClassName);
1005     nsresult GetDataset(nsIDOMDOMStringMap **aDataset);
1006     nsresult GetItemScope(bool *aItemScope);
1007     nsresult SetItemScope(bool aItemScope);
1008     nsresult GetItemType(nsIVariant **aItemType);
1009     nsresult SetItemType(nsIVariant *aItemType);
1010     nsresult GetItemId(nsAString *aItemId);
1011     nsresult SetItemId(const nsAString *aItemId);
1012     nsresult GetProperties(nsIDOMHTMLPropertiesCollection **aProperties);
1013     nsresult GetItemValue(nsIVariant **aItemValue);
1014     nsresult SetItemValue(nsIVariant *aItemValue);
1015     nsresult GetItemProp(nsIVariant **aItemProp);
1016     nsresult SetItemProp(nsIVariant *aItemProp);
1017     nsresult GetItemRef(nsIVariant **aItemRef);
1018     nsresult SetItemRef(nsIVariant *aItemRef);
1019     nsresult GetHidden(bool *aHidden);
1020     nsresult SetHidden(bool aHidden);
1021     nsresult Click();
1022     nsresult GetTabIndex(int32_t *aTabIndex);
1023     nsresult SetTabIndex(int32_t aTabIndex);
1024     nsresult Focus();
1025     nsresult Blur();
1026     nsresult GetAccessKey(nsAString *aAccessKey);
1027     nsresult SetAccessKey(const nsAString *aAccessKey);
1028     nsresult GetAccessKeyLabel(nsAString *aAccessKeyLabel);
1029     nsresult GetDraggable(bool *aDraggable);
1030     nsresult SetDraggable(bool aDraggable);
1031     nsresult GetContentEditable(nsAString *aContentEditable);
1032     nsresult SetContentEditable(const nsAString *aContentEditable);
1033     nsresult GetIsContentEditable(bool *aIsContentEditable);
1034     nsresult GetContextMenu(nsIDOMHTMLMenuElement **aContextMenu);
1035     nsresult GetSpellcheck(bool *aSpellcheck);
1036     nsresult SetSpellcheck(bool aSpellcheck);
1037     nsresult GetInnerHTML(nsAString *aInnerHTML);
1038     nsresult SetInnerHTML(const nsAString *aInnerHTML);
1039     nsresult GetOuterHTML(nsAString *aInnerHTML);
1040     nsresult SetOuterHTML(const nsAString *aInnerHTML);
1041     nsresult InsertAdjacentHTML(const nsAString *position, const nsAString *text);
1042     nsresult ScrollIntoView(bool top, uint8_t _argc);
1043     nsresult GetOffsetParent(nsIDOMElement * *aOffsetParent);
1044     nsresult GetOffsetTop(int32_t *aOffsetTop);
1045     nsresult GetOffsetLeft(int32_t *aOffsetLeft);
1046     nsresult GetOffsetWidth(int32_t *aOffsetWidth);
1047     nsresult GetOffsetHeight(int32_t *aOffsetHeight);
1048 }
1049
1050 [
1051     object,
1052     uuid(8b38545f-7fa5-47d5-a902-c8ea8e78fb0d),
1053     local
1054 ]
1055 interface nsIDOMHTMLHeadElement : nsIDOMHTMLElement
1056 {
1057 }
1058
1059
1060 [
1061     object,
1062     uuid(db690d8f-3bca-4198-be64-78adb7f38bf8),
1063     local
1064 ]
1065 interface nsIDOMHTMLCollection : nsISupports
1066 {
1067     nsresult GetLength(uint32_t *aLength);
1068     nsresult Item(uint32_t index, nsIDOMNode **_retval);
1069     nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
1070     /* Followed by semi-internal API that we don't want to use */
1071 }
1072
1073 [
1074     object,
1075     uuid(cb75c251-afc7-444f-b2d6-b9635555f3ed),
1076     local
1077 ]
1078 interface nsIDOMCharacterData : nsIDOMNode
1079 {
1080     nsresult GetData(nsAString *aData);
1081     nsresult SetData(const nsAString *aData);
1082     nsresult GetLength(uint32_t *aLength);
1083     nsresult SubstringData(uint32_t offset, uint32_t count, nsAString *_retval);
1084     nsresult AppendData(const nsAString *arg);
1085     nsresult InsertData(uint32_t offset, const nsAString *arg);
1086     nsresult DeleteData(uint32_t offset, uint32_t count);
1087     nsresult ReplaceData(uint32_t offset, uint32_t count, const nsAString *arg);
1088 }
1089
1090 [
1091     object,
1092     uuid(437ed60c-febd-4bd0-892f-cf358adc3c96),
1093     local
1094 ]
1095 interface nsIDOMText : nsIDOMCharacterData
1096 {
1097     nsresult SplitText(uint32_t offset, nsIDOMText **_retval);
1098     nsresult GetWholeText(nsAString *aWholeText);
1099 }
1100
1101 [
1102     object,
1103     uuid(cea49a35-dac9-4c4d-9830-4660abb3b6bc),
1104     local
1105 ]
1106 interface nsIDOMComment : nsIDOMCharacterData
1107 {
1108 }
1109
1110 [
1111     object,
1112     uuid(4a15eb0c-d5bc-4902-9d50-21b12cab47e7),
1113     local
1114 ]
1115 interface nsIDOMDocumentFragment : nsIDOMNode
1116 {
1117 }
1118
1119 [
1120     object,
1121     uuid(b7e90442-74d6-494e-af01-906d95926dec),
1122     local
1123 ]
1124 interface nsIDOMDocument : nsIDOMNode
1125 {
1126     nsresult GetDoctype(nsIDOMDocumentType **aDoctype);
1127     nsresult GetImplementation(nsIDOMDOMImplementation **aImplementation);
1128     nsresult GetDocumentElement(nsIDOMElement **aDocumentElement);
1129     nsresult CreateElement(const nsAString *tagName, nsIDOMElement **_retval);
1130     nsresult CreateDocumentFragment(nsIDOMDocumentFragment **_retval);
1131     nsresult CreateTextNode(const nsAString *data, nsIDOMText **_retval);
1132     nsresult CreateComment(const nsAString *data, nsIDOMComment **_retval);
1133     nsresult CreateCDATASection(const nsAString *data, nsIDOMCDATASection **_retval);
1134     nsresult CreateProcessingInstruction(const nsAString *target, const nsAString *data, nsIDOMProcessingInstruction **_retval);
1135     nsresult CreateAttribute(const nsAString *name, nsIDOMAttr **_retval);
1136     nsresult GetElementsByTagName(const nsAString *tagname, nsIDOMNodeList **_retval);
1137     nsresult ImportNode(nsIDOMNode *importedNode, bool deep, uint8_t _argc, nsIDOMNode **_retval);
1138     nsresult CreateElementNS(const nsAString *namespaceURI, const nsAString *qualifiedName, nsIDOMElement **_retval);
1139     nsresult CreateAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName, nsIDOMAttr **_retval);
1140     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMNodeList **_retval);
1141     nsresult GetElementById(const nsAString *elementId, nsIDOMElement **_retval);
1142     nsresult GetInputEncoding(nsAString *aInputEncoding);
1143     nsresult GetDocumentURI(nsAString *aDocumentURI);
1144     nsresult AdoptNode(nsIDOMNode *source, nsIDOMNode **_retval);
1145     nsresult CreateRange(nsIDOMRange **_retval);
1146     nsresult CreateNodeIterator(nsIDOMNode *root, uint32_t whatToShow, nsIDOMNodeFilter *filter, uint8_t _argc,
1147             nsIDOMNodeIterator **_retval);
1148     nsresult CreateTreeWalker(nsIDOMNode *root, uint32_t whatToShow, nsIDOMNodeFilter *filter, uint8_t _argc,
1149             nsIDOMTreeWalker **_retval);
1150     cpp_quote("#undef CreateEvent")
1151     nsresult CreateEvent(const nsAString *eventType, nsIDOMEvent **_retval);
1152     nsresult GetDefaultView(nsIDOMWindow **aDefaultView);
1153     nsresult GetCharacterSet(nsAString *aCharacterSet);
1154     nsresult GetDir(nsAString *aDir);
1155     nsresult SetDir(const nsAString *aDir);
1156     nsresult GetLocation(nsIDOMLocation **aLocation);
1157     nsresult GetTitle(nsAString *aTitle);
1158     nsresult SetTitle(const nsAString *aTitle);
1159     nsresult GetReadyState(nsAString *aReadyState);
1160     nsresult GetLastModified(nsAString *aLastModified);
1161     nsresult GetReferrer(nsAString *aReferrer);
1162     nsresult HasFocus(bool *_retval);
1163     nsresult GetActiveElement(nsIDOMElement **aActiveElement);
1164     nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval);
1165     nsresult GetStyleSheets(nsIDOMStyleSheetList **aStyleSheets);
1166     nsresult GetPreferredStyleSheetSet(nsAString *aPreferredStyleSheetSet);
1167     nsresult GetSelectedStyleSheetSet(nsAString *aSelectedStyleSheetSet);
1168     nsresult SetSelectedStyleSheetSet(const nsAString *aSelectedStyleSheetSet);
1169     nsresult GetLastStyleSheetSet(nsAString *aLastStyleSheetSet);
1170     nsresult GetStyleSheetSets(nsIDOMDOMStringList **aStyleSheetSets);
1171     nsresult EnableStyleSheetsForSet(const nsAString *name);
1172     nsresult ElementFromPoint(float x, float y, nsIDOMElement **_retval);
1173     nsresult GetContentType(nsAString *aContentType);
1174     nsresult GetMozSyntheticDocument(bool *aMozSyntheticDocument);
1175     nsresult GetCurrentScript(nsIDOMElement **aCurrentScript);
1176     nsresult ReleaseCapture();
1177     nsresult MozSetImageElement(const nsAString *aImageElementId, nsIDOMElement *aImageElement);
1178     nsresult GetMozFullScreenElement(nsIDOMElement **aMozFullScreenElement);
1179     nsresult MozCancelFullScreen();
1180     nsresult GetMozFullScreen(bool *aMozFullScreen);
1181     nsresult GetMozFullScreenEnabled(bool *aMozFullScreenEnabled);
1182     nsresult GetMozPointerLockElement(nsIDOMElement **aMozPointerLockElement);
1183     nsresult MozExitPointerLock();
1184     nsresult GetOnreadystatechange(JSContext* cx, jsval aOnreadystatechange);
1185     nsresult SetOnreadystatechange(JSContext* cx, const jsval *aOnreadystatechange);
1186     nsresult GetOnmouseenter(JSContext* cx, jsval *aOnmouseenter);
1187     nsresult SetOnmouseenter(JSContext* cx, const jsval *aOnmouseenter);
1188     nsresult GetOnmouseleave(JSContext* cx, jsval *aOnmouseleave) = 0;
1189     nsresult SetOnmouseleave(JSContext* cx, const jsval *aOnmouseleave);
1190     nsresult GetHidden(bool *aHidden);
1191     nsresult GetMozHidden(bool *aMozHidden);
1192     nsresult GetVisibilityState(nsAString *aVisibilityState);
1193     nsresult GetMozVisibilityState(nsAString *aMozVisibilityState);
1194 }
1195
1196 [
1197     object,
1198     uuid(ecae54c6-2ab9-4167-b0ef-61960aadbb68),
1199     local
1200 ]
1201 interface nsIDOMHTMLDocument : nsIDOMDocument
1202 {
1203     nsresult GetURL(nsAString *aURL);
1204     nsresult GetDomain(nsAString *aDomain);
1205     nsresult SetDomain(const nsAString *aDomain);
1206     nsresult GetCookie(nsAString *aCookie);
1207     nsresult SetCookie(const nsAString *aCookie);
1208     nsresult GetCompatMode(nsAString *aCompatMode);
1209     nsresult GetHead(nsIDOMHTMLHeadElement **aHead);
1210     nsresult GetBody(nsIDOMHTMLElement **aBody);
1211     nsresult SetBody(nsIDOMHTMLElement *aBody);
1212     nsresult GetImages(nsIDOMHTMLCollection **aImages);
1213     nsresult GetEmbeds(nsIDOMHTMLCollection **aEmbeds);
1214     nsresult GetPlugins(nsIDOMHTMLCollection **aPlugins);
1215     nsresult GetLinks(nsIDOMHTMLCollection **aLinks);
1216     nsresult GetForms(nsIDOMHTMLCollection **aForms);
1217     nsresult GetScripts(nsIDOMHTMLCollection **aScripts);
1218     nsresult GetElementsByName(const nsAString *elementName, nsIDOMNodeList **_retval);
1219     nsresult GetItems(const nsAString *types, nsIDOMNodeList **_retval);
1220     nsresult Open(const nsAString *aContentTypeOrUrl, const nsAString *aReplaceOrName, const nsAString *aFeatures,
1221             JSContext *cx, uint8_t _argc, nsISupports **_retval);
1222     nsresult Close();
1223     nsresult Write(const nsAString *text, JSContext *cx);
1224     nsresult Writeln(const nsAString *text, JSContext *cx);
1225     nsresult GetDesignMode(nsAString *aDesignMode);
1226     nsresult SetDesignMode(const nsAString *aDesignMode);
1227     nsresult ExecCommand(const nsAString *commandID, bool doShowUI, const nsAString *value, bool *_retval);
1228     nsresult QueryCommandEnabled(const nsAString *commandID, bool *_retval);
1229     nsresult QueryCommandIndeterm(const nsAString *commandID, bool *_retval);
1230     nsresult QueryCommandState(const nsAString *commandID, bool *_retval);
1231     nsresult QueryCommandSupported(const nsAString *commandID, bool *_retval);
1232     nsresult QueryCommandValue(const nsAString *commandID, nsAString *_retval);
1233     nsresult GetFgColor(nsAString *aFgColor);
1234     nsresult SetFgColor(const nsAString *aFgColor);
1235     nsresult GetBgColor(nsAString *aBgColor);
1236     nsresult SetBgColor(const nsAString *aBgColor);
1237     nsresult GetLinkColor(nsAString *aLinkColor);
1238     nsresult SetLinkColor(const nsAString *aLinkColor);
1239     nsresult GetVlinkColor(nsAString *aVlinkColor);
1240     nsresult SetVlinkColor(const nsAString *aVlinkColor);
1241     nsresult GetAlinkColor(nsAString *aAlinkColor);
1242     nsresult SetAlinkColor(const nsAString *aAlinkColor);
1243     nsresult GetAnchors(nsIDOMHTMLCollection **aAnchors);
1244     nsresult GetApplets(nsIDOMHTMLCollection **aApplets);
1245     nsresult Clear();
1246     nsresult GetSelection(nsISelection **_retval);
1247     nsresult CaptureEvents(int32_t eventFlags);
1248     nsresult ReleaseEvents(int32_t eventFlags);
1249     nsresult RouteEvent(nsIDOMEvent *evt);
1250 }
1251
1252 [
1253     object,
1254     uuid(1f94055c-42e7-4a30-96a1-6a804f1c2d1e),
1255     local
1256 ]
1257 interface nsIDOMRange : nsISupports
1258 {
1259     enum {
1260         NS_START_TO_START,
1261         NS_START_TO_END,
1262         NS_END_TO_END,
1263         NS_END_TO_START
1264     };
1265
1266     nsresult GetStartContainer(nsIDOMNode **aStartContainer);
1267     nsresult GetStartOffset(int32_t *aStartOffset);
1268     nsresult GetEndContainer(nsIDOMNode **aEndContainer);
1269     nsresult GetEndOffset(int32_t *aEndOffset);
1270     nsresult GetCollapsed(bool *aCollapsed);
1271     nsresult GetCommonAncestorContainer(nsIDOMNode **aCommonAncestorContainer);
1272     nsresult SetStart(nsIDOMNode *refNode, int32_t offset);
1273     nsresult SetEnd(nsIDOMNode *refNode, int32_t offset);
1274     nsresult SetStartBefore(nsIDOMNode *refNode);
1275     nsresult SetStartAfter(nsIDOMNode *refNode);
1276     nsresult SetEndBefore(nsIDOMNode *refNode);
1277     nsresult SetEndAfter(nsIDOMNode *refNode);
1278     nsresult Collapse(bool toStart);
1279     nsresult SelectNode(nsIDOMNode *refNode);
1280     nsresult SelectNodeContents(nsIDOMNode *refNode);
1281     nsresult CompareBoundaryPoints(uint16_t how, nsIDOMRange *sourceRange, int16_t *_retval);
1282     nsresult DeleteContents();
1283     nsresult ExtractContents(nsIDOMDocumentFragment **_retval);
1284     nsresult CloneContents(nsIDOMDocumentFragment **_retval);
1285     nsresult InsertNode(nsIDOMNode *newNode);
1286     nsresult SurroundContents(nsIDOMNode *newParent);
1287     nsresult CloneRange(nsIDOMRange **_retval);
1288     nsresult ToString(nsAString *_retval);
1289     nsresult Detach();
1290     nsresult CreateContextualFragment([in] const nsAString *fragment, [out] nsIDOMDocumentFragment **_retval);
1291     nsresult IsPointInRange([in] nsIDOMNode *parent, [in] int32_t offset, [out] bool *_retval);
1292     nsresult ComparePoint([in] nsIDOMNode *parent, [in] int32_t offset, [out] int16_t *_retval);
1293     nsresult IntersectsNode(nsIDOMNode *node, bool *_retval);
1294     nsresult GetClientRects(nsIDOMClientRectList **_retval);
1295     nsresult GetBoundingClientRect(nsIDOMClientRect **_retval);
1296 }
1297
1298 [
1299     object,
1300     uuid(12cf5a4d-fffb-4f2f-9cec-c65195661d76),
1301     local
1302 ]
1303 interface nsISelection : nsISupports
1304 {
1305     nsresult GetAnchorNode(nsIDOMNode **aAnchorNode);
1306     nsresult GetAnchorOffset(int32_t *aAnchorOffset);
1307     nsresult GetFocusNode(nsIDOMNode **aFocusNode);
1308     nsresult GetFocusOffset(int32_t *aFocusOffset);
1309     nsresult GetIsCollapsed(bool *aIsCollapsed);
1310     bool /* don't use */ Collapsed();
1311     nsresult GetRangeCount(int32_t *aRangeCount);
1312     nsresult GetRangeAt(int32_t index, nsIDOMRange **_retval);
1313     nsresult Collapse(nsIDOMNode *parentNode, int32_t offset);
1314     nsresult CollapseNative(nsINode *parentNode, int32_t offset);
1315     nsresult Extend(nsIDOMNode *parentNode, int32_t offset);
1316     nsresult ExtendNative(nsINode *parentNode, int32_t offset);
1317     nsresult CollapseToStart();
1318     nsresult CollapseToEnd();
1319     nsresult ContainsNode(nsIDOMNode *node, bool entirelyContained, bool *_retval);
1320     nsresult SelectAllChildren(nsIDOMNode *parentNode);
1321     nsresult AddRange(nsIDOMRange *range);
1322     nsresult RemoveRange(nsIDOMRange *range);
1323     nsresult RemoveAllRanges();
1324     nsresult DeleteFromDocument();
1325     nsresult SelectionLanguageChange(bool langRTL);
1326     nsresult ToString(nsAString *_retval);
1327     nsresult Modify(const nsAString *alter, const nsAString *direction, const nsAString *granularity);
1328 }
1329
1330 [
1331     object,
1332     uuid(a6cf906f-15b3-11d2-932e-00805f8add32),
1333     local
1334 ]
1335 interface nsIDOMWindowCollection : nsISupports
1336 {
1337     nsresult GetLength(uint32_t *aLength);
1338     nsresult Item(uint32_t index, nsIDOMWindow **_retval);
1339     nsresult NamedItem(const nsAString *name, nsIDOMWindow **_retval);
1340 }
1341
1342 [
1343     object,
1344     uuid(7afa38e6-45a1-4f0b-ae84-997669d14059),
1345     local
1346 ]
1347 interface nsIDOMWindow : nsISupports
1348 {
1349     nsresult GetWindow(nsIDOMWindow **aWindow);
1350     nsresult GetSelf(nsIDOMWindow **aSelf);
1351     nsresult GetDocument(nsIDOMDocument **aDocument);
1352     nsresult GetName(nsAString *aName);
1353     nsresult SetName(const nsAString *aName);
1354     nsresult GetLocation(nsIDOMLocation **aLocation);
1355     nsresult GetHistory(nsIDOMHistory **aHistory);
1356     nsresult GetLocationbar(nsIDOMBarProp **aLocationbar);
1357     nsresult GetMenubar(nsIDOMBarProp **aMenubar);
1358     nsresult GetPersonalbar(nsIDOMBarProp **aPersonalbar);
1359     nsresult GetScrollbars(nsIDOMBarProp **aScrollbars);
1360     nsresult GetStatusbar(nsIDOMBarProp **aStatusbar);
1361     nsresult GetToolbar(nsIDOMBarProp **aToolbar);
1362     nsresult GetStatus(nsAString *aStatus);
1363     nsresult SetStatus(const nsAString *aStatus);
1364     nsresult Close();
1365     nsresult Stop();
1366     nsresult Focus();
1367     nsresult Blur();
1368     nsresult GetLength(uint32_t *aLength);
1369     nsresult GetScriptableTop(nsIDOMWindow **aTop);
1370     nsresult GetRealTop(nsIDOMWindow **aTop);
1371     nsresult GetScriptableParent(nsIDOMWindow **aParent);
1372     nsresult GetRealParent(nsIDOMWindow **aParent);
1373     nsresult GetOpener(nsIDOMWindow **aOpener);
1374     nsresult SetOpener(nsIDOMWindow *aOpener);
1375     nsresult GetScriptableFrameElement(nsIDOMElement **aFrameElement);
1376     nsresult GetRealFrameElement(nsIDOMElement **aFrameElement);
1377     nsresult GetNavigator(nsIDOMNavigator **aNavigator);
1378     nsresult GetApplicationCache(nsIDOMOfflineResourceList **aApplicationCache);
1379     nsresult Alert(const nsAString *text);
1380     nsresult Confirm(const nsAString *text, bool *_retval);
1381     nsresult Prompt(const nsAString *aMessage, const nsAString *aInitial, nsAString *_retval);
1382     nsresult Print();
1383     nsresult ShowModalDialog(const nsAString *aURI, nsIVariant *aArgs, const nsAString *aOptions, nsIVariant **_retval);
1384     nsresult PostMessageMoz(const long /*jsval*/ *message, const nsAString *targetOrigin, JSContext *cx);
1385     nsresult Atob(const nsAString *aAsciiString, nsAString *_retval);
1386     nsresult Btoa(const nsAString *aBase64Data, nsAString *_retval);
1387     nsresult GetSessionStorage(nsIDOMStorage **aSessionStorage);
1388     nsresult GetLocalStorage(nsIDOMStorage **aLocalStorage);
1389     nsresult GetSelection(nsISelection **_retval);
1390     nsresult MatchMedia(const nsAString *media_query_list, nsIDOMMediaQueryList **_retval);
1391     nsresult GetScreen(nsIDOMScreen **aScreen);
1392     nsresult GetInnerWidth(int32_t *aInnerWidth);
1393     nsresult SetInnerWidth(int32_t aInnerWidth);
1394     nsresult GetInnerHeight(int32_t *aInnerHeight);
1395     nsresult SetInnerHeight(int32_t aInnerHeight);
1396     nsresult GetScrollX(int32_t *aScrollX);
1397     nsresult GetPageXOffset(int32_t *aPageXOffset);
1398     nsresult GetScrollY(int32_t *aScrollY);
1399     nsresult GetPageYOffset(int32_t *aPageYOffset);
1400     nsresult Scroll(int32_t xScroll, int32_t yScroll);
1401     nsresult ScrollTo(int32_t xScroll, int32_t yScroll);
1402     nsresult ScrollBy(int32_t xScrollDif, int32_t yScrollDif);
1403     nsresult GetScreenX(int32_t *aScreenX);
1404     nsresult SetScreenX(int32_t aScreenX);
1405     nsresult GetScreenY(int32_t *aScreenY);
1406     nsresult SetScreenY(int32_t aScreenY);
1407     nsresult GetOuterWidth(int32_t *aOuterWidth);
1408     nsresult SetOuterWidth(int32_t aOuterWidth);
1409     nsresult GetOuterHeight(int32_t *aOuterHeight);
1410     nsresult SetOuterHeight(int32_t aOuterHeight);
1411     nsresult GetComputedStyle(nsIDOMElement *elt, const nsAString *pseudoElt, nsIDOMCSSStyleDeclaration **_retval);
1412     nsresult GetWindowRoot(nsIDOMEventTarget **aWindowRoot);
1413     nsresult GetFrames(nsIDOMWindowCollection **aFrames);
1414     nsresult GetTextZoom(float *aTextZoom);
1415     nsresult SetTextZoom(float aTextZoom);
1416     nsresult ScrollByLines(int32_t numLines);
1417     nsresult ScrollByPages(int32_t numPages);
1418     nsresult SizeToContent();
1419     nsresult GetContent(nsIDOMWindow **aContent);
1420     nsresult GetPrompter(nsIPrompt **aPrompter);
1421     nsresult GetClosed(bool *aClosed);
1422     nsresult GetCrypto(nsIDOMCrypto **aCrypto);
1423     nsresult GetPkcs11(nsIDOMPkcs11 **aPkcs11);
1424     nsresult GetControllers(nsIControllers **aControllers);
1425     nsresult GetDefaultStatus(nsAString *aDefaultStatus);
1426     nsresult SetDefaultStatus(const nsAString *aDefaultStatus);
1427     nsresult GetMozInnerScreenX(float *aMozInnerScreenX);
1428     nsresult GetMozInnerScreenY(float *aMozInnerScreenY);
1429     nsresult GetDevicePixelRatio(float *aDevicePixelRatio);
1430     nsresult GetScrollMaxX(int32_t *aScrollMaxX);
1431     nsresult GetScrollMaxY(int32_t *aScrollMaxY);
1432     nsresult GetFullScreen(bool *aFullScreen);
1433     nsresult SetFullScreen(bool aFullScreen);
1434     nsresult Back();
1435     nsresult Forward();
1436     nsresult Home();
1437     nsresult MoveTo(int32_t xPos, int32_t yPos);
1438     nsresult MoveBy(int32_t xDif, int32_t yDif);
1439     nsresult ResizeTo(int32_t width, int32_t height);
1440     nsresult ResizeBy(int32_t widthDif, int32_t heightDif);
1441     nsresult Open(const nsAString *url, const nsAString *name, const nsAString *options, nsIDOMWindow **_retval);
1442     nsresult OpenDialog(const nsAString *url, const nsAString *name, const nsAString *options, nsISupports *aExtraArgument,
1443             nsIDOMWindow **_retval);
1444     nsresult UpdateCommands(const nsAString *action);
1445     nsresult Find(const nsAString *str, bool caseSensitive, bool backwards, bool wrapAround, bool wholeWord,
1446             bool searchInFrames, bool showDialog, bool *_retval);
1447     nsresult GetMozPaintCount(uint64_t *aMozPaintCount);
1448     nsresult MozRequestAnimationFrame(nsIFrameRequestCallback *aCallback, int32_t *_retval);
1449     nsresult MozCancelAnimationFrame(int32_t aHandle);
1450     nsresult MozCancelRequestAnimationFrame(int32_t aHandle);
1451     nsresult GetMozAnimationStartTime(int64_t *aMozAnimationStartTime);
1452     nsresult GetURL(nsIDOMMozURLProperty **aURL);
1453     nsresult GetOnafterprint(JSContext *cx, jsval *aOnafterprint);
1454     nsresult SetOnafterprint(JSContext *cx, const jsval *aOnafterprint);
1455     nsresult GetOnbeforeprint(JSContext *cx, jsval *aOnbeforeprint);
1456     nsresult SetOnbeforeprint(JSContext *cx, const jsval *aOnbeforeprint);
1457     nsresult GetOnbeforeunload(JSContext *cx, jsval *aOnbeforeunload);
1458     nsresult SetOnbeforeunload(JSContext *cx, const jsval *aOnbeforeunload);
1459     nsresult GetOnhashchange(JSContext *cx, jsval *aOnhashchange);
1460     nsresult SetOnhashchange(JSContext *cx, const jsval *aOnhashchange);
1461     nsresult GetOnmessage(JSContext *cx, jsval *aOnmessage);
1462     nsresult SetOnmessage(JSContext *cx, const jsval *aOnmessage);
1463     nsresult GetOnoffline(JSContext *cx, jsval *aOnoffline);
1464     nsresult SetOnoffline(JSContext *cx, const jsval *aOnoffline);
1465     nsresult GetOnonline(JSContext *cx, jsval *aOnonline);
1466     nsresult SetOnonline(JSContext *cx, const jsval *aOnonline);
1467     nsresult GetOnpopstate(JSContext *cx, jsval *aOnpopstate);
1468     nsresult SetOnpopstate(JSContext *cx, const jsval *aOnpopstate);
1469     nsresult GetOnpagehide(JSContext *cx, jsval *aOnpagehide);
1470     nsresult SetOnpagehide(JSContext *cx, const jsval *aOnpagehide);
1471     nsresult GetOnpageshow(JSContext *cx, jsval *aOnpageshow);
1472     nsresult SetOnpageshow(JSContext *cx, const jsval *aOnpageshow);
1473     nsresult GetOnresize(JSContext *cx, jsval *aOnresize);
1474     nsresult SetOnresize(JSContext *cx, const jsval *aOnresize);
1475     nsresult GetOnunload(JSContext *cx, jsval *aOnunload);
1476     nsresult SetOnunload(JSContext *cx, const jsval *aOnunload);
1477     nsresult GetOndevicemotion(JSContext *cx, jsval *aOndevicemotion);
1478     nsresult SetOndevicemotion(JSContext *cx, const jsval *aOndevicemotion);
1479     nsresult GetOndeviceorientation(JSContext *cx, jsval *aOndeviceorientation);
1480     nsresult SetOndeviceorientation(JSContext *cx, const jsval *aOndeviceorientation);
1481     nsresult GetOndeviceproximity(JSContext* cx, jsval *aOndeviceproximity);
1482     nsresult SetOndeviceproximity(JSContext* cx, const jsval *aOndeviceproximity);
1483     nsresult GetOnuserproximity(JSContext* cx, jsval *aOndeviceproximity);
1484     nsresult SetOnuserproximity(JSContext* cx, const jsval *aOndeviceproximity);
1485     nsresult GetOndevicelight(JSContext* cx, jsval *aOndevicelight);
1486     nsresult SetOndevicelight(JSContext* cx, const jsval *aOndevicelight);
1487     nsresult GetOnmouseenter(JSContext* cx, jsval *aOnmouseenter);
1488     nsresult SetOnmouseenter(JSContext* cx, const jsval *aOnmouseenter);
1489     nsresult GetOnmouseleave(JSContext* cx, jsval *aOnmouseleave);
1490     nsresult SetOnmouseleave(JSContext* cx, const jsval *aOnmouseleave);
1491 }
1492
1493 [
1494     object,
1495     uuid(d8f00c8b-d317-4df2-a9bf-4a1e6f19f945),
1496     local
1497 ]
1498 interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
1499 {
1500     nsresult GetALink(nsAString *aALink);
1501     nsresult SetALink(const nsAString *aALink);
1502     nsresult GetBackground(nsAString *aBackground);
1503     nsresult SetBackground(const nsAString *aBackground);
1504     nsresult GetBgColor(nsAString *aBgColor);
1505     nsresult SetBgColor(const nsAString *aBgColor);
1506     nsresult GetLink(nsAString *aLink);
1507     nsresult SetLink(const nsAString *aLink);
1508     nsresult GetText(nsAString *aText);
1509     nsresult SetText(const nsAString *aText);
1510     nsresult GetVLink(nsAString *aVLink);
1511     nsresult SetVLink(const nsAString *aVLink);
1512     nsresult GetOnafterprint(JSContext *cx, jsval *aOnafterprint);
1513     nsresult SetOnafterprint(JSContext *cx, const jsval *aOnafterprint);
1514     nsresult GetOnbeforeprint(JSContext *cx, jsval *aOnbeforeprint);
1515     nsresult SetOnbeforeprint(JSContext *cx, const jsval *aOnbeforeprint);
1516     nsresult GetOnbeforeunload(JSContext *cx, jsval *aOnbeforeunload);
1517     nsresult SetOnbeforeunload(JSContext *cx, const jsval *aOnbeforeunload);
1518     nsresult GetOnhashchange(JSContext *cx, jsval *aOnhashchange);
1519     nsresult SetOnhashchange(JSContext *cx, const jsval *aOnhashchange);
1520     nsresult GetOnmessage(JSContext *cx, jsval *aOnmessage);
1521     nsresult SetOnmessage(JSContext *cx, const jsval *aOnmessage);
1522     nsresult GetOnoffline(JSContext *cx, jsval *aOnoffline);
1523     nsresult SetOnoffline(JSContext *cx, const jsval *aOnoffline);
1524     nsresult GetOnonline(JSContext *cx, jsval *aOnonline);
1525     nsresult SetOnonline(JSContext *cx, const jsval *aOnonline);
1526     nsresult GetOnpagehide(JSContext *cx, jsval *aOnpagehide);
1527     nsresult SetOnpagehide(JSContext *cx, const jsval *aOnpagehide);
1528     nsresult GetOnpageshow(JSContext *cx, jsval *aOnpageshow);
1529     nsresult SetOnpageshow(JSContext *cx, const jsval *aOnpageshow);
1530     nsresult GetOnpopstate(JSContext *cx, jsval *aOnpopstate);
1531     nsresult SetOnpopstate(JSContext *cx, const jsval *aOnpopstate);
1532     nsresult GetOnresize(JSContext *cx, jsval *aOnresize);
1533     nsresult SetOnresize(JSContext *cx, const jsval *aOnresize);
1534     nsresult GetOnunload(JSContext *cx, jsval *aOnunload);
1535     nsresult SetOnunload(JSContext *cx, const jsval *aOnunload);
1536 }
1537
1538 [
1539     object,
1540     uuid(59c0dc07-d784-410b-8b5e-c26baf7cb8a6),
1541     local
1542 ]
1543 interface nsIDOMHTMLFormElement : nsIDOMHTMLElement
1544 {
1545     nsresult GetAcceptCharset(nsAString *aAcceptCharset);
1546     nsresult SetAcceptCharset(const nsAString *aAcceptCharset);
1547     nsresult GetAction(nsAString *aAction);
1548     nsresult SetAction(const nsAString *aAction);
1549     nsresult GetAutocomplete(nsAString *aAutocomplete);
1550     nsresult SetAutocomplete(const nsAString *aAutocomplete);
1551     nsresult GetEnctype(nsAString *aEnctype);
1552     nsresult SetEnctype(const nsAString *aEnctype);
1553     nsresult GetEncoding(nsAString *aEncoding);
1554     nsresult SetEncoding(const nsAString *aEncoding);
1555     nsresult GetMethod(nsAString *aMethod);
1556     nsresult SetMethod(const nsAString *aMethod);
1557     nsresult GetName(nsAString *aName);
1558     nsresult SetName(const nsAString *aName);
1559     nsresult GetNoValidate(bool *aNoValidate);
1560     nsresult SetNoValidate(bool aNoValidate);
1561     nsresult GetTarget(nsAString *aTarget);
1562     nsresult SetTarget(const nsAString *aTarget);
1563     nsresult GetElements(nsIDOMHTMLCollection **aElements);
1564     nsresult GetLength(int32_t *aLength);
1565     nsresult Submit();
1566     nsresult Reset();
1567     nsresult CheckValidity(bool *_retval);
1568 }
1569
1570 [
1571     object,
1572     uuid(e59a4df5-0904-414d-9203-9af2790698ea),
1573     local
1574 ]
1575 interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
1576 {
1577     nsresult GetAccept(nsAString *aAccept);
1578     nsresult SetAccept(const nsAString *aAccept);
1579     nsresult GetAlt(nsAString *aAlt);
1580     nsresult SetAlt(const nsAString *aAlt);
1581     nsresult GetAutocomplete(nsAString *aAutocomplete);
1582     nsresult SetAutocomplete(const nsAString *aAutocomplete);
1583     nsresult GetAutofocus(bool *aAutofocus);
1584     nsresult SetAutofocus(bool aAutofocus);
1585     nsresult GetDefaultChecked(bool *aDefaultChecked);
1586     nsresult SetDefaultChecked(bool aDefaultChecked);
1587     nsresult GetChecked(bool *aChecked);
1588     nsresult SetChecked(bool aChecked);
1589     nsresult GetDisabled(bool *aDisabled);
1590     nsresult SetDisabled(bool aDisabled);
1591     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1592     nsresult GetFormAction(nsAString *aFormAction);
1593     nsresult SetFormAction(const nsAString *aFormAction);
1594     nsresult GetFormEnctype(nsAString *aFormEnctype);
1595     nsresult SetFormEnctype(const nsAString *aFormEnctype);
1596     nsresult GetFormMethod(nsAString *aFormMethod);
1597     nsresult SetFormMethod(const nsAString *aFormMethod);
1598     nsresult GetFormNoValidate(bool *aFormNoValidate);
1599     nsresult SetFormNoValidate(bool aFormNoValidate);
1600     nsresult GetFormTarget(nsAString *aFormTarget);
1601     nsresult SetFormTarget(const nsAString *aFormTarget);
1602     nsresult GetFiles(nsIDOMFileList **aFiles);
1603     nsresult GetHeight(uint32_t *aHeight);
1604     nsresult SetHeight(uint32_t aHeight);
1605     nsresult GetIndeterminate(bool *aIndeterminate);
1606     nsresult SetIndeterminate(bool aIndeterminate);
1607     nsresult GetList(nsIDOMHTMLElement **aList);
1608     nsresult GetMax(nsAString *aMax);
1609     nsresult SetMax(const nsAString *aMax);
1610     nsresult GetMaxLength(int32_t *aMaxLength);
1611     nsresult SetMaxLength(int32_t aMaxLength);
1612     nsresult GetMin(nsAString *aMin);
1613     nsresult SetMin(const nsAString *aMin);
1614     nsresult GetMultiple(bool *aMultiple);
1615     nsresult SetMultiple(bool aMultiple);
1616     nsresult GetName(nsAString *aName);
1617     nsresult SetName(const nsAString *aName);
1618     nsresult GetPattern(nsAString *aPattern);
1619     nsresult SetPattern(const nsAString *aPattern);
1620     nsresult GetPlaceholder(nsAString *aPlaceholder);
1621     nsresult SetPlaceholder(const nsAString *aPlaceholder);
1622     nsresult GetReadOnly(bool *aReadOnly);
1623     nsresult SetReadOnly(bool aReadOnly);
1624     nsresult GetRequired(bool *aRequired);
1625     nsresult SetRequired(bool aRequired);
1626     nsresult GetStep(nsAString *aStep);
1627     nsresult SetStep(const nsAString *aStep);
1628     nsresult GetAlign(nsAString *aAlign);
1629     nsresult SetAlign(const nsAString *aAlign);
1630     nsresult GetSize(uint32_t *aSize);
1631     nsresult SetSize(uint32_t aSize);
1632     nsresult GetWidth(uint32_t *aWidth);
1633     nsresult SetWidth(uint32_t aWidth);
1634     nsresult GetSrc(nsAString *aSrc);
1635     nsresult SetSrc(const nsAString *aSrc);
1636     nsresult GetType(nsAString *aType);
1637     nsresult SetType(const nsAString *aType);
1638     nsresult GetDefaultValue(nsAString *aDefaultValue);
1639     nsresult SetDefaultValue(const nsAString *aDefaultValue);
1640     nsresult GetValue(nsAString *aValue);
1641     nsresult SetValue(const nsAString *aValue);
1642     nsresult GetValueAsNumber(double *aValueAsNumber);
1643     nsresult SetValueAsNumber(double aValueAsNumber);
1644     nsresult StepDown(int32_t n, uint8_t _argc);
1645     nsresult StepUp(int32_t n, uint8_t _argc);
1646     nsresult GetWillValidate(bool *aWillValidate);
1647     nsresult GetValidity(nsIDOMValidityState **aValidity);
1648     nsresult GetValidationMessage(nsAString *aValidationMessage);
1649     nsresult CheckValidity(bool *_retval);
1650     nsresult SetCustomValidity(const nsAString *error);
1651     nsresult Select();
1652     nsresult GetSelectionStart(int32_t *aSelectionStart);
1653     nsresult SetSelectionStart(int32_t aSelectionStart);
1654     nsresult GetSelectionEnd(int32_t *aSelectionEnd);
1655     nsresult SetSelectionEnd(int32_t aSelectionEnd);
1656     nsresult SetSelectionRange(int32_t selectionStart, int32_t selectionEnd, const nsAString *direction);
1657     nsresult GetSelectionDirection(nsAString *aSelectionDirection);
1658     nsresult SetSelectionDirection(const nsAString *aSelectionDirection);
1659     nsresult GetUseMap(nsAString *aUseMap);
1660     nsresult SetUseMap(const nsAString *aUseMap);
1661     nsresult GetControllers(nsIControllers **aControllers);
1662     nsresult GetTextLength(int32_t *aTextLength);
1663     nsresult MozGetFileNameArray(uint32_t *aLength, PRUnichar ***aFileNames);
1664     nsresult MozSetFileNameArray(const PRUnichar **aFileNames, uint32_t aLength);
1665     nsresult MozIsTextField(bool aExcludePassword, bool *_retval);
1666 }
1667
1668 [
1669     object,
1670     uuid(68a5d794-39bf-4b00-aefe-754b9e8f7ec6),
1671     local
1672 ]
1673 interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement
1674 {
1675     nsresult GetDisabled(bool *aDisabled);
1676     nsresult SetDisabled(bool aDisabled);
1677     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1678     nsresult GetLabel(nsAString *aLabel);
1679     nsresult SetLabel(const nsAString *aLabel);
1680     nsresult GetDefaultSelected(bool *aDefaultSelected);
1681     nsresult SetDefaultSelected(bool aDefaultSelected);
1682     nsresult GetSelected(bool *aSelected);
1683     nsresult SetSelected(bool aSelected);
1684     nsresult GetValue(nsAString *aValue);
1685     nsresult SetValue(const nsAString *aValue);
1686     nsresult GetText(nsAString *aText);
1687     nsresult SetText(const nsAString *aText);
1688     nsresult GetIndex(int32_t *aIndex);
1689 }
1690
1691 [
1692     object,
1693     uuid(429b041b-06df-486c-9a3a-a1d901cc76a2),
1694     local
1695 ]
1696 interface nsIDOMHTMLOptionsCollection : nsISupports
1697 {
1698     typedef int nsWrapperCache;
1699
1700     nsresult GetLength(uint32_t *aLength);
1701     nsresult SetLength(uint32_t aLength);
1702     nsresult Item(uint32_t index, nsIDOMNode **_retval);
1703     nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
1704     nsISupports* __cdecl GetNamedItem(const nsAString *name, nsWrapperCache **cache);
1705     nsresult GetSelectedIndex(int32_t *aSelectedIndex);
1706     nsresult SetSelectedIndex(int32_t aSelectedIndex);
1707     nsresult SetOption(uint32_t index, nsIDOMHTMLOptionElement *option);
1708     nsresult GetSelect(nsIDOMHTMLSelectElement **aSelect);
1709     nsresult Add(nsIDOMHTMLOptionElement *option, nsIVariant *before);
1710     nsresult Remove(int32_t index);
1711 }
1712
1713 [
1714     object,
1715     uuid(e85194cf-56e6-44a6-92d9-0096c9d2536e),
1716     local
1717 ]
1718 interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
1719 {
1720     nsresult GetAutofocus(bool *aAutofocus);
1721     nsresult SetAutofocus(bool aAutofocus);
1722     nsresult GetDisabled(bool *aDisabled);
1723     nsresult SetDisabled(bool aDisabled);
1724     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1725     nsresult GetMultiple(bool *aMultiple);
1726     nsresult SetMultiple(bool aMultiple);
1727     nsresult GetName(nsAString *aName);
1728     nsresult SetName(const nsAString *aName);
1729     nsresult GetSize(uint32_t *aSize);
1730     nsresult SetSize(uint32_t aSize);
1731     nsresult GetType(nsAString *aType);
1732     nsresult GetOptions(nsIDOMHTMLOptionsCollection **aOptions);
1733     nsresult GetLength(uint32_t *aLength);
1734     nsresult SetLength(uint32_t aLength);
1735     nsresult Item(uint32_t index, nsIDOMNode **_retval);
1736     nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
1737     nsresult Add(nsIDOMHTMLElement *element, nsIVariant *before);
1738     nsresult Remove(int32_t index);
1739     nsresult GetSelectedIndex(int32_t *aSelectedIndex);
1740     nsresult SetSelectedIndex(int32_t aSelectedIndex);
1741     nsresult GetValue(nsAString *aValue);
1742     nsresult SetValue(const nsAString *aValue);
1743     nsresult GetWillValidate(bool *aWillValidate);
1744     nsresult GetValidity(nsIDOMValidityState **aValidity);
1745     nsresult GetValidationMessage(nsAString *aValidationMessage);
1746     nsresult CheckValidity(bool *_retval);
1747     nsresult SetCustomValidity(const nsAString *error);
1748     nsresult GetRequired(bool *aRequired);
1749     nsresult SetRequired(bool aRequired);
1750 }
1751
1752 [
1753     object,
1754     uuid(2a395065-2d92-48c1-ac00-643de9ca681b),
1755     local
1756 ]
1757 interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
1758 {
1759     nsresult GetAutofocus(bool *aAutofocus);
1760     nsresult SetAutofocus(bool aAutofocus);
1761     nsresult GetCols(uint32_t *aCols);
1762     nsresult SetCols(uint32_t aCols);
1763     nsresult GetDisabled(bool *aDisabled);
1764     nsresult SetDisabled(bool aDisabled);
1765     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1766     nsresult GetMaxLength(int32_t *aMaxLength);
1767     nsresult SetMaxLength(int32_t aMaxLength);
1768     nsresult GetName(nsAString *aName);
1769     nsresult SetName(const nsAString *aName);
1770     nsresult GetPlaceholder(nsAString *aPlaceholder);
1771     nsresult SetPlaceholder(const nsAString *aPlaceholder);
1772     nsresult GetReadOnly(bool *aReadOnly);
1773     nsresult SetReadOnly(bool aReadOnly);
1774     nsresult GetRequired(bool *aRequired);
1775     nsresult SetRequired(bool aRequired);
1776     nsresult GetRows(uint32_t *aRows);
1777     nsresult SetRows(uint32_t aRows);
1778     nsresult GetWrap(nsAString *aWrap);
1779     nsresult SetWrap(const nsAString *aWrap);
1780     nsresult GetType(nsAString *aType);
1781     nsresult GetDefaultValue(nsAString *aDefaultValue);
1782     nsresult SetDefaultValue(const nsAString *aDefaultValue);
1783     nsresult GetValue(nsAString *aValue);
1784     nsresult SetValue(const nsAString *aValue);
1785     nsresult GetTextLength(int32_t *aTextLength);
1786     nsresult GetWillValidate(bool *aWillValidate);
1787     nsresult GetValidity(nsIDOMValidityState **aValidity);
1788     nsresult GetValidationMessage(nsAString *aValidationMessage);
1789     nsresult CheckValidity(bool *_retval);
1790     nsresult SetCustomValidity(const nsAString *error);
1791     nsresult Select();
1792     nsresult GetSelectionStart(int32_t *aSelectionStart);
1793     nsresult SetSelectionStart(int32_t aSelectionStart);
1794     nsresult GetSelectionEnd(int32_t *aSelectionEnd);
1795     nsresult SetSelectionEnd(int32_t aSelectionEnd);
1796     nsresult SetSelectionRange(int32_t selectionStart, int32_t selectionEnd, const nsAString *direction);
1797     nsresult GetSelectionDirection(nsAString *aSelectionDirection);
1798     nsresult SetSelectionDirection(const nsAString *aSelectionDirection);
1799     nsresult GetControllers(nsIControllers **aControllers);
1800 }
1801
1802 [
1803     object,
1804     uuid(e2f548f6-9955-4820-a9e6-3a9fd43c7111),
1805     local
1806 ]
1807 interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement
1808 {
1809     nsresult GetSrc(nsAString *aSrc);
1810     nsresult SetSrc(const nsAString *aSrc);
1811     nsresult GetAsync(bool *aAsync);
1812     nsresult SetAsync(bool aAsync);
1813     nsresult GetDefer(bool *aDefer);
1814     nsresult SetDefer(bool aDefer);
1815     nsresult GetType(nsAString *aType);
1816     nsresult SetType(const nsAString *aType);
1817     nsresult GetCharset(nsAString *aCharset);
1818     nsresult SetCharset(const nsAString *aCharset);
1819     nsresult GetText(nsAString *aText);
1820     nsresult SetText(const nsAString *aText);
1821     nsresult GetHtmlFor(nsAString *aHtmlFor);
1822     nsresult SetHtmlFor(const nsAString *aHtmlFor);
1823     nsresult GetEvent(nsAString *aEvent);
1824     nsresult SetEvent(const nsAString *aEvent);
1825     nsresult GetCrossOrigin(nsAString *aCrossOrigin);
1826     nsresult SetCrossOrigin(const nsAString *aCrossOrigin);
1827 }
1828
1829 [
1830     object,
1831     uuid(76cf0381-19fd-442d-bb18-c794fd8b5c25),
1832     local
1833 ]
1834 interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
1835 {
1836     nsresult GetAlt(nsAString *aAlt);
1837     nsresult SetAlt(const nsAString *aAlt);
1838     nsresult GetSrc(nsAString *aSrc);
1839     nsresult SetSrc(const nsAString *aSrc);
1840     nsresult GetCrossOrigin(nsAString *aCrossOrigin);
1841     nsresult SetCrossOrigin(const nsAString *aCrossOrigin);
1842     nsresult GetUseMap(nsAString *aUseMap);
1843     nsresult SetUseMap(const nsAString *aUseMap);
1844     nsresult GetIsMap(bool *aIsMap);
1845     nsresult SetIsMap(bool aIsMap);
1846     nsresult GetWidth(uint32_t *aWidth);
1847     nsresult SetWidth(uint32_t aWidth);
1848     nsresult GetHeight(uint32_t *aHeight);
1849     nsresult SetHeight(uint32_t aHeight);
1850     nsresult GetNaturalWidth(uint32_t *aNaturalWidth);
1851     nsresult GetNaturalHeight(uint32_t *aNaturalHeight);
1852     nsresult GetComplete(bool *aComplete);
1853     nsresult GetName(nsAString *aName);
1854     nsresult SetName(const nsAString *aName);
1855     nsresult GetAlign(nsAString *aAlign);
1856     nsresult SetAlign(const nsAString *aAlign);
1857     nsresult GetBorder(nsAString *aBorder);
1858     nsresult SetBorder(const nsAString *aBorder);
1859     nsresult GetHspace(int32_t *aHspace);
1860     nsresult SetHspace(int32_t aHspace);
1861     nsresult GetLongDesc(nsAString *aLongDesc);
1862     nsresult SetLongDesc(const nsAString *aLongDesc);
1863     nsresult GetVspace(int32_t *aVspace);
1864     nsresult SetVspace(int32_t aVspace);
1865     nsresult GetLowsrc(nsAString *aLowsrc);
1866     nsresult SetLowsrc(const nsAString *aLowsrc);
1867     nsresult GetX(int32_t *aX);
1868     nsresult GetY(int32_t *aY);
1869 }
1870
1871 [
1872     object,
1873     uuid(68f49f8f-5ffd-44eb-a59f-d2b3f4817299),
1874     local
1875 ]
1876 interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
1877 {
1878     nsresult GetHref(nsAString *aHref);
1879     nsresult SetHref(const nsAString *aHref);
1880     nsresult GetTarget(nsAString *aTarget);
1881     nsresult SetTarget(const nsAString *aTarget);
1882     nsresult GetPing(nsAString *aPing);
1883     nsresult SetPing(const nsAString *aPing);
1884     nsresult GetRel(nsAString *aRel);
1885     nsresult SetRel(const nsAString *aRel);
1886     nsresult GetHreflang(nsAString *aHreflang);
1887     nsresult SetHreflang(const nsAString *aHreflang);
1888     nsresult GetType(nsAString *aType);
1889     nsresult SetType(const nsAString *aType);
1890     nsresult GetText(nsAString *aText);
1891     nsresult SetText(const nsAString *aText);
1892     nsresult GetProtocol(nsAString *aProtocol);
1893     nsresult SetProtocol(const nsAString *aProtocol);
1894     nsresult GetHost(nsAString *aHost);
1895     nsresult SetHost(const nsAString *aHost);
1896     nsresult GetHostname(nsAString *aHostname);
1897     nsresult SetHostname(const nsAString *aHostname);
1898     nsresult GetPort(nsAString *aPort);
1899     nsresult SetPort(const nsAString *aPort);
1900     nsresult GetPathname(nsAString *aPathname);
1901     nsresult SetPathname(const nsAString *aPathname);
1902     nsresult GetSearch(nsAString *aSearch);
1903     nsresult SetSearch(const nsAString *aSearch);
1904     nsresult GetHash(nsAString *aHash);
1905     nsresult SetHash(const nsAString *aHash);
1906     nsresult GetCharset(nsAString *aCharset);
1907     nsresult SetCharset(const nsAString *aCharset);
1908     nsresult GetCoords(nsAString *aCoords);
1909     nsresult SetCoords(const nsAString *aCoords);
1910     nsresult GetName(nsAString *aName);
1911     nsresult SetName(const nsAString *aName);
1912     nsresult GetRev(nsAString *aRev);
1913     nsresult SetRev(const nsAString *aRev);
1914     nsresult GetShape(nsAString *aShape);
1915     nsresult SetShape(const nsAString *aShape);
1916     nsresult ToString(nsAString *_retval);
1917 }
1918
1919 [
1920     object,
1921     uuid(5b639ece-7b49-4507-9d38-550beb71955b),
1922     local
1923 ]
1924 interface nsIDOMHTMLLinkElement : nsIDOMHTMLElement
1925 {
1926     nsresult GetDisabled(bool *aDisabled);
1927     nsresult SetDisabled(bool aDisabled);
1928     nsresult GetCharset(nsAString *aCharset);
1929     nsresult SetCharset(const nsAString *aCharset);
1930     nsresult GetHref(nsAString *aHref);
1931     nsresult SetHref(const nsAString *aHref);
1932     nsresult GetHreflang(nsAString *aHreflang);
1933     nsresult SetHreflang(const nsAString *aHreflang);
1934     nsresult GetMedia(nsAString *aMedia);
1935     nsresult SetMedia(const nsAString *aMedia);
1936     nsresult GetRel(nsAString *aRel);
1937     nsresult SetRel(const nsAString *aRel);
1938     nsresult GetRev(nsAString *aRev);
1939     nsresult SetRev(const nsAString *aRev);
1940     nsresult GetTarget(nsAString *aTarget);
1941     nsresult SetTarget(const nsAString *aTarget);
1942     nsresult GetType(nsAString *aType);
1943     nsresult SetType(const nsAString *aType);
1944     nsresult GetCrossOrigin(nsAString *aCrossOrigin);
1945     nsresult SetCrossOrigin(const nsAString *aCrossOrigin);
1946 }
1947
1948 [
1949     object,
1950     uuid(ae50de74-bc26-402e-85dc-a980f506b655),
1951     local
1952 ]
1953 interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
1954 {
1955     nsresult GetCaption(nsIDOMHTMLTableCaptionElement **aCaption);
1956     nsresult SetCaption(nsIDOMHTMLTableCaptionElement *aCaption);
1957     nsresult GetTHead(nsIDOMHTMLTableSectionElement **aTHead);
1958     nsresult SetTHead(nsIDOMHTMLTableSectionElement *aTHead);
1959     nsresult GetTFoot(nsIDOMHTMLTableSectionElement **aTFoot);
1960     nsresult SetTFoot(nsIDOMHTMLTableSectionElement *aTFoot);
1961     nsresult GetRows(nsIDOMHTMLCollection **aRows);
1962     nsresult GetTBodies(nsIDOMHTMLCollection **aTBodies);
1963     nsresult GetAlign(nsAString *aAlign);
1964     nsresult SetAlign(const nsAString *aAlign);
1965     nsresult GetBgColor(nsAString *aBgColor);
1966     nsresult SetBgColor(const nsAString *aBgColor);
1967     nsresult GetBorder(nsAString *aBorder);
1968     nsresult SetBorder(const nsAString *aBorder);
1969     nsresult GetCellPadding(nsAString *aCellPadding);
1970     nsresult SetCellPadding(const nsAString *aCellPadding);
1971     nsresult GetCellSpacing(nsAString *aCellSpacing);
1972     nsresult SetCellSpacing(const nsAString *aCellSpacing);
1973     nsresult GetFrame(nsAString *aFrame);
1974     nsresult SetFrame(const nsAString *aFrame);
1975     nsresult GetRules(nsAString *aRules);
1976     nsresult SetRules(const nsAString *aRules);
1977     nsresult GetSummary(nsAString *aSummary);
1978     nsresult SetSummary(const nsAString *aSummary);
1979     nsresult GetWidth(nsAString *aWidth);
1980     nsresult SetWidth(const nsAString *aWidth);
1981     nsresult CreateTHead(nsIDOMHTMLElement **_retval);
1982     nsresult DeleteTHead();
1983     nsresult CreateTFoot(nsIDOMHTMLElement **_retval);
1984     nsresult DeleteTFoot();
1985     nsresult CreateCaption(nsIDOMHTMLElement **_retval);
1986     nsresult DeleteCaption();
1987     nsresult InsertRow(int32_t index, nsIDOMHTMLElement **_retval);
1988     nsresult DeleteRow(int32_t index);
1989 }
1990
1991 [
1992     object,
1993     uuid(0ac4a382-4f97-4143-a3b3-de0a54978c67),
1994     local
1995 ]
1996 interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
1997 {
1998     nsresult GetRowIndex(int32_t *aRowIndex);
1999     nsresult GetSectionRowIndex(int32_t *aSectionRowIndex);
2000     nsresult GetCells(nsIDOMHTMLCollection **aCells);
2001     nsresult GetAlign(nsAString *aAlign);
2002     nsresult SetAlign(const nsAString *aAlign);
2003     nsresult GetBgColor(nsAString *aBgColor);
2004     nsresult SetBgColor(const nsAString *aBgColor);
2005     nsresult GetCh(nsAString *aCh);
2006     nsresult SetCh(const nsAString *aCh);
2007     nsresult GetChOff(nsAString *aChOff);
2008     nsresult SetChOff(const nsAString *aChOff);
2009     nsresult GetVAlign(nsAString *aVAlign);
2010     nsresult SetVAlign(const nsAString *aVAlign);
2011     nsresult InsertCell(int32_t index, nsIDOMHTMLElement **_retval);
2012     nsresult DeleteCell(int32_t index);
2013 }
2014
2015 [
2016     object,
2017     uuid(a7bd1e34-3969-47ae-8c1d-2970132ba925),
2018     local
2019 ]
2020 interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
2021 {
2022     nsresult GetAlign(nsAString *aAlign);
2023     nsresult SetAlign(const nsAString *aAlign);
2024     nsresult GetFrameBorder(nsAString *aFrameBorder);
2025     nsresult SetFrameBorder(const nsAString *aFrameBorder);
2026     nsresult GetHeight(nsAString *aHeight);
2027     nsresult SetHeight(const nsAString *aHeight);
2028     nsresult GetLongDesc(nsAString *aLongDesc);
2029     nsresult SetLongDesc(const nsAString *aLongDesc);
2030     nsresult GetMarginHeight(nsAString *aMarginHeight);
2031     nsresult SetMarginHeight(const nsAString *aMarginHeight);
2032     nsresult GetMarginWidth(nsAString *aMarginWidth);
2033     nsresult SetMarginWidth(const nsAString *aMarginWidth);
2034     nsresult GetName(nsAString *aName);
2035     nsresult SetName(const nsAString *aName);
2036     nsresult GetScrolling(nsAString *aScrolling);
2037     nsresult SetScrolling(const nsAString *aScrolling);
2038     nsresult GetSrc(nsAString *aSrc);
2039     nsresult SetSrc(const nsAString *aSrc);
2040     nsresult GetWidth(nsAString *aWidth);
2041     nsresult SetWidth(const nsAString *aWidth);
2042     nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
2043     nsresult GetContentWindow(nsIDOMWindow **aContentWindow);
2044     nsresult GetSandbox(nsAString *aSandbox);
2045     nsresult SetSandbox(const nsAString *aSandbox);
2046     nsresult GetAllowFullScreen(bool *aAllowFullScreen);
2047     nsresult SetAllowFullScreen(bool aAllowFullScreen);
2048 }
2049
2050 [
2051     object,
2052     uuid(2aa7855a-0667-47c3-af1e-9101002816c1),
2053     local
2054 ]
2055 interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
2056 {
2057     nsresult GetFrameBorder(nsAString *aFrameBorder);
2058     nsresult SetFrameBorder(const nsAString *aFrameBorder);
2059     nsresult GetLongDesc(nsAString *aLongDesc);
2060     nsresult SetLongDesc(const nsAString *aLongDesc);
2061     nsresult GetMarginHeight(nsAString *aMarginHeight);
2062     nsresult SetMarginHeight(const nsAString *aMarginHeight);
2063     nsresult GetMarginWidth(nsAString *aMarginWidth);
2064     nsresult SetMarginWidth(const nsAString *aMarginWidth);
2065     nsresult GetName(nsAString *aName);
2066     nsresult SetName(const nsAString *aName);
2067     nsresult GetNoResize(bool *aNoResize);
2068     nsresult SetNoResize(bool aNoResize);
2069     nsresult GetScrolling(nsAString *aScrolling);
2070     nsresult SetScrolling(const nsAString *aScrolling);
2071     nsresult GetSrc(nsAString *aSrc);
2072     nsresult SetSrc(const nsAString *aSrc);
2073     nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
2074     nsresult GetContentWindow(nsIDOMWindow **aContentWindow);
2075 }
2076
2077 [
2078     object,
2079     uuid(a70595dd-68a5-41f5-ab52-73a47d98bd78),
2080     local
2081 ]
2082 interface nsIDOMHTMLObjectElement : nsIDOMHTMLElement
2083 {
2084     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
2085     nsresult GetCode(nsAString *aCode);
2086     nsresult SetCode(const nsAString *aCode);
2087     nsresult GetAlign(nsAString *aAlign);
2088     nsresult SetAlign(const nsAString *aAlign);
2089     nsresult GetArchive(nsAString *aArchive);
2090     nsresult SetArchive(const nsAString *aArchive);
2091     nsresult GetBorder(nsAString *aBorder);
2092     nsresult SetBorder(const nsAString *aBorder);
2093     nsresult GetCodeBase(nsAString *aCodeBase);
2094     nsresult SetCodeBase(const nsAString *aCodeBase);
2095     nsresult GetCodeType(nsAString *aCodeType);
2096     nsresult SetCodeType(const nsAString *aCodeType);
2097     nsresult GetData(nsAString *aData);
2098     nsresult SetData(const nsAString *aData);
2099     nsresult GetDeclare(bool *aDeclare);
2100     nsresult SetDeclare(bool aDeclare);
2101     nsresult GetHeight(nsAString *aHeight);
2102     nsresult SetHeight(const nsAString *aHeight);
2103     nsresult GetHspace(int32_t *aHspace);
2104     nsresult SetHspace(int32_t aHspace);
2105     nsresult GetName(nsAString *aName);
2106     nsresult SetName(const nsAString *aName);
2107     nsresult GetStandby(nsAString *aStandby);
2108     nsresult SetStandby(const nsAString *aStandby);
2109     nsresult GetType(nsAString *aType);
2110     nsresult SetType(const nsAString *aType);
2111     nsresult GetUseMap(nsAString *aUseMap);
2112     nsresult SetUseMap(const nsAString *aUseMap);
2113     nsresult GetVspace(int32_t *aVspace);
2114     nsresult SetVspace(int32_t aVspace);
2115     nsresult GetWidth(nsAString *aWidth);
2116     nsresult SetWidth(const nsAString *aWidth);
2117     nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
2118     nsresult GetWillValidate(bool *aWillValidate);
2119     nsresult GetValidity(nsIDOMValidityState **aValidity);
2120     nsresult GetValidationMessage(nsAString *aValidationMessage);
2121     nsresult CheckValidity(bool *_retval);
2122     nsresult SetCustomValidity(const nsAString *error);
2123 }
2124
2125 [
2126     object,
2127     uuid(1fbec0f8-c7cF-4dc8-84be-247985a65e07),
2128     local
2129 ]
2130 interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
2131 {
2132     nsresult GetName(nsAString *aName);
2133     nsresult SetName(const nsAString *aName);
2134     nsresult GetType(nsAString *aType);
2135     nsresult SetType(const nsAString *aType);
2136     nsresult GetValue(nsAString *aValue);
2137     nsresult SetValue(const nsAString *aValue);
2138     nsresult GetValueType(nsAString *aValueType);
2139     nsresult SetValueType(const nsAString *aValueType);
2140 }
2141
2142 [
2143     object,
2144     uuid(830d9170-f8eb-4749-b721-16d60d6b0f1b),
2145     local
2146 ]
2147 interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement
2148 {
2149     nsresult GetDisabled(bool *aDisabled);
2150     nsresult SetDisabled(bool aDisabled);
2151     nsresult GetMedia(nsAString *aMedia);
2152     nsresult SetMedia(const nsAString *aMedia);
2153     nsresult GetType(nsAString *aType);
2154     nsresult SetType(const nsAString *aType);
2155     nsresult GetDOMStyleSheet(nsIDOMStyleSheet **aDOMStyleSheet);
2156 }
2157
2158 [
2159     object,
2160     uuid(7cebc153-168a-416c-ba5a-56a8c2ddb2ec),
2161     local
2162 ]
2163 interface nsIDOMNodeSelector : nsISupports
2164 {
2165     nsresult QuerySelector(const nsAString *selectors, nsIDOMElement **_retval);
2166     nsresult QuerySelectorAll(const nsAString *selectors, nsIDOMNodeList **_retval);
2167 }
2168
2169 [
2170     object,
2171     uuid(94928ab3-8b63-11d3-989d-001083010e9b),
2172     local
2173 ]
2174 interface nsIURIContentListener : nsISupports
2175 {
2176     nsresult OnStartURIOpen(nsIURI *aURI, bool *_retval);
2177     nsresult DoContent(const char *aContentType, bool aIsContentPreferred, nsIRequest *aRequest,
2178         nsIStreamListener **aContentHandler, bool *_retval);
2179     nsresult IsPreferred(const char *aContentType, char **aDesiredContentType, bool *_retval);
2180     nsresult CanHandleContent(const char *aContentType, bool aIsContentPreferred,
2181         char **aDesiredContentType, bool *_retval);
2182     nsresult GetLoadCookie(nsISupports **aLoadCookie);
2183     nsresult SetLoadCookie(nsISupports *aLoadCookie);
2184     nsresult GetParentContentListener(nsIURIContentListener **aParentContentListener);
2185     nsresult SetParentContentListener(nsIURIContentListener *aParentContentListener);
2186 }
2187
2188 [
2189     object,
2190     uuid(44b78386-1dd2-11b2-9ad2-e4eee2ca1916),
2191     local
2192 ]
2193 interface nsITooltipListener : nsISupports
2194 {
2195     nsresult OnShowTooltip(int32_t aXCoords, int32_t aYCoords, const PRUnichar *aTipText);
2196     nsresult OnHideTooltip();
2197 }
2198
2199 [
2200     object,
2201     uuid(33e9d001-caab-4ba9-8961-54902f197202),
2202     local
2203 ]
2204 interface nsIWebBrowser : nsISupports
2205 {
2206     nsresult AddWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
2207     nsresult RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
2208     nsresult GetContainerWindow(nsIWebBrowserChrome **aContainerWindow);
2209     nsresult SetContainerWindow(nsIWebBrowserChrome *aContainerWindow);
2210     nsresult GetParentURIContentListener(nsIURIContentListener **aParentURIContentListener);
2211     nsresult SetParentURIContentListener(nsIURIContentListener *aParentURIContentListener);
2212     nsresult GetContentDOMWindow(nsIDOMWindow **aContentDOMWindow);
2213     nsresult GetIsActive(bool *aIsActive);
2214     nsresult SetIsActive(bool aIsActive);
2215 }
2216
2217 cpp_quote("#define SETUP_ALLOW_JAVASCRIPT  2")
2218 cpp_quote("#define SETUP_IS_CHROME_WRAPPER 7")
2219 cpp_quote("#define SETUP_DISABLE_NOSCRIPT  16")
2220
2221 [
2222     object,
2223     uuid(f15398a0-8018-11d3-af70-00a024ffc08c),
2224     local
2225 ]
2226 interface nsIWebBrowserSetup : nsISupports
2227 {
2228     nsresult SetProperty(uint32_t aId, uint32_t aValue);
2229 }
2230
2231 typedef void* nativeWindow;
2232
2233 [
2234     object,
2235     uuid(9da319f3-eee6-4504-81a5-6a19cf6215bf),
2236     local
2237 ]
2238 interface nsIBaseWindow : nsISupports
2239 {
2240     nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget *parentWidget, int32_t x,
2241             int32_t y, int32_t cx, int32_t cy);
2242     nsresult Create();
2243     nsresult Destroy();
2244     nsresult SetPosition(int32_t x, int32_t y);
2245     nsresult GetPosition(int32_t *x, int32_t *y);
2246     nsresult SetSize(int32_t cx, int32_t cy, bool fRepaint);
2247     nsresult GetSize(int32_t *cx, int32_t *cy);
2248     nsresult SetPositionAndSize(int32_t x, int32_t y, int32_t cx, int32_t cy, bool fRepaint);
2249     nsresult GetPositionAndSize(int32_t *x, int32_t *y, int32_t *cx, int32_t *cy);
2250     nsresult Repaint(bool force);
2251     nsresult GetParentWidget(nsIWidget **aParentWidget);
2252     nsresult SetParentWidget(nsIWidget *aParentWidget);
2253     nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow);
2254     nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow);
2255     nsresult GetNativeHandle(nsAString *aNativeHandle);
2256     nsresult GetVisibility(bool *aVisibility);
2257     nsresult SetVisibility(bool aVisibility);
2258     nsresult GetEnabled(bool *aEnabled);
2259     nsresult SetEnabled(bool aEnabled);
2260     nsresult GetMainWidget(nsIWidget **aMainWidget);
2261     nsresult GetUnscaledDevicePixelsPerCSSPixel(double *aUnscaledDevicePixelsPerCSSPixel);
2262     nsresult SetFocus();
2263     nsresult GetTitle(PRUnichar **aTitle);
2264     nsresult SetTitle(const PRUnichar *aTitle);
2265 }
2266
2267 cpp_quote("#define LOAD_FLAGS_NONE           0x00000000")
2268 cpp_quote("#define LOAD_REPLACE              0x00040000")
2269 cpp_quote("#define LOAD_INITIAL_DOCUMENT_URI 0x00080000")
2270
2271 [
2272     object,
2273     uuid(f5d9e7b0-d930-11d3-b057-00a024ffc08c),
2274     local
2275 ]
2276 interface nsIWebNavigation : nsISupports
2277 {
2278     nsresult GetCanGoBack(bool *aCanGoBack);
2279     nsresult GetCanGoForward(bool *aCanGoForward);
2280     nsresult GoBack();
2281     nsresult GoForward();
2282     nsresult GotoIndex(int32_t index);
2283     nsresult LoadURI(const PRUnichar *aURI, uint32_t aLoadFlags, nsIURI *aReferrer,
2284             nsIInputStream *aPostData, nsIInputStream *aHeaders);
2285     nsresult Reload(uint32_t aReloadFlags);
2286     nsresult Stop(uint32_t aStopFlags);
2287     nsresult GetDocument(nsIDOMDocument **aDocument);
2288     nsresult GetCurrentURI(nsIURI **aCurrentURI);
2289     nsresult GetReferringURI(nsIURI **aReferringURI);
2290     nsresult GetSessionHistory(nsISHistory **aSessionHistory);
2291     nsresult SetSessionHistory(nsISHistory *aSessionHistory);
2292 }
2293
2294 [
2295     object,
2296     uuid(570f39d0-efd0-11d3-b093-00a024ffc08c),
2297     local
2298 ]
2299 interface nsIWebProgress : nsISupports
2300 {
2301     nsresult AddProgressListener(nsIWebProgressListener *aListener, uint32_t aNotifyMask);
2302     nsresult RemoveProgressListener(nsIWebProgressListener *aListener);
2303     nsresult GetDOMWindow(nsIDOMWindow **aDOMWindow);
2304     nsresult GetIsLoadingDocument(bool *aIsLoadingDocument);
2305 }
2306
2307 [
2308     object,
2309     uuid(4404c94b-0506-4255-9e3c-4582dba6cfbb),
2310     local
2311 ]
2312 interface nsIPrintSettings : nsISupports
2313 {
2314     typedef struct { char dummy; } nsIntMargin;
2315
2316     nsresult SetPrintOptions(int32_t aType, bool aTurnOnOff);
2317     nsresult GetPrintOptions(int32_t aType, bool *_retval);
2318     nsresult GetPrintOptionsBits(int32_t *_retval);
2319     nsresult GetEffectivePageSize(double *aWidth, double *aHeight);
2320     nsresult Clone(nsIPrintSettings **_retval);
2321     nsresult Assign(nsIPrintSettings *aPS);
2322     nsresult GetPrintSession(nsIPrintSession **aPrintSession);
2323     nsresult SetPrintSession(nsIPrintSession *aPrintSession);
2324     nsresult GetStartPageRange(int32_t *aStartPageRange);
2325     nsresult SetStartPageRange(int32_t aStartPageRange);
2326     nsresult GetEndPageRange(int32_t *aEndPageRange);
2327     nsresult SetEndPageRange(int32_t aEndPageRange);
2328     nsresult GetEdgeTop(double *aEdgeTop);
2329     nsresult SetEdgeTop(double aEdgeTop);
2330     nsresult GetEdgeLeft(double *aEdgeLeft);
2331     nsresult SetEdgeLeft(double aEdgeLeft);
2332     nsresult GetEdgeBottom(double *aEdgeBottom);
2333     nsresult SetEdgeBottom(double aEdgeBottom);
2334     nsresult GetEdgeRight(double *aEdgeRight);
2335     nsresult SetEdgeRight(double aEdgeRight);
2336     nsresult GetMarginTop(double *aMarginTop);
2337     nsresult SetMarginTop(double aMarginTop);
2338     nsresult GetMarginLeft(double *aMarginLeft);
2339     nsresult SetMarginLeft(double aMarginLeft);
2340     nsresult GetMarginBottom(double *aMarginBottom);
2341     nsresult SetMarginBottom(double aMarginBottom);
2342     nsresult GetMarginRight(double *aMarginRight);
2343     nsresult SetMarginRight(double aMarginRight);
2344     nsresult GetUnwriteableMarginTop(double *aUnwriteableMarginTop);
2345     nsresult SetUnwriteableMarginTop(double aUnwriteableMarginTop);
2346     nsresult GetUnwriteableMarginLeft(double *aUnwriteableMarginLeft);
2347     nsresult SetUnwriteableMarginLeft(double aUnwriteableMarginLeft);
2348     nsresult GetUnwriteableMarginBottom(double *aUnwriteableMarginBottom);
2349     nsresult SetUnwriteableMarginBottom(double aUnwriteableMarginBottom);
2350     nsresult GetUnwriteableMarginRight(double *aUnwriteableMarginRight);
2351     nsresult SetUnwriteableMarginRight(double aUnwriteableMarginRight);
2352     nsresult GetScaling(double *aScaling);
2353     nsresult SetScaling(double aScaling);
2354     nsresult GetPrintBGColors(bool *aPrintBGColors);
2355     nsresult SetPrintBGColors(bool aPrintBGColors);
2356     nsresult GetPrintBGImages(bool *aPrintBGImages);
2357     nsresult SetPrintBGImages(bool aPrintBGImages);
2358     nsresult GetPrintRange(int16_t *aPrintRange);
2359     nsresult SetPrintRange(int16_t aPrintRange);
2360     nsresult GetTitle(PRUnichar **aTitle);
2361     nsresult SetTitle(const PRUnichar *aTitle);
2362     nsresult GetDocURL(PRUnichar **aDocURL);
2363     nsresult SetDocURL(const PRUnichar *aDocURL);
2364     nsresult GetHeaderStrLeft(PRUnichar **aHeaderStrLeft);
2365     nsresult SetHeaderStrLeft(const PRUnichar *aHeaderStrLeft);
2366     nsresult GetHeaderStrCenter(PRUnichar **aHeaderStrCenter);
2367     nsresult SetHeaderStrCenter(const PRUnichar *aHeaderStrCenter);
2368     nsresult GetHeaderStrRight(PRUnichar **aHeaderStrRight);
2369     nsresult SetHeaderStrRight(const PRUnichar *aHeaderStrRight);
2370     nsresult GetFooterStrLeft(PRUnichar **aFooterStrLeft);
2371     nsresult SetFooterStrLeft(const PRUnichar *aFooterStrLeft);
2372     nsresult GetFooterStrCenter(PRUnichar **aFooterStrCenter);
2373     nsresult SetFooterStrCenter(const PRUnichar *aFooterStrCenter);
2374     nsresult GetFooterStrRight(PRUnichar **aFooterStrRight);
2375     nsresult SetFooterStrRight(const PRUnichar *aFooterStrRight);
2376     nsresult GetHowToEnableFrameUI(int16_t *aHowToEnableFrameUI);
2377     nsresult SetHowToEnableFrameUI(int16_t aHowToEnableFrameUI);
2378     nsresult GetIsCancelled(bool *aIsCancelled);
2379     nsresult SetIsCancelled(bool aIsCancelled);
2380     nsresult GetPrintFrameTypeUsage(int16_t *aPrintFrameTypeUsage);
2381     nsresult SetPrintFrameTypeUsage(int16_t aPrintFrameTypeUsage);
2382     nsresult GetPrintFrameType(int16_t *aPrintFrameType);
2383     nsresult SetPrintFrameType(int16_t aPrintFrameType);
2384     nsresult GetPrintSilent(bool *aPrintSilent);
2385     nsresult SetPrintSilent(bool aPrintSilent);
2386     nsresult GetShrinkToFit(bool *aShrinkToFit);
2387     nsresult SetShrinkToFit(bool aShrinkToFit);
2388     nsresult GetShowPrintProgress(bool *aShowPrintProgress);
2389     nsresult SetShowPrintProgress(bool aShowPrintProgress);
2390     nsresult GetPaperName(PRUnichar **aPaperName);
2391     nsresult SetPaperName(const PRUnichar *aPaperName);
2392     nsresult GetPaperSizeType(int16_t *aPaperSizeType);
2393     nsresult SetPaperSizeType(int16_t aPaperSizeType);
2394     nsresult GetPaperData(int16_t *aPaperData);
2395     nsresult SetPaperData(int16_t aPaperData);
2396     nsresult GetPaperWidth(double *aPaperWidth);
2397     nsresult SetPaperWidth(double aPaperWidth);
2398     nsresult GetPaperHeight(double *aPaperHeight);
2399     nsresult SetPaperHeight(double aPaperHeight);
2400     nsresult GetPaperSizeUnit(int16_t *aPaperSizeUnit);
2401     nsresult SetPaperSizeUnit(int16_t aPaperSizeUnit);
2402     nsresult GetPlexName(PRUnichar **aPlexName);
2403     nsresult SetPlexName(const PRUnichar *aPlexName);
2404     nsresult GetColorspace(PRUnichar **aColorspace);
2405     nsresult SetColorspace(const PRUnichar *aColorspace);
2406     nsresult GetResolutionName(PRUnichar **aResolutionName);
2407     nsresult SetResolutionName(const PRUnichar aResolutionName);
2408     nsresult GetDownloadFonts(bool *aDownloadFonts);
2409     nsresult SetDownloadFonts(bool aDownloadFonts);
2410     nsresult GetPrintReversed(bool *aPrintReversed);
2411     nsresult SetPrintReversed(bool aPrintReversed);
2412     nsresult GetPrintInColor(bool *aPrintInColor);
2413     nsresult SetPrintInColor(bool aPrintInColor);
2414     nsresult GetOrientation(int32_t *aOrientation);
2415     nsresult SetOrientation(int32_t aOrientation);
2416     nsresult GetPrintCommand(PRUnichar **aPrintCommand);
2417     nsresult SetPrintCommand(const PRUnichar *aPrintCommand);
2418     nsresult GetNumCopies(int32_t *aNumCopies);
2419     nsresult SetNumCopies(int32_t aNumCopies);
2420     nsresult GetPrinterName(PRUnichar **aPrinterName);
2421     nsresult SetPrinterName(const PRUnichar *aPrinterName);
2422     nsresult GetPrintToFile(bool *aPrintToFile);
2423     nsresult SetPrintToFile(bool aPrintToFile);
2424     nsresult GetToFileName(PRUnichar **aToFileName);
2425     nsresult SetToFileName(const PRUnichar *aToFileName);
2426     nsresult GetOutputFormat(int16_t *aOutputFormat);
2427     nsresult SetOutputFormat(int16_t aOutputFormat);
2428     nsresult GetPrintPageDelay(int32_t *aPrintPageDelay);
2429     nsresult SetPrintPageDelay(int32_t aPrintPageDelay);
2430     nsresult GetIsInitializedFromPrinter(bool *aIsInitializedFromPrinter);
2431     nsresult SetIsInitializedFromPrinter(bool aIsInitializedFromPrinter);
2432     nsresult GetIsInitializedFromPrefs(bool *aIsInitializedFromPrefs);
2433     nsresult SetIsInitializedFromPrefs(bool aIsInitializedFromPrefs);
2434     nsresult SetMarginInTwips(nsIntMargin *aMargin);
2435     nsresult SetEdgeInTwips(nsIntMargin *aEdge);
2436     nsresult GetMarginInTwips(nsIntMargin *aMargin);
2437     nsresult GetEdgeInTwips(nsIntMargin *aEdge);
2438     nsresult SetupSilentPrinting();
2439     nsresult SetUnwriteableMarginInTwips(nsIntMargin *aEdge);
2440     nsresult GetUnwriteableMarginInTwips(nsIntMargin *aEdge);
2441     nsresult GetPageRanges(void * /*nsTArray<int32_t>&*/ aPages);
2442 }
2443
2444 [
2445     object,
2446     uuid(9a7ca4b0-fbba-11d4-a869-00105a183419),
2447     local
2448 ]
2449 interface nsIWebBrowserPrint : nsISupports
2450 {
2451     nsresult GetGlobalPrintSettings(nsIPrintSettings **aGlobalPrintSettings);
2452     nsresult GetCurrentPrintSettings(nsIPrintSettings **aCurrentPrintSettings);
2453     nsresult GetCurrentChildDOMWindow(nsIDOMWindow **aCurrentChildDOMWindow);
2454     nsresult GetDoingPrint(bool *aDoingPrint);
2455     nsresult GetDoingPrintPreview(bool *aDoingPrintPreview);
2456     nsresult GetIsFramesetDocument(bool *aIsFramesetDocument);
2457     nsresult GetIsFramesetFrameSelected(bool *aIsFramesetFrameSelected);
2458     nsresult GetIsIFrameSelected(bool *aIsIFrameSelected);
2459     nsresult GetIsRangeSelection(bool *aIsRangeSelection);
2460     nsresult GetPrintPreviewNumPages(int32_t *aPrintPreviewNumPages);
2461     nsresult Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener);
2462     nsresult PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin,
2463                           nsIWebProgressListener *aWPListener);
2464     nsresult PrintPreviewNavigate(int16_t aNavType, int32_t aPageNum);
2465     nsresult Cancel();
2466     nsresult EnumerateDocumentNames(uint32_t *aCount, PRUnichar ***aResult);
2467     nsresult ExitPrintPreview();
2468 }
2469
2470 [
2471     object,
2472     uuid(919e792a-6490-40b8-bba5-f9e9ad5640c8),
2473     local
2474 ]
2475 interface nsIScrollable : nsISupports
2476 {
2477     enum {
2478         ScrollOrientation_X = 1,
2479         ScrollOrientation_Y = 2
2480     };
2481
2482     enum {
2483         Scrollbar_Auto   = 1,
2484         Scrollbar_Never  = 2,
2485         Scrollbar_Always = 3
2486     };
2487
2488     nsresult GetCurScrollPos(int32_t scrollOrientation, int32_t *curPos);
2489     nsresult SetCurScrollPos(int32_t scrollOrientation, int32_t curPos);
2490     nsresult SetCurScrollPosEx(int32_t curHorizontalPos, int32_t curVerticalPos);
2491     nsresult GetScrollRange(int32_t scrollOrientation, int32_t *minPos, int32_t *maxPos);
2492     nsresult SetScrollRange(int32_t scrollOrientation, int32_t minPos, int32_t maxPos);
2493     nsresult SetScrollRangeEx(int32_t minHorizontalPos, int32_t maxHorizontalPos,
2494             int32_t minVerticalPos, int32_t maxVerticalPos);
2495     nsresult GetDefaultScrollbarPreferences(int32_t scrollOrientation, int32_t *scrollbarPref);
2496     nsresult SetDefaultScrollbarPreferences(int32_t scrollOrientation, int32_t scrollbarPref);
2497     nsresult GetScrollbarVisibility(bool *verticalVisible, bool *horizontalVisible);
2498 }
2499
2500 [
2501     object,
2502     uuid(272a5020-64f5-485c-a8c4-44b2882ae0a2),
2503     local
2504 ]
2505 interface nsIFile : nsISupports
2506 {
2507     typedef struct {
2508         /* Currently not needed */
2509         char dummy;
2510     } PRFileDesc, PRLibrary, widl_FILE;
2511 #define FILE widl_FILE
2512
2513     nsresult Append(const nsAString *node);
2514     nsresult AppendNative(const nsAString *node);
2515     nsresult Normalize();
2516     nsresult Create(uint32_t type, uint32_t permission);
2517     nsresult GetLeafName(nsAString *aLeafName);
2518     nsresult SetLeafName(const nsAString *aLeafName);
2519     nsresult GetNativeLeafName(nsAString *aLeafName);
2520     nsresult SetNativeLeafName(const nsAString *aLeafName);
2521     nsresult CopyTo(nsIFile *newParentDir, const nsAString *newName);
2522     nsresult CopyToNative(nsIFile *newParentDir, const nsAString *newName);
2523     nsresult CopyToFollowingLinks(nsIFile *newParentDir, const nsAString *newName);
2524     nsresult CopyToFollowingLinksNative(nsIFile *newParentDir, const nsAString *newName);
2525     nsresult MoveTo(nsIFile *newParentDir, const nsAString *newName);
2526     nsresult MoveToNative(nsIFile *newParentDir, const nsAString *newName);
2527     nsresult Remove(bool recursive);
2528     nsresult GetPermissions(uint32_t *aPermissions);
2529     nsresult SetPermissions(uint32_t pPermissions);
2530     nsresult GetPermissionsOfLink(uint32_t *aPermissions);
2531     nsresult SetPermissionsOfLink(uint32_t pPermissions);
2532     nsresult GetLastModifiedTime(PRTime *aLastModifiedTime);
2533     nsresult SetLastModifiedTime(PRTime aLastModifiedTime);
2534     nsresult GetLastModifiedTimeOfLink(PRTime *aLastModifiedTimeOfLink);
2535     nsresult SetLastModifiedTimeOfLink(PRTime aLastModifiedTimeOfLink);
2536     nsresult GetFileSize(int64_t *aFileSize);
2537     nsresult SetFileSize(int64_t aFileSize);
2538     nsresult GetFileSizeOfLink(int64_t *aFileSizeOfLink);
2539     nsresult GetTarget(nsAString *aTarget);
2540     nsresult GetNativeTarget(nsACString *aNativeTarget);
2541     nsresult GetPath(nsAString *aPath);
2542     nsresult GetNativePath(nsACString *aNativePath);
2543     nsresult Exists(bool *_retval);
2544     nsresult IsWritable(bool *_retval);
2545     nsresult IsReadable(bool *_retval);
2546     nsresult IsExecutable(bool *_retval);
2547     nsresult IsHidden(bool *_retval);
2548     nsresult IsDirectory(bool *_retval);
2549     nsresult IsFile(bool *_retval);
2550     nsresult IsSymlink(bool *_retval);
2551     nsresult IsSpecial(bool *_retval);
2552     nsresult CreateUnique(uint32_t type, uint32_t permission);
2553     nsresult Clone(nsIFile **_retval);
2554     nsresult Equals(nsIFile *inFile, bool *_retval);
2555     nsresult Contains(nsIFile *inFile, bool recir, bool *_retval);
2556     nsresult GetParent(nsIFile **aParent);
2557     nsresult GetDirectoryEntries(nsISimpleEnumerator **aDirectoryEntries);
2558     nsresult InitWithPath(const nsAString *filePath);
2559     nsresult InitWithNativePath(const nsACString *filePath);
2560     nsresult InitWithFile(nsIFile *aFile);
2561     nsresult GetFollowLinks(bool *aFollowLinks);
2562     nsresult SetFollowLinks(bool aFollowLinks);
2563     nsresult OpenNSPRFileDesc(int32_t flags, int32_t mode, PRFileDesc **_retval);
2564     nsresult OpenANSIFileDesc(const char *mode, FILE **_retval);
2565     nsresult Load(PRLibrary **_retval);
2566     nsresult GetDiskSpaceAvailable(int64_t *aDiskSpaceAvailable);
2567     nsresult AppendRelativePath(const nsAString *relativeFilePath);
2568     nsresult AppendRelativeNativePath(const nsACString *relativeFilePath);
2569     nsresult GetPersistentDescriptor(nsACString *aPersistentDescriptor);
2570     nsresult SetPersistentDescriptor(const nsACString *aPersistentDescriptor);
2571     nsresult Reveal();
2572     nsresult Launch();
2573     nsresult GetRelativeDescriptor(nsIFile *fromFile, nsACString *_retval);
2574     nsresult SetRelativeDescriptor(nsIFile *fromFile, const nsACString *relativeDesc);
2575 }
2576
2577 [
2578     object,
2579     uuid(1d940426-5fe5-42c3-84ae-a300f2d9ebd5),
2580     local
2581 ]
2582 interface nsIComponentManager : nsISupports
2583 {
2584     nsresult GetClassObject(nsCIDRef aClass, nsIIDRef aIID, void **result);
2585     nsresult GetClassObjectByContractID(const char *aContractID, nsIIDRef aIID, void **result);
2586     nsresult CreateInstance(nsCIDRef aClass, nsISupports *aDelegate, nsIIDRef aIID,
2587             void **result);
2588     nsresult CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate,
2589             nsIIDRef aIID, void **result);
2590     nsresult AddBootstrappedManifestLocation(nsIFile *aLocation);
2591     nsresult RemoveBootstrappedManifestLocation(nsIFile *aLocation);
2592 }
2593
2594 [
2595     object,
2596     uuid(7df46a54-d8b0-448e-903c-4341a1b2499c),
2597     local
2598 ]
2599 interface nsIPrefBranch : nsISupports
2600 {
2601     nsresult GetRoot(char **aRoot);
2602     nsresult GetPrefType(const char *aPrefName, int32_t *_retval);
2603     nsresult GetBoolPref(const char *aPrefName, bool *_retval);
2604     nsresult SetBoolPref(const char *aPrefName, bool aValue);
2605     nsresult GetFloatPref(const char *aPrefName, float *_retval);
2606     nsresult GetCharPref(const char *aPrefName, char **_retval);
2607     nsresult SetCharPref(const char *aPrefName, const char *aValue);
2608     nsresult GetIntPref(const char *aPrefName, int32_t *_retval);
2609     nsresult SetIntPref(const char *aPrefName, int32_t aValue);
2610     nsresult GetComplexValue(const char *aPrefName, const nsIID *aType, void **aValue);
2611     nsresult SetComplexValue(const char *aPrefName, const nsIID *aType, nsISupports *aValue);
2612     nsresult ClearUserPref(const char *aPrefName);
2613     nsresult LockPref(const char *aPrefName);
2614     nsresult PrefHasUserValue(const char *aPrefName, bool *_retval);
2615     nsresult PrefIsLocked(const char *aPrefName, bool *_retval);
2616     nsresult UnlockPref(const char *aPrefName);
2617     nsresult DeleteBranch(const char *aStartingAt);
2618     nsresult GetChildList(const char *aStartingAt, uint32_t *aCount, char ***aChildArray);
2619     nsresult ResetBranch(const char *aStartingAt);
2620     nsresult AddObserver(const char *aDomain, nsIObserver *aObserver, bool aHoldWeak);
2621     nsresult RemoveObserver(const char *aDomain, nsIObserver *aObserver);
2622 }
2623
2624 [
2625     object,
2626     uuid(bbf8cab0-d43a-11d3-8cc2-00609792278c),
2627     local
2628 ]
2629 interface nsIDirectoryServiceProvider : nsISupports
2630 {
2631     nsresult GetFile(const char *prop, bool *persistent, nsIFile **_retval);
2632 }
2633
2634 [
2635     object,
2636     uuid(2f977d4b-5485-11d4-87e2-0010a4e75ef2),
2637     local
2638 ]
2639 interface nsIDirectoryServiceProvider2 : nsIDirectoryServiceProvider
2640 {
2641     nsresult GetFiles(const char *prop, nsISimpleEnumerator **_retval);
2642 }
2643
2644 [
2645     object,
2646     uuid(15fd6940-8ea7-11d3-93ad-00104ba0fd40),
2647     local
2648 ]
2649 interface nsIProtocolHandler : nsISupports
2650 {
2651     nsresult GetScheme(nsACString *aScheme);
2652     nsresult GetDefaultPort(int32_t *aDefaultPort);
2653     nsresult GetProtocolFlags(uint32_t *aProtocolFlags);
2654     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset,
2655                     nsIURI *aBaseURI, nsIURI **_retval);
2656     nsresult NewChannel(nsIURI *aURI, nsIChannel **_retval);
2657     nsresult AllowPort(int32_t port, const char *scheme, bool *_retval);
2658 }
2659
2660 [
2661     object,
2662     uuid(0e61f3b2-34d7-4c79-bfdc-4860bc7341b7),
2663     local
2664 ]
2665 interface nsIExternalProtocolHandler : nsIProtocolHandler
2666 {
2667     nsresult ExternalAppExistsForScheme(const nsACString *scheme, bool *_retval);
2668 }
2669
2670 [
2671     object,
2672     uuid(bddeda3f-9020-4d12-8c70-984ee9f7935e),
2673     local
2674 ]
2675 interface nsIIOService : nsISupports
2676 {
2677     nsresult GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval);
2678     nsresult GetProtocolFlags(const char *aScheme, uint32_t *_retval);
2679     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
2680                     nsIURI **_retval);
2681     nsresult NewFileURI(nsIFile *aFile, nsIURI **_retval);
2682     nsresult NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval);
2683     nsresult NewChannel(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
2684                         nsIChannel **_retval);
2685     nsresult GetOffline(bool *aOffline);
2686     nsresult SetOffline(bool aOffline);
2687     nsresult AllowPort(int32_t aPort, const char *aScheme, bool *_retval);
2688     nsresult ExtractScheme(const nsACString *urlString, nsACString *_retval);
2689 }
2690
2691 [
2692     object,
2693     uuid(ca68c485-9db3-4c12-82a6-4fab7948e2d5),
2694     local,
2695 ]
2696 interface nsINetUtil : nsISupports
2697 {
2698     nsresult ParseContentType(const nsACString *aTypeHeader, nsACString *aCharset,
2699             bool *aHadCharset, nsACString *_retval);
2700     nsresult ProtocolHasFlags(nsIURI *aURI, uint32_t aFlag, bool *_retval);
2701     nsresult URIChainHasFlags(nsIURI *aURI, uint32_t aFlags, bool *_retval);
2702     nsresult ToImmutableURI(nsIURI *aURI, nsIURI **_retval);
2703     nsresult NewSimpleNestedURI(nsIURI *aURI, nsIURI **_retval);
2704     nsresult EscapeString(const nsACString *aString, uint32_t aEscapeType, nsACString *_retval);
2705     nsresult EscapeURL(const nsACString *aStr, uint32_t aFlags, nsACString *_retval);
2706     nsresult UnescapeString(const nsACString *aStr, uint32_t aFlags, nsACString *_retval);
2707     nsresult ExtractCharsetFromContentType(const nsACString *aTypeHeader, nsACString *aCharset,
2708             int32_t *aCharsetStart, int32_t *aCharsetEnd, bool *_retval);
2709 }
2710
2711 [
2712     object,
2713     uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a),
2714     local
2715 ]
2716 interface nsIWebBrowserFocus : nsISupports
2717 {
2718     nsresult Activate();
2719     nsresult Deactivate();
2720     nsresult SetFocusAtFirstElement();
2721     nsresult SetFocusAtLastElement();
2722     nsresult GetFocusedWindow(nsIDOMWindow **aFocusedWindow);
2723     nsresult SetFocusedWindow(nsIDOMWindow *aFocusedWindow);
2724     nsresult GetFocusedElement(nsIDOMElement **aFocusedElement);
2725     nsresult SetFocusedElement(nsIDOMElement *aFocusedElement);
2726 }
2727
2728 [
2729     object,
2730     uuid(e8c414c4-dc38-4ba3-ab4e-ec4cbbe22907),
2731     local
2732 ]
2733 interface nsIWebBrowserChrome : nsISupports
2734 {
2735     nsresult SetStatus(uint32_t statusType, const PRUnichar *status);
2736     nsresult GetWebBrowser(nsIWebBrowser **aWebBrowser);
2737     nsresult SetWebBrowser(nsIWebBrowser *aWebBrowser);
2738     nsresult GetChromeFlags(uint32_t *aChromeFlags);
2739     nsresult SetChromeFlags(uint32_t aChromeFlags);
2740     nsresult DestroyBrowserWindow();
2741     nsresult SizeBrowserTo(int32_t aCX, int32_t aCY);
2742     nsresult ShowAsModal();
2743     nsresult IsWindowModal(bool *_retval);
2744     nsresult ExitModalEventLoop(nsresult aStatus);
2745 }
2746
2747 [
2748     object,
2749     uuid(df31c120-ded6-11d1-bd85-00805f8ae3f4),
2750     local
2751 ]
2752 interface nsIDOMEventListener : nsISupports
2753 {
2754     nsresult HandleEvent(nsIDOMEvent *event);
2755 }
2756
2757 [
2758     object,
2759     uuid(8e375931-298d-4d0a-9cb4-5668f0cdc5a8),
2760     local
2761 ]
2762 interface nsIDOMEventTarget : nsISupports
2763 {
2764     nsresult AddEventListener(const nsAString *type, nsIDOMEventListener *listener, bool useCapture, bool wantsUntrusted, uint8_t _argc);
2765     nsresult AddSystemEventListener(const nsAString *type, nsIDOMEventListener *listener, bool aUseCapture, bool aWantsUntrusted, uint8_t _argc);
2766     nsresult RemoveEventListener(const nsAString *type, nsIDOMEventListener *listener, bool useCapture);
2767     nsresult RemoveSystemEventListener(const nsAString *type, nsIDOMEventListener *listener, bool aUseCapture);
2768     nsresult DispatchEvent(nsIDOMEvent *evt, bool *_retval);
2769
2770     /* Followed by methods we should try to avoid using */
2771 }
2772
2773 [
2774     object,
2775     uuid(270c945b-8a65-4170-bc0b-4ec1443cd39f),
2776     local
2777 ]
2778 interface nsIDOMEvent : nsISupports
2779 {
2780     nsresult GetType(nsAString *aType);
2781     nsresult GetTarget(nsIDOMEventTarget **aTarget);
2782     nsresult GetCurrentTarget(nsIDOMEventTarget **aCurrentTarget);
2783     nsresult GetEventPhase(uint16_t *aEventPhase);
2784     nsresult GetBubbles(bool *aBubbles);
2785     nsresult GetCancelable(bool *aCancelable);
2786     nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp);
2787     nsresult StopPropagation();
2788     nsresult PreventDefault();
2789     nsresult InitEvent(const nsAString *eventTypeArg, bool canBubbleArg, bool cancelableArg);
2790     nsresult GetDefaultPrevented(bool *aDefaultPrevented);
2791     nsresult StopImmediatePropagation();
2792     nsresult GetOriginalTarget(nsIDOMEventTarget **aOriginalTarget);
2793     nsresult GetExplicitOriginalTarget(nsIDOMEventTarget * *aExplicitOriginalTarget);
2794     nsresult PreventBubble();
2795     nsresult PreventCapture();
2796     nsresult GetPreventDefault(bool *_retval);
2797     nsresult GetIsTrusted(bool *aIsTrusted);
2798     nsresult DuplicatePrivateData();
2799     nsresult SetTarget(nsIDOMEventTarget *aTarget);
2800     bool IsDispatchStopped();
2801     /*nsEvent*/ void *GetInternalNSEvent();
2802     nsresult SetTrusted(bool aTrusted);
2803     void Serialize(/*IPC::Message*/ void *aMsg, bool aSerializeInterfaceType);
2804     bool Deserialize(const /*IPC::Message*/ void *aMsg, void **aIter);
2805 }
2806
2807 [
2808     object,
2809     uuid(ed36f965-173c-4101-a615-63b44f51ed90),
2810     local
2811 ]
2812 interface nsIDOMWindowUtils : nsISupports
2813 {
2814     nsresult GetImageAnimationMode(uint16_t *aImageAnimationMode);
2815     nsresult SetImageAnimationMode(uint16_t aImageAnimationMode);
2816     nsresult GetDocCharsetIsForced(bool *aDocCharsetIsForced);
2817     nsresult GetCursorType(int16_t *_retval);
2818     nsresult GetDocumentMetadata(const nsAString *aName, nsAString *_retval);
2819     nsresult Redraw(uint32_t aCount, uint32_t *_retval);
2820     nsresult SetCSSViewport(float aWidthPx, float aHeightPx);
2821     nsresult GetViewportInfo(uint32_t aDisplayWidth, uint32_t aDisplayHeight, double *aDefaultZoom, bool *aAllowZoom,
2822            double *aMinZoom, double *aMaxZoom, uint32_t *aWidth, uint32_t *aHeight, bool *aAutoSize);
2823     nsresult SetDisplayPortForElement(float aXPx, float aYPx, float aWidthPx, float aHeightPx, nsIDOMElement *aElement);
2824     nsresult SetResolution(float aXResolution, float aYResolution);
2825     nsresult GetIsFirstPaint(bool *aIsFirstPaint);
2826     nsresult SetIsFirstPaint(bool aIsFirstPaint);
2827     nsresult SendMouseEvent(const nsAString *aType, float aX, float aY, int32_t aButton, int32_t aClickCount,
2828            int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg);
2829     nsresult SendTouchEvent(const nsAString *aType, uint32_t *aIdentifiers, int32_t *aXs, int32_t *aYs,
2830            uint32_t *aRxs, uint32_t *aRys, float *aRotationAngles, float *aForces, uint32_t count, int32_t aModifiers,
2831            bool aIgnoreRootScrollFrame, bool *_retval);
2832     nsresult SendMouseEventToWindow(const nsAString *aType, float aX, float aY, int32_t aButton, int32_t aClickCount,
2833            int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg);
2834     nsresult SendWheelEvent(float aX, float aY, double aDeltaX, double aDeltaY, double aDeltaZ, uint32_t aDeltaMode,
2835            int32_t aModifiers, int32_t aLineOrPageDeltaX, int32_t aLineOrPageDeltaY, uint32_t aOptions);
2836     nsresult SendKeyEvent(const nsAString *aType, int32_t aKeyCode, int32_t aCharCode, int32_t aModifiers,
2837            uint32_t aAdditionalFlags, bool *_retval);
2838     nsresult SendNativeKeyEvent(int32_t aNativeKeyboardLayout, int32_t aNativeKeyCode, int32_t aModifierFlags,
2839            const nsAString *aCharacters, const nsAString *aUnmodifiedCharacters);
2840     nsresult SendNativeMouseEvent(int32_t aScreenX, int32_t aScreenY, int32_t aNativeMessage, int32_t aModifierFlags,
2841            nsIDOMElement *aElement);
2842     nsresult SendNativeMouseScrollEvent(int32_t aScreenX, int32_t aScreenY, uint32_t aNativeMessage, double aDeltaX,
2843            double aDeltaY, double aDeltaZ, uint32_t aModifierFlags, uint32_t aAdditionalFlags, nsIDOMElement *aElement);
2844     nsresult ActivateNativeMenuItemAt(const nsAString *indexString);
2845     nsresult ForceUpdateNativeMenuAt(const nsAString *indexString);
2846     nsresult Focus(nsIDOMElement *aElement);
2847     nsresult GarbageCollect(nsICycleCollectorListener *aListener, int32_t aExtraForgetSkippableCalls);
2848     nsresult CycleCollect(nsICycleCollectorListener *aListener, int32_t aExtraForgetSkippableCalls);
2849     nsresult SendSimpleGestureEvent(const nsAString *aType, float aX, float aY, uint32_t aDirection, double aDelta,
2850            int32_t aModifiers, uint32_t aClickCount);
2851     nsresult ElementFromPoint(float aX, float aY, bool aIgnoreRootScrollFrame, bool aFlushLayout, nsIDOMElement **_retval);
2852     nsresult NodesFromRect(float aX, float aY, float aTopSize, float aRightSize, float aBottomSize, float aLeftSize,
2853            bool aIgnoreRootScrollFrame, bool aFlushLayout, nsIDOMNodeList **_retval);
2854     nsresult CompareCanvases(nsIDOMHTMLCanvasElement *aCanvas1, nsIDOMHTMLCanvasElement *aCanvas2,
2855            uint32_t *aMaxDifference, uint32_t *_retval);
2856     nsresult GetIsMozAfterPaintPending(bool *aIsMozAfterPaintPending);
2857     nsresult SuppressEventHandling(bool aSuppress);
2858     nsresult ClearMozAfterPaintEvents();
2859     nsresult DisableNonTestMouseEvents(bool aDisable);
2860     nsresult GetScrollXY(bool aFlushLayout, int32_t *aScrollX, int32_t *aScrollY);
2861     nsresult GetRootBounds(nsIDOMClientRect **_retval);
2862     nsresult GetIMEIsOpen(bool *aIMEIsOpen);
2863     nsresult GetIMEStatus(uint32_t *aIMEStatus);
2864     nsresult GetScreenPixelsPerCSSPixel(float *aScreenPixelsPerCSSPixel);
2865     nsresult GetFullZoom(float *aFullZoom);
2866     nsresult DispatchDOMEventViaPresShell(nsIDOMNode *aTarget, nsIDOMEvent *aEvent, bool aTrusted, bool *_retval);
2867     nsresult GetClassName(const /*JS::Value*/ void *aObject, JSContext *cx, char **_retval);
2868     nsresult SendContentCommandEvent(const nsAString *aType, nsITransferable *aTransferable);
2869     nsresult SendCompositionEvent(const nsAString *aType, const nsAString *aData, const nsAString *aLocale);
2870     nsresult SendTextEvent(const nsAString *aCompositionString, int32_t aFirstClauseLength, uint32_t aFirstClauseAttr,
2871            int32_t aSecondClauseLength, uint32_t aSecondClauseAttr, int32_t aThirdClauseLength, uint32_t aThirdClauseAttr,
2872            int32_t aCaretStart, int32_t aCaretLength);
2873     nsresult SendQueryContentEvent(uint32_t aType, uint32_t aOffset, uint32_t aLength, int32_t aX, int32_t aY,
2874            nsIQueryContentEventResult **_retval);
2875     nsresult RemoteFrameFullscreenChanged(nsIDOMElement *aFrameElement, const nsAString *aNewOrigin);
2876     nsresult RemoteFrameFullscreenReverted();
2877     nsresult ExitFullscreen();
2878     nsresult SendSelectionSetEvent(uint32_t aOffset, uint32_t aLength, bool aReverse, bool *_retval);
2879     nsresult SelectAtPoint(float aX, float aY, uint32_t aSelectBehavior, bool *_retval);
2880     nsresult GetVisitedDependentComputedStyle(nsIDOMElement *aElement, const nsAString *aPseudoElement,
2881            const nsAString *aPropertyName, nsAString *_retval);
2882     nsresult GetParent(const /*JS::Value*/ void *obj, JSContext *cx, /*JS::Value*/ void *_retval);
2883     nsresult GetOuterWindowID(uint64_t *aOuterWindowID);
2884     nsresult GetCurrentInnerWindowID(uint64_t *aCurrentInnerWindowID);
2885     nsresult EnterModalState();
2886     nsresult LeaveModalState();
2887     nsresult EnterModalStateWithWindow(nsIDOMWindow **_retval);
2888     nsresult LeaveModalStateWithWindow(nsIDOMWindow *aWindow);
2889     nsresult IsInModalState(bool *_retval);
2890     nsresult SuspendTimeouts();
2891     nsresult ResumeTimeouts();
2892     nsresult GetLayerManagerType(nsAString *aLayerManagerType);
2893     nsresult StartFrameTimeRecording();
2894     nsresult StopFrameTimeRecording(uint32_t *frameCount, float **frameTime);
2895     nsresult BeginTabSwitch();
2896     nsresult GetDisplayDPI(float *aDisplayDPI);
2897     nsresult GetOuterWindowWithId(uint64_t aOuterWindowID, nsIDOMWindow **_retval);
2898     nsresult RenderDocument(const void /*nsRect*/ *aRect, uint32_t aFlags, int /*nscolor*/ aBackgroundColor,
2899            void /*gfxContext*/ *aThebesContext);
2900     nsresult AdvanceTimeAndRefresh(int64_t aMilliseconds);
2901     nsresult RestoreNormalRefresh();
2902     nsresult ComputeAnimationDistance(nsIDOMElement *element, const nsAString *property, const nsAString *value1,
2903            const nsAString *value2, double *_retval);
2904     nsresult WrapDOMFile(nsIFile *aFile, nsIDOMFile **_retval);
2905     nsresult GetFocusedInputType(char **aFocusedInputType);
2906     nsresult FindElementWithViewId(long /*nsViewID*/ aId, nsIDOMElement **_retval);
2907     nsresult LeafLayersPartitionWindow(bool *_retval);
2908     nsresult GetMayHaveTouchEventListeners(bool *aMayHaveTouchEventListeners);
2909     nsresult CheckAndClearPaintedState(nsIDOMElement *aElement, bool *_retval);
2910     nsresult GetFile(const nsAString *aName, const /*JS::Value*/ void *aBlobParts, const /*JS::Value*/ void *aParameters,
2911            JSContext* cx, uint8_t _argc, nsIDOMFile **_retval);
2912     nsresult GetBlob(const /*JS::Value*/ void *aBlobParts, const /*JS::Value*/ void *aParameters, JSContext *cx,
2913            uint8_t _argc, nsIDOMBlob * _retval);
2914     nsresult GetFileId(const /*JS::Value*/ void *aFile, JSContext *cx, int64_t *_retval);
2915     nsresult GetFileReferences(const nsAString *aDatabaseName, int64_t aId, int32_t *aRefCnt, int32_t *aDBRefCnt,
2916            int32_t *aSliceRefCnt, bool *_retval);
2917     nsresult IsIncrementalGCEnabled(JSContext *cx, bool *_retval);
2918     nsresult StartPCCountProfiling(JSContext *cx);
2919     nsresult StopPCCountProfiling(JSContext *cx);
2920     nsresult PurgePCCounts(JSContext *cx);
2921     nsresult GetPCCountScriptCount(JSContext *cx, int32_t *_retval);
2922     nsresult GetPCCountScriptSummary(int32_t script, JSContext *cx, nsAString *_retval);
2923     nsresult GetPCCountScriptContents(int32_t script, JSContext *cx, nsAString *_retval);
2924     nsresult GetPaintingSuppressed(bool *aPaintingSuppressed);
2925     nsresult GetPlugins(JSContext *cx, /*JS::Value*/ void *aPlugins);
2926     nsresult SetScrollPositionClampingScrollPortSize(float aWidth, float aHeight);
2927     nsresult PreventFurtherDialogs();
2928     nsresult LoadSheet(nsIURI *sheetURI, uint32_t type);
2929     nsresult RemoveSheet(nsIURI *sheetURI, uint32_t type);
2930     nsresult GetIsHandlingUserInput(bool *aIsHandlingUserInput);
2931     nsresult AllowScriptsToClose();
2932 }
2933
2934 cpp_quote("#define CONTEXT_NONE              0x00")
2935 cpp_quote("#define CONTEXT_LINK              0x01")
2936 cpp_quote("#define CONTEXT_IMAGE             0x02")
2937 cpp_quote("#define CONTEXT_DOCUMENT          0x04")
2938 cpp_quote("#define CONTEXT_TEXT              0x08")
2939 cpp_quote("#define CONTEXT_INPUT             0x10")
2940 cpp_quote("#define CONTEXT_BACKGROUND_IMAGE  0x20")
2941
2942 [
2943     object,
2944     uuid(3478b6b0-3875-11d4-94ef-0020183bf181),
2945     local
2946 ]
2947 interface nsIContextMenuListener : nsISupports
2948 {
2949     nsresult OnShowContextMenu(uint32_t aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode);
2950 }
2951
2952 [
2953     object,
2954     uuid(415453e6-132a-4902-9a99-cc480f0311b6),
2955     local
2956 ]
2957 interface nsIDOMUIEvent : nsIDOMEvent
2958 {
2959     nsresult GetView(nsIDOMWindow **aView);
2960     nsresult GetDetail(int32_t *aDetail);
2961     nsresult InitUIEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
2962             nsIDOMWindow *viewArg, int32_t detailArg);
2963     nsresult GetLayerX(int32_t *aLayerX);
2964     nsresult GetLayerY(int32_t *aLayerY);
2965     nsresult GetPageX(int32_t *aPageX);
2966     nsresult GetPageY(int32_t *aPageY);
2967     nsresult GetWhich(uint32_t *aWhich);
2968     nsresult GetRangeParent(nsIDOMNode **aRangeParent);
2969     nsresult GetRangeOffset(int32_t *aRangeOffset);
2970     nsresult GetCancelBubble(bool *aCancelBubble);
2971     nsresult SetCancelBubble(bool aCancelBubble);
2972     nsresult GetIsChar(bool *aIsChar);
2973 }
2974
2975 [
2976     object,
2977     uuid(796c3436-5f89-4145-be3a-49808c09fdc6),
2978     local
2979 ]
2980 interface nsIDOMMouseEvent : nsIDOMUIEvent
2981 {
2982     nsresult GetScreenX(int32_t *aScreenX);
2983     nsresult GetScreenY(int32_t *aScreenY);
2984     nsresult GetMozMovementX(int32_t *aMozMovementX);
2985     nsresult GetMozMovementY(int32_t *aMozMovementY);
2986     nsresult GetClientX(int32_t *aClientX);
2987     nsresult GetClientY(int32_t *aClientY);
2988     nsresult GetCtrlKey(bool *aCtrlKey);
2989     nsresult GetShiftKey(bool *aShiftKey);
2990     nsresult GetAltKey(bool *aAltKey);
2991     nsresult GetMetaKey(bool *aMetaKey);
2992     nsresult GetButton(uint16_t *aButton);
2993     nsresult GetButtons(uint16_t *aButtons);
2994     nsresult GetRelatedTarget(nsIDOMEventTarget **aRelatedTarget);
2995     nsresult InitMouseEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
2996             nsIDOMWindow *viewArg, int32_t detailArg, int32_t screenXArg, int32_t screenYArg,
2997             int32_t clientXArg, int32_t clientYArg, bool ctrlKeyArg, bool altKeyArg,
2998             bool shiftKeyArg, bool metaKeyArg, uint16_t buttonArg,
2999             nsIDOMEventTarget *relatedTargetArg);
3000     nsresult GetMozPressure(float *aMozPressure);
3001     nsresult GetMozInputSource(uint16_t *aMozInputSource);
3002     nsresult InitNSMouseEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
3003             nsIDOMWindow *viewArg, int32_t detailArg, int32_t screenXArg, int32_t screenYArg,
3004             int32_t clientXArg, int32_t clientYArg, bool ctrlKeyArg, bool altKeyArg, bool shiftKeyArg,
3005             bool metaKeyArg, uint16_t buttonArg, nsIDOMEventTarget *relatedTargetArg, float pressure,
3006             uint16_t inputSourceArg);
3007     nsresult GetModifierState(const nsAString *keyArg, bool *_retval);
3008 }
3009
3010 [
3011     object,
3012     uuid(5d116380-8432-48cb-a717-200f04c39d2f),
3013     local
3014 ]
3015 interface nsIDOMKeyEvent : nsIDOMUIEvent
3016 {
3017     nsresult GetCharCode(uint32_t *aCharCode);
3018     nsresult GetKeyCode(uint32_t *aKeyCode);
3019     nsresult GetAltKey(bool *aAltKey);
3020     nsresult GetCtrlKey(bool *aCtrlKey);
3021     nsresult GetShiftKey(bool *aShiftKey);
3022     nsresult GetMetaKey(bool *aMetaKey);
3023     nsresult InitKeyEvent(const nsAString *typeArg, bool canBubbleArg,
3024             bool cancelableArg, nsIDOMWindow *viewArg, bool ctrlKeyArg,
3025             bool altKeyArg, bool shiftKeyArg, bool metaKeyArg, uint32_t keyCodeArg,
3026             uint32_t charCodeArg);
3027     nsresult GetModifierState(const nsAString *keyArg, bool *_retval);
3028     nsresult GetLocation(uint32_t *aLocation);
3029 }
3030
3031 [
3032     object,
3033     uuid(0b976267-4aaa-4f36-a2d4-27b5ca8d73bb),
3034     local
3035 ]
3036 interface nsIEmbeddingSiteWindow : nsISupports
3037 {
3038     nsresult SetDimensions(uint32_t flags, int32_t x, int32_t y, int32_t cx, int32_t cy);
3039     nsresult GetDimensions(uint32_t flags, int32_t *x, int32_t *y, int32_t *cx, int32_t *cy);
3040     nsresult SetFocus();
3041     nsresult GetVisibility(bool *aVisibility);
3042     nsresult SetVisibility(bool aVisibility);
3043     nsresult GetTitle(PRUnichar **aTitle);
3044     nsresult SetTitle(const PRUnichar *aTitle);
3045     nsresult GetSiteWindow(void **aSiteWindow);
3046     nsresult Blur();
3047 }
3048
3049 [
3050     object,
3051     uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392),
3052     local
3053 ]
3054 interface nsIComponentRegistrar : nsISupports
3055 {
3056     nsresult AutoRegister(nsIFile *aSpec);
3057     nsresult AutoUnregister(nsIFile *aSpec);
3058     nsresult RegisterFactory(const nsCID *aClass, const char *aClassName,
3059             const char *aContractID, nsIFactory *aFactory);
3060     nsresult UnregisterFactory(const nsCID *aClass, nsIFactory *aFactory);
3061     nsresult RegisterFactoryLocation(const nsCID *aClass, const char *aClassName,
3062             const char *aContractID, nsIFile *aFile, const char *aLoaderStr,
3063             const char *aType);
3064     nsresult UnregisterFactoryLocation(const nsCID *aClass, nsIFile *aFile);
3065     nsresult IsCIDRegistered(const nsCID *aClass, bool *_retval);
3066     nsresult IsContractIDRegistered(const char *aContractID, bool *_retval);
3067     nsresult EnumerateCIDs(nsISimpleEnumerator **_retval);
3068     nsresult EnumerateContractIDs(nsISimpleEnumerator **_retval);
3069     nsresult CIDToContractID(const nsCID *aClass, char **_retval);
3070     nsresult ContractIDToCID(const char *aContractID, nsCID **_retval);
3071 }
3072
3073 [
3074     object,
3075     uuid(1630c61a-325e-49ca-8759-a31b16c47aa5),
3076     local
3077 ]
3078 interface nsIPromptService : nsISupports
3079 {
3080     nsresult Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3081             const PRUnichar *aText);
3082     nsresult AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3083             const PRUnichar *aText, const PRUnichar *aCheckMsg, bool *aCheckState);
3084     nsresult Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3085             const PRUnichar *aText, bool *_retval);
3086     nsresult ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3087             const PRUnichar *aText, const PRUnichar *aCheckMsg, bool *aCheckState,
3088             bool *_retval);
3089     nsresult ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3090             const PRUnichar *aText, uint32_t aButtonFlags, const PRUnichar *aButton0Title,
3091             const PRUnichar *aButton1Title, const PRUnichar *aButton2Title,
3092             const PRUnichar *aCheckMsg, bool *aCheckState, int32_t *_retval);
3093     nsresult Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3094             const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg,
3095             bool *aCheckState, bool *_retval);
3096     nsresult PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3097             const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword,
3098             const PRUnichar *aCheckMsg, bool *aCheckState, bool *_retval);
3099     nsresult PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3100             const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg,
3101             bool *aCheckState, bool *_retval);
3102     nsresult Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3103             const PRUnichar *aText, uint32_t aCount, const PRUnichar **aSelectList,
3104             int32_t *aOutSelection, bool *_retval);
3105 }
3106
3107 [
3108     object,
3109     uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee),
3110     local
3111 ]
3112 interface nsITooltipTextProvider : nsISupports
3113 {
3114     nsresult GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, bool *_retval);
3115 }
3116
3117 [
3118     object,
3119     uuid(24f3f4da-18a4-448d-876d-7360fefac029),
3120     local
3121 ]
3122 interface nsIEditingSession : nsISupports
3123 {
3124     nsresult GetEditorStatus(uint32_t *aEditorStatus);
3125     nsresult MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType,
3126             bool doAfterUriLoad, bool aMakeWholeDocumentEditable, bool aInteractive);
3127     nsresult WindowIsEditable(nsIDOMWindow *window, bool *_retval);
3128     nsresult GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval);
3129     nsresult SetupEditorOnWindow(nsIDOMWindow *window);
3130     nsresult TearDownEditorOnWindow(nsIDOMWindow *window);
3131     nsresult SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor);
3132     nsresult DisableJSAndPlugins(nsIDOMWindow *aWindow);
3133     nsresult RestoreJSAndPlugins(nsIDOMWindow *aWindow);
3134     nsresult DetachFromWindow(nsIDOMWindow *aWindow);
3135     nsresult ReattachToWindow(nsIDOMWindow *aWindow);
3136     nsresult GetJsAndPluginsDisabled(bool *aJsAndPluginsDisabled);
3137 }
3138
3139 [
3140     object,
3141     uuid(83f892cf-7ed3-490e-967a-62640f3158e1),
3142     local
3143 ]
3144 interface nsICommandParams : nsISupports
3145 {
3146     nsresult GetValueType(const char *name, int16_t *_retval);
3147     nsresult GetBooleanValue(const char *name, bool *_retval);
3148     nsresult GetLongValue(const char *name, int32_t *_retval);
3149     nsresult GetDoubleValue(const char *name, double *_retval);
3150     nsresult GetStringValue(const char *name, nsAString *_retval);
3151     nsresult GetCStringValue(const char *name, char **_retval);
3152     nsresult GetISupportsValue(const char *name, nsISupports **_retval);
3153     nsresult SetBooleanValue(const char *name, bool value);
3154     nsresult SetLongValue(const char *name, int32_t value);
3155     nsresult SetDoubleValue(const char *name, double value);
3156     nsresult SetStringValue(const char *name, const nsAString *value);
3157     nsresult SetCStringValue(const char *name, const char *value);
3158     nsresult SetISupportsValue(const char *name, nsISupports *value);
3159     nsresult RemoveValue(const char *name);
3160     nsresult HasMoreElements(bool *_retval);
3161     nsresult First();
3162     nsresult GetNext(char **_retval);
3163 }
3164
3165 [
3166     object,
3167     uuid(080d2001-f91e-11d4-a73c-f9242928207c),
3168     local
3169 ]
3170 interface nsICommandManager : nsISupports
3171 {
3172     nsresult AddCommandObserver(nsIObserver *aCommandObserver, const char *aCommandToObserve);
3173     nsresult RemoveCommandObserver(nsIObserver *aCommandObserver, const char *aCommandObserved);
3174     nsresult IsCommandSupported(const char *aCommandName, nsIDOMWindow *aTargetWindow, bool *_retval);
3175     nsresult IsCommandEnabled(const char *aCommandName, nsIDOMWindow *aTargetWindow, bool *_retval);
3176     nsresult GetCommandState(const char *aCommandName, nsIDOMWindow *aTargetWindow,
3177             nsICommandParams *aCommandParams);
3178     nsresult DoCommand(const char *aCommandName, nsICommandParams *aCommandParams,
3179             nsIDOMWindow *aTargetWindow);
3180 }
3181
3182 [
3183     object,
3184     uuid(47b82b60-a36f-4167-8072-6f421151ed50),
3185     local
3186 ]
3187 interface nsIControllerContext : nsISupports
3188 {
3189     nsresult Init(nsIControllerCommandTable *aCommandTable);
3190     nsresult SetCommandContext(nsISupports *aCommandContext);
3191 }
3192
3193 [
3194     object,
3195     uuid(d5b61b82-1da4-11d3-bf87-00105a1b0627),
3196     local
3197 ]
3198 interface nsIController : nsISupports
3199 {
3200     nsresult IsCommandEnabled(const char *command, bool *_retval);
3201     nsresult SupportsCommand(const char *command, bool *_retval);
3202     nsresult DoCommand(const char *command);
3203     nsresult OnEvent(const char *eventName);
3204 }
3205
3206 [
3207     object,
3208     uuid(e2985850-81ca-4b5d-b0f3-e395d50d8564),
3209     local
3210 ]
3211 interface nsIContent : nsISupports
3212 {
3213     /* This is not a real interface declaration. It's too internal for us. */
3214 }
3215
3216 [
3217     object,
3218     uuid(0e1324c9-c997-447e-bcd9-a657802991e4),
3219     local
3220 ]
3221 interface nsIDocument : nsISupports
3222 {
3223     /* This is not a real interface declaration. It's too internal for us. */
3224 }
3225
3226 [
3227     object,
3228     uuid(b1ee32f2-b8c4-49b9-93df-b6fab5d54688),
3229     local
3230 ]
3231 interface nsIContentSerializer : nsISupports
3232 {
3233     nsresult Init(uint32_t flags, uint32_t aWrapColumn, const char *aCharSet, bool aIsCopying,
3234             bool aIsWholeDocument);
3235     nsresult AppendText(nsIContent *aText, int32_t aStartOffset, int32_t aEndOffset, nsAString *aStr);
3236     nsresult AppendCDATASection(nsIContent *aCDATASection, int32_t aStartOffset,
3237             int32_t aEndOffset, nsAString *aStr);
3238     nsresult AppendProcessingInstruction(nsIContent *aPI, int32_t aStartOffset,
3239             int32_t aEndOffset, nsAString *aStr);
3240     nsresult AppendComment(nsIContent *aComment, int32_t aStartOffset, int32_t aEndOffset,
3241             nsAString *aStr);
3242     nsresult AppendDoctype(nsIContent *aDoctype, nsAString *aStr);
3243     nsresult AppendElementStart(nsIContent *aElement, nsIContent *aOriginalElement,
3244                                 nsAString *aStr);
3245     nsresult AppendElementEnd(nsIContent *aElement, nsAString *aStr);
3246     nsresult Flush(nsAString *aStr);
3247     nsresult AppendDocumentStart(nsIDocument *aDocument, nsAString *aStr);
3248 }
3249
3250 [
3251     object,
3252     uuid(12efa18c-920a-47cd-94a1-4052f245f76c),
3253     local
3254 ]
3255 interface nsIEditor  : nsISupports
3256 {
3257     typedef void *nsIContentPtr;
3258
3259     nsresult GetSelection([out] nsISelection *_retval);
3260     nsresult Init([in] nsIDOMDocument *doc, [in] nsIContentPtr aRoot, [in] nsISelectionController *aSelCon, [in] uint32_t aFlags);
3261     nsresult SetAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] const nsAString *sourceAttrValue, [in] bool aSuppressTransaction);
3262     nsresult RemoveAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] bool aSuppressTransaction);
3263     nsresult PostCreate();
3264     nsresult PreDestroy();
3265     nsresult GetFlags([out] uint32_t *_retval);
3266     nsresult SetFlags([in] uint32_t val);
3267     nsresult GetContentsMIMEType([out] char **_retval);
3268     nsresult SetContentsMIMEType([in] const char *val);
3269     nsresult GetIsDocumentEditable([out] bool *_retval);
3270     nsresult GetIsSelectionEditable(bool *aIsSelectionEditable);
3271     nsresult GetDocument([out] nsIDOMDocument **_retval);
3272     nsresult GetRootElement([out] nsIDOMElement **_retval);
3273     nsresult GetSelectionController([out] nsISelectionController **_retval);
3274     nsresult DeleteSelection(int16_t action, int16_t aStripWrappers);
3275     nsresult GetDocumentIsEmpty([out] bool *_retval);
3276     nsresult GetDocumentModified([out] bool *_retval);
3277     nsresult GetDocumentCharacterSet([out] nsACString *_retval);
3278     nsresult SetDocumentCharacterSet([in] const nsACString *val);
3279     nsresult ResetModificationCount();
3280     nsresult GetModificationCount([out] int32_t *_retval);
3281     nsresult IncrementModificationCount([in] int32_t aModCount);
3282     nsresult GetTransactionManager([out] nsITransactionManager **_retval);
3283     nsresult SetTransactionManager(nsITransactionManager *aTransactionManager);
3284     nsresult DoTransaction([in] nsITransaction *txn);
3285     nsresult EnableUndo([in] bool enable);
3286     nsresult GetNumberOfUndoItems(int32_t *aNumberOfUndoItems);
3287     nsresult GetNumberOfRedoItems(int32_t *aNumberOfRedoItems);
3288     nsresult Undo([in] uint32_t count);
3289     nsresult CanUndo([out] bool *isEnabled, [out] bool *canUndo);
3290     nsresult Redo([in] uint32_t count);
3291     nsresult CanRedo([out] bool *isEnabled, [out] bool *canRedo);
3292     nsresult BeginTransaction();
3293     nsresult EndTransaction();
3294     nsresult BeginPlaceHolderTransaction([in] nsIAtom *name);
3295     nsresult EndPlaceHolderTransaction();
3296     nsresult ShouldTxnSetSelection([out] bool *_retval);
3297     nsresult SetShouldTxnSetSelection([in] bool should);
3298     nsresult GetInlineSpellChecker([out] nsIInlineSpellChecker **_retval);
3299     nsresult SyncRealTimeSpell();
3300     nsresult SetSpellcheckUserOverride(bool enable);
3301     nsresult Cut();
3302     nsresult CanCut([out] bool *_retval);
3303     nsresult Copy();
3304     nsresult CanCopy([out] bool *_retval);
3305     nsresult Paste([in] int32_t aSelectionType);
3306     nsresult PasteTransferable(nsITransferable *aTransferable);
3307     nsresult CanPaste([in] int32_t aSelectionType, [out] bool *_retval);
3308     nsresult CanPasteTransferable(nsITransferable *aTransferable, bool *_retval);
3309     nsresult SelectAll();
3310     nsresult BeginningOfDocument();
3311     nsresult EndOfDocument();
3312     nsresult SetAttribute([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [in] const nsAString *attvalue);
3313     nsresult GetAttributeValue([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [out] nsAString *resultValue, bool *_retval);
3314     nsresult RemoveAttribute([in] nsIDOMElement *aElement, [in] const nsAString *aAttribute);
3315     nsresult CloneAttribute([in] const nsAString *aAttribute, [in] nsIDOMNode *aDestNode, [in] nsIDOMNode *aSourceNode);
3316     nsresult CloneAttributes([in] nsIDOMNode *destNode, [in] nsIDOMNode *sourceNode);
3317     nsresult CreateNode([in] const nsAString *tag, [in] nsIDOMNode *parent, [in] int32_t position, [out] nsIDOMNode **_retval);
3318     nsresult InsertNode([in] nsIDOMNode *node, [in] nsIDOMNode *parent, [in] int32_t aPosition);
3319     nsresult SplitNode([in] nsIDOMNode *existingRightNode, [in] int32_t offset, [out] nsIDOMNode **newLeftNode);
3320     nsresult JoinNodes([in] nsIDOMNode *leftNode, [in] nsIDOMNode *rightNode, [in] nsIDOMNode *parent);
3321     nsresult DeleteNode([in] nsIDOMNode *child);
3322     bool OutputsMozDirty();
3323     nsresult MarkNodeDirty([in] nsIDOMNode *node);
3324     nsresult SwitchTextDirection();
3325     nsresult OutputToString([in] nsAString formatType, [in] uint32_t flags, [out] nsAString *_retval);
3326     nsresult OutputToStream([in] nsIOutputStream *aStream, [in] nsAString *formatType, [in] nsACString *charsetOverride, [in] uint32_t flags);
3327     nsresult SetEditorObserver(void /* EditActionListener*/ *observer);
3328     nsresult RemoveEditorObserver();
3329     nsresult AddEditActionListener([in] nsIEditActionListener *listener);
3330     nsresult RemoveEditActionListener([in] nsIEditActionListener *listener);
3331     nsresult AddDocumentStateListener([in] nsIDocumentStateListener *listener);
3332     nsresult RemoveDocumentStateListener([in] nsIDocumentStateListener *listener);
3333     nsresult DumpContentTree();
3334     nsresult DebugDumpContent();
3335     nsresult DebugUnitTests([out] int32_t *outNumTests, [out] int32_t *outNumTestsFailed);
3336     bool IsModifiableNode(nsIDOMNode *aNode);
3337     nsresult GetLastKeypressEventTrusted(bool *aLastKeypressEventTrusted);
3338     nsresult SetSuppressDispatchingInputEvent(bool aSuppressDispatchingInputEvent);
3339 }
3340
3341 [
3342     object,
3343     uuid(833f30de-94c7-4630-a852-2300ef329d7b),
3344     local
3345 ]
3346 interface nsIHTMLEditor : nsISupports
3347 {
3348     nsresult AddDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
3349     nsresult RemoveDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
3350     nsresult RemoveAllDefaultProperties();
3351     nsresult SetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
3352     nsresult GetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] bool *aFirst, [out] bool *aAny, [out] bool *aAll);
3353     nsresult GetInlinePropertyWithAttrValue([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] bool *aFirst, [out] bool *aAny, [out] bool *aAll, [out] nsAString *_retval);
3354     nsresult RemoveAllInlineProperties();
3355     nsresult RemoveInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute);
3356     nsresult IncreaseFontSize();
3357     nsresult DecreaseFontSize();
3358     nsresult NodeIsBlock([in] nsIDOMNode *node, bool *_retval);
3359     nsresult InsertHTML([in] nsAString *aInputString);
3360     nsresult PasteNoFormatting([in] int32_t aSelectionType);
3361     nsresult RebuildDocumentFromSource([in] nsAString *aSourceString);
3362     nsresult InsertHTMLWithContext([in] nsAString *aInputString, [in] nsAString *aContextStr, [in] nsAString *aInfoStr, [in] nsAString *aFlavor, [in] nsIDOMDocument *aSourceDoc, [in] nsIDOMNode *aDestinationNode, [in] int32_t aDestinationOffset, [in] bool aDeleteSelection);
3363     nsresult InsertElementAtSelection([in] nsIDOMElement *aElement, [in] bool aDeleteSelection);
3364     nsresult SetDocumentTitle([in] nsAString *aTitle);
3365     nsresult UpdateBaseURL();
3366     nsresult SelectElement([in] nsIDOMElement *aElement);
3367     nsresult SetCaretAfterElement([in] nsIDOMElement *aElement);
3368     nsresult SetParagraphFormat([in] nsAString *aParagraphFormat);
3369     nsresult GetParagraphState([out] bool *aMixed, [out] nsAString *_retval);
3370     nsresult GetFontFaceState([out] bool *aMixed, [out] nsAString *_retval);
3371     nsresult GetFontColorState([out] bool *aMixed, [out] nsAString *_retval);
3372     nsresult GetBackgroundColorState([out] bool *aMixed, [out] nsAString *_retval);
3373     nsresult GetHighlightColorState([out] bool *aMixed, [out] nsAString *_retval);
3374     nsresult GetListState([out] bool *aMixed, [out] bool *aOL, [out] bool *aUL, [out] bool *aDL);
3375     nsresult GetListItemState([out] bool *aMixed, [out] bool *aLI, [out] bool *aDT, [out] bool *aDD);
3376     nsresult GetAlignment([out] bool *aMixed, [out] int16_t *aAlign);
3377     nsresult GetIndentState([out] bool *aCanIndent, [out] bool *aCanOutdent);
3378     nsresult MakeOrChangeList([in] nsAString *aListType, [in] bool entireList, [in] nsAString *aBulletType);
3379     nsresult RemoveList([in] nsAString *aListType);
3380     nsresult Indent([in] nsAString *aIndent);
3381     nsresult Align([in] nsAString *aAlign);
3382     nsresult GetElementOrParentByTagName([in] nsAString *aTagName, [in] nsIDOMNode *aNode, [out] nsIDOMElement **_retval);
3383     nsresult GetSelectedElement([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
3384     nsresult GetHeadContentsAsHTML([out] nsAString *_retval);
3385     nsresult ReplaceHeadContentsWithHTML([in] nsAString *aSourceToInsert);
3386     nsresult CreateElementWithDefaults([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
3387     nsresult InsertLinkAroundSelection([in] nsIDOMElement *aAnchorElement);
3388     nsresult SetBackgroundColor([in] nsAString *aColor);
3389     nsresult SetBodyAttribute([in] nsAString *aAttr, [in] nsAString *aValue);
3390     nsresult GetLinkedObjects([out] nsISupportsArray **_retval);
3391     nsresult GetIsCSSEnabled([out] bool *_retval);
3392     nsresult SetIsCSSEnabled([in] bool prb);
3393     nsresult AddInsertionListener([in] nsIContentFilter *inFilter);
3394     nsresult RemoveInsertionListener([in] nsIContentFilter *inFilter);
3395     nsresult CreateAnonymousElement([in] nsAString *aTag, [in] nsIDOMNode *aParentNode, [in] nsAString *aAnonClass, [in] bool aIsCreatedHidden, [out] nsIDOMElement **_retval);
3396     nsresult GetSelectionContainer([out] nsIDOMElement **_retval);
3397     nsresult CheckSelectionStateForAnonymousButtons([in] nsISelection *aSelection);
3398     nsresult IsAnonymousElement([in] nsIDOMElement *aElement, [out] bool *_retval);
3399     nsresult GetReturnInParagraphCreatesNewParagraph([out] bool *_retval);
3400     nsresult SetReturnInParagraphCreatesNewParagraph([in] bool prb);
3401     nsresult BreakIsVisible(nsIDOMNode *aNode, bool *_retval);
3402     void /*Element*/ *GetActiveEditingHost();
3403 }
3404
3405 [
3406     object,
3407     uuid(318ce516-3f7a-41f6-8f3d-3661650f7a46),
3408     local
3409 ]
3410 interface nsIDocShell : nsISupports
3411 {
3412     nsresult LoadURI(nsIURI *uri, nsIDocShellLoadInfo *loadInfo, uint32_t aLoadFlags, bool firstParty);
3413     nsresult LoadStream(nsIInputStream *aStream, nsIURI *aURI, const nsACString *aContentType,
3414             const nsACString *aContentCharset, nsIDocShellLoadInfo *aLoadInfo);
3415     nsresult InternalLoad(nsIURI *aURI, nsIURI *aReferrer, nsISupports *aOwner, uint32_t aFlags, const PRUnichar *aWindowTarget,
3416             const char *aTypeHint, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, uint32_t aLoadFlags,
3417             nsISHEntry *aSHEntry, bool firstParty, nsIDocShell **aDocShell, nsIRequest **aRequest);
3418     nsresult AddState(nsIVariant *aData, const nsAString *aTitle, const nsAString *aURL, bool aReplace, JSContext *cx);
3419     nsresult CreateLoadInfo(nsIDocShellLoadInfo **loadInfo);
3420     nsresult PrepareForNewContentModel();
3421     nsresult SetCurrentURI(nsIURI *aURI);
3422     nsresult FirePageHideNotification(bool isUnload);
3423     nsresult GetPresContext(void /*nsPresContext*/ **aPresContext);
3424     nsresult GetPresShell(nsIPresShell **aPresShell);
3425     nsresult GetEldestPresShell(nsIPresShell **aEldestPresShell);
3426     nsresult GetContentViewer(nsIContentViewer **aContentViewer);
3427     nsresult GetChromeEventHandler(nsIDOMEventTarget **aChromeEventHandler);
3428     nsresult SetChromeEventHandler(nsIDOMEventTarget *aChromeEventHandler);
3429     nsresult GetAllowPlugins(bool *aAllowPlugins);
3430     nsresult SetAllowPlugins(bool aAllowPlugins);
3431     nsresult GetAllowJavascript(bool *aAllowJavascript);
3432     nsresult SetAllowJavascript(bool aAllowJavascript);
3433     nsresult GetDisableNoScript(bool *aDisableNoScript);
3434     nsresult SetDisableNoScript(bool aDisableNoScript);
3435     nsresult GetAllowMetaRedirects(bool *aAllowMetaRedirects);
3436     nsresult SetAllowMetaRedirects(bool aAllowMetaRedirects);
3437     nsresult GetAllowSubframes(bool *aAllowSubframes);
3438     nsresult SetAllowSubframes(bool aAllowSubframes);
3439     nsresult GetAllowImages(bool *aAllowImages);
3440     nsresult SetAllowImages(bool aAllowImages);
3441     nsresult GetAllowDNSPrefetch(bool *aAllowDNSPrefetch);
3442     nsresult SetAllowDNSPrefetch(bool aAllowDNSPrefetch);
3443     nsresult GetAllowWindowControl(bool *aAllowWindowControl);
3444     nsresult SetAllowWindowControl(bool aAllowWindowControl);
3445     nsresult GetDocShellEnumerator(int32_t aItemType, int32_t aDirection, nsISimpleEnumerator **_retval);
3446     nsresult GetAppType(uint32_t *aAppType);
3447     nsresult SetAppType(uint32_t aAppType);
3448     nsresult GetAllowAuth(bool *aAllowAuth);
3449     nsresult SetAllowAuth(bool aAllowAuth);
3450     nsresult GetZoom(float *aZoom);
3451     nsresult SetZoom(float aZoom);
3452     nsresult GetMarginWidth(int32_t *aMarginWidth);
3453     nsresult SetMarginWidth(int32_t aMarginWidth);
3454     nsresult GetMarginHeight(int32_t *aMarginHeight);
3455     nsresult SetMarginHeight(int32_t aMarginHeight);
3456     nsresult TabToTreeOwner(bool forward, bool *tookFocus);
3457     nsresult GetBusyFlags(uint32_t *aBusyFlags);
3458     nsresult GetLoadType(uint32_t *aLoadType);
3459     nsresult SetLoadType(uint32_t aLoadType);
3460     nsresult IsBeingDestroyed(bool *_retval);
3461     nsresult GetIsExecutingOnLoadHandler(bool *aIsExecutingOnLoadHandler);
3462     nsresult GetLayoutHistoryState(nsILayoutHistoryState **aLayoutHistoryState);
3463     nsresult SetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState);
3464     nsresult GetShouldSaveLayoutState(bool *aShouldSaveLayoutState);
3465     nsresult GetSecurityUI(nsISecureBrowserUI **aSecurityUI);
3466     nsresult SetSecurityUI(nsISecureBrowserUI *aSecurityUI);
3467     nsresult SuspendRefreshURIs();
3468     nsresult ResumeRefreshURIs();
3469     nsresult BeginRestore(nsIContentViewer *viewer, bool top);
3470     nsresult FinishRestore();
3471     nsresult GetRestoringDocument(bool *aRestoringDocument);
3472     nsresult GetUseErrorPages(bool *aUseErrorPages);
3473     nsresult SetUseErrorPages(bool aUseErrorPages);
3474     nsresult GetPreviousTransIndex(int32_t *aPreviousTransIndex);
3475     nsresult GetLoadedTransIndex(int32_t *aLoadedTransIndex);
3476     nsresult HistoryPurged(int32_t numEntries);
3477     nsresult GetSessionStorageForPrincipal(nsIPrincipal *principal, const nsAString *documentURI,
3478             bool create, nsIDOMStorage **_retval);
3479     nsresult AddSessionStorage(nsIPrincipal *principal, nsIDOMStorage *storage);
3480     nsresult CloneSessionStoragesTo(nsIDocShell *docShell);
3481     nsresult ClearSessionStorages();
3482     nsresult GetCurrentDocumentChannel(nsIChannel **aCurrentDocumentChannel);
3483     nsresult SetChildOffset(uint32_t offset);
3484     nsresult GetIsInUnload(bool *aIsInUnload);
3485     nsresult GetChannelIsUnsafe(bool *aChannelIsUnsafe);
3486     void DetachEditorFromWindow();
3487     nsresult GetIsOffScreenBrowser(bool *aIsOffScreenBrowser);
3488     nsresult SetIsOffScreenBrowser(bool aIsOffScreenBrowser);
3489     nsresult GetPrintPreview(nsIWebBrowserPrint **aPrintPreview);
3490     nsresult GetCanExecuteScripts(bool *aCanExecuteScripts);
3491     nsresult GetIsActive(bool *aIsActive);
3492     nsresult SetIsActive(bool aIsActive);
3493     nsresult GetHistoryID(uint64_t *aHistoryID);
3494     nsresult GetIsAppTab(bool *aIsAppTab);
3495     nsresult SetIsAppTab(bool aIsAppTab);
3496     nsresult CreateAboutBlankContentViewer(nsIPrincipal *aPrincipal);
3497     nsresult GetCharset(char **aCharset);
3498     nsresult SetCharset(const char * aCharset);
3499     nsresult GetForcedCharset(nsIAtom **aForcedCharset);
3500     nsresult SetForcedCharset(nsIAtom *aForcedCharset);
3501     nsresult GetParentCharset(nsIAtom **aParentCharset);
3502     nsresult SetParentCharset(nsIAtom *aParentCharset);
3503     nsresult GetParentCharsetSource(int32_t *aParentCharsetSource);
3504     nsresult SetParentCharsetSource(int32_t aParentCharsetSource);
3505     nsresult AddWeakPrivacyTransitionObserver(nsIPrivacyTransitionObserver *obs);
3506     nsresult GetIsBrowserElement(bool *aIsBrowserElement);
3507     nsresult GetIsApp(bool *aIsApp);
3508     nsresult GetIsBrowserOrApp(bool *aIsBrowserOrApp);
3509     nsresult GetIsInBrowserElement(bool *aIsInBrowserElement);
3510     nsresult GetIsInBrowserOrApp(bool *aIsInBrowserOrApp);
3511     nsresult SetIsApp(uint32_t ownAppId);
3512     nsresult SetIsBrowserInsideApp(uint32_t containingAppId);
3513     nsresult GetAppId(uint32_t *aAppId);
3514     nsresult GetSameTypeParentIgnoreBrowserAndAppBoundaries(nsIDocShell **_retval);
3515     nsresult GetAsyncPanZoomEnabled(bool *aAsyncPanZoomEnabled);
3516     nsresult GetSandboxFlags(uint32_t *aSandboxFlags);
3517     nsresult SetSandboxFlags(uint32_t aSandboxFlags);
3518     bool PluginsAllowedInCurrentDoc();
3519     nsresult GetFullscreenAllowed(bool *aFullscreenAllowed);
3520     nsresult SetFullscreenAllowed(bool allowed);
3521 }
3522
3523 [
3524     object,
3525     uuid(16fe5e3e-eadc-4312-9d44-b6bedd6b5474),
3526     local
3527 ]
3528 interface nsIMutationObserver : nsISupports
3529 {
3530     void CharacterDataWillChange(nsIDocument *aDocument, nsIContent *aContent,
3531                                  void /*CharacterDataChangeInfo*/ *aInfo);
3532     void CharacterDataChanged(nsIDocument *aDocument, nsIContent *aContent,
3533                               void /*CharacterDataChangeInfo*/ *aInfo);
3534     void AttributeWillChange(nsIDocument *aDocument, nsIContent *aContent, int32_t aNameSpaceID,
3535                              nsIAtom *aAttribute, int32_t aModType);
3536     void AttributeChanged(nsIDocument *aDocument, nsIContent *aContent, int32_t aNameSpaceID,
3537                           nsIAtom *aAttribute, int32_t aModType);
3538     void AttributeSetToCurrentValue(nsIDocument *aDocument, /*mozilla::dom::Element*/ void *aElement,
3539                                     int32_t aNameSpaceID, nsIAtom *aAttribute);
3540     void ContentAppended(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aFirstNewContent,
3541                          int32_t aNewIndexInContainer);
3542     void ContentInserted(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
3543                          int32_t aIndexInContainer);
3544     void ContentRemoved(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
3545                         int32_t aIndexInContainer, nsIContent *aPreviousSibling);
3546     void NodeWillBeDestroyed(const nsINode *aNode);
3547     void ParentChainChanged(nsIContent *aContent);
3548 }
3549
3550 [
3551     object,
3552     uuid(2c4ad90a-740e-4212-ba3f-feacda4b929e),
3553     local
3554 ]
3555 interface nsIParser : nsISupports
3556 {
3557     typedef int nsDTDMode;
3558     typedef int eParserCommands;
3559
3560     /* From nsParserBase: */
3561     bool IsParserEnabled();
3562     nsresult GetChannel(nsIChannel **aChannel);
3563
3564     void SetContentSink(nsIContentSink *aSink);
3565     nsIContentSink *GetContentSink();
3566     void GetCommand(nsACString *aCommand);
3567     void SetCommand2(const char *aCommand);
3568     void SetCommand(eParserCommands aParserCommand);
3569     void SetDocumentCharset(const nsACString *aCharset, int32_t aSource);
3570     void GetDocumentCharset(nsACString *oCharset, int32_t *oSource);
3571     nsresult GetDTD(nsIDTD **aDTD);
3572     nsIStreamListener *GetStreamListener();
3573     nsresult ContinueInterruptedParsing();
3574     void BlockParser();
3575     void UnblockParser();
3576     void ContinueInterruptedParsingAsync();
3577     bool IsComplete();
3578     nsresult Parse(nsIURI *aURL, nsIRequestObserver *aListener, void *aKey, nsDTDMode aMode);
3579     nsresult Terminate();
3580     nsresult ParseFragment(const nsAString *aSourceBuffer, void /*nsTArray<nsString>*/ *aTagStack);
3581     nsresult BuildModel();
3582     nsresult CancelParsingEvents();
3583     void Reset();
3584     bool IsInsertionPointDefined();
3585     void BeginEvaluatingParserInsertedScript();
3586     void EndEvaluatingParserInsertedScript();
3587     void MarkAsNotScriptCreated(const char *aCommand);
3588     bool IsScriptCreated();
3589 }
3590
3591 [
3592     object,
3593     uuid(900bc4bc-8b6c-4cba-82fa-568a80fffd3e),
3594     local
3595 ]
3596 interface nsIDocumentObserver : nsIMutationObserver
3597 {
3598     typedef uint32_t nsUpdateType;
3599
3600     typedef struct {
3601         uint64_t mStates;
3602     } nsEventStates;
3603
3604     void BeginUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
3605     void EndUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
3606     void BeginLoad(nsIDocument *aDocument);
3607     void EndLoad(nsIDocument *aDocument);
3608     void ContentStatesChanged(nsIDocument *aDocument, nsIContent *aContent, nsEventStates *aStateMask);
3609     void DocumentStatesChanged(nsIDocument *aDocument, nsEventStates *aStateMask);
3610     void StyleSheetAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, bool aDocumentSheet);
3611     void StyleSheetRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, bool aDocumentSheet);
3612     void StyleSheetApplicableStateChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet,
3613                                           bool aApplicable);
3614     void StyleRuleChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule,
3615                           nsIStyleRule *aNewStyleRule);
3616     void StyleRuleAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule);
3617     void StyleRuleRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule);
3618     void BindToDocument(nsIDocument *aDocument, nsIContent *aContent);
3619     void AttemptToExecuteScript(nsIContent *aContent, nsIParser *aParser, bool *aBlock);
3620 }
3621
3622 [
3623     object,
3624     uuid(c61eac14-5f7a-4481-965e-7eaa6effa85f),
3625     local
3626 ]
3627 interface nsCycleCollectionISupports {}
3628
3629 [
3630     object,
3631     uuid(3682dd99-8560-44f4-9b8f-ccce9d7b96fb),
3632     local
3633 ]
3634 interface nsIContentUtils : nsISupports
3635 {
3636     bool IsSafeToRunScript();
3637     nsresult AddDocumentObserver(nsIDocument *aDocument, nsIDocumentObserver *aObserver);
3638     nsresult RemoveDocumentObserver(nsIDocument *aDocument, nsIDocumentObserver *aObserver);
3639     nsresult AddMutationObserver(nsINode *aNode, nsIMutationObserver *aObserver);
3640     nsresult RemoveMutationObserver(nsINode *aNode, nsIMutationObserver *aObserver);
3641     nsresult AddScriptRunner(nsIRunnable *aRunnable);
3642     JSContext *GetContextFromDocument(nsIDocument *aDocument);
3643 }
3644
3645 [
3646     object,
3647     uuid(8f672000-bab9-4c60-aaaf-2673c4e2a4c6),
3648     local
3649 ]
3650 interface nsIPluginInstance : nsISupports
3651 {
3652     nsresult GetDOMElement(nsIDOMElement **aDOMElement);
3653 }