diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-04 00:54:05 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-06 21:35:49 +0200 |
commit | 19108aa3305df2172208c83500f5ac67d2dee104 (patch) | |
tree | d65138e8d1a8723cb30a56f8bd117f580f39438c /components/script/dom/dommatrix.rs | |
parent | 1fd470889dd9b4e6c3a871b6b40b50e30114443d (diff) | |
download | servo-19108aa3305df2172208c83500f5ac67d2dee104.tar.gz servo-19108aa3305df2172208c83500f5ac67d2dee104.zip |
Pass a &GlobalScope to WebIDL static methods and constructors
Diffstat (limited to 'components/script/dom/dommatrix.rs')
-rw-r--r-- | components/script/dom/dommatrix.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/components/script/dom/dommatrix.rs b/components/script/dom/dommatrix.rs index 2ccf4b126fb..dbe7a27516c 100644 --- a/components/script/dom/dommatrix.rs +++ b/components/script/dom/dommatrix.rs @@ -5,7 +5,6 @@ use dom::bindings::codegen::Bindings::DOMMatrixBinding::{Wrap, DOMMatrixMethods, DOMMatrixInit}; use dom::bindings::codegen::Bindings::DOMMatrixReadOnlyBinding::DOMMatrixReadOnlyMethods; use dom::bindings::error::Fallible; -use dom::bindings::global::GlobalRef; use dom::bindings::inheritance::Castable; use dom::bindings::js::Root; use dom::bindings::reflector::reflect_dom_object; @@ -33,23 +32,23 @@ impl DOMMatrix { } // https://drafts.fxtf.org/geometry-1/#dom-dommatrix-dommatrix - pub fn Constructor(global: GlobalRef) -> Fallible<Root<Self>> { + pub fn Constructor(global: &GlobalScope) -> Fallible<Root<Self>> { Self::Constructor_(global, vec![1.0, 0.0, 0.0, 1.0, 0.0, 0.0]) } // https://drafts.fxtf.org/geometry-1/#dom-dommatrix-dommatrix-numbersequence - pub fn Constructor_(global: GlobalRef, entries: Vec<f64>) -> Fallible<Root<Self>> { + pub fn Constructor_(global: &GlobalScope, entries: Vec<f64>) -> Fallible<Root<Self>> { entries_to_matrix(&entries[..]) .map(|(is2D, matrix)| { - Self::new(global.as_global_scope(), is2D, matrix) + Self::new(global, is2D, matrix) }) } // https://drafts.fxtf.org/geometry-1/#dom-dommatrix-frommatrix - pub fn FromMatrix(global: GlobalRef, other: &DOMMatrixInit) -> Fallible<Root<Self>> { + pub fn FromMatrix(global: &GlobalScope, other: &DOMMatrixInit) -> Fallible<Root<Self>> { dommatrixinit_to_matrix(&other) .map(|(is2D, matrix)| { - Self::new(global.as_global_scope(), is2D, matrix) + Self::new(global, is2D, matrix) }) } |