2021-12-31 01:15:38 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
2022-09-03 00:58:31 +03:00
|
|
|
#include <LibWeb/HTML/TextMetrics.h>
|
|
|
|
#include <LibWeb/HTML/Window.h>
|
2021-12-31 01:15:38 +03:00
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
2022-09-03 00:58:31 +03:00
|
|
|
JS::NonnullGCPtr<TextMetrics> TextMetrics::create(HTML::Window& window)
|
2021-12-31 01:15:38 +03:00
|
|
|
{
|
2022-09-03 00:58:31 +03:00
|
|
|
return *window.heap().allocate<TextMetrics>(window.realm(), window);
|
2021-12-31 01:15:38 +03:00
|
|
|
}
|
|
|
|
|
2022-09-03 00:58:31 +03:00
|
|
|
TextMetrics::TextMetrics(HTML::Window& window)
|
|
|
|
: PlatformObject(window.realm())
|
|
|
|
{
|
2022-09-03 19:43:24 +03:00
|
|
|
set_prototype(&window.cached_web_prototype("TextMetrics"));
|
2022-09-03 00:58:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
TextMetrics::~TextMetrics() = default;
|
|
|
|
|
2021-12-31 01:15:38 +03:00
|
|
|
}
|