1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

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&.
This commit is contained in:
Andreas Kling 2021-09-23 19:47:05 +02:00
parent 5a7d3e3cc1
commit ca28a118ae

View file

@ -20,6 +20,9 @@ public:
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;
};