aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_task.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2015-12-30 11:01:23 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2015-12-30 11:01:23 +0530
commit3f407ea3d620e381b3adf6352cc09f9912db26b3 (patch)
treedd0a2b4015221a4293c05cd8123956b449c4262f /components/layout/layout_task.rs
parent0f5c614609fd8867a9e7c27b8a398ea7d877c714 (diff)
parenta05d7f1dfd8500d299007af99861cc86fada9386 (diff)
downloadservo-3f407ea3d620e381b3adf6352cc09f9912db26b3.tar.gz
servo-3f407ea3d620e381b3adf6352cc09f9912db26b3.zip
Auto merge of #9077 - bholley:split_layout_context_etc, r=SimonSapin
Split the style-related bits out of LayoutContext and hoist more stuff into style/ <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9077) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r--components/layout/layout_task.rs23
1 files changed, 13 insertions, 10 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index 64bf9f1329c..87f34ce2a8c 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -12,7 +12,7 @@ use app_units::Au;
use azure::azure::AzColor;
use canvas_traits::CanvasMsg;
use construct::ConstructionResult;
-use context::{SharedLayoutContext, StylistWrapper, heap_size_of_local_context};
+use context::{SharedLayoutContext, heap_size_of_local_context};
use display_list_builder::ToGfxColor;
use euclid::Matrix4;
use euclid::point::Point2D;
@@ -64,6 +64,7 @@ use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::mpsc::{channel, Sender, Receiver};
use std::sync::{Arc, Mutex, MutexGuard, RwLock};
use style::computed_values::{filter, mix_blend_mode};
+use style::context::{SharedStyleContext, StylistWrapper};
use style::dom::{TDocument, TElement, TNode};
use style::media_queries::{Device, MediaType};
use style::selector_matching::{Stylist, USER_OR_USER_AGENT_STYLESHEETS};
@@ -470,21 +471,23 @@ impl LayoutTask {
goal: ReflowGoal)
-> SharedLayoutContext {
SharedLayoutContext {
+ style_context: SharedStyleContext {
+ viewport_size: self.viewport_size.clone(),
+ screen_size_changed: screen_size_changed,
+ stylist: StylistWrapper(&*rw_data.stylist),
+ generation: self.generation,
+ goal: goal,
+ new_animations_sender: Mutex::new(self.new_animations_sender.clone()),
+ running_animations: self.running_animations.clone(),
+ expired_animations: self.expired_animations.clone(),
+ error_reporter: self.error_reporter.clone(),
+ },
image_cache_task: self.image_cache_task.clone(),
image_cache_sender: Mutex::new(self.image_cache_sender.clone()),
- viewport_size: self.viewport_size.clone(),
- screen_size_changed: screen_size_changed,
font_cache_task: Mutex::new(self.font_cache_task.clone()),
canvas_layers_sender: Mutex::new(self.canvas_layers_sender.clone()),
- stylist: StylistWrapper(&*rw_data.stylist),
url: (*url).clone(),
visible_rects: self.visible_rects.clone(),
- generation: self.generation,
- new_animations_sender: Mutex::new(self.new_animations_sender.clone()),
- goal: goal,
- running_animations: self.running_animations.clone(),
- expired_animations: self.expired_animations.clone(),
- error_reporter: self.error_reporter.clone(),
}
}