Replaced DOMString constructor by conversion functions.

Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
This commit is contained in:
Alan Jeffrey 2015-11-11 16:26:53 -06:00
parent 736323a779
commit 84bde75b42
64 changed files with 256 additions and 254 deletions

View file

@ -28,7 +28,6 @@ use msg::constellation_msg::ConstellationChan;
use script_task::ScriptTaskEventCategory::InputEvent;
use script_task::{CommonScriptMsg, Runnable};
use selectors::states::*;
use std::borrow::ToOwned;
use std::cell::Cell;
use string_cache::Atom;
use textinput::{KeyReaction, Lines, TextInput};
@ -63,7 +62,7 @@ impl LayoutHTMLTextAreaElementHelpers for LayoutJS<HTMLTextAreaElement> {
#[allow(unrooted_must_root)]
#[allow(unsafe_code)]
unsafe fn get_value_for_layout(self) -> String {
(*self.unsafe_get()).textinput.borrow_for_layout().get_content().0
String::from((*self.unsafe_get()).textinput.borrow_for_layout().get_content())
}
#[allow(unrooted_must_root)]
@ -174,7 +173,7 @@ impl HTMLTextAreaElementMethods for HTMLTextAreaElement {
// https://html.spec.whatwg.org/multipage/#dom-textarea-type
fn Type(&self) -> DOMString {
DOMString("textarea".to_owned())
DOMString::from("textarea")
}
// https://html.spec.whatwg.org/multipage/#dom-textarea-defaultvalue
@ -238,7 +237,7 @@ impl HTMLTextAreaElement {
let window = window_from_node(self);
let window = window.r();
let event = Event::new(GlobalRef::Window(window),
DOMString("input".to_owned()),
DOMString::from("input"),
EventBubbles::DoesNotBubble,
EventCancelable::NotCancelable);