Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 */
10 interface imgIRequest;
12 [ChromeOnly, OverrideBuiltins]
13 interface ImageDocument : HTMLDocument {
14 /* Whether the pref for image resizing has been set. */
15 readonly attribute boolean imageResizingEnabled;
17 /* Whether the image is overflowing visible area. */
18 readonly attribute boolean imageIsOverflowing;
20 /* Whether the image has been resized to fit visible area. */
21 readonly attribute boolean imageIsResized;
23 /* The image request being displayed in the content area */
24 [Throws]
25 readonly attribute imgIRequest? imageRequest;
27 /* Resize the image to fit visible area. */
28 void shrinkToFit();
30 /* Restore image original size. */
31 void restoreImage();
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);
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 };