mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 04:08:08 +00:00
LibWeb: Add {,de}serialization steps for DOMRect
This commit is contained in:
committed by
Andreas Kling
parent
9f5fa4f4a0
commit
94c6389fc0
@@ -22,6 +22,11 @@ JS::NonnullGCPtr<DOMRect> DOMRect::create(JS::Realm& realm, Gfx::FloatRect const
|
||||
return realm.heap().allocate<DOMRect>(realm, realm, rect.x(), rect.y(), rect.width(), rect.height());
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<DOMRect> DOMRect::create(JS::Realm& realm)
|
||||
{
|
||||
return realm.heap().allocate<DOMRect>(realm, realm);
|
||||
}
|
||||
|
||||
// https://drafts.fxtf.org/geometry/#create-a-domrect-from-the-dictionary
|
||||
JS::NonnullGCPtr<DOMRect> DOMRect::from_rect(JS::VM& vm, Geometry::DOMRectInit const& other)
|
||||
{
|
||||
@@ -34,6 +39,11 @@ DOMRect::DOMRect(JS::Realm& realm, double x, double y, double width, double heig
|
||||
{
|
||||
}
|
||||
|
||||
DOMRect::DOMRect(JS::Realm& realm)
|
||||
: DOMRectReadOnly(realm)
|
||||
{
|
||||
}
|
||||
|
||||
DOMRect::~DOMRect() = default;
|
||||
|
||||
void DOMRect::initialize(JS::Realm& realm)
|
||||
|
||||
Reference in New Issue
Block a user