Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * The origin of this IDL file is
7 * http://www.whatwg.org/specs/web-apps/current-work/#htmlimageelement
8 * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
9 * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
10 * Opera Software ASA. You are granted a license to use, reproduce
11 * and create derivative works of this document.
12 */
14 interface imgINotificationObserver;
15 interface imgIRequest;
16 interface URI;
17 interface MozChannel;
18 interface nsIStreamListener;
20 [NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
21 interface HTMLImageElement : HTMLElement {
22 [SetterThrows]
23 attribute DOMString alt;
24 [SetterThrows]
25 attribute DOMString src;
26 // attribute DOMString srcset;
27 [SetterThrows]
28 attribute DOMString crossOrigin;
29 [SetterThrows]
30 attribute DOMString useMap;
31 [SetterThrows]
32 attribute boolean isMap;
33 [SetterThrows]
34 attribute unsigned long width;
35 [SetterThrows]
36 attribute unsigned long height;
37 readonly attribute unsigned long naturalWidth;
38 readonly attribute unsigned long naturalHeight;
39 readonly attribute boolean complete;
40 };
42 // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
43 partial interface HTMLImageElement {
44 [SetterThrows]
45 attribute DOMString name;
46 [SetterThrows]
47 attribute DOMString align;
48 [SetterThrows]
49 attribute unsigned long hspace;
50 [SetterThrows]
51 attribute unsigned long vspace;
52 [SetterThrows]
53 attribute DOMString longDesc;
55 [TreatNullAs=EmptyString,SetterThrows] attribute DOMString border;
56 };
58 // Mozilla extensions.
59 partial interface HTMLImageElement {
60 attribute DOMString lowsrc;
62 // These attributes are offsets from the closest view (to mimic
63 // NS4's "offset-from-layer" behavior).
64 readonly attribute long x;
65 readonly attribute long y;
66 };
68 [NoInterfaceObject]
69 interface MozImageLoadingContent {
70 // Mirrored chrome-only nsIImageLoadingContent methods. Please make sure
71 // to update this list if nsIImageLoadingContent changes.
72 [ChromeOnly]
73 const long UNKNOWN_REQUEST = -1;
74 [ChromeOnly]
75 const long CURRENT_REQUEST = 0;
76 [ChromeOnly]
77 const long PENDING_REQUEST = 1;
79 [ChromeOnly]
80 attribute boolean loadingEnabled;
81 [ChromeOnly]
82 readonly attribute short imageBlockingStatus;
83 [ChromeOnly]
84 void addObserver(imgINotificationObserver aObserver);
85 [ChromeOnly]
86 void removeObserver(imgINotificationObserver aObserver);
87 [ChromeOnly,Throws]
88 imgIRequest? getRequest(long aRequestType);
89 [ChromeOnly,Throws]
90 long getRequestType(imgIRequest aRequest);
91 [ChromeOnly,Throws]
92 readonly attribute URI? currentURI;
93 [ChromeOnly,Throws]
94 nsIStreamListener? loadImageWithChannel(MozChannel aChannel);
95 [ChromeOnly,Throws]
96 void forceReload();
97 [ChromeOnly]
98 void forceImageState(boolean aForce, unsigned long long aState);
99 };
101 HTMLImageElement implements MozImageLoadingContent;