mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Distinguish between the tree structures used for traversal and selector matching.
This patch renames TNode::parent_element to traversal_parent, since it returns the parent from the perspective of traversal (which in Gecko uses the flattened tree). It also renames TNode::children to traversal_children for the saem reason. We keep parent_element and children functions on TNode to use for selector matching, which must be done on the real DOM tree structure.
This commit is contained in:
parent
c465dd0375
commit
c533097e20
11 changed files with 102 additions and 67 deletions
|
@ -64,7 +64,7 @@ pub fn traverse_dom<E, D>(traversal: &D,
|
|||
// it on the context to make it available to the bottom-up phase.
|
||||
let depth = if token.traverse_unstyled_children_only() {
|
||||
debug_assert!(!D::needs_postorder_traversal());
|
||||
for kid in root.as_node().children() {
|
||||
for kid in root.as_node().traversal_children() {
|
||||
if kid.as_element().map_or(false, |el| el.get_data().is_none()) {
|
||||
nodes.push(unsafe { SendNode::new(kid) });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue