mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
Making a few lines in layout_wrapper.rs a bit nicer.
This commit is contained in:
parent
32ca5f3540
commit
fd42e3575a
1 changed files with 6 additions and 5 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue