2020-01-18 09:38:21 +01:00
|
|
|
/*
|
2024-10-04 13:19:50 +02:00
|
|
|
* Copyright (c) 2018-2022, Andreas Kling <andreas@ladybird.org>
|
2021-08-09 21:28:56 +02:00
|
|
|
* Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
|
2020-01-18 09:38:21 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
2020-11-22 15:53:01 +01:00
|
|
|
#include <LibWeb/Layout/ListItemBox.h>
|
|
|
|
#include <LibWeb/Layout/ListItemMarkerBox.h>
|
2019-10-11 23:16:53 +02:00
|
|
|
|
2020-11-22 15:53:01 +01:00
|
|
|
namespace Web::Layout {
|
2020-03-07 10:27:02 +01:00
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_DEFINE_ALLOCATOR(ListItemBox);
|
2024-04-06 10:16:04 -07:00
|
|
|
|
2024-12-20 16:35:12 +01:00
|
|
|
ListItemBox::ListItemBox(DOM::Document& document, DOM::Element* element, GC::Ref<CSS::ComputedProperties> style)
|
2022-02-23 20:25:35 +00:00
|
|
|
: Layout::BlockContainer(document, element, move(style))
|
2019-10-11 23:16:53 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-03-14 13:21:51 -06:00
|
|
|
ListItemBox::~ListItemBox() = default;
|
2019-10-11 23:16:53 +02:00
|
|
|
|
2022-10-17 14:41:50 +02:00
|
|
|
void ListItemBox::visit_edges(Cell::Visitor& visitor)
|
|
|
|
{
|
|
|
|
Base::visit_edges(visitor);
|
|
|
|
visitor.visit(m_marker);
|
|
|
|
}
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
void ListItemBox::set_marker(GC::Ptr<ListItemMarkerBox> marker)
|
2019-10-11 23:16:53 +02:00
|
|
|
{
|
2022-02-21 01:43:37 +01:00
|
|
|
m_marker = move(marker);
|
2019-10-11 23:16:53 +02:00
|
|
|
}
|
2020-03-07 10:27:02 +01:00
|
|
|
|
|
|
|
}
|