diff options
Diffstat (limited to 'components/script/dom/domrectreadonly.rs')
-rw-r--r-- | components/script/dom/domrectreadonly.rs | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/components/script/dom/domrectreadonly.rs b/components/script/dom/domrectreadonly.rs index f5e08a4fcb7..49eed59ac58 100644 --- a/components/script/dom/domrectreadonly.rs +++ b/components/script/dom/domrectreadonly.rs @@ -1,12 +1,12 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::{DOMRectReadOnlyMethods, Wrap}; -use dom::bindings::error::Fallible; -use dom::bindings::js::Root; -use dom::bindings::reflector::{Reflector, reflect_dom_object}; -use dom::globalscope::GlobalScope; +use crate::dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::DOMRectReadOnlyMethods; +use crate::dom::bindings::error::Fallible; +use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; +use crate::dom::bindings::root::DomRoot; +use crate::dom::globalscope::GlobalScope; use dom_struct::dom_struct; use std::cell::Cell; @@ -30,23 +30,27 @@ impl DOMRectReadOnly { } } - pub fn new(global: &GlobalScope, - x: f64, - y: f64, - width: f64, - height: f64) - -> Root<DOMRectReadOnly> { - reflect_dom_object(box DOMRectReadOnly::new_inherited(x, y, width, height), - global, - Wrap) + pub fn new( + global: &GlobalScope, + x: f64, + y: f64, + width: f64, + height: f64, + ) -> DomRoot<DOMRectReadOnly> { + reflect_dom_object( + Box::new(DOMRectReadOnly::new_inherited(x, y, width, height)), + global, + ) } - pub fn Constructor(global: &GlobalScope, - x: f64, - y: f64, - width: f64, - height: f64) - -> Fallible<Root<DOMRectReadOnly>> { + #[allow(non_snake_case)] + pub fn Constructor( + global: &GlobalScope, + x: f64, + y: f64, + width: f64, + height: f64, + ) -> Fallible<DomRoot<DOMRectReadOnly>> { Ok(DOMRectReadOnly::new(global, x, y, width, height)) } |