1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 15:35:07 +00:00
serenity/Userland/Libraries/LibWeb/Layout/ListItemBox.h
Andreas Kling ca28a118ae LibWeb: Add tightly-typed DOM node accessors for Layout::ListItemBox
ListItemBox is always constructed with a non-null DOM::Element, so we
can make dom_node() return a DOM::Element&.
2021-09-24 15:01:49 +02:00

30 lines
709 B
C++

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/DOM/Element.h>
#include <LibWeb/Layout/BlockBox.h>
namespace Web::Layout {
class ListItemMarkerBox;
class ListItemBox final : public BlockBox {
public:
ListItemBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>);
virtual ~ListItemBox() override;
void layout_marker();
DOM::Element& dom_node() { return static_cast<DOM::Element&>(*BlockBox::dom_node()); }
DOM::Element const& dom_node() const { return static_cast<DOM::Element const&>(*BlockBox::dom_node()); }
private:
RefPtr<ListItemMarkerBox> m_marker;
};
}