diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-26 01:53:40 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-26 09:49:10 +0200 |
commit | f87c2a8d7616112ca924e30292db2d244cf87eec (patch) | |
tree | 7344afe7ec0ec1ac7d1d13f5385111ee9c4be332 /components/script/dom/imagedata.rs | |
parent | 577370746e2ce3da7fa25a20b8e1bbeed319df65 (diff) | |
download | servo-f87c2a8d7616112ca924e30292db2d244cf87eec.tar.gz servo-f87c2a8d7616112ca924e30292db2d244cf87eec.zip |
Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> will be able to handle all the things that need to be
rooted that have a stable traceable address that doesn't move for the
whole lifetime of the root. Stay tuned.
Diffstat (limited to 'components/script/dom/imagedata.rs')
-rw-r--r-- | components/script/dom/imagedata.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/imagedata.rs b/components/script/dom/imagedata.rs index 910bc4004de..98be416ff45 100644 --- a/components/script/dom/imagedata.rs +++ b/components/script/dom/imagedata.rs @@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::ImageDataBinding; use dom::bindings::codegen::Bindings::ImageDataBinding::ImageDataMethods; use dom::bindings::error::{Fallible, Error}; use dom::bindings::reflector::{Reflector, reflect_dom_object}; -use dom::bindings::root::Root; +use dom::bindings::root::DomRoot; use dom::globalscope::GlobalScope; use dom_struct::dom_struct; use euclid::Size2D; @@ -32,7 +32,7 @@ impl ImageData { width: u32, height: u32, mut data: Option<Vec<u8>>) - -> Fallible<Root<ImageData>> { + -> Fallible<DomRoot<ImageData>> { let len = width * height * 4; unsafe { let cx = global.get_cx(); @@ -54,7 +54,7 @@ impl ImageData { width: u32, mut opt_height: Option<u32>, opt_jsobject: Option<*mut JSObject>) - -> Fallible<Root<ImageData>> { + -> Fallible<DomRoot<ImageData>> { assert!(opt_jsobject.is_some() || opt_height.is_some()); if width == 0 { @@ -113,7 +113,7 @@ impl ImageData { // https://html.spec.whatwg.org/multipage/#pixel-manipulation:dom-imagedata-3 #[allow(unsafe_code)] - pub fn Constructor(global: &GlobalScope, width: u32, height: u32) -> Fallible<Root<Self>> { + pub fn Constructor(global: &GlobalScope, width: u32, height: u32) -> Fallible<DomRoot<Self>> { unsafe { Self::new_with_jsobject(global, width, Some(height), None) } } @@ -125,7 +125,7 @@ impl ImageData { jsobject: *mut JSObject, width: u32, opt_height: Option<u32>) - -> Fallible<Root<Self>> { + -> Fallible<DomRoot<Self>> { Self::new_with_jsobject(global, width, opt_height, Some(jsobject)) } |