mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Pass SharedStyleContext to compute_inline_sizes.
This commit is contained in:
parent
c33ac876ff
commit
ea15f69404
2 changed files with 5 additions and 5 deletions
|
@ -1616,7 +1616,7 @@ impl BlockFlow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn compute_inline_sizes(&mut self, layout_context: &LayoutContext) {
|
pub fn compute_inline_sizes(&mut self, shared_context: &SharedStyleContext) {
|
||||||
if !self.base.restyle_damage.intersects(REFLOW_OUT_OF_FLOW | REFLOW) {
|
if !self.base.restyle_damage.intersects(REFLOW_OUT_OF_FLOW | REFLOW) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1634,13 +1634,13 @@ impl BlockFlow {
|
||||||
debug!("Setting root position");
|
debug!("Setting root position");
|
||||||
self.base.position.start = LogicalPoint::zero(self.base.writing_mode);
|
self.base.position.start = LogicalPoint::zero(self.base.writing_mode);
|
||||||
self.base.block_container_inline_size = LogicalSize::from_physical(
|
self.base.block_container_inline_size = LogicalSize::from_physical(
|
||||||
self.base.writing_mode, layout_context.shared_context().viewport_size).inline;
|
self.base.writing_mode, shared_context.viewport_size).inline;
|
||||||
self.base.block_container_writing_mode = self.base.writing_mode;
|
self.base.block_container_writing_mode = self.base.writing_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Our inline-size was set to the inline-size of the containing block by the flow's parent.
|
// Our inline-size was set to the inline-size of the containing block by the flow's parent.
|
||||||
// Now compute the real value.
|
// Now compute the real value.
|
||||||
self.propagate_and_compute_used_inline_size(layout_context.shared_context());
|
self.propagate_and_compute_used_inline_size(shared_context);
|
||||||
|
|
||||||
// Now for some speculation.
|
// Now for some speculation.
|
||||||
match self.formatting_context_type() {
|
match self.formatting_context_type() {
|
||||||
|
@ -1722,7 +1722,7 @@ impl Flow for BlockFlow {
|
||||||
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
|
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
|
||||||
let _scope = layout_debug_scope!("block::assign_inline_sizes {:x}", self.base.debug_id());
|
let _scope = layout_debug_scope!("block::assign_inline_sizes {:x}", self.base.debug_id());
|
||||||
|
|
||||||
self.compute_inline_sizes(layout_context);
|
self.compute_inline_sizes(layout_context.shared_context());
|
||||||
|
|
||||||
// Move in from the inline-start border edge.
|
// Move in from the inline-start border edge.
|
||||||
let inline_start_content_edge = self.fragment.border_box.start.i +
|
let inline_start_content_edge = self.fragment.border_box.start.i +
|
||||||
|
|
|
@ -79,7 +79,7 @@ impl Flow for MulticolFlow {
|
||||||
|
|
||||||
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
|
fn assign_inline_sizes(&mut self, layout_context: &LayoutContext) {
|
||||||
debug!("assign_inline_sizes({}): assigning inline_size for flow", "multicol");
|
debug!("assign_inline_sizes({}): assigning inline_size for flow", "multicol");
|
||||||
self.block_flow.compute_inline_sizes(layout_context);
|
self.block_flow.compute_inline_sizes(layout_context.shared_context());
|
||||||
|
|
||||||
// Move in from the inline-start border edge.
|
// Move in from the inline-start border edge.
|
||||||
let inline_start_content_edge = self.block_flow.fragment.border_box.start.i +
|
let inline_start_content_edge = self.block_flow.fragment.border_box.start.i +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue