style: Refactor children handling.

Moving traversal_children away from TNode I can make TNode trivial enough, in
order to share a QuerySelector implementation between Servo and Gecko.
This commit is contained in:
Emilio Cobos Álvarez 2017-10-16 14:25:25 +02:00
parent 7c2265360f
commit a11d268468
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
9 changed files with 149 additions and 158 deletions

View file

@ -382,7 +382,7 @@ where
let mut any_descendant = false;
let mut sibling_invalidations = InvalidationVector::new();
for child in parent.children() {
for child in parent.dom_children() {
// TODO(emilio): We handle <xbl:children> fine, because they appear
// in selector-matching (note bug 1374247, though).
//

View file

@ -237,7 +237,7 @@ impl StylesheetInvalidationSet {
let mut any_children_invalid = false;
for child in element.as_node().traversal_children() {
for child in element.traversal_children() {
let child = match child.as_element() {
Some(e) => e,
None => continue,