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/.
6 * The origin of this IDL file is:
7 * dom/html/public/nsIImageDocument.idl
10 interface imgIRequest;
12 [ChromeOnly, OverrideBuiltins,
14 interface ImageDocument : HTMLDocument {
15 /* Whether the image is overflowing visible area. */
16 readonly attribute boolean imageIsOverflowing;
18 /* Whether the image has been resized to fit visible area. */
19 readonly attribute boolean imageIsResized;
21 /* The image request being displayed in the content area */
23 readonly attribute imgIRequest? imageRequest;
25 /* Resize the image to fit visible area. */
28 /* Restore image original size. */
31 /* Restore the image, trying to keep a certain pixel in the same position.
32 * The coordinate system is that of the shrunken image.
34 void restoreImageTo(long x, long y);
36 /* A helper method for switching between states.
37 * The switching logic is as follows. If the image has been resized
38 * restore image original size, otherwise if the image is overflowing
39 * current visible area resize the image to fit the area.
41 void toggleImageSize();