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

@ -18,7 +18,7 @@ use dom::bindings::codegen::UnionTypes::EventOrString;
use dom::bindings::error::{Error, Fallible, report_pending_exception};
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{DomObject, Reflector};
use dom::bindings::root::Root;
use dom::bindings::root::DomRoot;
use dom::bindings::str::DOMString;
use dom::element::Element;
use dom::errorevent::ErrorEvent;
@ -174,7 +174,7 @@ impl CompiledEventListener {
return;
}
let _ = handler.Call_(object, EventOrString::Event(Root::from_ref(event)),
let _ = handler.Call_(object, EventOrString::Event(DomRoot::from_ref(event)),
None, None, None, None, exception_handle);
}
@ -506,28 +506,28 @@ impl EventTarget {
}
// https://dom.spec.whatwg.org/#concept-event-fire
pub fn fire_event(&self, name: Atom) -> Root<Event> {
pub fn fire_event(&self, name: Atom) -> DomRoot<Event> {
self.fire_event_with_params(name,
EventBubbles::DoesNotBubble,
EventCancelable::NotCancelable)
}
// https://dom.spec.whatwg.org/#concept-event-fire
pub fn fire_bubbling_event(&self, name: Atom) -> Root<Event> {
pub fn fire_bubbling_event(&self, name: Atom) -> DomRoot<Event> {
self.fire_event_with_params(name,
EventBubbles::Bubbles,
EventCancelable::NotCancelable)
}
// https://dom.spec.whatwg.org/#concept-event-fire
pub fn fire_cancelable_event(&self, name: Atom) -> Root<Event> {
pub fn fire_cancelable_event(&self, name: Atom) -> DomRoot<Event> {
self.fire_event_with_params(name,
EventBubbles::DoesNotBubble,
EventCancelable::Cancelable)
}
// https://dom.spec.whatwg.org/#concept-event-fire
pub fn fire_bubbling_cancelable_event(&self, name: Atom) -> Root<Event> {
pub fn fire_bubbling_cancelable_event(&self, name: Atom) -> DomRoot<Event> {
self.fire_event_with_params(name,
EventBubbles::Bubbles,
EventCancelable::Cancelable)
@ -538,7 +538,7 @@ impl EventTarget {
name: Atom,
bubbles: EventBubbles,
cancelable: EventCancelable)
-> Root<Event> {
-> DomRoot<Event> {
let event = Event::new(&self.global(), name, bubbles, cancelable);
event.fire(self);
event