From fcb59d305742a18daa083352a9b6e9a45896c9f6 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 27 Sep 2016 13:16:41 +0200 Subject: Make reflect_dom_object take a &GlobalScope --- components/script/dom/domrectreadonly.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'components/script/dom/domrectreadonly.rs') diff --git a/components/script/dom/domrectreadonly.rs b/components/script/dom/domrectreadonly.rs index 8e72dae6942..a9d87ec3947 100644 --- a/components/script/dom/domrectreadonly.rs +++ b/components/script/dom/domrectreadonly.rs @@ -7,6 +7,7 @@ use dom::bindings::error::Fallible; use dom::bindings::global::GlobalRef; use dom::bindings::js::Root; use dom::bindings::reflector::{Reflector, reflect_dom_object}; +use dom::globalscope::GlobalScope; use std::cell::Cell; #[dom_struct] @@ -29,7 +30,7 @@ impl DOMRectReadOnly { } } - pub fn new(global: GlobalRef, + pub fn new(global: &GlobalScope, x: f64, y: f64, width: f64, @@ -46,7 +47,7 @@ impl DOMRectReadOnly { width: f64, height: f64) -> Fallible> { - Ok(DOMRectReadOnly::new(global, x, y, width, height)) + Ok(DOMRectReadOnly::new(global.as_global_scope(), x, y, width, height)) } pub fn set_x(&self, value: f64) { -- cgit v1.2.3