dom/webidl/HTMLImageElement.webidl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial