mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02: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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user