mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -23,9 +23,9 @@ use script_layout_interface::wrapper_traits::ThreadSafeLayoutNode;
|
|||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
use style::computed_values::{border_collapse, border_top_style, vertical_align};
|
||||
use style::context::StyleContext;
|
||||
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
|
||||
use style::properties::{ComputedValues, ServoComputedValues};
|
||||
use style::servo::SharedStyleContext;
|
||||
use table::InternalTable;
|
||||
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
|
||||
use util::print_tree::PrintTree;
|
||||
|
@ -163,7 +163,7 @@ impl Flow for TableCellFlow {
|
|||
/// Recursively (top-down) determines the actual inline-size of child contexts and fragments.
|
||||
/// When called on this context, the context has had its inline-size set by the parent table
|
||||
/// row.
|
||||
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
|
||||
fn assign_inline_sizes(&mut self, shared_context: &SharedStyleContext) {
|
||||
let _scope = layout_debug_scope!("table_cell::assign_inline_sizes {:x}",
|
||||
self.block_flow.base.debug_id());
|
||||
debug!("assign_inline_sizes({}): assigning inline_size for flow", "table_cell");
|
||||
|
@ -175,7 +175,7 @@ impl Flow for TableCellFlow {
|
|||
border_collapse: self.block_flow.fragment.style.get_inheritedtable().border_collapse,
|
||||
};
|
||||
inline_size_computer.compute_used_inline_size(&mut self.block_flow,
|
||||
layout_context.shared_context(),
|
||||
shared_context,
|
||||
containing_block_inline_size);
|
||||
|
||||
let inline_start_content_edge =
|
||||
|
@ -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.shared_context(),
|
||||
self.block_flow.propagate_assigned_inline_size_to_children(shared_context,
|
||||
inline_start_content_edge,
|
||||
inline_end_content_edge,
|
||||
content_inline_size,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue