mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
LibWeb: Make DOMPoint and DOMPointReadOnly GC-allocated
This commit is contained in:
parent
a9cae56f8e
commit
44415af428
9 changed files with 78 additions and 43 deletions
25
Userland/Libraries/LibWeb/Geometry/DOMPoint.cpp
Normal file
25
Userland/Libraries/LibWeb/Geometry/DOMPoint.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Geometry/DOMPoint.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
namespace Web::Geometry {
|
||||
|
||||
JS::NonnullGCPtr<DOMPoint> DOMPoint::create_with_global_object(HTML::Window& window, double x, double y, double z, double w)
|
||||
{
|
||||
return *window.heap().allocate<DOMPoint>(window.realm(), window, x, y, z, w);
|
||||
}
|
||||
|
||||
DOMPoint::DOMPoint(HTML::Window& window, double x, double y, double z, double w)
|
||||
: DOMPointReadOnly(window, x, y, z, w)
|
||||
{
|
||||
set_prototype(&window.cached_web_prototype("DOMPoint"));
|
||||
}
|
||||
|
||||
DOMPoint::~DOMPoint() = default;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue