mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Don't pass nullable strings to native DOM methods that want non-nullable strings. Fixes #1207.
This commit is contained in:
parent
803cd4b7cf
commit
08afc6d19d
75 changed files with 968 additions and 966 deletions
|
@ -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(~"")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue