mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
LibWeb: Correct types in DOMPoint IDL files, and add FIXMEs
Also, the `w` parameters for the constructor default to 1, not 0.
This commit is contained in:
parent
a6f0508f9f
commit
8a78679152
4 changed files with 23 additions and 12 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue