mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
First steps of &JSRef -> JSRef conversion
Replace &JSRef with JSRef in the bulk of the generated code. This will remove a level of indirection throughout all DOM code. This patch doesn't change methods implemented on JSRef<T> to take `self` rather than `&self`, and it leaves a few other uses of &JSRef, but those changes can be made incrementally.
This commit is contained in:
parent
b8f34bbc51
commit
4fa8725111
126 changed files with 994 additions and 992 deletions
|
@ -26,7 +26,7 @@ pub struct CanvasRenderingContext2D {
|
|||
}
|
||||
|
||||
impl CanvasRenderingContext2D {
|
||||
pub fn new_inherited(global: &GlobalRef, canvas: &JSRef<HTMLCanvasElement>, size: Size2D<i32>) -> CanvasRenderingContext2D {
|
||||
pub fn new_inherited(global: &GlobalRef, canvas: JSRef<HTMLCanvasElement>, size: Size2D<i32>) -> CanvasRenderingContext2D {
|
||||
CanvasRenderingContext2D {
|
||||
reflector_: Reflector::new(),
|
||||
global: GlobalField::from_rooted(global),
|
||||
|
@ -35,7 +35,7 @@ impl CanvasRenderingContext2D {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalRef, canvas: &JSRef<HTMLCanvasElement>, size: Size2D<i32>) -> Temporary<CanvasRenderingContext2D> {
|
||||
pub fn new(global: &GlobalRef, canvas: JSRef<HTMLCanvasElement>, size: Size2D<i32>) -> Temporary<CanvasRenderingContext2D> {
|
||||
reflect_dom_object(box CanvasRenderingContext2D::new_inherited(global, canvas, size),
|
||||
global, CanvasRenderingContext2DBinding::Wrap)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue