servo: Merge #16054 - Making a few lines in layout_wrapper.rs a bit nicer, fixing #15811 (from vypr:master); r=Wafflespeanut
Source-Repo: https://github.com/servo/servo Source-Revision: 3b15efd2ba72a69520320da99de9f1a0b4100d53
This commit is contained in:
@@ -933,11 +933,12 @@ impl<ConcreteNode> Iterator for ThreadSafeLayoutNodeChildrenIterator<ConcreteNod
|
|||||||
let mut current_node = self.current_node.clone();
|
let mut current_node = self.current_node.clone();
|
||||||
loop {
|
loop {
|
||||||
let next_node = if let Some(ref node) = current_node {
|
let next_node = if let Some(ref node) = current_node {
|
||||||
if node.is_element() &&
|
if let Some(element) = node.as_element() {
|
||||||
node.as_element().unwrap().get_local_name() == &local_name!("summary") &&
|
if element.get_local_name() == &local_name!("summary") &&
|
||||||
node.as_element().unwrap().get_namespace() == &ns!(html) {
|
element.get_namespace() == &ns!(html) {
|
||||||
self.current_node = None;
|
self.current_node = None;
|
||||||
return Some(node.clone());
|
return Some(node.clone());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
unsafe { node.dangerous_next_sibling() }
|
unsafe { node.dangerous_next_sibling() }
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user