aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/text.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2013-11-10 14:11:15 +0100
committerMs2ger <ms2ger@gmail.com>2013-11-12 13:57:18 +0100
commit08afc6d19d5875763a241e08534ba952e507b137 (patch)
treea3ca25a011543eb928aa7843cc39931b56063b33 /src/components/script/dom/text.rs
parent803cd4b7cfa0e846d5fa89be04ef4140e6f1a7d2 (diff)
downloadservo-08afc6d19d5875763a241e08534ba952e507b137.tar.gz
servo-08afc6d19d5875763a241e08534ba952e507b137.zip
Don't pass nullable strings to native DOM methods that want non-nullable strings. Fixes #1207.
Diffstat (limited to 'src/components/script/dom/text.rs')
-rw-r--r--src/components/script/dom/text.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/script/dom/text.rs b/src/components/script/dom/text.rs
index b7b49ad3d3d..a0d866b21bd 100644
--- a/src/components/script/dom/text.rs
+++ b/src/components/script/dom/text.rs
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::TextBinding;
-use dom::bindings::utils::{DOMString, Fallible, null_str_as_empty};
+use dom::bindings::utils::{DOMString, Fallible};
use dom::characterdata::CharacterData;
use dom::document::AbstractDocument;
use dom::node::{AbstractNode, ScriptView, Node, TextNodeTypeId};
@@ -26,15 +26,15 @@ impl Text {
Node::reflect_node(@mut node, document, TextBinding::Wrap)
}
- pub fn Constructor(owner: @mut Window, text: &Option<DOMString>) -> Fallible<AbstractNode<ScriptView>> {
- Ok(Text::new(null_str_as_empty(text), owner.Document()))
+ pub fn Constructor(owner: @mut Window, text: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
+ Ok(Text::new(text.clone(), owner.Document()))
}
pub fn SplitText(&self, _offset: u32) -> Fallible<AbstractNode<ScriptView>> {
fail!("unimplemented")
}
- pub fn GetWholeText(&self) -> Fallible<Option<DOMString>> {
- Ok(None)
+ pub fn GetWholeText(&self) -> Fallible<DOMString> {
+ Ok(~"")
}
}