aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_task.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-03-18 11:25:00 -0600
committerbors-servo <metajack+bors@gmail.com>2015-03-18 11:25:00 -0600
commit99cf9dbfc107bacb84dfe5afa9539a0ede3beac2 (patch)
treecc36210329cb1a31709a03685c05c4aaa99407e3 /components/layout/layout_task.rs
parent65d4b12bf20783ea784f1c61f4b33ec0fc975f4f (diff)
parent5f15eb5fbfb7a8649132cc8b3a07314389836714 (diff)
downloadservo-99cf9dbfc107bacb84dfe5afa9539a0ede3beac2.tar.gz
servo-99cf9dbfc107bacb84dfe5afa9539a0ede3beac2.zip
auto merge of #5256 : servo/servo/rustup_20150311, r=jdm
...v. Relies on: * https://github.com/servo/rust-geom/pull/72 * https://github.com/servo/rust-glx/pull/10 * https://github.com/servo/gleam/pull/15 * https://github.com/servo/rust-mozjs/pull/137 * https://github.com/servo/rust-core-text/pull/35 * https://github.com/servo/rust-io-surface/pull/28
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r--components/layout/layout_task.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index 2a1bd02e369..fa670ca1191 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -96,6 +96,7 @@ pub struct LayoutTaskData {
/// The root stacking context.
pub stacking_context: Option<Arc<StackingContext>>,
+ /// Performs CSS selector matching and style resolution.
pub stylist: Box<Stylist>,
/// The workers that we use for parallel operation.
@@ -178,7 +179,7 @@ impl ImageResponder<UntrustedNodeAddress> for LayoutImageResponder {
fn respond(&self) -> Box<Fn(ImageResponseMsg, UntrustedNodeAddress)+Send> {
let id = self.id.clone();
let script_chan = self.script_chan.clone();
- box move |&:_, node_address| {
+ box move |_, node_address| {
let ScriptControlChan(ref chan) = script_chan;
debug!("Dirtying {:x}", node_address.0 as uint);
let mut nodes = SmallVec1::new();
@@ -281,10 +282,13 @@ impl LayoutTask {
let local_image_cache =
Arc::new(Mutex::new(LocalImageCache::new(image_cache_task.clone())));
let screen_size = Size2D(Au(0), Au(0));
- let device = Device::new(MediaType::Screen, opts::get().initial_window_size.as_f32() * ScaleFactor(1.0));
+ let device = Device::new(
+ MediaType::Screen,
+ opts::get().initial_window_size.as_f32() * ScaleFactor::new(1.0));
let parallel_traversal = if opts::get().layout_threads != 1 {
Some(WorkQueue::new("LayoutWorker", task_state::LAYOUT,
- opts::get().layout_threads, SharedLayoutContextWrapper(ptr::null())))
+ opts::get().layout_threads,
+ SharedLayoutContextWrapper(ptr::null())))
} else {
None
};
@@ -568,7 +572,7 @@ impl LayoutTask {
let mut rw_data = self.lock_rw_data(possibly_locked_rw_data);
if mq.evaluate(&rw_data.stylist.device) {
- iter_font_face_rules(&sheet, &rw_data.stylist.device, &|&:family, src| {
+ iter_font_face_rules(&sheet, &rw_data.stylist.device, &|family, src| {
self.font_cache_task.add_web_font(family.to_owned(), (*src).clone());
});
rw_data.stylist.add_stylesheet(sheet);