Pass a &GlobalScope to WebIDL static methods and constructors

This commit is contained in:
Anthony Ramine 2016-10-04 00:54:05 +02:00
parent 1fd470889d
commit 19108aa330
56 changed files with 198 additions and 245 deletions

View file

@ -4,7 +4,6 @@
use dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::{DOMRectReadOnlyMethods, Wrap};
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;
@ -41,13 +40,13 @@ impl DOMRectReadOnly {
Wrap)
}
pub fn Constructor(global: GlobalRef,
pub fn Constructor(global: &GlobalScope,
x: f64,
y: f64,
width: f64,
height: f64)
-> Fallible<Root<DOMRectReadOnly>> {
Ok(DOMRectReadOnly::new(global.as_global_scope(), x, y, width, height))
Ok(DOMRectReadOnly::new(global, x, y, width, height))
}
pub fn set_x(&self, value: f64) {