summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-10-05 15:40:31 +0100
committerLinus Groh <mail@linusgroh.de>2022-10-06 21:45:07 +0100
commit8a78679152449c7b99766d030d4c89e8371088cc (patch)
tree235b954fc75ede2f4b9d8152101b6150627ef734 /Userland
parenta6f0508f9fb94b51ec522b5a8d9d133bc72e8f62 (diff)
downloadserenity-8a78679152449c7b99766d030d4c89e8371088cc.zip
LibWeb: Correct types in DOMPoint IDL files, and add FIXMEs
Also, the `w` parameters for the constructor default to 1, not 0.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/Geometry/DOMPoint.h2
-rw-r--r--Userland/Libraries/LibWeb/Geometry/DOMPoint.idl14
-rw-r--r--Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.h2
-rw-r--r--Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.idl17
4 files changed, 23 insertions, 12 deletions
diff --git a/Userland/Libraries/LibWeb/Geometry/DOMPoint.h b/Userland/Libraries/LibWeb/Geometry/DOMPoint.h
index aba7ba31ba..cec9c3ffc3 100644
--- a/Userland/Libraries/LibWeb/Geometry/DOMPoint.h
+++ b/Userland/Libraries/LibWeb/Geometry/DOMPoint.h
@@ -15,7 +15,7 @@ class DOMPoint final : public DOMPointReadOnly {
WEB_PLATFORM_OBJECT(DOMPoint, DOMPointReadOnly);
public:
- static JS::NonnullGCPtr<DOMPoint> construct_impl(JS::Realm&, double x = 0, double y = 0, double z = 0, double w = 0);
+ static JS::NonnullGCPtr<DOMPoint> construct_impl(JS::Realm&, double x = 0, double y = 0, double z = 0, double w = 1);
virtual ~DOMPoint() override;
diff --git a/Userland/Libraries/LibWeb/Geometry/DOMPoint.idl b/Userland/Libraries/LibWeb/Geometry/DOMPoint.idl
index 21084d87a4..1a030782d5 100644
--- a/Userland/Libraries/LibWeb/Geometry/DOMPoint.idl
+++ b/Userland/Libraries/LibWeb/Geometry/DOMPoint.idl
@@ -1,12 +1,16 @@
#import <Geometry/DOMPointReadOnly.idl>
+// https://drafts.fxtf.org/geometry/#dompoint
interface DOMPoint : DOMPointReadOnly {
- constructor(optional double x = 0, optional double y = 0, optional double z = 0, optional double w = 0);
+ constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+ optional unrestricted double z = 0, optional unrestricted double w = 1);
- attribute double x;
- attribute double y;
- attribute double z;
- attribute double w;
+ // FIXME: [NewObject] static DOMPoint fromPoint(optional DOMPointInit other = {});
+
+ inherit attribute unrestricted double x;
+ inherit attribute unrestricted double y;
+ inherit attribute unrestricted double z;
+ inherit attribute unrestricted double w;
};
diff --git a/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.h b/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.h
index 1777bd6e13..276c0ce399 100644
--- a/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.h
+++ b/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.h
@@ -17,7 +17,7 @@ class DOMPointReadOnly : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(DOMPointReadOnly, Bindings::PlatformObject);
public:
- static JS::NonnullGCPtr<DOMPointReadOnly> construct_impl(JS::Realm&, double x = 0, double y = 0, double z = 0, double w = 0);
+ static JS::NonnullGCPtr<DOMPointReadOnly> construct_impl(JS::Realm&, double x = 0, double y = 0, double z = 0, double w = 1);
virtual ~DOMPointReadOnly() override;
diff --git a/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.idl b/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.idl
index 43338b7316..5adc08851f 100644
--- a/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.idl
+++ b/Userland/Libraries/LibWeb/Geometry/DOMPointReadOnly.idl
@@ -1,10 +1,17 @@
+// https://drafts.fxtf.org/geometry/#dompointreadonly
interface DOMPointReadOnly {
- constructor(optional double x = 0, optional double y = 0, optional double z = 0, optional double w = 0);
+ constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
+ optional unrestricted double z = 0, optional unrestricted double w = 1);
- readonly attribute double x;
- readonly attribute double y;
- readonly attribute double z;
- readonly attribute double w;
+ // FIXME: [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;
+
+ // FIXME: DOMPoint matrixTransform(optional DOMMatrixInit matrix = {});
+
+ // FIXME: [Default] object toJSON();
};