summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-23 19:47:05 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-24 15:01:49 +0200
commitca28a118aedae7d35848925bb35bb62ef527cb83 (patch)
tree4233c9ff33653163dd801e85446c5b3a2f02f5be /Userland
parent5a7d3e3cc1e2d798bf2ef11e0958ded9f2385120 (diff)
downloadserenity-ca28a118aedae7d35848925bb35bb62ef527cb83.zip
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&.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/Layout/ListItemBox.h3
1 files changed, 3 insertions, 0 deletions
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<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;
};