diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-03 20:30:02 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-03 20:30:02 +0200 |
commit | d367044e67e17316521aa82a72698a3ea3914014 (patch) | |
tree | 703735f7e585070d61b1c3ac7a19bee19535aed1 /Libraries/LibWeb/DOM/Node.cpp | |
parent | 6e221adade45fa4dfc6408c2636b0ddc1a350911 (diff) | |
download | serenity-d367044e67e17316521aa82a72698a3ea3914014.zip |
LibWeb: Move "element sibling" getters to NonDocumentTypeChildNode
Here's another CRTP mixin since that's the best we can do with C++.
This prepares exposing these via IDL on Element and CharacterData.
Diffstat (limited to 'Libraries/LibWeb/DOM/Node.cpp')
-rw-r--r-- | Libraries/LibWeb/DOM/Node.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/Libraries/LibWeb/DOM/Node.cpp b/Libraries/LibWeb/DOM/Node.cpp index 4370a540c6..b6a51ddfe2 100644 --- a/Libraries/LibWeb/DOM/Node.cpp +++ b/Libraries/LibWeb/DOM/Node.cpp @@ -92,24 +92,6 @@ String Node::text_content() const return builder.to_string(); } -const Element* Node::next_element_sibling() const -{ - for (auto* node = next_sibling(); node; node = node->next_sibling()) { - if (node->is_element()) - return static_cast<const Element*>(node); - } - return nullptr; -} - -const Element* Node::previous_element_sibling() const -{ - for (auto* node = previous_sibling(); node; node = node->previous_sibling()) { - if (node->is_element()) - return static_cast<const Element*>(node); - } - return nullptr; -} - RefPtr<LayoutNode> Node::create_layout_node(const CSS::StyleProperties*) { return nullptr; |