mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Pass SharedStyleContext to assign_inline_sizes.
This commit is contained in:
parent
ea15f69404
commit
ea45e76840
14 changed files with 49 additions and 47 deletions
|
@ -25,9 +25,9 @@ use script_layout_interface::restyle_damage::{REFLOW, REFLOW_OUT_OF_FLOW};
|
|||
use std::cmp::max;
|
||||
use std::sync::Arc;
|
||||
use style::computed_values::flex_direction;
|
||||
use style::context::StyleContext;
|
||||
use style::logical_geometry::LogicalSize;
|
||||
use style::properties::{ComputedValues, ServoComputedValues};
|
||||
use style::servo::SharedStyleContext;
|
||||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
||||
|
||||
/// The size of an axis. May be a specified size, a min/max
|
||||
|
@ -185,7 +185,7 @@ impl FlexFlow {
|
|||
// Currently, this is the core of BlockFlow::propagate_assigned_inline_size_to_children() with
|
||||
// all float and table logic stripped out.
|
||||
fn block_mode_assign_inline_sizes(&mut self,
|
||||
_layout_context: &LayoutContext,
|
||||
_shared_context: &SharedStyleContext,
|
||||
inline_start_content_edge: Au,
|
||||
inline_end_content_edge: Au,
|
||||
content_inline_size: Au) {
|
||||
|
@ -230,7 +230,7 @@ impl FlexFlow {
|
|||
// Currently, this is the core of InlineFlow::propagate_assigned_inline_size_to_children() with
|
||||
// fragment logic stripped out.
|
||||
fn inline_mode_assign_inline_sizes(&mut self,
|
||||
_layout_context: &LayoutContext,
|
||||
_shared_context: &SharedStyleContext,
|
||||
inline_start_content_edge: Au,
|
||||
_inline_end_content_edge: Au,
|
||||
content_inline_size: Au) {
|
||||
|
@ -403,7 +403,7 @@ impl Flow for FlexFlow {
|
|||
}
|
||||
}
|
||||
|
||||
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
|
||||
fn assign_inline_sizes(&mut self, shared_context: &SharedStyleContext) {
|
||||
let _scope = layout_debug_scope!("flex::assign_inline_sizes {:x}", self.block_flow.base.debug_id());
|
||||
debug!("assign_inline_sizes");
|
||||
|
||||
|
@ -414,7 +414,7 @@ impl Flow for FlexFlow {
|
|||
// Our inline-size was set to the inline-size of the containing block by the flow's parent.
|
||||
// Now compute the real value.
|
||||
let containing_block_inline_size = self.block_flow.base.block_container_inline_size;
|
||||
self.block_flow.compute_used_inline_size(layout_context.shared_context(), containing_block_inline_size);
|
||||
self.block_flow.compute_used_inline_size(shared_context, containing_block_inline_size);
|
||||
if self.block_flow.base.flags.is_float() {
|
||||
self.block_flow.float.as_mut().unwrap().containing_inline_size = containing_block_inline_size
|
||||
}
|
||||
|
@ -461,7 +461,7 @@ impl Flow for FlexFlow {
|
|||
Mode::Inline => {
|
||||
self.available_main_size = available_inline_size;
|
||||
self.available_cross_size = available_block_size;
|
||||
self.inline_mode_assign_inline_sizes(layout_context,
|
||||
self.inline_mode_assign_inline_sizes(shared_context,
|
||||
inline_start_content_edge,
|
||||
inline_end_content_edge,
|
||||
content_inline_size)
|
||||
|
@ -469,7 +469,7 @@ impl Flow for FlexFlow {
|
|||
Mode::Block => {
|
||||
self.available_main_size = available_block_size;
|
||||
self.available_cross_size = available_inline_size;
|
||||
self.block_mode_assign_inline_sizes(layout_context,
|
||||
self.block_mode_assign_inline_sizes(shared_context,
|
||||
inline_start_content_edge,
|
||||
inline_end_content_edge,
|
||||
content_inline_size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue