dom/webidl/ImageDocument.webidl

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:3b416bbf3fea
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 * content/html/document/public/nsIImageDocument.idl
8 */
9
10 interface imgIRequest;
11
12 [ChromeOnly, OverrideBuiltins]
13 interface ImageDocument : HTMLDocument {
14 /* Whether the pref for image resizing has been set. */
15 readonly attribute boolean imageResizingEnabled;
16
17 /* Whether the image is overflowing visible area. */
18 readonly attribute boolean imageIsOverflowing;
19
20 /* Whether the image has been resized to fit visible area. */
21 readonly attribute boolean imageIsResized;
22
23 /* The image request being displayed in the content area */
24 [Throws]
25 readonly attribute imgIRequest? imageRequest;
26
27 /* Resize the image to fit visible area. */
28 void shrinkToFit();
29
30 /* Restore image original size. */
31 void restoreImage();
32
33 /* Restore the image, trying to keep a certain pixel in the same position.
34 * The coordinate system is that of the shrunken image.
35 */
36 void restoreImageTo(long x, long y);
37
38 /* A helper method for switching between states.
39 * The switching logic is as follows. If the image has been resized
40 * restore image original size, otherwise if the image is overflowing
41 * current visible area resize the image to fit the area.
42 */
43 void toggleImageSize();
44 };

mercurial