nsiface.idl 180 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 27
#pragma makedep header

28
cpp_quote("#define GECKO_VERSION \"2.47\"")
29
cpp_quote("#define GECKO_VERSION_STRING \"Wine Gecko \" GECKO_VERSION")
30

31 32
import "wtypes.idl";

33 34 35
cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
cpp_quote("#undef GetForm")
cpp_quote("#undef SetPort")
36
cpp_quote("#undef GetClassName")
37 38
cpp_quote("#endif")

39 40 41
typedef HRESULT nsresult;
typedef ULONG nsrefcnt;

42
typedef IID nsID;
43 44 45 46 47 48 49
typedef IID nsIID;
typedef nsIID nsCID;
typedef REFIID nsIIDRef;
typedef nsIIDRef nsCIDRef;

typedef WCHAR PRUnichar;

50 51 52 53 54
/*
 * 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.
 */
55
#define int16_t short
56
#define int32_t LONG
57
#define int64_t INT64
58

59
#define uint8_t UINT8
60
#define uint16_t UINT16
61
#define uint32_t UINT32
62
#define uint64_t UINT64
63

64 65
#define char16_t PRUnichar

66 67
typedef uint64_t DOMTimeStamp;
typedef uint32_t nsLoadFlags;
68
typedef int64_t PRTime;
69 70

/* Similar trick to stdint.h types for C++ bool type */
71 72
typedef unsigned char cpp_bool;
#define bool cpp_bool
73

74 75 76
typedef struct {
    void *v;
    void *d1;
77
    uint32_t d2;
78 79 80
    void *d3;
} nsCStringContainer;

81 82 83
typedef struct {
    void *v;
    void *d1;
84
    uint32_t d2;
85 86 87
    void *d3;
} nsStringContainer;

88
typedef nsCStringContainer nsACString;
89 90
typedef nsStringContainer nsAString;

91
interface nsIWebBrowserChrome;
92
interface nsILoadGroup;
93
interface nsIDOMNode;
94
interface nsIDOMAttr;
95
interface nsIDOMDocument;
96
interface nsIDOMEvent;
97 98 99 100 101 102 103 104 105
interface nsIEditor;
interface nsISelectionController;
interface nsITransactionManager;
interface nsITransaction;
interface nsIInlineSpellChecker;
interface nsIOutputStream;
interface nsIEditorObserver;
interface nsIEditActionListener;
interface nsIDocumentStateListener;
106
interface nsIDOMCSSStyleSheet;
107
interface nsIDOMDocumentView;
108
interface nsIDOMWindow;
109
interface nsIDOMElement;
110
interface nsIDOMRange;
111 112
interface nsIDOMEventTarget;
interface nsISelection;
113
interface nsIDOMHTMLSelectElement;
114
interface nsIFile;
115
interface nsIDocShell;
116
interface mozIDOMWindowProxy;
117

118 119
interface IMoniker;

120 121
[
    object,
122 123
    uuid(00000000-0000-0000-c000-000000000046),
    local
124 125 126
]
interface nsISupports
{
127
    nsresult QueryInterface(nsIIDRef riid, void **result);
128 129 130 131 132 133 134
    nsrefcnt AddRef();
    nsrefcnt Release();
}

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

typedef void *JSContext;
typedef void *JSObject;
208
typedef uint64_t jsval;
209 210 211

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

223 224
[
    object,
225 226
    uuid(00000001-0000-0000-c000-000000000046),
    local
227 228 229 230
]
interface nsIFactory : nsISupports
{
    nsresult CreateInstance(nsISupports *aOuter, const nsIID *iid, void **result);
231
    nsresult LockFactory(bool lock);
232 233
}

234 235
[
    object,
236 237
    uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf),
    local
238 239 240 241 242 243 244 245
]
interface nsIWeakReference : nsISupports
{
    nsresult QueryReferent(const nsIID *riid, void **result);
}

[
    object,
246 247
    uuid(9188bc86-f92e-11d2-81ef-0060083a0bcf),
    local
248 249 250 251 252 253
]
interface nsISupportsWeakReference : nsISupports
{
    nsresult GetWeakReference(nsIWeakReference **_retval);
}

254 255
[
    object,
256 257
    uuid(033a1470-8b2a-11d3-af88-00a024ffc08c),
    local
258 259 260 261 262 263
]
interface nsIInterfaceRequestor : nsISupports
{
    nsresult GetInterface(const nsIID *riid, void **result);
}

264 265 266 267 268 269 270 271 272 273
[
    object,
    uuid(4a2abaf0-6886-11d3-9382-00104ba0fd40),
    local
]
interface nsIRunnable : nsISupports
{
    nsresult Run();
}

274 275
[
    object,
276 277
    uuid(d1899240-f9d2-11d2-bdd6-000064657374),
    local
278 279 280
]
interface nsISimpleEnumerator : nsISupports
{
281
    nsresult HasMoreElements(bool *_retval);
282 283 284
    nsresult GetNext(nsISupports **_retval);
}

285 286 287 288 289 290 291
[
    object,
    uuid(81e4c2de-acac-4ad6-901a-b5fb1b851a0d),
    local
]
interface nsIVariant : nsISupports
{
292 293 294 295 296 297 298 299 300
    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);
301 302
    nsresult GetAsFloat(float *_retval);
    nsresult GetAsDouble(double *_retval);
303
    nsresult GetAsBool(bool *_retval);
304 305 306 307 308 309 310 311 312 313 314 315
    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);
316 317 318
    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);
319 320 321 322 323 324 325 326 327
}

[
    object,
    uuid(5586a590-8c82-11d5-90f3-0010a4e73d9a),
    local
]
interface nsIWritableVariant : nsIVariant
{
328 329
    nsresult GetWritable(bool *aWritable);
    nsresult SetWritable(bool aWritable);
330 331 332 333 334 335 336 337
    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);
338 339
    nsresult SetAsFloat(float aValue);
    nsresult SetAsDouble(double aValue);
340
    nsresult SetAsBool(bool aValue);
341 342 343 344 345 346 347 348 349 350 351
    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);
352 353 354
    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);
355 356 357 358 359 360
    nsresult SetAsVoid();
    nsresult SetAsEmpty();
    nsresult SetAsEmptyArray();
    nsresult SetFromVariant(nsIVariant *aValue);
}

361 362
[
    object,
363
    uuid(53cdbc97-c2d7-4e30-b2c3-45b2ee79db18),
364
    local
365 366 367 368
]
interface nsIInputStream : nsISupports
{
    nsresult Close();
369
    nsresult Available(uint64_t *_retval);
370
    nsresult Read(char *aBuf, uint32_t aCount, uint32_t *_retval);
371
    nsresult ReadSegments(nsresult (*aWriter)(nsIInputStream *aInStream,
372 373 374
            void *aClosure, const char *aFromSegment, uint32_t aToOffset,
            uint32_t aCount, uint32_t *aWriteCount),
            void *aClosure, uint32_t aCount, uint32_t *_retval);
375
    nsresult IsNonBlocking(bool *_retval);
376 377
}

378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395
[
    object,
    uuid(8429d350-1040-4661-8b71-f2a6ba455980),
    local
]
interface nsISeekableStream : nsISupports
{
    enum {
        NS_SEEK_SET = 0,
        NS_SEEK_CUR = 1,
        NS_SEEK_END = 2
    };

    nsresult Seek(int32_t whence, int64_t offset);
    nsresult Tell(int64_t *_retval);
    nsresult SetEOF();
}

396 397
[
    object,
398
    uuid(92073a54-6d78-4f30-913a-b871813208c6),
399
    local
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417
]
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);
418 419
    nsresult GetPort(int32_t *aPort);
    nsresult SetPort(int32_t aPort);
420 421
    nsresult GetPath(nsACString *aPath);
    nsresult SetPath(const nsACString *aPath);
422 423
    nsresult Equals(nsIURI *other, bool *_retval);
    nsresult SchemeIs(const char *scheme, bool *_retval);
424 425 426
    nsresult Clone(nsIURI **_retval);
    nsresult Resolve(const nsACString *relativePath, nsACString *_retval);
    nsresult GetAsciiSpec(nsACString *aAsciiSpec);
427
    nsresult GetAsciiHostPort(nsACString *aAsciiHostPort);
428 429
    nsresult GetAsciiHost(nsACString *aAsciiHost);
    nsresult GetOriginCharset(nsACString *aOriginCharset);
430 431
    nsresult GetRef(nsACString *aRef);
    nsresult SetRef(const nsACString *aRef);
432
    nsresult EqualsExceptRef(nsIURI *other, bool *_retval);
433 434
    nsresult CloneIgnoringRef(nsIURI **_retval);
    nsresult GetSpecIgnoringRef(nsACString *aSpecIgnoringRef);
435
    nsresult GetHasRef(bool *aHasRef);
436 437
}

438 439
[
    object,
440
    uuid(86adcd89-0b70-47a2-b0fe-5bb2c5f37e31),
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460
    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);
}

461 462
[
    object,
463
    uuid(e91ac988-27c2-448b-b1a1-3822e1ef1987),
464 465 466 467 468 469 470 471
    local
]
interface nsIFileURL : nsIURL
{
    nsresult GetFile(nsIFile **aFile);
    nsresult SetFile(nsIFile *aFile);
}

472 473 474 475 476 477 478
[
    object,
    uuid(321578d0-03c1-4d95-8821-021ac612d18d),
    local
]
interface nsIMutable : nsISupports
{
479 480
    nsresult GetMutable(bool *aMutable);
    nsresult SetMutable(bool aMutable);
481 482 483 484 485 486 487 488 489
}

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

494 495
[
    object,
496 497
    uuid(ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe),
    local
498 499 500 501
]
interface nsIRequest : nsISupports
{
    nsresult GetName(nsACString *aName);
502
    nsresult IsPending(bool *_retval);
503 504 505 506 507 508 509 510 511 512
    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);
}

513 514
[
    object,
515 516
    uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40),
    local
517 518 519 520 521 522 523 524 525
]
interface nsIRequestObserver : nsISupports
{
    nsresult OnStartRequest(nsIRequest *aRequest, nsISupports *aContext);
    nsresult OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode);
}

[
    object,
526
    uuid(3b4c8a77-76ba-4610-b316-678c73a3b88c),
527
    local
528
]
529 530 531
interface nsIStreamListener : nsIRequestObserver
{
    nsresult OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
532
                             nsIInputStream *aInputStream, uint64_t aOffset, uint32_t aCount);
533 534
}

535 536
[
    object,
537
    uuid(f0c87725-7a35-463c-9ceb-2c07f23406cc),
538
    local
539 540 541 542 543 544 545 546 547 548
]
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);
549
    nsresult GetActiveCount(uint32_t *aActiveCount);
550 551
    nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
    nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
552
    nsresult GetSchedulingContextID(nsID *aSchedulingContextID);
553 554
    nsresult GetDefaultLoadFlags(nsLoadFlags *aDefaultLoadFlags);
    nsresult SetDefaultLoadFlags(nsLoadFlags aDefaultLoadFlags);
555 556
    nsresult GetUserAgentOverrideCache(nsACString *aUserAgentOverrideCache);
    nsresult SetUserAgentOverrideCache(const nsACString *aUserAgentOverrideCache);
557 558
}

559 560
[
    object,
561
    uuid(2c389865-23db-4aa7-9fe5-60cc7b00697e),
562
    local
563 564 565
]
interface nsIChannel : nsIRequest
{
566 567 568 569 570 571 572
    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;
573
    const UINT LOAD_MEDIA_SNIFFER_OVERRIDES_CONTENT_TYPE = 1 << 23;
574
    const UINT LOAD_EXPLICIT_CREDENTIALS    = 1 << 24;
575
    const UINT LOAD_BYPASS_SERVICE_WORKER   = 1 << 25;
576

577 578 579 580 581 582 583 584 585 586 587 588
    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);
589 590
    nsresult GetContentLength(int64_t *aContentLength);
    nsresult SetContentLength(int64_t aContentLength);
591
    nsresult Open(nsIInputStream **_retval);
592
    nsresult Open2(nsIInputStream **_retval);
593
    nsresult AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext);
594
    nsresult AsyncOpen2(nsIStreamListener *aListener);
595
    nsresult GetContentDisposition(uint32_t *aContentDisposition);
596
    nsresult SetContentDisposition(uint32_t aContentDisposition);
597
    nsresult GetContentDispositionFilename(nsAString *aContentDispositionFilename);
598
    nsresult SetContentDispositionFilename(const nsAString *aContentDispositionFilename);
599
    nsresult GetContentDispositionHeader(nsACString *aContentDispositionHeader);
600 601
    nsresult GetLoadInfo(nsILoadInfo **aLoadInfo);
    nsresult SetLoadInfo(nsILoadInfo *aLoadInfo);
602 603
}

604 605
[
    object,
606
    uuid(35412859-b9d9-423c-8866-2d4559fdd2be),
607 608 609 610 611 612 613
    local
]
interface nsIHttpHeaderVisitor : nsISupports
{
    nsresult VisitHeader(const nsACString *aHeader, const nsACString *aValue);
}

614 615
[
    object,
616
    uuid(b2596105-3d0d-4e6a-824f-0539713bb879),
617
    local
618 619 620 621 622 623 624
]
interface nsIHttpChannel : nsIChannel
{
    nsresult GetRequestMethod(nsACString *aRequestMethod);
    nsresult SetRequestMethod(const nsACString *aRequestMethod);
    nsresult GetReferrer(nsIURI **aReferrer);
    nsresult SetReferrer(nsIURI *aReferrer);
625 626
    nsresult GetReferrerPolicy(uint32_t *aReferrerPolicy);
    nsresult SetReferrerWithPolicy(nsIURI *referrer, uint32_t referrerPolicy);
627 628 629 630
    nsresult GetProtocolVersion(nsACString *aProtocolVersion);
    nsresult GetTransferSize(uint64_t *aTransferSize);
    nsresult GetDecodedBodySize(uint64_t *aDecodedBodySize);
    nsresult GetEncodedBodySize(uint64_t *aEncodedBodySize);
631
    nsresult GetRequestHeader(const nsACString *aHeader, nsACString *_retval);
632
    nsresult SetRequestHeader(const nsACString *aHeader, const nsACString *aValue, bool aMerge);
633
    nsresult SetEmptyRequestHeader(const nsACString *aHeader);
634
    nsresult VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor);
635
    nsresult VisitNonDefaultRequestHeaders(nsIHttpHeaderVisitor *aVisitor);
636 637
    nsresult GetAllowPipelining(bool *aAllowPipelining);
    nsresult SetAllowPipelining(bool aAllowPipelining);
638 639
    nsresult GetAllowSTS(bool *aAllowSTS);
    nsresult SetAllowSTS(bool aAllowSTS);
640 641 642
    nsresult GetRedirectionLimit(uint32_t *aRedirectionLimit);
    nsresult SetRedirectionLimit(uint32_t aRedirectionLimit);
    nsresult GetResponseStatus(uint32_t *aResponseStatus);
643
    nsresult GetResponseStatusText(nsACString *aResponseStatusText);
644
    nsresult GetRequestSucceeded(bool *aRequestSucceeded);
645 646
    nsresult GetIsMainDocumentChannel(bool *aIsMainDocumentChannel);
    nsresult SetIsMainDocumentChannel(bool aIsMainDocumentChannel);
647
    nsresult GetResponseHeader(const nsACString *header, nsACString *_retval);
648
    nsresult SetResponseHeader(const nsACString *header, const nsACString *value, bool merge);
649
    nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor);
650 651
    nsresult IsNoStoreResponse(bool *_retval);
    nsresult IsNoCacheResponse(bool *_retval);
652
    nsresult IsPrivateResponse(bool *_retval);
653
    nsresult RedirectTo(nsIURI *aTargetURI);
654 655
    nsresult GetSchedulingContextID(nsID *aSchedulingContextID);
    nsresult SetSchedulingContextID(const nsID aSchedulingContextID);
656 657
}

658 659
[
    object,
660
    uuid(4e28263d-1e03-46f4-aa5c-9512f91957f9),
661 662 663 664 665 666
    local
]
interface nsIHttpChannelInternal : nsISupports
{
    nsresult GetDocumentURI(nsIURI **aDocumentURI);
    nsresult SetDocumentURI(nsIURI *aDocumentURI);
667 668
    nsresult GetRequestVersion(uint32_t *major, uint32_t *minor);
    nsresult GetResponseVersion(uint32_t *major, uint32_t *minor);
669
    nsresult TakeAllSecurityMessages(void /*nsCOMArray<nsISecurityConsoleMessage>*/ *aMessages);
670 671
    nsresult SetCookie(const char *aCookieHeader);
    nsresult SetupFallbackChannel(const char *aFallbackKey);
672 673
    nsresult GetThirdPartyFlags(uint32_t *aThirdPartyFlags);
    nsresult SetThirdPartyFlags(uint32_t aThirdPartyFlags);
674 675 676 677 678
    nsresult GetForceAllowThirdPartyCookie(bool *aForceAllowThirdPartyCookie);
    nsresult SetForceAllowThirdPartyCookie(bool aForceAllowThirdPartyCookie);
    nsresult GetCanceled(bool *aCanceled);
    nsresult GetChannelIsForDownload(bool *aChannelIsForDownload);
    nsresult SetChannelIsForDownload(bool aChannelIsForDownload);
679
    nsresult GetLocalAddress(nsACString *aLocalAddress);
680
    nsresult GetLocalPort(int32_t *aLocalPort);
681
    nsresult GetRemoteAddress(nsACString *aRemoteAddress);
682
    nsresult GetRemotePort(int32_t *aRemotePort);
683 684
    nsresult SetCacheKeysRedirectChain(void /*nsTArray<nsCString>*/ *cacheKeys);
    nsresult HTTPUpgrade(const nsACString *aProtocolName, nsIHttpUpgradeListener *aListener);
685 686
    nsresult GetAllowSpdy(bool *aAllowSpdy);
    nsresult SetAllowSpdy(bool aAllowSpdy);
687 688
    nsresult GetResponseTimeoutEnabled(bool *aResponseTimeoutEnabled);
    nsresult SetResponseTimeoutEnabled(bool aResponseTimeoutEnabled);
689 690
    nsresult GetInitialRwin(uint32_t *aInitialRwin) ;
    nsresult SetInitialRwin(uint32_t aInitialRwin);
691
    nsresult GetApiRedirectToURI(nsIURI **aApiRedirectToURI);
692 693
    nsresult GetAllowAltSvc(bool *aAllowAltSvc);
    nsresult SetAllowAltSvc(bool aAllowAltSvc);
694
    nsresult GetLastModifiedTime(PRTime *aLastModifiedTime);
695 696
    nsresult ForceIntercepted(uint64_t aInterceptionID);
    nsresult GetResponseSynthesized(bool *aResponseSynthesized);
697 698 699 700
    nsresult GetCorsIncludeCredentials(bool *aCorsIncludeCredentials);
    nsresult SetCorsIncludeCredentials(bool aCorsIncludeCredentials);
    nsresult GetCorsMode(uint32_t *aCorsMode);
    nsresult SetCorsMode(uint32_t aCorsMode);
701 702
    nsresult GetRedirectMode(uint32_t *aRedirectMode);
    nsresult SetRedirectMode(uint32_t aRedirectMode);
703
    nsresult GetTopWindowURI(nsIURI **aTopWindowURI);
704 705 706
    nsresult GetNetworkInterfaceId(nsACString *aNetworkInterfaceId);
    nsresult SetNetworkInterfaceId(const nsACString *aNetworkInterfaceId);
    nsresult GetProxyURI(nsIURI **aProxyURI);
707 708 709
    nsresult SetCorsPreflightParameters(const void /*nsTArray<nsCString>*/ *unsafeHeaders);
    nsresult GetBlockAuthPrompt(bool *aBlockAuthPrompt) ;
    nsresult SetBlockAuthPrompt(bool aBlockAuthPrompt);
710 711
}

712 713
[
    object,
714
    uuid(5cfe15bd-5adb-4a7f-9e55-4f5a67d15794),
715
    local
716 717 718 719
]
interface nsIUploadChannel : nsISupports
{
    nsresult SetUploadStream(nsIInputStream *aStream, const nsACString *aContentType,
720
                             int64_t aContentLength);
721 722 723
    nsresult GetUploadStream(nsIInputStream **aUploadStream);
}

724 725 726 727 728 729 730 731 732 733 734 735
[
    object,
    uuid(8d171460-a716-41f1-92be-8c659db39b45),
    local
]
interface nsIAsyncVerifyRedirectCallback : nsISupports
{
    nsresult OnRedirectVerifyCallback(nsresult result);
}

[
    object,
736
    uuid(0197720d-37ed-4e75-8956-d0d296e4d8a6),
737 738 739 740
    local
]
interface nsIChannelEventSink : nsISupports
{
741 742 743
    const UINT REDIRECT_TEMPORARY = 1;
    const UINT REDIRECT_PERMANENT = 2;
    const UINT REDIRECT_INTERNAL  = 4;
744
    const UINT REDIRECT_STS_UPGRADE = 8;
745

746
    nsresult AsyncOnChannelRedirect(nsIChannel *oldChannel, nsIChannel *newChannel, uint32_t flags,
747 748 749
                                    nsIAsyncVerifyRedirectCallback *callback);
}

750 751
[
    object,
752
    uuid(79de76e5-994e-4f6b-81aa-42d9adb6e67e),
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772
    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);
773
    nsresult GetOrigin(nsAString *aOrigin);
774
    nsresult Reload(bool forceget);
775 776 777
    nsresult Replace(const nsAString *url);
    nsresult Assign(const nsAString *url);
    nsresult ToString(nsAString *_retval);
778
    nsresult ValueOf(nsIDOMLocation **_retval);
779 780
}

781 782
[
    object,
783
    uuid(4d6b3bad-f53c-4585-82f6-62982e27ede8),
784
    local
785 786 787
]
interface nsIDOMCSSRule : nsISupports
{
788
    nsresult GetType(uint16_t *aType);
789 790 791 792
    nsresult GetCssText(nsAString *aCssText);
    nsresult SetCssText(const nsAString *aCssText);
    nsresult GetParentStyleSheet(nsIDOMCSSStyleSheet **aParentStyleSheet);
    nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
793
    int /* thiscall mozilla::css::Rule */ GetCSSRule();
794 795
}

796 797
[
    object,
798 799
    uuid(a6cf90be-15b3-11d2-932e-00805f8add32),
    local
800 801 802 803 804 805 806 807 808 809 810
]
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);
811 812
    nsresult GetLength(uint32_t *aLength);
    nsresult Item(uint32_t index, nsAString *_retval);
813 814 815
    nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
}

816 817
[
    object,
818 819
    uuid(a6cf90c0-15b3-11d2-932e-00805f8add32),
    local
820 821 822
]
interface nsIDOMCSSRuleList : nsISupports
{
823 824
    nsresult GetLength(uint32_t *aLength);
    nsresult Item(uint32_t index, nsIDOMCSSRule **_retval);
825 826
}

827 828
[
    object,
829 830
    uuid(a6cf9080-15b3-11d2-932e-00805f8add32),
    local
831 832 833 834
]
interface nsIDOMStyleSheet : nsISupports
{
    nsresult GetType(nsAString *aType);
835 836
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
837 838 839 840 841 842 843 844 845
    nsresult GetOwnerNode(nsIDOMNode **aOwnerNode);
    nsresult GetParentStyleSheet(nsIDOMStyleSheet **aParentStyleSheet);
    nsresult GetHref(nsAString *aHref);
    nsresult GetTitle(nsAString *aTitle);
    nsresult GetMedia(nsIDOMMediaList **aMedia);
}

[
    object,
846 847
    uuid(a6cf90c2-15b3-11d2-932e-00805f8add32),
    local
848 849 850 851 852
]
interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet
{
    nsresult GetOwnerRule(nsIDOMCSSRule **aOwnerRule);
    nsresult GetCssRules(nsIDOMCSSRuleList **aCssRules);
853 854
    nsresult InsertRule(const nsAString *rule, uint32_t index, uint32_t *_retval);
    nsresult DeleteRule(uint32_t index);
855 856
}

857 858
[
    object,
859
    uuid(0e424250-ac2a-4fe2-bccd-a45824af090e),
860
    local
861 862 863
]
interface nsIDOMStyleSheetList : nsISupports
{
864 865
    nsresult GetLength(uint32_t *aLength);
    nsresult Item(uint32_t index, nsIDOMStyleSheet **_retval);
866 867
}

868 869
[
    object,
870
    uuid(450cf0ba-de90-4f86-85bf-e10cc8b8713f),
871
    local
872 873 874
]
interface nsIDOMNodeList : nsISupports
{
875 876
    nsresult Item(uint32_t index, nsIDOMNode **_retval);
    nsresult GetLength(uint32_t *aLength);
877 878 879 880 881 882 883 884 885 886 887 888
}

[
    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);
889 890
}

891 892
[
    object,
893
    uuid(cb5564cd-26ec-418f-a6d6-1d57cd2c971c),
894 895
    local
]
896
interface nsIDOMMozNamedAttrMap : nsISupports
897
{
898 899 900 901
    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);
902
    nsresult GetLength(uint32_t *aLength);
903 904 905
    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);
906 907
}

908 909
[
    object,
910
    uuid(cc35b412-009b-46a3-9be0-76448f12548d),
911
    local
912 913 914
]
interface nsIDOMNode : nsISupports
{
915 916 917 918 919 920 921 922 923 924 925 926 927 928 929
    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
    };

930 931 932 933 934 935 936 937 938
    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
    };

939 940 941
    nsresult GetNodeName(nsAString *aNodeName);
    nsresult GetNodeValue(nsAString *aNodeValue);
    nsresult SetNodeValue(const nsAString *aNodeValue);
942
    nsresult GetNodeType(uint16_t *aNodeType);
943
    nsresult GetParentNode(nsIDOMNode **aParentNode);
944
    nsresult GetParentElement(nsIDOMElement **aParentElement);
945 946 947 948 949 950 951 952 953 954
    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);
955
    nsresult HasChildNodes(bool *_retval);
956
    nsresult CloneNode(bool deep, uint8_t _argc, nsIDOMNode **_retval);
957 958 959 960
    nsresult Normalize();
    nsresult GetNamespaceURI(nsAString *aNamespaceURI);
    nsresult GetPrefix(nsAString *aPrefix);
    nsresult GetLocalName(nsAString *aLocalName);
961
    nsresult UnusedPlaceholder(bool *_retval);
962
    nsresult GetDOMBaseURI(nsAString *aBaseURI);
963
    nsresult CompareDocumentPosition(nsIDOMNode *other, uint16_t *_retval);
964 965 966
    nsresult GetTextContent(nsAString *aTextContent);
    nsresult SetTextContent(const nsAString *aTextContent);
    nsresult LookupPrefix(const nsAString *namespaceURI, nsAString *_retval);
967
    nsresult IsDefaultNamespace(const nsAString *namespaceURI, bool *_retval);
968
    nsresult LookupNamespaceURI(const nsAString *prefix, nsAString *_retval);
969
    nsresult IsEqualNode(nsIDOMNode *arg, bool *_retval);
970
    nsresult SetUserData(const nsAString *key, nsIVariant *data, nsIVariant **_retval);
971
    nsresult GetUserData(const nsAString *key, nsIVariant **_retval);
972
    nsresult Contains(nsIDOMNode *aOther, bool *_retval);
973 974 975

    nsresult GetMshtmlNode(nsISupports **aMshtmlNode);
    nsresult SetMshtmlNode(nsISupports *aMshtmlNode);
976 977
}

978 979
[
    object,
980
    uuid(7db491e8-a3a3-4432-ad67-e6c33e24ac6d),
981 982 983 984 985
    local
]
interface nsIDOMAttr : nsIDOMNode
{
    nsresult GetName(nsAString *aName);
986
    nsresult GetSpecified(bool *aSpecified);
987 988 989
    nsresult GetValue(nsAString *aValue);
    nsresult SetValue(const nsAString *aValue);
    nsresult GetOwnerElement(nsIDOMElement **aOwnerElement);
990
    nsresult GetIsId(bool *aIsId);
991 992
}

993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007
[
    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);
}

1008 1009
[
    object,
1010
    uuid(6289999b-1008-4269-b42a-413ec5a9d3f4),
1011 1012
    local
]
1013
interface nsIDOMElement : nsIDOMNode
1014
{
1015
    nsresult GetTagName(nsAString *aTagName);
1016 1017 1018 1019
    nsresult GetId(nsAString *aId);
    nsresult SetId(const nsAString *aId);
    nsresult GetClassName(nsAString *aClassName);
    nsresult SetClassName(const nsAString *aClassName) ;
1020
    nsresult GetClassList(nsISupports **aClassList);
1021
    nsresult GetAttributes(nsIDOMMozNamedAttrMap **aAttributes);
1022 1023 1024 1025 1026 1027 1028 1029
    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);
1030
    nsresult HasAttributes(bool *_retval);
1031 1032 1033 1034 1035
    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);
1036 1037 1038
    nsresult GetElementsByTagName(const nsAString *name, nsIDOMHTMLCollection **_retval);
    nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMHTMLCollection **_retval);
    nsresult GetElementsByClassName(const nsAString *classes, nsIDOMHTMLCollection **_retval);
1039 1040 1041 1042 1043
    nsresult GetChildElements(nsIDOMNodeList **aChildren);
    nsresult GetFirstElementChild(nsIDOMElement **aFirstElementChild);
    nsresult GetLastElementChild(nsIDOMElement **aLastElementChild);
    nsresult GetPreviousElementSibling(nsIDOMElement **aPreviousElementSibling);
    nsresult GetNextElementSibling(nsIDOMElement **aNextElementSibling);
1044
    nsresult GetChildElementCount(uint32_t *aChildElementCount);
1045
    nsresult Remove();
1046 1047
    nsresult GetClientRects(nsIDOMClientRectList **_retval);
    nsresult GetBoundingClientRect(nsIDOMClientRect **_retval);
1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059
    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);
1060 1061
    nsresult MozMatchesSelector(const nsAString *selector, bool *_retval);
    nsresult SetCapture(bool retargetToElement);
1062
    nsresult ReleaseCapture();
1063 1064
    nsresult MozRequestFullScreen();
    nsresult MozRequestPointerLock();
1065 1066
    nsresult QuerySelector(const nsAString *selectors, nsIDOMElement **_retval);
    nsresult QuerySelectorAll(const nsAString *selectors, nsIDOMNodeList **_retval);
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076
}

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

1079 1080
[
    object,
1081
    uuid(b0c42392-d0e7-4f6a-beb5-a698ce648945),
1082
    local
1083 1084 1085 1086 1087 1088 1089 1090 1091
]
interface nsIDOMHTMLElement : nsIDOMElement
{
    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);
1092
    nsresult GetDataset(nsISupports **aDataset);
1093 1094 1095 1096 1097 1098
    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);
1099
    nsresult GetProperties(nsISupports **aProperties);
1100 1101 1102 1103 1104 1105
    nsresult GetItemValue(nsIVariant **aItemValue);
    nsresult SetItemValue(nsIVariant *aItemValue);
    nsresult GetItemProp(nsIVariant **aItemProp);
    nsresult SetItemProp(nsIVariant *aItemProp);
    nsresult GetItemRef(nsIVariant **aItemRef);
    nsresult SetItemRef(nsIVariant *aItemRef);
1106 1107
    nsresult GetHidden(bool *aHidden);
    nsresult SetHidden(bool aHidden);
1108
    nsresult Click();
1109 1110
    nsresult GetTabIndex(int32_t *aTabIndex);
    nsresult SetTabIndex(int32_t aTabIndex);
1111 1112 1113 1114 1115
    nsresult Focus();
    nsresult Blur();
    nsresult GetAccessKey(nsAString *aAccessKey);
    nsresult SetAccessKey(const nsAString *aAccessKey);
    nsresult GetAccessKeyLabel(nsAString *aAccessKeyLabel);
1116 1117
    nsresult GetDraggable(bool *aDraggable);
    nsresult SetDraggable(bool aDraggable);
1118 1119
    nsresult GetContentEditable(nsAString *aContentEditable);
    nsresult SetContentEditable(const nsAString *aContentEditable);
1120
    nsresult GetIsContentEditable(bool *aIsContentEditable);
1121
    nsresult GetContextMenu(nsIDOMHTMLMenuElement **aContextMenu);
1122 1123
    nsresult GetSpellcheck(bool *aSpellcheck);
    nsresult SetSpellcheck(bool aSpellcheck);
1124 1125 1126 1127 1128
    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);
1129
    nsresult ScrollIntoView(bool top, uint8_t _argc);
1130
    nsresult GetOffsetParent(nsIDOMElement * *aOffsetParent);
1131 1132 1133 1134
    nsresult GetOffsetTop(int32_t *aOffsetTop);
    nsresult GetOffsetLeft(int32_t *aOffsetLeft);
    nsresult GetOffsetWidth(int32_t *aOffsetWidth);
    nsresult GetOffsetHeight(int32_t *aOffsetHeight);
1135 1136
}

1137 1138
[
    object,
1139
    uuid(59b80014-00f5-412d-846f-725494122d42),
1140 1141
    local
]
1142
interface nsIDOMHTMLHeadElement : nsISupports
1143 1144 1145
{
}

1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162
[
    object,
    uuid(2a3f789e-0667-464f-a8d7-6f58513443d9),
    local
]
interface nsIDOMHTMLMetaElement : nsISupports
{
    nsresult GetContent(nsAString *aContent);
    nsresult SetContent(const nsAString *aContent);
    nsresult GetHttpEquiv(nsAString *aHttpEquiv);
    nsresult SetHttpEquiv(const nsAString *aHttpEquiv);
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
    nsresult GetScheme(nsAString *aScheme);
    nsresult SetScheme(const nsAString *aScheme);
}

1163 1164
[
    object,
1165
    uuid(4109a2d2-e7af-445d-bb72-c7c9b875f35e),
1166
    local
1167 1168 1169 1170 1171
]
interface nsIDOMCharacterData : nsIDOMNode
{
    nsresult GetData(nsAString *aData);
    nsresult SetData(const nsAString *aData);
1172 1173
    nsresult GetLength(uint32_t *aLength);
    nsresult SubstringData(uint32_t offset, uint32_t count, nsAString *_retval);
1174
    nsresult AppendData(const nsAString *arg);
1175 1176 1177
    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);
1178
    nsresult Remove();
1179 1180 1181 1182
}

[
    object,
1183
    uuid(67273994-6aff-4091-9de9-b788a249f783),
1184
    local
1185 1186 1187
]
interface nsIDOMText : nsIDOMCharacterData
{
1188
    nsresult SplitText(uint32_t offset, nsIDOMText **_retval);
1189
    nsresult GetWholeText(nsAString *aWholeText);
1190 1191
}

1192 1193
[
    object,
1194
    uuid(e7866ff8-b7fc-494f-87c0-fb017d8a4d30),
1195
    local
1196 1197 1198 1199 1200
]
interface nsIDOMComment : nsIDOMCharacterData
{
}

1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214
[
    object,
    uuid(cd7467b9-0f26-4787-a359-66e80ba8db92),
    local
]
interface nsIDOMDocumentType : nsIDOMNode
{
    nsresult GetName(nsAString *aName);
    nsresult GetPublicId(nsAString *aPublicId);
    nsresult GetSystemId(nsAString *aSystemId);
    nsresult GetInternalSubset(nsAString *aInternalSubset);
    nsresult MozRemove();
}

1215 1216
[
    object,
1217
    uuid(48eb8d72-95bb-402e-a8fc-f2b187abcbdb),
1218
    local
1219 1220 1221
]
interface nsIDOMDocumentFragment : nsIDOMNode
{
1222 1223
    nsresult QuerySelector(const nsAString *selectors, nsIDOMElement **_retval);
    nsresult QuerySelectorAll(const nsAString *selectors, nsIDOMNodeList **_retval);
1224 1225
}

1226 1227
[
    object,
1228
    uuid(b15fa0f4-97c1-4388-af62-2ceff7a89bdf),
1229
    local
1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240
]
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);
1241
    nsresult CreateProcessingInstruction(const nsAString *target, const nsAString *data, nsIDOMProcessingInstruction **_retval);
1242 1243
    nsresult CreateAttribute(const nsAString *name, nsIDOMAttr **_retval);
    nsresult GetElementsByTagName(const nsAString *tagname, nsIDOMNodeList **_retval);
1244
    nsresult ImportNode(nsIDOMNode *importedNode, bool deep, uint8_t _argc, nsIDOMNode **_retval);
1245 1246 1247
    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);
1248
    nsresult GetElementById(const nsAString *elementId, nsIDOMElement **_retval);
1249 1250
    nsresult GetInputEncoding(nsAString *aInputEncoding);
    nsresult GetDocumentURI(nsAString *aDocumentURI);
1251
    nsresult GetURL(nsAString *aURL);
1252 1253
    nsresult AdoptNode(nsIDOMNode *source, nsIDOMNode **_retval);
    nsresult CreateRange(nsIDOMRange **_retval);
1254
    nsresult CreateNodeIterator(nsIDOMNode *root, uint32_t whatToShow, nsIDOMNodeFilter *filter, uint8_t _argc,
1255
            nsIDOMNodeIterator **_retval);
1256
    nsresult CreateTreeWalker(nsIDOMNode *root, uint32_t whatToShow, nsIDOMNodeFilter *filter, uint8_t _argc,
1257
            nsIDOMTreeWalker **_retval);
1258 1259
    cpp_quote("#undef CreateEvent")
    nsresult CreateEvent(const nsAString *eventType, nsIDOMEvent **_retval);
1260
    nsresult GetDefaultView(mozIDOMWindowProxy **aDefaultView);
1261 1262 1263 1264 1265 1266
    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);
1267
    nsresult GetReadyState(nsAString *aReadyState);
1268 1269
    nsresult GetLastModified(nsAString *aLastModified);
    nsresult GetReferrer(nsAString *aReferrer);
1270
    nsresult HasFocus(bool *_retval);
1271 1272
    nsresult GetActiveElement(nsIDOMElement **aActiveElement);
    nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval);
1273 1274 1275 1276 1277
    nsresult GetStyleSheets(nsIDOMStyleSheetList **aStyleSheets);
    nsresult GetPreferredStyleSheetSet(nsAString *aPreferredStyleSheetSet);
    nsresult GetSelectedStyleSheetSet(nsAString *aSelectedStyleSheetSet);
    nsresult SetSelectedStyleSheetSet(const nsAString *aSelectedStyleSheetSet);
    nsresult GetLastStyleSheetSet(nsAString *aLastStyleSheetSet);
1278
    nsresult GetStyleSheetSets(nsISupports **aStyleSheetSets);
1279
    nsresult EnableStyleSheetsForSet(const nsAString *name);
1280
    nsresult ElementFromPoint(float x, float y, nsIDOMElement **_retval);
1281
    nsresult GetContentType(nsAString *aContentType);
1282
    nsresult GetMozSyntheticDocument(bool *aMozSyntheticDocument);
1283
    nsresult GetCurrentScript(nsIDOMElement **aCurrentScript);
1284 1285
    nsresult ReleaseCapture();
    nsresult MozSetImageElement(const nsAString *aImageElementId, nsIDOMElement *aImageElement);
1286
    nsresult GetMozFullScreenElement(nsIDOMElement **aMozFullScreenElement);
1287
    nsresult MozCancelFullScreen();
1288 1289
    nsresult GetMozFullScreen(bool *aMozFullScreen);
    nsresult GetMozFullScreenEnabled(bool *aMozFullScreenEnabled);
1290
    nsresult GetMozPointerLockElement(nsIDOMElement **aMozPointerLockElement);
1291
    nsresult CaretPositionFromPoint(float x, float y, nsISupports **_retval);
1292
    nsresult MozExitPointerLock();
1293
    nsresult GetHidden(bool *aHidden);
1294
    nsresult GetMozHidden(bool *aMozHidden);
1295
    nsresult GetVisibilityState(nsAString *aVisibilityState);
1296
    nsresult GetMozVisibilityState(nsAString *aMozVisibilityState);
1297
    nsresult GetCompatMode(nsAString *aCompatMode);
1298 1299
    nsresult QuerySelector(const nsAString *selectors, nsIDOMElement **_retval);
    nsresult QuerySelectorAll(const nsAString *selectors, nsIDOMNodeList **_retval);
1300 1301
}

1302 1303
[
    object,
1304
    uuid(cd31e61f-cfc2-4b91-9385-17b6a2d0633d),
1305
    local
1306 1307 1308
]
interface nsIDOMHTMLDocument : nsIDOMDocument
{
1309 1310 1311 1312 1313
    nsresult GetDomain(nsAString *aDomain);
    nsresult SetDomain(const nsAString *aDomain);
    nsresult GetCookie(nsAString *aCookie);
    nsresult SetCookie(const nsAString *aCookie);
    nsresult GetHead(nsIDOMHTMLHeadElement **aHead);
1314 1315 1316
    nsresult GetBody(nsIDOMHTMLElement **aBody);
    nsresult SetBody(nsIDOMHTMLElement *aBody);
    nsresult GetImages(nsIDOMHTMLCollection **aImages);
1317 1318
    nsresult GetEmbeds(nsIDOMHTMLCollection **aEmbeds);
    nsresult GetPlugins(nsIDOMHTMLCollection **aPlugins);
1319 1320
    nsresult GetLinks(nsIDOMHTMLCollection **aLinks);
    nsresult GetForms(nsIDOMHTMLCollection **aForms);
1321
    nsresult GetScripts(nsIDOMHTMLCollection **aScripts);
1322
    nsresult GetElementsByName(const nsAString *elementName, nsIDOMNodeList **_retval);
1323
    nsresult GetItems(const nsAString *types, nsIDOMNodeList **_retval);
1324
    nsresult Open(const nsAString *aContentTypeOrUrl, const nsAString *aReplaceOrName, const nsAString *aFeatures,
1325
            JSContext *cx, uint8_t _argc, nsISupports **_retval);
1326 1327 1328
    nsresult Close();
    nsresult Write(const nsAString *text, JSContext *cx);
    nsresult Writeln(const nsAString *text, JSContext *cx);
1329 1330
    nsresult GetDesignMode(nsAString *aDesignMode);
    nsresult SetDesignMode(const nsAString *aDesignMode);
1331 1332 1333 1334 1335
    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);
1336
    nsresult QueryCommandValue(const nsAString *commandID, nsAString *_retval);
1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350
    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);
1351 1352
    nsresult CaptureEvents();
    nsresult ReleaseEvents();
1353 1354
}

1355 1356
[
    object,
1357
    uuid(1f94055c-42e7-4a30-96a1-6a804f1c2d1e),
1358
    local
1359 1360 1361
]
interface nsIDOMRange : nsISupports
{
1362 1363 1364 1365 1366 1367 1368
    enum {
        NS_START_TO_START,
        NS_START_TO_END,
        NS_END_TO_END,
        NS_END_TO_START
    };

1369
    nsresult GetStartContainer(nsIDOMNode **aStartContainer);
1370
    nsresult GetStartOffset(int32_t *aStartOffset);
1371
    nsresult GetEndContainer(nsIDOMNode **aEndContainer);
1372
    nsresult GetEndOffset(int32_t *aEndOffset);
1373
    nsresult GetCollapsed(bool *aCollapsed);
1374
    nsresult GetCommonAncestorContainer(nsIDOMNode **aCommonAncestorContainer);
1375 1376
    nsresult SetStart(nsIDOMNode *refNode, int32_t offset);
    nsresult SetEnd(nsIDOMNode *refNode, int32_t offset);
1377 1378 1379 1380
    nsresult SetStartBefore(nsIDOMNode *refNode);
    nsresult SetStartAfter(nsIDOMNode *refNode);
    nsresult SetEndBefore(nsIDOMNode *refNode);
    nsresult SetEndAfter(nsIDOMNode *refNode);
1381
    nsresult Collapse(bool toStart);
1382 1383
    nsresult SelectNode(nsIDOMNode *refNode);
    nsresult SelectNodeContents(nsIDOMNode *refNode);
1384
    nsresult CompareBoundaryPoints(uint16_t how, nsIDOMRange *sourceRange, int16_t *_retval);
1385 1386 1387 1388 1389 1390 1391 1392
    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();
1393
    nsresult CreateContextualFragment([in] const nsAString *fragment, [out] nsIDOMDocumentFragment **_retval);
1394 1395
    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);
1396
    nsresult IntersectsNode(nsIDOMNode *node, bool *_retval);
1397 1398
    nsresult GetClientRects(nsIDOMClientRectList **_retval);
    nsresult GetBoundingClientRect(nsIDOMClientRect **_retval);
1399 1400
}

1401 1402
[
    object,
1403
    uuid(e0a4d4b3-f34e-44bd-b1f2-4e3bde9b6915),
1404
    local
1405 1406 1407 1408
]
interface nsISelection : nsISupports
{
    nsresult GetAnchorNode(nsIDOMNode **aAnchorNode);
1409
    nsresult GetAnchorOffset(int32_t *aAnchorOffset);
1410
    nsresult GetFocusNode(nsIDOMNode **aFocusNode);
1411
    nsresult GetFocusOffset(int32_t *aFocusOffset);
1412
    nsresult GetIsCollapsed(bool *aIsCollapsed);
1413
    bool /* don't use */ Collapsed();
1414 1415 1416 1417 1418 1419
    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);
1420 1421
    nsresult CollapseToStart();
    nsresult CollapseToEnd();
1422
    nsresult ContainsNode(nsIDOMNode *node, bool entirelyContained, bool *_retval);
1423 1424 1425 1426 1427
    nsresult SelectAllChildren(nsIDOMNode *parentNode);
    nsresult AddRange(nsIDOMRange *range);
    nsresult RemoveRange(nsIDOMRange *range);
    nsresult RemoveAllRanges();
    nsresult DeleteFromDocument();
1428
    nsresult ToString(nsAString *_retval);
1429
    nsresult Modify(const nsAString *alter, const nsAString *direction, const nsAString *granularity);
1430 1431
}

1432 1433
[
    object,
1434
    uuid(8d64f457-fb8c-49ea-a359-cef30eed9774),
1435 1436 1437 1438
    local
]
interface nsIDOMWindowCollection : nsISupports
{
1439
    nsresult GetLength(uint32_t *aLength);
1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459
    nsresult Item(uint32_t index, mozIDOMWindowProxy **_retval);
    nsresult NamedItem(const nsAString *name, mozIDOMWindowProxy **_retval);
}

[
    object,
    uuid(75fbabd6-7a2e-4787-aa33-449a33512135),
    local
]
interface mozIDOMWindow : nsISupports
{
}

[
    object,
    uuid(53ca090c-e739-48b9-8911-208c72f9191e),
    local
]
interface mozIDOMWindowProxy : nsISupports
{
1460 1461
}

1462 1463
[
    object,
1464
    uuid(ab30b7cc-f7f9-4b9b-befb-7dbf6cf86d46),
1465
    local
1466 1467 1468 1469 1470 1471
]
interface nsIDOMWindow : nsISupports
{
    nsresult GetDocument(nsIDOMDocument **aDocument);
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
1472 1473 1474 1475 1476
    nsresult GetLocation(nsIDOMLocation **aLocation);
    nsresult Close();
    nsresult Stop();
    nsresult Focus();
    nsresult Blur();
1477
    nsresult GetLength(uint32_t *aLength);
1478 1479
    nsresult GetRealTop(nsIDOMWindow **aTop);
    nsresult GetRealParent(nsIDOMWindow **aParent);
1480 1481
    nsresult GetOpener(mozIDOMWindowProxy **aOpenerWindow);
    nsresult SetOpener(mozIDOMWindowProxy *aOpenerWindow);
1482
    nsresult GetRealFrameElement(nsIDOMElement **aFrameElement);
1483 1484
    nsresult GetNavigator(nsIDOMNavigator **aNavigator);
    nsresult Print();
1485 1486 1487
    nsresult GetSessionStorage(nsISupports **aSessionStorage);
    nsresult GetLocalStorage(nsISupports **aLocalStorage);
    nsresult GetIndexedDB(nsISupports **aIndexedDB);
1488
    nsresult GetSelection(nsISelection **_retval);
1489
    nsresult MatchMedia(const nsAString *media_query_list, nsISupports **_retval);
1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508
    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);
1509
    nsresult GetComputedStyle(nsIDOMElement *elt, const nsAString *pseudoElt, nsIDOMCSSStyleDeclaration **_retval);
1510
    nsresult GetDefaultComputedStyle(nsIDOMElement *elt, const nsAString *pseudoElt, nsIDOMCSSStyleDeclaration **_retval);
1511 1512 1513
    nsresult GetFrames(nsIDOMWindowCollection **aFrames);
    nsresult GetTextZoom(float *aTextZoom);
    nsresult SetTextZoom(float aTextZoom);
1514 1515
    nsresult ScrollByLines(int32_t numLines);
    nsresult ScrollByPages(int32_t numPages);
1516 1517
    nsresult GetMozInnerScreenX(float *aMozInnerScreenX);
    nsresult GetMozInnerScreenY(float *aMozInnerScreenY);
1518
    nsresult GetDevicePixelRatio(float *aDevicePixelRatio);
1519 1520
    nsresult GetScrollMaxX(int32_t *aScrollMaxX);
    nsresult GetScrollMaxY(int32_t *aScrollMaxY);
1521 1522
    nsresult GetFullScreen(bool *aFullScreen);
    nsresult SetFullScreen(bool aFullScreen);
1523 1524 1525 1526
    nsresult Back();
    nsresult Forward();
    nsresult Home();
    nsresult Open(const nsAString *url, const nsAString *name, const nsAString *options, nsIDOMWindow **_retval);
1527 1528
    nsresult Find(const nsAString *str, bool caseSensitive, bool backwards, bool wrapAround, bool wholeWord,
            bool searchInFrames, bool showDialog, bool *_retval);
1529 1530
    nsresult GetInnerWindow(mozIDOMWindow **aInnerWindow);
    nsresult GetOuterWindow(mozIDOMWindowProxy **aOuterWindow);
1531 1532 1533 1534
}

[
    object,
1535
    uuid(068630db-2c00-43dd-b167-495757a88236),
1536
    local
1537
]
1538
interface nsIDOMHTMLBodyElement : nsISupports
1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551
{
    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);
1552 1553 1554 1555
}

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

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

1687 1688
[
    object,
1689
    uuid(c2b3e9ff-6b36-4158-ace3-05a9c5b8e1c1),
1690
    local
1691
]
1692
interface nsIDOMHTMLOptionElement : nsISupports
1693
{
1694 1695
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
1696
    nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1697 1698
    nsresult GetLabel(nsAString *aLabel);
    nsresult SetLabel(const nsAString *aLabel);
1699 1700 1701 1702
    nsresult GetDefaultSelected(bool *aDefaultSelected);
    nsresult SetDefaultSelected(bool aDefaultSelected);
    nsresult GetSelected(bool *aSelected);
    nsresult SetSelected(bool aSelected);
1703 1704
    nsresult GetValue(nsAString *aValue);
    nsresult SetValue(const nsAString *aValue);
1705 1706
    nsresult GetText(nsAString *aText);
    nsresult SetText(const nsAString *aText);
1707
    nsresult GetIndex(int32_t *aIndex);
1708 1709
}

1710 1711
[
    object,
1712
    uuid(44b7a468-7dba-4f0c-9b4e-ee46dc0f26c7),
1713 1714
    local
]
1715
interface nsIDOMHTMLButtonElement : nsISupports
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
{
    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);
}

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

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

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

1806 1807
[
    object,
1808
    uuid(7a4aeb2e-fcf3-443e-b002-ca1c8ea322e9),
1809
    local
1810
]
1811
interface nsIDOMHTMLTextAreaElement : nsISupports
1812
{
1813 1814
    nsresult GetAutofocus(bool *aAutofocus);
    nsresult SetAutofocus(bool aAutofocus);
1815 1816
    nsresult GetCols(uint32_t *aCols);
    nsresult SetCols(uint32_t aCols);
1817 1818
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
1819
    nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1820 1821
    nsresult GetMaxLength(int32_t *aMaxLength);
    nsresult SetMaxLength(int32_t aMaxLength);
1822 1823
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
1824 1825
    nsresult GetPlaceholder(nsAString *aPlaceholder);
    nsresult SetPlaceholder(const nsAString *aPlaceholder);
1826 1827 1828 1829
    nsresult GetReadOnly(bool *aReadOnly);
    nsresult SetReadOnly(bool aReadOnly);
    nsresult GetRequired(bool *aRequired);
    nsresult SetRequired(bool aRequired);
1830 1831
    nsresult GetRows(uint32_t *aRows);
    nsresult SetRows(uint32_t aRows);
1832 1833
    nsresult GetWrap(nsAString *aWrap);
    nsresult SetWrap(const nsAString *aWrap);
1834
    nsresult GetType(nsAString *aType);
1835 1836
    nsresult GetDefaultValue(nsAString *aDefaultValue);
    nsresult SetDefaultValue(const nsAString *aDefaultValue);
1837 1838
    nsresult GetValue(nsAString *aValue);
    nsresult SetValue(const nsAString *aValue);
1839
    nsresult GetTextLength(int32_t *aTextLength);
1840
    nsresult GetWillValidate(bool *aWillValidate);
1841 1842
    nsresult GetValidity(nsIDOMValidityState **aValidity);
    nsresult GetValidationMessage(nsAString *aValidationMessage);
1843
    nsresult CheckValidity(bool *_retval);
1844
    nsresult SetCustomValidity(const nsAString *error);
1845
    nsresult Select();
1846 1847 1848 1849 1850
    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);
1851 1852 1853
    nsresult GetSelectionDirection(nsAString *aSelectionDirection);
    nsresult SetSelectionDirection(const nsAString *aSelectionDirection);
    nsresult GetControllers(nsIControllers **aControllers);
1854 1855
}

1856 1857
[
    object,
1858
    uuid(fe96dc1c-40e4-4974-9354-e3fce663c3d5),
1859 1860
    local
]
1861
interface nsIDOMHTMLScriptElement : nsISupports
1862
{
1863 1864
    nsresult GetSrc(nsAString *aSrc);
    nsresult SetSrc(const nsAString *aSrc);
1865 1866 1867 1868
    nsresult GetAsync(bool *aAsync);
    nsresult SetAsync(bool aAsync);
    nsresult GetDefer(bool *aDefer);
    nsresult SetDefer(bool aDefer);
1869 1870 1871 1872
    nsresult GetType(nsAString *aType);
    nsresult SetType(const nsAString *aType);
    nsresult GetCharset(nsAString *aCharset);
    nsresult SetCharset(const nsAString *aCharset);
1873 1874 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
[
    object,
1883
    uuid(ec18e71c-4f5c-4cc3-aa36-5273168644dc),
1884 1885
    local
]
1886
interface nsIDOMHTMLImageElement : nsISupports
1887
{
1888 1889 1890 1891
    nsresult GetAlt(nsAString *aAlt);
    nsresult SetAlt(const nsAString *aAlt);
    nsresult GetSrc(nsAString *aSrc);
    nsresult SetSrc(const nsAString *aSrc);
1892 1893 1894 1895
    nsresult GetSrcset(nsAString *aSrcset);
    nsresult SetSrcset(const nsAString *aSrcset) ;
    nsresult GetSizes(nsAString *aSizes);
    nsresult SetSizes(const nsAString *aSizes);
1896 1897
    nsresult GetUseMap(nsAString *aUseMap);
    nsresult SetUseMap(const nsAString *aUseMap);
1898 1899
    nsresult GetIsMap(bool *aIsMap);
    nsresult SetIsMap(bool aIsMap);
1900 1901 1902 1903 1904 1905
    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);
1906
    nsresult GetComplete(bool *aComplete);
1907 1908 1909 1910 1911 1912
    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);
1913 1914
    nsresult GetHspace(int32_t *aHspace);
    nsresult SetHspace(int32_t aHspace);
1915 1916
    nsresult GetLongDesc(nsAString *aLongDesc);
    nsresult SetLongDesc(const nsAString *aLongDesc);
1917 1918
    nsresult GetVspace(int32_t *aVspace);
    nsresult SetVspace(int32_t aVspace);
1919 1920
    nsresult GetLowsrc(nsAString *aLowsrc);
    nsresult SetLowsrc(const nsAString *aLowsrc);
1921
    nsresult GetCurrentSrc(nsAString *aCurrentSrc);
1922 1923
    nsresult GetX(int32_t *aX);
    nsresult GetY(int32_t *aY);
1924 1925
}

1926 1927
[
    object,
1928
    uuid(339c01c8-2d41-4626-b231-eec63f0241b6),
1929 1930
    local
]
1931
interface nsIDOMHTMLAnchorElement : nsISupports
1932
{
1933 1934 1935 1936 1937 1938
    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);
1939 1940
    nsresult GetDownload(nsAString *aPing);
    nsresult SetDownload(const nsAString *aPing);
1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962
    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);
1963 1964 1965 1966 1967 1968 1969 1970 1971 1972
    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);
1973
    nsresult ToString(nsAString *_retval);
1974 1975
}

1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013
[
    object,
    uuid(40c78026-36dc-40ca-9221-de73267e9e99),
    local
]
interface nsIDOMHTMLAreaElement : nsISupports
{
    nsresult GetAlt(const nsAString *aAlt);
    nsresult SetAlt(nsAString *aAlt);
    nsresult GetCoords(const nsAString *aCoords);
    nsresult SetCoords(nsAString *aCoords);
    nsresult GetShape(const nsAString *aShape);
    nsresult SetShape(nsAString *aShape);
    nsresult GetHref(const nsAString *aHref);
    nsresult SetHref(nsAString *aHref);
    nsresult GetTarget(const nsAString *aTarget);
    nsresult SetTarget(nsAString *aTarget);
    nsresult GetPing(const nsAString *aPing);
    nsresult SetPing(nsAString *aPing);
    nsresult GetDownload(const nsAString *aDownload);
    nsresult SetDownload(nsAString *aDownload);
    nsresult GetProtocol(const nsAString *aProtocol);
    nsresult SetProtocol(nsAString *aProtocol);
    nsresult GetHost(const nsAString *aHost);
    nsresult SetHost(nsAString *aHost);
    nsresult GetPort(const nsAString *aPort);
    nsresult SetPort(nsAString *aPort);
    nsresult GetPathname(const nsAString *aPathname);
    nsresult SetPathname(nsAString *aPathname);
    nsresult GetSearch(const nsAString *aSearch);
    nsresult SetSearch(nsAString *aSearch);
    nsresult GetHash(const nsAString *aHash);
    nsresult SetHash(nsAString *aHash);
    nsresult GetNoHref(const nsAString *aNoHref);
    nsresult SetNoHref(nsAString *aNoHref);
    nsresult ToString(nsAString *_retval);
}

2014 2015
[
    object,
2016
    uuid(ee50b7ab-0015-4fbe-89e0-e3feacd4ffde),
2017 2018
    local
]
2019
interface nsIDOMHTMLLinkElement : nsISupports
2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040
{
    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);
}

2041 2042
[
    object,
2043
    uuid(135a30ee-0374-4ee7-9d36-91736bff5fb1),
2044 2045
    local
]
2046
interface nsIDOMHTMLTableElement : nsISupports
2047
{
2048 2049
    nsresult GetCaption(nsIDOMHTMLElement **aCaption);
    nsresult SetCaption(nsIDOMHTMLElement *aCaption);
2050 2051 2052 2053
    nsresult GetTHead(nsIDOMHTMLElement **aTHead);
    nsresult SetTHead(nsIDOMHTMLElement *aTHead);
    nsresult GetTFoot(nsIDOMHTMLElement **aTFoot);
    nsresult SetTFoot(nsIDOMHTMLElement *aTFoot);
2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074
    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);
2075
    nsresult xpidlDeleteTHead();
2076
    nsresult CreateTFoot(nsIDOMHTMLElement **_retval);
2077
    nsresult xpidlDeleteTFoot();
2078
    nsresult CreateCaption(nsIDOMHTMLElement **_retval);
2079
    nsresult xpidlDeleteCaption();
2080 2081
    nsresult InsertRow(int32_t index, nsIDOMHTMLElement **_retval);
    nsresult DeleteRow(int32_t index);
2082 2083
}

2084 2085
[
    object,
2086
    uuid(02094366-0d3d-47e3-949c-89113a9bcc15),
2087 2088
    local
]
2089
interface nsIDOMHTMLTableRowElement : nsISupports
2090
{
2091 2092
    nsresult GetRowIndex(int32_t *aRowIndex);
    nsresult GetSectionRowIndex(int32_t *aSectionRowIndex);
2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103
    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);
2104
    nsresult InsertCell(int32_t index, nsIDOMHTMLElement * *_retval);
2105
    nsresult DeleteCell(int32_t index);
2106 2107
}

2108 2109
[
    object,
2110
    uuid(3203c36f-33fd-4628-8c88-77e82d38df1e),
2111 2112
    local
]
2113
interface nsIDOMHTMLTableCellElement : nsISupports
2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145
{
    nsresult GetCellIndex(int32_t *aCellIndex);
    nsresult GetAbbr(nsAString *aAbbr);
    nsresult SetAbbr(const nsAString *aAbbr);
    nsresult GetAlign(nsAString *aAlign);
    nsresult SetAlign(const nsAString *aAlign);
    nsresult GetAxis(nsAString *aAxis);
    nsresult SetAxis(const nsAString *aAxis);
    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 GetColSpan(int32_t *aColSpan);
    nsresult SetColSpan(int32_t aColSpan);
    nsresult GetHeaders(nsAString *aHeaders);
    nsresult SetHeaders(const nsAString *aHeaders);
    nsresult GetHeight(nsAString *aHeight);
    nsresult SetHeight(const nsAString *aHeight);
    nsresult GetNoWrap(bool *aNoWrap);
    nsresult SetNoWrap(bool aNoWrap);
    nsresult GetRowSpan(int32_t *aRowSpan);
    nsresult SetRowSpan(int32_t aRowSpan);
    nsresult GetScope(nsAString *aScope);
    nsresult SetScope(const nsAString *aScope);
    nsresult GetVAlign(nsAString *aVAlign);
    nsresult SetVAlign(const nsAString *aVAlign);
    nsresult GetWidth(nsAString *aWidth);
    nsresult SetWidth(const nsAString *aWidth);
}

2146 2147
[
    object,
2148
    uuid(9fd7b656-1055-4cb2-b8b1-ed13efe24457),
2149 2150
    local
]
2151
interface nsIDOMHTMLIFrameElement : nsISupports
2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170
{
    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);
2171 2172
    nsresult GetSrcdoc(nsAString *aSrcdoc);
    nsresult SetSrcdoc(const nsAString *aSrcdoc);
2173 2174 2175
    nsresult GetWidth(nsAString *aWidth);
    nsresult SetWidth(const nsAString *aWidth);
    nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
2176 2177
    nsresult GetAllowFullscreen(bool *aAllowFullscreen);
    nsresult SetAllowFullscreen(bool aAllowFullscreen);
2178 2179
}

2180 2181
[
    object,
2182
    uuid(012a8982-c9d3-4614-91e2-18ee51c97c06),
2183 2184
    local
]
2185
interface nsIDOMHTMLFrameElement : nsISupports
2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196
{
    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);
2197 2198
    nsresult GetNoResize(bool *aNoResize);
    nsresult SetNoResize(bool aNoResize);
2199 2200 2201 2202 2203 2204 2205
    nsresult GetScrolling(nsAString *aScrolling);
    nsresult SetScrolling(const nsAString *aScrolling);
    nsresult GetSrc(nsAString *aSrc);
    nsresult SetSrc(const nsAString *aSrc);
    nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
}

2206 2207
[
    object,
2208
    uuid(baf443d2-da5d-40c9-be3c-c65a69a25250),
2209 2210
    local
]
2211
interface nsIDOMHTMLObjectElement : nsISupports
2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227
{
    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);
2228 2229
    nsresult GetDeclare(bool *aDeclare);
    nsresult SetDeclare(bool aDeclare);
2230 2231
    nsresult GetHeight(nsAString *aHeight);
    nsresult SetHeight(const nsAString *aHeight);
2232 2233
    nsresult GetHspace(int32_t *aHspace);
    nsresult SetHspace(int32_t aHspace);
2234 2235 2236 2237 2238 2239 2240 2241
    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);
2242 2243
    nsresult GetVspace(int32_t *aVspace);
    nsresult SetVspace(int32_t aVspace);
2244 2245 2246
    nsresult GetWidth(nsAString *aWidth);
    nsresult SetWidth(const nsAString *aWidth);
    nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
2247
    nsresult GetWillValidate(bool *aWillValidate);
2248 2249
    nsresult GetValidity(nsIDOMValidityState **aValidity);
    nsresult GetValidationMessage(nsAString *aValidationMessage);
2250
    nsresult CheckValidity(bool *_retval);
2251
    nsresult SetCustomValidity(const nsAString *error);
2252 2253
}

2254 2255
[
    object,
2256
    uuid(fa326d22-8739-4eef-a80e-6449bde605d2),
2257 2258
    local
]
2259
interface nsIDOMHTMLStyleElement : nsISupports
2260
{
2261 2262
    nsresult GetDisabled(bool *aDisabled);
    nsresult SetDisabled(bool aDisabled);
2263 2264 2265 2266
    nsresult GetMedia(nsAString *aMedia);
    nsresult SetMedia(const nsAString *aMedia);
    nsresult GetType(nsAString *aType);
    nsresult SetType(const nsAString *aType);
2267 2268
    nsresult GetScoped(bool *aScoped);
    nsresult SetScoped(bool aScoped);
2269
    nsresult GetDOMStyleSheet(nsIDOMStyleSheet **aDOMStyleSheet);
2270 2271
}

2272 2273
[
    object,
2274
    uuid(10a28f38-32e8-4c63-8aa1-12eaaebc369a),
2275
    local
2276 2277 2278
]
interface nsIURIContentListener : nsISupports
{
2279
    nsresult OnStartURIOpen(nsIURI *aURI, bool *_retval);
2280
    nsresult DoContent(const nsACString *aContentType, bool aIsContentPreferred, nsIRequest *aRequest,
2281 2282 2283 2284
        nsIStreamListener **aContentHandler, bool *_retval);
    nsresult IsPreferred(const char *aContentType, char **aDesiredContentType, bool *_retval);
    nsresult CanHandleContent(const char *aContentType, bool aIsContentPreferred,
        char **aDesiredContentType, bool *_retval);
2285 2286 2287 2288 2289 2290
    nsresult GetLoadCookie(nsISupports **aLoadCookie);
    nsresult SetLoadCookie(nsISupports *aLoadCookie);
    nsresult GetParentContentListener(nsIURIContentListener **aParentContentListener);
    nsresult SetParentContentListener(nsIURIContentListener *aParentContentListener);
}

2291 2292
[
    object,
2293 2294
    uuid(44b78386-1dd2-11b2-9ad2-e4eee2ca1916),
    local
2295 2296 2297
]
interface nsITooltipListener : nsISupports
{
2298
    nsresult OnShowTooltip(int32_t aXCoords, int32_t aYCoords, const PRUnichar *aTipText);
2299 2300 2301
    nsresult OnHideTooltip();
}

2302 2303
[
    object,
2304
    uuid(4052b6da-4faa-4646-b3a1-7e16a01c2dc2),
2305
    local
2306 2307 2308 2309 2310 2311 2312 2313 2314
]
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);
2315
    nsresult GetContentDOMWindow(mozIDOMWindowProxy **aContentDOMWindow);
2316 2317
    nsresult GetIsActive(bool *aIsActive);
    nsresult SetIsActive(bool aIsActive);
2318 2319
}

2320
cpp_quote("#define SETUP_ALLOW_JAVASCRIPT  2")
2321
cpp_quote("#define SETUP_IS_CHROME_WRAPPER 7")
2322
cpp_quote("#define SETUP_DISABLE_NOSCRIPT  16")
2323 2324 2325

[
    object,
2326 2327
    uuid(f15398a0-8018-11d3-af70-00a024ffc08c),
    local
2328 2329 2330
]
interface nsIWebBrowserSetup : nsISupports
{
2331
    nsresult SetProperty(uint32_t aId, uint32_t aValue);
2332 2333 2334 2335 2336 2337
}

typedef void* nativeWindow;

[
    object,
2338
    uuid(ca635529-a977-4552-9b8a-66187e54d882),
2339
    local
2340 2341 2342
]
interface nsIBaseWindow : nsISupports
{
2343 2344
    nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget *parentWidget, int32_t x,
            int32_t y, int32_t cx, int32_t cy);
2345 2346
    nsresult Create();
    nsresult Destroy();
2347
    nsresult SetPosition(int32_t x, int32_t y);
2348
    nsresult SetPositionDesktopPix(int32_t x, int32_t y);
2349 2350 2351 2352 2353
    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);
2354
    nsresult Repaint(bool force);
2355
    nsresult GetParentWidget(nsIWidget **aParentWidget);
2356 2357 2358
    nsresult SetParentWidget(nsIWidget *aParentWidget);
    nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow);
    nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow);
2359
    nsresult GetNativeHandle(nsAString *aNativeHandle);
2360 2361 2362 2363
    nsresult GetVisibility(bool *aVisibility);
    nsresult SetVisibility(bool aVisibility);
    nsresult GetEnabled(bool *aEnabled);
    nsresult SetEnabled(bool aEnabled);
2364
    nsresult GetMainWidget(nsIWidget **aMainWidget);
2365
    nsresult GetUnscaledDevicePixelsPerCSSPixel(double *aUnscaledDevicePixelsPerCSSPixel);
2366
    nsresult GetDevicePixelsPerDesktopPixel(double *aDevicePixelsPerDesktopPixel);
2367 2368 2369 2370 2371 2372 2373
    nsresult SetFocus();
    nsresult GetTitle(PRUnichar **aTitle);
    nsresult SetTitle(const PRUnichar *aTitle);
}

[
    object,
2374
    uuid(3ade79d4-8cb9-4952-b18d-4f9b63ca0d31),
2375
    local
2376 2377 2378
]
interface nsIWebNavigation : nsISupports
{
2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395
    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;
2396
    const UINT LOAD_FLAGS_ERROR_LOAD_CHANGES_RV   = 0x80000;
2397

2398 2399
    nsresult GetCanGoBack(bool *aCanGoBack);
    nsresult GetCanGoForward(bool *aCanGoForward);
2400 2401
    nsresult GoBack();
    nsresult GoForward();
2402 2403
    nsresult GotoIndex(int32_t index);
    nsresult LoadURI(const PRUnichar *aURI, uint32_t aLoadFlags, nsIURI *aReferrer,
2404
            nsIInputStream *aPostData, nsIInputStream *aHeaders);
2405
    nsresult LoadURIWithOptions(const PRUnichar *aURI, uint32_t aLoadFlags, nsIURI *aReferrer, uint32_t aReferrerPolicy,
2406
            nsIInputStream *aPostData, nsIInputStream *aHeaders, nsIURI *aBaseURI);
2407 2408
    nsresult Reload(uint32_t aReloadFlags);
    nsresult Stop(uint32_t aStopFlags);
2409 2410 2411 2412 2413 2414 2415
    nsresult GetDocument(nsIDOMDocument **aDocument);
    nsresult GetCurrentURI(nsIURI **aCurrentURI);
    nsresult GetReferringURI(nsIURI **aReferringURI);
    nsresult GetSessionHistory(nsISHistory **aSessionHistory);
    nsresult SetSessionHistory(nsISHistory *aSessionHistory);
}

2416 2417
[
    object,
2418
    uuid(c4d64640-b332-4db6-a2a5-e08566000dc9),
2419 2420 2421 2422
    local
]
interface nsIWebProgress : nsISupports
{
2423
    nsresult AddProgressListener(nsIWebProgressListener *aListener, uint32_t aNotifyMask);
2424
    nsresult RemoveProgressListener(nsIWebProgressListener *aListener);
2425
    nsresult GetDOMWindow(mozIDOMWindowProxy **aDOMWindow);
2426 2427
    nsresult GetDOMWindowID(uint64_t *aDOMWindowID);
    nsresult GetIsTopLevel(bool *aIsTopLevel);
2428
    nsresult GetIsLoadingDocument(bool *aIsLoadingDocument);
2429
    nsresult GetLoadType(uint32_t *aLoadType);
2430 2431
}

2432 2433
[
    object,
2434
    uuid(ecc5cbad-57fc-4731-b0bd-09e865bd62ad),
2435
    local
2436 2437 2438
]
interface nsIPrintSettings : nsISupports
{
2439
    typedef struct { char dummy; } nsIntMargin;
2440

2441 2442 2443
    nsresult SetPrintOptions(int32_t aType, bool aTurnOnOff);
    nsresult GetPrintOptions(int32_t aType, bool *_retval);
    nsresult GetPrintOptionsBits(int32_t *_retval);
2444
    nsresult SetPrintOptionsBits(int32_t bits);
2445
    nsresult GetEffectivePageSize(double *aWidth, double *aHeight);
2446 2447 2448 2449
    nsresult Clone(nsIPrintSettings **_retval);
    nsresult Assign(nsIPrintSettings *aPS);
    nsresult GetPrintSession(nsIPrintSession **aPrintSession);
    nsresult SetPrintSession(nsIPrintSession *aPrintSession);
2450 2451 2452 2453
    nsresult GetStartPageRange(int32_t *aStartPageRange);
    nsresult SetStartPageRange(int32_t aStartPageRange);
    nsresult GetEndPageRange(int32_t *aEndPageRange);
    nsresult SetEndPageRange(int32_t aEndPageRange);
2454 2455 2456 2457 2458 2459 2460 2461
    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);
2462 2463 2464 2465 2466 2467 2468 2469
    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);
2470 2471 2472 2473 2474 2475 2476 2477
    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);
2478 2479
    nsresult GetScaling(double *aScaling);
    nsresult SetScaling(double aScaling);
2480 2481 2482 2483
    nsresult GetPrintBGColors(bool *aPrintBGColors);
    nsresult SetPrintBGColors(bool aPrintBGColors);
    nsresult GetPrintBGImages(bool *aPrintBGImages);
    nsresult SetPrintBGImages(bool aPrintBGImages);
2484 2485
    nsresult GetPrintRange(int16_t *aPrintRange);
    nsresult SetPrintRange(int16_t aPrintRange);
2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501
    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);
2502 2503
    nsresult GetHowToEnableFrameUI(int16_t *aHowToEnableFrameUI);
    nsresult SetHowToEnableFrameUI(int16_t aHowToEnableFrameUI);
2504 2505
    nsresult GetIsCancelled(bool *aIsCancelled);
    nsresult SetIsCancelled(bool aIsCancelled);
2506 2507 2508 2509
    nsresult GetPrintFrameTypeUsage(int16_t *aPrintFrameTypeUsage);
    nsresult SetPrintFrameTypeUsage(int16_t aPrintFrameTypeUsage);
    nsresult GetPrintFrameType(int16_t *aPrintFrameType);
    nsresult SetPrintFrameType(int16_t aPrintFrameType);
2510 2511 2512 2513 2514 2515
    nsresult GetPrintSilent(bool *aPrintSilent);
    nsresult SetPrintSilent(bool aPrintSilent);
    nsresult GetShrinkToFit(bool *aShrinkToFit);
    nsresult SetShrinkToFit(bool aShrinkToFit);
    nsresult GetShowPrintProgress(bool *aShowPrintProgress);
    nsresult SetShowPrintProgress(bool aShowPrintProgress);
2516 2517
    nsresult GetPaperName(PRUnichar **aPaperName);
    nsresult SetPaperName(const PRUnichar *aPaperName);
2518 2519
    nsresult GetPaperData(int16_t *aPaperData);
    nsresult SetPaperData(int16_t aPaperData);
2520 2521 2522 2523
    nsresult GetPaperWidth(double *aPaperWidth);
    nsresult SetPaperWidth(double aPaperWidth);
    nsresult GetPaperHeight(double *aPaperHeight);
    nsresult SetPaperHeight(double aPaperHeight);
2524 2525
    nsresult GetPaperSizeUnit(int16_t *aPaperSizeUnit);
    nsresult SetPaperSizeUnit(int16_t aPaperSizeUnit);
2526 2527 2528 2529
    nsresult GetPrintReversed(bool *aPrintReversed);
    nsresult SetPrintReversed(bool aPrintReversed);
    nsresult GetPrintInColor(bool *aPrintInColor);
    nsresult SetPrintInColor(bool aPrintInColor);
2530 2531 2532 2533
    nsresult GetOrientation(int32_t *aOrientation);
    nsresult SetOrientation(int32_t aOrientation);
    nsresult GetNumCopies(int32_t *aNumCopies);
    nsresult SetNumCopies(int32_t aNumCopies);
2534 2535
    nsresult GetPrinterName(PRUnichar **aPrinterName);
    nsresult SetPrinterName(const PRUnichar *aPrinterName);
2536 2537
    nsresult GetPrintToFile(bool *aPrintToFile);
    nsresult SetPrintToFile(bool aPrintToFile);
2538 2539
    nsresult GetToFileName(PRUnichar **aToFileName);
    nsresult SetToFileName(const PRUnichar *aToFileName);
2540 2541 2542 2543
    nsresult GetOutputFormat(int16_t *aOutputFormat);
    nsresult SetOutputFormat(int16_t aOutputFormat);
    nsresult GetPrintPageDelay(int32_t *aPrintPageDelay);
    nsresult SetPrintPageDelay(int32_t aPrintPageDelay);
2544 2545 2546 2547
    nsresult GetResolution(int32_t *aResolution) = 0;
    nsresult SetResolution(int32_t aResolution) = 0;
    nsresult GetDuplex(int32_t *aDuplex);
    nsresult SetDuplex(int32_t aDuplex);
2548 2549 2550 2551
    nsresult GetIsInitializedFromPrinter(bool *aIsInitializedFromPrinter);
    nsresult SetIsInitializedFromPrinter(bool aIsInitializedFromPrinter);
    nsresult GetIsInitializedFromPrefs(bool *aIsInitializedFromPrefs);
    nsresult SetIsInitializedFromPrefs(bool aIsInitializedFromPrefs);
2552 2553
    nsresult GetPersistMarginBoxSettings(bool *aPersistMarginBoxSettings);
    nsresult SetPersistMarginBoxSettings(bool aPersistMarginBoxSettings);
2554 2555 2556 2557
    nsresult SetMarginInTwips(nsIntMargin *aMargin);
    nsresult SetEdgeInTwips(nsIntMargin *aEdge);
    nsresult GetMarginInTwips(nsIntMargin *aMargin);
    nsresult GetEdgeInTwips(nsIntMargin *aEdge);
2558
    nsresult SetupSilentPrinting();
2559 2560
    nsresult SetUnwriteableMarginInTwips(nsIntMargin *aEdge);
    nsresult GetUnwriteableMarginInTwips(nsIntMargin *aEdge);
2561
    nsresult GetPageRanges(void * /*nsTArray<int32_t>*/ aPages);
2562 2563 2564 2565
}

[
    object,
2566
    uuid(c9a934ed-fff1-4971-bfba-6c25ad70e1e6),
2567
    local
2568 2569 2570 2571 2572
]
interface nsIWebBrowserPrint : nsISupports
{
    nsresult GetGlobalPrintSettings(nsIPrintSettings **aGlobalPrintSettings);
    nsresult GetCurrentPrintSettings(nsIPrintSettings **aCurrentPrintSettings);
2573
    nsresult GetCurrentChildDOMWindow(mozIDOMWindowProxy **aCurrentChildDOMWindow);
2574 2575 2576 2577 2578 2579
    nsresult GetDoingPrint(bool *aDoingPrint);
    nsresult GetDoingPrintPreview(bool *aDoingPrintPreview);
    nsresult GetIsFramesetDocument(bool *aIsFramesetDocument);
    nsresult GetIsFramesetFrameSelected(bool *aIsFramesetFrameSelected);
    nsresult GetIsIFrameSelected(bool *aIsIFrameSelected);
    nsresult GetIsRangeSelection(bool *aIsRangeSelection);
2580
    nsresult GetPrintPreviewNumPages(int32_t *aPrintPreviewNumPages);
2581
    nsresult Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener);
2582
    nsresult PrintPreview(nsIPrintSettings *aThePrintSettings, mozIDOMWindowProxy *aChildDOMWin,
2583
                          nsIWebProgressListener *aWPListener);
2584
    nsresult PrintPreviewNavigate(int16_t aNavType, int32_t aPageNum);
2585
    nsresult Cancel();
2586
    nsresult EnumerateDocumentNames(uint32_t *aCount, PRUnichar ***aResult);
2587 2588 2589
    nsresult ExitPrintPreview();
}

2590 2591
[
    object,
2592
    uuid(3507fc93-313e-4a4c-8ca8-4d0ea0f97315),
2593
    local
2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607
]
interface nsIScrollable : nsISupports
{
    enum {
        ScrollOrientation_X = 1,
        ScrollOrientation_Y = 2
    };

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

2608
    nsresult GetDefaultScrollbarPreferences(int32_t scrollOrientation, int32_t *_retval);
2609
    nsresult SetDefaultScrollbarPreferences(int32_t scrollOrientation, int32_t scrollbarPref);
2610
    nsresult GetScrollbarVisibility(bool *verticalVisible, bool *horizontalVisible);
2611 2612
}

2613 2614
[
    object,
2615
    uuid(2fa6884a-ae65-412a-9d4c-ce6e34544ba1),
2616
    local
2617 2618 2619
]
interface nsIFile : nsISupports
{
2620 2621 2622 2623 2624 2625
    typedef struct {
        /* Currently not needed */
        char dummy;
    } PRFileDesc, PRLibrary, widl_FILE;
#define FILE widl_FILE

2626 2627 2628
    nsresult Append(const nsAString *node);
    nsresult AppendNative(const nsAString *node);
    nsresult Normalize();
2629
    nsresult Create(uint32_t type, uint32_t permission);
2630 2631 2632 2633 2634 2635 2636 2637 2638 2639
    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);
2640
    nsresult RenameTo(nsIFile *newParentDir, const nsAString *newName);
2641
    nsresult RenameToNative(nsIFile *newParentDir, const nsACString *newName);
2642
    nsresult Remove(bool recursive);
2643 2644 2645 2646
    nsresult GetPermissions(uint32_t *aPermissions);
    nsresult SetPermissions(uint32_t pPermissions);
    nsresult GetPermissionsOfLink(uint32_t *aPermissions);
    nsresult SetPermissionsOfLink(uint32_t pPermissions);
2647 2648 2649 2650
    nsresult GetLastModifiedTime(PRTime *aLastModifiedTime);
    nsresult SetLastModifiedTime(PRTime aLastModifiedTime);
    nsresult GetLastModifiedTimeOfLink(PRTime *aLastModifiedTimeOfLink);
    nsresult SetLastModifiedTimeOfLink(PRTime aLastModifiedTimeOfLink);
2651 2652 2653
    nsresult GetFileSize(int64_t *aFileSize);
    nsresult SetFileSize(int64_t aFileSize);
    nsresult GetFileSizeOfLink(int64_t *aFileSizeOfLink);
2654 2655 2656 2657
    nsresult GetTarget(nsAString *aTarget);
    nsresult GetNativeTarget(nsACString *aNativeTarget);
    nsresult GetPath(nsAString *aPath);
    nsresult GetNativePath(nsACString *aNativePath);
2658 2659 2660 2661 2662 2663 2664 2665 2666
    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);
2667
    nsresult CreateUnique(uint32_t type, uint32_t permission);
2668
    nsresult Clone(nsIFile **_retval);
2669
    nsresult Equals(nsIFile *inFile, bool *_retval);
2670
    nsresult Contains(nsIFile *inFile, bool *_retval);
2671 2672
    nsresult GetParent(nsIFile **aParent);
    nsresult GetDirectoryEntries(nsISimpleEnumerator **aDirectoryEntries);
2673 2674 2675 2676 2677
    nsresult InitWithPath(const nsAString *filePath);
    nsresult InitWithNativePath(const nsACString *filePath);
    nsresult InitWithFile(nsIFile *aFile);
    nsresult GetFollowLinks(bool *aFollowLinks);
    nsresult SetFollowLinks(bool aFollowLinks);
2678
    nsresult OpenNSPRFileDesc(int32_t flags, int32_t mode, PRFileDesc **_retval);
2679 2680
    nsresult OpenANSIFileDesc(const char *mode, FILE **_retval);
    nsresult Load(PRLibrary **_retval);
2681
    nsresult GetDiskSpaceAvailable(int64_t *aDiskSpaceAvailable);
2682 2683 2684 2685 2686 2687 2688 2689
    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);
2690 2691
    nsresult GetRelativePath(nsIFile *fromFile, nsACString *_retval);
    nsresult SetRelativePath(nsIFile *fromFile, const nsACString *relativeDesc);
2692
}
2693

2694 2695
[
    object,
2696
    uuid(d604ffc3-1ba3-4f6c-b65f-1ed4199364c3),
2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708
    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);
2709
    nsresult GetManifestLocations(nsIArray **_retval);
2710 2711
}

2712 2713
[
    object,
2714
    uuid(55d25e49-793f-4727-a69f-de8b15f4b985),
2715
    local
2716 2717 2718 2719
]
interface nsIPrefBranch : nsISupports
{
    nsresult GetRoot(char **aRoot);
2720
    nsresult GetPrefType(const char *aPrefName, int32_t *_retval);
2721 2722
    nsresult GetBoolPref(const char *aPrefName, bool *_retval);
    nsresult SetBoolPref(const char *aPrefName, bool aValue);
2723
    nsresult GetFloatPref(const char *aPrefName, float *_retval);
2724 2725
    nsresult GetCharPref(const char *aPrefName, char **_retval);
    nsresult SetCharPref(const char *aPrefName, const char *aValue);
2726 2727
    nsresult GetIntPref(const char *aPrefName, int32_t *_retval);
    nsresult SetIntPref(const char *aPrefName, int32_t aValue);
2728 2729 2730 2731
    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);
2732 2733
    nsresult PrefHasUserValue(const char *aPrefName, bool *_retval);
    nsresult PrefIsLocked(const char *aPrefName, bool *_retval);
2734 2735
    nsresult UnlockPref(const char *aPrefName);
    nsresult DeleteBranch(const char *aStartingAt);
2736
    nsresult GetChildList(const char *aStartingAt, uint32_t *aCount, char ***aChildArray);
2737
    nsresult ResetBranch(const char *aStartingAt);
2738 2739
    nsresult AddObserver(const char *aDomain, nsIObserver *aObserver, bool aHoldWeak);
    nsresult RemoveObserver(const char *aDomain, nsIObserver *aObserver);
2740 2741
}

2742 2743 2744 2745 2746 2747 2748
[
    object,
    uuid(bbf8cab0-d43a-11d3-8cc2-00609792278c),
    local
]
interface nsIDirectoryServiceProvider : nsISupports
{
2749
    nsresult GetFile(const char *prop, bool *persistent, nsIFile **_retval);
2750 2751
}

2752 2753 2754 2755 2756 2757 2758 2759 2760 2761
[
    object,
    uuid(2f977d4b-5485-11d4-87e2-0010a4e75ef2),
    local
]
interface nsIDirectoryServiceProvider2 : nsIDirectoryServiceProvider
{
    nsresult GetFiles(const char *prop, nsISimpleEnumerator **_retval);
}

2762 2763
[
    object,
2764
    uuid(a87210e6-7c8c-41f7-864d-df809015193e),
2765
    local
2766 2767 2768
]
interface nsIProtocolHandler : nsISupports
{
2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788
    const unsigned long URI_STD = 0;
    const unsigned long URI_NORELATIVE = (1<<0);
    const unsigned long URI_NOAUTH = (1<<1);
    const unsigned long ALLOWS_PROXY = (1<<2);
    const unsigned long ALLOWS_PROXY_HTTP = (1<<3);
    const unsigned long URI_INHERITS_SECURITY_CONTEXT = (1<<4);
    const unsigned long URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT = (1<<5);
    const unsigned long URI_LOADABLE_BY_ANYONE = (1<<6);
    const unsigned long URI_DANGEROUS_TO_LOAD = (1<<7);
    const unsigned long URI_IS_UI_RESOURCE = (1<<8);
    const unsigned long URI_IS_LOCAL_FILE = (1<<9);
    const unsigned long URI_LOADABLE_BY_SUBSUMERS = (1<<10);
    const unsigned long URI_DOES_NOT_RETURN_DATA = (1<<11);
    const unsigned long URI_IS_LOCAL_RESOURCE = (1<<12);
    const unsigned long URI_OPENING_EXECUTES_SCRIPT = (1<<13);
    const unsigned long URI_NON_PERSISTABLE = (1<<14);
    const unsigned long URI_FORBIDS_COOKIE_ACCESS = (1<<15);
    const unsigned long URI_CROSS_ORIGIN_NEEDS_WEBAPPS_PERM = (1<<16);
    const unsigned long URI_SYNC_LOAD_IS_OK = (1<<17);
    const unsigned long URI_SAFE_TO_LOAD_IN_SECURE_CONTEXT = (1<<18);
2789
    const unsigned long URI_FETCHABLE_BY_ANYONE = (1 << 19);
2790

2791
    nsresult GetScheme(nsACString *aScheme);
2792 2793
    nsresult GetDefaultPort(int32_t *aDefaultPort);
    nsresult GetProtocolFlags(uint32_t *aProtocolFlags);
2794 2795
    nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset,
                    nsIURI *aBaseURI, nsIURI **_retval);
2796
    nsresult NewChannel2(nsIURI *aURI, nsILoadInfo *aLoadinfo, nsIChannel **_retval);
2797
    nsresult NewChannel(nsIURI *aURI, nsIChannel **_retval);
2798
    nsresult AllowPort(int32_t port, const char *scheme, bool *_retval);
2799 2800 2801 2802
}

[
    object,
2803 2804
    uuid(0e61f3b2-34d7-4c79-bfdc-4860bc7341b7),
    local
2805 2806 2807
]
interface nsIExternalProtocolHandler : nsIProtocolHandler
{
2808
    nsresult ExternalAppExistsForScheme(const nsACString *scheme, bool *_retval);
2809 2810
}

2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824
[
    object,
    uuid(d13c21ca-7329-45a5-8912-9d2e2fef1231),
    local
]
interface nsIIOServiceHook : nsISupports
{
    nsresult NewChannel(nsIURI *aURI, nsILoadInfo *aLoadInfo, nsIChannel **_retval);
    nsresult GetProtocolHandler(nsIProtocolHandler *aHandler, nsIProtocolHandler **_retval);
    nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI, nsIURI **_retval);
    nsresult ProtocolHasFlags(nsIURI *aURI, uint32_t aFlag, bool *_retval);
    nsresult URIChainHasFlags(nsIURI *aURI, uint32_t aFlags, bool *_retval);
}

2825 2826
[
    object,
2827
    uuid(4286de5a-b2ea-446f-8f70-e2a461f42694),
2828
    local
2829 2830 2831 2832
]
interface nsIIOService : nsISupports
{
    nsresult GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval);
2833
    nsresult GetProtocolFlags(const char *aScheme, uint32_t *_retval);
2834 2835
    nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
                    nsIURI **_retval);
2836
    nsresult NewFileURI(nsIFile *aFile, nsIURI **_retval);
2837 2838 2839
    nsresult NewChannelFromURI2(nsIURI *aURI, nsIDOMNode *aLoadingNode, nsIPrincipal *aLoadingPrincipal,
            nsIPrincipal *aTriggeringPrincipal, uint32_t aSecurityFlags, uint32_t aContentPolicyType,
            nsIChannel **_retval);
2840
    nsresult NewChannelFromURIWithLoadInfo(nsIURI *aURI, nsILoadInfo *aLoadInfo, nsIChannel **_retval);
2841
    nsresult NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval);
2842 2843 2844
    nsresult NewChannel2(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
            nsIDOMNode *aLoadingNode, nsIPrincipal *aLoadingPrincipal, nsIPrincipal *aTriggeringPrincipal,
            uint32_t aSecurityFlags, uint32_t aContentPolicyType, nsIChannel **_retval);
2845 2846
    nsresult NewChannel(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
                        nsIChannel **_retval);
2847 2848
    nsresult GetOffline(bool *aOffline);
    nsresult SetOffline(bool aOffline);
2849
    nsresult GetConnectivity(bool *aConnectivity);
2850 2851 2852
    nsresult SetAppOffline(uint32_t appId, int32_t state);
    nsresult IsAppOffline(uint32_t appId, bool *_retval);
    nsresult GetAppOfflineState(uint32_t appId, int32_t *_retval);
2853
    nsresult AllowPort(int32_t aPort, const char *aScheme, bool *_retval);
2854
    nsresult ExtractScheme(const nsACString *urlString, nsACString *_retval);
2855
    nsresult SetHook(nsIIOServiceHook *aHook);
2856 2857
}

2858 2859
[
    object,
2860
    uuid(7f8c754e-5b36-44be-bc96-191b49f08ea6),
2861
    local
2862 2863 2864 2865 2866 2867 2868
]
interface nsIWebBrowserFocus : nsISupports
{
    nsresult Activate();
    nsresult Deactivate();
    nsresult SetFocusAtFirstElement();
    nsresult SetFocusAtLastElement();
2869 2870
    nsresult GetFocusedWindow(mozIDOMWindowProxy **aFocusedWindow);
    nsresult SetFocusedWindow(mozIDOMWindowProxy *aFocusedWindow);
2871 2872 2873 2874
    nsresult GetFocusedElement(nsIDOMElement **aFocusedElement);
    nsresult SetFocusedElement(nsIDOMElement *aFocusedElement);
}

2875 2876
[
    object,
2877
    uuid(e8c414c4-dc38-4ba3-ab4e-ec4cbbe22907),
2878
    local
2879 2880 2881
]
interface nsIWebBrowserChrome : nsISupports
{
2882
    nsresult SetStatus(uint32_t statusType, const PRUnichar *status);
2883 2884
    nsresult GetWebBrowser(nsIWebBrowser **aWebBrowser);
    nsresult SetWebBrowser(nsIWebBrowser *aWebBrowser);
2885 2886
    nsresult GetChromeFlags(uint32_t *aChromeFlags);
    nsresult SetChromeFlags(uint32_t aChromeFlags);
2887
    nsresult DestroyBrowserWindow();
2888
    nsresult SizeBrowserTo(int32_t aCX, int32_t aCY);
2889
    nsresult ShowAsModal();
2890
    nsresult IsWindowModal(bool *_retval);
2891 2892 2893
    nsresult ExitModalEventLoop(nsresult aStatus);
}

2894 2895
[
    object,
2896 2897
    uuid(df31c120-ded6-11d1-bd85-00805f8ae3f4),
    local
2898 2899 2900 2901 2902 2903 2904 2905
]
interface nsIDOMEventListener : nsISupports
{
    nsresult HandleEvent(nsIDOMEvent *event);
}

[
    object,
2906
    uuid(9a78ac3c-9507-4d00-b2d6-10b508d2ec31),
2907
    local
2908 2909 2910
]
interface nsIDOMEventTarget : nsISupports
{
2911 2912
    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);
2913 2914 2915
    nsresult RemoveEventListener(const nsAString *type, nsIDOMEventListener *listener, bool useCapture);
    nsresult RemoveSystemEventListener(const nsAString *type, nsIDOMEventListener *listener, bool aUseCapture);
    nsresult DispatchEvent(nsIDOMEvent *evt, bool *_retval);
2916 2917

    /* Followed by methods we should try to avoid using */
2918 2919
}

2920 2921
[
    object,
2922
    uuid(f58daacf-4d1a-4002-8fd7-06b614dfbcf6),
2923
    local
2924 2925 2926 2927 2928 2929
]
interface nsIDOMEvent : nsISupports
{
    nsresult GetType(nsAString *aType);
    nsresult GetTarget(nsIDOMEventTarget **aTarget);
    nsresult GetCurrentTarget(nsIDOMEventTarget **aCurrentTarget);
2930
    nsresult GetEventPhase(uint16_t *aEventPhase);
2931 2932
    nsresult GetBubbles(bool *aBubbles);
    nsresult GetCancelable(bool *aCancelable);
2933 2934 2935
    nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp);
    nsresult StopPropagation();
    nsresult PreventDefault();
2936
    void /* thiscall */ InitEvent(const nsAString *eventTypeArg, bool canBubbleArg, bool cancelableArg);
2937
    nsresult GetDefaultPrevented(bool *aDefaultPrevented);
2938
    nsresult StopImmediatePropagation();
2939 2940 2941 2942
    nsresult GetOriginalTarget(nsIDOMEventTarget **aOriginalTarget);
    nsresult GetExplicitOriginalTarget(nsIDOMEventTarget * *aExplicitOriginalTarget);
    nsresult GetPreventDefault(bool *_retval);
    nsresult GetIsTrusted(bool *aIsTrusted);
2943 2944 2945
    nsresult DuplicatePrivateData();
    nsresult SetTarget(nsIDOMEventTarget *aTarget);
    bool IsDispatchStopped();
2946
    /*WidgedEvent*/ void *WidgetEventPtr();
2947
    void SetTrusted(bool aTrusted);
2948 2949
    void Serialize(/*IPC::Message*/ void *aMsg, bool aSerializeInterfaceType);
    bool Deserialize(const /*IPC::Message*/ void *aMsg, void **aIter);
2950 2951
    void SetOwner(void /*mozilla::dom::EventTarget*/ *aOwner);
    void /*nsDOMEvent*/ *InternalDOMEvent();
2952
    nsresult StopCrossProcessForwarding();
2953 2954
}

2955 2956
[
    object,
2957
    uuid(46b44e33-13c2-4eb3-bf80-76a4e0857ccc),
2958 2959 2960 2961
    local
]
interface nsIDOMWindowUtils : nsISupports
{
2962 2963
    nsresult GetImageAnimationMode(uint16_t *aImageAnimationMode);
    nsresult SetImageAnimationMode(uint16_t aImageAnimationMode);
2964
    nsresult GetDocCharsetIsForced(bool *aDocCharsetIsForced);
2965
    nsresult GetCursorType(int16_t *_retval);
2966
    nsresult GetDocumentMetadata(const nsAString *aName, nsAString *_retval);
2967
    nsresult Redraw(uint32_t aCount, uint32_t *_retval);
2968
    nsresult UpdateLayerTree();
2969
    nsresult GetViewportInfo(uint32_t aDisplayWidth, uint32_t aDisplayHeight, double *aDefaultZoom, bool *aAllowZoom,
2970 2971 2972 2973
            double *aMinZoom, double *aMaxZoom, uint32_t *aWidth, uint32_t *aHeight, bool *aAutoSize);
    nsresult SetDisplayPortForElement(float aXPx, float aYPx, float aWidthPx, float aHeightPx,
            nsIDOMElement *aElement, uint32_t aPriority);
    nsresult SetDisplayPortMarginsForElement(float aLeftMargin, float aTopMargin, float aRightMargin, float aBottomMargin,
2974
            nsIDOMElement *aElement, uint32_t aPriority);
2975
    nsresult SetDisplayPortBaseForElement(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight, nsIDOMElement *aElement);
2976 2977 2978
    nsresult SetResolution(float aResolution);
    nsresult GetResolution(float *aResolution);
    nsresult SetResolutionAndScaleTo(float aResolution);
2979
    nsresult GetIsResolutionSet(bool *aIsResolutionSet);
2980 2981
    nsresult GetIsFirstPaint(bool *aIsFirstPaint);
    nsresult SetIsFirstPaint(bool aIsFirstPaint);
2982
    nsresult GetPresShellId(uint32_t *aPresShellId);
2983
    nsresult SendMouseEvent(const nsAString *aType, float aX, float aY, int32_t aButton, int32_t aClickCount,
2984 2985 2986 2987 2988 2989
            int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg, bool aIsSynthesized,
            uint8_t _argc, bool *_retval);
    nsresult SendPointerEvent(const nsAString *aType, float aX, float aY, int32_t aButton, int32_t aClickCount,
            int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg, int32_t aPointerId,
            int32_t aWidth, int32_t aHeight, int32_t tiltX, int32_t tiltY, bool aIsPrimary, bool aIsSynthesized,
            uint8_t _argc, bool *_retval);
2990
    nsresult SendTouchEvent(const nsAString *aType, uint32_t *aIdentifiers, int32_t *aXs, int32_t *aYs,
2991 2992
            uint32_t *aRxs, uint32_t *aRys, float *aRotationAngles, float *aForces, uint32_t count, int32_t aModifiers,
            bool aIgnoreRootScrollFrame, bool *_retval);
2993
    nsresult SendMouseEventToWindow(const nsAString *aType, float aX, float aY, int32_t aButton, int32_t aClickCount,
2994 2995 2996 2997 2998 2999 3000 3001
            int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg, bool aIsSynthesized,
            uint8_t _argc);
    nsresult SendPointerEventToWindow(const nsAString *aType, float aX, float aY, int32_t aButton, int32_t aClickCount,
            int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg, int32_t aPointerId,
            int32_t aWidth, int32_t aHeight, int32_t aTiltX, int32_t aTiltY, bool aIsPrimary, bool aIsSynthesized, uint8_t _argc);
    nsresult SendTouchEventToWindow(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,
            bool aIgnoreRootScrollFrame, bool *_retval);
3002 3003
    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);
3004 3005 3006
    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,
3007
           const nsAString *aCharacters, const nsAString *aUnmodifiedCharacters, nsIObserver *aObserver);
3008
    nsresult SendNativeMouseEvent(int32_t aScreenX, int32_t aScreenY, int32_t aNativeMessage, int32_t aModifierFlags,
3009
           nsIDOMElement *aElement, nsIObserver *aObserver);
3010
    nsresult SendNativeMouseMove(int32_t aScreenX, int32_t aScreenY, nsIDOMElement *aElement, nsIObserver *aObserver);
3011
    nsresult SendNativeMouseScrollEvent(int32_t aScreenX, int32_t aScreenY, uint32_t aNativeMessage, double aDeltaX,
3012 3013
           double aDeltaY, double aDeltaZ, uint32_t aModifierFlags, uint32_t aAdditionalFlags, nsIDOMElement *aElement,
           nsIObserver *aObserver);
3014
    nsresult SendNativeTouchPoint(uint32_t aPointerId, uint32_t aTouchState, int32_t aScreenX, int32_t aScreenY,
3015 3016 3017
           double aPressure, uint32_t aOrientation, nsIObserver *aObserver);
    nsresult SendNativeTouchTap(int32_t aScreenX, int32_t aScreenY, bool aLongTap, nsIObserver *aObserver);
    nsresult ClearNativeTouchSequence(nsIObserver *aObserver);
3018 3019 3020
    nsresult ActivateNativeMenuItemAt(const nsAString *indexString);
    nsresult ForceUpdateNativeMenuAt(const nsAString *indexString);
    nsresult Focus(nsIDOMElement *aElement);
3021 3022
    nsresult GarbageCollect(nsICycleCollectorListener *aListener, int32_t aExtraForgetSkippableCalls);
    nsresult CycleCollect(nsICycleCollectorListener *aListener, int32_t aExtraForgetSkippableCalls);
3023
    nsresult RunNextCollectorTimer();
3024 3025
    nsresult SendSimpleGestureEvent(const nsAString *aType, float aX, float aY, uint32_t aDirection, double aDelta,
           int32_t aModifiers, uint32_t aClickCount);
3026 3027 3028
    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);
3029
    nsresult GetTranslationNodes(nsIDOMNode *aRoot, int /*nsITranslationNodeList*/ **_retval);
3030
    nsresult CompareCanvases(nsIDOMHTMLCanvasElement *aCanvas1, nsIDOMHTMLCanvasElement *aCanvas2,
3031
           uint32_t *aMaxDifference, uint32_t *_retval);
3032 3033 3034 3035
    nsresult GetIsMozAfterPaintPending(bool *aIsMozAfterPaintPending);
    nsresult SuppressEventHandling(bool aSuppress);
    nsresult ClearMozAfterPaintEvents();
    nsresult DisableNonTestMouseEvents(bool aDisable);
3036
    nsresult GetScrollXY(bool aFlushLayout, int32_t *aScrollX, int32_t *aScrollY);
3037
    nsresult GetScrollXYFloat(bool aFlushLayout, float *aScrollX, float *aScrollY);
3038 3039
    nsresult GetScrollbarSize(bool aFlushLayout, int32_t *aWidth, int32_t *aHeight);
    nsresult GetBoundsWithoutFlushing(nsIDOMElement *aElement, nsIDOMClientRect **_retval);
3040
    nsresult GetRootBounds(nsIDOMClientRect **_retval);
3041
    nsresult GetIMEIsOpen(bool *aIMEIsOpen);
3042
    nsresult GetIMEStatus(uint32_t *aIMEStatus);
3043
    nsresult GetScreenPixelsPerCSSPixel(float *aScreenPixelsPerCSSPixel);
3044
    nsresult GetFullZoom(float *aFullZoom);
3045
    nsresult DispatchDOMEventViaPresShell(nsIDOMNode *aTarget, nsIDOMEvent *aEvent, bool aTrusted, bool *_retval);
3046
    nsresult DispatchEventToChromeOnly(nsIDOMEventTarget *aTarget, nsIDOMEvent *aEvent, bool *_retval);
3047
    nsresult GetClassName(const /*JS::Value*/ void *aObject, JSContext *cx, char **_retval);
3048
    nsresult SendContentCommandEvent(const nsAString *aType, nsITransferable *aTransferable);
3049
    nsresult SendQueryContentEvent(uint32_t aType, uint32_t aOffset, uint32_t aLength, int32_t aX, int32_t aY,
3050
            uint32_t aAdditionalFlags, nsIQueryContentEventResult **_retval);
3051
    nsresult RemoteFrameFullscreenChanged(nsIDOMElement *aFrameElement);
3052
    nsresult RemoteFrameFullscreenReverted();
3053
    nsresult HandleFullscreenRequests(bool *_retval);
3054
    nsresult ExitFullscreen();
3055
    nsresult SendSelectionSetEvent(uint32_t aOffset, uint32_t aLength, uint32_t aAdditionalFlags, bool *_retval);
3056
    nsresult SelectAtPoint(float aX, float aY, uint32_t aSelectBehavior, bool *_retval);
3057 3058
    nsresult GetVisitedDependentComputedStyle(nsIDOMElement *aElement, const nsAString *aPseudoElement,
           const nsAString *aPropertyName, nsAString *_retval);
3059 3060
    nsresult GetOuterWindowID(uint64_t *aOuterWindowID);
    nsresult GetCurrentInnerWindowID(uint64_t *aCurrentInnerWindowID);
3061 3062 3063
    nsresult EnterModalState();
    nsresult LeaveModalState();
    nsresult IsInModalState(bool *_retval);
3064
    nsresult SetDesktopModeViewport(bool aDesktopModeViewport);
3065 3066 3067
    nsresult SuspendTimeouts();
    nsresult ResumeTimeouts();
    nsresult GetLayerManagerType(nsAString *aLayerManagerType);
3068
    nsresult GetLayerManagerRemote(bool *aLayerManagerRemote);
3069
    nsresult GetSupportsHardwareH264Decoding(void /* JS::MutableHandleValue */ *aSupportsHardwareH264Decoding);
3070
    nsresult StartFrameTimeRecording(uint32_t *startIndex);
3071
    nsresult StopFrameTimeRecording(uint32_t startIndex, uint32_t *frameCount, float **frameIntervals);
3072
    nsresult BeginTabSwitch();
3073
    nsresult GetDisplayDPI(float *aDisplayDPI);
3074
    nsresult GetOuterWindowWithId(uint64_t aOuterWindowID, nsIDOMWindow **_retval);
3075
    nsresult GetContainerElement(nsIDOMElement **aContainerElement);
3076
    nsresult RenderDocument(const void /*nsRect*/ *aRect, uint32_t aFlags, int /*nscolor*/ aBackgroundColor,
3077
           void /*gfxContext*/ *aThebesContext);
3078
    nsresult AdvanceTimeAndRefresh(int64_t aMilliseconds);
3079
    nsresult RestoreNormalRefresh();
3080
    nsresult GetIsTestControllingRefreshes(bool *aIsTestControllingRefreshes);
3081
    nsresult GetAsyncPanZoomEnabled(bool *aAsyncPanZoomEnabled);
3082
    nsresult SetAsyncScrollOffset(nsIDOMNode *aNode, float aX, float aY);
3083 3084
    nsresult SetAsyncZoom(nsIDOMNode *aRootElement, float aValue);
    nsresult FlushApzRepaints(bool *_retval);
3085
    nsresult ZoomToFocusedInput();
3086 3087
    nsresult ComputeAnimationDistance(nsIDOMElement *element, const nsAString *property, const nsAString *value1,
           const nsAString *value2, double *_retval);
3088
    nsresult WrapDOMFile(nsIFile *aFile, nsISupports **_retval);
3089
    nsresult GetFocusedInputType(char **aFocusedInputType);
3090
    nsresult GetViewId(nsIDOMElement *aElement, long /*nsViewID*/ *_retval);
3091 3092
    nsresult LeafLayersPartitionWindow(bool *_retval);
    nsresult CheckAndClearPaintedState(nsIDOMElement *aElement, bool *_retval);
3093 3094
    nsresult IsPartOfOpaqueLayer(nsIDOMElement *aElement, bool *_retval);
    nsresult NumberOfAssignedPaintedLayers(nsIDOMElement **aElements, uint32_t count, uint32_t *_retval);
3095
    nsresult GetFileId(const /*JS::Value*/ void *aFile, JSContext *cx, int64_t *_retval);
3096
    nsresult GetFilePath(void /*JS::HandleValue*/ *aFile, JSContext *cx, nsAString *_retval);
3097 3098
    nsresult GetFileReferences(const nsAString *aDatabaseName, int64_t aId, void /*JS::HandleValue*/ *aOptions,
           int32_t *aRefCnt, int32_t *aDBRefCnt, int32_t *aSliceRefCnt, JSContext* cx, bool *_retval);
3099
    nsresult FlushPendingFileDeletions();
3100 3101 3102 3103
    nsresult IsIncrementalGCEnabled(JSContext *cx, bool *_retval);
    nsresult StartPCCountProfiling(JSContext *cx);
    nsresult StopPCCountProfiling(JSContext *cx);
    nsresult PurgePCCounts(JSContext *cx);
3104 3105 3106
    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);
3107
    nsresult GetPaintingSuppressed(bool *aPaintingSuppressed);
3108 3109
    nsresult GetPlugins(JSContext *cx, /*JS::Value*/ void *aPlugins);
    nsresult SetScrollPositionClampingScrollPortSize(float aWidth, float aHeight);
3110 3111 3112
    nsresult DisableDialogs();
    nsresult EnableDialogs();
    nsresult AreDialogsEnabled(bool *_retval);
3113
    nsresult LoadSheet(nsIURI *sheetURI, uint32_t type);
3114
    nsresult LoadSheetUsingURIString(const nsACString *sheetURI, uint32_t type);
3115
    nsresult AddSheet(nsIDOMStyleSheet *sheet, uint32_t type);
3116
    nsresult RemoveSheet(nsIURI *sheetURI, uint32_t type);
3117
    nsresult  RemoveSheetUsingURIString(const nsACString *sheetURI, uint32_t type);
3118 3119
    nsresult GetIsHandlingUserInput(bool *aIsHandlingUserInput);
    nsresult AllowScriptsToClose();
3120
    nsresult GetIsParentWindowMainWidgetVisible(bool *aIsParentWindowMainWidgetVisible);
3121
    nsresult IsNodeDisabledForEvents(nsIDOMNode *aNode, bool *_retval);
3122 3123
    nsresult GetPaintFlashing(bool *aPaintFlashing);
    nsresult SetPaintFlashing(bool aPaintFlashing);
3124 3125
    nsresult GetOMTAStyle(nsIDOMElement *aElement, const nsAString *aProperty,
            const nsAString *aPseudoElement, nsAString *_retval);
3126
    nsresult RequestCompositorProperty(const nsAString *aProperty, float *_retval);
3127 3128 3129
    nsresult SetHandlingUserInput(bool aHandlingInput, void /*nsIJSRAIIHelper*/ **_retval);
    nsresult GetContentAPZTestData(JSContext *cx, int /*JS::MutableHandleValue*/ _retval);
    nsresult GetCompositorAPZTestData(JSContext *cx, void /*JS::MutableHandleValue*/ *_retval);
3130
    nsresult PostRestyleSelfEvent(nsIDOMElement *aElement);
3131 3132 3133 3134 3135 3136
    nsresult GetAudioMuted(bool *aAudioMuted) ;
    nsresult SetAudioMuted(bool aAudioMuted);
    nsresult GetAudioVolume(float *aAudioVolume);
    nsresult SetAudioVolume(float aAudioVolume);
    nsresult XpconnectArgument(nsIDOMWindowUtils *aThis);
    nsresult AskPermission(void /*nsIContentPermissionRequest*/ *aRequest);
3137 3138 3139 3140 3141
    nsresult GetFramesConstructed(uint64_t *aFramesConstructed);
    nsresult GetFramesReflowed(uint64_t *aFramesReflowed);
    nsresult SetChromeMargin(int32_t aTop, int32_t aRight, int32_t aBottom, int32_t aLeft);
    nsresult GetServiceWorkersTestingEnabled(bool *aServiceWorkersTestingEnabled);
    nsresult SetServiceWorkersTestingEnabled(bool aServiceWorkersTestingEnabled);
3142 3143 3144 3145 3146 3147
    nsresult GetFrameUniformityTestData(JSContext* cx, int /*JS::MutableHandleValue*/  *_retval);
    nsresult EnterChaosMode();
    nsresult LeaveChaosMode();
    nsresult HasRuleProcessorUsedByMultipleStyleSets(uint32_t aSheetType, bool *_retval);
    nsresult ForceUseCounterFlush(nsIDOMNode *aNode);
    nsresult SetNextPaintSyncId(int32_t aSyncId);
3148 3149
}

3150 3151 3152 3153 3154 3155 3156
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")
3157 3158 3159

[
    object,
3160 3161
    uuid(3478b6b0-3875-11d4-94ef-0020183bf181),
    local
3162 3163 3164
]
interface nsIContextMenuListener : nsISupports
{
3165
    nsresult OnShowContextMenu(uint32_t aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode);
3166 3167 3168 3169
}

[
    object,
3170
    uuid(85ae52eb-37fa-4fd9-a2e6-c7d0f2a521b3),
3171
    local
3172
]
3173
interface nsIDOMUIEvent : nsISupports
3174
{
3175
    nsresult GetView(mozIDOMWindowProxy **aView);
3176
    nsresult GetDetail(int32_t *aDetail);
3177
    nsresult InitUIEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
3178
            mozIDOMWindowProxy *viewArg, int32_t detailArg);
3179 3180 3181 3182 3183
    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);
3184
    nsresult GetRangeParent(nsIDOMNode **aRangeParent);
3185
    nsresult GetRangeOffset(int32_t *aRangeOffset);
3186 3187 3188
    nsresult GetCancelBubble(bool *aCancelBubble);
    nsresult SetCancelBubble(bool aCancelBubble);
    nsresult GetIsChar(bool *aIsChar);
3189
    void* /* mozilla::dom::Event thiscall */ AsEvent();
3190 3191 3192 3193
}

[
    object,
3194
    uuid(5bdab8d8-7933-4c5c-b6d1-ab34481237f7),
3195
    local
3196 3197 3198
]
interface nsIDOMMouseEvent : nsIDOMUIEvent
{
3199 3200 3201 3202 3203 3204
    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);
3205 3206 3207 3208
    nsresult GetCtrlKey(bool *aCtrlKey);
    nsresult GetShiftKey(bool *aShiftKey);
    nsresult GetAltKey(bool *aAltKey);
    nsresult GetMetaKey(bool *aMetaKey);
3209
    nsresult GetButton(int16_t *aButton);
3210
    nsresult GetButtons(uint16_t *aButtons);
3211
    nsresult GetRelatedTarget(nsIDOMEventTarget **aRelatedTarget);
3212
    nsresult InitMouseEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
3213 3214 3215
            mozIDOMWindow *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);
3216
    nsresult GetMozPressure(float *aMozPressure);
3217
    nsresult GetMozInputSource(uint16_t *aMozInputSource);
3218
    nsresult GetModifierState(const nsAString *keyArg, bool *_retval);
3219
}
3220

3221 3222
[
    object,
3223
    uuid(2e52eb99-670d-469a-b51f-8efee2dd091d),
3224
    local
3225 3226 3227
]
interface nsIDOMKeyEvent : nsIDOMUIEvent
{
3228 3229
    nsresult GetCharCode(uint32_t *aCharCode);
    nsresult GetKeyCode(uint32_t *aKeyCode);
3230 3231 3232 3233 3234
    nsresult GetAltKey(bool *aAltKey);
    nsresult GetCtrlKey(bool *aCtrlKey);
    nsresult GetShiftKey(bool *aShiftKey);
    nsresult GetMetaKey(bool *aMetaKey);
    nsresult InitKeyEvent(const nsAString *typeArg, bool canBubbleArg,
3235
            bool cancelableArg, mozIDOMWindowProxy *viewArg, bool ctrlKeyArg,
3236 3237
            bool altKeyArg, bool shiftKeyArg, bool metaKeyArg, uint32_t keyCodeArg,
            uint32_t charCodeArg);
3238
    nsresult GetModifierState(const nsAString *keyArg, bool *_retval);
3239
    nsresult GetLocation(uint32_t *aLocation);
3240
    nsresult GetRepeat(bool *aRepeat);
3241
    nsresult GetKey(nsAString *aKey);
3242 3243
}

3244
[
3245
    object,
3246
    uuid(0b976267-4aaa-4f36-a2d4-27b5ca8d73bb),
3247
    local
3248 3249 3250
]
interface nsIEmbeddingSiteWindow : nsISupports
{
3251 3252
    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);
3253
    nsresult SetFocus();
3254 3255
    nsresult GetVisibility(bool *aVisibility);
    nsresult SetVisibility(bool aVisibility);
3256 3257 3258
    nsresult GetTitle(PRUnichar **aTitle);
    nsresult SetTitle(const PRUnichar *aTitle);
    nsresult GetSiteWindow(void **aSiteWindow);
3259
    nsresult Blur();
3260
}
3261 3262

[
3263 3264 3265
    object,
    uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392),
    local
3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277
]
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);
3278 3279
    nsresult IsCIDRegistered(const nsCID *aClass, bool *_retval);
    nsresult IsContractIDRegistered(const char *aContractID, bool *_retval);
3280 3281 3282 3283 3284 3285 3286 3287
    nsresult EnumerateCIDs(nsISimpleEnumerator **_retval);
    nsresult EnumerateContractIDs(nsISimpleEnumerator **_retval);
    nsresult CIDToContractID(const nsCID *aClass, char **_retval);
    nsresult ContractIDToCID(const char *aContractID, nsCID **_retval);
}

[
    object,
3288
    uuid(404ebfa2-d8f4-4c94-8416-e65a55f9df5a),
3289
    local
3290 3291 3292
]
interface nsIPromptService : nsISupports
{
3293
    nsresult Alert(mozIDOMWindowProxy *aParent, const PRUnichar *aDialogTitle,
3294
            const PRUnichar *aText);
3295
    nsresult AlertCheck(mozIDOMWindowProxy *aParent, const PRUnichar *aDialogTitle,
3296
            const PRUnichar *aText, const PRUnichar *aCheckMsg, bool *aCheckState);
3297
    nsresult Confirm(mozIDOMWindowProxy *aParent, const PRUnichar *aDialogTitle,
3298
            const PRUnichar *aText, bool *_retval);
3299
    nsresult ConfirmCheck(mozIDOMWindowProxy *aParent, const PRUnichar *aDialogTitle,
3300 3301
            const PRUnichar *aText, const PRUnichar *aCheckMsg, bool *aCheckState,
            bool *_retval);
3302
    nsresult ConfirmEx(mozIDOMWindowProxy *aParent, const PRUnichar *aDialogTitle,
3303
            const PRUnichar *aText, uint32_t aButtonFlags, const PRUnichar *aButton0Title,
3304
            const PRUnichar *aButton1Title, const PRUnichar *aButton2Title,
3305
            const PRUnichar *aCheckMsg, bool *aCheckState, int32_t *_retval);
3306
    nsresult Prompt(mozIDOMWindowProxy *aParent, const PRUnichar *aDialogTitle,
3307
            const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg,
3308
            bool *aCheckState, bool *_retval);
3309
    nsresult PromptUsernameAndPassword(mozIDOMWindowProxy *aParent, const PRUnichar *aDialogTitle,
3310
            const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword,
3311
            const PRUnichar *aCheckMsg, bool *aCheckState, bool *_retval);
3312
    nsresult PromptPassword(mozIDOMWindowProxy *aParent, const PRUnichar *aDialogTitle,
3313
            const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg,
3314
            bool *aCheckState, bool *_retval);
3315
    nsresult Select(mozIDOMWindowProxy *aParent, const PRUnichar *aDialogTitle,
3316 3317
            const PRUnichar *aText, uint32_t aCount, const PRUnichar **aSelectList,
            int32_t *aOutSelection, bool *_retval);
3318
}
3319

3320 3321
[
    object,
3322 3323
    uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee),
    local
3324 3325 3326
]
interface nsITooltipTextProvider : nsISupports
{
3327
    nsresult GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, bool *_retval);
3328 3329
}

3330 3331
[
    object,
3332
    uuid(24f963d1-e6fc-43ea-a206-99ac5fcc5265),
3333
    local
3334 3335 3336
]
interface nsIEditingSession : nsISupports
{
3337
    nsresult GetEditorStatus(uint32_t *aEditorStatus);
3338
    nsresult MakeWindowEditable(mozIDOMWindowProxy *window, const char *aEditorType,
3339
            bool doAfterUriLoad, bool aMakeWholeDocumentEditable, bool aInteractive);
3340 3341 3342 3343 3344 3345 3346 3347 3348
    nsresult WindowIsEditable(mozIDOMWindowProxy *window, bool *_retval);
    nsresult GetEditorForWindow(mozIDOMWindowProxy *window, nsIEditor **_retval);
    nsresult SetupEditorOnWindow(mozIDOMWindowProxy *window);
    nsresult TearDownEditorOnWindow(mozIDOMWindowProxy *window);
    nsresult SetEditorOnControllers(mozIDOMWindowProxy *aWindow, nsIEditor *aEditor);
    nsresult DisableJSAndPlugins(mozIDOMWindowProxy *aWindow);
    nsresult RestoreJSAndPlugins(mozIDOMWindowProxy *aWindow);
    nsresult DetachFromWindow(mozIDOMWindowProxy *aWindow);
    nsresult ReattachToWindow(mozIDOMWindowProxy *aWindow);
3349
    nsresult GetJsAndPluginsDisabled(bool *aJsAndPluginsDisabled);
3350 3351
}

3352 3353
[
    object,
3354
    uuid(b1fdf3c4-74e3-4f7d-a14d-2b76bcf53482),
3355
    local
3356 3357 3358
]
interface nsICommandParams : nsISupports
{
3359
    nsresult GetValueType(const char *name, int16_t *_retval);
3360
    nsresult GetBooleanValue(const char *name, bool *_retval);
3361
    nsresult GetLongValue(const char *name, int32_t *_retval);
3362 3363 3364 3365
    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);
3366
    nsresult SetBooleanValue(const char *name, bool value);
3367
    nsresult SetLongValue(const char *name, int32_t value);
3368 3369 3370 3371 3372 3373 3374
    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);
}

3375 3376
[
    object,
3377
    uuid(bb5a1730-d83b-4fa2-831b-35b9d5842e84),
3378
    local
3379 3380 3381 3382 3383
]
interface nsICommandManager : nsISupports
{
    nsresult AddCommandObserver(nsIObserver *aCommandObserver, const char *aCommandToObserve);
    nsresult RemoveCommandObserver(nsIObserver *aCommandObserver, const char *aCommandObserved);
3384 3385 3386
    nsresult IsCommandSupported(const char *aCommandName, mozIDOMWindowProxy *aTargetWindow, bool *_retval);
    nsresult IsCommandEnabled(const char *aCommandName, mozIDOMWindowProxy *aTargetWindow, bool *_retval);
    nsresult GetCommandState(const char *aCommandName, mozIDOMWindowProxy *aTargetWindow,
3387 3388
            nsICommandParams *aCommandParams);
    nsresult DoCommand(const char *aCommandName, nsICommandParams *aCommandParams,
3389
            mozIDOMWindowProxy *aTargetWindow);
3390 3391
}

3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407
[
    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);
}

3408 3409
[
    object,
3410 3411
    uuid(47b82b60-a36f-4167-8072-6f421151ed50),
    local
3412 3413 3414 3415 3416 3417 3418 3419 3420
]
interface nsIControllerContext : nsISupports
{
    nsresult Init(nsIControllerCommandTable *aCommandTable);
    nsresult SetCommandContext(nsISupports *aCommandContext);
}

[
    object,
3421 3422
    uuid(d5b61b82-1da4-11d3-bf87-00105a1b0627),
    local
3423 3424 3425
]
interface nsIController : nsISupports
{
3426 3427
    nsresult IsCommandEnabled(const char *command, bool *_retval);
    nsresult SupportsCommand(const char *command, bool *_retval);
3428 3429 3430 3431
    nsresult DoCommand(const char *command);
    nsresult OnEvent(const char *eventName);
}

3432 3433
[
    object,
3434
    uuid(8e1bab9d-8815-4d2c-a24d-7aba5239dc22),
3435 3436 3437 3438 3439 3440 3441 3442 3443
    local
]
interface nsIContent : nsISupports
{
    /* This is not a real interface declaration. It's too internal for us. */
}

[
    object,
3444
    uuid(ce1f7627-7109-4977-ba77-490ffde07aaa),
3445 3446 3447 3448 3449 3450 3451 3452 3453 3454
    local
]
interface nsIDocument : nsISupports
{
    /* This is not a real interface declaration. It's too internal for us. */
}

[
    object,
    uuid(b1ee32f2-b8c4-49b9-93df-b6fab5d54688),
3455
    local
3456 3457 3458
]
interface nsIContentSerializer : nsISupports
{
3459
    nsresult Init(uint32_t flags, uint32_t aWrapColumn, const char *aCharSet, bool aIsCopying,
3460
            bool aIsWholeDocument);
3461 3462 3463 3464 3465 3466
    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,
3467
            nsAString *aStr);
3468 3469
    nsresult AppendDoctype(nsIContent *aDoctype, nsAString *aStr);
    nsresult AppendElementStart(nsIContent *aElement, nsIContent *aOriginalElement,
3470
                                nsAString *aStr);
3471
    nsresult AppendElementEnd(nsIContent *aElement, nsAString *aStr);
3472
    nsresult Flush(nsAString *aStr);
3473
    nsresult AppendDocumentStart(nsIDocument *aDocument, nsAString *aStr);
3474 3475
}

3476 3477
[
    object,
3478
    uuid(094be624-f0bf-400f-89e2-6a84baab9474),
3479
    local
3480 3481 3482 3483
]
interface nsIEditor  : nsISupports
{
    nsresult GetSelection([out] nsISelection *_retval);
3484
    nsresult FinalizeSelection();
3485
    nsresult Init([in] nsIDOMDocument *doc, nsIContent *aRoot, nsISelectionController *aSelCon, uint32_t aFlags, nsAString *initialValue);
3486 3487
    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);
3488 3489
    nsresult PostCreate();
    nsresult PreDestroy();
3490 3491
    nsresult GetFlags([out] uint32_t *_retval);
    nsresult SetFlags([in] uint32_t val);
3492 3493
    nsresult GetContentsMIMEType([out] char **_retval);
    nsresult SetContentsMIMEType([in] const char *val);
3494 3495
    nsresult GetIsDocumentEditable([out] bool *_retval);
    nsresult GetIsSelectionEditable(bool *aIsSelectionEditable);
3496 3497 3498
    nsresult GetDocument([out] nsIDOMDocument **_retval);
    nsresult GetRootElement([out] nsIDOMElement **_retval);
    nsresult GetSelectionController([out] nsISelectionController **_retval);
3499
    nsresult DeleteSelection(int16_t action, int16_t aStripWrappers);
3500 3501
    nsresult GetDocumentIsEmpty([out] bool *_retval);
    nsresult GetDocumentModified([out] bool *_retval);
3502 3503 3504
    nsresult GetDocumentCharacterSet([out] nsACString *_retval);
    nsresult SetDocumentCharacterSet([in] const nsACString *val);
    nsresult ResetModificationCount();
3505 3506
    nsresult GetModificationCount([out] int32_t *_retval);
    nsresult IncrementModificationCount([in] int32_t aModCount);
3507
    nsresult GetTransactionManager([out] nsITransactionManager **_retval);
3508
    nsresult SetTransactionManager(nsITransactionManager *aTransactionManager);
3509
    nsresult DoTransaction([in] nsITransaction *txn);
3510
    nsresult EnableUndo([in] bool enable);
3511 3512 3513
    nsresult GetNumberOfUndoItems(int32_t *aNumberOfUndoItems);
    nsresult GetNumberOfRedoItems(int32_t *aNumberOfRedoItems);
    nsresult Undo([in] uint32_t count);
3514
    nsresult CanUndo([out] bool *isEnabled, [out] bool *canUndo);
3515
    nsresult Redo([in] uint32_t count);
3516
    nsresult CanRedo([out] bool *isEnabled, [out] bool *canRedo);
3517 3518 3519 3520
    nsresult BeginTransaction();
    nsresult EndTransaction();
    nsresult BeginPlaceHolderTransaction([in] nsIAtom *name);
    nsresult EndPlaceHolderTransaction();
3521 3522
    nsresult ShouldTxnSetSelection([out] bool *_retval);
    nsresult SetShouldTxnSetSelection([in] bool should);
3523
    nsresult GetInlineSpellChecker([out] nsIInlineSpellChecker **_retval);
3524
    nsresult SyncRealTimeSpell();
3525
    nsresult SetSpellcheckUserOverride(bool enable);
3526
    nsresult Cut();
3527
    nsresult CanCut([out] bool *_retval);
3528
    nsresult Copy();
3529
    nsresult CanCopy([out] bool *_retval);
3530
    nsresult CanDelete(bool *_retval);
3531
    nsresult Paste([in] int32_t aSelectionType);
3532
    nsresult PasteTransferable(nsITransferable *aTransferable);
3533
    nsresult CanPaste([in] int32_t aSelectionType, [out] bool *_retval);
3534
    nsresult CanPasteTransferable(nsITransferable *aTransferable, bool *_retval);
3535 3536 3537 3538
    nsresult SelectAll();
    nsresult BeginningOfDocument();
    nsresult EndOfDocument();
    nsresult SetAttribute([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [in] const nsAString *attvalue);
3539
    nsresult GetAttributeValue([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [out] nsAString *resultValue, bool *_retval);
3540 3541 3542
    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);
3543 3544 3545
    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);
3546 3547
    nsresult JoinNodes([in] nsIDOMNode *leftNode, [in] nsIDOMNode *rightNode, [in] nsIDOMNode *parent);
    nsresult DeleteNode([in] nsIDOMNode *child);
3548
    bool OutputsMozDirty();
3549 3550
    nsresult MarkNodeDirty([in] nsIDOMNode *node);
    nsresult SwitchTextDirection();
3551 3552
    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);
3553
    nsresult AddEditorObserver(nsIEditorObserver *observer);
3554
    nsresult RemoveEditorObserver(nsIEditorObserver *observer);
3555 3556 3557 3558 3559 3560
    nsresult AddEditActionListener([in] nsIEditActionListener *listener);
    nsresult RemoveEditActionListener([in] nsIEditActionListener *listener);
    nsresult AddDocumentStateListener([in] nsIDocumentStateListener *listener);
    nsresult RemoveDocumentStateListener([in] nsIDocumentStateListener *listener);
    nsresult DumpContentTree();
    nsresult DebugDumpContent();
3561
    nsresult DebugUnitTests([out] int32_t *outNumTests, [out] int32_t *outNumTestsFailed);
3562
    bool IsModifiableNode(nsIDOMNode *aNode);
3563
    nsresult GetSuppressDispatchingInputEvent(bool *aSuppressDispatchingInputEvent);
3564
    nsresult SetSuppressDispatchingInputEvent(bool aSuppressDispatchingInputEvent);
3565
    nsresult GetIsInEditAction(bool *aIsInEditAction);
3566 3567
}

3568 3569
[
    object,
3570
    uuid(87ee993e-985f-4a43-a974-0d9512da2fb0),
3571
    local
3572 3573 3574 3575 3576 3577 3578
]
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);
3579 3580
    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);
3581 3582 3583 3584
    nsresult RemoveAllInlineProperties();
    nsresult RemoveInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute);
    nsresult IncreaseFontSize();
    nsresult DecreaseFontSize();
3585
    nsresult NodeIsBlock([in] nsIDOMNode *node, bool *_retval);
3586
    nsresult InsertHTML([in] nsAString *aInputString);
3587
    nsresult PasteNoFormatting([in] int32_t aSelectionType);
3588
    nsresult RebuildDocumentFromSource([in] nsAString *aSourceString);
3589
    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);
3590
    nsresult InsertElementAtSelection([in] nsIDOMElement *aElement, [in] bool aDeleteSelection);
3591 3592 3593 3594 3595
    nsresult SetDocumentTitle([in] nsAString *aTitle);
    nsresult UpdateBaseURL();
    nsresult SelectElement([in] nsIDOMElement *aElement);
    nsresult SetCaretAfterElement([in] nsIDOMElement *aElement);
    nsresult SetParagraphFormat([in] nsAString *aParagraphFormat);
3596 3597 3598 3599 3600 3601 3602
    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);
3603
    nsresult GetAlignment([out] bool *aMixed, [out] int16_t *aAlign);
3604 3605
    nsresult GetIndentState([out] bool *aCanIndent, [out] bool *aCanOutdent);
    nsresult MakeOrChangeList([in] nsAString *aListType, [in] bool entireList, [in] nsAString *aBulletType);
3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617
    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);
3618 3619
    nsresult GetIsCSSEnabled([out] bool *_retval);
    nsresult SetIsCSSEnabled([in] bool prb);
3620 3621
    nsresult AddInsertionListener([in] nsIContentFilter *inFilter);
    nsresult RemoveInsertionListener([in] nsIContentFilter *inFilter);
3622
    nsresult CreateAnonymousElement([in] nsAString *aTag, [in] nsIDOMNode *aParentNode, [in] nsAString *aAnonClass, [in] bool aIsCreatedHidden, [out] nsIDOMElement **_retval);
3623 3624
    nsresult GetSelectionContainer([out] nsIDOMElement **_retval);
    nsresult CheckSelectionStateForAnonymousButtons([in] nsISelection *aSelection);
3625 3626 3627
    nsresult IsAnonymousElement([in] nsIDOMElement *aElement, [out] bool *_retval);
    nsresult GetReturnInParagraphCreatesNewParagraph([out] bool *_retval);
    nsresult SetReturnInParagraphCreatesNewParagraph([in] bool prb);
3628
    void /*Element*/ *GetActiveEditingHost();
3629 3630
}

3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653
[
    object,
    uuid(b8100c90-73be-11d2-92a5-00105a1b0d64),
    local
]
interface nsIClipboardCommands : nsISupports
{
    nsresult CanCutSelection(bool *_retval);
    nsresult CanCopySelection(bool *_retval);
    nsresult CanCopyLinkLocation(bool *_retval);
    nsresult CanCopyImageLocation(bool *_retval);
    nsresult CanCopyImageContents(bool *_retval);
    nsresult CanPaste(bool *_retval);
    nsresult CutSelection();
    nsresult CopySelection();
    nsresult CopyLinkLocation();
    nsresult CopyImageLocation();
    nsresult CopyImageContents();
    nsresult Paste();
    nsresult SelectAll();
    nsresult SelectNone();
}

3654 3655
[
    object,
3656
    uuid(9b7c586f-9214-480c-a2c4-49b526fff1a6),
3657 3658
    local
]
3659
interface nsIDocShellTreeItem : nsISupports
3660
{
3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674
    nsresult GetName(nsAString *aName);
    nsresult SetName(const nsAString *aName);
    nsresult NameEquals(const PRUnichar *name, bool *_retval);
    nsresult GetItemType(int32_t *aItemType);
    nsresult SetItemType(int32_t aItemType);
    int32_t ItemType();
    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);
3675 3676 3677 3678 3679 3680
    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);
3681
    nsIDocument /* thiscall */ *GetDocument();
3682
    void /* thiscall nsPIDOMWindowOuter */ *GetWindow();
3683 3684 3685 3686
}

[
    object,
3687
    uuid(2da17016-7851-4a45-a7a8-00b360e01595),
3688 3689
    local
]
3690
interface nsIContentViewer : nsISupports
3691
{
3692 3693 3694 3695 3696
    nsresult Init(nsIWidget *aParentWidget, const void /*nsIntRect*/ *aBounds);
    nsresult GetContainer(nsIDocShell **aContainer);
    nsresult SetContainer(nsIDocShell *aContainer);
    void /* thiscall */ LoadStart(nsIDocument *aDoc);
    nsresult LoadComplete(nsresult aStatus);
3697
    nsresult PermitUnload(bool *_retval);
3698
    nsresult GetInPermitUnload(bool *aInPermitUnload);
3699
    nsresult /* thiscall */ PermitUnloadInternal(bool *aShouldPrompt, bool *_retval);
3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750
    nsresult GetBeforeUnloadFiring(bool *aBeforeUnloadFiring);
    nsresult PageHide(bool isUnload);
    nsresult Close(nsISHEntry *historyEntry);
    nsresult Destroy();
    nsresult Stop();
    nsresult GetDOMDocument(nsIDOMDocument **aDOMDocument);
    nsresult SetDOMDocument(nsIDOMDocument *aDOMDocument);
    void /* thiscall nsresult_(nsIDocument *) */ GetDocument();
    nsresult GetBounds(void /*nsIntRect*/ *aBounds);
    nsresult SetBounds(const void /*nsIntRect*/ *aBounds);
    nsresult GetPreviousViewer(nsIContentViewer **aPreviousViewer);
    nsresult SetPreviousViewer(nsIContentViewer *aPreviousViewer);
    nsresult Move(int32_t aX, int32_t aY);
    nsresult Show();
    nsresult Hide();
    nsresult GetSticky(bool *aSticky);
    nsresult SetSticky(bool aSticky);
    nsresult RequestWindowClose(bool *_retval);
    nsresult Open(nsISupports *aState, nsISHEntry *aSHEntry);
    nsresult ClearHistoryEntry();
    nsresult SetPageMode(bool aPageMode, nsIPrintSettings *aPrintSettings);
    nsresult GetHistoryEntry(nsISHEntry **aHistoryEntry);
    nsresult GetIsTabModalPromptAllowed(bool *aIsTabModalPromptAllowed);
    nsresult GetIsHidden(bool *aIsHidden);
    nsresult SetIsHidden(bool aIsHidden);
    nsresult GetPresShell(nsIPresShell **aPresShell);
    nsresult GetPresContext(void /*nsPresContext*/ **aPresContext);
    nsresult SetDocumentInternal(nsIDocument *aDocument, bool aForceReuseInnerWindow);
    void /* thiscall nsView */ *FindContainerView(void);
    void /* thiscall */ SetNavigationTiming(void /*nsDOMNavigationTiming*/ *aTiming);
    nsresult ScrollToNode(nsIDOMNode *node);
    nsresult GetTextZoom(float *aTextZoom);
    nsresult SetTextZoom(float aTextZoom);
    nsresult GetFullZoom(float *aFullZoom);
    nsresult SetFullZoom(float aFullZoom);
    nsresult GetAuthorStyleDisabled(bool *aAuthorStyleDisabled);
    nsresult SetAuthorStyleDisabled(bool aAuthorStyleDisabled);
    nsresult GetForceCharacterSet(nsACString *aForceCharacterSet);
    nsresult SetForceCharacterSet(const nsACString *aForceCharacterSet);
    nsresult GetHintCharacterSet(nsACString *aHintCharacterSet);
    nsresult SetHintCharacterSet(const nsACString *aHintCharacterSet);
    nsresult GetHintCharacterSetSource(int32_t *aHintCharacterSetSource);
    nsresult SetHintCharacterSetSource(int32_t aHintCharacterSetSource);
    nsresult GetContentSize(int32_t *width, int32_t *height);
    nsresult GetMinFontSize(int32_t *aMinFontSize);
    nsresult SetMinFontSize(int32_t aMinFontSize);
    nsresult AppendSubtree(void /*nsTArray<nsCOMPtr<nsIContentViewer> >*/ *array);
    nsresult PausePainting();
    nsresult ResumePainting();
    nsresult EmulateMedium(const nsAString *aMediaType);
    nsresult StopEmulatingMedium();
3751 3752
}

3753 3754
[
    object,
3755
    uuid(e7570e5a-f1d6-452d-b4f8-b35fdc63aa03),
3756 3757 3758 3759
    local
]
interface nsIDocShellLoadInfo : nsISupports
{
3760 3761
    typedef int32_t nsDocShellInfoLoadType;
    typedef uint32_t nsDocShellInfoReferrerPolicy;
3762 3763 3764

    nsresult GetReferrer(nsIURI **aReferrer);
    nsresult SetReferrer(nsIURI *aReferrer);
3765 3766 3767 3768
    nsresult GetOriginalURI(nsIURI **aOriginalURI);
    nsresult SetOriginalURI(nsIURI *aOriginalURI);
    nsresult GetLoadReplace(bool *aLoadReplace);
    nsresult SetLoadReplace(bool aLoadReplace);
3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786
    nsresult GetOwner(nsISupports **aOwner);
    nsresult SetOwner(nsISupports *aOwner);
    nsresult GetInheritOwner(bool *aInheritOwner);
    nsresult SetInheritOwner(bool aInheritOwner);
    nsresult GetOwnerIsExplicit(bool *aOwnerIsExplicit);
    nsresult SetOwnerIsExplicit(bool aOwnerIsExplicit);
    nsresult GetLoadType(nsDocShellInfoLoadType *aLoadType);
    nsresult SetLoadType(nsDocShellInfoLoadType aLoadType);
    nsresult GetSHEntry(nsISHEntry **aSHEntry);
    nsresult SetSHEntry(nsISHEntry *aSHEntry);
    nsresult GetTarget(char16_t **aTarget);
    nsresult SetTarget(const char16_t * aTarget);
    nsresult GetPostDataStream(nsIInputStream **aPostDataStream);
    nsresult SetPostDataStream(nsIInputStream *aPostDataStream);
    nsresult GetHeadersStream(nsIInputStream * *aHeadersStream);
    nsresult SetHeadersStream(nsIInputStream *aHeadersStream);
    nsresult GetSendReferrer(bool *aSendReferrer);
    nsresult SetSendReferrer(bool aSendReferrer);
3787 3788
    nsresult GetReferrerPolicy(nsDocShellInfoReferrerPolicy *aReferrerPolicy);
    nsresult SetReferrerPolicy(nsDocShellInfoReferrerPolicy aReferrerPolicy);
3789 3790 3791 3792 3793 3794 3795 3796 3797
    nsresult GetIsSrcdocLoad(bool *aIsSrcdocLoad);
    nsresult GetSrcdocData(nsAString *aSrcdocData);
    nsresult SetSrcdocData(const nsAString *aSrcdocData);
    nsresult GetSourceDocShell(nsIDocShell * *aSourceDocShell);
    nsresult SetSourceDocShell(nsIDocShell *aSourceDocShell);
    nsresult GetBaseURI(nsIURI **aBaseURI);
    nsresult SetBaseURI(nsIURI *aBaseURI);
}

3798 3799
[
    object,
3800
    uuid(049234fe-da10-478b-bc5d-bc6f9a1ba63d),
3801 3802
    local
]
3803
interface nsIDocShell : nsIDocShellTreeItem
3804
{
3805
    nsresult LoadURI(nsIURI *uri, nsIDocShellLoadInfo *loadInfo, uint32_t aLoadFlags, bool firstParty);
3806 3807
    nsresult LoadStream(nsIInputStream *aStream, nsIURI *aURI, const nsACString *aContentType,
            const nsACString *aContentCharset, nsIDocShellLoadInfo *aLoadInfo);
3808 3809 3810 3811 3812 3813
    nsresult InternalLoad(nsIURI *aURI, nsIURI *aOriginalURI, bool aLoadReplace, nsIURI *aReferrer,
            uint32_t aReferrerPolicy, nsISupports *aOwner, uint32_t aFlags, const PRUnichar *aWindowTarget,
            const char *aTypeHint, nsACString *aFileName, nsIInputStream *aPostDataStream,
            nsIInputStream *aHeadersStream, uint32_t aLoadFlags, nsISHEntry *aSHEntry, bool firstParty,
            const nsAString *aSrcdoc, nsIDocShell *aSourceDocShell, nsIURI *aBaseURI, nsIDocShell **aDocShell,
            nsIRequest **aRequest);
3814
    nsresult AddState(jsval *aData, const nsAString *aTitle, const nsAString *aURL, bool aReplace, JSContext *cx);
3815 3816 3817
    nsresult CreateLoadInfo(nsIDocShellLoadInfo **loadInfo);
    nsresult PrepareForNewContentModel();
    nsresult SetCurrentURI(nsIURI *aURI);
3818
    nsresult FirePageHideNotification(bool isUnload);
3819
    nsresult GetPresContext(void /*nsPresContext*/ **aPresContext);
3820
    nsIPresShell *GetPresShell();
3821 3822 3823 3824
    nsresult GetEldestPresShell(nsIPresShell **aEldestPresShell);
    nsresult GetContentViewer(nsIContentViewer **aContentViewer);
    nsresult GetChromeEventHandler(nsIDOMEventTarget **aChromeEventHandler);
    nsresult SetChromeEventHandler(nsIDOMEventTarget *aChromeEventHandler);
3825 3826
    nsresult GetCustomUserAgent(nsAString *aCustomUserAgent);
    nsresult SetCustomUserAgent(const nsAString *aCustomUserAgent);
3827 3828 3829 3830
    nsresult GetAllowPlugins(bool *aAllowPlugins);
    nsresult SetAllowPlugins(bool aAllowPlugins);
    nsresult GetAllowJavascript(bool *aAllowJavascript);
    nsresult SetAllowJavascript(bool aAllowJavascript);
3831 3832
    nsresult GetDisableNoScript(bool *aDisableNoScript);
    nsresult SetDisableNoScript(bool aDisableNoScript);
3833 3834 3835 3836 3837 3838
    nsresult GetAllowMetaRedirects(bool *aAllowMetaRedirects);
    nsresult SetAllowMetaRedirects(bool aAllowMetaRedirects);
    nsresult GetAllowSubframes(bool *aAllowSubframes);
    nsresult SetAllowSubframes(bool aAllowSubframes);
    nsresult GetAllowImages(bool *aAllowImages);
    nsresult SetAllowImages(bool aAllowImages);
3839 3840
    nsresult GetAllowMedia(bool *aAllowMedia);
    nsresult SetAllowMedia(bool aAllowMedia);
3841 3842 3843 3844
    nsresult GetAllowDNSPrefetch(bool *aAllowDNSPrefetch);
    nsresult SetAllowDNSPrefetch(bool aAllowDNSPrefetch);
    nsresult GetAllowWindowControl(bool *aAllowWindowControl);
    nsresult SetAllowWindowControl(bool aAllowWindowControl);
3845 3846
    nsresult GetAllowContentRetargeting(bool *aAllowContentRetargeting);
    nsresult SetAllowContentRetargeting(bool aAllowContentRetargeting);
3847 3848
    nsresult GetAllowContentRetargetingOnChildren(bool *aAllowContentRetargetingOnChildren);
    nsresult SetAllowContentRetargetingOnChildren(bool aAllowContentRetargetingOnChildren);
3849 3850 3851
    nsresult GetDocShellEnumerator(int32_t aItemType, int32_t aDirection, nsISimpleEnumerator **_retval);
    nsresult GetAppType(uint32_t *aAppType);
    nsresult SetAppType(uint32_t aAppType);
3852 3853
    nsresult GetAllowAuth(bool *aAllowAuth);
    nsresult SetAllowAuth(bool aAllowAuth);
3854 3855
    nsresult GetZoom(float *aZoom);
    nsresult SetZoom(float aZoom);
3856 3857 3858 3859
    nsresult GetMarginWidth(int32_t *aMarginWidth);
    nsresult SetMarginWidth(int32_t aMarginWidth);
    nsresult GetMarginHeight(int32_t *aMarginHeight);
    nsresult SetMarginHeight(int32_t aMarginHeight);
3860
    nsresult TabToTreeOwner(bool forward, bool forDocumentNavigation, bool *_retval);
3861 3862 3863
    nsresult GetBusyFlags(uint32_t *aBusyFlags);
    nsresult GetLoadType(uint32_t *aLoadType);
    nsresult SetLoadType(uint32_t aLoadType);
3864 3865
    nsresult GetDefaultLoadFlags(nsLoadFlags *aDefaultLoadFlags);
    nsresult SetDefaultLoadFlags(nsLoadFlags aDefaultLoadFlags);
3866 3867
    nsresult IsBeingDestroyed(bool *_retval);
    nsresult GetIsExecutingOnLoadHandler(bool *aIsExecutingOnLoadHandler);
3868 3869
    nsresult GetLayoutHistoryState(nsILayoutHistoryState **aLayoutHistoryState);
    nsresult SetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState);
3870
    nsresult GetShouldSaveLayoutState(bool *aShouldSaveLayoutState);
3871 3872 3873 3874
    nsresult GetSecurityUI(nsISecureBrowserUI **aSecurityUI);
    nsresult SetSecurityUI(nsISecureBrowserUI *aSecurityUI);
    nsresult SuspendRefreshURIs();
    nsresult ResumeRefreshURIs();
3875
    nsresult BeginRestore(nsIContentViewer *viewer, bool top);
3876
    nsresult FinishRestore();
3877 3878 3879
    nsresult GetRestoringDocument(bool *aRestoringDocument);
    nsresult GetUseErrorPages(bool *aUseErrorPages);
    nsresult SetUseErrorPages(bool aUseErrorPages);
3880
    nsresult DisplayLoadError(nsresult aError, nsIURI *aURI, const char16_t *aURL, nsIChannel *aFailedChannel, bool *_retval);
3881
    nsresult GetFailedChannel(nsIChannel **aFailedChannel);
3882 3883 3884
    nsresult GetPreviousTransIndex(int32_t *aPreviousTransIndex);
    nsresult GetLoadedTransIndex(int32_t *aLoadedTransIndex);
    nsresult HistoryPurged(int32_t numEntries);
3885
    nsresult GetSessionStorageForPrincipal(nsIPrincipal *principal, const nsAString *documentURI,
3886
            bool create, nsIDOMStorage **_retval);
3887
    nsresult AddSessionStorage(nsIPrincipal *principal, nsIDOMStorage *storage);
3888
    nsresult GetCurrentDocumentChannel(nsIChannel **aCurrentDocumentChannel);
3889
    nsresult SetChildOffset(uint32_t offset);
3890 3891
    nsresult GetIsInUnload(bool *aIsInUnload);
    nsresult GetChannelIsUnsafe(bool *aChannelIsUnsafe);
3892 3893 3894 3895
    nsresult GetHasMixedActiveContentLoaded(bool *aHasMixedActiveContentLoaded);
    nsresult GetHasMixedActiveContentBlocked(bool *aHasMixedActiveContentBlocked);
    nsresult GetHasMixedDisplayContentLoaded(bool *aHasMixedDisplayContentLoaded);
    nsresult GetHasMixedDisplayContentBlocked(bool *aHasMixedDisplayContentBlocked);
3896 3897
    nsresult GetHasTrackingContentBlocked(bool *aHasTrackingContentBlocked);
    nsresult GetHasTrackingContentLoaded(bool *aHasTrackingContentLoaded);
3898
    void DetachEditorFromWindow();
3899 3900
    nsresult GetIsOffScreenBrowser(bool *aIsOffScreenBrowser);
    nsresult SetIsOffScreenBrowser(bool aIsOffScreenBrowser);
3901
    nsresult GetPrintPreview(nsIWebBrowserPrint **aPrintPreview);
3902 3903 3904
    nsresult GetCanExecuteScripts(bool *aCanExecuteScripts);
    nsresult GetIsActive(bool *aIsActive);
    nsresult SetIsActive(bool aIsActive);
3905
    nsresult SetIsActiveAndForeground(bool aIsActive);
3906 3907
    nsresult SetIsPrerendered(bool prerendered);
    nsresult GetIsPrerendered(bool *aIsPrerendered);
3908
    nsresult GetHistoryID(uint64_t *aHistoryID);
3909 3910
    nsresult GetIsAppTab(bool *aIsAppTab);
    nsresult SetIsAppTab(bool aIsAppTab);
3911
    nsresult CreateAboutBlankContentViewer(nsIPrincipal *aPrincipal);
3912 3913
    nsresult GetCharset(nsACString *aCharset);
    nsresult SetCharset(nsACString *aCharset);
3914
    nsresult GatherCharsetMenuTelemetry();
3915 3916
    nsresult GetForcedCharset(nsIAtom **aForcedCharset);
    nsresult SetForcedCharset(nsIAtom *aForcedCharset);
3917 3918
    void /* thiscall */ SetParentCharset(const nsACString *parentCharset, int32_t parentCharsetSource, nsIPrincipal *parentCharsetPrincipal);
    void /* thiscall */ GetParentCharset(nsACString *parentCharset, int32_t *parentCharsetSource, nsIPrincipal **parentCharsetPrincipal);
3919 3920 3921 3922
    nsresult GetRecordProfileTimelineMarkers(bool *aRecordProfileTimelineMarkers);
    nsresult SetRecordProfileTimelineMarkers(bool aRecordProfileTimelineMarkers);
    nsresult Now(int /* DOMHighResTimeStamp */ *_retval);
    nsresult PopProfileTimelineMarkers(JSContext *cx, void /*JS::MutableHandleValue*/ *_retval);
3923
    nsresult AddWeakPrivacyTransitionObserver(nsIPrivacyTransitionObserver *obs);
3924 3925 3926
    nsresult AddWeakReflowObserver(nsISupports /*nsIReflowObserver*/ *obs);
    nsresult RemoveWeakReflowObserver(nsISupports /*nsIReflowObserver*/ *obs);
    nsresult NotifyReflowObservers(bool interruptible, int /*DOMHighResTimeStamp*/ start, int /*DOMHighResTimeStamp*/ end);
3927 3928 3929
    nsresult AddWeakScrollObserver(void /*nsIScrollObserver*/ *obs);
    nsresult RemoveWeakScrollObserver(void /*nsIScrollObserver*/ *obs);
    nsresult NotifyScrollObservers();
3930
    nsresult GetIsApp(bool *aIsApp);
3931 3932 3933 3934 3935 3936 3937
    nsresult GetFrameType(uint32_t *aFrameType);
    nsresult SetFrameType(uint32_t aFrameType);
    nsresult GetIsMozBrowserOrApp(bool *aIsMozBrowserOrApp);
    nsresult GetIsIsolatedMozBrowserElement(bool *aIsIsolatedMozBrowserElement);
    nsresult GetIsInIsolatedMozBrowserElement(bool *aIsInIsolatedMozBrowserElement);
    nsresult SetIsInIsolatedMozBrowserElement(bool aIsInIsolatedMozBrowserElement);
    nsresult GetIsInMozBrowserOrApp(bool *aIsInMozBrowserOrApp);
3938
    nsresult GetAppId(uint32_t *aAppId);
3939
    nsresult GetAppManifestURL(nsAString *aAppManifestURL);
3940
    nsresult GetSameTypeParentIgnoreBrowserAndAppBoundaries(nsIDocShell **_retval);
3941
    nsresult GetSameTypeRootTreeItemIgnoreBrowserAndAppBoundaries(nsIDocShell **_retval);
3942 3943 3944
    nsresult GetAsyncPanZoomEnabled(bool *aAsyncPanZoomEnabled);
    nsresult GetSandboxFlags(uint32_t *aSandboxFlags);
    nsresult SetSandboxFlags(uint32_t aSandboxFlags);
3945 3946
    nsresult GetOnePermittedSandboxedNavigator(nsIDocShell **aOnePermittedSandboxedNavigator);
    nsresult SetOnePermittedSandboxedNavigator(nsIDocShell *aOnePermittedSandboxedNavigator);
3947
    bool /* thiscall */ IsSandboxedFrom(nsIDocShell *aTargetDocShell);
3948 3949 3950
    nsresult GetMixedContentChannel(nsIChannel **aMixedContentChannel);
    nsresult SetMixedContentChannel(nsIChannel *aMixedContentChannel);
    nsresult GetAllowMixedContentAndConnectionData(bool *rootHasSecureConnection, bool *allowMixedContent, bool *isRootDocShell);
3951 3952 3953
    bool PluginsAllowedInCurrentDoc();
    nsresult GetFullscreenAllowed(bool *aFullscreenAllowed);
    nsresult SetFullscreenAllowed(bool allowed);
3954 3955
    uint32_t OrientationLock();
    void SetOrientationLock(uint32_t orientationLock);
3956 3957 3958 3959 3960 3961 3962 3963
    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);
3964
    nsresult GetChildSHEntry(int32_t aChildOffset, nsISHEntry **_retval);
3965
    nsresult AddChildSHEntry(nsISHEntry *aCloneReference, nsISHEntry *aHistoryEntry, int32_t aChildOffset, uint32_t aLoadType, bool aCloneChildren);
3966 3967 3968 3969 3970 3971
    nsresult GetUseGlobalHistory(bool *aUseGlobalHistory);
    nsresult SetUseGlobalHistory(bool aUseGlobalHistory);
    nsresult RemoveFromSessionHistory();
    nsresult GetCreatedDynamically(bool *aCreatedDynamically);
    nsresult SetCreatedDynamically(bool aCreatedDynamically);
    nsresult GetCurrentSHEntry(nsISHEntry **aEntry, bool *_retval);
3972 3973 3974 3975
    nsresult IsCommandEnabled(const char *command, bool *_retval);
    nsresult DoCommand(const char *command);
    bool IsInvisible();
    void SetInvisible(bool aIsInvisibleDochsell);
3976
    void /* nsIScriptGlobalObject thiscall */ *GetScriptGlobalObject();
3977 3978 3979
    nsresult GetDeviceSizeIsPageSize(bool *aDeviceSizeIsPageSize);
    nsresult SetDeviceSizeIsPageSize(bool aDeviceSizeIsPageSize);
    void /* thiscall */ SetOpener(void /*nsITabParent*/ *aOpener);
3980
    void /* thiscall nsITabParent */ *GetOpener();
3981 3982
    void /* thiscall */ NotifyJSRunToCompletionStart(const char *aReason, const char16_t *functionName,
            const char16_t *fileName, uint32_t lineNumber);
3983 3984
    void /* thiscall */ NotifyJSRunToCompletionStop();
    nsresult GetHasLoadedNonBlankURI(bool *aHasLoadedNonBlankURI);
3985 3986 3987 3988
    nsresult GetPaymentRequestId(nsAString *aPaymentRequestId);
    nsresult SetPaymentRequestId(const nsAString *aPaymentRequestId);
    nsresult GetWindowDraggingAllowed(bool *aWindowDraggingAllowed);
    nsresult SetWindowDraggingAllowed(bool aWindowDraggingAllowed);
3989 3990 3991 3992
    nsresult GetCurrentScrollRestorationIsManual(bool *aCurrentScrollRestorationIsManual);
    nsresult SetCurrentScrollRestorationIsManual(bool aCurrentScrollRestorationIsManual);
    nsresult GetOriginAttributes(JSContext* cx, void* /* JS::MutableHandleValue */ _retval);
    nsresult SetOriginAttributes(int /* JS::HandleValue */ aAttrs, JSContext *cx);
3993 3994
}

3995 3996
[
    object,
3997
    uuid(6d674c17-0fbc-4633-8f46-734e87ebf0c7),
3998 3999 4000 4001
    local
]
interface nsIMutationObserver : nsISupports
{
4002 4003
    typedef struct {} nsAttrValue;

4004 4005 4006 4007
    void CharacterDataWillChange(nsIDocument *aDocument, nsIContent *aContent,
                                 void /*CharacterDataChangeInfo*/ *aInfo);
    void CharacterDataChanged(nsIDocument *aDocument, nsIContent *aContent,
                              void /*CharacterDataChangeInfo*/ *aInfo);
4008 4009 4010 4011 4012
    void AttributeWillChange(nsIDocument *aDocument, /*mozilla::dom::Element*/ void *aElement, int32_t aNameSpaceID,
                             nsIAtom *aAttribute, int32_t aModType, const nsAttrValue *aNewValue);
    void AttributeChanged(nsIDocument *aDocument, /*mozilla::dom::Element*/ void *aElement, int32_t aNameSpaceID,
                          nsIAtom *aAttribute, int32_t aModType, const nsAttrValue *aOldValue);
    void NativeAnonymousChildListChange(nsIDocument *aDocument, nsIContent *aContent, bool aIsRemove);
4013 4014
    void AttributeSetToCurrentValue(nsIDocument *aDocument, /*mozilla::dom::Element*/ void *aElement,
                                    int32_t aNameSpaceID, nsIAtom *aAttribute);
4015
    void ContentAppended(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aFirstNewContent,
4016
                         int32_t aNewIndexInContainer);
4017
    void ContentInserted(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
4018
                         int32_t aIndexInContainer);
4019
    void ContentRemoved(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
4020
                        int32_t aIndexInContainer, nsIContent *aPreviousSibling);
4021 4022 4023 4024
    void NodeWillBeDestroyed(const nsINode *aNode);
    void ParentChainChanged(nsIContent *aContent);
}

4025 4026
[
    object,
4027
    uuid(2c4ad90a-740e-4212-ba3f-feacda4b929e),
4028 4029 4030 4031 4032 4033 4034
    local
]
interface nsIParser : nsISupports
{
    typedef int nsDTDMode;
    typedef int eParserCommands;

4035 4036 4037 4038
    /* From nsParserBase: */
    bool IsParserEnabled();
    nsresult GetChannel(nsIChannel **aChannel);

4039 4040 4041 4042 4043
    void SetContentSink(nsIContentSink *aSink);
    nsIContentSink *GetContentSink();
    void GetCommand(nsACString *aCommand);
    void SetCommand2(const char *aCommand);
    void SetCommand(eParserCommands aParserCommand);
4044 4045
    void SetDocumentCharset(const nsACString *aCharset, int32_t aSource);
    void GetDocumentCharset(nsACString *oCharset, int32_t *oSource);
4046
    /* nsresult GetChannel(nsIChannel **aChannel); in nsParserBase */
4047
    nsresult GetDTD(nsIDTD **aDTD);
4048
    nsIStreamListener *GetStreamListener();
4049 4050 4051
    nsresult ContinueInterruptedParsing();
    void BlockParser();
    void UnblockParser();
4052
    void ContinueInterruptedParsingAsync();
4053
    /* bool IsParserEnabled(); in nsParserBase */
4054
    bool IsComplete();
4055 4056
    nsresult Parse(nsIURI *aURL, nsIRequestObserver *aListener, void *aKey, nsDTDMode aMode);
    nsresult Terminate();
4057
    nsresult ParseFragment(const nsAString *aSourceBuffer, void /*nsTArray<nsString>*/ *aTagStack);
4058 4059
    nsresult BuildModel();
    nsresult CancelParsingEvents();
4060
    void Reset();
4061
    bool IsInsertionPointDefined();
4062 4063
    void BeginEvaluatingParserInsertedScript();
    void EndEvaluatingParserInsertedScript();
4064
    void MarkAsNotScriptCreated(const char *aCommand);
4065
    bool IsScriptCreated();
4066 4067
}

4068 4069
[
    object,
4070
    uuid(71041fa3-6dd7-4cde-bb76-aecc69e17578),
4071 4072 4073 4074
    local
]
interface nsIDocumentObserver : nsIMutationObserver
{
4075
    typedef uint32_t nsUpdateType;
4076

4077 4078 4079 4080
    typedef struct {
        void *dummy;
    } mozilla_StyleSheetHandle;

4081
    typedef struct {
4082
        uint64_t mStates;
4083
    } EventStates;
4084

4085 4086 4087 4088
    void BeginUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
    void EndUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
    void BeginLoad(nsIDocument *aDocument);
    void EndLoad(nsIDocument *aDocument);
4089 4090
    void ContentStatesChanged(nsIDocument *aDocument, nsIContent *aContent, EventStates aStateMask);
    void DocumentStatesChanged(nsIDocument *aDocument, EventStates aStateMask);
4091 4092 4093 4094 4095 4096
    void StyleSheetAdded(mozilla_StyleSheetHandle aStyleSheet, bool aDocumentSheet);
    void StyleSheetRemoved(mozilla_StyleSheetHandle aStyleSheet, bool aDocumentSheet);
    void StyleSheetApplicableStateChanged(mozilla_StyleSheetHandle aStyleSheet);
    void StyleRuleChanged(mozilla_StyleSheetHandle aStyleSheet);
    void StyleRuleAdded(mozilla_StyleSheetHandle aStyleSheet);
    void StyleRuleRemoved(mozilla_StyleSheetHandle aStyleSheet);
4097
    void BindToDocument(nsIDocument *aDocument, nsIContent *aContent);
4098
    void AttemptToExecuteScript(nsIContent *aContent, nsIParser *aParser, bool *aBlock);
4099 4100 4101 4102 4103 4104 4105 4106 4107
}

[
    object,
    uuid(3682dd99-8560-44f4-9b8f-ccce9d7b96fb),
    local
]
interface nsIContentUtils : nsISupports
{
4108
    bool IsSafeToRunScript();
4109 4110 4111 4112 4113
    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);
4114
    JSContext *GetContextFromDocument(nsIDocument *aDocument);
4115
}
4116

4117 4118
[
    object,
4119
    uuid(15c05894-408e-4798-b527-a8c32d9c5f8c),
4120 4121 4122 4123 4124
    local
]
interface nsIAudioChannelAgentCallback : nsISupports
{
    nsresult WindowVolumeChanged(float aVolume, bool aMuted);
4125
    nsresult WindowAudioCaptureChanged(bool aCapture);
4126 4127
}

4128 4129
[
    object,
4130
    uuid(8f672000-bab9-4c60-aaaf-2673c4e2a4c6),
4131 4132
    local
]
4133
interface nsIPluginInstance : nsIAudioChannelAgentCallback
4134 4135 4136
{
    nsresult GetDOMElement(nsIDOMElement **aDOMElement);
}
4137

4138 4139
[
    object,
4140
    uuid(11afa8be-d997-4e07-a6a3-6f872ec3ee7f),
4141 4142 4143 4144 4145 4146 4147 4148
    local
]
interface nsIGlobalObject : nsISupports
{
}

[
    object,
4149
    uuid(6f54214c-7175-498d-9d2d-0429e38c2869),
4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175
    local
]
interface nsIXMLHttpRequest : nsISupports
{
    nsresult GetChannel(nsIChannel **aChannel);
    nsresult GetResponseXML(nsIDOMDocument **aResponseXML);
    nsresult GetResponseText(nsAString *aResponseText);
    nsresult GetResponseType(nsAString *aResponseType);
    nsresult SetResponseType(const nsAString *aResponseType);
    nsresult GetResponse(JSContext*cx, int /*JS::MutableHandleValue*/ aResponse);
    nsresult GetStatus(uint32_t *aStatus);
    nsresult GetStatusText(nsACString *aStatusText);
    nsresult SlowAbort();
    nsresult GetAllResponseHeaders(nsACString *_retval);
    nsresult GetResponseHeader(const nsACString *header, nsACString *_retval);
    nsresult Open(const nsACString *method, const nsACString *url, bool async, const nsAString *user, const nsAString *password, uint8_t _argc);
    nsresult Send(nsIVariant *body);
    nsresult SetRequestHeader(const nsACString *header, const nsACString *value);
    nsresult GetTimeout(uint32_t *aTimeout);
    nsresult SetTimeout(uint32_t aTimeout);
    nsresult GetReadyState(uint16_t *aReadyState);
    nsresult SlowOverrideMimeType(const nsAString *mimetype);
    nsresult GetMozBackgroundRequest(bool *aMozBackgroundRequest);
    nsresult SetMozBackgroundRequest(bool aMozBackgroundRequest);
    nsresult GetWithCredentials(bool *aWithCredentials);
    nsresult SetWithCredentials(bool aWithCredentials);
4176
    nsresult Init(nsIPrincipal *principal, nsIScriptContext *scriptContext, nsIGlobalObject *globalObject, nsIURI *baseURI, nsILoadGroup *loadGroup);
4177 4178 4179 4180 4181 4182 4183 4184 4185
    nsresult GetUpload(nsIXMLHttpRequestUpload **aUpload);
    nsresult GetOnreadystatechange(JSContext*cx, int /*JS::MutableHandleValue*/ aOnreadystatechange);
    nsresult SetOnreadystatechange(JSContext*cx, int /*JS::HandleValue*/ aOnreadystatechange);
    nsresult GetMozAnon(bool *aMozAnon);
    nsresult GetMozSystem(bool *aMozSystem);
}

[
    object,
4186
    uuid(b7ae2310-576e-11e5-a837-0800200c9a66),
4187 4188 4189 4190 4191 4192 4193 4194 4195
    local
]
interface nsIScriptSecurityManager : nsISupports {
    nsresult CanCreateWrapper(JSContext *aJSContext, const nsIID *aIID, nsISupports *aObj, nsIClassInfo *aClassInfo);
    nsresult CanCreateInstance(JSContext *aJSContext, const nsCID *aCID);
    nsresult CanGetService(JSContext *aJSContext, const nsCID *aCID);
    nsresult CheckLoadURIFromScript(JSContext *cx, nsIURI *uri);
    nsresult CheckLoadURIWithPrincipal(nsIPrincipal *aPrincipal, nsIURI *uri, uint32_t flags);
    nsresult CheckLoadURIStrWithPrincipal(nsIPrincipal *aPrincipal, const nsACString *uri, uint32_t flags);
4196
    bool ScriptAllowed(JSObject *aGlobal);
4197 4198 4199 4200 4201 4202 4203
    nsresult GetSystemPrincipal(nsIPrincipal **_retval);
    nsresult GetSimpleCodebasePrincipal(nsIURI *aURI, nsIPrincipal **_retval);
    nsresult GetAppCodebasePrincipal(nsIURI *uri, uint32_t appId, bool inMozBrowser, nsIPrincipal **_retval);
    nsresult GetLoadContextCodebasePrincipal(nsIURI *uri, nsILoadContext *loadContext, nsIPrincipal **_retval);
    nsresult GetDocShellCodebasePrincipal(nsIURI *uri, nsIDocShell *docShell, nsIPrincipal **_retval);
    nsresult GetNoAppCodebasePrincipal(nsIURI *uri, nsIPrincipal **_retval);
    nsresult GetCodebasePrincipal(nsIURI *uri, nsIPrincipal **_retval);
4204 4205 4206 4207
    nsresult CreateCodebasePrincipal(nsIURI *uri, int /*JS::HandleValue*/ originAttributes, JSContext* cx, nsIPrincipal **_retval);
    nsresult CreateCodebasePrincipalFromOrigin(const nsACString *origin, nsIPrincipal **_retval);
    nsresult CreateNullPrincipal(int /*JS::HandleValue*/ originAttributes, JSContext *cx, nsIPrincipal **_retval);
    nsresult CreateExpandedPrincipal(nsIPrincipal **aPrincipalArray, uint32_t aLength, nsIPrincipal **_retval);
4208 4209 4210 4211 4212 4213 4214
    nsresult CheckSameOriginURI(nsIURI *aSourceURI, nsIURI *aTargetURI, bool reportError);
    nsresult GetChannelResultPrincipal(nsIChannel *aChannel, nsIPrincipal **_retval);
    nsresult GetChannelURIPrincipal(nsIChannel *aChannel, nsIPrincipal **_retval);
    nsresult IsSystemPrincipal(nsIPrincipal *aPrincipal, bool *_retval);
    nsresult GetJarPrefix(uint32_t appId, bool inMozBrowser, nsACString *_retval);
    nsresult ActivateDomainPolicy(nsIDomainPolicy **_retval);
    nsresult GetDomainPolicyActive(bool *aDomainPolicyActive);
4215 4216
    nsresult ActivateDomainPolicyInternal(nsIDomainPolicy **_retval);
    void CloneDomainPolicy(int /*mozilla::dom::DomainPolicyClone*/ *aClone);
4217 4218 4219
    nsresult PolicyAllowsScript(nsIURI *aDomain, bool *_retval);
}

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