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/dommatrix.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/dommatrix.rs')
-rw-r--r-- | components/script/dom/dommatrix.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/components/script/dom/dommatrix.rs b/components/script/dom/dommatrix.rs index c63290c9326..2ccf4b126fb 100644 --- a/components/script/dom/dommatrix.rs +++ b/components/script/dom/dommatrix.rs @@ -10,6 +10,7 @@ use dom::bindings::inheritance::Castable; use dom::bindings::js::Root; use dom::bindings::reflector::reflect_dom_object; use dom::dommatrixreadonly::{dommatrixinit_to_matrix, DOMMatrixReadOnly, entries_to_matrix}; +use dom::globalscope::GlobalScope; use euclid::Matrix4D; @@ -20,7 +21,7 @@ pub struct DOMMatrix { impl DOMMatrix { #[allow(unrooted_must_root)] - pub fn new(global: GlobalRef, is2D: bool, matrix: Matrix4D<f64>) -> Root<Self> { + pub fn new(global: &GlobalScope, is2D: bool, matrix: Matrix4D<f64>) -> Root<Self> { let dommatrix = Self::new_inherited(is2D, matrix); reflect_dom_object(box dommatrix, global, Wrap) } @@ -40,7 +41,7 @@ impl DOMMatrix { pub fn Constructor_(global: GlobalRef, entries: Vec<f64>) -> Fallible<Root<Self>> { entries_to_matrix(&entries[..]) .map(|(is2D, matrix)| { - Self::new(global, is2D, matrix) + Self::new(global.as_global_scope(), is2D, matrix) }) } @@ -48,11 +49,11 @@ impl DOMMatrix { pub fn FromMatrix(global: GlobalRef, other: &DOMMatrixInit) -> Fallible<Root<Self>> { dommatrixinit_to_matrix(&other) .map(|(is2D, matrix)| { - Self::new(global, is2D, matrix) + Self::new(global.as_global_scope(), is2D, matrix) }) } - pub fn from_readonly(global: GlobalRef, ro: &DOMMatrixReadOnly) -> Root<Self> { + pub fn from_readonly(global: &GlobalScope, ro: &DOMMatrixReadOnly) -> Root<Self> { Self::new(global, ro.is_2d(), ro.matrix().clone()) } } |