diff options
Diffstat (limited to 'components/script/task_source')
-rw-r--r-- | components/script/task_source/dom_manipulation.rs | 6 | ||||
-rw-r--r-- | components/script/task_source/mod.rs | 6 | ||||
-rw-r--r-- | components/script/task_source/user_interaction.rs | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/components/script/task_source/dom_manipulation.rs b/components/script/task_source/dom_manipulation.rs index 4f5384ae2ed..c5b4e4b5f73 100644 --- a/components/script/task_source/dom_manipulation.rs +++ b/components/script/task_source/dom_manipulation.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use dom::bindings::global::GlobalRef; +use dom::bindings::inheritance::Castable; use dom::bindings::refcounted::Trusted; use dom::event::{EventBubbles, EventCancelable, EventRunnable, SimpleEventRunnable}; use dom::eventtarget::EventTarget; @@ -41,7 +41,7 @@ impl DOMManipulationTaskSource { bubbles: bubbles, cancelable: cancelable, }; - let _ = self.queue(runnable, GlobalRef::Window(window)); + let _ = self.queue(runnable, window.upcast()); } pub fn queue_simple_event(&self, target: &EventTarget, name: Atom, window: &Window) { @@ -50,7 +50,7 @@ impl DOMManipulationTaskSource { target: target, name: name, }; - let _ = self.queue(runnable, GlobalRef::Window(window)); + let _ = self.queue(runnable, window.upcast()); } } diff --git a/components/script/task_source/mod.rs b/components/script/task_source/mod.rs index bddc4f82173..6e2a9985fa0 100644 --- a/components/script/task_source/mod.rs +++ b/components/script/task_source/mod.rs @@ -8,7 +8,7 @@ pub mod history_traversal; pub mod networking; pub mod user_interaction; -use dom::bindings::global::GlobalRef; +use dom::globalscope::GlobalScope; use script_thread::{Runnable, RunnableWrapper}; use std::result::Result; @@ -18,7 +18,7 @@ pub trait TaskSource { wrapper: &RunnableWrapper) -> Result<(), ()> where T: Runnable + Send + 'static; - fn queue<T: Runnable + Send + 'static>(&self, msg: Box<T>, global: GlobalRef) -> Result<(), ()> { - self.queue_with_wrapper(msg, &global.as_global_scope().get_runnable_wrapper()) + fn queue<T: Runnable + Send + 'static>(&self, msg: Box<T>, global: &GlobalScope) -> Result<(), ()> { + self.queue_with_wrapper(msg, &global.get_runnable_wrapper()) } } diff --git a/components/script/task_source/user_interaction.rs b/components/script/task_source/user_interaction.rs index cddafb80ee4..d3850e9f813 100644 --- a/components/script/task_source/user_interaction.rs +++ b/components/script/task_source/user_interaction.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use dom::bindings::global::GlobalRef; +use dom::bindings::inheritance::Castable; use dom::bindings::refcounted::Trusted; use dom::event::{EventBubbles, EventCancelable, EventRunnable}; use dom::eventtarget::EventTarget; @@ -41,7 +41,7 @@ impl UserInteractionTaskSource { bubbles: bubbles, cancelable: cancelable, }; - let _ = self.queue(runnable, GlobalRef::Window(window)); + let _ = self.queue(runnable, window.upcast()); } } |