2021-12-30 19:15:38 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
2022-09-25 19:38:21 -03:00
|
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
2024-04-26 21:09:58 -03:00
|
|
|
#include <LibWeb/Bindings/TextMetricsPrototype.h>
|
2022-09-02 18:58:31 -03:00
|
|
|
#include <LibWeb/HTML/TextMetrics.h>
|
2023-02-15 15:12:53 -03:00
|
|
|
#include <LibWeb/WebIDL/ExceptionOr.h>
|
2021-12-30 19:15:38 -03:00
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
2023-11-19 15:47:52 -03:00
|
|
|
JS_DEFINE_ALLOCATOR(TextMetrics);
|
|
|
|
|
|
2023-08-13 08:05:26 -03:00
|
|
|
JS::NonnullGCPtr<TextMetrics> TextMetrics::create(JS::Realm& realm)
|
2021-12-30 19:15:38 -03:00
|
|
|
{
|
2023-08-13 08:05:26 -03:00
|
|
|
return realm.heap().allocate<TextMetrics>(realm, realm);
|
2021-12-30 19:15:38 -03:00
|
|
|
}
|
|
|
|
|
|
2022-09-25 19:38:21 -03:00
|
|
|
TextMetrics::TextMetrics(JS::Realm& realm)
|
|
|
|
|
: PlatformObject(realm)
|
2022-09-02 18:58:31 -03:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TextMetrics::~TextMetrics() = default;
|
|
|
|
|
|
2023-08-07 03:41:28 -03:00
|
|
|
void TextMetrics::initialize(JS::Realm& realm)
|
2023-01-10 08:28:20 -03:00
|
|
|
{
|
2023-08-07 03:41:28 -03:00
|
|
|
Base::initialize(realm);
|
2024-03-16 09:13:08 -03:00
|
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(TextMetrics);
|
2023-01-10 08:28:20 -03:00
|
|
|
}
|
|
|
|
|
|
2021-12-30 19:15:38 -03:00
|
|
|
}
|