
This means we can instantiate them for pseudo-elements, which don't have an associated Element. They all pass it to their parent as a `Layout::Node*` and handle a lack of `layout_node()` already so this won't affect any functionality.
29 lines
794 B
C++
29 lines
794 B
C++
/*
|
|
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.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 {
|
|
public:
|
|
ListItemBox(DOM::Document&, DOM::Element*, NonnullRefPtr<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(RefPtr<ListItemMarkerBox>);
|
|
|
|
private:
|
|
RefPtr<ListItemMarkerBox> m_marker;
|
|
};
|
|
|
|
}
|