mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Renaming NodeChildrenIterator to NodeSiblingIterator, fix #5616
This commit is contained in:
parent
88aa07b7e0
commit
0eace5bed8
1 changed files with 12 additions and 12 deletions
|
@ -411,10 +411,10 @@ impl<'a> Iterator for QuerySelectorIterator<'a> {
|
|||
pub trait NodeHelpers<'a> {
|
||||
fn ancestors(self) -> AncestorIterator;
|
||||
fn inclusive_ancestors(self) -> AncestorIterator;
|
||||
fn children(self) -> NodeChildrenIterator;
|
||||
fn children(self) -> NodeSiblingIterator;
|
||||
fn rev_children(self) -> ReverseChildrenIterator;
|
||||
fn child_elements(self) -> ChildElementIterator;
|
||||
fn following_siblings(self) -> NodeChildrenIterator;
|
||||
fn following_siblings(self) -> NodeSiblingIterator;
|
||||
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;
|
||||
|
@ -485,7 +485,7 @@ pub trait NodeHelpers<'a> {
|
|||
fn debug_str(self) -> String;
|
||||
|
||||
fn traverse_preorder(self) -> TreeIterator<'a>;
|
||||
fn inclusively_following_siblings(self) -> NodeChildrenIterator;
|
||||
fn inclusively_following_siblings(self) -> NodeSiblingIterator;
|
||||
|
||||
fn to_trusted_node_address(self) -> TrustedNodeAddress;
|
||||
|
||||
|
@ -748,8 +748,8 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
|
|||
TreeIterator::new(self)
|
||||
}
|
||||
|
||||
fn inclusively_following_siblings(self) -> NodeChildrenIterator {
|
||||
NodeChildrenIterator {
|
||||
fn inclusively_following_siblings(self) -> NodeSiblingIterator {
|
||||
NodeSiblingIterator {
|
||||
current: Some(Temporary::from_rooted(self)),
|
||||
}
|
||||
}
|
||||
|
@ -758,8 +758,8 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
|
|||
self == parent || parent.ancestors().any(|ancestor| ancestor.root().r() == self)
|
||||
}
|
||||
|
||||
fn following_siblings(self) -> NodeChildrenIterator {
|
||||
NodeChildrenIterator {
|
||||
fn following_siblings(self) -> NodeSiblingIterator {
|
||||
NodeSiblingIterator {
|
||||
current: self.next_sibling(),
|
||||
}
|
||||
}
|
||||
|
@ -860,8 +860,8 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
|
|||
self.owner_doc().root().r().is_html_document()
|
||||
}
|
||||
|
||||
fn children(self) -> NodeChildrenIterator {
|
||||
NodeChildrenIterator {
|
||||
fn children(self) -> NodeSiblingIterator {
|
||||
NodeSiblingIterator {
|
||||
current: self.first_child.get(),
|
||||
}
|
||||
}
|
||||
|
@ -1112,14 +1112,14 @@ impl RawLayoutNodeHelpers for Node {
|
|||
//
|
||||
|
||||
pub type ChildElementIterator =
|
||||
Peekable<FilterMap<NodeChildrenIterator,
|
||||
Peekable<FilterMap<NodeSiblingIterator,
|
||||
fn(Temporary<Node>) -> Option<Temporary<Element>>>>;
|
||||
|
||||
pub struct NodeChildrenIterator {
|
||||
pub struct NodeSiblingIterator {
|
||||
current: Option<Temporary<Node>>,
|
||||
}
|
||||
|
||||
impl Iterator for NodeChildrenIterator {
|
||||
impl Iterator for NodeSiblingIterator {
|
||||
type Item = Temporary<Node>;
|
||||
|
||||
fn next(&mut self) -> Option<Temporary<Node>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue