diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-09-27 13:16:41 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-06 20:59:09 +0200 |
commit | fcb59d305742a18daa083352a9b6e9a45896c9f6 (patch) | |
tree | d1023c24bfb5827c49d4d4653a72541b66532b95 /components/script/dom/dompoint.rs | |
parent | 093b189b4800909b17295b88aed762601f4b8482 (diff) | |
download | servo-fcb59d305742a18daa083352a9b6e9a45896c9f6.tar.gz servo-fcb59d305742a18daa083352a9b6e9a45896c9f6.zip |
Make reflect_dom_object take a &GlobalScope
Diffstat (limited to 'components/script/dom/dompoint.rs')
-rw-r--r-- | components/script/dom/dompoint.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/dompoint.rs b/components/script/dom/dompoint.rs index 906a30ea617..49a873a25fc 100644 --- a/components/script/dom/dompoint.rs +++ b/components/script/dom/dompoint.rs @@ -9,6 +9,7 @@ use dom::bindings::global::GlobalRef; use dom::bindings::js::Root; use dom::bindings::reflector::reflect_dom_object; use dom::dompointreadonly::{DOMPointReadOnly, DOMPointWriteMethods}; +use dom::globalscope::GlobalScope; // http://dev.w3.org/fxtf/geometry/Overview.html#dompoint #[dom_struct] @@ -23,7 +24,7 @@ impl DOMPoint { } } - pub fn new(global: GlobalRef, x: f64, y: f64, z: f64, w: f64) -> Root<DOMPoint> { + pub fn new(global: &GlobalScope, x: f64, y: f64, z: f64, w: f64) -> Root<DOMPoint> { reflect_dom_object(box DOMPoint::new_inherited(x, y, z, w), global, Wrap) } @@ -33,10 +34,10 @@ impl DOMPoint { z: f64, w: f64) -> Fallible<Root<DOMPoint>> { - Ok(DOMPoint::new(global, x, y, z, w)) + Ok(DOMPoint::new(global.as_global_scope(), x, y, z, w)) } - pub fn new_from_init(global: GlobalRef, p: &DOMPointInit) -> Root<DOMPoint> { + pub fn new_from_init(global: &GlobalScope, p: &DOMPointInit) -> Root<DOMPoint> { DOMPoint::new(global, p.x, p.y, p.z, p.w) } } |