aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-06-21 14:06:30 +0200
committerMs2ger <Ms2ger@gmail.com>2016-06-22 14:28:14 +0200
commit21b8d2bd91a7199399d55805f709448ca410a8b9 (patch)
tree56755091af449918388180497266b7a33b0fe304
parent959f8c11cddfa5ec066a40904f8eafb7ad75229d (diff)
downloadservo-21b8d2bd91a7199399d55805f709448ca410a8b9.tar.gz
servo-21b8d2bd91a7199399d55805f709448ca410a8b9.zip
Pass SharedStyleContext to propagate_assigned_inline_size_to_children.
-rw-r--r--components/layout/block.rs8
-rw-r--r--components/layout/multicol.rs2
-rw-r--r--components/layout/table.rs2
-rw-r--r--components/layout/table_cell.rs2
-rw-r--r--components/layout/table_row.rs2
-rw-r--r--components/layout/table_rowgroup.rs2
-rw-r--r--components/layout/table_wrapper.rs4
7 files changed, 11 insertions, 11 deletions
diff --git a/components/layout/block.rs b/components/layout/block.rs
index 082c6232c3f..1f9396e6596 100644
--- a/components/layout/block.rs
+++ b/components/layout/block.rs
@@ -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,
diff --git a/components/layout/multicol.rs b/components/layout/multicol.rs
index 09f0efd1130..fa50eb7a217 100644
--- a/components/layout/multicol.rs
+++ b/components/layout/multicol.rs
@@ -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,
|_, _, _, _, _, _| {});
}
diff --git a/components/layout/table.rs b/components/layout/table.rs
index 08fe3b395d6..fa91db53c36 100644
--- a/components/layout/table.rs
+++ b/components/layout/table.rs
@@ -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,
diff --git a/components/layout/table_cell.rs b/components/layout/table_cell.rs
index 8e487ba97da..833a044951c 100644
--- a/components/layout/table_cell.rs
+++ b/components/layout/table_cell.rs
@@ -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,
diff --git a/components/layout/table_row.rs b/components/layout/table_row.rs
index 69608513bd1..1398b3ec91d 100644
--- a/components/layout/table_row.rs
+++ b/components/layout/table_row.rs
@@ -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,
diff --git a/components/layout/table_rowgroup.rs b/components/layout/table_rowgroup.rs
index a5226310993..f03103ba87c 100644
--- a/components/layout/table_rowgroup.rs
+++ b/components/layout/table_rowgroup.rs
@@ -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,
diff --git a/components/layout/table_wrapper.rs b/components/layout/table_wrapper.rs
index 574d275af12..a3fab380ae0 100644
--- a/components/layout/table_wrapper.rs
+++ b/components/layout/table_wrapper.rs
@@ -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,