aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/vrdisplayevent.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-09-26 01:53:40 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-09-26 09:49:10 +0200
commitf87c2a8d7616112ca924e30292db2d244cf87eec (patch)
tree7344afe7ec0ec1ac7d1d13f5385111ee9c4be332 /components/script/dom/vrdisplayevent.rs
parent577370746e2ce3da7fa25a20b8e1bbeed319df65 (diff)
downloadservo-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/vrdisplayevent.rs')
-rw-r--r--components/script/dom/vrdisplayevent.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/vrdisplayevent.rs b/components/script/dom/vrdisplayevent.rs
index b7c2a940f6d..26072b499c5 100644
--- a/components/script/dom/vrdisplayevent.rs
+++ b/components/script/dom/vrdisplayevent.rs
@@ -9,7 +9,7 @@ use dom::bindings::codegen::Bindings::VRDisplayEventBinding::VRDisplayEventReaso
use dom::bindings::error::Fallible;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, Root};
+use dom::bindings::root::{Dom, DomRoot};
use dom::bindings::str::DOMString;
use dom::event::Event;
use dom::globalscope::GlobalScope;
@@ -43,7 +43,7 @@ impl VRDisplayEvent {
cancelable: bool,
display: &VRDisplay,
reason: Option<VRDisplayEventReason>)
- -> Root<VRDisplayEvent> {
+ -> DomRoot<VRDisplayEvent> {
let ev = reflect_dom_object(box VRDisplayEvent::new_inherited(&display, reason),
global,
VRDisplayEventBinding::Wrap);
@@ -57,7 +57,7 @@ impl VRDisplayEvent {
pub fn new_from_webvr(global: &GlobalScope,
display: &VRDisplay,
event: &WebVRDisplayEvent)
- -> Root<VRDisplayEvent> {
+ -> DomRoot<VRDisplayEvent> {
let (name, reason) = match *event {
WebVRDisplayEvent::Connect(_) => ("vrdisplayconnect", None),
WebVRDisplayEvent::Disconnect(_) => ("vrdisplaydisconnect", None),
@@ -94,7 +94,7 @@ impl VRDisplayEvent {
pub fn Constructor(window: &Window,
type_: DOMString,
init: &VRDisplayEventBinding::VRDisplayEventInit)
- -> Fallible<Root<VRDisplayEvent>> {
+ -> Fallible<DomRoot<VRDisplayEvent>> {
Ok(VRDisplayEvent::new(&window.global(),
Atom::from(type_),
init.parent.bubbles,
@@ -106,8 +106,8 @@ impl VRDisplayEvent {
impl VRDisplayEventMethods for VRDisplayEvent {
// https://w3c.github.io/webvr/#dom-vrdisplayevent-display
- fn Display(&self) -> Root<VRDisplay> {
- Root::from_ref(&*self.display)
+ fn Display(&self) -> DomRoot<VRDisplay> {
+ DomRoot::from_ref(&*self.display)
}
// https://w3c.github.io/webvr/#enumdef-vrdisplayeventreason