mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
LibHTML: Add Node::{next,previous}_element_sibling()
These helpers return the next/previous sibling Node that's actually an element. This will be useful in the CSS engine since CSS doesn't care about text nodes.
This commit is contained in:
parent
cad326f323
commit
5a6c36dc91
2 changed files with 22 additions and 0 deletions
|
@ -14,6 +14,7 @@ enum class NodeType : unsigned {
|
|||
};
|
||||
|
||||
class Document;
|
||||
class Element;
|
||||
class HTMLElement;
|
||||
class HTMLAnchorElement;
|
||||
class ParentNode;
|
||||
|
@ -63,6 +64,9 @@ public:
|
|||
|
||||
void set_layout_node(Badge<LayoutNode>, LayoutNode* layout_node) const { m_layout_node = layout_node; }
|
||||
|
||||
const Element* previous_element_sibling() const;
|
||||
const Element* next_element_sibling() const;
|
||||
|
||||
protected:
|
||||
Node(Document&, NodeType);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue