LegendBox.h 804 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2024, Kostya Farber <kostya.farber@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/Layout/BlockContainer.h>
  8. namespace Web::Layout {
  9. class LegendBox final : public BlockContainer {
  10. GC_CELL(LegendBox, BlockContainer);
  11. GC_DECLARE_ALLOCATOR(LegendBox);
  12. public:
  13. LegendBox(DOM::Document&, DOM::Element&, CSS::StyleProperties);
  14. virtual ~LegendBox() override;
  15. DOM::Element& dom_node() { return static_cast<DOM::Element&>(*Box::dom_node()); }
  16. DOM::Element const& dom_node() const { return static_cast<DOM::Element const&>(*Box::dom_node()); }
  17. private:
  18. virtual bool is_legend_box() const final
  19. {
  20. return true;
  21. }
  22. };
  23. template<>
  24. inline bool Node::fast_is<LegendBox>() const { return is_legend_box(); }
  25. }