diff options
author | bors-servo <release+servo@mozilla.com> | 2013-09-18 19:39:47 -0700 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2013-09-18 19:39:47 -0700 |
commit | 7ffcc29d54659cea63dd2769db469473343246c4 (patch) | |
tree | f5b6f454390c5905ec37529dd9f1bc6a552112bd /src/components/script/dom/text.rs | |
parent | 849ff1b754009625243d5abe80f87d24aeab2b40 (diff) | |
parent | 73c1a12f3014289002bdc637b7f3c3fc6bf0fb0d (diff) | |
download | servo-7ffcc29d54659cea63dd2769db469473343246c4.tar.gz servo-7ffcc29d54659cea63dd2769db469473343246c4.zip |
auto merge of #955 : kmcallister/servo/bindings, r=metajack
Diffstat (limited to 'src/components/script/dom/text.rs')
-rw-r--r-- | src/components/script/dom/text.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/script/dom/text.rs b/src/components/script/dom/text.rs index 456e1084538..ae9cf24e02e 100644 --- a/src/components/script/dom/text.rs +++ b/src/components/script/dom/text.rs @@ -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, Fallible, null_str_as_empty}; use dom::characterdata::CharacterData; use dom::node::{AbstractNode, ScriptView, Node, TextNodeTypeId}; use dom::window::Window; @@ -20,16 +20,16 @@ impl Text { } } - pub fn Constructor(owner: @mut Window, text: &DOMString, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> { + pub fn Constructor(owner: @mut Window, text: &DOMString) -> Fallible<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 { Ok(Node::as_abstract_node(cx, @Text::new(null_str_as_empty(text)))) } } - pub fn SplitText(&self, _offset: u32, _rv: &mut ErrorResult) -> AbstractNode<ScriptView> { + pub fn SplitText(&self, _offset: u32) -> Fallible<AbstractNode<ScriptView>> { fail!("unimplemented") } - pub fn GetWholeText(&self, _rv: &mut ErrorResult) -> DOMString { - null_string + pub fn GetWholeText(&self) -> Fallible<DOMString> { + Ok(None) } } |