mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Pass SharedStyleContext to propagate_assigned_inline_size_to_children.
This commit is contained in:
parent
959f8c11cd
commit
21b8d2bd91
7 changed files with 11 additions and 11 deletions
|
@ -1311,7 +1311,7 @@ impl BlockFlow {
|
|||
/// and the code for block layout is significantly simpler.
|
||||
#[inline(always)]
|
||||
pub fn propagate_assigned_inline_size_to_children<F>(&mut self,
|
||||
layout_context: &LayoutContext,
|
||||
shared_context: &SharedStyleContext,
|
||||
inline_start_content_edge: Au,
|
||||
inline_end_content_edge: Au,
|
||||
content_inline_size: Au,
|
||||
|
@ -1331,7 +1331,7 @@ impl BlockFlow {
|
|||
box_sizing::T::border_box => self.fragment.border_padding.block_start_end(),
|
||||
box_sizing::T::content_box => Au(0),
|
||||
};
|
||||
let parent_container_size = self.explicit_block_containing_size(layout_context.shared_context());
|
||||
let parent_container_size = self.explicit_block_containing_size(shared_context);
|
||||
// https://drafts.csswg.org/css-ui-3/#box-sizing
|
||||
let explicit_content_size = self
|
||||
.explicit_block_size(parent_container_size)
|
||||
|
@ -1339,7 +1339,7 @@ impl BlockFlow {
|
|||
|
||||
// Calculate containing block inline size.
|
||||
let containing_block_size = if flags.contains(IS_ABSOLUTELY_POSITIONED) {
|
||||
self.containing_block_size(&layout_context.shared_context().viewport_size, opaque_self).inline
|
||||
self.containing_block_size(&shared_context.viewport_size, opaque_self).inline
|
||||
} else {
|
||||
content_inline_size
|
||||
};
|
||||
|
@ -1737,7 +1737,7 @@ impl Flow for BlockFlow {
|
|||
|
||||
let content_inline_size = self.fragment.border_box.size.inline - padding_and_borders;
|
||||
|
||||
self.propagate_assigned_inline_size_to_children(layout_context,
|
||||
self.propagate_assigned_inline_size_to_children(layout_context.shared_context(),
|
||||
inline_start_content_edge,
|
||||
inline_end_content_edge,
|
||||
content_inline_size,
|
||||
|
|
|
@ -119,7 +119,7 @@ impl Flow for MulticolFlow {
|
|||
self.block_flow.fragment.border_box.size.inline = content_inline_size + padding_and_borders;
|
||||
|
||||
self.block_flow.propagate_assigned_inline_size_to_children(
|
||||
layout_context, inline_start_content_edge, inline_end_content_edge, column_width,
|
||||
layout_context.shared_context(), inline_start_content_edge, inline_end_content_edge, column_width,
|
||||
|_, _, _, _, _, _| {});
|
||||
}
|
||||
|
||||
|
|
|
@ -400,7 +400,7 @@ impl Flow for TableFlow {
|
|||
&self.collapsed_inline_direction_border_widths_for_table;
|
||||
let mut collapsed_block_direction_border_widths_for_table =
|
||||
self.collapsed_block_direction_border_widths_for_table.iter().peekable();
|
||||
self.block_flow.propagate_assigned_inline_size_to_children(layout_context,
|
||||
self.block_flow.propagate_assigned_inline_size_to_children(layout_context.shared_context(),
|
||||
inline_start_content_edge,
|
||||
inline_end_content_edge,
|
||||
content_inline_size,
|
||||
|
|
|
@ -189,7 +189,7 @@ impl Flow for TableCellFlow {
|
|||
let content_inline_size =
|
||||
self.block_flow.fragment.border_box.size.inline - padding_and_borders;
|
||||
|
||||
self.block_flow.propagate_assigned_inline_size_to_children(layout_context,
|
||||
self.block_flow.propagate_assigned_inline_size_to_children(layout_context.shared_context(),
|
||||
inline_start_content_edge,
|
||||
inline_end_content_edge,
|
||||
content_inline_size,
|
||||
|
|
|
@ -381,7 +381,7 @@ impl Flow for TableRowFlow {
|
|||
let spacing = self.spacing;
|
||||
let row_writing_mode = self.block_flow.base.writing_mode;
|
||||
let table_writing_mode = self.table_writing_mode;
|
||||
self.block_flow.propagate_assigned_inline_size_to_children(layout_context,
|
||||
self.block_flow.propagate_assigned_inline_size_to_children(layout_context.shared_context(),
|
||||
inline_start_content_edge,
|
||||
inline_end_content_edge,
|
||||
containing_block_inline_size,
|
||||
|
|
|
@ -165,7 +165,7 @@ impl Flow for TableRowGroupFlow {
|
|||
&self.collapsed_inline_direction_border_widths_for_table;
|
||||
let mut collapsed_block_direction_border_widths_for_table =
|
||||
self.collapsed_block_direction_border_widths_for_table.iter().peekable();
|
||||
self.block_flow.propagate_assigned_inline_size_to_children(layout_context,
|
||||
self.block_flow.propagate_assigned_inline_size_to_children(layout_context.shared_context(),
|
||||
inline_start_content_edge,
|
||||
inline_end_content_edge,
|
||||
content_inline_size,
|
||||
|
|
|
@ -376,7 +376,7 @@ impl Flow for TableWrapperFlow {
|
|||
match assigned_column_inline_sizes {
|
||||
None => {
|
||||
self.block_flow
|
||||
.propagate_assigned_inline_size_to_children(layout_context,
|
||||
.propagate_assigned_inline_size_to_children(layout_context.shared_context(),
|
||||
inline_start_content_edge,
|
||||
inline_end_content_edge,
|
||||
content_inline_size,
|
||||
|
@ -384,7 +384,7 @@ impl Flow for TableWrapperFlow {
|
|||
}
|
||||
Some(ref assigned_column_inline_sizes) => {
|
||||
self.block_flow
|
||||
.propagate_assigned_inline_size_to_children(layout_context,
|
||||
.propagate_assigned_inline_size_to_children(layout_context.shared_context(),
|
||||
inline_start_content_edge,
|
||||
inline_end_content_edge,
|
||||
content_inline_size,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue