rename deprecated utf16_units to encode_utf16

This commit is contained in:
Arpad Borsos 2016-03-07 16:10:42 +01:00
parent 743e0c9c87
commit c880c97b1b
7 changed files with 8 additions and 10 deletions

View file

@ -78,7 +78,7 @@ impl CharacterDataMethods for CharacterData {
// https://dom.spec.whatwg.org/#dom-characterdata-data
fn SetData(&self, data: DOMString) {
let old_length = self.Length();
let new_length = data.utf16_units().count() as u32;
let new_length = data.encode_utf16().count() as u32;
*self.data.borrow_mut() = data;
self.content_changed();
let node = self.upcast::<Node>();
@ -87,7 +87,7 @@ impl CharacterDataMethods for CharacterData {
// https://dom.spec.whatwg.org/#dom-characterdata-length
fn Length(&self) -> u32 {
self.data.borrow().utf16_units().count() as u32
self.data.borrow().encode_utf16().count() as u32
}
// https://dom.spec.whatwg.org/#dom-characterdata-substringdata
@ -151,7 +151,7 @@ impl CharacterDataMethods for CharacterData {
// Steps 8-11.
let node = self.upcast::<Node>();
node.ranges().replace_code_units(
node, offset, count, arg.utf16_units().count() as u32);
node, offset, count, arg.encode_utf16().count() as u32);
Ok(())
}