ladybird/Libraries/LibWeb/Layout/LegendBox.h
Aliaksandr Kalenik e76cf3e225 LibWeb: Remove Document.h include from Layout/Node.h
This reduces the recompilation cascade when Document.h is modified.
Add explicit includes to files that relied on the transitive dependency.
2026-02-08 18:51:13 +01:00

35 lines
848 B
C++

/*
* Copyright (c) 2024, Kostya Farber <kostya.farber@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/DOM/Element.h>
#include <LibWeb/Layout/BlockContainer.h>
namespace Web::Layout {
class LegendBox final : public BlockContainer {
GC_CELL(LegendBox, BlockContainer);
GC_DECLARE_ALLOCATOR(LegendBox);
public:
LegendBox(DOM::Document&, DOM::Element&, GC::Ref<CSS::ComputedProperties>);
virtual ~LegendBox() override;
DOM::Element& dom_node() { return static_cast<DOM::Element&>(*Box::dom_node()); }
DOM::Element const& dom_node() const { return static_cast<DOM::Element const&>(*Box::dom_node()); }
private:
virtual bool is_legend_box() const final
{
return true;
}
};
template<>
inline bool Node::fast_is<LegendBox>() const { return is_legend_box(); }
}