mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Format script component
This commit is contained in:
parent
2ca7a13473
commit
c37a345dc9
357 changed files with 25485 additions and 18076 deletions
|
@ -20,37 +20,45 @@ pub struct InputEvent {
|
|||
}
|
||||
|
||||
impl InputEvent {
|
||||
pub fn new(window: &Window,
|
||||
type_: DOMString,
|
||||
can_bubble: bool,
|
||||
cancelable: bool,
|
||||
view: Option<&Window>,
|
||||
detail: i32,
|
||||
data: Option<DOMString>,
|
||||
is_composing: bool) -> DomRoot<InputEvent> {
|
||||
let ev = reflect_dom_object(Box::new(InputEvent {
|
||||
uievent: UIEvent::new_inherited(),
|
||||
data: data,
|
||||
is_composing: is_composing,
|
||||
}),
|
||||
window,
|
||||
InputEventBinding::Wrap);
|
||||
ev.uievent.InitUIEvent(type_, can_bubble, cancelable, view, detail);
|
||||
pub fn new(
|
||||
window: &Window,
|
||||
type_: DOMString,
|
||||
can_bubble: bool,
|
||||
cancelable: bool,
|
||||
view: Option<&Window>,
|
||||
detail: i32,
|
||||
data: Option<DOMString>,
|
||||
is_composing: bool,
|
||||
) -> DomRoot<InputEvent> {
|
||||
let ev = reflect_dom_object(
|
||||
Box::new(InputEvent {
|
||||
uievent: UIEvent::new_inherited(),
|
||||
data: data,
|
||||
is_composing: is_composing,
|
||||
}),
|
||||
window,
|
||||
InputEventBinding::Wrap,
|
||||
);
|
||||
ev.uievent
|
||||
.InitUIEvent(type_, can_bubble, cancelable, view, detail);
|
||||
ev
|
||||
}
|
||||
|
||||
pub fn Constructor(window: &Window,
|
||||
type_: DOMString,
|
||||
init: &InputEventBinding::InputEventInit)
|
||||
-> Fallible<DomRoot<InputEvent>> {
|
||||
let event = InputEvent::new(window,
|
||||
type_,
|
||||
init.parent.parent.bubbles,
|
||||
init.parent.parent.cancelable,
|
||||
init.parent.view.r(),
|
||||
init.parent.detail,
|
||||
init.data.clone(),
|
||||
init.isComposing);
|
||||
pub fn Constructor(
|
||||
window: &Window,
|
||||
type_: DOMString,
|
||||
init: &InputEventBinding::InputEventInit,
|
||||
) -> Fallible<DomRoot<InputEvent>> {
|
||||
let event = InputEvent::new(
|
||||
window,
|
||||
type_,
|
||||
init.parent.parent.bubbles,
|
||||
init.parent.parent.cancelable,
|
||||
init.parent.view.r(),
|
||||
init.parent.detail,
|
||||
init.data.clone(),
|
||||
init.isComposing,
|
||||
);
|
||||
Ok(event)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue