mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -9,7 +9,6 @@ use dom::event::{Event, EventBubbles, EventCancelable};
|
|||
use dom::eventtarget::EventTarget;
|
||||
use dom::mouseevent::MouseEvent;
|
||||
use dom::node::window_from_node;
|
||||
use std::borrow::ToOwned;
|
||||
use util::str::DOMString;
|
||||
|
||||
/// Trait for elements with defined activation behavior
|
||||
|
@ -47,7 +46,7 @@ pub trait Activatable {
|
|||
// https://html.spec.whatwg.org/multipage/#fire-a-synthetic-mouse-event
|
||||
let win = window_from_node(element);
|
||||
let target = element.upcast();
|
||||
let mouse = MouseEvent::new(win.r(), DOMString("click".to_owned()),
|
||||
let mouse = MouseEvent::new(win.r(), DOMString::from("click"),
|
||||
EventBubbles::DoesNotBubble, EventCancelable::NotCancelable, Some(win.r()), 1,
|
||||
0, 0, 0, 0, ctrlKey, shiftKey, altKey, metaKey,
|
||||
0, None);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue