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.
This commit is contained in:
Anthony Ramine 2017-09-26 01:53:40 +02:00
parent 577370746e
commit f87c2a8d76
291 changed files with 1774 additions and 1770 deletions

View file

@ -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))
}