From 56033d844a21d994ac8a32ed402f01b1a230bd4e Mon Sep 17 00:00:00 2001 From: Euclid Ye Date: Thu, 7 Aug 2025 01:39:38 +0800 Subject: [PATCH] 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 --- components/script/dom/node.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 4fdc4471540..43e623cb72d 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -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 {