diff options
Diffstat (limited to 'components/script/dom/text.rs')
-rw-r--r-- | components/script/dom/text.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/components/script/dom/text.rs b/components/script/dom/text.rs index dd2a85ec63f..0343b373931 100644 --- a/components/script/dom/text.rs +++ b/components/script/dom/text.rs @@ -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) } |