diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-23 19:47:05 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-24 15:01:49 +0200 |
commit | ca28a118aedae7d35848925bb35bb62ef527cb83 (patch) | |
tree | 4233c9ff33653163dd801e85446c5b3a2f02f5be | |
parent | 5a7d3e3cc1e2d798bf2ef11e0958ded9f2385120 (diff) | |
download | serenity-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&.
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/ListItemBox.h | 3 |
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; }; |