mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
parent
577370746e
commit
f87c2a8d76
291 changed files with 1774 additions and 1770 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue