aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-11-04 18:12:32 -0700
committerbors-servo <metajack+bors@gmail.com>2014-11-04 18:12:32 -0700
commitffae1104989c0177b483d591a482e5cd877183c2 (patch)
tree12f36afcf90ee22be0bfc41906bd628d0f07c6fa /components/script/dom
parente483a189a3c24d0fe475cf2a8dedb11821f7ee21 (diff)
parent10f7b49cf7dc8f77cf70750927a2c85650312033 (diff)
downloadservo-ffae1104989c0177b483d591a482e5cd877183c2.tar.gz
servo-ffae1104989c0177b483d591a482e5cd877183c2.zip
auto merge of #3761 : pcwalton/servo/smooth-scrolling, r=larsbergstrom
r? @glennw @mbrubeck
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/window.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index c9eeedc2a2a..90c18f5dca5 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.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::cell::{DOMRefCell, Ref};
+use dom::bindings::cell::{DOMRefCell, Ref, RefMut};
use dom::bindings::codegen::Bindings::EventHandlerBinding::{OnErrorEventHandlerNonNull, EventHandlerNonNull};
use dom::bindings::codegen::Bindings::WindowBinding;
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
@@ -53,7 +53,7 @@ pub struct Window {
location: MutNullableJS<Location>,
navigator: MutNullableJS<Navigator>,
image_cache_task: ImageCacheTask,
- compositor: Box<ScriptListener+'static>,
+ compositor: DOMRefCell<Box<ScriptListener+'static>>,
browser_context: DOMRefCell<Option<BrowserContext>>,
page: Rc<Page>,
performance: MutNullableJS<Performance>,
@@ -81,8 +81,8 @@ impl Window {
&self.image_cache_task
}
- pub fn compositor<'a>(&'a self) -> &'a ScriptListener+'static {
- &*self.compositor
+ pub fn compositor(&self) -> RefMut<Box<ScriptListener+'static>> {
+ self.compositor.borrow_mut()
}
pub fn browser_context(&self) -> Ref<Option<BrowserContext>> {
@@ -398,7 +398,7 @@ impl Window {
script_chan: script_chan,
control_chan: control_chan,
console: Default::default(),
- compositor: compositor,
+ compositor: DOMRefCell::new(compositor),
page: page,
location: Default::default(),
navigator: Default::default(),