diff options
author | Andreas Kling <kling@serenityos.org> | 2022-03-21 11:19:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-21 13:03:33 +0100 |
commit | f7cfd47b48fdaa9629d762e7204cfdd8e21a0596 (patch) | |
tree | f4195b11bcc4b0f38d1c198d3ac4136fd3afc6bb /Userland/Libraries/LibWeb/Painting | |
parent | b64b5fa8bdb70dd95342660464d9a861abef1e6a (diff) | |
download | serenity-f7cfd47b48fdaa9629d762e7204cfdd8e21a0596.zip |
LibWeb: Add Paintable::dom_node() convenience accessor
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting')
-rw-r--r-- | Userland/Libraries/LibWeb/Painting/Paintable.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/Paintable.h b/Userland/Libraries/LibWeb/Painting/Paintable.h index 75c471d684..d272fa185d 100644 --- a/Userland/Libraries/LibWeb/Painting/Paintable.h +++ b/Userland/Libraries/LibWeb/Painting/Paintable.h @@ -74,6 +74,9 @@ public: Layout::Node const& layout_node() const { return m_layout_node; } Layout::Node& layout_node() { return const_cast<Layout::Node&>(m_layout_node); } + DOM::Node* dom_node() { return layout_node().dom_node(); } + DOM::Node const* dom_node() const { return layout_node().dom_node(); } + auto const& computed_values() const { return m_layout_node.computed_values(); } HTML::BrowsingContext const& browsing_context() const { return m_layout_node.browsing_context(); } @@ -101,12 +104,12 @@ private: inline DOM::Node* HitTestResult::dom_node() { - return paintable->layout_node().dom_node(); + return paintable->dom_node(); } inline DOM::Node const* HitTestResult::dom_node() const { - return paintable->layout_node().dom_node(); + return paintable->dom_node(); } } |