From ca28a118aedae7d35848925bb35bb62ef527cb83 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 23 Sep 2021 19:47:05 +0200 Subject: 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&. --- Userland/Libraries/LibWeb/Layout/ListItemBox.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibWeb/Layout/ListItemBox.h b/Userland/Libraries/LibWeb/Layout/ListItemBox.h index e72c53d3fa..2f31d5fa42 100644 --- a/Userland/Libraries/LibWeb/Layout/ListItemBox.h +++ b/Userland/Libraries/LibWeb/Layout/ListItemBox.h @@ -20,6 +20,9 @@ public: void layout_marker(); + DOM::Element& dom_node() { return static_cast(*BlockBox::dom_node()); } + DOM::Element const& dom_node() const { return static_cast(*BlockBox::dom_node()); } + private: RefPtr m_marker; }; -- cgit v1.2.3