2023-06-12 13:55:43 -04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibWeb/Forward.h>
|
|
|
|
#include <LibWeb/HTML/BrowsingContext.h>
|
|
|
|
#include <LibWeb/Layout/ReplacedBox.h>
|
|
|
|
|
|
|
|
namespace Web::Layout {
|
|
|
|
|
|
|
|
class AudioBox final : public ReplacedBox {
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_CELL(AudioBox, ReplacedBox);
|
|
|
|
GC_DECLARE_ALLOCATOR(AudioBox);
|
2023-06-12 13:55:43 -04:00
|
|
|
|
|
|
|
public:
|
2025-01-04 12:13:40 +01:00
|
|
|
virtual void prepare_for_replaced_layout() override;
|
|
|
|
|
2023-06-12 13:55:43 -04:00
|
|
|
HTML::HTMLAudioElement& dom_node();
|
|
|
|
HTML::HTMLAudioElement const& dom_node() const;
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
virtual GC::Ptr<Painting::Paintable> create_paintable() const override;
|
2023-06-12 13:55:43 -04:00
|
|
|
|
2025-01-04 12:13:40 +01:00
|
|
|
bool should_paint() const;
|
|
|
|
|
2023-06-12 13:55:43 -04:00
|
|
|
private:
|
2024-12-20 16:35:12 +01:00
|
|
|
AudioBox(DOM::Document&, DOM::Element&, GC::Ref<CSS::ComputedProperties>);
|
2023-06-12 13:55:43 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|