mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
LibWeb: Add Painting::HitTestResult::dom_node()
This is a convenience accessor to avoid having to say this everywhere: result.paintable->layout_node().dom_node() Instead, you can now do: result.dom_node()
This commit is contained in:
parent
0ba785894c
commit
b64b5fa8bd
2 changed files with 17 additions and 4 deletions
|
@ -32,6 +32,9 @@ struct HitTestResult {
|
|||
After,
|
||||
};
|
||||
InternalPosition internal_position { None };
|
||||
|
||||
DOM::Node* dom_node();
|
||||
DOM::Node const* dom_node() const;
|
||||
};
|
||||
|
||||
enum class HitTestType {
|
||||
|
@ -96,4 +99,14 @@ private:
|
|||
Optional<Layout::BlockContainer*> mutable m_containing_block;
|
||||
};
|
||||
|
||||
inline DOM::Node* HitTestResult::dom_node()
|
||||
{
|
||||
return paintable->layout_node().dom_node();
|
||||
}
|
||||
|
||||
inline DOM::Node const* HitTestResult::dom_node() const
|
||||
{
|
||||
return paintable->layout_node().dom_node();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue