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::TouchEventBinding::TouchEventMethods;
use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::root::{MutDom, Root};
use dom::bindings::root::{DomRoot, MutDom};
use dom::bindings::str::DOMString;
use dom::event::{EventBubbles, EventCancelable};
use dom::touchlist::TouchList;
@ -47,7 +47,7 @@ impl TouchEvent {
pub fn new_uninitialized(window: &Window,
touches: &TouchList,
changed_touches: &TouchList,
target_touches: &TouchList) -> Root<TouchEvent> {
target_touches: &TouchList) -> DomRoot<TouchEvent> {
reflect_dom_object(box TouchEvent::new_inherited(touches, changed_touches, target_touches),
window,
TouchEventBinding::Wrap)
@ -65,7 +65,7 @@ impl TouchEvent {
ctrl_key: bool,
alt_key: bool,
shift_key: bool,
meta_key: bool) -> Root<TouchEvent> {
meta_key: bool) -> DomRoot<TouchEvent> {
let ev = TouchEvent::new_uninitialized(window, touches, changed_touches, target_touches);
ev.upcast::<UIEvent>().InitUIEvent(type_,
bool::from(can_bubble),
@ -101,17 +101,17 @@ impl<'a> TouchEventMethods for &'a TouchEvent {
}
/// https://w3c.github.io/touch-events/#widl-TouchEventInit-touches
fn Touches(&self) -> Root<TouchList> {
fn Touches(&self) -> DomRoot<TouchList> {
self.touches.get()
}
/// https://w3c.github.io/touch-events/#widl-TouchEvent-targetTouches
fn TargetTouches(&self) -> Root<TouchList> {
fn TargetTouches(&self) -> DomRoot<TouchList> {
self.target_touches.get()
}
/// https://w3c.github.io/touch-events/#widl-TouchEvent-changedTouches
fn ChangedTouches(&self) -> Root<TouchList> {
fn ChangedTouches(&self) -> DomRoot<TouchList> {
self.changed_touches.get()
}