mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -56,12 +56,12 @@ impl HTMLBodyElement {
|
|||
impl<'a> HTMLBodyElementMethods for JSRef<'a, HTMLBodyElement> {
|
||||
fn GetOnunload(self) -> Option<EventHandlerNonNull> {
|
||||
let win = window_from_node(self).root();
|
||||
win.GetOnunload()
|
||||
win.r().GetOnunload()
|
||||
}
|
||||
|
||||
fn SetOnunload(self, listener: Option<EventHandlerNonNull>) {
|
||||
let win = window_from_node(self).root();
|
||||
win.SetOnunload(listener)
|
||||
win.r().SetOnunload(listener)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,12 +95,12 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLBodyElement> {
|
|||
"onoffline", "ononline", "onpagehide", "onpageshow", "onpopstate",
|
||||
"onstorage", "onresize", "onunload", "onerror"];
|
||||
let window = window_from_node(*self).root();
|
||||
let (cx, url, reflector) = (window.get_cx(),
|
||||
window.get_url(),
|
||||
window.reflector().get_jsobject());
|
||||
let (cx, url, reflector) = (window.r().get_cx(),
|
||||
window.r().get_url(),
|
||||
window.r().reflector().get_jsobject());
|
||||
let evtarget: JSRef<EventTarget> =
|
||||
if FORWARDED_EVENTS.iter().any(|&event| name == event) {
|
||||
EventTargetCast::from_ref(*window)
|
||||
EventTargetCast::from_ref(window.r())
|
||||
} else {
|
||||
EventTargetCast::from_ref(*self)
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue