diff --git a/components/layout/block.rs b/components/layout/block.rs index b89b6a3d8a9..60971496b3d 100644 --- a/components/layout/block.rs +++ b/components/layout/block.rs @@ -2276,10 +2276,10 @@ pub trait ISizeAndMarginsComputer { fn compute_inline_size_constraint_inputs(&self, block: &mut BlockFlow, parent_flow_inline_size: Au, - layout_context: &LayoutContext) + shared_context: &SharedStyleContext) -> ISizeConstraintInput { let containing_block_inline_size = - self.containing_block_inline_size(block, parent_flow_inline_size, layout_context.shared_context()); + self.containing_block_inline_size(block, parent_flow_inline_size, shared_context); block.fragment.compute_block_direction_margins(containing_block_inline_size); block.fragment.compute_inline_direction_margins(containing_block_inline_size); @@ -2287,7 +2287,7 @@ pub trait ISizeAndMarginsComputer { let mut computed_inline_size = self.initial_computed_inline_size(block, parent_flow_inline_size, - layout_context.shared_context()); + shared_context); let style = block.fragment.style(); match (computed_inline_size, style.get_position().box_sizing) { (MaybeAuto::Specified(size), box_sizing::T::border_box) => { @@ -2407,7 +2407,7 @@ pub trait ISizeAndMarginsComputer { parent_flow_inline_size: Au) { let mut input = self.compute_inline_size_constraint_inputs(block, parent_flow_inline_size, - layout_context); + layout_context.shared_context()); let containing_block_inline_size = self.containing_block_inline_size(block, parent_flow_inline_size, layout_context.shared_context()); diff --git a/components/layout/table.rs b/components/layout/table.rs index 2f91ea6774d..ff9048201a7 100644 --- a/components/layout/table.rs +++ b/components/layout/table.rs @@ -25,6 +25,7 @@ use std::cmp; use std::fmt; use std::sync::Arc; use style::computed_values::{border_collapse, border_spacing, table_layout}; +use style::context::StyleContext; use style::logical_geometry::LogicalSize; use style::properties::{ComputedValues, ServoComputedValues}; use style::values::CSSFloat; @@ -521,7 +522,7 @@ impl ISizeAndMarginsComputer for InternalTable { parent_flow_inline_size: Au) { let mut input = self.compute_inline_size_constraint_inputs(block, parent_flow_inline_size, - layout_context); + layout_context.shared_context()); // Tables are always at least as wide as their minimum inline size. let minimum_inline_size = diff --git a/components/layout/table_wrapper.rs b/components/layout/table_wrapper.rs index 3b1f63dfd2a..8002b97f9bf 100644 --- a/components/layout/table_wrapper.rs +++ b/components/layout/table_wrapper.rs @@ -30,6 +30,7 @@ use std::fmt; use std::ops::Add; use std::sync::Arc; use style::computed_values::{border_collapse, table_layout}; +use style::context::StyleContext; use style::logical_geometry::LogicalSize; use style::properties::{ComputedValues, ServoComputedValues}; use style::servo::SharedStyleContext; @@ -234,7 +235,7 @@ impl TableWrapperFlow { let input = inline_size_computer.compute_inline_size_constraint_inputs(&mut self.block_flow, parent_flow_inline_size, - layout_context); + layout_context.shared_context()); let solution = inline_size_computer.solve_inline_size_constraints(&mut self.block_flow, &input); @@ -254,7 +255,7 @@ impl TableWrapperFlow { let input = inline_size_computer.compute_inline_size_constraint_inputs(&mut self.block_flow, parent_flow_inline_size, - layout_context); + layout_context.shared_context()); let solution = inline_size_computer.solve_inline_size_constraints(&mut self.block_flow, &input); @@ -273,7 +274,7 @@ impl TableWrapperFlow { let input = inline_size_computer.compute_inline_size_constraint_inputs(&mut self.block_flow, parent_flow_inline_size, - layout_context); + layout_context.shared_context()); let solution = inline_size_computer.solve_inline_size_constraints(&mut self.block_flow, &input);