mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-21 18:42:53 +00:00
LibWeb: Add {,de}serialization steps for DOMRect
This commit is contained in:
parent
9f5fa4f4a0
commit
94c6389fc0
Notes:
sideshowbarker
2024-07-17 02:39:10 +09:00
Author: https://github.com/kennethmyhra
Commit: 94c6389fc0
Pull-request: https://github.com/SerenityOS/serenity/pull/23538
Reviewed-by: https://github.com/ADKaster
5 changed files with 23 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue