diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-03-07 13:31:22 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-03-07 13:31:22 +0100 |
commit | 57291e56094c13c0ccdd02fc126ca04f4abfea9f (patch) | |
tree | 41fa928fd158063e0c8523253c93f9905209c520 /components/script/dom/text.rs | |
parent | b66839367c40bf2557c721cd964feb91d5cf3287 (diff) | |
download | servo-57291e56094c13c0ccdd02fc126ca04f4abfea9f.tar.gz servo-57291e56094c13c0ccdd02fc126ca04f4abfea9f.zip |
Remove obsolete step from Text::SplitText
https://github.com/whatwg/dom/pull/419
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) } |