Rustfmt some of script.

This commit is contained in:
Ms2ger 2015-11-17 16:52:17 +01:00
parent ceb72e54e4
commit 0c61be7a57
50 changed files with 1499 additions and 885 deletions

View file

@ -31,7 +31,11 @@ pub trait Activatable {
fn implicit_submission(&self, ctrlKey: bool, shiftKey: bool, altKey: bool, metaKey: bool);
// https://html.spec.whatwg.org/multipage/#run-synthetic-click-activation-steps
fn synthetic_click_activation(&self, ctrlKey: bool, shiftKey: bool, altKey: bool, metaKey: bool) {
fn synthetic_click_activation(&self,
ctrlKey: bool,
shiftKey: bool,
altKey: bool,
metaKey: bool) {
let element = self.as_element();
// Step 1
if element.click_in_progress() {
@ -46,10 +50,22 @@ 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::from("click"),
EventBubbles::DoesNotBubble, EventCancelable::NotCancelable, Some(win.r()), 1,
0, 0, 0, 0, ctrlKey, shiftKey, altKey, metaKey,
0, None);
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);
let event = mouse.upcast::<Event>();
event.fire(target);