diff options
author | Josh Matthews <josh@joshmatthews.net> | 2014-04-18 00:12:52 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-05-03 14:18:31 -0400 |
commit | 0f2d0b1dc3d98ef109627dda061c5a54ff06a91d (patch) | |
tree | a698b4eb0829079f09ad862c43a4eb1101c78e40 /src/components/script/dom/clientrect.rs | |
parent | 7b3e6d1f2125faf598919722b72cc56197d0102c (diff) | |
download | servo-0f2d0b1dc3d98ef109627dda061c5a54ff06a91d.tar.gz servo-0f2d0b1dc3d98ef109627dda061c5a54ff06a91d.zip |
Address review comments.
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) } } |