Issue #2241 - Part 4.1: Get DOMPoint, DOMQuad, DOMRect, DOMMatrix a bit closer to spec.

Backported from Mozilla bug 1186265's part 1.
This commit is contained in:
Job Bautista 2023-05-12 11:35:18 +08:00 committed by roytam1
commit 60c88dd11b
14 changed files with 252 additions and 198 deletions

View file

@ -10,19 +10,26 @@
* liability, trademark and document use rules apply.
*/
[Pref="layout.css.DOMPoint.enabled"]
[Pref="layout.css.DOMPoint.enabled",
Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
optional unrestricted double z = 0, optional unrestricted double w = 1)]
interface DOMPointReadOnly {
[NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other);
readonly attribute unrestricted double x;
readonly attribute unrestricted double y;
readonly attribute unrestricted double z;
readonly attribute unrestricted double w;
[Default] object toJSON();
};
[Pref="layout.css.DOMPoint.enabled",
Constructor(optional DOMPointInit point),
Constructor(unrestricted double x, unrestricted double y,
Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
optional unrestricted double z = 0, optional unrestricted double w = 1)]
interface DOMPoint : DOMPointReadOnly {
[NewObject] static DOMPoint fromPoint(optional DOMPointInit other);
inherit attribute unrestricted double x;
inherit attribute unrestricted double y;
inherit attribute unrestricted double z;
@ -34,4 +41,4 @@ dictionary DOMPointInit {
unrestricted double y = 0;
unrestricted double z = 0;
unrestricted double w = 1;
};
};