mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Make DOMPoint and DOMPointReadOnly GC-allocated
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 02:47:59 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/44415af428 Pull-request: https://github.com/SerenityOS/serenity/pull/14816 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg ✅
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;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user