mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
parent
5be084a3b6
commit
68ddc6b4ab
69 changed files with 435 additions and 461 deletions
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::utils::{DOMString, ErrorResult, null_string};
|
||||
use dom::bindings::utils::{DOMString, ErrorResult, null_str_as_empty};
|
||||
use dom::characterdata::CharacterData;
|
||||
use dom::node::{AbstractNode, ScriptView, Node, TextNodeTypeId};
|
||||
use dom::window::Window;
|
||||
|
@ -22,7 +22,7 @@ impl Text {
|
|||
|
||||
pub fn Constructor(owner: @mut Window, text: &DOMString, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> {
|
||||
let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr;
|
||||
unsafe { Node::as_abstract_node(cx, @Text::new(text.to_str())) }
|
||||
unsafe { Node::as_abstract_node(cx, @Text::new(null_str_as_empty(text))) }
|
||||
}
|
||||
|
||||
pub fn SplitText(&self, _offset: u32, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> {
|
||||
|
@ -30,6 +30,6 @@ impl Text {
|
|||
}
|
||||
|
||||
pub fn GetWholeText(&self, _rv: &mut ErrorResult) -> DOMString {
|
||||
null_string
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue