diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-11-04 19:37:52 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-11-04 20:45:47 +0100 |
commit | 715d7a8532caa0d6b818020f4c2f47e85791d2bf (patch) | |
tree | d5e23105b82ef18459183cc533578aee0f4ac7c7 /Libraries/LibHTML/DOM/Document.cpp | |
parent | 2946b0e2d48d637c8058ef94141ad8b023ef189a (diff) | |
download | serenity-715d7a8532caa0d6b818020f4c2f47e85791d2bf.zip |
LibHTML: Add a convenient way to get from any layout node to the root
Diffstat (limited to 'Libraries/LibHTML/DOM/Document.cpp')
-rw-r--r-- | Libraries/LibHTML/DOM/Document.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Libraries/LibHTML/DOM/Document.cpp b/Libraries/LibHTML/DOM/Document.cpp index da43fa7b15..14d5c56f24 100644 --- a/Libraries/LibHTML/DOM/Document.cpp +++ b/Libraries/LibHTML/DOM/Document.cpp @@ -239,6 +239,11 @@ const LayoutDocument* Document::layout_node() const return static_cast<const LayoutDocument*>(Node::layout_node()); } +LayoutDocument* Document::layout_node() +{ + return static_cast<LayoutDocument*>(Node::layout_node()); +} + void Document::set_hovered_node(Node* node) { if (m_hovered_node == node) |