/* * Copyright (c) 2024, Kostya Farber * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Web::Layout { class FieldSetBox final : public BlockContainer { GC_CELL(FieldSetBox, BlockContainer); GC_DECLARE_ALLOCATOR(FieldSetBox); public: FieldSetBox(DOM::Document&, DOM::Element&, GC::Ref); virtual ~FieldSetBox() override; DOM::Element& dom_node() { return static_cast(*BlockContainer::dom_node()); } DOM::Element const& dom_node() const { return static_cast(*BlockContainer::dom_node()); } bool has_rendered_legend() const; virtual GC::Ptr create_paintable() const override; private: virtual bool is_fieldset_box() const final { return true; } }; template<> inline bool Node::fast_is() const { return is_fieldset_box(); } }