diff options
author | Lars Bergstrom <lars@lars.com> | 2014-04-05 10:11:38 +0200 |
---|---|---|
committer | Lars Bergstrom <lars@lars.com> | 2014-04-27 15:46:12 -0500 |
commit | 948daf242278b22d7a15c1c594129785d1cff538 (patch) | |
tree | 513345ea70f134bf4a85d8e2cdbe166bfee904f6 /src/components/script/dom/window.rs | |
parent | 4942cc76bd2c88e5fdc2b4de4c1ac4576100b455 (diff) | |
download | servo-948daf242278b22d7a15c1c594129785d1cff538.tar.gz servo-948daf242278b22d7a15c1c594129785d1cff538.zip |
This batch of changes upgrades Servo to work with the Rust upgrade as of
April 10, 2014. The main changes are to privacy, to work around the
issues with incorrect bounds on the libstd `Arc<Mutex<T>>`, and the
various API changes strewn throughout the libraries.
Diffstat (limited to 'src/components/script/dom/window.rs')
-rw-r--r-- | src/components/script/dom/window.rs | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/src/components/script/dom/window.rs b/src/components/script/dom/window.rs index e29a2ceb886..26cccc7f6d8 100644 --- a/src/components/script/dom/window.rs +++ b/src/components/script/dom/window.rs @@ -36,12 +36,13 @@ use serialize::{Encoder, Encodable}; use url::Url; pub struct TimerHandle { - handle: i32, - cancel_chan: Option<Sender<()>>, + pub handle: i32, + pub cancel_chan: Option<Sender<()>>, } -impl<S: Encoder> Encodable<S> for TimerHandle { - fn encode(&self, _: &mut S) { +impl<S: Encoder<E>, E> Encodable<S, E> for TimerHandle { + fn encode(&self, _s: &mut S) -> Result<(), E> { + Ok(()) } } @@ -57,11 +58,7 @@ impl Eq for TimerHandle { } } -impl TotalEq for TimerHandle { - fn equals(&self, other: &TimerHandle) -> bool { - self.eq(other) - } -} +impl TotalEq for TimerHandle { } impl TimerHandle { fn cancel(&self) { @@ -71,17 +68,17 @@ impl TimerHandle { #[deriving(Encodable)] pub struct Window { - eventtarget: EventTarget, - script_chan: ScriptChan, - console: Option<JS<Console>>, - location: Option<JS<Location>>, - navigator: Option<JS<Navigator>>, - image_cache_task: ImageCacheTask, - active_timers: ~HashMap<i32, TimerHandle>, - next_timer_handle: i32, - compositor: Untraceable<~ScriptListener>, - browser_context: Option<BrowserContext>, - page: Rc<Page>, + pub eventtarget: EventTarget, + pub script_chan: ScriptChan, + pub console: Option<JS<Console>>, + pub location: Option<JS<Location>>, + pub navigator: Option<JS<Navigator>>, + pub image_cache_task: ImageCacheTask, + pub active_timers: ~HashMap<i32, TimerHandle>, + pub next_timer_handle: i32, + pub compositor: Untraceable<~ScriptListener>, + pub browser_context: Option<BrowserContext>, + pub page: Rc<Page>, } impl Window { @@ -111,10 +108,10 @@ impl Drop for Window { // (ie. function value to invoke and all arguments to pass // to the function when calling it) pub struct TimerData { - handle: i32, - is_interval: bool, - funval: JSVal, - args: ~[JSVal], + pub handle: i32, + pub is_interval: bool, + pub funval: JSVal, + pub args: ~[JSVal], } impl Window { |