mirror of
https://github.com/servo/servo.git
synced 2025-06-21 23:59:00 +01:00
Rename first_contained_child & last_contained_child to first_partially_contained_child & last_partially_contained_child (#33758)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
5ba8054b69
commit
30cbf01280
1 changed files with 13 additions and 13 deletions
|
@ -52,7 +52,7 @@ pub struct Range {
|
||||||
associated_selections: DomRefCell<Vec<Dom<Selection>>>,
|
associated_selections: DomRefCell<Vec<Dom<Selection>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct ContainedChildren {
|
struct ContainedChildren {
|
||||||
first_partially_contained_child: Option<DomRoot<Node>>,
|
first_partially_contained_child: Option<DomRoot<Node>>,
|
||||||
last_partially_contained_child: Option<DomRoot<Node>>,
|
last_partially_contained_child: Option<DomRoot<Node>>,
|
||||||
contained_children: Vec<DomRoot<Node>>,
|
contained_children: Vec<DomRoot<Node>>,
|
||||||
|
@ -161,7 +161,7 @@ impl Range {
|
||||||
// Steps 5-6.
|
// Steps 5-6.
|
||||||
let common_ancestor = self.CommonAncestorContainer();
|
let common_ancestor = self.CommonAncestorContainer();
|
||||||
|
|
||||||
let first_contained_child = if start_node.is_inclusive_ancestor_of(&end_node) {
|
let first_partially_contained_child = if start_node.is_inclusive_ancestor_of(&end_node) {
|
||||||
// Step 7.
|
// Step 7.
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
|
@ -171,7 +171,7 @@ impl Range {
|
||||||
.find(|node| Range::partially_contains(self, node))
|
.find(|node| Range::partially_contains(self, node))
|
||||||
};
|
};
|
||||||
|
|
||||||
let last_contained_child = if end_node.is_inclusive_ancestor_of(&start_node) {
|
let last_partially_contained_child = if end_node.is_inclusive_ancestor_of(&start_node) {
|
||||||
// Step 9.
|
// Step 9.
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
|
@ -193,8 +193,8 @@ impl Range {
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(ContainedChildren {
|
Ok(ContainedChildren {
|
||||||
first_partially_contained_child: first_contained_child,
|
first_partially_contained_child,
|
||||||
last_partially_contained_child: last_contained_child,
|
last_partially_contained_child,
|
||||||
contained_children,
|
contained_children,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -584,12 +584,12 @@ impl RangeMethods for Range {
|
||||||
|
|
||||||
// Steps 5-12.
|
// Steps 5-12.
|
||||||
let ContainedChildren {
|
let ContainedChildren {
|
||||||
first_partially_contained_child: first_contained_child,
|
first_partially_contained_child,
|
||||||
last_partially_contained_child: last_contained_child,
|
last_partially_contained_child,
|
||||||
contained_children,
|
contained_children,
|
||||||
} = self.contained_children()?;
|
} = self.contained_children()?;
|
||||||
|
|
||||||
if let Some(child) = first_contained_child {
|
if let Some(child) = first_partially_contained_child {
|
||||||
// Step 13.
|
// Step 13.
|
||||||
if let Some(cdata) = child.downcast::<CharacterData>() {
|
if let Some(cdata) = child.downcast::<CharacterData>() {
|
||||||
assert!(child == start_node);
|
assert!(child == start_node);
|
||||||
|
@ -629,7 +629,7 @@ impl RangeMethods for Range {
|
||||||
fragment.upcast::<Node>().AppendChild(&clone)?;
|
fragment.upcast::<Node>().AppendChild(&clone)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(child) = last_contained_child {
|
if let Some(child) = last_partially_contained_child {
|
||||||
// Step 16.
|
// Step 16.
|
||||||
if let Some(cdata) = child.downcast::<CharacterData>() {
|
if let Some(cdata) = child.downcast::<CharacterData>() {
|
||||||
assert!(child == end_node);
|
assert!(child == end_node);
|
||||||
|
@ -701,8 +701,8 @@ impl RangeMethods for Range {
|
||||||
|
|
||||||
// Steps 5-12.
|
// Steps 5-12.
|
||||||
let ContainedChildren {
|
let ContainedChildren {
|
||||||
first_partially_contained_child: first_contained_child,
|
first_partially_contained_child,
|
||||||
last_partially_contained_child: last_contained_child,
|
last_partially_contained_child,
|
||||||
contained_children,
|
contained_children,
|
||||||
} = self.contained_children()?;
|
} = self.contained_children()?;
|
||||||
|
|
||||||
|
@ -723,7 +723,7 @@ impl RangeMethods for Range {
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(child) = first_contained_child {
|
if let Some(child) = first_partially_contained_child {
|
||||||
if let Some(start_data) = child.downcast::<CharacterData>() {
|
if let Some(start_data) = child.downcast::<CharacterData>() {
|
||||||
assert!(child == start_node);
|
assert!(child == start_node);
|
||||||
// Step 15.1.
|
// Step 15.1.
|
||||||
|
@ -768,7 +768,7 @@ impl RangeMethods for Range {
|
||||||
fragment.upcast::<Node>().AppendChild(&child)?;
|
fragment.upcast::<Node>().AppendChild(&child)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(child) = last_contained_child {
|
if let Some(child) = last_partially_contained_child {
|
||||||
if let Some(end_data) = child.downcast::<CharacterData>() {
|
if let Some(end_data) = child.downcast::<CharacterData>() {
|
||||||
assert!(child == end_node);
|
assert!(child == end_node);
|
||||||
// Step 18.1.
|
// Step 18.1.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue