/* * Copyright (c) 2018-2022, Andreas Kling * Copyright (c) 2021, Tobias Christiansen * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace Web::Layout { class ListItemMarkerBox final : public Box { public: explicit ListItemMarkerBox(DOM::Document&, CSS::ListStyleType, size_t index, NonnullRefPtr); virtual ~ListItemMarkerBox() override; String const& text() const { return m_text; } virtual RefPtr create_paintable() const override; CSS::ListStyleType list_style_type() const { return m_list_style_type; } private: virtual bool is_list_item_marker_box() const final { return true; } virtual bool can_have_children() const override { return false; } CSS::ListStyleType m_list_style_type { CSS::ListStyleType::None }; size_t m_index; String m_text {}; }; template<> inline bool Node::fast_is() const { return is_list_item_marker_box(); } }