Bug 1885489 - Part 5: Add SnapshotIterator::readInt32(). r=iain
[gecko.git] / dom / webidl / DOMRect.webidl
blobc1c7e5c8c4f44ee05ec32029d9a63a420fc99ca6
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
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://drafts.fxtf.org/geometry/
8  *
9  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10  * liability, trademark and document use rules apply.
11  */
13 [Exposed=(Window,Worker),
14  Serializable]
15 interface DOMRect : DOMRectReadOnly {
16     constructor(optional unrestricted double x = 0,
17                 optional unrestricted double y = 0,
18                 optional unrestricted double width = 0,
19                 optional unrestricted double height = 0);
21     [NewObject] static DOMRect fromRect(optional DOMRectInit other = {});
23     inherit attribute unrestricted double x;
24     inherit attribute unrestricted double y;
25     inherit attribute unrestricted double width;
26     inherit attribute unrestricted double height;
29 [ProbablyShortLivingWrapper,
30  Exposed=(Window,Worker),
31  Serializable]
32 interface DOMRectReadOnly {
33     constructor(optional unrestricted double x = 0,
34                 optional unrestricted double y = 0,
35                 optional unrestricted double width = 0,
36                 optional unrestricted double height = 0);
38     [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other = {});
40     readonly attribute unrestricted double x;
41     readonly attribute unrestricted double y;
42     readonly attribute unrestricted double width;
43     readonly attribute unrestricted double height;
44     readonly attribute unrestricted double top;
45     readonly attribute unrestricted double right;
46     readonly attribute unrestricted double bottom;
47     readonly attribute unrestricted double left;
49     [Default] object toJSON();
52 dictionary DOMRectInit {
53     unrestricted double x = 0;
54     unrestricted double y = 0;
55     unrestricted double width = 0;
56     unrestricted double height = 0;