ladybird/Libraries/LibWeb/Layout/ListItemBox.h
Shannon Booth f87041bf3a LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00

38 lines
1.1 KiB
C++

/*
* Copyright (c) 2018-2022, Andreas Kling <andreas@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/DOM/Element.h>
#include <LibWeb/Layout/BlockContainer.h>
namespace Web::Layout {
class ListItemBox final : public BlockContainer {
GC_CELL(ListItemBox, BlockContainer);
GC_DECLARE_ALLOCATOR(ListItemBox);
public:
ListItemBox(DOM::Document&, DOM::Element*, CSS::StyleProperties);
virtual ~ListItemBox() override;
DOM::Element& dom_node() { return static_cast<DOM::Element&>(*BlockContainer::dom_node()); }
DOM::Element const& dom_node() const { return static_cast<DOM::Element const&>(*BlockContainer::dom_node()); }
ListItemMarkerBox const* marker() const { return m_marker; }
void set_marker(GC::Ptr<ListItemMarkerBox>);
private:
virtual bool is_list_item_box() const override { return true; }
virtual void visit_edges(Cell::Visitor&) override;
GC::Ptr<ListItemMarkerBox> m_marker;
};
template<>
inline bool Node::fast_is<ListItemBox>() const { return is_list_item_box(); }
}