mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
Fix step 6 of Range::DeleteContents
This commit is contained in:
parent
d5ce8f308f
commit
0ac931a43e
2 changed files with 1 additions and 16 deletions
|
@ -774,7 +774,7 @@ impl RangeMethods for Range {
|
|||
let mut reference_node = Root::from_ref(start_node);
|
||||
while let Some(parent) = reference_node.GetParentNode() {
|
||||
if parent.is_inclusive_ancestor_of(end_node) {
|
||||
return (parent, reference_node.index())
|
||||
return (parent, reference_node.index() + 1)
|
||||
}
|
||||
reference_node = parent;
|
||||
}
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
[Range-deleteContents.html]
|
||||
type: testharness
|
||||
[Resulting cursor position for range 18 [paras[0\].firstChild, 0, paras[1\].firstChild, 0\]]
|
||||
expected: FAIL
|
||||
|
||||
[Resulting cursor position for range 19 [paras[0\].firstChild, 0, paras[1\].firstChild, 8\]]
|
||||
expected: FAIL
|
||||
|
||||
[Resulting cursor position for range 20 [paras[0\].firstChild, 3, paras[3\], 1\]]
|
||||
expected: FAIL
|
||||
|
||||
[Resulting DOM for range 24 [document, 0, document, 2\]]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -30,9 +21,3 @@
|
|||
[Resulting DOM for range 49 [document, 1, document, 2\]]
|
||||
expected: FAIL
|
||||
|
||||
[Resulting cursor position for range 50 [paras[2\].firstChild, 4, comment, 2\]]
|
||||
expected: FAIL
|
||||
|
||||
[Resulting cursor position for range 51 [paras[3\], 1, comment, 8\]]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue