mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Replace Root::deref() calls by Root::r() calls where possible.
This changes those calls that were already sound.
This commit is contained in:
parent
c9f26dfd59
commit
1dad710063
61 changed files with 479 additions and 471 deletions
|
@ -82,17 +82,17 @@ impl KeyboardEvent {
|
|||
char_code: Option<u32>,
|
||||
key_code: u32) -> Temporary<KeyboardEvent> {
|
||||
let ev = KeyboardEvent::new_uninitialized(window).root();
|
||||
ev.deref().InitKeyboardEvent(type_, canBubble, cancelable, view, key, location,
|
||||
"".into_string(), repeat, "".into_string());
|
||||
*ev.code.borrow_mut() = code;
|
||||
ev.ctrl.set(ctrlKey);
|
||||
ev.alt.set(altKey);
|
||||
ev.shift.set(shiftKey);
|
||||
ev.meta.set(metaKey);
|
||||
ev.char_code.set(char_code);
|
||||
ev.key_code.set(key_code);
|
||||
ev.is_composing.set(isComposing);
|
||||
Temporary::from_rooted(*ev)
|
||||
ev.r().InitKeyboardEvent(type_, canBubble, cancelable, view, key, location,
|
||||
"".into_string(), repeat, "".into_string());
|
||||
*ev.r().code.borrow_mut() = code;
|
||||
ev.r().ctrl.set(ctrlKey);
|
||||
ev.r().alt.set(altKey);
|
||||
ev.r().shift.set(shiftKey);
|
||||
ev.r().meta.set(metaKey);
|
||||
ev.r().char_code.set(char_code);
|
||||
ev.r().key_code.set(key_code);
|
||||
ev.r().is_composing.set(isComposing);
|
||||
Temporary::from_rooted(ev.r())
|
||||
}
|
||||
|
||||
pub fn Constructor(global: &GlobalRef,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue