aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_task.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-03-11 11:08:57 +0100
committerJosh Matthews <josh@joshmatthews.net>2015-03-18 13:18:31 -0400
commit5f15eb5fbfb7a8649132cc8b3a07314389836714 (patch)
treecc36210329cb1a31709a03685c05c4aaa99407e3 /components/layout/layout_task.rs
parent65d4b12bf20783ea784f1c61f4b33ec0fc975f4f (diff)
downloadservo-5f15eb5fbfb7a8649132cc8b3a07314389836714.tar.gz
servo-5f15eb5fbfb7a8649132cc8b3a07314389836714.zip
Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.
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);