mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
script: Rename some parent
to child
(#38498)
I believe there was some code migration but name's not been changed. Testing: No behaviour change. Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
parent
0233ad5e40
commit
56033d844a
1 changed files with 4 additions and 4 deletions
|
@ -883,12 +883,12 @@ impl Node {
|
|||
})
|
||||
}
|
||||
|
||||
pub(crate) fn is_inclusive_ancestor_of(&self, parent: &Node) -> bool {
|
||||
self == parent || self.is_ancestor_of(parent)
|
||||
pub(crate) fn is_inclusive_ancestor_of(&self, child: &Node) -> bool {
|
||||
self == child || self.is_ancestor_of(child)
|
||||
}
|
||||
|
||||
pub(crate) fn is_ancestor_of(&self, parent: &Node) -> bool {
|
||||
parent.ancestors().any(|ancestor| &*ancestor == self)
|
||||
pub(crate) fn is_ancestor_of(&self, child: &Node) -> bool {
|
||||
child.ancestors().any(|ancestor| &*ancestor == self)
|
||||
}
|
||||
|
||||
pub(crate) fn is_shadow_including_inclusive_ancestor_of(&self, node: &Node) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue