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/touchevent.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/touchevent.rs')
-rw-r--r-- | components/script/dom/touchevent.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/touchevent.rs b/components/script/dom/touchevent.rs index 92ff9bf0424..6a33b7f244e 100644 --- a/components/script/dom/touchevent.rs +++ b/components/script/dom/touchevent.rs @@ -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() } |