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/dissimilaroriginwindow.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/dissimilaroriginwindow.rs')
-rw-r--r-- | components/script/dom/dissimilaroriginwindow.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/components/script/dom/dissimilaroriginwindow.rs b/components/script/dom/dissimilaroriginwindow.rs index ba1adf00c21..786169f2921 100644 --- a/components/script/dom/dissimilaroriginwindow.rs +++ b/components/script/dom/dissimilaroriginwindow.rs @@ -6,7 +6,7 @@ use dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding; use dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding::DissimilarOriginWindowMethods; use dom::bindings::error::{Error, ErrorResult}; use dom::bindings::inheritance::Castable; -use dom::bindings::root::{Dom, MutNullableDom, Root}; +use dom::bindings::root::{Dom, DomRoot, MutNullableDom}; use dom::bindings::str::DOMString; use dom::bindings::structuredclone::StructuredCloneData; use dom::dissimilaroriginlocation::DissimilarOriginLocation; @@ -48,7 +48,7 @@ impl DissimilarOriginWindow { pub fn new( global_to_clone_from: &GlobalScope, window_proxy: &WindowProxy, - ) -> Root<Self> { + ) -> DomRoot<Self> { let cx = global_to_clone_from.get_cx(); // Any timer events fired on this window are ignored. let (timer_event_chan, _) = ipc::channel().unwrap(); @@ -80,42 +80,42 @@ impl DissimilarOriginWindow { impl DissimilarOriginWindowMethods for DissimilarOriginWindow { // https://html.spec.whatwg.org/multipage/#dom-window - fn Window(&self) -> Root<WindowProxy> { - Root::from_ref(&*self.window_proxy) + fn Window(&self) -> DomRoot<WindowProxy> { + DomRoot::from_ref(&*self.window_proxy) } // https://html.spec.whatwg.org/multipage/#dom-self - fn Self_(&self) -> Root<WindowProxy> { - Root::from_ref(&*self.window_proxy) + fn Self_(&self) -> DomRoot<WindowProxy> { + DomRoot::from_ref(&*self.window_proxy) } // https://html.spec.whatwg.org/multipage/#dom-frames - fn Frames(&self) -> Root<WindowProxy> { - Root::from_ref(&*self.window_proxy) + fn Frames(&self) -> DomRoot<WindowProxy> { + DomRoot::from_ref(&*self.window_proxy) } // https://html.spec.whatwg.org/multipage/#dom-parent - fn GetParent(&self) -> Option<Root<WindowProxy>> { + fn GetParent(&self) -> Option<DomRoot<WindowProxy>> { // Steps 1-3. if self.window_proxy.is_browsing_context_discarded() { return None; } // Step 4. if let Some(parent) = self.window_proxy.parent() { - return Some(Root::from_ref(parent)); + return Some(DomRoot::from_ref(parent)); } // Step 5. - Some(Root::from_ref(&*self.window_proxy)) + Some(DomRoot::from_ref(&*self.window_proxy)) } // https://html.spec.whatwg.org/multipage/#dom-top - fn GetTop(&self) -> Option<Root<WindowProxy>> { + fn GetTop(&self) -> Option<DomRoot<WindowProxy>> { // Steps 1-3. if self.window_proxy.is_browsing_context_discarded() { return None; } // Steps 4-5. - Some(Root::from_ref(self.window_proxy.top())) + Some(DomRoot::from_ref(self.window_proxy.top())) } // https://html.spec.whatwg.org/multipage/#dom-length @@ -184,7 +184,7 @@ impl DissimilarOriginWindowMethods for DissimilarOriginWindow { } // https://html.spec.whatwg.org/multipage/#dom-location - fn Location(&self) -> Root<DissimilarOriginLocation> { + fn Location(&self) -> DomRoot<DissimilarOriginLocation> { self.location.or_init(|| DissimilarOriginLocation::new(self)) } } |