mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Handle floats in BlockContainer::inline_content_sizes
Typically, block-level contents are stacked vertically, so this was just taking the maximum size among all contents. However, floats can be stacked horizontally, so we need to sum their sizes.
This commit is contained in:
parent
47fb54fc54
commit
4ec6dd1783
4 changed files with 112 additions and 28 deletions
|
@ -690,12 +690,7 @@ impl FloatBox {
|
|||
.floats
|
||||
.lower_ceiling(sequential_layout_state.current_block_position_including_margins());
|
||||
|
||||
let style = match self.contents {
|
||||
IndependentFormattingContext::Replaced(ref replaced) => replaced.style.clone(),
|
||||
IndependentFormattingContext::NonReplaced(ref non_replaced) => {
|
||||
non_replaced.style.clone()
|
||||
},
|
||||
};
|
||||
let style = self.contents.style().clone();
|
||||
let float_context = &mut sequential_layout_state.floats;
|
||||
let box_fragment = positioning_context.layout_maybe_position_relative_fragment(
|
||||
layout_context,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue