mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Rename variables that refer to global objects.
This clarifies whether those variables will point to a Window object or an arbitrary global object. Note in particular that all IDL Constructors will accept an arbitrary global object.
This commit is contained in:
parent
ab1a188e95
commit
f963ed99ac
21 changed files with 95 additions and 92 deletions
|
@ -85,17 +85,17 @@ impl Event {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new_uninitialized(window: &JSRef<Window>) -> Temporary<Event> {
|
||||
pub fn new_uninitialized(global: &JSRef<Window>) -> Temporary<Event> {
|
||||
reflect_dom_object(box Event::new_inherited(HTMLEventTypeId),
|
||||
window,
|
||||
global,
|
||||
EventBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn new(window: &JSRef<Window>,
|
||||
pub fn new(global: &JSRef<Window>,
|
||||
type_: DOMString,
|
||||
can_bubble: bool,
|
||||
cancelable: bool) -> Temporary<Event> {
|
||||
let event = Event::new_uninitialized(window).root();
|
||||
let event = Event::new_uninitialized(global).root();
|
||||
event.deref().InitEvent(type_, can_bubble, cancelable);
|
||||
Temporary::from_rooted(&*event)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue