Skip to content

Commit

Permalink
Updated fix #5616, also renamed RevsereChildrenIterator to ReverseSib…
Browse files Browse the repository at this point in the history
…lingIterator
  • Loading branch information
pgonda committed Apr 9, 2015
1 parent 1511d7a commit e7c11f7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions components/script/dom/node.rs
Expand Up @@ -411,10 +411,10 @@ pub trait NodeHelpers<'a> {
fn ancestors(self) -> AncestorIterator;
fn inclusive_ancestors(self) -> AncestorIterator;
fn children(self) -> NodeSiblingIterator;
fn rev_children(self) -> ReverseChildrenIterator;
fn rev_children(self) -> ReverseSiblingIterator;
fn child_elements(self) -> ChildElementIterator;
fn following_siblings(self) -> NodeSiblingIterator;
fn preceding_siblings(self) -> ReverseChildrenIterator;
fn preceding_siblings(self) -> ReverseSiblingIterator;
fn is_in_doc(self) -> bool;
fn is_inclusive_ancestor_of(self, parent: JSRef<Node>) -> bool;
fn is_parent_of(self, child: JSRef<Node>) -> bool;
Expand Down Expand Up @@ -764,8 +764,8 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
}
}

fn preceding_siblings(self) -> ReverseChildrenIterator {
ReverseChildrenIterator {
fn preceding_siblings(self) -> ReverseSiblingIterator {
ReverseSiblingIterator {
current: self.prev_sibling(),
}
}
Expand Down Expand Up @@ -872,8 +872,8 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
}
}

fn rev_children(self) -> ReverseChildrenIterator {
ReverseChildrenIterator {
fn rev_children(self) -> ReverseSiblingIterator {
ReverseSiblingIterator {
current: self.last_child(),
}
}
Expand Down Expand Up @@ -1138,11 +1138,11 @@ impl Iterator for NodeSiblingIterator {
}
}

pub struct ReverseChildrenIterator {
pub struct ReverseSiblingIterator {
current: Option<Temporary<Node>>,
}

impl Iterator for ReverseChildrenIterator {
impl Iterator for ReverseSiblingIterator {
type Item = Temporary<Node>;

fn next(&mut self) -> Option<Temporary<Node>> {
Expand Down

0 comments on commit e7c11f7

Please sign in to comment.