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