Replace Root::deref() calls by Root::r() calls where possible.

This changes those calls that were already sound.
This commit is contained in:
Ms2ger 2015-01-01 12:20:52 +01:00
parent c9f26dfd59
commit 1dad710063
61 changed files with 479 additions and 471 deletions

View file

@ -86,7 +86,7 @@ impl<'a> HTMLCanvasElementMethods for JSRef<'a, HTMLCanvasElement> {
Some(self.context.or_init(|| {
let window = window_from_node(self).root();
let (w, h) = (self.width.get() as i32, self.height.get() as i32);
CanvasRenderingContext2D::new(&GlobalRef::Window(*window), self, Size2D(w, h))
CanvasRenderingContext2D::new(&GlobalRef::Window(window.r()), self, Size2D(w, h))
}))
}
}
@ -118,7 +118,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLCanvasElement> {
if recreate {
let (w, h) = (self.width.get() as i32, self.height.get() as i32);
match self.context.get() {
Some(ref context) => context.root().recreate(Size2D(w, h)),
Some(ref context) => context.root().r().recreate(Size2D(w, h)),
None => ()
}
}
@ -146,7 +146,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLCanvasElement> {
if recreate {
let (w, h) = (self.width.get() as i32, self.height.get() as i32);
match self.context.get() {
Some(ref context) => context.root().recreate(Size2D(w, h)),
Some(ref context) => context.root().r().recreate(Size2D(w, h)),
None => ()
}
}