mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
736323a779
commit
84bde75b42
64 changed files with 256 additions and 254 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue