diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 7faf3a6db77..5f3c3c9a3c0 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -97,9 +97,6 @@ pub struct LayoutTaskData { /// The root of the flow tree. pub root_flow: Option, - /// The image cache. - pub image_cache_task: ImageCacheTask, - /// The channel on which messages can be sent to the constellation. pub constellation_chan: ConstellationChan, @@ -425,7 +422,7 @@ impl LayoutTask { paint_chan: paint_chan, time_profiler_chan: time_profiler_chan, mem_profiler_chan: mem_profiler_chan, - image_cache_task: image_cache_task.clone(), + image_cache_task: image_cache_task, font_cache_task: font_cache_task, first_reflow: true, image_cache_receiver: image_cache_receiver, @@ -438,7 +435,6 @@ impl LayoutTask { rw_data: Arc::new(Mutex::new( LayoutTaskData { root_flow: None, - image_cache_task: image_cache_task, constellation_chan: constellation_chan, viewport_size: Size2D::new(Au(0), Au(0)), stacking_context: None, @@ -480,7 +476,7 @@ impl LayoutTask { goal: ReflowGoal) -> SharedLayoutContext { SharedLayoutContext { - image_cache_task: rw_data.image_cache_task.clone(), + image_cache_task: self.image_cache_task.clone(), image_cache_sender: Mutex::new(self.image_cache_sender.clone()), viewport_size: rw_data.viewport_size.clone(), screen_size_changed: screen_size_changed,