ladybird/Userland/Libraries/LibWeb/HTML/TextMetrics.cpp

26 lines
546 B
C++
Raw Normal View History

/*
* 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>
namespace Web::HTML {
2022-09-03 00:58:31 +03:00
JS::NonnullGCPtr<TextMetrics> TextMetrics::create(HTML::Window& window)
{
2022-09-03 00:58:31 +03:00
return *window.heap().allocate<TextMetrics>(window.realm(), window);
}
2022-09-03 00:58:31 +03:00
TextMetrics::TextMetrics(HTML::Window& window)
: PlatformObject(window.realm())
{
set_prototype(&window.cached_web_prototype("TextMetrics"));
2022-09-03 00:58:31 +03:00
}
TextMetrics::~TextMetrics() = default;
}