mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Implement concept of dirty root
This commit is contained in:
parent
518c0660c6
commit
036f123c4e
11 changed files with 251 additions and 64 deletions
|
@ -296,19 +296,8 @@ impl RangeMethods for Range {
|
|||
|
||||
// https://dom.spec.whatwg.org/#dom-range-commonancestorcontainer
|
||||
fn CommonAncestorContainer(&self) -> DomRoot<Node> {
|
||||
let end_container = self.EndContainer();
|
||||
// Step 1.
|
||||
for container in self
|
||||
.StartContainer()
|
||||
.inclusive_ancestors(ShadowIncluding::No)
|
||||
{
|
||||
// Step 2.
|
||||
if container.is_inclusive_ancestor_of(&end_container) {
|
||||
// Step 3.
|
||||
return container;
|
||||
}
|
||||
}
|
||||
unreachable!();
|
||||
self.EndContainer()
|
||||
.common_ancestor(&self.StartContainer(), ShadowIncluding::No)
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-range-setstart
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue