nsiface.idl 162 KB
Newer Older
1
/*
2
 * Copyright 2005-2012 Jacek Caban for CodeWeavers
3 4 5 6 7 8 9 10 11 12 13 14 15
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * 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 22 23
 * This file is not a typical idl file. Interfaces in this file are XPCOM
 * interfaces (NOT MSCOM!), but we generate the header file with WIDL
 * compatible with XPCOM, usable in C code.
24 25
 */

26
cpp_quote("#define GECKO_VERSION \"2.24\"")
27
cpp_quote("#define GECKO_VERSION_STRING \"Wine Gecko \" GECKO_VERSION")
28

29 30
import "wtypes.idl";

31 32 33 34 35
cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
cpp_quote("#undef GetForm")
cpp_quote("#undef SetPort")
cpp_quote("#endif")

36 37 38
typedef HRESULT nsresult;
typedef ULONG nsrefcnt;

39
typedef IID nsID;
40 41 42 43 44 45 46
typedef IID nsIID;
typedef nsIID nsCID;
typedef REFIID nsIIDRef;
typedef nsIIDRef nsCIDRef;

typedef WCHAR PRUnichar;

47 48 49 50 51
/*
 * Mozilla uses stdint.h types for its headers. Following defines make this IDL file
 * more similar to original declarations. Note that it's only a widl trick, we can't
 * use stdint.h types in C.
 */
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 62

typedef uint64_t DOMTimeStamp;
typedef uint32_t nsLoadFlags;
63
typedef int64_t PRTime;
64 65

/* Similar trick to stdint.h types for C++ bool type */
66 67
typedef unsigned char cpp_bool;
#define bool cpp_bool
68

69 70 71
typedef struct {
    void *v;
    void *d1;
72
    uint32_t d2;
73 74 75
    void *d3;
} nsCStringContainer;

76 77 78
typedef struct {
    void *v;
    void *d1;
79
    uint32_t d2;
80 81 82
    void *d3;
} nsStringContainer;

83
typedef nsCStringContainer nsACString;
84 85
typedef nsStringContainer nsAString;

86
interface nsIWebBrowserChrome;
87
interface nsILoadGroup;
88
interface nsIDOMNode;
89
interface nsIDOMAttr;
90
interface nsIDOMDocument;
91
interface nsIDOMEvent;
92 93 94 95 96 97 98 99 100
interface nsIEditor;
interface nsISelectionController;
interface nsITransactionManager;
interface nsITransaction;
interface nsIInlineSpellChecker;
interface nsIOutputStream;
interface nsIEditorObserver;
interface nsIEditActionListener;
interface nsIDocumentStateListener;
101
interface nsIDOMCSSStyleSheet;
102
interface nsIDOMDocumentView;
103
interface nsIDOMWindow;
104
interface nsIDOMElement;
105
interface nsIDOMRange;
106 107
interface nsIDOMEventTarget;
interface nsISelection;
108
interface nsIDOMHTMLSelectElement;
109
interface nsIFile;
110

111 112
interface IMoniker;

113 114
[
    object,
115 116
    uuid(00000000-0000-0000-c000-000000000046),
    local
117 118 119
]
interface nsISupports
{
120
    nsresult QueryInterface(nsIIDRef riid, void **result);
121 122 123 124 125 126 127
    nsrefcnt AddRef();
    nsrefcnt Release();
}

/* Currently we don't need a full declaration of these interfaces */
typedef nsISupports nsISHistory;
typedef nsISupports nsIWidget;
128 129
typedef nsISupports nsIPrompt;
typedef nsISupports nsIAuthPrompt;
130 131 132 133 134
typedef nsISupports nsIDOMDocumentType;
typedef nsISupports nsIDOMDOMImplementation;
typedef nsISupports nsIDOMCDATASection;
typedef nsISupports nsIDOMProcessingInstruction;
typedef nsISupports nsIDOMEntityReference;
135
typedef nsISupports nsIWebProgressListener;
136
typedef nsISupports nsIDOMCSSValue;
137
typedef nsISupports nsIPrintSession;
138
typedef nsISupports nsIControllerCommandTable;
139 140
typedef nsISupports nsIPrincipal;
typedef nsISupports nsIAtom;
141 142
typedef nsISupports nsISupportsArray;
typedef nsISupports nsIContentFilter;
143
typedef nsISupports nsIDOMMediaList;
144 145
typedef nsISupports nsIDOMHTMLTableCaptionElement;
typedef nsISupports nsIDOMHTMLTableSectionElement;
146 147 148 149
typedef nsISupports nsIDOMClientRectList;
typedef nsISupports nsINode;
typedef nsISupports nsIStyleSheet;
typedef nsISupports nsIStyleRule;
150
typedef nsISupports nsIDOMUserDataHandler;
151 152 153 154 155 156 157 158
typedef nsISupports nsIDocShellLoadInfo;
typedef nsISupports nsISHEntry;
typedef nsISupports nsIPresShell;
typedef nsISupports nsIContentViewer;
typedef nsISupports nsIDocumentCharsetInfo;
typedef nsISupports nsILayoutHistoryState;
typedef nsISupports nsISecureBrowserUI;
typedef nsISupports nsIDOMStorage;
159 160 161
typedef nsISupports nsIDOMDOMTokenList;
typedef nsISupports nsITransferable;
typedef nsISupports nsIDOMFileList;
162
typedef nsISupports nsIDOMFile;
163
typedef nsISupports nsIControllers;
164
typedef nsISupports nsIDOMValidityState;
165 166
typedef nsISupports nsIPluginInstanceOwner;
typedef nsISupports nsIPluginStreamListener;
167 168 169
typedef nsISupports nsIContentSink;
typedef nsISupports nsIParserFilter;
typedef nsISupports nsIDTD;
170
typedef nsISupports nsIObserver;
171 172 173 174 175
typedef nsISupports nsIDOMNodeFilter;
typedef nsISupports nsIDOMNodeIterator;
typedef nsISupports nsIDOMTreeWalker;
typedef nsISupports nsIHttpUpgradeListener;
typedef nsISupports nsIDOMDOMStringMap;
176 177 178 179 180 181 182 183 184 185 186
typedef nsISupports nsIDOMDOMStringList;
typedef nsISupports nsIDOMOfflineResourceList;
typedef nsISupports nsIDOMHistory;
typedef nsISupports nsIDOMNavigator;
typedef nsISupports nsIDOMMediaQueryList;
typedef nsISupports nsIDOMScreen;
typedef nsISupports nsIAnimationFrameListener;
typedef nsISupports nsIDOMStorageList;
typedef nsISupports nsILocalFile;
typedef nsISupports nsIDOMHTMLMenuElement;
typedef nsISupports nsIDOMCaretPosition;
187
typedef nsISupports nsIFrameRequestCallback;
188 189 190 191
typedef nsISupports nsICycleCollectorListener;
typedef nsISupports nsIDOMHTMLCanvasElement;
typedef nsISupports nsIQueryContentEventResult;
typedef nsISupports nsIDOMBlob;
192 193 194
typedef nsISupports nsIPrivacyTransitionObserver;
typedef nsISupports nsIDOMHTMLPropertiesCollection;
typedef nsISupports mozIDOMApplication;
195 196 197 198
typedef nsISupports nsILoadGroupConnectionInfo;
typedef nsISupports nsIDOMCrypto;
typedef nsISupports nsIDOMPkcs11;
typedef nsISupports nsIDocShellTreeOwner;
199 200 201

typedef void *JSContext;
typedef void *JSObject;
202
typedef uint64_t jsval;
203 204 205

[
    object,
206 207
    uuid(8bb35ed9-e332-462d-9155-4a002ab5c958),
    local
208 209 210 211
]
interface nsIServiceManager : nsISupports
{
    nsresult GetService(nsCIDRef aClass, nsIIDRef aIID, void **result);
Jacek Caban's avatar
Jacek Caban committed
212
    nsresult GetServiceByContractID(const char *aContractID, nsIIDRef aIID, void **result);
213
    nsresult IsServiceInstantiated(nsCIDRef aClass, nsIIDRef aIID, BOOL *_retval);
214
    nsresult IsServiceInstantiatedByContractID(const char *aContractID, nsIIDRef aIID, BOOL *_retval);
215 216
}

217 218
[
    object,
219 220
    uuid(00000001-0000-0000-c000-000000000046),
    local
221 222 223 224
]
interface nsIFactory : nsISupports
{
    nsresult CreateInstance(nsISupports *aOuter, const nsIID *iid, void **result);
225
    nsresult LockFactory(bool lock);
226 227
}

228 229
[
    object,
230
    uuid(6aef11c4-8615-44a6-9711-98f43805693d),
231
    local
232 233 234 235 236 237
]
interface nsIMemory : nsISupports
{
    void *Alloc(/*size_t*/ int size);
    void *Realloc(void *_ptr, /*size_t*/ int newSize);
    void Free(void *_ptr);
238 239
    nsresult HeapMinimize(bool immediate);
    nsresult IsLowMemory(bool *_retval);
240
    nsresult IsLowMemoryPlatform(bool *_retval);
241 242 243 244
}

[
    object,
245 246
    uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf),
    local
247 248 249 250 251 252 253 254
]
interface nsIWeakReference : nsISupports
{
    nsresult QueryReferent(const nsIID *riid, void **result);
}

[
    object,
255 256
    uuid(9188bc86-f92e-11d2-81ef-0060083a0bcf),
    local
257 258 259 260 261 262
]
interface nsISupportsWeakReference : nsISupports
{
    nsresult GetWeakReference(nsIWeakReference **_retval);
}

263 264
[
    object,
265 266
    uuid(033a1470-8b2a-11d3-af88-00a024ffc08c),
    local
267 268 269 270 271 272
]
interface nsIInterfaceRequestor : nsISupports
{
    nsresult GetInterface(const nsIID *riid, void **result);
}

273 274 275 276 277 278 279 280 281 282
[
    object,
    uuid(4a2abaf0-6886-11d3-9382-00104ba0fd40),
    local
]
interface nsIRunnable : nsISupports
{
    nsresult Run();
}

283 284
[
    object,
285 286
    uuid(d1899240-f9d2-11d2-bdd6-000064657374),
    local
287 288 289
]
interface nsISimpleEnumerator : nsISupports
{
290
    nsresult HasMoreElements(bool *_retval);
291 292 293
    nsresult GetNext(nsISupports **_retval);
}

294 295 296 297 298 299 300
[
    object,
    uuid(81e4c2de-acac-4ad6-901a-b5fb1b851a0d),
    local
]
interface nsIVariant : nsISupports
{
301 302 303 304 305 306 307 308 309
    nsresult GetDataType(uint16_t *aDataType);
    nsresult GetAsInt8(uint8_t *_retval);
    nsresult GetAsInt16(int16_t *_retval);
    nsresult GetAsInt32(int32_t *_retval);
    nsresult GetAsInt64(int64_t *_retval);
    nsresult GetAsUint8(uint8_t *_retval);
    nsresult GetAsUint16(uint16_t *_retval);
    nsresult GetAsUint32(uint32_t *_retval);
    nsresult GetAsUint64(uint64_t *_retval);
310 311
    nsresult GetAsFloat(float *_retval);
    nsresult GetAsDouble(double *_retval);
312
    nsresult GetAsBool(bool *_retval);
313 314 315 316 317 318 319 320 321 322 323 324
    nsresult GetAsChar(char *_retval);
    nsresult GetAsWChar(PRUnichar *_retval);
    nsresult GetAsID(nsID *retval);
    nsresult GetAsAString(nsAString *_retval);
    nsresult GetAsDOMString(nsAString *_retval);
    nsresult GetAsACString(nsACString *_retval);
    nsresult GetAsAUTF8String(nsACString *_retval);
    nsresult GetAsString(char * *_retval);
    nsresult GetAsWString(PRUnichar * *_retval);
    nsresult GetAsISupports(nsISupports * *_retval);
    nsresult GetAsJSVal(long /*jsval*/ *_retval);
    nsresult GetAsInterface(nsIID **iid, void **iface);
325 326 327
    nsresult GetAsArray(uint16_t *type, nsIID *iid, uint32_t *count, void **ptr);
    nsresult GetAsStringWithSize(uint32_t *size, char **str);
    nsresult GetAsWStringWithSize(uint32_t *size, PRUnichar **str);
328 329 330 331 332 333 334 335 336
}

[
    object,
    uuid(5586a590-8c82-11d5-90f3-0010a4e73d9a),
    local
]
interface nsIWritableVariant : nsIVariant
{
337 338
    nsresult GetWritable(bool *aWritable);
    nsresult SetWritable(bool aWritable);
339 340 341 342 343 344 345 346
    nsresult SetAsInt8(uint8_t aValue);
    nsresult SetAsInt16(int16_t aValue);
    nsresult SetAsInt32(int32_t aValue);
    nsresult SetAsInt64(int64_t aValue);
    nsresult SetAsUint8(uint8_t aValue);
    nsresult SetAsUint16(uint16_t aValue);
    nsresult SetAsUint32(uint32_t aValue);
    nsresult SetAsUint64(uint64_t aValue);
347 348
    nsresult SetAsFloat(float aValue);
    nsresult SetAsDouble(double aValue);
349
    nsresult SetAsBool(bool aValue);
350 351 352 353 354 355 356 357 358 359 360
    nsresult SetAsChar(char aValue);
    nsresult SetAsWChar(PRUnichar aValue);
    nsresult SetAsID(const nsID *aValue);
    nsresult SetAsAString(const nsAString *aValue);
    nsresult SetAsDOMString(const nsAString *aValue);
    nsresult SetAsACString(const nsACString *aValue);
    nsresult SetAsAUTF8String(const nsACString *aValue);
    nsresult SetAsString(const char * aValue);
    nsresult SetAsWString(const PRUnichar * aValue);
    nsresult SetAsISupports(nsISupports *aValue);
    nsresult SetAsInterface(const nsIID *iid, void *iface);
361 362 363
    nsresult SetAsArray(uint16_t type, const nsIID *iid, uint32_t count, void *ptr);
    nsresult SetAsStringWithSize(uint32_t size, const char *str);
    nsresult SetAsWStringWithSize(uint32_t size, const PRUnichar *str);
364 365 366 367 368 369
    nsresult SetAsVoid();
    nsresult SetAsEmpty();
    nsresult SetAsEmptyArray();
    nsresult SetFromVariant(nsIVariant *aValue);
}

370 371
[
    object,
372
    uuid(53cdbc97-c2d7-4e30-b2c3-45b2ee79db18),
373
    local
374 375 376 377
]
interface nsIInputStream : nsISupports
{
    nsresult Close();
378
    nsresult Available(uint64_t *_retval);
379
    nsresult Read(char *aBuf, uint32_t aCount, uint32_t *_retval);
380
    nsresult ReadSegments(nsresult (*aWriter)(nsIInputStream *aInStream,
381 382 383
            void *aClosure, const char *aFromSegment, uint32_t aToOffset,
            uint32_t aCount, uint32_t *aWriteCount),
            void *aClosure, uint32_t aCount, uint32_t *_retval);
384
    nsresult IsNonBlocking(bool *_retval);
385 386
}

387 388
[
    object,
389
    uuid(395fe045-7d18-4adb-a3fd-af98c8a1af11),
390
    local
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408
]
interface nsIURI : nsISupports
{
    nsresult GetSpec(nsACString *aSpec);
    nsresult SetSpec(const nsACString *aSpec);
    nsresult GetPrePath(nsACString *aPrePath);
    nsresult GetScheme(nsACString *aScheme);
    nsresult SetScheme(const nsACString *aScheme);
    nsresult GetUserPass(nsACString *aUserPass);
    nsresult SetUserPass(const nsACString *aUserPass);
    nsresult GetUsername(nsACString *aUsername);
    nsresult SetUsername(const nsACString *aUsername);
    nsresult GetPassword(nsACString *aPassword);
    nsresult SetPassword(const nsACString *aPassword);
    nsresult GetHostPort(nsACString *aHostPort);
    nsresult SetHostPort(const nsACString *aHostPort);
    nsresult GetHost(nsACString *aHost);
    nsresult SetHost(const nsACString *aHost);
409 410
    nsresult GetPort(int32_t *aPort);
    nsresult SetPort(int32_t aPort);
411 412
    nsresult GetPath(nsACString *aPath);
    nsresult SetPath(const nsACString *aPath);
413 414
    nsresult Equals(nsIURI *other, bool *_retval);
    nsresult SchemeIs(const char *scheme, bool *_retval);
415 416 417 418 419
    nsresult Clone(nsIURI **_retval);
    nsresult Resolve(const nsACString *relativePath, nsACString *_retval);
    nsresult GetAsciiSpec(nsACString *aAsciiSpec);
    nsresult GetAsciiHost(nsACString *aAsciiHost);
    nsresult GetOriginCharset(nsACString *aOriginCharset);
420 421
    nsresult GetRef(nsACString *aRef);
    nsresult SetRef(const nsACString *aRef);
422
    nsresult EqualsExceptRef(nsIURI *other, bool *_retval);
423 424
    nsresult CloneIgnoringRef(nsIURI **_retval);
    nsresult GetSpecIgnoringRef(nsACString *aSpecIgnoringRef);
425
    nsresult GetHasRef(bool *aHasRef);
426 427
}

428 429
[
    object,
430
    uuid(1419aa16-f134-4154-9886-00c7c5147a13),
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
    local
]
interface nsIURL : nsIURI
{
    nsresult GetFilePath(nsACString *aFilePath);
    nsresult SetFilePath(const nsACString *aFilePath);
    nsresult GetQuery(nsACString *aQuery);
    nsresult SetQuery(const nsACString *aQuery);
    nsresult GetDirectory(nsACString *aDirectory);
    nsresult SetDirectory(const nsACString *aDirectory);
    nsresult GetFileName(nsACString *aFileName);
    nsresult SetFileName(const nsACString *aFileName);
    nsresult GetFileBaseName(nsACString *aFileBaseName);
    nsresult SetFileBaseName(const nsACString *aFileBaseName);
    nsresult GetFileExtension(nsACString *aFileExtension);
    nsresult SetFileExtension(const nsACString *aFileExtension);
    nsresult GetCommonBaseSpec(nsIURI *aURIToCompare, nsACString *_retval);
    nsresult GetRelativeSpec(nsIURI *aURIToCompare, nsACString *_retval);
}

451 452 453 454 455 456 457 458 459 460 461
[
    object,
    uuid(7750029c-1b0a-414e-8359-a77f24a2a0a6),
    local
]
interface nsIFileURL : nsIURL
{
    nsresult GetFile(nsIFile **aFile);
    nsresult SetFile(nsIFile *aFile);
}

462 463 464 465 466 467 468
[
    object,
    uuid(321578d0-03c1-4d95-8821-021ac612d18d),
    local
]
interface nsIMutable : nsISupports
{
469 470
    nsresult GetMutable(bool *aMutable);
    nsresult SetMutable(bool aMutable);
471 472 473 474 475 476 477 478 479
}

[
    object,
    uuid(babd6cca-ebe7-4329-967c-d6b9e33caa81),
    local
]
interface nsIStandardURL : nsIMutable
{
480
    nsresult Init(uint32_t aUrlType, int32_t aDefaultPort, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI);
481 482
}

483 484
[
    object,
485 486
    uuid(ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe),
    local
487 488 489 490
]
interface nsIRequest : nsISupports
{
    nsresult GetName(nsACString *aName);
491
    nsresult IsPending(bool *_retval);
492 493 494 495 496 497 498 499 500 501
    nsresult GetStatus(nsresult *aStatus);
    nsresult Cancel(nsresult aStatus);
    nsresult Suspend();
    nsresult Resume();
    nsresult GetLoadGroup(nsILoadGroup **aLoadGroup);
    nsresult SetLoadGroup(nsILoadGroup *aLoadGroup);
    nsresult GetLoadFlags(nsLoadFlags *aLoadFlags);
    nsresult SetLoadFlags(nsLoadFlags aLoadFlags);
}

502 503
[
    object,
504 505
    uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40),
    local
506 507 508 509 510 511 512 513 514
]
interface nsIRequestObserver : nsISupports
{
    nsresult OnStartRequest(nsIRequest *aRequest, nsISupports *aContext);
    nsresult OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode);
}

[
    object,
515
    uuid(3b4c8a77-76ba-4610-b316-678c73a3b88c),
516
    local
517
]
518 519 520
interface nsIStreamListener : nsIRequestObserver
{
    nsresult OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
521
                             nsIInputStream *aInputStream, uint64_t aOffset, uint32_t aCount);
522 523
}

524 525
[
    object,
526
    uuid(19501006-46e3-4634-b97d-26eff894b4d3),
527
    local
528 529 530 531 532 533 534 535 536 537
]
interface nsILoadGroup : nsIRequest
{
    nsresult GetGroupObserver(nsIRequestObserver **aGroupObserver);
    nsresult SetGroupObserver(nsIRequestObserver *aGroupObserver);
    nsresult GetDefaultLoadRequest(nsIRequest **aDefaultLoadRequest);
    nsresult SetDefaultLoadRequest(nsIRequest *aDefaultLoadRequest);
    nsresult AddRequest(nsIRequest *aRequest, nsISupports *aContext);
    nsresult RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus);
    nsresult GetRequests(nsISimpleEnumerator **aRequests);
538
    nsresult GetActiveCount(uint32_t *aActiveCount);
539 540
    nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
    nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
541
    nsresult GetConnectionInfo(nsILoadGroupConnectionInfo **aConnectionInfo);
542 543
}

544 545
[
    object,
546
    uuid(2a8a7237-c1e2-4de7-b669-2002af29e42d),
547
    local
548 549 550
]
interface nsIChannel : nsIRequest
{
551 552 553 554 555 556 557 558 559 560
    const UINT LOAD_DOCUMENT_URI            = 1 << 16;
    const UINT LOAD_RETARGETED_DOCUMENT_URI = 1 << 17;
    const UINT LOAD_REPLACE                 = 1 << 18;
    const UINT LOAD_INITIAL_DOCUMENT_URI    = 1 << 19;
    const UINT LOAD_TARGETED                = 1 << 20;
    const UINT LOAD_CALL_CONTENT_SNIFFERS   = 1 << 21;
    const UINT LOAD_CLASSIFY_URI            = 1 << 22;
    const UINT LOAD_TREAT_APPLICATION_OCTET_STREAM_AS_UNKNOWN = 1 << 23;
    const UINT LOAD_EXPLICIT_CREDENTIALS    = 1 << 24;

561 562 563 564 565 566 567 568 569 570 571 572
    nsresult GetOriginalURI(nsIURI **aOriginalURI);
    nsresult SetOriginalURI(nsIURI *aOriginalURI);
    nsresult GetURI(nsIURI **aURI);
    nsresult GetOwner(nsISupports **aOwner);
    nsresult SetOwner(nsISupports *aOwner);
    nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
    nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
    nsresult GetSecurityInfo(nsISupports **aSecurityInfo);
    nsresult GetContentType(nsACString *aContentType);
    nsresult SetContentType(const nsACString *aContentType);
    nsresult GetContentCharset(nsACString *aContentCharset);
    nsresult SetContentCharset(const nsACString *aContentCharset);
573 574
    nsresult GetContentLength(int64_t *aContentLength);
    nsresult SetContentLength(int64_t aContentLength);
575 576
    nsresult Open(nsIInputStream **_retval);
    nsresult AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext);
577
    nsresult GetContentDisposition(uint32_t *aContentDisposition);
578
    nsresult SetContentDisposition(uint32_t aContentDisposition);
579
    nsresult GetContentDispositionFilename(nsAString *aContentDispositionFilename);
580
    nsresult SetContentDispositionFilename(const nsAString *aContentDispositionFilename);
581
    nsresult GetContentDispositionHeader(nsACString *aContentDispositionHeader);
582 583
}

584 585
[
    object,
586
    uuid(35412859-b9d9-423c-8866-2d4559fdd2be),
587 588 589 590 591 592 593
    local
]
interface nsIHttpHeaderVisitor : nsISupports
{
    nsresult VisitHeader(const nsACString *aHeader, const nsACString *aValue);
}

594 595
[
    object,
596
    uuid(a01362a0-5c45-11e2-bcfd-0800200c9a66),
597
    local
598 599 600 601 602 603 604 605
]
interface nsIHttpChannel : nsIChannel
{
    nsresult GetRequestMethod(nsACString *aRequestMethod);
    nsresult SetRequestMethod(const nsACString *aRequestMethod);
    nsresult GetReferrer(nsIURI **aReferrer);
    nsresult SetReferrer(nsIURI *aReferrer);
    nsresult GetRequestHeader(const nsACString *aHeader, nsACString *_retval);
606
    nsresult SetRequestHeader(const nsACString *aHeader, const nsACString *aValue, bool aMerge);
607
    nsresult VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor);
608 609
    nsresult GetAllowPipelining(bool *aAllowPipelining);
    nsresult SetAllowPipelining(bool aAllowPipelining);
610 611 612
    nsresult GetRedirectionLimit(uint32_t *aRedirectionLimit);
    nsresult SetRedirectionLimit(uint32_t aRedirectionLimit);
    nsresult GetResponseStatus(uint32_t *aResponseStatus);
613
    nsresult GetResponseStatusText(nsACString *aResponseStatusText);
614
    nsresult GetRequestSucceeded(bool *aRequestSucceeded);
615
    nsresult GetResponseHeader(const nsACString *header, nsACString *_retval);
616
    nsresult SetResponseHeader(const nsACString *header, const nsACString *value, bool merge);
617
    nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor);
618 619
    nsresult IsNoStoreResponse(bool *_retval);
    nsresult IsNoCacheResponse(bool *_retval);
620
    nsresult RedirectTo(nsIURI *aNewURI);
621 622
}

623 624
[
    object,
625
    uuid(2cd7f6a6-63f3-4bd6-a0f5-6e3d6dcff81b),
626 627 628 629 630 631
    local
]
interface nsIHttpChannelInternal : nsISupports
{
    nsresult GetDocumentURI(nsIURI **aDocumentURI);
    nsresult SetDocumentURI(nsIURI *aDocumentURI);
632 633
    nsresult GetRequestVersion(uint32_t *major, uint32_t *minor);
    nsresult GetResponseVersion(uint32_t *major, uint32_t *minor);
634 635
    nsresult SetCookie(const char *aCookieHeader);
    nsresult SetupFallbackChannel(const char *aFallbackKey);
636 637 638 639 640
    nsresult GetForceAllowThirdPartyCookie(bool *aForceAllowThirdPartyCookie);
    nsresult SetForceAllowThirdPartyCookie(bool aForceAllowThirdPartyCookie);
    nsresult GetCanceled(bool *aCanceled);
    nsresult GetChannelIsForDownload(bool *aChannelIsForDownload);
    nsresult SetChannelIsForDownload(bool aChannelIsForDownload);
641
    nsresult GetLocalAddress(nsACString *aLocalAddress);
642
    nsresult GetLocalPort(int32_t *aLocalPort);
643
    nsresult GetRemoteAddress(nsACString *aRemoteAddress);
644
    nsresult GetRemotePort(int32_t *aRemotePort);
645 646
    nsresult SetCacheKeysRedirectChain(void /*nsTArray<nsCString>*/ *cacheKeys);
    nsresult HTTPUpgrade(const nsACString *aProtocolName, nsIHttpUpgradeListener *aListener);
647 648
    nsresult GetAllowSpdy(bool *aAllowSpdy);
    nsresult SetAllowSpdy(bool aAllowSpdy);
649 650 651 652
    nsresult GetLoadAsBlocking(bool *aLoadAsBlocking);
    nsresult SetLoadAsBlocking(bool aLoadAsBlocking);
    nsresult GetLoadUnblocked(bool *aLoadUnblocked);
    nsresult SetLoadUnblocked(bool aLoadUnblocked);
653 654
}

655 656
[
    object,
657
    uuid(5cfe15bd-5adb-4a7f-9e55-4f5a67d15794),
658
    local
659 660 661 662
]
interface nsIUploadChannel : nsISupports
{
    nsresult SetUploadStream(nsIInputStream *aStream, const nsACString *aContentType,
663
                             int64_t aContentLength);
664 665 666
    nsresult GetUploadStream(nsIInputStream **aUploadStream);
}

667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687
[
    object,
    uuid(8d171460-a716-41f1-92be-8c659db39b45),
    local
]
interface nsIAsyncVerifyRedirectCallback : nsISupports
{
    nsresult OnRedirectVerifyCallback(nsresult result);
}

[
    object,
    uuid(a430d870-df77-4502-9570-d46a8de33154),
    local
]
interface nsIChannelEventSink : nsISupports
{
    cpp_quote("#define REDIRECT_TEMPORARY 1")
    cpp_quote("#define REDIRECT_PERMANENT 2")
    cpp_quote("#define REDIRECT_INTERNAL  4")

688
    nsresult AsyncOnChannelRedirect(nsIChannel *oldChannel, nsIChannel *newChannel, uint32_t flags,
689 690 691
                                    nsIAsyncVerifyRedirectCallback *callback);
}

692 693
[
    object,
694
    uuid(79de76e5-994e-4f6b-81aa-42d9adb6e67e),
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714
    local
]
interface nsIDOMLocation : nsISupports
{
    nsresult GetHash(nsAString *aHash);
    nsresult SetHash(const nsAString *aHash);
    nsresult GetHost(nsAString *aHost);
    nsresult SetHost(const nsAString *aHost);
    nsresult GetHostname(nsAString *aHostname);
    nsresult SetHostname(const nsAString *aHostname);
    nsresult GetHref(nsAString *aHref);
    nsresult SetHref(const nsAString *aHref);
    nsresult GetPathname(nsAString *aPathname);
    nsresult SetPathname(const nsAString *aPathname);
    nsresult GetPort(nsAString *aPort);
    nsresult SetPort(const nsAString *aPort);
    nsresult GetProtocol(nsAString *aProtocol);
    nsresult SetProtocol(const nsAString *aProtocol);
    nsresult GetSearch(nsAString *aSearch);
    nsresult SetSearch(const nsAString *aSearch);
715
    nsresult GetOrigin(nsAString *aOrigin);
716
    nsresult Reload(bool forceget);
717 718 719
    nsresult Replace(const nsAString *url);
    nsresult Assign(const nsAString *url);
    nsresult ToString(nsAString *_retval);
720
    nsresult ValueOf(nsIDOMLocation **_retval);
721 722
}

723 724
[
    object,
725
    uuid(2938307a-9d70-4b63-8afc-0197e82318ad),
726
    local
727 728 729
]
interface nsIDOMCSSRule : nsISupports
{
730
    nsresult GetType(uint16_t *aType);
731 732 733 734 735 736
    nsresult GetCssText(nsAString *aCssText);
    nsresult SetCssText(const nsAString *aCssText);
    nsresult GetParentStyleSheet(nsIDOMCSSStyleSheet **aParentStyleSheet);
    nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
}

737 738
[
    object,
739 740
    uuid(a6cf90be-15b3-11d2-932e-00805f8add32),
    local
741 742 743 744 745 746 747 748 749 750 751
]
interface nsIDOMCSSStyleDeclaration : nsISupports
{
    nsresult GetCssText(nsAString *aCssText);
    nsresult SetCssText(const nsAString *aCssText);
    nsresult GetPropertyValue(const nsAString *propertyName, nsAString *_retval);
    nsresult GetPropertyCSSValue(const nsAString *propertyName, nsIDOMCSSValue **_retval);
    nsresult RemoveProperty(const nsAString *propertyName, nsAString *_retval);
    nsresult GetPropertyPriority(const nsAString *propertyName, nsAString *_retval);
    nsresult SetProperty(const nsAString *propertyName, const nsAString *value,
                         const nsAString *priority);
752 753
    nsresult GetLength(uint32_t *aLength);
    nsresult Item(uint32_t index, nsAString *_retval);
754 755 756
    nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
}

757 758
[
    object,
759 760
    uuid(a6cf90c0-15b3-11d2-932e-00805f8add32),
    local
761 762 763
]
interface nsIDOMCSSRuleList : nsISupports
{
764 765
    nsresult GetLength(uint32_t *aLength);
    nsresult Item(uint32_t index, nsIDOMCSSRule **_retval);
766 767
}

768 769
[
    object,
770 771
    uuid(a6cf9080-15b3-11d2-932e-00805f8add32),
    local
772 773 774 775
]
interface nsIDOMStyleSheet : nsISupports
{
    nsresult GetType(nsAString *aType);
776 777
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
778 779 780 781 782 783 784 785 786
    nsresult GetOwnerNode(nsIDOMNode **aOwnerNode);
    nsresult GetParentStyleSheet(nsIDOMStyleSheet **aParentStyleSheet);
    nsresult GetHref(nsAString *aHref);
    nsresult GetTitle(nsAString *aTitle);
    nsresult GetMedia(nsIDOMMediaList **aMedia);
}

[
    object,
787 788
    uuid(a6cf90c2-15b3-11d2-932e-00805f8add32),
    local
789 790 791 792 793
]
interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet
{
    nsresult GetOwnerRule(nsIDOMCSSRule **aOwnerRule);
    nsresult GetCssRules(nsIDOMCSSRuleList **aCssRules);
794 795
    nsresult InsertRule(const nsAString *rule, uint32_t index, uint32_t *_retval);
    nsresult DeleteRule(uint32_t index);
796 797
}

798 799
[
    object,
800 801
    uuid(a6cf9081-15b3-11d2-932e-00805f8add32),
    local
802 803 804
]
interface nsIDOMStyleSheetList : nsISupports
{
805 806
    nsresult GetLength(uint32_t *aLength);
    nsresult Item(uint32_t index, nsIDOMStyleSheet **_retval);
807 808
}

809 810
[
    object,
811
    uuid(450cf0ba-de90-4f86-85bf-e10cc8b8713f),
812
    local
813 814 815
]
interface nsIDOMNodeList : nsISupports
{
816 817
    nsresult Item(uint32_t index, nsIDOMNode **_retval);
    nsresult GetLength(uint32_t *aLength);
818 819 820 821 822 823 824 825 826 827 828 829
}

[
    object,
    uuid(bb07f567-5b37-4172-92aa-7d00ceed4809),
    local
]
interface nsIDOMHTMLCollection : nsISupports
{
    nsresult GetLength(uint32_t *aLength);
    nsresult Item(uint32_t index, nsIDOMNode **_retval);
    nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
830 831
}

832 833
[
    object,
834
    uuid(cb5564cd-26ec-418f-a6d6-1d57cd2c971c),
835 836
    local
]
837
interface nsIDOMMozNamedAttrMap : nsISupports
838
{
839 840 841 842
    nsresult GetNamedItem(const nsAString *name, nsIDOMAttr **_retval);
    nsresult SetNamedItem(nsIDOMAttr *arg, nsIDOMAttr **_retval);
    nsresult RemoveNamedItem(const nsAString *name, nsIDOMAttr **_retval);
    nsresult Item(uint32_t index, nsIDOMAttr **_retval);
843
    nsresult GetLength(uint32_t *aLength);
844 845 846
    nsresult GetNamedItemNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMAttr **_retval);
    nsresult SetNamedItemNS(nsIDOMAttr *arg, nsIDOMAttr **_retval);
    nsresult RemoveNamedItemNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMAttr **_retval);
847 848
}

849 850
[
    object,
851
    uuid(56545150-a001-484e-9ed4-cb319eebd7b3),
852
    local
853 854 855
]
interface nsIDOMNode : nsISupports
{
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870
    enum NSNODETYPE {
        ELEMENT_NODE = 1,
        ATTRIBUTE_NODE = 2,
        TEXT_NODE = 3,
        CDATA_SELECTION_NODE = 4,
        ENTITY_REFERENCE_NODE = 5,
        ENTITY_NODE = 6,
        PROCESSING_INSTRUCTION_NODE = 7,
        COMMENT_NODE = 8,
        DOCUMENT_NODE = 9,
        DOCUMENT_TYPE_NODE = 10,
        DOCUMENT_FRAGMENT_NODE = 11,
        NOTATION_NODE = 12
    };

871 872 873 874 875 876 877 878 879
    enum {
        DOCUMENT_POSITION_DISCONNECTED = 1,
        DOCUMENT_POSITION_PRECEDING = 2,
        DOCUMENT_POSITION_FOLLOWING = 4,
        DOCUMENT_POSITION_CONTAINS = 8,
        DOCUMENT_POSITION_CONTAINED_BY = 16,
        DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32
    };

880 881 882
    nsresult GetNodeName(nsAString *aNodeName);
    nsresult GetNodeValue(nsAString *aNodeValue);
    nsresult SetNodeValue(const nsAString *aNodeValue);
883
    nsresult GetNodeType(uint16_t *aNodeType);
884
    nsresult GetParentNode(nsIDOMNode **aParentNode);
885
    nsresult GetParentElement(nsIDOMElement **aParentElement);
886 887 888 889 890 891 892 893 894 895
    nsresult GetChildNodes(nsIDOMNodeList **aChildNodes);
    nsresult GetFirstChild(nsIDOMNode **aFirstChild);
    nsresult GetLastChild(nsIDOMNode **aLastChild);
    nsresult GetPreviousSibling(nsIDOMNode **aPreviousSibling);
    nsresult GetNextSibling(nsIDOMNode **aNextSibling);
    nsresult GetOwnerDocument(nsIDOMDocument **aOwnerDocument);
    nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval);
    nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval);
    nsresult RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval);
    nsresult AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval);
896
    nsresult HasChildNodes(bool *_retval);
897
    nsresult CloneNode(bool deep, uint8_t _argc, nsIDOMNode **_retval);
898 899 900 901
    nsresult Normalize();
    nsresult GetNamespaceURI(nsAString *aNamespaceURI);
    nsresult GetPrefix(nsAString *aPrefix);
    nsresult GetLocalName(nsAString *aLocalName);
902
    nsresult HasAttributes(bool *_retval);
903
    nsresult GetDOMBaseURI(nsAString *aBaseURI);
904
    nsresult CompareDocumentPosition(nsIDOMNode *other, uint16_t *_retval);
905 906 907
    nsresult GetTextContent(nsAString *aTextContent);
    nsresult SetTextContent(const nsAString *aTextContent);
    nsresult LookupPrefix(const nsAString *namespaceURI, nsAString *_retval);
908
    nsresult IsDefaultNamespace(const nsAString *namespaceURI, bool *_retval);
909
    nsresult LookupNamespaceURI(const nsAString *prefix, nsAString *_retval);
910
    nsresult IsEqualNode(nsIDOMNode *arg, bool *_retval);
911 912
    nsresult SetUserData(const nsAString *key, nsIVariant *data, nsIDOMUserDataHandler *handler, nsIVariant **_retval);
    nsresult GetUserData(const nsAString *key, nsIVariant **_retval);
913
    nsresult Contains(nsIDOMNode *aOther, bool *_retval);
914 915 916

    nsresult GetMshtmlNode(nsISupports **aMshtmlNode);
    nsresult SetMshtmlNode(nsISupports *aMshtmlNode);
917 918
}

919 920
[
    object,
921
    uuid(a974a4d3-2ff1-445b-8b8e-0aada5d4eedc),
922 923 924 925 926
    local
]
interface nsIDOMAttr : nsIDOMNode
{
    nsresult GetName(nsAString *aName);
927
    nsresult GetSpecified(bool *aSpecified);
928 929 930
    nsresult GetValue(nsAString *aValue);
    nsresult SetValue(const nsAString *aValue);
    nsresult GetOwnerElement(nsIDOMElement **aOwnerElement);
931
    nsresult GetIsId(bool *aIsId);
932 933
}

934 935 936 937 938 939 940 941 942 943 944 945 946 947 948
[
    object,
    uuid(b2f824c4-d9d3-499b-8d3b-45c8245497c6),
    local
]
interface nsIDOMClientRect : nsISupports
{
    nsresult GetLeft(float *aLeft);
    nsresult GetTop(float *aTop);
    nsresult GetRight(float *aRight);
    nsresult GetBottom(float *aBottom);
    nsresult GetWidth(float *aWidth);
    nsresult GetHeight(float *aHeight);
}

949 950
[
    object,
951
    uuid(43d985da-b7ee-4d1f-a26f-348ccd9506f3),
952 953
    local
]
954
interface nsIDOMElement : nsIDOMNode
955
{
956
    nsresult GetTagName(nsAString *aTagName);
957
    nsresult GetClassList(nsISupports **aClassList);
958
    nsresult GetAttributes(nsIDOMMozNamedAttrMap **aAttributes);
959 960 961 962 963 964 965 966 967 968 969 970 971
    nsresult GetAttribute(const nsAString *name, nsAString *_retval);
    nsresult GetAttributeNS(const nsAString *namespaceURI, const nsAString *localName, nsAString *_retval);
    nsresult SetAttribute(const nsAString *name, const nsAString *value);
    nsresult SetAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName, const nsAString *value);
    nsresult RemoveAttribute(const nsAString *name);
    nsresult RemoveAttributeNS(const nsAString *namespaceURI, const nsAString *localName);
    nsresult HasAttribute(const nsAString *name, bool *_retval);
    nsresult HasAttributeNS(const nsAString *namespaceURI, const nsAString *localName, bool *_retval);
    nsresult GetAttributeNode(const nsAString *name, nsIDOMAttr **_retval);
    nsresult SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
    nsresult RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval);
    nsresult GetAttributeNodeNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMAttr **_retval);
    nsresult SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
972 973 974
    nsresult GetElementsByTagName(const nsAString *name, nsIDOMHTMLCollection **_retval);
    nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMHTMLCollection **_retval);
    nsresult GetElementsByClassName(const nsAString *classes, nsIDOMHTMLCollection **_retval);
975 976 977 978 979
    nsresult GetChildElements(nsIDOMNodeList **aChildren);
    nsresult GetFirstElementChild(nsIDOMElement **aFirstElementChild);
    nsresult GetLastElementChild(nsIDOMElement **aLastElementChild);
    nsresult GetPreviousElementSibling(nsIDOMElement **aPreviousElementSibling);
    nsresult GetNextElementSibling(nsIDOMElement **aNextElementSibling);
980
    nsresult GetChildElementCount(uint32_t *aChildElementCount);
981
    nsresult Remove();
982 983 984 985
    nsresult GetOnmouseenter(JSContext *cx, jsval *aOnmouseenter);
    nsresult SetOnmouseenter(JSContext *cx, const jsval *aOnmouseenter);
    nsresult GetOnmouseleave(JSContext *cx, jsval *aOnmouseleave);
    nsresult SetOnmouseleave(JSContext *cx, const jsval *aOnmouseleave);
986 987
    nsresult GetClientRects(nsIDOMClientRectList **_retval);
    nsresult GetBoundingClientRect(nsIDOMClientRect **_retval);
988 989 990 991 992 993 994 995 996 997 998 999
    nsresult GetScrollTop(int32_t *aScrollTop);
    nsresult SetScrollTop(int32_t aScrollTop);
    nsresult GetScrollLeft(int32_t *aScrollLeft);
    nsresult SetScrollLeft(int32_t aScrollLeft);
    nsresult GetScrollWidth(int32_t *aScrollWidth);
    nsresult GetScrollHeight(int32_t *aScrollHeight);
    nsresult GetClientTop(int32_t *aClientTop);
    nsresult GetClientLeft(int32_t *aClientLeft);
    nsresult GetClientWidth(int32_t *aClientWidth);
    nsresult GetClientHeight(int32_t *aClientHeight);
    nsresult GetScrollLeftMax(int32_t *aScrollLeftMax);
    nsresult GetScrollTopMax(int32_t *aScrollTopMax);
1000 1001
    nsresult MozMatchesSelector(const nsAString *selector, bool *_retval);
    nsresult SetCapture(bool retargetToElement);
1002
    nsresult ReleaseCapture();
1003 1004
    nsresult MozRequestFullScreen();
    nsresult MozRequestPointerLock();
1005 1006 1007 1008 1009 1010 1011 1012 1013 1014
}

[
    object,
    uuid(99715845-95fc-4a56-aa53-214b65c26e22),
    local
]
interface nsIDOMElementCSSInlineStyle : nsISupports
{
    nsresult GetStyle(nsIDOMCSSStyleDeclaration **aStyle);
1015 1016
}

1017
cpp_quote("#undef GetClassName")
1018 1019 1020

[
    object,
1021
    uuid(e29ddc73-ac40-40fe-8bbd-14bf2d52c53a),
1022
    local
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035
]
interface nsIDOMHTMLElement : nsIDOMElement
{
    nsresult GetId(nsAString *aId);
    nsresult SetId(const nsAString *aId);
    nsresult GetTitle(nsAString *aTitle);
    nsresult SetTitle(const nsAString *aTitle);
    nsresult GetLang(nsAString *aLang);
    nsresult SetLang(const nsAString *aLang);
    nsresult GetDir(nsAString *aDir);
    nsresult SetDir(const nsAString *aDir);
    nsresult GetClassName(nsAString *aClassName);
    nsresult SetClassName(const nsAString *aClassName);
1036
    nsresult GetDataset(nsISupports **aDataset);
1037 1038 1039 1040 1041 1042
    nsresult GetItemScope(bool *aItemScope);
    nsresult SetItemScope(bool aItemScope);
    nsresult GetItemType(nsIVariant **aItemType);
    nsresult SetItemType(nsIVariant *aItemType);
    nsresult GetItemId(nsAString *aItemId);
    nsresult SetItemId(const nsAString *aItemId);
1043
    nsresult GetProperties(nsISupports **aProperties);
1044 1045 1046 1047 1048 1049
    nsresult GetItemValue(nsIVariant **aItemValue);
    nsresult SetItemValue(nsIVariant *aItemValue);
    nsresult GetItemProp(nsIVariant **aItemProp);
    nsresult SetItemProp(nsIVariant *aItemProp);
    nsresult GetItemRef(nsIVariant **aItemRef);
    nsresult SetItemRef(nsIVariant *aItemRef);
1050 1051
    nsresult GetHidden(bool *aHidden);
    nsresult SetHidden(bool aHidden);
1052
    nsresult Click();
1053 1054
    nsresult GetTabIndex(int32_t *aTabIndex);
    nsresult SetTabIndex(int32_t aTabIndex);
1055 1056 1057 1058 1059
    nsresult Focus();
    nsresult Blur();
    nsresult GetAccessKey(nsAString *aAccessKey);
    nsresult SetAccessKey(const nsAString *aAccessKey);
    nsresult GetAccessKeyLabel(nsAString *aAccessKeyLabel);
1060 1061
    nsresult GetDraggable(bool *aDraggable);
    nsresult SetDraggable(bool aDraggable);
1062 1063
    nsresult GetContentEditable(nsAString *aContentEditable);
    nsresult SetContentEditable(const nsAString *aContentEditable);
1064
    nsresult GetIsContentEditable(bool *aIsContentEditable);
1065
    nsresult GetContextMenu(nsIDOMHTMLMenuElement **aContextMenu);
1066 1067
    nsresult GetSpellcheck(bool *aSpellcheck);
    nsresult SetSpellcheck(bool aSpellcheck);
1068 1069 1070 1071 1072
    nsresult GetInnerHTML(nsAString *aInnerHTML);
    nsresult SetInnerHTML(const nsAString *aInnerHTML);
    nsresult GetOuterHTML(nsAString *aInnerHTML);
    nsresult SetOuterHTML(const nsAString *aInnerHTML);
    nsresult InsertAdjacentHTML(const nsAString *position, const nsAString *text);
1073
    nsresult ScrollIntoView(bool top, uint8_t _argc);
1074
    nsresult GetOffsetParent(nsIDOMElement * *aOffsetParent);
1075 1076 1077 1078
    nsresult GetOffsetTop(int32_t *aOffsetTop);
    nsresult GetOffsetLeft(int32_t *aOffsetLeft);
    nsresult GetOffsetWidth(int32_t *aOffsetWidth);
    nsresult GetOffsetHeight(int32_t *aOffsetHeight);
1079 1080
}

1081 1082
[
    object,
1083
    uuid(889602bb-4681-4b01-8582-4fad1fbb8325),
1084 1085 1086 1087 1088 1089
    local
]
interface nsIDOMHTMLHeadElement : nsIDOMHTMLElement
{
}

1090 1091
[
    object,
1092
    uuid(84f72a38-1873-46f8-937c-1df22d7e7cae),
1093
    local
1094 1095 1096 1097 1098
]
interface nsIDOMCharacterData : nsIDOMNode
{
    nsresult GetData(nsAString *aData);
    nsresult SetData(const nsAString *aData);
1099 1100
    nsresult GetLength(uint32_t *aLength);
    nsresult SubstringData(uint32_t offset, uint32_t count, nsAString *_retval);
1101
    nsresult AppendData(const nsAString *arg);
1102 1103 1104
    nsresult InsertData(uint32_t offset, const nsAString *arg);
    nsresult DeleteData(uint32_t offset, uint32_t count);
    nsresult ReplaceData(uint32_t offset, uint32_t count, const nsAString *arg);
1105
    nsresult Remove();
1106 1107 1108 1109
}

[
    object,
1110
    uuid(d14d13b4-21d5-49e2-8d59-76a24156db54),
1111
    local
1112 1113 1114
]
interface nsIDOMText : nsIDOMCharacterData
{
1115
    nsresult SplitText(uint32_t offset, nsIDOMText **_retval);
1116
    nsresult GetWholeText(nsAString *aWholeText);
1117 1118
}

1119 1120
[
    object,
1121
    uuid(e702a5d2-3aa8-4788-b048-2d3b3e6d16f2),
1122
    local
1123 1124 1125 1126 1127
]
interface nsIDOMComment : nsIDOMCharacterData
{
}

1128 1129
[
    object,
1130
    uuid(33127aed-9d6a-4b0d-95aa-0529f51bcb9c),
1131
    local
1132 1133 1134 1135 1136
]
interface nsIDOMDocumentFragment : nsIDOMNode
{
}

1137 1138
[
    object,
1139
    uuid(75996de6-6b0f-43e5-ae79-c98fa669da9a),
1140
    local
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151
]
interface nsIDOMDocument : nsIDOMNode
{
    nsresult GetDoctype(nsIDOMDocumentType **aDoctype);
    nsresult GetImplementation(nsIDOMDOMImplementation **aImplementation);
    nsresult GetDocumentElement(nsIDOMElement **aDocumentElement);
    nsresult CreateElement(const nsAString *tagName, nsIDOMElement **_retval);
    nsresult CreateDocumentFragment(nsIDOMDocumentFragment **_retval);
    nsresult CreateTextNode(const nsAString *data, nsIDOMText **_retval);
    nsresult CreateComment(const nsAString *data, nsIDOMComment **_retval);
    nsresult CreateCDATASection(const nsAString *data, nsIDOMCDATASection **_retval);
1152
    nsresult CreateProcessingInstruction(const nsAString *target, const nsAString *data, nsIDOMProcessingInstruction **_retval);
1153 1154
    nsresult CreateAttribute(const nsAString *name, nsIDOMAttr **_retval);
    nsresult GetElementsByTagName(const nsAString *tagname, nsIDOMNodeList **_retval);
1155
    nsresult ImportNode(nsIDOMNode *importedNode, bool deep, uint8_t _argc, nsIDOMNode **_retval);
1156 1157 1158
    nsresult CreateElementNS(const nsAString *namespaceURI, const nsAString *qualifiedName, nsIDOMElement **_retval);
    nsresult CreateAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName, nsIDOMAttr **_retval);
    nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMNodeList **_retval);
1159
    nsresult GetElementById(const nsAString *elementId, nsIDOMElement **_retval);
1160 1161
    nsresult GetInputEncoding(nsAString *aInputEncoding);
    nsresult GetDocumentURI(nsAString *aDocumentURI);
1162
    nsresult GetURL(nsAString *aURL);
1163 1164
    nsresult AdoptNode(nsIDOMNode *source, nsIDOMNode **_retval);
    nsresult CreateRange(nsIDOMRange **_retval);
1165
    nsresult CreateNodeIterator(nsIDOMNode *root, uint32_t whatToShow, nsIDOMNodeFilter *filter, uint8_t _argc,
1166
            nsIDOMNodeIterator **_retval);
1167
    nsresult CreateTreeWalker(nsIDOMNode *root, uint32_t whatToShow, nsIDOMNodeFilter *filter, uint8_t _argc,
1168
            nsIDOMTreeWalker **_retval);
1169 1170
    cpp_quote("#undef CreateEvent")
    nsresult CreateEvent(const nsAString *eventType, nsIDOMEvent **_retval);
1171
    nsresult GetDefaultView(nsIDOMWindow **aDefaultView);
1172 1173 1174 1175 1176 1177
    nsresult GetCharacterSet(nsAString *aCharacterSet);
    nsresult GetDir(nsAString *aDir);
    nsresult SetDir(const nsAString *aDir);
    nsresult GetLocation(nsIDOMLocation **aLocation);
    nsresult GetTitle(nsAString *aTitle);
    nsresult SetTitle(const nsAString *aTitle);
1178
    nsresult GetReadyState(nsAString *aReadyState);
1179 1180
    nsresult GetLastModified(nsAString *aLastModified);
    nsresult GetReferrer(nsAString *aReferrer);
1181
    nsresult HasFocus(bool *_retval);
1182 1183
    nsresult GetActiveElement(nsIDOMElement **aActiveElement);
    nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval);
1184 1185 1186 1187 1188 1189 1190
    nsresult GetStyleSheets(nsIDOMStyleSheetList **aStyleSheets);
    nsresult GetPreferredStyleSheetSet(nsAString *aPreferredStyleSheetSet);
    nsresult GetSelectedStyleSheetSet(nsAString *aSelectedStyleSheetSet);
    nsresult SetSelectedStyleSheetSet(const nsAString *aSelectedStyleSheetSet);
    nsresult GetLastStyleSheetSet(nsAString *aLastStyleSheetSet);
    nsresult GetStyleSheetSets(nsIDOMDOMStringList **aStyleSheetSets);
    nsresult EnableStyleSheetsForSet(const nsAString *name);
1191
    nsresult ElementFromPoint(float x, float y, nsIDOMElement **_retval);
1192
    nsresult GetContentType(nsAString *aContentType);
1193
    nsresult GetMozSyntheticDocument(bool *aMozSyntheticDocument);
1194
    nsresult GetCurrentScript(nsIDOMElement **aCurrentScript);
1195 1196
    nsresult ReleaseCapture();
    nsresult MozSetImageElement(const nsAString *aImageElementId, nsIDOMElement *aImageElement);
1197
    nsresult GetMozFullScreenElement(nsIDOMElement **aMozFullScreenElement);
1198
    nsresult MozCancelFullScreen();
1199 1200
    nsresult GetMozFullScreen(bool *aMozFullScreen);
    nsresult GetMozFullScreenEnabled(bool *aMozFullScreenEnabled);
1201
    nsresult GetMozPointerLockElement(nsIDOMElement **aMozPointerLockElement);
1202
    nsresult CaretPositionFromPoint(float x, float y, nsISupports **_retval);
1203
    nsresult MozExitPointerLock();
1204 1205 1206 1207 1208 1209
    nsresult GetOnreadystatechange(JSContext* cx, jsval aOnreadystatechange);
    nsresult SetOnreadystatechange(JSContext* cx, const jsval *aOnreadystatechange);
    nsresult GetOnmouseenter(JSContext* cx, jsval *aOnmouseenter);
    nsresult SetOnmouseenter(JSContext* cx, const jsval *aOnmouseenter);
    nsresult GetOnmouseleave(JSContext* cx, jsval *aOnmouseleave) = 0;
    nsresult SetOnmouseleave(JSContext* cx, const jsval *aOnmouseleave);
1210
    nsresult GetHidden(bool *aHidden);
1211
    nsresult GetMozHidden(bool *aMozHidden);
1212
    nsresult GetVisibilityState(nsAString *aVisibilityState);
1213
    nsresult GetMozVisibilityState(nsAString *aMozVisibilityState);
1214
    nsresult GetCompatMode(nsAString *aCompatMode);
1215 1216
}

1217 1218
[
    object,
1219
    uuid(fd76e045-8d97-4a97-ad75-eac5ae2f3ea4),
1220
    local
1221 1222 1223
]
interface nsIDOMHTMLDocument : nsIDOMDocument
{
1224 1225 1226 1227 1228
    nsresult GetDomain(nsAString *aDomain);
    nsresult SetDomain(const nsAString *aDomain);
    nsresult GetCookie(nsAString *aCookie);
    nsresult SetCookie(const nsAString *aCookie);
    nsresult GetHead(nsIDOMHTMLHeadElement **aHead);
1229 1230 1231
    nsresult GetBody(nsIDOMHTMLElement **aBody);
    nsresult SetBody(nsIDOMHTMLElement *aBody);
    nsresult GetImages(nsIDOMHTMLCollection **aImages);
1232 1233
    nsresult GetEmbeds(nsIDOMHTMLCollection **aEmbeds);
    nsresult GetPlugins(nsIDOMHTMLCollection **aPlugins);
1234 1235
    nsresult GetLinks(nsIDOMHTMLCollection **aLinks);
    nsresult GetForms(nsIDOMHTMLCollection **aForms);
1236
    nsresult GetScripts(nsIDOMHTMLCollection **aScripts);
1237
    nsresult GetElementsByName(const nsAString *elementName, nsIDOMNodeList **_retval);
1238
    nsresult GetItems(const nsAString *types, nsIDOMNodeList **_retval);
1239
    nsresult Open(const nsAString *aContentTypeOrUrl, const nsAString *aReplaceOrName, const nsAString *aFeatures,
1240
            JSContext *cx, uint8_t _argc, nsISupports **_retval);
1241 1242 1243
    nsresult Close();
    nsresult Write(const nsAString *text, JSContext *cx);
    nsresult Writeln(const nsAString *text, JSContext *cx);
1244 1245
    nsresult GetDesignMode(nsAString *aDesignMode);
    nsresult SetDesignMode(const nsAString *aDesignMode);
1246 1247 1248 1249 1250
    nsresult ExecCommand(const nsAString *commandID, bool doShowUI, const nsAString *value, bool *_retval);
    nsresult QueryCommandEnabled(const nsAString *commandID, bool *_retval);
    nsresult QueryCommandIndeterm(const nsAString *commandID, bool *_retval);
    nsresult QueryCommandState(const nsAString *commandID, bool *_retval);
    nsresult QueryCommandSupported(const nsAString *commandID, bool *_retval);
1251
    nsresult QueryCommandValue(const nsAString *commandID, nsAString *_retval);
1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265
    nsresult GetFgColor(nsAString *aFgColor);
    nsresult SetFgColor(const nsAString *aFgColor);
    nsresult GetBgColor(nsAString *aBgColor);
    nsresult SetBgColor(const nsAString *aBgColor);
    nsresult GetLinkColor(nsAString *aLinkColor);
    nsresult SetLinkColor(const nsAString *aLinkColor);
    nsresult GetVlinkColor(nsAString *aVlinkColor);
    nsresult SetVlinkColor(const nsAString *aVlinkColor);
    nsresult GetAlinkColor(nsAString *aAlinkColor);
    nsresult SetAlinkColor(const nsAString *aAlinkColor);
    nsresult GetAnchors(nsIDOMHTMLCollection **aAnchors);
    nsresult GetApplets(nsIDOMHTMLCollection **aApplets);
    nsresult Clear();
    nsresult GetSelection(nsISelection **_retval);
1266 1267
    nsresult CaptureEvents(int32_t eventFlags);
    nsresult ReleaseEvents(int32_t eventFlags);
1268
    nsresult RouteEvent(nsIDOMEvent *evt);
1269 1270
}

1271 1272
[
    object,
1273
    uuid(1f94055c-42e7-4a30-96a1-6a804f1c2d1e),
1274
    local
1275 1276 1277
]
interface nsIDOMRange : nsISupports
{
1278 1279 1280 1281 1282 1283 1284
    enum {
        NS_START_TO_START,
        NS_START_TO_END,
        NS_END_TO_END,
        NS_END_TO_START
    };

1285
    nsresult GetStartContainer(nsIDOMNode **aStartContainer);
1286
    nsresult GetStartOffset(int32_t *aStartOffset);
1287
    nsresult GetEndContainer(nsIDOMNode **aEndContainer);
1288
    nsresult GetEndOffset(int32_t *aEndOffset);
1289
    nsresult GetCollapsed(bool *aCollapsed);
1290
    nsresult GetCommonAncestorContainer(nsIDOMNode **aCommonAncestorContainer);
1291 1292
    nsresult SetStart(nsIDOMNode *refNode, int32_t offset);
    nsresult SetEnd(nsIDOMNode *refNode, int32_t offset);
1293 1294 1295 1296
    nsresult SetStartBefore(nsIDOMNode *refNode);
    nsresult SetStartAfter(nsIDOMNode *refNode);
    nsresult SetEndBefore(nsIDOMNode *refNode);
    nsresult SetEndAfter(nsIDOMNode *refNode);
1297
    nsresult Collapse(bool toStart);
1298 1299
    nsresult SelectNode(nsIDOMNode *refNode);
    nsresult SelectNodeContents(nsIDOMNode *refNode);
1300
    nsresult CompareBoundaryPoints(uint16_t how, nsIDOMRange *sourceRange, int16_t *_retval);
1301 1302 1303 1304 1305 1306 1307 1308
    nsresult DeleteContents();
    nsresult ExtractContents(nsIDOMDocumentFragment **_retval);
    nsresult CloneContents(nsIDOMDocumentFragment **_retval);
    nsresult InsertNode(nsIDOMNode *newNode);
    nsresult SurroundContents(nsIDOMNode *newParent);
    nsresult CloneRange(nsIDOMRange **_retval);
    nsresult ToString(nsAString *_retval);
    nsresult Detach();
1309
    nsresult CreateContextualFragment([in] const nsAString *fragment, [out] nsIDOMDocumentFragment **_retval);
1310 1311
    nsresult IsPointInRange([in] nsIDOMNode *parent, [in] int32_t offset, [out] bool *_retval);
    nsresult ComparePoint([in] nsIDOMNode *parent, [in] int32_t offset, [out] int16_t *_retval);
1312
    nsresult IntersectsNode(nsIDOMNode *node, bool *_retval);
1313 1314
    nsresult GetClientRects(nsIDOMClientRectList **_retval);
    nsresult GetBoundingClientRect(nsIDOMClientRect **_retval);
1315 1316
}

1317 1318
[
    object,
1319
    uuid(12cf5a4d-fffb-4f2f-9cec-c65195661d76),
1320
    local
1321 1322 1323 1324
]
interface nsISelection : nsISupports
{
    nsresult GetAnchorNode(nsIDOMNode **aAnchorNode);
1325
    nsresult GetAnchorOffset(int32_t *aAnchorOffset);
1326
    nsresult GetFocusNode(nsIDOMNode **aFocusNode);
1327
    nsresult GetFocusOffset(int32_t *aFocusOffset);
1328
    nsresult GetIsCollapsed(bool *aIsCollapsed);
1329
    bool /* don't use */ Collapsed();
1330 1331 1332 1333 1334 1335
    nsresult GetRangeCount(int32_t *aRangeCount);
    nsresult GetRangeAt(int32_t index, nsIDOMRange **_retval);
    nsresult Collapse(nsIDOMNode *parentNode, int32_t offset);
    nsresult CollapseNative(nsINode *parentNode, int32_t offset);
    nsresult Extend(nsIDOMNode *parentNode, int32_t offset);
    nsresult ExtendNative(nsINode *parentNode, int32_t offset);
1336 1337
    nsresult CollapseToStart();
    nsresult CollapseToEnd();
1338
    nsresult ContainsNode(nsIDOMNode *node, bool entirelyContained, bool *_retval);
1339 1340 1341 1342 1343
    nsresult SelectAllChildren(nsIDOMNode *parentNode);
    nsresult AddRange(nsIDOMRange *range);
    nsresult RemoveRange(nsIDOMRange *range);
    nsresult RemoveAllRanges();
    nsresult DeleteFromDocument();
1344
    nsresult SelectionLanguageChange(bool langRTL);
1345
    nsresult ToString(nsAString *_retval);
1346
    nsresult Modify(const nsAString *alter, const nsAString *direction, const nsAString *granularity);
1347 1348
}

1349 1350 1351 1352 1353 1354 1355
[
    object,
    uuid(a6cf906f-15b3-11d2-932e-00805f8add32),
    local
]
interface nsIDOMWindowCollection : nsISupports
{
1356 1357
    nsresult GetLength(uint32_t *aLength);
    nsresult Item(uint32_t index, nsIDOMWindow **_retval);
1358 1359 1360
    nsresult NamedItem(const nsAString *name, nsIDOMWindow **_retval);
}

1361 1362
[
    object,
1363
    uuid(be62660a-e3f6-409c-a4a9-378364a9526f),
1364
    local
1365 1366 1367
]
interface nsIDOMWindow : nsISupports
{
1368 1369
    nsresult GetWindow(nsIDOMWindow **aWindow);
    nsresult GetSelf(nsIDOMWindow **aSelf);
1370 1371 1372
    nsresult GetDocument(nsIDOMDocument **aDocument);
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
1373 1374
    nsresult GetLocation(nsIDOMLocation **aLocation);
    nsresult GetHistory(nsIDOMHistory **aHistory);
1375 1376 1377 1378 1379 1380
    nsresult GetLocationbar(nsISupports **aLocationbar);
    nsresult GetMenubar(nsISupports **aMenubar);
    nsresult GetPersonalbar(nsISupports **aPersonalbar);
    nsresult GetScrollbars(nsISupports **aScrollbars);
    nsresult GetStatusbar(nsISupports **aStatusbar);
    nsresult GetToolbar(nsISupports **aToolbar);
1381 1382 1383 1384 1385 1386
    nsresult GetStatus(nsAString *aStatus);
    nsresult SetStatus(const nsAString *aStatus);
    nsresult Close();
    nsresult Stop();
    nsresult Focus();
    nsresult Blur();
1387
    nsresult GetLength(uint32_t *aLength);
1388 1389 1390 1391
    nsresult GetScriptableTop(nsIDOMWindow **aTop);
    nsresult GetRealTop(nsIDOMWindow **aTop);
    nsresult GetScriptableParent(nsIDOMWindow **aParent);
    nsresult GetRealParent(nsIDOMWindow **aParent);
1392 1393
    nsresult GetOpener(nsIDOMWindow **aOpener);
    nsresult SetOpener(nsIDOMWindow *aOpener);
1394 1395
    nsresult GetScriptableFrameElement(nsIDOMElement **aFrameElement);
    nsresult GetRealFrameElement(nsIDOMElement **aFrameElement);
1396 1397 1398
    nsresult GetNavigator(nsIDOMNavigator **aNavigator);
    nsresult GetApplicationCache(nsIDOMOfflineResourceList **aApplicationCache);
    nsresult Alert(const nsAString *text);
1399
    nsresult Confirm(const nsAString *text, bool *_retval);
1400 1401
    nsresult Prompt(const nsAString *aMessage, const nsAString *aInitial, nsAString *_retval);
    nsresult Print();
1402
    nsresult ShowModalDialog(const nsAString *aURI, nsIVariant *aArgs, const nsAString *aOptions, uint8_t _argc, nsIVariant **_retval);
1403
    nsresult PostMessageMoz(const long /*jsval*/ *message, const nsAString *targetOrigin, const /*JS::Value*/ void *transfer, JSContext *cx);
1404 1405 1406 1407 1408 1409 1410
    nsresult Atob(const nsAString *aAsciiString, nsAString *_retval);
    nsresult Btoa(const nsAString *aBase64Data, nsAString *_retval);
    nsresult GetSessionStorage(nsIDOMStorage **aSessionStorage);
    nsresult GetLocalStorage(nsIDOMStorage **aLocalStorage);
    nsresult GetSelection(nsISelection **_retval);
    nsresult MatchMedia(const nsAString *media_query_list, nsIDOMMediaQueryList **_retval);
    nsresult GetScreen(nsIDOMScreen **aScreen);
1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429
    nsresult GetInnerWidth(int32_t *aInnerWidth);
    nsresult SetInnerWidth(int32_t aInnerWidth);
    nsresult GetInnerHeight(int32_t *aInnerHeight);
    nsresult SetInnerHeight(int32_t aInnerHeight);
    nsresult GetScrollX(int32_t *aScrollX);
    nsresult GetPageXOffset(int32_t *aPageXOffset);
    nsresult GetScrollY(int32_t *aScrollY);
    nsresult GetPageYOffset(int32_t *aPageYOffset);
    nsresult Scroll(int32_t xScroll, int32_t yScroll);
    nsresult ScrollTo(int32_t xScroll, int32_t yScroll);
    nsresult ScrollBy(int32_t xScrollDif, int32_t yScrollDif);
    nsresult GetScreenX(int32_t *aScreenX);
    nsresult SetScreenX(int32_t aScreenX);
    nsresult GetScreenY(int32_t *aScreenY);
    nsresult SetScreenY(int32_t aScreenY);
    nsresult GetOuterWidth(int32_t *aOuterWidth);
    nsresult SetOuterWidth(int32_t aOuterWidth);
    nsresult GetOuterHeight(int32_t *aOuterHeight);
    nsresult SetOuterHeight(int32_t aOuterHeight);
1430
    nsresult GetComputedStyle(nsIDOMElement *elt, const nsAString *pseudoElt, nsIDOMCSSStyleDeclaration **_retval);
1431
    nsresult GetDefaultComputedStyle(nsIDOMElement *elt, const nsAString *pseudoElt, nsIDOMCSSStyleDeclaration **_retval);
1432 1433 1434 1435
    nsresult GetWindowRoot(nsIDOMEventTarget **aWindowRoot);
    nsresult GetFrames(nsIDOMWindowCollection **aFrames);
    nsresult GetTextZoom(float *aTextZoom);
    nsresult SetTextZoom(float aTextZoom);
1436 1437
    nsresult ScrollByLines(int32_t numLines);
    nsresult ScrollByPages(int32_t numPages);
1438
    nsresult SizeToContent();
1439 1440
    nsresult GetContent(nsIDOMWindow **aContent);
    nsresult GetPrompter(nsIPrompt **aPrompter);
1441
    nsresult GetClosed(bool *aClosed);
1442 1443 1444 1445 1446
    nsresult GetCrypto(nsIDOMCrypto **aCrypto);
    nsresult GetPkcs11(nsIDOMPkcs11 **aPkcs11);
    nsresult GetControllers(nsIControllers **aControllers);
    nsresult GetMozInnerScreenX(float *aMozInnerScreenX);
    nsresult GetMozInnerScreenY(float *aMozInnerScreenY);
1447
    nsresult GetDevicePixelRatio(float *aDevicePixelRatio);
1448 1449
    nsresult GetScrollMaxX(int32_t *aScrollMaxX);
    nsresult GetScrollMaxY(int32_t *aScrollMaxY);
1450 1451
    nsresult GetFullScreen(bool *aFullScreen);
    nsresult SetFullScreen(bool aFullScreen);
1452 1453 1454
    nsresult Back();
    nsresult Forward();
    nsresult Home();
1455 1456 1457 1458
    nsresult MoveTo(int32_t xPos, int32_t yPos);
    nsresult MoveBy(int32_t xDif, int32_t yDif);
    nsresult ResizeTo(int32_t width, int32_t height);
    nsresult ResizeBy(int32_t widthDif, int32_t heightDif);
1459 1460 1461 1462
    nsresult Open(const nsAString *url, const nsAString *name, const nsAString *options, nsIDOMWindow **_retval);
    nsresult OpenDialog(const nsAString *url, const nsAString *name, const nsAString *options, nsISupports *aExtraArgument,
            nsIDOMWindow **_retval);
    nsresult UpdateCommands(const nsAString *action);
1463 1464
    nsresult Find(const nsAString *str, bool caseSensitive, bool backwards, bool wrapAround, bool wholeWord,
            bool searchInFrames, bool showDialog, bool *_retval);
1465 1466
    nsresult GetMozPaintCount(uint64_t *aMozPaintCount);
    nsresult MozRequestAnimationFrame(nsIFrameRequestCallback *aCallback, int32_t *_retval);
1467
    nsresult RequestAnimationFrame(void /*const JS::Value*/ *aCallback, JSContext* cx, int32_t *_retval);
1468 1469
    nsresult MozCancelAnimationFrame(int32_t aHandle);
    nsresult MozCancelRequestAnimationFrame(int32_t aHandle);
1470
    nsresult CancelAnimationFrame(int32_t aHandle);
1471
    nsresult GetMozAnimationStartTime(int64_t *aMozAnimationStartTime);
1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499
    nsresult GetOnafterprint(JSContext *cx, jsval *aOnafterprint);
    nsresult SetOnafterprint(JSContext *cx, const jsval *aOnafterprint);
    nsresult GetOnbeforeprint(JSContext *cx, jsval *aOnbeforeprint);
    nsresult SetOnbeforeprint(JSContext *cx, const jsval *aOnbeforeprint);
    nsresult GetOnbeforeunload(JSContext *cx, jsval *aOnbeforeunload);
    nsresult SetOnbeforeunload(JSContext *cx, const jsval *aOnbeforeunload);
    nsresult GetOnhashchange(JSContext *cx, jsval *aOnhashchange);
    nsresult SetOnhashchange(JSContext *cx, const jsval *aOnhashchange);
    nsresult GetOnmessage(JSContext *cx, jsval *aOnmessage);
    nsresult SetOnmessage(JSContext *cx, const jsval *aOnmessage);
    nsresult GetOnoffline(JSContext *cx, jsval *aOnoffline);
    nsresult SetOnoffline(JSContext *cx, const jsval *aOnoffline);
    nsresult GetOnonline(JSContext *cx, jsval *aOnonline);
    nsresult SetOnonline(JSContext *cx, const jsval *aOnonline);
    nsresult GetOnpopstate(JSContext *cx, jsval *aOnpopstate);
    nsresult SetOnpopstate(JSContext *cx, const jsval *aOnpopstate);
    nsresult GetOnpagehide(JSContext *cx, jsval *aOnpagehide);
    nsresult SetOnpagehide(JSContext *cx, const jsval *aOnpagehide);
    nsresult GetOnpageshow(JSContext *cx, jsval *aOnpageshow);
    nsresult SetOnpageshow(JSContext *cx, const jsval *aOnpageshow);
    nsresult GetOnresize(JSContext *cx, jsval *aOnresize);
    nsresult SetOnresize(JSContext *cx, const jsval *aOnresize);
    nsresult GetOnunload(JSContext *cx, jsval *aOnunload);
    nsresult SetOnunload(JSContext *cx, const jsval *aOnunload);
    nsresult GetOndevicemotion(JSContext *cx, jsval *aOndevicemotion);
    nsresult SetOndevicemotion(JSContext *cx, const jsval *aOndevicemotion);
    nsresult GetOndeviceorientation(JSContext *cx, jsval *aOndeviceorientation);
    nsresult SetOndeviceorientation(JSContext *cx, const jsval *aOndeviceorientation);
1500 1501 1502 1503 1504 1505
    nsresult GetOndeviceproximity(JSContext* cx, jsval *aOndeviceproximity);
    nsresult SetOndeviceproximity(JSContext* cx, const jsval *aOndeviceproximity);
    nsresult GetOnuserproximity(JSContext* cx, jsval *aOndeviceproximity);
    nsresult SetOnuserproximity(JSContext* cx, const jsval *aOndeviceproximity);
    nsresult GetOndevicelight(JSContext* cx, jsval *aOndevicelight);
    nsresult SetOndevicelight(JSContext* cx, const jsval *aOndevicelight);
1506 1507
    nsresult GetOnmouseenter(JSContext* cx, jsval *aOnmouseenter);
    nsresult SetOnmouseenter(JSContext* cx, const jsval *aOnmouseenter);
1508
    nsresult GetOnmouseleave(JSContext* cx, jsval *aOnmouseleave);
1509 1510 1511 1512 1513
    nsresult SetOnmouseleave(JSContext* cx, const jsval *aOnmouseleave);
}

[
    object,
1514
    uuid(8b29a62f-b448-49f3-9242-241d5cf94ea9),
1515
    local
1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530
]
interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
{
    nsresult GetALink(nsAString *aALink);
    nsresult SetALink(const nsAString *aALink);
    nsresult GetBackground(nsAString *aBackground);
    nsresult SetBackground(const nsAString *aBackground);
    nsresult GetBgColor(nsAString *aBgColor);
    nsresult SetBgColor(const nsAString *aBgColor);
    nsresult GetLink(nsAString *aLink);
    nsresult SetLink(const nsAString *aLink);
    nsresult GetText(nsAString *aText);
    nsresult SetText(const nsAString *aText);
    nsresult GetVLink(nsAString *aVLink);
    nsresult SetVLink(const nsAString *aVLink);
1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558
    nsresult GetOnafterprint(JSContext *cx, jsval *aOnafterprint);
    nsresult SetOnafterprint(JSContext *cx, const jsval *aOnafterprint);
    nsresult GetOnbeforeprint(JSContext *cx, jsval *aOnbeforeprint);
    nsresult SetOnbeforeprint(JSContext *cx, const jsval *aOnbeforeprint);
    nsresult GetOnbeforeunload(JSContext *cx, jsval *aOnbeforeunload);
    nsresult SetOnbeforeunload(JSContext *cx, const jsval *aOnbeforeunload);
    nsresult GetOnhashchange(JSContext *cx, jsval *aOnhashchange);
    nsresult SetOnhashchange(JSContext *cx, const jsval *aOnhashchange);
    nsresult GetOnmessage(JSContext *cx, jsval *aOnmessage);
    nsresult SetOnmessage(JSContext *cx, const jsval *aOnmessage);
    nsresult GetOnoffline(JSContext *cx, jsval *aOnoffline);
    nsresult SetOnoffline(JSContext *cx, const jsval *aOnoffline);
    nsresult GetOnonline(JSContext *cx, jsval *aOnonline);
    nsresult SetOnonline(JSContext *cx, const jsval *aOnonline);
    nsresult GetOnpagehide(JSContext *cx, jsval *aOnpagehide);
    nsresult SetOnpagehide(JSContext *cx, const jsval *aOnpagehide);
    nsresult GetOnpageshow(JSContext *cx, jsval *aOnpageshow);
    nsresult SetOnpageshow(JSContext *cx, const jsval *aOnpageshow);
    nsresult GetOnpopstate(JSContext *cx, jsval *aOnpopstate);
    nsresult SetOnpopstate(JSContext *cx, const jsval *aOnpopstate);
    nsresult GetOnresize(JSContext *cx, jsval *aOnresize);
    nsresult SetOnresize(JSContext *cx, const jsval *aOnresize);
    nsresult GetOnunload(JSContext *cx, jsval *aOnunload);
    nsresult SetOnunload(JSContext *cx, const jsval *aOnunload);
}

[
    object,
1559
    uuid(5e49bff8-fb61-41e3-b6a9-2017865a6d74),
1560 1561 1562 1563 1564 1565 1566 1567
    local
]
interface nsIDOMHTMLFormElement : nsIDOMHTMLElement
{
    nsresult GetAcceptCharset(nsAString *aAcceptCharset);
    nsresult SetAcceptCharset(const nsAString *aAcceptCharset);
    nsresult GetAction(nsAString *aAction);
    nsresult SetAction(const nsAString *aAction);
1568 1569
    nsresult GetAutocomplete(nsAString *aAutocomplete);
    nsresult SetAutocomplete(const nsAString *aAutocomplete);
1570 1571
    nsresult GetEnctype(nsAString *aEnctype);
    nsresult SetEnctype(const nsAString *aEnctype);
1572 1573
    nsresult GetEncoding(nsAString *aEncoding);
    nsresult SetEncoding(const nsAString *aEncoding);
1574 1575
    nsresult GetMethod(nsAString *aMethod);
    nsresult SetMethod(const nsAString *aMethod);
1576 1577
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
1578 1579
    nsresult GetNoValidate(bool *aNoValidate);
    nsresult SetNoValidate(bool aNoValidate);
1580 1581
    nsresult GetTarget(nsAString *aTarget);
    nsresult SetTarget(const nsAString *aTarget);
1582
    nsresult GetElements(nsIDOMHTMLCollection **aElements);
1583
    nsresult GetLength(int32_t *aLength);
1584 1585
    nsresult Submit();
    nsresult Reset();
1586
    nsresult CheckValidity(bool *_retval);
1587
    nsresult GetFormData(nsIDOMHTMLElement *aOriginatingElement, nsAString *aActionURI, nsIInputStream **aPostDataStream);
1588 1589
}

1590 1591
[
    object,
1592
    uuid(d57537ed-39d0-46ea-8516-0ce0a5bfb805),
1593
    local
1594 1595 1596 1597 1598 1599 1600
]
interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
{
    nsresult GetAccept(nsAString *aAccept);
    nsresult SetAccept(const nsAString *aAccept);
    nsresult GetAlt(nsAString *aAlt);
    nsresult SetAlt(const nsAString *aAlt);
1601 1602
    nsresult GetAutocomplete(nsAString *aAutocomplete);
    nsresult SetAutocomplete(const nsAString *aAutocomplete);
1603 1604 1605 1606 1607 1608 1609 1610
    nsresult GetAutofocus(bool *aAutofocus);
    nsresult SetAutofocus(bool aAutofocus);
    nsresult GetDefaultChecked(bool *aDefaultChecked);
    nsresult SetDefaultChecked(bool aDefaultChecked);
    nsresult GetChecked(bool *aChecked);
    nsresult SetChecked(bool aChecked);
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
1611
    nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1612 1613 1614 1615 1616 1617
    nsresult GetFormAction(nsAString *aFormAction);
    nsresult SetFormAction(const nsAString *aFormAction);
    nsresult GetFormEnctype(nsAString *aFormEnctype);
    nsresult SetFormEnctype(const nsAString *aFormEnctype);
    nsresult GetFormMethod(nsAString *aFormMethod);
    nsresult SetFormMethod(const nsAString *aFormMethod);
1618 1619
    nsresult GetFormNoValidate(bool *aFormNoValidate);
    nsresult SetFormNoValidate(bool aFormNoValidate);
1620 1621
    nsresult GetFormTarget(nsAString *aFormTarget);
    nsresult SetFormTarget(const nsAString *aFormTarget);
1622
    nsresult GetFiles(nsIDOMFileList **aFiles);
1623 1624
    nsresult GetHeight(uint32_t *aHeight);
    nsresult SetHeight(uint32_t aHeight);
1625 1626
    nsresult GetIndeterminate(bool *aIndeterminate);
    nsresult SetIndeterminate(bool aIndeterminate);
1627 1628
    nsresult GetInputMode(nsAString *aInputMode);
    nsresult SetInputMode(const nsAString *aInputMode);
1629
    nsresult GetList(nsIDOMHTMLElement **aList);
1630 1631
    nsresult GetMax(nsAString *aMax);
    nsresult SetMax(const nsAString *aMax);
1632 1633
    nsresult GetMaxLength(int32_t *aMaxLength);
    nsresult SetMaxLength(int32_t aMaxLength);
1634 1635
    nsresult GetMin(nsAString *aMin);
    nsresult SetMin(const nsAString *aMin);
1636 1637
    nsresult GetMultiple(bool *aMultiple);
    nsresult SetMultiple(bool aMultiple);
1638 1639
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
1640 1641
    nsresult GetPattern(nsAString *aPattern);
    nsresult SetPattern(const nsAString *aPattern);
1642 1643
    nsresult GetPlaceholder(nsAString *aPlaceholder);
    nsresult SetPlaceholder(const nsAString *aPlaceholder);
1644 1645 1646 1647
    nsresult GetReadOnly(bool *aReadOnly);
    nsresult SetReadOnly(bool aReadOnly);
    nsresult GetRequired(bool *aRequired);
    nsresult SetRequired(bool aRequired);
1648 1649
    nsresult GetStep(nsAString *aStep);
    nsresult SetStep(const nsAString *aStep);
1650 1651
    nsresult GetAlign(nsAString *aAlign);
    nsresult SetAlign(const nsAString *aAlign);
1652 1653 1654 1655
    nsresult GetSize(uint32_t *aSize);
    nsresult SetSize(uint32_t aSize);
    nsresult GetWidth(uint32_t *aWidth);
    nsresult SetWidth(uint32_t aWidth);
1656 1657 1658 1659
    nsresult GetSrc(nsAString *aSrc);
    nsresult SetSrc(const nsAString *aSrc);
    nsresult GetType(nsAString *aType);
    nsresult SetType(const nsAString *aType);
1660 1661
    nsresult GetDefaultValue(nsAString *aDefaultValue);
    nsresult SetDefaultValue(const nsAString *aDefaultValue);
1662 1663
    nsresult GetValue(nsAString *aValue);
    nsresult SetValue(const nsAString *aValue);
1664 1665
    nsresult GetValueAsNumber(double *aValueAsNumber);
    nsresult SetValueAsNumber(double aValueAsNumber);
1666 1667
    nsresult StepDown(int32_t n, uint8_t _argc);
    nsresult StepUp(int32_t n, uint8_t _argc);
1668
    nsresult GetWillValidate(bool *aWillValidate);
1669 1670
    nsresult GetValidity(nsIDOMValidityState **aValidity);
    nsresult GetValidationMessage(nsAString *aValidationMessage);
1671
    nsresult CheckValidity(bool *_retval);
1672
    nsresult SetCustomValidity(const nsAString *error);
1673
    nsresult Select();
1674 1675 1676 1677 1678
    nsresult GetSelectionStart(int32_t *aSelectionStart);
    nsresult SetSelectionStart(int32_t aSelectionStart);
    nsresult GetSelectionEnd(int32_t *aSelectionEnd);
    nsresult SetSelectionEnd(int32_t aSelectionEnd);
    nsresult SetSelectionRange(int32_t selectionStart, int32_t selectionEnd, const nsAString *direction);
1679 1680
    nsresult GetSelectionDirection(nsAString *aSelectionDirection);
    nsresult SetSelectionDirection(const nsAString *aSelectionDirection);
1681 1682 1683
    nsresult GetUseMap(nsAString *aUseMap);
    nsresult SetUseMap(const nsAString *aUseMap);
    nsresult GetControllers(nsIControllers **aControllers);
1684 1685 1686
    nsresult GetTextLength(int32_t *aTextLength);
    nsresult MozGetFileNameArray(uint32_t *aLength, PRUnichar ***aFileNames);
    nsresult MozSetFileNameArray(const PRUnichar **aFileNames, uint32_t aLength);
1687
    nsresult MozIsTextField(bool aExcludePassword, bool *_retval);
1688 1689
}

1690 1691
[
    object,
1692
    uuid(09017cf4-0004-4c27-a340-7f5d2fe282e3),
1693
    local
1694 1695 1696
]
interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement
{
1697 1698
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
1699
    nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1700 1701
    nsresult GetLabel(nsAString *aLabel);
    nsresult SetLabel(const nsAString *aLabel);
1702 1703 1704 1705
    nsresult GetDefaultSelected(bool *aDefaultSelected);
    nsresult SetDefaultSelected(bool aDefaultSelected);
    nsresult GetSelected(bool *aSelected);
    nsresult SetSelected(bool aSelected);
1706 1707
    nsresult GetValue(nsAString *aValue);
    nsresult SetValue(const nsAString *aValue);
1708 1709
    nsresult GetText(nsAString *aText);
    nsresult SetText(const nsAString *aText);
1710
    nsresult GetIndex(int32_t *aIndex);
1711 1712
}

1713 1714
[
    object,
1715
    uuid(5564816e-2ab5-46ee-95a4-8f4688bdb449),
1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747
    local
]
interface nsIDOMHTMLButtonElement : nsIDOMHTMLElement
{
    nsresult GetAutofocus(bool *aAutofocus);
    nsresult SetAutofocus(bool aAutofocus);
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
    nsresult GetForm(nsIDOMHTMLFormElement **aForm);
    nsresult GetFormAction(nsAString *aFormAction);
    nsresult SetFormAction(const nsAString *aFormAction);
    nsresult GetFormEnctype(nsAString *aFormEnctype);
    nsresult SetFormEnctype(const nsAString *aFormEnctype);
    nsresult GetFormMethod(nsAString *aFormMethod);
    nsresult SetFormMethod(const nsAString *aFormMethod);
    nsresult GetFormNoValidate(bool *aFormNoValidate);
    nsresult SetFormNoValidate(bool aFormNoValidate);
    nsresult GetFormTarget(nsAString *aFormTarget);
    nsresult SetFormTarget(const nsAString *aFormTarget);
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
    nsresult GetType(nsAString *aType);
    nsresult SetType(const nsAString *aType);
    nsresult GetValue(nsAString *aValue);
    nsresult SetValue(const nsAString *aValue);
    nsresult GetWillValidate(bool *aWillValidate);
    nsresult GetValidity(nsIDOMValidityState **aValidity);
    nsresult GetValidationMessage(nsAString *aValidationMessage);
    nsresult CheckValidity(bool *_retval);
    nsresult SetCustomValidity(const nsAString *error);
}

1748 1749
[
    object,
1750
    uuid(4173cc53-30f6-4d12-a770-981ba53164e2),
1751 1752 1753 1754
    local
]
interface nsIDOMHTMLOptionsCollection : nsISupports
{
1755 1756
    typedef int nsWrapperCache;

1757 1758 1759
    nsresult GetLength(uint32_t *aLength);
    nsresult SetLength(uint32_t aLength);
    nsresult Item(uint32_t index, nsIDOMNode **_retval);
1760
    nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
1761 1762 1763
    nsresult GetSelectedIndex(int32_t *aSelectedIndex);
    nsresult SetSelectedIndex(int32_t aSelectedIndex);
    nsresult SetOption(uint32_t index, nsIDOMHTMLOptionElement *option);
1764 1765
    nsresult GetSelect(nsIDOMHTMLSelectElement **aSelect);
    nsresult Add(nsIDOMHTMLOptionElement *option, nsIVariant *before);
1766
    nsresult Remove(int32_t index);
1767 1768
}

1769 1770
[
    object,
1771
    uuid(8af2123f-c83a-430a-a739-d103a8eaba52),
1772
    local
1773 1774 1775
]
interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
{
1776 1777 1778 1779
    nsresult GetAutofocus(bool *aAutofocus);
    nsresult SetAutofocus(bool aAutofocus);
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
1780
    nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1781 1782
    nsresult GetMultiple(bool *aMultiple);
    nsresult SetMultiple(bool aMultiple);
1783 1784
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
1785 1786
    nsresult GetSize(uint32_t *aSize);
    nsresult SetSize(uint32_t aSize);
1787 1788
    nsresult GetType(nsAString *aType);
    nsresult GetOptions(nsIDOMHTMLOptionsCollection **aOptions);
1789 1790 1791
    nsresult GetLength(uint32_t *aLength);
    nsresult SetLength(uint32_t aLength);
    nsresult Item(uint32_t index, nsIDOMNode **_retval);
1792
    nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
1793
    nsresult Add(nsIDOMHTMLElement *element, nsIVariant *before);
1794 1795 1796
    nsresult Remove(int32_t index);
    nsresult GetSelectedIndex(int32_t *aSelectedIndex);
    nsresult SetSelectedIndex(int32_t aSelectedIndex);
1797 1798
    nsresult GetValue(nsAString *aValue);
    nsresult SetValue(const nsAString *aValue);
1799
    nsresult GetWillValidate(bool *aWillValidate);
1800 1801
    nsresult GetValidity(nsIDOMValidityState **aValidity);
    nsresult GetValidationMessage(nsAString *aValidationMessage);
1802
    nsresult CheckValidity(bool *_retval);
1803
    nsresult SetCustomValidity(const nsAString *error);
1804 1805
    nsresult GetRequired(bool *aRequired);
    nsresult SetRequired(bool aRequired);
1806 1807
}

1808 1809
[
    object,
1810
    uuid(b7e1b86f-c98e-4658-81ce-ac29962f854a),
1811
    local
1812 1813 1814
]
interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
{
1815 1816
    nsresult GetAutofocus(bool *aAutofocus);
    nsresult SetAutofocus(bool aAutofocus);
1817 1818
    nsresult GetCols(uint32_t *aCols);
    nsresult SetCols(uint32_t aCols);
1819 1820
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
1821
    nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1822 1823
    nsresult GetMaxLength(int32_t *aMaxLength);
    nsresult SetMaxLength(int32_t aMaxLength);
1824 1825
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
1826 1827
    nsresult GetPlaceholder(nsAString *aPlaceholder);
    nsresult SetPlaceholder(const nsAString *aPlaceholder);
1828 1829 1830 1831
    nsresult GetReadOnly(bool *aReadOnly);
    nsresult SetReadOnly(bool aReadOnly);
    nsresult GetRequired(bool *aRequired);
    nsresult SetRequired(bool aRequired);
1832 1833
    nsresult GetRows(uint32_t *aRows);
    nsresult SetRows(uint32_t aRows);
1834 1835
    nsresult GetWrap(nsAString *aWrap);
    nsresult SetWrap(const nsAString *aWrap);
1836
    nsresult GetType(nsAString *aType);
1837 1838
    nsresult GetDefaultValue(nsAString *aDefaultValue);
    nsresult SetDefaultValue(const nsAString *aDefaultValue);
1839 1840
    nsresult GetValue(nsAString *aValue);
    nsresult SetValue(const nsAString *aValue);
1841
    nsresult GetTextLength(int32_t *aTextLength);
1842
    nsresult GetWillValidate(bool *aWillValidate);
1843 1844
    nsresult GetValidity(nsIDOMValidityState **aValidity);
    nsresult GetValidationMessage(nsAString *aValidationMessage);
1845
    nsresult CheckValidity(bool *_retval);
1846
    nsresult SetCustomValidity(const nsAString *error);
1847
    nsresult Select();
1848 1849 1850 1851 1852
    nsresult GetSelectionStart(int32_t *aSelectionStart);
    nsresult SetSelectionStart(int32_t aSelectionStart);
    nsresult GetSelectionEnd(int32_t *aSelectionEnd);
    nsresult SetSelectionEnd(int32_t aSelectionEnd);
    nsresult SetSelectionRange(int32_t selectionStart, int32_t selectionEnd, const nsAString *direction);
1853 1854 1855
    nsresult GetSelectionDirection(nsAString *aSelectionDirection);
    nsresult SetSelectionDirection(const nsAString *aSelectionDirection);
    nsresult GetControllers(nsIControllers **aControllers);
1856 1857
}

1858 1859
[
    object,
1860
    uuid(8783371a-6185-4176-9ed9-f781c75bf48a),
1861 1862 1863 1864
    local
]
interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement
{
1865 1866
    nsresult GetSrc(nsAString *aSrc);
    nsresult SetSrc(const nsAString *aSrc);
1867 1868 1869 1870
    nsresult GetAsync(bool *aAsync);
    nsresult SetAsync(bool aAsync);
    nsresult GetDefer(bool *aDefer);
    nsresult SetDefer(bool aDefer);
1871 1872 1873 1874
    nsresult GetType(nsAString *aType);
    nsresult SetType(const nsAString *aType);
    nsresult GetCharset(nsAString *aCharset);
    nsresult SetCharset(const nsAString *aCharset);
1875 1876 1877 1878 1879 1880
    nsresult GetText(nsAString *aText);
    nsresult SetText(const nsAString *aText);
    nsresult GetHtmlFor(nsAString *aHtmlFor);
    nsresult SetHtmlFor(const nsAString *aHtmlFor);
    nsresult GetEvent(nsAString *aEvent);
    nsresult SetEvent(const nsAString *aEvent);
1881 1882
    nsresult GetCrossOrigin(nsAString *aCrossOrigin);
    nsresult SetCrossOrigin(const nsAString *aCrossOrigin);
1883 1884
}

1885 1886
[
    object,
1887
    uuid(98c38ca0-5e3a-4c71-90a4-69d12a3c8d16),
1888 1889 1890 1891
    local
]
interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
{
1892 1893 1894 1895
    nsresult GetAlt(nsAString *aAlt);
    nsresult SetAlt(const nsAString *aAlt);
    nsresult GetSrc(nsAString *aSrc);
    nsresult SetSrc(const nsAString *aSrc);
1896 1897
    nsresult GetCrossOrigin(nsAString *aCrossOrigin);
    nsresult SetCrossOrigin(const nsAString *aCrossOrigin);
1898 1899
    nsresult GetUseMap(nsAString *aUseMap);
    nsresult SetUseMap(const nsAString *aUseMap);
1900 1901
    nsresult GetIsMap(bool *aIsMap);
    nsresult SetIsMap(bool aIsMap);
1902 1903 1904 1905 1906 1907
    nsresult GetWidth(uint32_t *aWidth);
    nsresult SetWidth(uint32_t aWidth);
    nsresult GetHeight(uint32_t *aHeight);
    nsresult SetHeight(uint32_t aHeight);
    nsresult GetNaturalWidth(uint32_t *aNaturalWidth);
    nsresult GetNaturalHeight(uint32_t *aNaturalHeight);
1908
    nsresult GetComplete(bool *aComplete);
1909 1910 1911 1912 1913 1914
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
    nsresult GetAlign(nsAString *aAlign);
    nsresult SetAlign(const nsAString *aAlign);
    nsresult GetBorder(nsAString *aBorder);
    nsresult SetBorder(const nsAString *aBorder);
1915 1916
    nsresult GetHspace(int32_t *aHspace);
    nsresult SetHspace(int32_t aHspace);
1917 1918
    nsresult GetLongDesc(nsAString *aLongDesc);
    nsresult SetLongDesc(const nsAString *aLongDesc);
1919 1920
    nsresult GetVspace(int32_t *aVspace);
    nsresult SetVspace(int32_t aVspace);
1921 1922
    nsresult GetLowsrc(nsAString *aLowsrc);
    nsresult SetLowsrc(const nsAString *aLowsrc);
1923 1924
    nsresult GetX(int32_t *aX);
    nsresult GetY(int32_t *aY);
1925 1926
}

1927 1928
[
    object,
1929
    uuid(76ec122a-db6d-4b3f-8a24-15faf117f695),
1930 1931 1932 1933
    local
]
interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
{
1934 1935 1936 1937 1938 1939
    nsresult GetHref(nsAString *aHref);
    nsresult SetHref(const nsAString *aHref);
    nsresult GetTarget(nsAString *aTarget);
    nsresult SetTarget(const nsAString *aTarget);
    nsresult GetPing(nsAString *aPing);
    nsresult SetPing(const nsAString *aPing);
1940 1941
    nsresult GetDownload(nsAString *aPing);
    nsresult SetDownload(const nsAString *aPing);
1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963
    nsresult GetRel(nsAString *aRel);
    nsresult SetRel(const nsAString *aRel);
    nsresult GetHreflang(nsAString *aHreflang);
    nsresult SetHreflang(const nsAString *aHreflang);
    nsresult GetType(nsAString *aType);
    nsresult SetType(const nsAString *aType);
    nsresult GetText(nsAString *aText);
    nsresult SetText(const nsAString *aText);
    nsresult GetProtocol(nsAString *aProtocol);
    nsresult SetProtocol(const nsAString *aProtocol);
    nsresult GetHost(nsAString *aHost);
    nsresult SetHost(const nsAString *aHost);
    nsresult GetHostname(nsAString *aHostname);
    nsresult SetHostname(const nsAString *aHostname);
    nsresult GetPort(nsAString *aPort);
    nsresult SetPort(const nsAString *aPort);
    nsresult GetPathname(nsAString *aPathname);
    nsresult SetPathname(const nsAString *aPathname);
    nsresult GetSearch(nsAString *aSearch);
    nsresult SetSearch(const nsAString *aSearch);
    nsresult GetHash(nsAString *aHash);
    nsresult SetHash(const nsAString *aHash);
1964 1965 1966 1967 1968 1969 1970 1971 1972 1973
    nsresult GetCharset(nsAString *aCharset);
    nsresult SetCharset(const nsAString *aCharset);
    nsresult GetCoords(nsAString *aCoords);
    nsresult SetCoords(const nsAString *aCoords);
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
    nsresult GetRev(nsAString *aRev);
    nsresult SetRev(const nsAString *aRev);
    nsresult GetShape(nsAString *aShape);
    nsresult SetShape(const nsAString *aShape);
1974
    nsresult ToString(nsAString *_retval);
1975 1976
}

1977 1978
[
    object,
1979
    uuid(ad43cb9b-3253-446d-8ba9-50ee50ff017e),
1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001
    local
]
interface nsIDOMHTMLLinkElement : nsIDOMHTMLElement
{
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
    nsresult GetCharset(nsAString *aCharset);
    nsresult SetCharset(const nsAString *aCharset);
    nsresult GetHref(nsAString *aHref);
    nsresult SetHref(const nsAString *aHref);
    nsresult GetHreflang(nsAString *aHreflang);
    nsresult SetHreflang(const nsAString *aHreflang);
    nsresult GetMedia(nsAString *aMedia);
    nsresult SetMedia(const nsAString *aMedia);
    nsresult GetRel(nsAString *aRel);
    nsresult SetRel(const nsAString *aRel);
    nsresult GetRev(nsAString *aRev);
    nsresult SetRev(const nsAString *aRev);
    nsresult GetTarget(nsAString *aTarget);
    nsresult SetTarget(const nsAString *aTarget);
    nsresult GetType(nsAString *aType);
    nsresult SetType(const nsAString *aType);
2002 2003
    nsresult GetCrossOrigin(nsAString *aCrossOrigin);
    nsresult SetCrossOrigin(const nsAString *aCrossOrigin);
2004 2005
}

2006 2007
[
    object,
2008
    uuid(1a7bf1f1-5d6c-4200-9ceb-455874322315),
2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044
    local
]
interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
{
    nsresult GetCaption(nsIDOMHTMLTableCaptionElement **aCaption);
    nsresult SetCaption(nsIDOMHTMLTableCaptionElement *aCaption);
    nsresult GetTHead(nsIDOMHTMLTableSectionElement **aTHead);
    nsresult SetTHead(nsIDOMHTMLTableSectionElement *aTHead);
    nsresult GetTFoot(nsIDOMHTMLTableSectionElement **aTFoot);
    nsresult SetTFoot(nsIDOMHTMLTableSectionElement *aTFoot);
    nsresult GetRows(nsIDOMHTMLCollection **aRows);
    nsresult GetTBodies(nsIDOMHTMLCollection **aTBodies);
    nsresult GetAlign(nsAString *aAlign);
    nsresult SetAlign(const nsAString *aAlign);
    nsresult GetBgColor(nsAString *aBgColor);
    nsresult SetBgColor(const nsAString *aBgColor);
    nsresult GetBorder(nsAString *aBorder);
    nsresult SetBorder(const nsAString *aBorder);
    nsresult GetCellPadding(nsAString *aCellPadding);
    nsresult SetCellPadding(const nsAString *aCellPadding);
    nsresult GetCellSpacing(nsAString *aCellSpacing);
    nsresult SetCellSpacing(const nsAString *aCellSpacing);
    nsresult GetFrame(nsAString *aFrame);
    nsresult SetFrame(const nsAString *aFrame);
    nsresult GetRules(nsAString *aRules);
    nsresult SetRules(const nsAString *aRules);
    nsresult GetSummary(nsAString *aSummary);
    nsresult SetSummary(const nsAString *aSummary);
    nsresult GetWidth(nsAString *aWidth);
    nsresult SetWidth(const nsAString *aWidth);
    nsresult CreateTHead(nsIDOMHTMLElement **_retval);
    nsresult DeleteTHead();
    nsresult CreateTFoot(nsIDOMHTMLElement **_retval);
    nsresult DeleteTFoot();
    nsresult CreateCaption(nsIDOMHTMLElement **_retval);
    nsresult DeleteCaption();
2045 2046
    nsresult InsertRow(int32_t index, nsIDOMHTMLElement **_retval);
    nsresult DeleteRow(int32_t index);
2047 2048
}

2049 2050
[
    object,
2051
    uuid(02094366-0d3d-47e3-949c-89113a9bcc15),
2052 2053 2054 2055
    local
]
interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
{
2056 2057
    nsresult GetRowIndex(int32_t *aRowIndex);
    nsresult GetSectionRowIndex(int32_t *aSectionRowIndex);
2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068
    nsresult GetCells(nsIDOMHTMLCollection **aCells);
    nsresult GetAlign(nsAString *aAlign);
    nsresult SetAlign(const nsAString *aAlign);
    nsresult GetBgColor(nsAString *aBgColor);
    nsresult SetBgColor(const nsAString *aBgColor);
    nsresult GetCh(nsAString *aCh);
    nsresult SetCh(const nsAString *aCh);
    nsresult GetChOff(nsAString *aChOff);
    nsresult SetChOff(const nsAString *aChOff);
    nsresult GetVAlign(nsAString *aVAlign);
    nsresult SetVAlign(const nsAString *aVAlign);
2069 2070
    nsresult InsertCell(int32_t index, nsIDOMHTMLElement **_retval);
    nsresult DeleteCell(int32_t index);
2071 2072
}

2073 2074
[
    object,
2075
    uuid(21ffbe98-51f5-499e-8d6f-612ae798c1e1),
2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100
    local
]
interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
{
    nsresult GetAlign(nsAString *aAlign);
    nsresult SetAlign(const nsAString *aAlign);
    nsresult GetFrameBorder(nsAString *aFrameBorder);
    nsresult SetFrameBorder(const nsAString *aFrameBorder);
    nsresult GetHeight(nsAString *aHeight);
    nsresult SetHeight(const nsAString *aHeight);
    nsresult GetLongDesc(nsAString *aLongDesc);
    nsresult SetLongDesc(const nsAString *aLongDesc);
    nsresult GetMarginHeight(nsAString *aMarginHeight);
    nsresult SetMarginHeight(const nsAString *aMarginHeight);
    nsresult GetMarginWidth(nsAString *aMarginWidth);
    nsresult SetMarginWidth(const nsAString *aMarginWidth);
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
    nsresult GetScrolling(nsAString *aScrolling);
    nsresult SetScrolling(const nsAString *aScrolling);
    nsresult GetSrc(nsAString *aSrc);
    nsresult SetSrc(const nsAString *aSrc);
    nsresult GetWidth(nsAString *aWidth);
    nsresult SetWidth(const nsAString *aWidth);
    nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
2101
    nsresult GetContentWindow(nsIDOMWindow **aContentWindow);
2102 2103
    nsresult GetSandbox(nsAString *aSandbox);
    nsresult SetSandbox(const nsAString *aSandbox);
2104 2105
    nsresult GetAllowFullscreen(bool *aAllowFullscreen);
    nsresult SetAllowFullscreen(bool aAllowFullscreen);
2106 2107
}

2108 2109
[
    object,
2110
    uuid(1a79af54-dbbb-4532-be48-944f3995e7e9),
2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124
    local
]
interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
{
    nsresult GetFrameBorder(nsAString *aFrameBorder);
    nsresult SetFrameBorder(const nsAString *aFrameBorder);
    nsresult GetLongDesc(nsAString *aLongDesc);
    nsresult SetLongDesc(const nsAString *aLongDesc);
    nsresult GetMarginHeight(nsAString *aMarginHeight);
    nsresult SetMarginHeight(const nsAString *aMarginHeight);
    nsresult GetMarginWidth(nsAString *aMarginWidth);
    nsresult SetMarginWidth(const nsAString *aMarginWidth);
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
2125 2126
    nsresult GetNoResize(bool *aNoResize);
    nsresult SetNoResize(bool aNoResize);
2127 2128 2129 2130 2131
    nsresult GetScrolling(nsAString *aScrolling);
    nsresult SetScrolling(const nsAString *aScrolling);
    nsresult GetSrc(nsAString *aSrc);
    nsresult SetSrc(const nsAString *aSrc);
    nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
2132
    nsresult GetContentWindow(nsIDOMWindow **aContentWindow);
2133 2134
}

2135 2136
[
    object,
2137
    uuid(bed8f222-c4dd-41ba-9ec6-dfae0ec8def8),
2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156
    local
]
interface nsIDOMHTMLObjectElement : nsIDOMHTMLElement
{
    nsresult GetForm(nsIDOMHTMLFormElement **aForm);
    nsresult GetCode(nsAString *aCode);
    nsresult SetCode(const nsAString *aCode);
    nsresult GetAlign(nsAString *aAlign);
    nsresult SetAlign(const nsAString *aAlign);
    nsresult GetArchive(nsAString *aArchive);
    nsresult SetArchive(const nsAString *aArchive);
    nsresult GetBorder(nsAString *aBorder);
    nsresult SetBorder(const nsAString *aBorder);
    nsresult GetCodeBase(nsAString *aCodeBase);
    nsresult SetCodeBase(const nsAString *aCodeBase);
    nsresult GetCodeType(nsAString *aCodeType);
    nsresult SetCodeType(const nsAString *aCodeType);
    nsresult GetData(nsAString *aData);
    nsresult SetData(const nsAString *aData);
2157 2158
    nsresult GetDeclare(bool *aDeclare);
    nsresult SetDeclare(bool aDeclare);
2159 2160
    nsresult GetHeight(nsAString *aHeight);
    nsresult SetHeight(const nsAString *aHeight);
2161 2162
    nsresult GetHspace(int32_t *aHspace);
    nsresult SetHspace(int32_t aHspace);
2163 2164 2165 2166 2167 2168 2169 2170
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
    nsresult GetStandby(nsAString *aStandby);
    nsresult SetStandby(const nsAString *aStandby);
    nsresult GetType(nsAString *aType);
    nsresult SetType(const nsAString *aType);
    nsresult GetUseMap(nsAString *aUseMap);
    nsresult SetUseMap(const nsAString *aUseMap);
2171 2172
    nsresult GetVspace(int32_t *aVspace);
    nsresult SetVspace(int32_t aVspace);
2173 2174 2175
    nsresult GetWidth(nsAString *aWidth);
    nsresult SetWidth(const nsAString *aWidth);
    nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
2176
    nsresult GetWillValidate(bool *aWillValidate);
2177 2178
    nsresult GetValidity(nsIDOMValidityState **aValidity);
    nsresult GetValidationMessage(nsAString *aValidationMessage);
2179
    nsresult CheckValidity(bool *_retval);
2180
    nsresult SetCustomValidity(const nsAString *error);
2181 2182
}

2183 2184
[
    object,
2185
    uuid(f85e1b05-6dc4-442d-bea8-7cf551f9bc9f),
2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199
    local
]
interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
{
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
    nsresult GetType(nsAString *aType);
    nsresult SetType(const nsAString *aType);
    nsresult GetValue(nsAString *aValue);
    nsresult SetValue(const nsAString *aValue);
    nsresult GetValueType(nsAString *aValueType);
    nsresult SetValueType(const nsAString *aValueType);
}

2200 2201
[
    object,
2202
    uuid(e81273e1-d440-4dd3-9073-8199f7a9525e),
2203 2204 2205 2206
    local
]
interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement
{
2207 2208
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
2209 2210 2211 2212
    nsresult GetMedia(nsAString *aMedia);
    nsresult SetMedia(const nsAString *aMedia);
    nsresult GetType(nsAString *aType);
    nsresult SetType(const nsAString *aType);
2213 2214
    nsresult GetScoped(bool *aScoped);
    nsresult SetScoped(bool aScoped);
2215
    nsresult GetDOMStyleSheet(nsIDOMStyleSheet **aDOMStyleSheet);
2216 2217
}

2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228
[
    object,
    uuid(7cebc153-168a-416c-ba5a-56a8c2ddb2ec),
    local
]
interface nsIDOMNodeSelector : nsISupports
{
    nsresult QuerySelector(const nsAString *selectors, nsIDOMElement **_retval);
    nsresult QuerySelectorAll(const nsAString *selectors, nsIDOMNodeList **_retval);
}

2229 2230
[
    object,
2231 2232
    uuid(94928ab3-8b63-11d3-989d-001083010e9b),
    local
2233 2234 2235
]
interface nsIURIContentListener : nsISupports
{
2236 2237 2238 2239 2240 2241
    nsresult OnStartURIOpen(nsIURI *aURI, bool *_retval);
    nsresult DoContent(const char *aContentType, bool aIsContentPreferred, nsIRequest *aRequest,
        nsIStreamListener **aContentHandler, bool *_retval);
    nsresult IsPreferred(const char *aContentType, char **aDesiredContentType, bool *_retval);
    nsresult CanHandleContent(const char *aContentType, bool aIsContentPreferred,
        char **aDesiredContentType, bool *_retval);
2242 2243 2244 2245 2246 2247
    nsresult GetLoadCookie(nsISupports **aLoadCookie);
    nsresult SetLoadCookie(nsISupports *aLoadCookie);
    nsresult GetParentContentListener(nsIURIContentListener **aParentContentListener);
    nsresult SetParentContentListener(nsIURIContentListener *aParentContentListener);
}

2248 2249
[
    object,
2250 2251
    uuid(44b78386-1dd2-11b2-9ad2-e4eee2ca1916),
    local
2252 2253 2254
]
interface nsITooltipListener : nsISupports
{
2255
    nsresult OnShowTooltip(int32_t aXCoords, int32_t aYCoords, const PRUnichar *aTipText);
2256 2257 2258
    nsresult OnHideTooltip();
}

2259 2260
[
    object,
2261
    uuid(33e9d001-caab-4ba9-8961-54902f197202),
2262
    local
2263 2264 2265 2266 2267 2268 2269 2270 2271 2272
]
interface nsIWebBrowser : nsISupports
{
    nsresult AddWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
    nsresult RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
    nsresult GetContainerWindow(nsIWebBrowserChrome **aContainerWindow);
    nsresult SetContainerWindow(nsIWebBrowserChrome *aContainerWindow);
    nsresult GetParentURIContentListener(nsIURIContentListener **aParentURIContentListener);
    nsresult SetParentURIContentListener(nsIURIContentListener *aParentURIContentListener);
    nsresult GetContentDOMWindow(nsIDOMWindow **aContentDOMWindow);
2273 2274
    nsresult GetIsActive(bool *aIsActive);
    nsresult SetIsActive(bool aIsActive);
2275 2276
}

2277
cpp_quote("#define SETUP_ALLOW_JAVASCRIPT  2")
2278
cpp_quote("#define SETUP_IS_CHROME_WRAPPER 7")
2279
cpp_quote("#define SETUP_DISABLE_NOSCRIPT  16")
2280 2281 2282

[
    object,
2283 2284
    uuid(f15398a0-8018-11d3-af70-00a024ffc08c),
    local
2285 2286 2287
]
interface nsIWebBrowserSetup : nsISupports
{
2288
    nsresult SetProperty(uint32_t aId, uint32_t aValue);
2289 2290 2291 2292 2293 2294
}

typedef void* nativeWindow;

[
    object,
2295
    uuid(9da319f3-eee6-4504-81a5-6A19cf6215bf),
2296
    local
2297 2298 2299
]
interface nsIBaseWindow : nsISupports
{
2300 2301
    nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget *parentWidget, int32_t x,
            int32_t y, int32_t cx, int32_t cy);
2302 2303
    nsresult Create();
    nsresult Destroy();
2304 2305 2306 2307 2308 2309
    nsresult SetPosition(int32_t x, int32_t y);
    nsresult GetPosition(int32_t *x, int32_t *y);
    nsresult SetSize(int32_t cx, int32_t cy, bool fRepaint);
    nsresult GetSize(int32_t *cx, int32_t *cy);
    nsresult SetPositionAndSize(int32_t x, int32_t y, int32_t cx, int32_t cy, bool fRepaint);
    nsresult GetPositionAndSize(int32_t *x, int32_t *y, int32_t *cx, int32_t *cy);
2310
    nsresult Repaint(bool force);
2311
    nsresult GetParentWidget(nsIWidget **aParentWidget);
2312 2313 2314
    nsresult SetParentWidget(nsIWidget *aParentWidget);
    nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow);
    nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow);
2315
    nsresult GetNativeHandle(nsAString *aNativeHandle);
2316 2317 2318 2319
    nsresult GetVisibility(bool *aVisibility);
    nsresult SetVisibility(bool aVisibility);
    nsresult GetEnabled(bool *aEnabled);
    nsresult SetEnabled(bool aEnabled);
2320
    nsresult GetMainWidget(nsIWidget **aMainWidget);
2321
    nsresult GetUnscaledDevicePixelsPerCSSPixel(double *aUnscaledDevicePixelsPerCSSPixel);
2322 2323 2324 2325 2326 2327 2328
    nsresult SetFocus();
    nsresult GetTitle(PRUnichar **aTitle);
    nsresult SetTitle(const PRUnichar *aTitle);
}

[
    object,
2329
    uuid(28404f7e-0f17-4dc3-a21a-2074d8659b02),
2330
    local
2331 2332 2333
]
interface nsIWebNavigation : nsISupports
{
2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352
    const UINT LOAD_FLAGS_MASK                    =  0xffff;
    const UINT LOAD_FLAGS_NONE                    =       0;
    const UINT LOAD_FLAGS_IS_REFRESH              =  0x0010;
    const UINT LOAD_FLAGS_IS_LINK                 =  0x0020;
    const UINT LOAD_FLAGS_BYPASS_HISTORY          =  0x0040;
    const UINT LOAD_FLAGS_REPLACE_HISTORY         =  0x0080;
    const UINT LOAD_FLAGS_BYPASS_CACHE            =  0x0100;
    const UINT LOAD_FLAGS_BYPASS_PROXY            =  0x0200;
    const UINT LOAD_FLAGS_CHARSET_CHANGE          =  0x0400;
    const UINT LOAD_FLAGS_STOP_CONTENT            =  0x0800;
    const UINT LOAD_FLAGS_FROM_EXTERNAL           =  0x1000;
    const UINT LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP =  0x2000;
    const UINT LOAD_FLAGS_FIRST_LOAD              =  0x4000;
    const UINT LOAD_FLAGS_ALLOW_POPUPS            =  0x8000;
    const UINT LOAD_FLAGS_BYPASS_CLASSIFIER       = 0x10000;
    const UINT LOAD_FLAGS_FORCE_ALLOW_COOKIES     = 0x20000;
    const UINT LOAD_FLAGS_DISALLOW_INHERIT_OWNER  = 0x40000;
    const UINT LOAD_FLAGS_URI_IS_UTF8             = 0x80000;

2353 2354
    nsresult GetCanGoBack(bool *aCanGoBack);
    nsresult GetCanGoForward(bool *aCanGoForward);
2355 2356
    nsresult GoBack();
    nsresult GoForward();
2357 2358
    nsresult GotoIndex(int32_t index);
    nsresult LoadURI(const PRUnichar *aURI, uint32_t aLoadFlags, nsIURI *aReferrer,
2359
            nsIInputStream *aPostData, nsIInputStream *aHeaders);
2360 2361
    nsresult Reload(uint32_t aReloadFlags);
    nsresult Stop(uint32_t aStopFlags);
2362 2363 2364 2365 2366 2367 2368
    nsresult GetDocument(nsIDOMDocument **aDocument);
    nsresult GetCurrentURI(nsIURI **aCurrentURI);
    nsresult GetReferringURI(nsIURI **aReferringURI);
    nsresult GetSessionHistory(nsISHistory **aSessionHistory);
    nsresult SetSessionHistory(nsISHistory *aSessionHistory);
}

2369 2370
[
    object,
2371
    uuid(1c3437b0-9e2c-11e2-9e96-0800200c9a66),
2372 2373 2374 2375
    local
]
interface nsIWebProgress : nsISupports
{
2376
    nsresult AddProgressListener(nsIWebProgressListener *aListener, uint32_t aNotifyMask);
2377 2378
    nsresult RemoveProgressListener(nsIWebProgressListener *aListener);
    nsresult GetDOMWindow(nsIDOMWindow **aDOMWindow);
2379 2380
    nsresult GetDOMWindowID(uint64_t *aDOMWindowID);
    nsresult GetIsTopLevel(bool *aIsTopLevel);
2381
    nsresult GetIsLoadingDocument(bool *aIsLoadingDocument);
2382 2383
}

2384 2385
[
    object,
2386
    uuid(1bcfc611-8941-4c39-9e06-7116e564a1ce),
2387
    local
2388 2389 2390
]
interface nsIPrintSettings : nsISupports
{
2391
    typedef struct { char dummy; } nsIntMargin;
2392

2393 2394 2395
    nsresult SetPrintOptions(int32_t aType, bool aTurnOnOff);
    nsresult GetPrintOptions(int32_t aType, bool *_retval);
    nsresult GetPrintOptionsBits(int32_t *_retval);
2396
    nsresult GetEffectivePageSize(double *aWidth, double *aHeight);
2397 2398 2399 2400
    nsresult Clone(nsIPrintSettings **_retval);
    nsresult Assign(nsIPrintSettings *aPS);
    nsresult GetPrintSession(nsIPrintSession **aPrintSession);
    nsresult SetPrintSession(nsIPrintSession *aPrintSession);
2401 2402 2403 2404
    nsresult GetStartPageRange(int32_t *aStartPageRange);
    nsresult SetStartPageRange(int32_t aStartPageRange);
    nsresult GetEndPageRange(int32_t *aEndPageRange);
    nsresult SetEndPageRange(int32_t aEndPageRange);
2405 2406 2407 2408 2409 2410 2411 2412
    nsresult GetEdgeTop(double *aEdgeTop);
    nsresult SetEdgeTop(double aEdgeTop);
    nsresult GetEdgeLeft(double *aEdgeLeft);
    nsresult SetEdgeLeft(double aEdgeLeft);
    nsresult GetEdgeBottom(double *aEdgeBottom);
    nsresult SetEdgeBottom(double aEdgeBottom);
    nsresult GetEdgeRight(double *aEdgeRight);
    nsresult SetEdgeRight(double aEdgeRight);
2413 2414 2415 2416 2417 2418 2419 2420
    nsresult GetMarginTop(double *aMarginTop);
    nsresult SetMarginTop(double aMarginTop);
    nsresult GetMarginLeft(double *aMarginLeft);
    nsresult SetMarginLeft(double aMarginLeft);
    nsresult GetMarginBottom(double *aMarginBottom);
    nsresult SetMarginBottom(double aMarginBottom);
    nsresult GetMarginRight(double *aMarginRight);
    nsresult SetMarginRight(double aMarginRight);
2421 2422 2423 2424 2425 2426 2427 2428
    nsresult GetUnwriteableMarginTop(double *aUnwriteableMarginTop);
    nsresult SetUnwriteableMarginTop(double aUnwriteableMarginTop);
    nsresult GetUnwriteableMarginLeft(double *aUnwriteableMarginLeft);
    nsresult SetUnwriteableMarginLeft(double aUnwriteableMarginLeft);
    nsresult GetUnwriteableMarginBottom(double *aUnwriteableMarginBottom);
    nsresult SetUnwriteableMarginBottom(double aUnwriteableMarginBottom);
    nsresult GetUnwriteableMarginRight(double *aUnwriteableMarginRight);
    nsresult SetUnwriteableMarginRight(double aUnwriteableMarginRight);
2429 2430
    nsresult GetScaling(double *aScaling);
    nsresult SetScaling(double aScaling);
2431 2432 2433 2434
    nsresult GetPrintBGColors(bool *aPrintBGColors);
    nsresult SetPrintBGColors(bool aPrintBGColors);
    nsresult GetPrintBGImages(bool *aPrintBGImages);
    nsresult SetPrintBGImages(bool aPrintBGImages);
2435 2436
    nsresult GetPrintRange(int16_t *aPrintRange);
    nsresult SetPrintRange(int16_t aPrintRange);
2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452
    nsresult GetTitle(PRUnichar **aTitle);
    nsresult SetTitle(const PRUnichar *aTitle);
    nsresult GetDocURL(PRUnichar **aDocURL);
    nsresult SetDocURL(const PRUnichar *aDocURL);
    nsresult GetHeaderStrLeft(PRUnichar **aHeaderStrLeft);
    nsresult SetHeaderStrLeft(const PRUnichar *aHeaderStrLeft);
    nsresult GetHeaderStrCenter(PRUnichar **aHeaderStrCenter);
    nsresult SetHeaderStrCenter(const PRUnichar *aHeaderStrCenter);
    nsresult GetHeaderStrRight(PRUnichar **aHeaderStrRight);
    nsresult SetHeaderStrRight(const PRUnichar *aHeaderStrRight);
    nsresult GetFooterStrLeft(PRUnichar **aFooterStrLeft);
    nsresult SetFooterStrLeft(const PRUnichar *aFooterStrLeft);
    nsresult GetFooterStrCenter(PRUnichar **aFooterStrCenter);
    nsresult SetFooterStrCenter(const PRUnichar *aFooterStrCenter);
    nsresult GetFooterStrRight(PRUnichar **aFooterStrRight);
    nsresult SetFooterStrRight(const PRUnichar *aFooterStrRight);
2453 2454
    nsresult GetHowToEnableFrameUI(int16_t *aHowToEnableFrameUI);
    nsresult SetHowToEnableFrameUI(int16_t aHowToEnableFrameUI);
2455 2456
    nsresult GetIsCancelled(bool *aIsCancelled);
    nsresult SetIsCancelled(bool aIsCancelled);
2457 2458 2459 2460
    nsresult GetPrintFrameTypeUsage(int16_t *aPrintFrameTypeUsage);
    nsresult SetPrintFrameTypeUsage(int16_t aPrintFrameTypeUsage);
    nsresult GetPrintFrameType(int16_t *aPrintFrameType);
    nsresult SetPrintFrameType(int16_t aPrintFrameType);
2461 2462 2463 2464 2465 2466
    nsresult GetPrintSilent(bool *aPrintSilent);
    nsresult SetPrintSilent(bool aPrintSilent);
    nsresult GetShrinkToFit(bool *aShrinkToFit);
    nsresult SetShrinkToFit(bool aShrinkToFit);
    nsresult GetShowPrintProgress(bool *aShowPrintProgress);
    nsresult SetShowPrintProgress(bool aShowPrintProgress);
2467 2468
    nsresult GetPaperName(PRUnichar **aPaperName);
    nsresult SetPaperName(const PRUnichar *aPaperName);
2469 2470 2471 2472
    nsresult GetPaperSizeType(int16_t *aPaperSizeType);
    nsresult SetPaperSizeType(int16_t aPaperSizeType);
    nsresult GetPaperData(int16_t *aPaperData);
    nsresult SetPaperData(int16_t aPaperData);
2473 2474 2475 2476
    nsresult GetPaperWidth(double *aPaperWidth);
    nsresult SetPaperWidth(double aPaperWidth);
    nsresult GetPaperHeight(double *aPaperHeight);
    nsresult SetPaperHeight(double aPaperHeight);
2477 2478
    nsresult GetPaperSizeUnit(int16_t *aPaperSizeUnit);
    nsresult SetPaperSizeUnit(int16_t aPaperSizeUnit);
2479 2480 2481 2482 2483 2484
    nsresult GetPlexName(PRUnichar **aPlexName);
    nsresult SetPlexName(const PRUnichar *aPlexName);
    nsresult GetColorspace(PRUnichar **aColorspace);
    nsresult SetColorspace(const PRUnichar *aColorspace);
    nsresult GetResolutionName(PRUnichar **aResolutionName);
    nsresult SetResolutionName(const PRUnichar aResolutionName);
2485 2486 2487 2488 2489 2490
    nsresult GetDownloadFonts(bool *aDownloadFonts);
    nsresult SetDownloadFonts(bool aDownloadFonts);
    nsresult GetPrintReversed(bool *aPrintReversed);
    nsresult SetPrintReversed(bool aPrintReversed);
    nsresult GetPrintInColor(bool *aPrintInColor);
    nsresult SetPrintInColor(bool aPrintInColor);
2491 2492
    nsresult GetOrientation(int32_t *aOrientation);
    nsresult SetOrientation(int32_t aOrientation);
2493 2494
    nsresult GetPrintCommand(PRUnichar **aPrintCommand);
    nsresult SetPrintCommand(const PRUnichar *aPrintCommand);
2495 2496
    nsresult GetNumCopies(int32_t *aNumCopies);
    nsresult SetNumCopies(int32_t aNumCopies);
2497 2498
    nsresult GetPrinterName(PRUnichar **aPrinterName);
    nsresult SetPrinterName(const PRUnichar *aPrinterName);
2499 2500
    nsresult GetPrintToFile(bool *aPrintToFile);
    nsresult SetPrintToFile(bool aPrintToFile);
2501 2502
    nsresult GetToFileName(PRUnichar **aToFileName);
    nsresult SetToFileName(const PRUnichar *aToFileName);
2503 2504 2505 2506
    nsresult GetOutputFormat(int16_t *aOutputFormat);
    nsresult SetOutputFormat(int16_t aOutputFormat);
    nsresult GetPrintPageDelay(int32_t *aPrintPageDelay);
    nsresult SetPrintPageDelay(int32_t aPrintPageDelay);
2507 2508 2509 2510
    nsresult GetResolution(int32_t *aResolution) = 0;
    nsresult SetResolution(int32_t aResolution) = 0;
    nsresult GetDuplex(int32_t *aDuplex);
    nsresult SetDuplex(int32_t aDuplex);
2511 2512 2513 2514
    nsresult GetIsInitializedFromPrinter(bool *aIsInitializedFromPrinter);
    nsresult SetIsInitializedFromPrinter(bool aIsInitializedFromPrinter);
    nsresult GetIsInitializedFromPrefs(bool *aIsInitializedFromPrefs);
    nsresult SetIsInitializedFromPrefs(bool aIsInitializedFromPrefs);
2515 2516
    nsresult GetPersistMarginBoxSettings(bool *aPersistMarginBoxSettings);
    nsresult SetPersistMarginBoxSettings(bool aPersistMarginBoxSettings);
2517 2518 2519 2520
    nsresult SetMarginInTwips(nsIntMargin *aMargin);
    nsresult SetEdgeInTwips(nsIntMargin *aEdge);
    nsresult GetMarginInTwips(nsIntMargin *aMargin);
    nsresult GetEdgeInTwips(nsIntMargin *aEdge);
2521
    nsresult SetupSilentPrinting();
2522 2523
    nsresult SetUnwriteableMarginInTwips(nsIntMargin *aEdge);
    nsresult GetUnwriteableMarginInTwips(nsIntMargin *aEdge);
2524
    nsresult GetPageRanges(void * /*nsTArray<int32_t>&*/ aPages);
2525 2526 2527 2528
}

[
    object,
2529 2530
    uuid(9a7ca4b0-fbba-11d4-a869-00105a183419),
    local
2531 2532 2533 2534 2535 2536
]
interface nsIWebBrowserPrint : nsISupports
{
    nsresult GetGlobalPrintSettings(nsIPrintSettings **aGlobalPrintSettings);
    nsresult GetCurrentPrintSettings(nsIPrintSettings **aCurrentPrintSettings);
    nsresult GetCurrentChildDOMWindow(nsIDOMWindow **aCurrentChildDOMWindow);
2537 2538 2539 2540 2541 2542
    nsresult GetDoingPrint(bool *aDoingPrint);
    nsresult GetDoingPrintPreview(bool *aDoingPrintPreview);
    nsresult GetIsFramesetDocument(bool *aIsFramesetDocument);
    nsresult GetIsFramesetFrameSelected(bool *aIsFramesetFrameSelected);
    nsresult GetIsIFrameSelected(bool *aIsIFrameSelected);
    nsresult GetIsRangeSelection(bool *aIsRangeSelection);
2543
    nsresult GetPrintPreviewNumPages(int32_t *aPrintPreviewNumPages);
2544 2545 2546
    nsresult Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener);
    nsresult PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin,
                          nsIWebProgressListener *aWPListener);
2547
    nsresult PrintPreviewNavigate(int16_t aNavType, int32_t aPageNum);
2548
    nsresult Cancel();
2549
    nsresult EnumerateDocumentNames(uint32_t *aCount, PRUnichar ***aResult);
2550 2551 2552
    nsresult ExitPrintPreview();
}

2553 2554
[
    object,
2555 2556
    uuid(919e792a-6490-40b8-bba5-f9e9ad5640c8),
    local
2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570
]
interface nsIScrollable : nsISupports
{
    enum {
        ScrollOrientation_X = 1,
        ScrollOrientation_Y = 2
    };

    enum {
        Scrollbar_Auto   = 1,
        Scrollbar_Never  = 2,
        Scrollbar_Always = 3
    };

2571 2572 2573 2574 2575 2576 2577 2578 2579
    nsresult GetCurScrollPos(int32_t scrollOrientation, int32_t *curPos);
    nsresult SetCurScrollPos(int32_t scrollOrientation, int32_t curPos);
    nsresult SetCurScrollPosEx(int32_t curHorizontalPos, int32_t curVerticalPos);
    nsresult GetScrollRange(int32_t scrollOrientation, int32_t *minPos, int32_t *maxPos);
    nsresult SetScrollRange(int32_t scrollOrientation, int32_t minPos, int32_t maxPos);
    nsresult SetScrollRangeEx(int32_t minHorizontalPos, int32_t maxHorizontalPos,
            int32_t minVerticalPos, int32_t maxVerticalPos);
    nsresult GetDefaultScrollbarPreferences(int32_t scrollOrientation, int32_t *scrollbarPref);
    nsresult SetDefaultScrollbarPreferences(int32_t scrollOrientation, int32_t scrollbarPref);
2580
    nsresult GetScrollbarVisibility(bool *verticalVisible, bool *horizontalVisible);
2581 2582
}

2583 2584
[
    object,
2585
    uuid(272a5020-64f5-485c-a8c4-44b2882ae0a2),
2586
    local
2587 2588 2589
]
interface nsIFile : nsISupports
{
2590 2591 2592 2593 2594 2595
    typedef struct {
        /* Currently not needed */
        char dummy;
    } PRFileDesc, PRLibrary, widl_FILE;
#define FILE widl_FILE

2596 2597 2598
    nsresult Append(const nsAString *node);
    nsresult AppendNative(const nsAString *node);
    nsresult Normalize();
2599
    nsresult Create(uint32_t type, uint32_t permission);
2600 2601 2602 2603 2604 2605 2606 2607 2608 2609
    nsresult GetLeafName(nsAString *aLeafName);
    nsresult SetLeafName(const nsAString *aLeafName);
    nsresult GetNativeLeafName(nsAString *aLeafName);
    nsresult SetNativeLeafName(const nsAString *aLeafName);
    nsresult CopyTo(nsIFile *newParentDir, const nsAString *newName);
    nsresult CopyToNative(nsIFile *newParentDir, const nsAString *newName);
    nsresult CopyToFollowingLinks(nsIFile *newParentDir, const nsAString *newName);
    nsresult CopyToFollowingLinksNative(nsIFile *newParentDir, const nsAString *newName);
    nsresult MoveTo(nsIFile *newParentDir, const nsAString *newName);
    nsresult MoveToNative(nsIFile *newParentDir, const nsAString *newName);
2610
    nsresult Remove(bool recursive);
2611 2612 2613 2614
    nsresult GetPermissions(uint32_t *aPermissions);
    nsresult SetPermissions(uint32_t pPermissions);
    nsresult GetPermissionsOfLink(uint32_t *aPermissions);
    nsresult SetPermissionsOfLink(uint32_t pPermissions);
2615 2616 2617 2618
    nsresult GetLastModifiedTime(PRTime *aLastModifiedTime);
    nsresult SetLastModifiedTime(PRTime aLastModifiedTime);
    nsresult GetLastModifiedTimeOfLink(PRTime *aLastModifiedTimeOfLink);
    nsresult SetLastModifiedTimeOfLink(PRTime aLastModifiedTimeOfLink);
2619 2620 2621
    nsresult GetFileSize(int64_t *aFileSize);
    nsresult SetFileSize(int64_t aFileSize);
    nsresult GetFileSizeOfLink(int64_t *aFileSizeOfLink);
2622 2623 2624 2625
    nsresult GetTarget(nsAString *aTarget);
    nsresult GetNativeTarget(nsACString *aNativeTarget);
    nsresult GetPath(nsAString *aPath);
    nsresult GetNativePath(nsACString *aNativePath);
2626 2627 2628 2629 2630 2631 2632 2633 2634
    nsresult Exists(bool *_retval);
    nsresult IsWritable(bool *_retval);
    nsresult IsReadable(bool *_retval);
    nsresult IsExecutable(bool *_retval);
    nsresult IsHidden(bool *_retval);
    nsresult IsDirectory(bool *_retval);
    nsresult IsFile(bool *_retval);
    nsresult IsSymlink(bool *_retval);
    nsresult IsSpecial(bool *_retval);
2635
    nsresult CreateUnique(uint32_t type, uint32_t permission);
2636
    nsresult Clone(nsIFile **_retval);
2637 2638
    nsresult Equals(nsIFile *inFile, bool *_retval);
    nsresult Contains(nsIFile *inFile, bool recir, bool *_retval);
2639 2640
    nsresult GetParent(nsIFile **aParent);
    nsresult GetDirectoryEntries(nsISimpleEnumerator **aDirectoryEntries);
2641 2642 2643 2644 2645
    nsresult InitWithPath(const nsAString *filePath);
    nsresult InitWithNativePath(const nsACString *filePath);
    nsresult InitWithFile(nsIFile *aFile);
    nsresult GetFollowLinks(bool *aFollowLinks);
    nsresult SetFollowLinks(bool aFollowLinks);
2646
    nsresult OpenNSPRFileDesc(int32_t flags, int32_t mode, PRFileDesc **_retval);
2647 2648
    nsresult OpenANSIFileDesc(const char *mode, FILE **_retval);
    nsresult Load(PRLibrary **_retval);
2649
    nsresult GetDiskSpaceAvailable(int64_t *aDiskSpaceAvailable);
2650 2651 2652 2653 2654 2655 2656 2657
    nsresult AppendRelativePath(const nsAString *relativeFilePath);
    nsresult AppendRelativeNativePath(const nsACString *relativeFilePath);
    nsresult GetPersistentDescriptor(nsACString *aPersistentDescriptor);
    nsresult SetPersistentDescriptor(const nsACString *aPersistentDescriptor);
    nsresult Reveal();
    nsresult Launch();
    nsresult GetRelativeDescriptor(nsIFile *fromFile, nsACString *_retval);
    nsresult SetRelativeDescriptor(nsIFile *fromFile, const nsACString *relativeDesc);
2658
}
2659

2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676
[
    object,
    uuid(1d940426-5fe5-42c3-84ae-a300f2d9ebd5),
    local
]
interface nsIComponentManager : nsISupports
{
    nsresult GetClassObject(nsCIDRef aClass, nsIIDRef aIID, void **result);
    nsresult GetClassObjectByContractID(const char *aContractID, nsIIDRef aIID, void **result);
    nsresult CreateInstance(nsCIDRef aClass, nsISupports *aDelegate, nsIIDRef aIID,
            void **result);
    nsresult CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate,
            nsIIDRef aIID, void **result);
    nsresult AddBootstrappedManifestLocation(nsIFile *aLocation);
    nsresult RemoveBootstrappedManifestLocation(nsIFile *aLocation);
}

2677 2678
[
    object,
2679
    uuid(55d25e49-793f-4727-a69f-de8b15f4b985),
2680
    local
2681 2682 2683 2684
]
interface nsIPrefBranch : nsISupports
{
    nsresult GetRoot(char **aRoot);
2685
    nsresult GetPrefType(const char *aPrefName, int32_t *_retval);
2686 2687
    nsresult GetBoolPref(const char *aPrefName, bool *_retval);
    nsresult SetBoolPref(const char *aPrefName, bool aValue);
2688
    nsresult GetFloatPref(const char *aPrefName, float *_retval);
2689 2690
    nsresult GetCharPref(const char *aPrefName, char **_retval);
    nsresult SetCharPref(const char *aPrefName, const char *aValue);
2691 2692
    nsresult GetIntPref(const char *aPrefName, int32_t *_retval);
    nsresult SetIntPref(const char *aPrefName, int32_t aValue);
2693 2694 2695 2696
    nsresult GetComplexValue(const char *aPrefName, const nsIID *aType, void **aValue);
    nsresult SetComplexValue(const char *aPrefName, const nsIID *aType, nsISupports *aValue);
    nsresult ClearUserPref(const char *aPrefName);
    nsresult LockPref(const char *aPrefName);
2697 2698
    nsresult PrefHasUserValue(const char *aPrefName, bool *_retval);
    nsresult PrefIsLocked(const char *aPrefName, bool *_retval);
2699 2700
    nsresult UnlockPref(const char *aPrefName);
    nsresult DeleteBranch(const char *aStartingAt);
2701
    nsresult GetChildList(const char *aStartingAt, uint32_t *aCount, char ***aChildArray);
2702
    nsresult ResetBranch(const char *aStartingAt);
2703 2704
    nsresult AddObserver(const char *aDomain, nsIObserver *aObserver, bool aHoldWeak);
    nsresult RemoveObserver(const char *aDomain, nsIObserver *aObserver);
2705 2706
}

2707 2708 2709 2710 2711 2712 2713
[
    object,
    uuid(bbf8cab0-d43a-11d3-8cc2-00609792278c),
    local
]
interface nsIDirectoryServiceProvider : nsISupports
{
2714
    nsresult GetFile(const char *prop, bool *persistent, nsIFile **_retval);
2715 2716
}

2717 2718 2719 2720 2721 2722 2723 2724 2725 2726
[
    object,
    uuid(2f977d4b-5485-11d4-87e2-0010a4e75ef2),
    local
]
interface nsIDirectoryServiceProvider2 : nsIDirectoryServiceProvider
{
    nsresult GetFiles(const char *prop, nsISimpleEnumerator **_retval);
}

2727 2728
[
    object,
2729
    uuid(f5753fec-a051-4ddc-8891-11f1f1575072),
2730
    local
2731 2732 2733 2734
]
interface nsIProtocolHandler : nsISupports
{
    nsresult GetScheme(nsACString *aScheme);
2735 2736
    nsresult GetDefaultPort(int32_t *aDefaultPort);
    nsresult GetProtocolFlags(uint32_t *aProtocolFlags);
2737 2738 2739
    nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset,
                    nsIURI *aBaseURI, nsIURI **_retval);
    nsresult NewChannel(nsIURI *aURI, nsIChannel **_retval);
2740
    nsresult AllowPort(int32_t port, const char *scheme, bool *_retval);
2741 2742 2743 2744
}

[
    object,
2745 2746
    uuid(0e61f3b2-34d7-4c79-bfdc-4860bc7341b7),
    local
2747 2748 2749
]
interface nsIExternalProtocolHandler : nsIProtocolHandler
{
2750
    nsresult ExternalAppExistsForScheme(const nsACString *scheme, bool *_retval);
2751 2752
}

2753 2754
[
    object,
2755 2756
    uuid(bddeda3f-9020-4d12-8c70-984ee9f7935e),
    local
2757 2758 2759 2760
]
interface nsIIOService : nsISupports
{
    nsresult GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval);
2761
    nsresult GetProtocolFlags(const char *aScheme, uint32_t *_retval);
2762 2763
    nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
                    nsIURI **_retval);
2764 2765
    nsresult NewFileURI(nsIFile *aFile, nsIURI **_retval);
    nsresult NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval);
2766 2767
    nsresult NewChannel(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
                        nsIChannel **_retval);
2768 2769
    nsresult GetOffline(bool *aOffline);
    nsresult SetOffline(bool aOffline);
2770
    nsresult AllowPort(int32_t aPort, const char *aScheme, bool *_retval);
2771
    nsresult ExtractScheme(const nsACString *urlString, nsACString *_retval);
2772
}
2773

2774 2775
[
    object,
2776
    uuid(ca68c485-9db3-4c12-82a6-4fab7948e2d5),
2777 2778 2779 2780 2781
    local,
]
interface nsINetUtil : nsISupports
{
    nsresult ParseContentType(const nsACString *aTypeHeader, nsACString *aCharset,
2782
            bool *aHadCharset, nsACString *_retval);
2783 2784
    nsresult ProtocolHasFlags(nsIURI *aURI, uint32_t aFlag, bool *_retval);
    nsresult URIChainHasFlags(nsIURI *aURI, uint32_t aFlags, bool *_retval);
2785
    nsresult ToImmutableURI(nsIURI *aURI, nsIURI **_retval);
2786
    nsresult NewSimpleNestedURI(nsIURI *aURI, nsIURI **_retval);
2787 2788 2789
    nsresult EscapeString(const nsACString *aString, uint32_t aEscapeType, nsACString *_retval);
    nsresult EscapeURL(const nsACString *aStr, uint32_t aFlags, nsACString *_retval);
    nsresult UnescapeString(const nsACString *aStr, uint32_t aFlags, nsACString *_retval);
2790
    nsresult ExtractCharsetFromContentType(const nsACString *aTypeHeader, nsACString *aCharset,
2791
            int32_t *aCharsetStart, int32_t *aCharsetEnd, bool *_retval);
2792 2793
}

2794 2795
[
    object,
2796 2797
    uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a),
    local
2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810
]
interface nsIWebBrowserFocus : nsISupports
{
    nsresult Activate();
    nsresult Deactivate();
    nsresult SetFocusAtFirstElement();
    nsresult SetFocusAtLastElement();
    nsresult GetFocusedWindow(nsIDOMWindow **aFocusedWindow);
    nsresult SetFocusedWindow(nsIDOMWindow *aFocusedWindow);
    nsresult GetFocusedElement(nsIDOMElement **aFocusedElement);
    nsresult SetFocusedElement(nsIDOMElement *aFocusedElement);
}

2811 2812
[
    object,
2813
    uuid(e8c414c4-dc38-4ba3-ab4e-ec4cbbe22907),
2814
    local
2815 2816 2817
]
interface nsIWebBrowserChrome : nsISupports
{
2818
    nsresult SetStatus(uint32_t statusType, const PRUnichar *status);
2819 2820
    nsresult GetWebBrowser(nsIWebBrowser **aWebBrowser);
    nsresult SetWebBrowser(nsIWebBrowser *aWebBrowser);
2821 2822
    nsresult GetChromeFlags(uint32_t *aChromeFlags);
    nsresult SetChromeFlags(uint32_t aChromeFlags);
2823
    nsresult DestroyBrowserWindow();
2824
    nsresult SizeBrowserTo(int32_t aCX, int32_t aCY);
2825
    nsresult ShowAsModal();
2826
    nsresult IsWindowModal(bool *_retval);
2827 2828 2829
    nsresult ExitModalEventLoop(nsresult aStatus);
}

2830 2831
[
    object,
2832 2833
    uuid(df31c120-ded6-11d1-bd85-00805f8ae3f4),
    local
2834 2835 2836 2837 2838 2839 2840 2841
]
interface nsIDOMEventListener : nsISupports
{
    nsresult HandleEvent(nsIDOMEvent *event);
}

[
    object,
2842
    uuid(31e92e56-4d23-4a4a-9cfe-a6d12cf434bc),
2843
    local
2844 2845 2846
]
interface nsIDOMEventTarget : nsISupports
{
2847 2848
    nsresult AddEventListener(const nsAString *type, nsIDOMEventListener *listener, bool useCapture, bool wantsUntrusted, uint8_t _argc);
    nsresult AddSystemEventListener(const nsAString *type, nsIDOMEventListener *listener, bool aUseCapture, bool aWantsUntrusted, uint8_t _argc);
2849 2850 2851
    nsresult RemoveEventListener(const nsAString *type, nsIDOMEventListener *listener, bool useCapture);
    nsresult RemoveSystemEventListener(const nsAString *type, nsIDOMEventListener *listener, bool aUseCapture);
    nsresult DispatchEvent(nsIDOMEvent *evt, bool *_retval);
2852 2853

    /* Followed by methods we should try to avoid using */
2854 2855
}

2856 2857
[
    object,
2858
    uuid(02d54f52-a1f5-4ad2-b560-36f14012935e),
2859
    local
2860 2861 2862 2863 2864 2865
]
interface nsIDOMEvent : nsISupports
{
    nsresult GetType(nsAString *aType);
    nsresult GetTarget(nsIDOMEventTarget **aTarget);
    nsresult GetCurrentTarget(nsIDOMEventTarget **aCurrentTarget);
2866
    nsresult GetEventPhase(uint16_t *aEventPhase);
2867 2868
    nsresult GetBubbles(bool *aBubbles);
    nsresult GetCancelable(bool *aCancelable);
2869 2870 2871
    nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp);
    nsresult StopPropagation();
    nsresult PreventDefault();
2872 2873
    nsresult InitEvent(const nsAString *eventTypeArg, bool canBubbleArg, bool cancelableArg);
    nsresult GetDefaultPrevented(bool *aDefaultPrevented);
2874
    nsresult StopImmediatePropagation();
2875 2876 2877 2878
    nsresult GetOriginalTarget(nsIDOMEventTarget **aOriginalTarget);
    nsresult GetExplicitOriginalTarget(nsIDOMEventTarget * *aExplicitOriginalTarget);
    nsresult GetPreventDefault(bool *_retval);
    nsresult GetIsTrusted(bool *aIsTrusted);
2879 2880 2881 2882
    nsresult DuplicatePrivateData();
    nsresult SetTarget(nsIDOMEventTarget *aTarget);
    bool IsDispatchStopped();
    /*nsEvent*/ void *GetInternalNSEvent();
2883
    void SetTrusted(bool aTrusted);
2884 2885
    void Serialize(/*IPC::Message*/ void *aMsg, bool aSerializeInterfaceType);
    bool Deserialize(const /*IPC::Message*/ void *aMsg, void **aIter);
2886 2887
    void SetOwner(void /*mozilla::dom::EventTarget*/ *aOwner);
    void /*nsDOMEvent*/ *InternalDOMEvent();
2888 2889
}

2890 2891
[
    object,
2892
    uuid(cbe333d7-5b2c-4a9b-b99b-e6e388afa62b),
2893 2894 2895 2896
    local
]
interface nsIDOMWindowUtils : nsISupports
{
2897 2898
    nsresult GetImageAnimationMode(uint16_t *aImageAnimationMode);
    nsresult SetImageAnimationMode(uint16_t aImageAnimationMode);
2899
    nsresult GetDocCharsetIsForced(bool *aDocCharsetIsForced);
2900
    nsresult GetCursorType(int16_t *_retval);
2901
    nsresult GetDocumentMetadata(const nsAString *aName, nsAString *_retval);
2902
    nsresult Redraw(uint32_t aCount, uint32_t *_retval);
2903
    nsresult SetCSSViewport(float aWidthPx, float aHeightPx);
2904 2905
    nsresult GetViewportInfo(uint32_t aDisplayWidth, uint32_t aDisplayHeight, double *aDefaultZoom, bool *aAllowZoom,
           double *aMinZoom, double *aMaxZoom, uint32_t *aWidth, uint32_t *aHeight, bool *aAutoSize);
2906
    nsresult SetDisplayPortForElement(float aXPx, float aYPx, float aWidthPx, float aHeightPx, nsIDOMElement *aElement);
2907
    nsresult SetCriticalDisplayPortForElement(float aXPx, float aYPx, float aWidthPx, float aHeightPx, nsIDOMElement *aElement);
2908
    nsresult SetResolution(float aXResolution, float aYResolution);
2909
    nsresult GetResolution(float *aXResolution, float *aYResolution);
2910 2911
    nsresult GetIsFirstPaint(bool *aIsFirstPaint);
    nsresult SetIsFirstPaint(bool aIsFirstPaint);
2912
    nsresult GetPresShellId(uint32_t *aPresShellId);
2913
    nsresult SendMouseEvent(const nsAString *aType, float aX, float aY, int32_t aButton, int32_t aClickCount,
2914
           int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg, bool *_retval);
2915 2916
    nsresult SendTouchEvent(const nsAString *aType, uint32_t *aIdentifiers, int32_t *aXs, int32_t *aYs,
           uint32_t *aRxs, uint32_t *aRys, float *aRotationAngles, float *aForces, uint32_t count, int32_t aModifiers,
2917
           bool aIgnoreRootScrollFrame, bool *_retval);
2918
    nsresult SendMouseEventToWindow(const nsAString *aType, float aX, float aY, int32_t aButton, int32_t aClickCount,
2919 2920 2921
           int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg);
    nsresult SendWheelEvent(float aX, float aY, double aDeltaX, double aDeltaY, double aDeltaZ, uint32_t aDeltaMode,
           int32_t aModifiers, int32_t aLineOrPageDeltaX, int32_t aLineOrPageDeltaY, uint32_t aOptions);
2922 2923 2924
    nsresult SendKeyEvent(const nsAString *aType, int32_t aKeyCode, int32_t aCharCode, int32_t aModifiers,
           uint32_t aAdditionalFlags, bool *_retval);
    nsresult SendNativeKeyEvent(int32_t aNativeKeyboardLayout, int32_t aNativeKeyCode, int32_t aModifierFlags,
2925
           const nsAString *aCharacters, const nsAString *aUnmodifiedCharacters);
2926
    nsresult SendNativeMouseEvent(int32_t aScreenX, int32_t aScreenY, int32_t aNativeMessage, int32_t aModifierFlags,
2927
           nsIDOMElement *aElement);
2928 2929
    nsresult SendNativeMouseScrollEvent(int32_t aScreenX, int32_t aScreenY, uint32_t aNativeMessage, double aDeltaX,
           double aDeltaY, double aDeltaZ, uint32_t aModifierFlags, uint32_t aAdditionalFlags, nsIDOMElement *aElement);
2930 2931 2932
    nsresult ActivateNativeMenuItemAt(const nsAString *indexString);
    nsresult ForceUpdateNativeMenuAt(const nsAString *indexString);
    nsresult Focus(nsIDOMElement *aElement);
2933 2934 2935 2936
    nsresult GarbageCollect(nsICycleCollectorListener *aListener, int32_t aExtraForgetSkippableCalls);
    nsresult CycleCollect(nsICycleCollectorListener *aListener, int32_t aExtraForgetSkippableCalls);
    nsresult SendSimpleGestureEvent(const nsAString *aType, float aX, float aY, uint32_t aDirection, double aDelta,
           int32_t aModifiers, uint32_t aClickCount);
2937 2938 2939 2940
    nsresult ElementFromPoint(float aX, float aY, bool aIgnoreRootScrollFrame, bool aFlushLayout, nsIDOMElement **_retval);
    nsresult NodesFromRect(float aX, float aY, float aTopSize, float aRightSize, float aBottomSize, float aLeftSize,
           bool aIgnoreRootScrollFrame, bool aFlushLayout, nsIDOMNodeList **_retval);
    nsresult CompareCanvases(nsIDOMHTMLCanvasElement *aCanvas1, nsIDOMHTMLCanvasElement *aCanvas2,
2941
           uint32_t *aMaxDifference, uint32_t *_retval);
2942 2943 2944 2945
    nsresult GetIsMozAfterPaintPending(bool *aIsMozAfterPaintPending);
    nsresult SuppressEventHandling(bool aSuppress);
    nsresult ClearMozAfterPaintEvents();
    nsresult DisableNonTestMouseEvents(bool aDisable);
2946
    nsresult GetScrollXY(bool aFlushLayout, int32_t *aScrollX, int32_t *aScrollY);
2947 2948
    nsresult GetScrollbarSize(bool aFlushLayout, int32_t *aWidth, int32_t *aHeight);
    nsresult GetBoundsWithoutFlushing(nsIDOMElement *aElement, nsIDOMClientRect **_retval);
2949
    nsresult GetRootBounds(nsIDOMClientRect **_retval);
2950
    nsresult GetIMEIsOpen(bool *aIMEIsOpen);
2951
    nsresult GetIMEStatus(uint32_t *aIMEStatus);
2952
    nsresult GetScreenPixelsPerCSSPixel(float *aScreenPixelsPerCSSPixel);
2953
    nsresult GetFullZoom(float *aFullZoom);
2954
    nsresult DispatchDOMEventViaPresShell(nsIDOMNode *aTarget, nsIDOMEvent *aEvent, bool aTrusted, bool *_retval);
2955
    nsresult DispatchEventToChromeOnly(nsIDOMEventTarget *aTarget, nsIDOMEvent *aEvent, bool *_retval);
2956
    nsresult GetClassName(const /*JS::Value*/ void *aObject, JSContext *cx, char **_retval);
2957 2958
    nsresult SendContentCommandEvent(const nsAString *aType, nsITransferable *aTransferable);
    nsresult SendCompositionEvent(const nsAString *aType, const nsAString *aData, const nsAString *aLocale);
2959 2960 2961 2962
    nsresult SendTextEvent(const nsAString *aCompositionString, int32_t aFirstClauseLength, uint32_t aFirstClauseAttr,
           int32_t aSecondClauseLength, uint32_t aSecondClauseAttr, int32_t aThirdClauseLength, uint32_t aThirdClauseAttr,
           int32_t aCaretStart, int32_t aCaretLength);
    nsresult SendQueryContentEvent(uint32_t aType, uint32_t aOffset, uint32_t aLength, int32_t aX, int32_t aY,
2963
           nsIQueryContentEventResult **_retval);
2964 2965 2966
    nsresult RemoteFrameFullscreenChanged(nsIDOMElement *aFrameElement, const nsAString *aNewOrigin);
    nsresult RemoteFrameFullscreenReverted();
    nsresult ExitFullscreen();
2967
    nsresult SendSelectionSetEvent(uint32_t aOffset, uint32_t aLength, bool aReverse, bool *_retval);
2968
    nsresult SelectAtPoint(float aX, float aY, uint32_t aSelectBehavior, bool *_retval);
2969 2970 2971
    nsresult GetVisitedDependentComputedStyle(nsIDOMElement *aElement, const nsAString *aPseudoElement,
           const nsAString *aPropertyName, nsAString *_retval);
    nsresult GetParent(const /*JS::Value*/ void *obj, JSContext *cx, /*JS::Value*/ void *_retval);
2972 2973
    nsresult GetOuterWindowID(uint64_t *aOuterWindowID);
    nsresult GetCurrentInnerWindowID(uint64_t *aCurrentInnerWindowID);
2974 2975 2976 2977 2978 2979 2980 2981
    nsresult EnterModalState();
    nsresult LeaveModalState();
    nsresult EnterModalStateWithWindow(nsIDOMWindow **_retval);
    nsresult LeaveModalStateWithWindow(nsIDOMWindow *aWindow);
    nsresult IsInModalState(bool *_retval);
    nsresult SuspendTimeouts();
    nsresult ResumeTimeouts();
    nsresult GetLayerManagerType(nsAString *aLayerManagerType);
2982
    nsresult GetLayerManagerRemote(bool *aLayerManagerRemote);
2983 2984
    nsresult StartFrameTimeRecording(uint32_t *startIndex);
    nsresult StopFrameTimeRecording(uint32_t startIndex, float **paintTimes, uint32_t *frameCount, float **frameIntervals);
2985
    nsresult BeginTabSwitch();
2986
    nsresult GetDisplayDPI(float *aDisplayDPI);
2987 2988
    nsresult GetOuterWindowWithId(uint64_t aOuterWindowID, nsIDOMWindow **_retval);
    nsresult RenderDocument(const void /*nsRect*/ *aRect, uint32_t aFlags, int /*nscolor*/ aBackgroundColor,
2989
           void /*gfxContext*/ *aThebesContext);
2990
    nsresult AdvanceTimeAndRefresh(int64_t aMilliseconds);
2991
    nsresult RestoreNormalRefresh();
2992
    nsresult GetIsTestControllingRefreshes(bool *aIsTestControllingRefreshes);
2993 2994 2995 2996 2997 2998 2999 3000
    nsresult ComputeAnimationDistance(nsIDOMElement *element, const nsAString *property, const nsAString *value1,
           const nsAString *value2, double *_retval);
    nsresult WrapDOMFile(nsIFile *aFile, nsIDOMFile **_retval);
    nsresult GetFocusedInputType(char **aFocusedInputType);
    nsresult FindElementWithViewId(long /*nsViewID*/ aId, nsIDOMElement **_retval);
    nsresult LeafLayersPartitionWindow(bool *_retval);
    nsresult GetMayHaveTouchEventListeners(bool *aMayHaveTouchEventListeners);
    nsresult CheckAndClearPaintedState(nsIDOMElement *aElement, bool *_retval);
3001
    nsresult GetFile(const nsAString *aName, const /*JS::Value*/ void *aBlobParts, const /*JS::Value*/ void *aParameters,
3002
           JSContext* cx, uint8_t _argc, nsIDOMFile **_retval);
3003
    nsresult GetBlob(const /*JS::Value*/ void *aBlobParts, const /*JS::Value*/ void *aParameters, JSContext *cx,
3004 3005 3006 3007
           uint8_t _argc, nsIDOMBlob * _retval);
    nsresult GetFileId(const /*JS::Value*/ void *aFile, JSContext *cx, int64_t *_retval);
    nsresult GetFileReferences(const nsAString *aDatabaseName, int64_t aId, int32_t *aRefCnt, int32_t *aDBRefCnt,
           int32_t *aSliceRefCnt, bool *_retval);
3008 3009 3010 3011
    nsresult IsIncrementalGCEnabled(JSContext *cx, bool *_retval);
    nsresult StartPCCountProfiling(JSContext *cx);
    nsresult StopPCCountProfiling(JSContext *cx);
    nsresult PurgePCCounts(JSContext *cx);
3012 3013 3014
    nsresult GetPCCountScriptCount(JSContext *cx, int32_t *_retval);
    nsresult GetPCCountScriptSummary(int32_t script, JSContext *cx, nsAString *_retval);
    nsresult GetPCCountScriptContents(int32_t script, JSContext *cx, nsAString *_retval);
3015
    nsresult GetPaintingSuppressed(bool *aPaintingSuppressed);
3016 3017
    nsresult GetPlugins(JSContext *cx, /*JS::Value*/ void *aPlugins);
    nsresult SetScrollPositionClampingScrollPortSize(float aWidth, float aHeight);
3018
    nsresult SetContentDocumentFixedPositionMargins(float aTop, float aRight, float aBottom, float aLeft);
3019 3020 3021 3022 3023
    nsresult PreventFurtherDialogs();
    nsresult LoadSheet(nsIURI *sheetURI, uint32_t type);
    nsresult RemoveSheet(nsIURI *sheetURI, uint32_t type);
    nsresult GetIsHandlingUserInput(bool *aIsHandlingUserInput);
    nsresult AllowScriptsToClose();
3024
    nsresult GetIsParentWindowMainWidgetVisible(bool *aIsParentWindowMainWidgetVisible);
3025
    nsresult IsNodeDisabledForEvents(nsIDOMNode *aNode, bool *_retval);
3026 3027 3028 3029 3030
    nsresult GetPaintFlashing(bool *aPaintFlashing);
    nsresult SetPaintFlashing(bool aPaintFlashing);
    nsresult RunInStableState(nsIRunnable *runnable);
    nsresult RunBeforeNextEvent(nsIRunnable *runnable);
    nsresult GetOMTAOrComputedStyle(nsIDOMNode *aNode, const nsAString *aProperty, nsAString *_retval);
3031 3032
}

3033 3034 3035 3036 3037 3038 3039
cpp_quote("#define CONTEXT_NONE              0x00")
cpp_quote("#define CONTEXT_LINK              0x01")
cpp_quote("#define CONTEXT_IMAGE             0x02")
cpp_quote("#define CONTEXT_DOCUMENT          0x04")
cpp_quote("#define CONTEXT_TEXT              0x08")
cpp_quote("#define CONTEXT_INPUT             0x10")
cpp_quote("#define CONTEXT_BACKGROUND_IMAGE  0x20")
3040 3041 3042

[
    object,
3043 3044
    uuid(3478b6b0-3875-11d4-94ef-0020183bf181),
    local
3045 3046 3047
]
interface nsIContextMenuListener : nsISupports
{
3048
    nsresult OnShowContextMenu(uint32_t aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode);
3049 3050 3051 3052
}

[
    object,
3053
    uuid(d73852f8-7bd6-477d-8233-117dbf83860b),
3054
    local
3055 3056 3057
]
interface nsIDOMUIEvent : nsIDOMEvent
{
3058
    nsresult GetView(nsIDOMWindow **aView);
3059
    nsresult GetDetail(int32_t *aDetail);
3060
    nsresult InitUIEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
3061 3062 3063 3064 3065 3066
            nsIDOMWindow *viewArg, int32_t detailArg);
    nsresult GetLayerX(int32_t *aLayerX);
    nsresult GetLayerY(int32_t *aLayerY);
    nsresult GetPageX(int32_t *aPageX);
    nsresult GetPageY(int32_t *aPageY);
    nsresult GetWhich(uint32_t *aWhich);
3067
    nsresult GetRangeParent(nsIDOMNode **aRangeParent);
3068
    nsresult GetRangeOffset(int32_t *aRangeOffset);
3069 3070 3071
    nsresult GetCancelBubble(bool *aCancelBubble);
    nsresult SetCancelBubble(bool aCancelBubble);
    nsresult GetIsChar(bool *aIsChar);
3072 3073 3074 3075
}

[
    object,
3076
    uuid(afb2e57b-2822-4969-b2a9-0cada6859534),
3077
    local
3078 3079 3080
]
interface nsIDOMMouseEvent : nsIDOMUIEvent
{
3081 3082 3083 3084 3085 3086
    nsresult GetScreenX(int32_t *aScreenX);
    nsresult GetScreenY(int32_t *aScreenY);
    nsresult GetMozMovementX(int32_t *aMozMovementX);
    nsresult GetMozMovementY(int32_t *aMozMovementY);
    nsresult GetClientX(int32_t *aClientX);
    nsresult GetClientY(int32_t *aClientY);
3087 3088 3089 3090
    nsresult GetCtrlKey(bool *aCtrlKey);
    nsresult GetShiftKey(bool *aShiftKey);
    nsresult GetAltKey(bool *aAltKey);
    nsresult GetMetaKey(bool *aMetaKey);
3091 3092
    nsresult GetButton(uint16_t *aButton);
    nsresult GetButtons(uint16_t *aButtons);
3093
    nsresult GetRelatedTarget(nsIDOMEventTarget **aRelatedTarget);
3094
    nsresult InitMouseEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
3095 3096 3097
            nsIDOMWindow *viewArg, int32_t detailArg, int32_t screenXArg, int32_t screenYArg,
            int32_t clientXArg, int32_t clientYArg, bool ctrlKeyArg, bool altKeyArg,
            bool shiftKeyArg, bool metaKeyArg, uint16_t buttonArg,
3098
            nsIDOMEventTarget *relatedTargetArg);
3099
    nsresult GetMozPressure(float *aMozPressure);
3100
    nsresult GetMozInputSource(uint16_t *aMozInputSource);
3101
    nsresult InitNSMouseEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
3102 3103 3104 3105
            nsIDOMWindow *viewArg, int32_t detailArg, int32_t screenXArg, int32_t screenYArg,
            int32_t clientXArg, int32_t clientYArg, bool ctrlKeyArg, bool altKeyArg, bool shiftKeyArg,
            bool metaKeyArg, uint16_t buttonArg, nsIDOMEventTarget *relatedTargetArg, float pressure,
            uint16_t inputSourceArg);
3106
    nsresult GetModifierState(const nsAString *keyArg, bool *_retval);
3107
}
3108

3109 3110
[
    object,
3111
    uuid(91a3d7f2-223b-4e09-a566-634e7ee0a31d),
3112
    local
3113 3114 3115
]
interface nsIDOMKeyEvent : nsIDOMUIEvent
{
3116 3117
    nsresult GetCharCode(uint32_t *aCharCode);
    nsresult GetKeyCode(uint32_t *aKeyCode);
3118 3119 3120 3121 3122 3123
    nsresult GetAltKey(bool *aAltKey);
    nsresult GetCtrlKey(bool *aCtrlKey);
    nsresult GetShiftKey(bool *aShiftKey);
    nsresult GetMetaKey(bool *aMetaKey);
    nsresult InitKeyEvent(const nsAString *typeArg, bool canBubbleArg,
            bool cancelableArg, nsIDOMWindow *viewArg, bool ctrlKeyArg,
3124 3125
            bool altKeyArg, bool shiftKeyArg, bool metaKeyArg, uint32_t keyCodeArg,
            uint32_t charCodeArg);
3126
    nsresult GetModifierState(const nsAString *keyArg, bool *_retval);
3127
    nsresult GetLocation(uint32_t *aLocation);
3128
    nsresult GetKey(nsAString *aKey);
3129 3130
}

3131
[
3132
    object,
3133
    uuid(0b976267-4aaa-4f36-a2d4-27b5ca8d73bb),
3134
    local
3135 3136 3137
]
interface nsIEmbeddingSiteWindow : nsISupports
{
3138 3139
    nsresult SetDimensions(uint32_t flags, int32_t x, int32_t y, int32_t cx, int32_t cy);
    nsresult GetDimensions(uint32_t flags, int32_t *x, int32_t *y, int32_t *cx, int32_t *cy);
3140
    nsresult SetFocus();
3141 3142
    nsresult GetVisibility(bool *aVisibility);
    nsresult SetVisibility(bool aVisibility);
3143 3144 3145
    nsresult GetTitle(PRUnichar **aTitle);
    nsresult SetTitle(const PRUnichar *aTitle);
    nsresult GetSiteWindow(void **aSiteWindow);
3146
    nsresult Blur();
3147
}
3148 3149

[
3150 3151 3152
    object,
    uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392),
    local
3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164
]
interface nsIComponentRegistrar : nsISupports
{
    nsresult AutoRegister(nsIFile *aSpec);
    nsresult AutoUnregister(nsIFile *aSpec);
    nsresult RegisterFactory(const nsCID *aClass, const char *aClassName,
            const char *aContractID, nsIFactory *aFactory);
    nsresult UnregisterFactory(const nsCID *aClass, nsIFactory *aFactory);
    nsresult RegisterFactoryLocation(const nsCID *aClass, const char *aClassName,
            const char *aContractID, nsIFile *aFile, const char *aLoaderStr,
            const char *aType);
    nsresult UnregisterFactoryLocation(const nsCID *aClass, nsIFile *aFile);
3165 3166
    nsresult IsCIDRegistered(const nsCID *aClass, bool *_retval);
    nsresult IsContractIDRegistered(const char *aContractID, bool *_retval);
3167 3168 3169 3170 3171 3172 3173 3174
    nsresult EnumerateCIDs(nsISimpleEnumerator **_retval);
    nsresult EnumerateContractIDs(nsISimpleEnumerator **_retval);
    nsresult CIDToContractID(const nsCID *aClass, char **_retval);
    nsresult ContractIDToCID(const char *aContractID, nsCID **_retval);
}

[
    object,
3175 3176
    uuid(1630c61a-325e-49ca-8759-a31b16c47aa5),
    local
3177 3178 3179 3180 3181 3182
]
interface nsIPromptService : nsISupports
{
    nsresult Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
            const PRUnichar *aText);
    nsresult AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3183
            const PRUnichar *aText, const PRUnichar *aCheckMsg, bool *aCheckState);
3184
    nsresult Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3185
            const PRUnichar *aText, bool *_retval);
3186
    nsresult ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3187 3188
            const PRUnichar *aText, const PRUnichar *aCheckMsg, bool *aCheckState,
            bool *_retval);
3189
    nsresult ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3190
            const PRUnichar *aText, uint32_t aButtonFlags, const PRUnichar *aButton0Title,
3191
            const PRUnichar *aButton1Title, const PRUnichar *aButton2Title,
3192
            const PRUnichar *aCheckMsg, bool *aCheckState, int32_t *_retval);
3193 3194
    nsresult Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
            const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg,
3195
            bool *aCheckState, bool *_retval);
3196 3197
    nsresult PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
            const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword,
3198
            const PRUnichar *aCheckMsg, bool *aCheckState, bool *_retval);
3199 3200
    nsresult PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
            const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg,
3201
            bool *aCheckState, bool *_retval);
3202
    nsresult Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3203 3204
            const PRUnichar *aText, uint32_t aCount, const PRUnichar **aSelectList,
            int32_t *aOutSelection, bool *_retval);
3205
}
3206

3207 3208
[
    object,
3209 3210
    uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee),
    local
3211 3212 3213
]
interface nsITooltipTextProvider : nsISupports
{
3214
    nsresult GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, bool *_retval);
3215 3216
}

3217 3218
[
    object,
3219
    uuid(24f3f4da-18a4-448d-876d-7360fefac029),
3220
    local
3221 3222 3223
]
interface nsIEditingSession : nsISupports
{
3224
    nsresult GetEditorStatus(uint32_t *aEditorStatus);
3225
    nsresult MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType,
3226 3227
            bool doAfterUriLoad, bool aMakeWholeDocumentEditable, bool aInteractive);
    nsresult WindowIsEditable(nsIDOMWindow *window, bool *_retval);
3228 3229 3230 3231
    nsresult GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval);
    nsresult SetupEditorOnWindow(nsIDOMWindow *window);
    nsresult TearDownEditorOnWindow(nsIDOMWindow *window);
    nsresult SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor);
3232 3233 3234 3235
    nsresult DisableJSAndPlugins(nsIDOMWindow *aWindow);
    nsresult RestoreJSAndPlugins(nsIDOMWindow *aWindow);
    nsresult DetachFromWindow(nsIDOMWindow *aWindow);
    nsresult ReattachToWindow(nsIDOMWindow *aWindow);
3236
    nsresult GetJsAndPluginsDisabled(bool *aJsAndPluginsDisabled);
3237 3238
}

3239 3240
[
    object,
3241 3242
    uuid(83f892cf-7ed3-490e-967a-62640f3158e1),
    local
3243 3244 3245
]
interface nsICommandParams : nsISupports
{
3246
    nsresult GetValueType(const char *name, int16_t *_retval);
3247
    nsresult GetBooleanValue(const char *name, bool *_retval);
3248
    nsresult GetLongValue(const char *name, int32_t *_retval);
3249 3250 3251 3252
    nsresult GetDoubleValue(const char *name, double *_retval);
    nsresult GetStringValue(const char *name, nsAString *_retval);
    nsresult GetCStringValue(const char *name, char **_retval);
    nsresult GetISupportsValue(const char *name, nsISupports **_retval);
3253
    nsresult SetBooleanValue(const char *name, bool value);
3254
    nsresult SetLongValue(const char *name, int32_t value);
3255 3256 3257 3258 3259
    nsresult SetDoubleValue(const char *name, double value);
    nsresult SetStringValue(const char *name, const nsAString *value);
    nsresult SetCStringValue(const char *name, const char *value);
    nsresult SetISupportsValue(const char *name, nsISupports *value);
    nsresult RemoveValue(const char *name);
3260
    nsresult HasMoreElements(bool *_retval);
3261 3262 3263 3264
    nsresult First();
    nsresult GetNext(char **_retval);
}

3265 3266
[
    object,
3267 3268
    uuid(080d2001-f91e-11d4-a73c-f9242928207c),
    local
3269 3270 3271 3272 3273
]
interface nsICommandManager : nsISupports
{
    nsresult AddCommandObserver(nsIObserver *aCommandObserver, const char *aCommandToObserve);
    nsresult RemoveCommandObserver(nsIObserver *aCommandObserver, const char *aCommandObserved);
3274 3275
    nsresult IsCommandSupported(const char *aCommandName, nsIDOMWindow *aTargetWindow, bool *_retval);
    nsresult IsCommandEnabled(const char *aCommandName, nsIDOMWindow *aTargetWindow, bool *_retval);
3276 3277 3278 3279 3280 3281
    nsresult GetCommandState(const char *aCommandName, nsIDOMWindow *aTargetWindow,
            nsICommandParams *aCommandParams);
    nsresult DoCommand(const char *aCommandName, nsICommandParams *aCommandParams,
            nsIDOMWindow *aTargetWindow);
}

3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297
[
    object,
    uuid(3275b2cd-af6d-429a-80d7-f0c5120342ac),
    local
]
interface nsICategoryManager : nsISupports
{
    nsresult GetCategoryEntry(const char *aCategory, const char *aEntry, char **_retval);
    nsresult AddCategoryEntry(const char *aCategory, const char *aEntry, const char *aValue, bool aPersist,
            bool aReplace, char **_retval);
    nsresult DeleteCategoryEntry(const char *aCategory, const char *aEntry, bool aPersist);
    nsresult DeleteCategory(const char *aCategory);
    nsresult EnumerateCategory(const char *aCategory, nsISimpleEnumerator **_retval);
    nsresult EnumerateCategories(nsISimpleEnumerator **_retval);
}

3298 3299
[
    object,
3300 3301
    uuid(47b82b60-a36f-4167-8072-6f421151ed50),
    local
3302 3303 3304 3305 3306 3307 3308 3309 3310
]
interface nsIControllerContext : nsISupports
{
    nsresult Init(nsIControllerCommandTable *aCommandTable);
    nsresult SetCommandContext(nsISupports *aCommandContext);
}

[
    object,
3311 3312
    uuid(d5b61b82-1da4-11d3-bf87-00105a1b0627),
    local
3313 3314 3315
]
interface nsIController : nsISupports
{
3316 3317
    nsresult IsCommandEnabled(const char *command, bool *_retval);
    nsresult SupportsCommand(const char *command, bool *_retval);
3318 3319 3320 3321
    nsresult DoCommand(const char *command);
    nsresult OnEvent(const char *eventName);
}

3322 3323
[
    object,
3324
    uuid(8a8b4b1d-72d8-428e-9575-f918baf69ea1),
3325 3326 3327 3328 3329 3330 3331 3332 3333
    local
]
interface nsIContent : nsISupports
{
    /* This is not a real interface declaration. It's too internal for us. */
}

[
    object,
3334
    uuid(62cca591-a030-4117-9b80-dcd366bbb509),
3335 3336 3337 3338 3339 3340 3341 3342 3343 3344
    local
]
interface nsIDocument : nsISupports
{
    /* This is not a real interface declaration. It's too internal for us. */
}

[
    object,
    uuid(b1ee32f2-b8c4-49b9-93df-b6fab5d54688),
3345
    local
3346 3347 3348
]
interface nsIContentSerializer : nsISupports
{
3349
    nsresult Init(uint32_t flags, uint32_t aWrapColumn, const char *aCharSet, bool aIsCopying,
3350
            bool aIsWholeDocument);
3351 3352 3353 3354 3355 3356
    nsresult AppendText(nsIContent *aText, int32_t aStartOffset, int32_t aEndOffset, nsAString *aStr);
    nsresult AppendCDATASection(nsIContent *aCDATASection, int32_t aStartOffset,
            int32_t aEndOffset, nsAString *aStr);
    nsresult AppendProcessingInstruction(nsIContent *aPI, int32_t aStartOffset,
            int32_t aEndOffset, nsAString *aStr);
    nsresult AppendComment(nsIContent *aComment, int32_t aStartOffset, int32_t aEndOffset,
3357
            nsAString *aStr);
3358 3359
    nsresult AppendDoctype(nsIContent *aDoctype, nsAString *aStr);
    nsresult AppendElementStart(nsIContent *aElement, nsIContent *aOriginalElement,
3360
                                nsAString *aStr);
3361
    nsresult AppendElementEnd(nsIContent *aElement, nsAString *aStr);
3362
    nsresult Flush(nsAString *aStr);
3363
    nsresult AppendDocumentStart(nsIDocument *aDocument, nsAString *aStr);
3364 3365
}

3366 3367
[
    object,
3368
    uuid(753b38d1-ee03-4e58-a650-1076ccccdb7f),
3369
    local
3370 3371 3372 3373 3374 3375
]
interface nsIEditor  : nsISupports
{
    typedef void *nsIContentPtr;

    nsresult GetSelection([out] nsISelection *_retval);
3376
    nsresult Init([in] nsIDOMDocument *doc, [in] nsIContentPtr aRoot, [in] nsISelectionController *aSelCon, [in] uint32_t aFlags);
3377 3378
    nsresult SetAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] const nsAString *sourceAttrValue, [in] bool aSuppressTransaction);
    nsresult RemoveAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] bool aSuppressTransaction);
3379 3380
    nsresult PostCreate();
    nsresult PreDestroy();
3381 3382
    nsresult GetFlags([out] uint32_t *_retval);
    nsresult SetFlags([in] uint32_t val);
3383 3384
    nsresult GetContentsMIMEType([out] char **_retval);
    nsresult SetContentsMIMEType([in] const char *val);
3385 3386
    nsresult GetIsDocumentEditable([out] bool *_retval);
    nsresult GetIsSelectionEditable(bool *aIsSelectionEditable);
3387 3388 3389
    nsresult GetDocument([out] nsIDOMDocument **_retval);
    nsresult GetRootElement([out] nsIDOMElement **_retval);
    nsresult GetSelectionController([out] nsISelectionController **_retval);
3390
    nsresult DeleteSelection(int16_t action, int16_t aStripWrappers);
3391 3392
    nsresult GetDocumentIsEmpty([out] bool *_retval);
    nsresult GetDocumentModified([out] bool *_retval);
3393 3394 3395
    nsresult GetDocumentCharacterSet([out] nsACString *_retval);
    nsresult SetDocumentCharacterSet([in] const nsACString *val);
    nsresult ResetModificationCount();
3396 3397
    nsresult GetModificationCount([out] int32_t *_retval);
    nsresult IncrementModificationCount([in] int32_t aModCount);
3398
    nsresult GetTransactionManager([out] nsITransactionManager **_retval);
3399
    nsresult SetTransactionManager(nsITransactionManager *aTransactionManager);
3400
    nsresult DoTransaction([in] nsITransaction *txn);
3401
    nsresult EnableUndo([in] bool enable);
3402 3403 3404
    nsresult GetNumberOfUndoItems(int32_t *aNumberOfUndoItems);
    nsresult GetNumberOfRedoItems(int32_t *aNumberOfRedoItems);
    nsresult Undo([in] uint32_t count);
3405
    nsresult CanUndo([out] bool *isEnabled, [out] bool *canUndo);
3406
    nsresult Redo([in] uint32_t count);
3407
    nsresult CanRedo([out] bool *isEnabled, [out] bool *canRedo);
3408 3409 3410 3411
    nsresult BeginTransaction();
    nsresult EndTransaction();
    nsresult BeginPlaceHolderTransaction([in] nsIAtom *name);
    nsresult EndPlaceHolderTransaction();
3412 3413
    nsresult ShouldTxnSetSelection([out] bool *_retval);
    nsresult SetShouldTxnSetSelection([in] bool should);
3414
    nsresult GetInlineSpellChecker([out] nsIInlineSpellChecker **_retval);
3415
    nsresult SyncRealTimeSpell();
3416
    nsresult SetSpellcheckUserOverride(bool enable);
3417
    nsresult Cut();
3418
    nsresult CanCut([out] bool *_retval);
3419
    nsresult Copy();
3420
    nsresult CanCopy([out] bool *_retval);
3421
    nsresult Paste([in] int32_t aSelectionType);
3422
    nsresult PasteTransferable(nsITransferable *aTransferable);
3423
    nsresult CanPaste([in] int32_t aSelectionType, [out] bool *_retval);
3424
    nsresult CanPasteTransferable(nsITransferable *aTransferable, bool *_retval);
3425 3426 3427 3428
    nsresult SelectAll();
    nsresult BeginningOfDocument();
    nsresult EndOfDocument();
    nsresult SetAttribute([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [in] const nsAString *attvalue);
3429
    nsresult GetAttributeValue([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [out] nsAString *resultValue, bool *_retval);
3430 3431 3432
    nsresult RemoveAttribute([in] nsIDOMElement *aElement, [in] const nsAString *aAttribute);
    nsresult CloneAttribute([in] const nsAString *aAttribute, [in] nsIDOMNode *aDestNode, [in] nsIDOMNode *aSourceNode);
    nsresult CloneAttributes([in] nsIDOMNode *destNode, [in] nsIDOMNode *sourceNode);
3433 3434 3435
    nsresult CreateNode([in] const nsAString *tag, [in] nsIDOMNode *parent, [in] int32_t position, [out] nsIDOMNode **_retval);
    nsresult InsertNode([in] nsIDOMNode *node, [in] nsIDOMNode *parent, [in] int32_t aPosition);
    nsresult SplitNode([in] nsIDOMNode *existingRightNode, [in] int32_t offset, [out] nsIDOMNode **newLeftNode);
3436 3437
    nsresult JoinNodes([in] nsIDOMNode *leftNode, [in] nsIDOMNode *rightNode, [in] nsIDOMNode *parent);
    nsresult DeleteNode([in] nsIDOMNode *child);
3438
    bool OutputsMozDirty();
3439 3440
    nsresult MarkNodeDirty([in] nsIDOMNode *node);
    nsresult SwitchTextDirection();
3441 3442
    nsresult OutputToString([in] nsAString formatType, [in] uint32_t flags, [out] nsAString *_retval);
    nsresult OutputToStream([in] nsIOutputStream *aStream, [in] nsAString *formatType, [in] nsACString *charsetOverride, [in] uint32_t flags);
3443 3444
    nsresult SetEditorObserver(nsIEditorObserver *observer);
    nsresult RemoveEditorObserver(nsIEditorObserver *observer);
3445 3446 3447 3448 3449 3450
    nsresult AddEditActionListener([in] nsIEditActionListener *listener);
    nsresult RemoveEditActionListener([in] nsIEditActionListener *listener);
    nsresult AddDocumentStateListener([in] nsIDocumentStateListener *listener);
    nsresult RemoveDocumentStateListener([in] nsIDocumentStateListener *listener);
    nsresult DumpContentTree();
    nsresult DebugDumpContent();
3451
    nsresult DebugUnitTests([out] int32_t *outNumTests, [out] int32_t *outNumTestsFailed);
3452 3453
    bool IsModifiableNode(nsIDOMNode *aNode);
    nsresult GetLastKeypressEventTrusted(bool *aLastKeypressEventTrusted);
3454
    nsresult SetSuppressDispatchingInputEvent(bool aSuppressDispatchingInputEvent);
3455 3456
}

3457 3458
[
    object,
3459
    uuid(833f30de-94c7-4630-a852-2300ef329d7b),
3460
    local
3461 3462 3463 3464 3465 3466 3467
]
interface nsIHTMLEditor : nsISupports
{
    nsresult AddDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
    nsresult RemoveDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
    nsresult RemoveAllDefaultProperties();
    nsresult SetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
3468 3469
    nsresult GetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] bool *aFirst, [out] bool *aAny, [out] bool *aAll);
    nsresult GetInlinePropertyWithAttrValue([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] bool *aFirst, [out] bool *aAny, [out] bool *aAll, [out] nsAString *_retval);
3470 3471 3472 3473
    nsresult RemoveAllInlineProperties();
    nsresult RemoveInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute);
    nsresult IncreaseFontSize();
    nsresult DecreaseFontSize();
3474
    nsresult NodeIsBlock([in] nsIDOMNode *node, bool *_retval);
3475
    nsresult InsertHTML([in] nsAString *aInputString);
3476
    nsresult PasteNoFormatting([in] int32_t aSelectionType);
3477
    nsresult RebuildDocumentFromSource([in] nsAString *aSourceString);
3478
    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);
3479
    nsresult InsertElementAtSelection([in] nsIDOMElement *aElement, [in] bool aDeleteSelection);
3480 3481 3482 3483 3484
    nsresult SetDocumentTitle([in] nsAString *aTitle);
    nsresult UpdateBaseURL();
    nsresult SelectElement([in] nsIDOMElement *aElement);
    nsresult SetCaretAfterElement([in] nsIDOMElement *aElement);
    nsresult SetParagraphFormat([in] nsAString *aParagraphFormat);
3485 3486 3487 3488 3489 3490 3491
    nsresult GetParagraphState([out] bool *aMixed, [out] nsAString *_retval);
    nsresult GetFontFaceState([out] bool *aMixed, [out] nsAString *_retval);
    nsresult GetFontColorState([out] bool *aMixed, [out] nsAString *_retval);
    nsresult GetBackgroundColorState([out] bool *aMixed, [out] nsAString *_retval);
    nsresult GetHighlightColorState([out] bool *aMixed, [out] nsAString *_retval);
    nsresult GetListState([out] bool *aMixed, [out] bool *aOL, [out] bool *aUL, [out] bool *aDL);
    nsresult GetListItemState([out] bool *aMixed, [out] bool *aLI, [out] bool *aDT, [out] bool *aDD);
3492
    nsresult GetAlignment([out] bool *aMixed, [out] int16_t *aAlign);
3493 3494
    nsresult GetIndentState([out] bool *aCanIndent, [out] bool *aCanOutdent);
    nsresult MakeOrChangeList([in] nsAString *aListType, [in] bool entireList, [in] nsAString *aBulletType);
3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506
    nsresult RemoveList([in] nsAString *aListType);
    nsresult Indent([in] nsAString *aIndent);
    nsresult Align([in] nsAString *aAlign);
    nsresult GetElementOrParentByTagName([in] nsAString *aTagName, [in] nsIDOMNode *aNode, [out] nsIDOMElement **_retval);
    nsresult GetSelectedElement([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
    nsresult GetHeadContentsAsHTML([out] nsAString *_retval);
    nsresult ReplaceHeadContentsWithHTML([in] nsAString *aSourceToInsert);
    nsresult CreateElementWithDefaults([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
    nsresult InsertLinkAroundSelection([in] nsIDOMElement *aAnchorElement);
    nsresult SetBackgroundColor([in] nsAString *aColor);
    nsresult SetBodyAttribute([in] nsAString *aAttr, [in] nsAString *aValue);
    nsresult GetLinkedObjects([out] nsISupportsArray **_retval);
3507 3508
    nsresult GetIsCSSEnabled([out] bool *_retval);
    nsresult SetIsCSSEnabled([in] bool prb);
3509 3510
    nsresult AddInsertionListener([in] nsIContentFilter *inFilter);
    nsresult RemoveInsertionListener([in] nsIContentFilter *inFilter);
3511
    nsresult CreateAnonymousElement([in] nsAString *aTag, [in] nsIDOMNode *aParentNode, [in] nsAString *aAnonClass, [in] bool aIsCreatedHidden, [out] nsIDOMElement **_retval);
3512 3513
    nsresult GetSelectionContainer([out] nsIDOMElement **_retval);
    nsresult CheckSelectionStateForAnonymousButtons([in] nsISelection *aSelection);
3514 3515 3516 3517
    nsresult IsAnonymousElement([in] nsIDOMElement *aElement, [out] bool *_retval);
    nsresult GetReturnInParagraphCreatesNewParagraph([out] bool *_retval);
    nsresult SetReturnInParagraphCreatesNewParagraph([in] bool prb);
    nsresult BreakIsVisible(nsIDOMNode *aNode, bool *_retval);
3518
    void /*Element*/ *GetActiveEditingHost();
3519 3520
}

3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539
interface nsIDocShellTreeItem;

[
    object,
    uuid(37f1ab73-f224-44b1-82f0-d2834ab1cec0),
    local
]
interface nsIDocShellTreeNode : nsISupports
{
    nsresult GetChildCount(int32_t *aChildCount);
    nsresult AddChild(nsIDocShellTreeItem *child);
    nsresult RemoveChild(nsIDocShellTreeItem *child);
    nsresult GetChildAt(int32_t index, nsIDocShellTreeItem **_retval);
    nsresult FindChildWithName(const PRUnichar *aName, bool aRecurse, bool aSameType, nsIDocShellTreeItem *aRequestor,
            nsIDocShellTreeItem *aOriginalRequestor, nsIDocShellTreeItem **_retval);
}

[
    object,
3540
    uuid(e35bbb39-985b-4d62-81da-73c330222e5f),
3541 3542 3543 3544
    local
]
interface nsIDocShellTreeItem : nsIDocShellTreeNode
{
3545 3546
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558
    nsresult NameEquals(const PRUnichar *name, bool *_retval);
    nsresult GetItemType(int32_t *aItemType);
    nsresult SetItemType(int32_t aItemType);
    nsresult GetParent(nsIDocShellTreeItem **aParent);
    nsresult GetSameTypeParent(nsIDocShellTreeItem **aSameTypeParent);
    nsresult GetRootTreeItem(nsIDocShellTreeItem **aRootTreeItem);
    nsresult GetSameTypeRootTreeItem(nsIDocShellTreeItem **aSameTypeRootTreeItem);
    nsresult FindItemWithName(const PRUnichar *name, nsISupports *aRequestor, nsIDocShellTreeItem *aOriginalRequestor, nsIDocShellTreeItem **_retval);
    nsresult GetTreeOwner(nsIDocShellTreeOwner **aTreeOwner);
    nsresult SetTreeOwner(nsIDocShellTreeOwner *treeOwner);
}

3559 3560
[
    object,
3561
    uuid(f453d2ee-bac7-46f9-a553-df918f0cc0d0),
3562 3563
    local
]
3564
interface nsIDocShell : nsIDocShellTreeItem
3565
{
3566
    nsresult LoadURI(nsIURI *uri, nsIDocShellLoadInfo *loadInfo, uint32_t aLoadFlags, bool firstParty);
3567 3568
    nsresult LoadStream(nsIInputStream *aStream, nsIURI *aURI, const nsACString *aContentType,
            const nsACString *aContentCharset, nsIDocShellLoadInfo *aLoadInfo);
3569
    nsresult InternalLoad(nsIURI *aURI, nsIURI *aReferrer, nsISupports *aOwner, uint32_t aFlags, const PRUnichar *aWindowTarget,
3570 3571
            const char *aTypeHint, nsACString *aFileName, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream,
            uint32_t aLoadFlags, nsISHEntry *aSHEntry, bool firstParty, nsIDocShell **aDocShell, nsIRequest **aRequest);
3572
    nsresult AddState(nsIVariant *aData, const nsAString *aTitle, const nsAString *aURL, bool aReplace, JSContext *cx);
3573 3574 3575
    nsresult CreateLoadInfo(nsIDocShellLoadInfo **loadInfo);
    nsresult PrepareForNewContentModel();
    nsresult SetCurrentURI(nsIURI *aURI);
3576
    nsresult FirePageHideNotification(bool isUnload);
3577
    nsresult GetPresContext(void /*nsPresContext*/ **aPresContext);
3578
    nsIPresShell *GetPresShell();
3579 3580 3581 3582
    nsresult GetEldestPresShell(nsIPresShell **aEldestPresShell);
    nsresult GetContentViewer(nsIContentViewer **aContentViewer);
    nsresult GetChromeEventHandler(nsIDOMEventTarget **aChromeEventHandler);
    nsresult SetChromeEventHandler(nsIDOMEventTarget *aChromeEventHandler);
3583 3584 3585 3586
    nsresult GetAllowPlugins(bool *aAllowPlugins);
    nsresult SetAllowPlugins(bool aAllowPlugins);
    nsresult GetAllowJavascript(bool *aAllowJavascript);
    nsresult SetAllowJavascript(bool aAllowJavascript);
3587 3588
    nsresult GetDisableNoScript(bool *aDisableNoScript);
    nsresult SetDisableNoScript(bool aDisableNoScript);
3589 3590 3591 3592 3593 3594
    nsresult GetAllowMetaRedirects(bool *aAllowMetaRedirects);
    nsresult SetAllowMetaRedirects(bool aAllowMetaRedirects);
    nsresult GetAllowSubframes(bool *aAllowSubframes);
    nsresult SetAllowSubframes(bool aAllowSubframes);
    nsresult GetAllowImages(bool *aAllowImages);
    nsresult SetAllowImages(bool aAllowImages);
3595 3596
    nsresult GetAllowMedia(bool *aAllowMedia);
    nsresult SetAllowMedia(bool aAllowMedia);
3597 3598 3599 3600
    nsresult GetAllowDNSPrefetch(bool *aAllowDNSPrefetch);
    nsresult SetAllowDNSPrefetch(bool aAllowDNSPrefetch);
    nsresult GetAllowWindowControl(bool *aAllowWindowControl);
    nsresult SetAllowWindowControl(bool aAllowWindowControl);
3601 3602 3603
    nsresult GetDocShellEnumerator(int32_t aItemType, int32_t aDirection, nsISimpleEnumerator **_retval);
    nsresult GetAppType(uint32_t *aAppType);
    nsresult SetAppType(uint32_t aAppType);
3604 3605
    nsresult GetAllowAuth(bool *aAllowAuth);
    nsresult SetAllowAuth(bool aAllowAuth);
3606 3607
    nsresult GetZoom(float *aZoom);
    nsresult SetZoom(float aZoom);
3608 3609 3610 3611
    nsresult GetMarginWidth(int32_t *aMarginWidth);
    nsresult SetMarginWidth(int32_t aMarginWidth);
    nsresult GetMarginHeight(int32_t *aMarginHeight);
    nsresult SetMarginHeight(int32_t aMarginHeight);
3612
    nsresult TabToTreeOwner(bool forward, bool *tookFocus);
3613 3614 3615
    nsresult GetBusyFlags(uint32_t *aBusyFlags);
    nsresult GetLoadType(uint32_t *aLoadType);
    nsresult SetLoadType(uint32_t aLoadType);
3616 3617
    nsresult IsBeingDestroyed(bool *_retval);
    nsresult GetIsExecutingOnLoadHandler(bool *aIsExecutingOnLoadHandler);
3618 3619
    nsresult GetLayoutHistoryState(nsILayoutHistoryState **aLayoutHistoryState);
    nsresult SetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState);
3620
    nsresult GetShouldSaveLayoutState(bool *aShouldSaveLayoutState);
3621 3622 3623 3624
    nsresult GetSecurityUI(nsISecureBrowserUI **aSecurityUI);
    nsresult SetSecurityUI(nsISecureBrowserUI *aSecurityUI);
    nsresult SuspendRefreshURIs();
    nsresult ResumeRefreshURIs();
3625
    nsresult BeginRestore(nsIContentViewer *viewer, bool top);
3626
    nsresult FinishRestore();
3627 3628 3629
    nsresult GetRestoringDocument(bool *aRestoringDocument);
    nsresult GetUseErrorPages(bool *aUseErrorPages);
    nsresult SetUseErrorPages(bool aUseErrorPages);
3630 3631 3632
    nsresult GetPreviousTransIndex(int32_t *aPreviousTransIndex);
    nsresult GetLoadedTransIndex(int32_t *aLoadedTransIndex);
    nsresult HistoryPurged(int32_t numEntries);
3633
    nsresult GetSessionStorageForPrincipal(nsIPrincipal *principal, const nsAString *documentURI,
3634
            bool create, nsIDOMStorage **_retval);
3635
    nsresult AddSessionStorage(nsIPrincipal *principal, nsIDOMStorage *storage);
3636
    nsresult GetCurrentDocumentChannel(nsIChannel **aCurrentDocumentChannel);
3637
    nsresult SetChildOffset(uint32_t offset);
3638 3639
    nsresult GetIsInUnload(bool *aIsInUnload);
    nsresult GetChannelIsUnsafe(bool *aChannelIsUnsafe);
3640 3641 3642 3643
    nsresult GetHasMixedActiveContentLoaded(bool *aHasMixedActiveContentLoaded);
    nsresult GetHasMixedActiveContentBlocked(bool *aHasMixedActiveContentBlocked);
    nsresult GetHasMixedDisplayContentLoaded(bool *aHasMixedDisplayContentLoaded);
    nsresult GetHasMixedDisplayContentBlocked(bool *aHasMixedDisplayContentBlocked);
3644
    void DetachEditorFromWindow();
3645 3646
    nsresult GetIsOffScreenBrowser(bool *aIsOffScreenBrowser);
    nsresult SetIsOffScreenBrowser(bool aIsOffScreenBrowser);
3647
    nsresult GetPrintPreview(nsIWebBrowserPrint **aPrintPreview);
3648 3649 3650
    nsresult GetCanExecuteScripts(bool *aCanExecuteScripts);
    nsresult GetIsActive(bool *aIsActive);
    nsresult SetIsActive(bool aIsActive);
3651
    nsresult GetHistoryID(uint64_t *aHistoryID);
3652 3653
    nsresult GetIsAppTab(bool *aIsAppTab);
    nsresult SetIsAppTab(bool aIsAppTab);
3654
    nsresult CreateAboutBlankContentViewer(nsIPrincipal *aPrincipal);
3655 3656
    nsresult GetCharset(char **aCharset);
    nsresult SetCharset(const char * aCharset);
3657
    nsresult GatherCharsetMenuTelemetry();
3658 3659 3660 3661
    nsresult GetForcedCharset(nsIAtom **aForcedCharset);
    nsresult SetForcedCharset(nsIAtom *aForcedCharset);
    nsresult GetParentCharset(nsIAtom **aParentCharset);
    nsresult SetParentCharset(nsIAtom *aParentCharset);
3662 3663
    nsresult GetParentCharsetSource(int32_t *aParentCharsetSource);
    nsresult SetParentCharsetSource(int32_t aParentCharsetSource);
3664
    nsresult AddWeakPrivacyTransitionObserver(nsIPrivacyTransitionObserver *obs);
3665 3666 3667
    nsresult AddWeakReflowObserver(nsISupports /*nsIReflowObserver*/ *obs);
    nsresult RemoveWeakReflowObserver(nsISupports /*nsIReflowObserver*/ *obs);
    nsresult NotifyReflowObservers(bool interruptible, int /*DOMHighResTimeStamp*/ start, int /*DOMHighResTimeStamp*/ end);
3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679
    nsresult GetIsBrowserElement(bool *aIsBrowserElement);
    nsresult GetIsApp(bool *aIsApp);
    nsresult GetIsBrowserOrApp(bool *aIsBrowserOrApp);
    nsresult GetIsInBrowserElement(bool *aIsInBrowserElement);
    nsresult GetIsInBrowserOrApp(bool *aIsInBrowserOrApp);
    nsresult SetIsApp(uint32_t ownAppId);
    nsresult SetIsBrowserInsideApp(uint32_t containingAppId);
    nsresult GetAppId(uint32_t *aAppId);
    nsresult GetSameTypeParentIgnoreBrowserAndAppBoundaries(nsIDocShell **_retval);
    nsresult GetAsyncPanZoomEnabled(bool *aAsyncPanZoomEnabled);
    nsresult GetSandboxFlags(uint32_t *aSandboxFlags);
    nsresult SetSandboxFlags(uint32_t aSandboxFlags);
3680 3681 3682
    nsresult GetMixedContentChannel(nsIChannel **aMixedContentChannel);
    nsresult SetMixedContentChannel(nsIChannel *aMixedContentChannel);
    nsresult GetAllowMixedContentAndConnectionData(bool *rootHasSecureConnection, bool *allowMixedContent, bool *isRootDocShell);
3683 3684 3685
    bool PluginsAllowedInCurrentDoc();
    nsresult GetFullscreenAllowed(bool *aFullscreenAllowed);
    nsresult SetFullscreenAllowed(bool allowed);
3686 3687 3688 3689 3690 3691 3692 3693
    nsresult GetAffectPrivateSessionLifetime(bool *aAffectPrivateSessionLifetime);
    nsresult SetAffectPrivateSessionLifetime(bool aAffectPrivateSessionLifetime);
    nsresult GetMayEnableCharacterEncodingMenu(bool *aMayEnableCharacterEncodingMenu);
    nsresult GetEditor(nsIEditor **aEditor);
    nsresult SetEditor(nsIEditor *aEditor);
    nsresult GetEditable(bool *aEditable);
    nsresult GetHasEditingSession(bool *aHasEditingSession);
    nsresult MakeEditable(bool inWaitForUriLoad);
3694 3695 3696 3697 3698 3699 3700 3701
    nsresult GetChildSHEntry(int32_t aChildOffset, nsISHEntry **_retval);
    nsresult AddChildSHEntry(nsISHEntry *aCloneReference, nsISHEntry *aHistoryEntry, int32_t aChildOffset, uint32_t aLoadType, bool aCloneChilden);
    nsresult GetUseGlobalHistory(bool *aUseGlobalHistory);
    nsresult SetUseGlobalHistory(bool aUseGlobalHistory);
    nsresult RemoveFromSessionHistory();
    nsresult GetCreatedDynamically(bool *aCreatedDynamically);
    nsresult SetCreatedDynamically(bool aCreatedDynamically);
    nsresult GetCurrentSHEntry(nsISHEntry **aEntry, bool *_retval);
3702 3703
}

3704 3705
[
    object,
3706
    uuid(16fe5e3e-eadc-4312-9d44-b6bedd6b5474),
3707 3708 3709 3710 3711 3712 3713 3714
    local
]
interface nsIMutationObserver : nsISupports
{
    void CharacterDataWillChange(nsIDocument *aDocument, nsIContent *aContent,
                                 void /*CharacterDataChangeInfo*/ *aInfo);
    void CharacterDataChanged(nsIDocument *aDocument, nsIContent *aContent,
                              void /*CharacterDataChangeInfo*/ *aInfo);
3715 3716 3717 3718
    void AttributeWillChange(nsIDocument *aDocument, nsIContent *aContent, int32_t aNameSpaceID,
                             nsIAtom *aAttribute, int32_t aModType);
    void AttributeChanged(nsIDocument *aDocument, nsIContent *aContent, int32_t aNameSpaceID,
                          nsIAtom *aAttribute, int32_t aModType);
3719 3720
    void AttributeSetToCurrentValue(nsIDocument *aDocument, /*mozilla::dom::Element*/ void *aElement,
                                    int32_t aNameSpaceID, nsIAtom *aAttribute);
3721
    void ContentAppended(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aFirstNewContent,
3722
                         int32_t aNewIndexInContainer);
3723
    void ContentInserted(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
3724
                         int32_t aIndexInContainer);
3725
    void ContentRemoved(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
3726
                        int32_t aIndexInContainer, nsIContent *aPreviousSibling);
3727 3728 3729 3730
    void NodeWillBeDestroyed(const nsINode *aNode);
    void ParentChainChanged(nsIContent *aContent);
}

3731 3732
[
    object,
3733
    uuid(2c4ad90a-740e-4212-ba3f-feacda4b929e),
3734 3735 3736 3737 3738 3739 3740
    local
]
interface nsIParser : nsISupports
{
    typedef int nsDTDMode;
    typedef int eParserCommands;

3741 3742 3743 3744
    /* From nsParserBase: */
    bool IsParserEnabled();
    nsresult GetChannel(nsIChannel **aChannel);

3745 3746 3747 3748 3749
    void SetContentSink(nsIContentSink *aSink);
    nsIContentSink *GetContentSink();
    void GetCommand(nsACString *aCommand);
    void SetCommand2(const char *aCommand);
    void SetCommand(eParserCommands aParserCommand);
3750 3751
    void SetDocumentCharset(const nsACString *aCharset, int32_t aSource);
    void GetDocumentCharset(nsACString *oCharset, int32_t *oSource);
3752
    nsresult GetDTD(nsIDTD **aDTD);
3753
    nsIStreamListener *GetStreamListener();
3754 3755 3756
    nsresult ContinueInterruptedParsing();
    void BlockParser();
    void UnblockParser();
3757
    void ContinueInterruptedParsingAsync();
3758
    bool IsComplete();
3759 3760
    nsresult Parse(nsIURI *aURL, nsIRequestObserver *aListener, void *aKey, nsDTDMode aMode);
    nsresult Terminate();
3761
    nsresult ParseFragment(const nsAString *aSourceBuffer, void /*nsTArray<nsString>*/ *aTagStack);
3762 3763
    nsresult BuildModel();
    nsresult CancelParsingEvents();
3764
    void Reset();
3765
    bool IsInsertionPointDefined();
3766 3767
    void BeginEvaluatingParserInsertedScript();
    void EndEvaluatingParserInsertedScript();
3768
    void MarkAsNotScriptCreated(const char *aCommand);
3769
    bool IsScriptCreated();
3770 3771
}

3772 3773
[
    object,
3774
    uuid(900bc4bc-8b6c-4cba-82fa-568a80fffd3e),
3775 3776 3777 3778
    local
]
interface nsIDocumentObserver : nsIMutationObserver
{
3779
    typedef uint32_t nsUpdateType;
3780

3781
    typedef struct {
3782
        uint64_t mStates;
3783 3784
    } nsEventStates;

3785 3786 3787 3788
    void BeginUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
    void EndUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
    void BeginLoad(nsIDocument *aDocument);
    void EndLoad(nsIDocument *aDocument);
3789 3790
    void ContentStatesChanged(nsIDocument *aDocument, nsIContent *aContent, nsEventStates *aStateMask);
    void DocumentStatesChanged(nsIDocument *aDocument, nsEventStates *aStateMask);
3791 3792
    void StyleSheetAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, bool aDocumentSheet);
    void StyleSheetRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, bool aDocumentSheet);
3793
    void StyleSheetApplicableStateChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet,
3794
                                          bool aApplicable);
3795 3796 3797 3798 3799
    void StyleRuleChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule,
                          nsIStyleRule *aNewStyleRule);
    void StyleRuleAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule);
    void StyleRuleRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule);
    void BindToDocument(nsIDocument *aDocument, nsIContent *aContent);
3800
    void AttemptToExecuteScript(nsIContent *aContent, nsIParser *aParser, bool *aBlock);
3801 3802 3803 3804 3805 3806 3807 3808 3809
}

[
    object,
    uuid(3682dd99-8560-44f4-9b8f-ccce9d7b96fb),
    local
]
interface nsIContentUtils : nsISupports
{
3810
    bool IsSafeToRunScript();
3811 3812 3813 3814 3815
    nsresult AddDocumentObserver(nsIDocument *aDocument, nsIDocumentObserver *aObserver);
    nsresult RemoveDocumentObserver(nsIDocument *aDocument, nsIDocumentObserver *aObserver);
    nsresult AddMutationObserver(nsINode *aNode, nsIMutationObserver *aObserver);
    nsresult RemoveMutationObserver(nsINode *aNode, nsIMutationObserver *aObserver);
    nsresult AddScriptRunner(nsIRunnable *aRunnable);
3816
    JSContext *GetContextFromDocument(nsIDocument *aDocument);
3817
}
3818

3819 3820
[
    object,
3821
    uuid(8f672000-bab9-4c60-aaaf-2673c4e2a4c6),
3822 3823 3824 3825 3826 3827
    local
]
interface nsIPluginInstance : nsISupports
{
    nsresult GetDOMElement(nsIDOMElement **aDOMElement);
}
3828 3829

cpp_quote("DEFINE_GUID(IID_nsCycleCollectionISupports, 0xc61eac14,0x5f7a,0x4481,0x96,0x5e,0x7e,0xaa,0x6e,0xff,0xa8,0x5f);")