mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Updated reflect_dom_object to be passed by value
This commit is contained in:
parent
9cea3ce266
commit
2cbf5a3671
51 changed files with 75 additions and 75 deletions
|
@ -88,13 +88,13 @@ impl Event {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new_uninitialized(global: &GlobalRef) -> Temporary<Event> {
|
||||
pub fn new_uninitialized(global: GlobalRef) -> Temporary<Event> {
|
||||
reflect_dom_object(box Event::new_inherited(HTMLEventTypeId),
|
||||
global,
|
||||
EventBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalRef,
|
||||
pub fn new(global: GlobalRef,
|
||||
type_: DOMString,
|
||||
bubbles: EventBubbles,
|
||||
cancelable: EventCancelable) -> Temporary<Event> {
|
||||
|
@ -108,7 +108,7 @@ impl Event {
|
|||
init: &EventBinding::EventInit) -> Fallible<Temporary<Event>> {
|
||||
let bubbles = if init.bubbles { Bubbles } else { DoesNotBubble };
|
||||
let cancelable = if init.cancelable { Cancelable } else { NotCancelable };
|
||||
Ok(Event::new(global, type_, bubbles, cancelable))
|
||||
Ok(Event::new(*global, type_, bubbles, cancelable))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue