Issue #2241 - Part 7.2: Implement .fromRect and .fromQuad.

Backported from Mozilla bug 1558101.
This commit is contained in:
Job Bautista 2023-05-12 16:07:16 +08:00 committed by roytam1
commit 4ec35fdcf2
6 changed files with 68 additions and 4 deletions

View file

@ -15,6 +15,9 @@
Constructor(DOMRectReadOnly rect),
Exposed=(Window,Worker)]
interface DOMQuad {
[NewObject] static DOMQuad fromRect(optional DOMRectInit other);
[NewObject] static DOMQuad fromQuad(optional DOMQuadInit other);
[SameObject] readonly attribute DOMPoint p1;
[SameObject] readonly attribute DOMPoint p2;
[SameObject] readonly attribute DOMPoint p3;
@ -34,8 +37,8 @@ dictionary DOMQuadJSON {
};
dictionary DOMQuadInit {
DOMPointInit p1;
DOMPointInit p2;
DOMPointInit p3;
DOMPointInit p4;
DOMPointInit p1 = null;
DOMPointInit p2 = null;
DOMPointInit p3 = null;
DOMPointInit p4 = null;
};