mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +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
|
@ -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 => ()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue