Remove obsolete step from Text::SplitText

https://github.com/whatwg/dom/pull/419
This commit is contained in:
Anthony Ramine 2017-03-07 13:31:22 +01:00
parent b66839367c
commit 57291e5609
2 changed files with 3 additions and 12 deletions

View file

@ -43,7 +43,8 @@ impl Text {
}
impl TextMethods for Text {
// https://dom.spec.whatwg.org/#dom-text-splittextoffset
// https://dom.spec.whatwg.org/#dom-text-splittext
// https://dom.spec.whatwg.org/#concept-text-split
fn SplitText(&self, offset: u32) -> Fallible<Root<Text>> {
let cdata = self.upcast::<CharacterData>();
// Step 1.
@ -72,11 +73,7 @@ impl TextMethods for Text {
}
// Step 8.
cdata.DeleteData(offset, count).unwrap();
if parent.is_none() {
// Step 9.
node.ranges().clamp_above(&node, offset);
}
// Step 10.
// Step 9.
Ok(new_node)
}