mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
style: Remove unused goal field from SharedStyleContext.
This commit is contained in:
parent
b4daadf7f2
commit
71997e6ed9
3 changed files with 4 additions and 16 deletions
|
@ -496,7 +496,6 @@ impl LayoutThread {
|
|||
// Create a layout context for use in building display lists, hit testing, &c.
|
||||
fn build_layout_context(&self,
|
||||
rw_data: &LayoutThreadData,
|
||||
goal: ReflowGoal,
|
||||
request_images: bool)
|
||||
-> LayoutContext {
|
||||
let thread_local_style_context_creation_data =
|
||||
|
@ -506,7 +505,6 @@ impl LayoutThread {
|
|||
style_context: SharedStyleContext {
|
||||
viewport_size: self.viewport_size.clone(),
|
||||
stylist: rw_data.stylist.clone(),
|
||||
goal: goal,
|
||||
running_animations: self.running_animations.clone(),
|
||||
expired_animations: self.expired_animations.clone(),
|
||||
error_reporter: self.error_reporter.clone(),
|
||||
|
@ -1117,9 +1115,7 @@ impl LayoutThread {
|
|||
}
|
||||
|
||||
// Create a layout context for use throughout the following passes.
|
||||
let mut layout_context = self.build_layout_context(&*rw_data,
|
||||
data.reflow_info.goal,
|
||||
true);
|
||||
let mut layout_context = self.build_layout_context(&*rw_data, true);
|
||||
|
||||
// NB: Type inference falls apart here for some reason, so we need to be very verbose. :-(
|
||||
let traversal_driver = if self.parallel_flag && self.parallel_traversal.is_some() {
|
||||
|
@ -1347,9 +1343,7 @@ impl LayoutThread {
|
|||
page_clip_rect: max_rect(),
|
||||
};
|
||||
|
||||
let mut layout_context = self.build_layout_context(&*rw_data,
|
||||
reflow_info.goal,
|
||||
false);
|
||||
let mut layout_context = self.build_layout_context(&*rw_data, false);
|
||||
|
||||
if let Some(mut root_flow) = self.root_flow.clone() {
|
||||
// Perform an abbreviated style recalc that operates without access to the DOM.
|
||||
|
@ -1382,9 +1376,7 @@ impl LayoutThread {
|
|||
page_clip_rect: max_rect(),
|
||||
};
|
||||
|
||||
let mut layout_context = self.build_layout_context(&*rw_data,
|
||||
reflow_info.goal,
|
||||
false);
|
||||
let mut layout_context = self.build_layout_context(&*rw_data, false);
|
||||
|
||||
// No need to do a style recalc here.
|
||||
if self.root_flow.is_none() {
|
||||
|
|
|
@ -67,9 +67,6 @@ pub struct SharedStyleContext {
|
|||
/// The CSS selector stylist.
|
||||
pub stylist: Arc<Stylist>,
|
||||
|
||||
/// Why is this reflow occurring
|
||||
pub goal: ReflowGoal,
|
||||
|
||||
/// The animations that are currently running.
|
||||
pub running_animations: Arc<RwLock<HashMap<OpaqueNode, Vec<Animation>>>>,
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ use std::fmt::Write;
|
|||
use std::ptr;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use style::arc_ptr_eq;
|
||||
use style::context::{QuirksMode, ReflowGoal, SharedStyleContext, StyleContext};
|
||||
use style::context::{QuirksMode, SharedStyleContext, StyleContext};
|
||||
use style::context::{ThreadLocalStyleContext, ThreadLocalStyleContextCreationInfo};
|
||||
use style::data::{ElementData, ElementStyles, RestyleData};
|
||||
use style::dom::{ShowSubtreeData, TElement, TNode};
|
||||
|
@ -164,7 +164,6 @@ fn create_shared_context(per_doc_data: &PerDocumentStyleDataImpl) -> SharedStyle
|
|||
SharedStyleContext {
|
||||
// FIXME (bug 1303229): Use the actual viewport size here
|
||||
viewport_size: Size2D::new(Au(0), Au(0)),
|
||||
goal: ReflowGoal::ForScriptQuery,
|
||||
stylist: per_doc_data.stylist.clone(),
|
||||
running_animations: per_doc_data.running_animations.clone(),
|
||||
expired_animations: per_doc_data.expired_animations.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue