2023-06-12 13:55:43 -04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <LibWeb/HTML/HTMLAudioElement.h>
|
|
|
|
#include <LibWeb/Layout/AudioBox.h>
|
|
|
|
#include <LibWeb/Painting/AudioPaintable.h>
|
|
|
|
|
|
|
|
namespace Web::Layout {
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_DEFINE_ALLOCATOR(AudioBox);
|
2024-04-06 10:16:04 -07:00
|
|
|
|
2024-12-20 11:32:17 +01:00
|
|
|
AudioBox::AudioBox(DOM::Document& document, DOM::Element& element, CSS::ComputedProperties style)
|
2023-06-12 13:55:43 -04:00
|
|
|
: ReplacedBox(document, element, move(style))
|
|
|
|
{
|
|
|
|
set_natural_width(300);
|
|
|
|
set_natural_height(40);
|
|
|
|
}
|
|
|
|
|
|
|
|
HTML::HTMLAudioElement& AudioBox::dom_node()
|
|
|
|
{
|
|
|
|
return static_cast<HTML::HTMLAudioElement&>(ReplacedBox::dom_node());
|
|
|
|
}
|
|
|
|
|
|
|
|
HTML::HTMLAudioElement const& AudioBox::dom_node() const
|
|
|
|
{
|
|
|
|
return static_cast<HTML::HTMLAudioElement const&>(ReplacedBox::dom_node());
|
|
|
|
}
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
GC::Ptr<Painting::Paintable> AudioBox::create_paintable() const
|
2023-06-12 13:55:43 -04:00
|
|
|
{
|
|
|
|
return Painting::AudioPaintable::create(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|