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

@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::StorageEventBinding::StorageEventMethods;
use dom::bindings::error::Fallible;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::root::{MutNullableDom, Root, RootedReference};
use dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
use dom::bindings::str::DOMString;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::storage::Storage;
@ -44,7 +44,7 @@ impl StorageEvent {
}
pub fn new_uninitialized(window: &Window,
url: DOMString) -> Root<StorageEvent> {
url: DOMString) -> DomRoot<StorageEvent> {
reflect_dom_object(box StorageEvent::new_inherited(None, None, None, url, None),
window,
StorageEventBinding::Wrap)
@ -58,7 +58,7 @@ impl StorageEvent {
oldValue: Option<DOMString>,
newValue: Option<DOMString>,
url: DOMString,
storageArea: Option<&Storage>) -> Root<StorageEvent> {
storageArea: Option<&Storage>) -> DomRoot<StorageEvent> {
let ev = reflect_dom_object(box StorageEvent::new_inherited(key, oldValue, newValue,
url, storageArea),
global,
@ -72,7 +72,7 @@ impl StorageEvent {
pub fn Constructor(global: &Window,
type_: DOMString,
init: &StorageEventBinding::StorageEventInit) -> Fallible<Root<StorageEvent>> {
init: &StorageEventBinding::StorageEventInit) -> Fallible<DomRoot<StorageEvent>> {
let key = init.key.clone();
let oldValue = init.oldValue.clone();
let newValue = init.newValue.clone();
@ -110,7 +110,7 @@ impl StorageEventMethods for StorageEvent {
}
// https://html.spec.whatwg.org/multipage/#dom-storageevent-storagearea
fn GetStorageArea(&self) -> Option<Root<Storage>> {
fn GetStorageArea(&self) -> Option<DomRoot<Storage>> {
self.storage_area.get()
}