diff options
Diffstat (limited to 'src/components/script/dom/clientrect.rs')
-rw-r--r-- | src/components/script/dom/clientrect.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/script/dom/clientrect.rs b/src/components/script/dom/clientrect.rs index ad48fe15d86..316269bfc56 100644 --- a/src/components/script/dom/clientrect.rs +++ b/src/components/script/dom/clientrect.rs @@ -19,7 +19,7 @@ pub struct ClientRect { } impl ClientRect { - pub fn new_inherited(window: JS<Window>, + pub fn new_inherited(window: &JSRef<Window>, top: Au, bottom: Au, left: Au, right: Au) -> ClientRect { ClientRect { @@ -28,14 +28,14 @@ impl ClientRect { left: left.to_nearest_px() as f32, right: right.to_nearest_px() as f32, reflector_: Reflector::new(), - window: window, + window: window.unrooted(), } } pub fn new(window: &JSRef<Window>, top: Au, bottom: Au, left: Au, right: Au) -> Temporary<ClientRect> { - let rect = ClientRect::new_inherited(window.unrooted(), top, bottom, left, right); + let rect = ClientRect::new_inherited(window, top, bottom, left, right); reflect_dom_object(~rect, window, ClientRectBinding::Wrap) } } |