aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domrect.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/domrect.rs')
-rw-r--r--components/script/dom/domrect.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/domrect.rs b/components/script/dom/domrect.rs
index 45c325b3a2d..c1870c18cc9 100644
--- a/components/script/dom/domrect.rs
+++ b/components/script/dom/domrect.rs
@@ -5,7 +5,7 @@
use dom::bindings::codegen::Bindings::DOMRectBinding;
use dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods;
use dom::bindings::global::GlobalRef;
-use dom::bindings::js::{JSRef, Temporary};
+use dom::bindings::js::Root;
use dom::bindings::num::Finite;
use dom::bindings::utils::{Reflector, reflect_dom_object};
use dom::window::Window;
@@ -32,15 +32,15 @@ impl DOMRect {
}
}
- pub fn new(window: JSRef<Window>,
+ pub fn new(window: &Window,
top: Au, bottom: Au,
- left: Au, right: Au) -> Temporary<DOMRect> {
+ left: Au, right: Au) -> Root<DOMRect> {
reflect_dom_object(box DOMRect::new_inherited(top, bottom, left, right),
GlobalRef::Window(window), DOMRectBinding::Wrap)
}
}
-impl<'a> DOMRectMethods for JSRef<'a, DOMRect> {
+impl<'a> DOMRectMethods for &'a DOMRect {
fn Top(self) -> Finite<f32> {
Finite::wrap(self.top)
}