ladybird/Libraries/LibWeb/HTML/HTMLAudioElement.h
Zaggy1024 bc60768cb0 LibWeb: Rewrite audio elements without controls to display:none
This is part of the rendering spec, but we had neglected to do this
before. It causes one WPT check to fail, but other browsers get the
same result on that check, so I guess we can call that a win. :^)
2026-02-23 07:27:31 +01:00

35 lines
819 B
C++

/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/HTML/HTMLMediaElement.h>
namespace Web::HTML {
class HTMLAudioElement final : public HTMLMediaElement {
WEB_PLATFORM_OBJECT(HTMLAudioElement, HTMLMediaElement);
GC_DECLARE_ALLOCATOR(HTMLAudioElement);
public:
virtual ~HTMLAudioElement() override;
virtual void adjust_computed_style(CSS::ComputedProperties& style) override;
Layout::AudioBox* layout_node();
Layout::AudioBox const* layout_node() const;
bool should_paint() const;
private:
HTMLAudioElement(DOM::Document&, DOM::QualifiedName);
virtual void initialize(JS::Realm&) override;
virtual GC::Ptr<Layout::Node> create_layout_node(GC::Ref<CSS::ComputedProperties>) override;
};
}