mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix various issues with replaced elements in flex layout (#33263)
In particular, this takes into account that flex items may be stretched, and if they have an aspect ratio, we ma6y need to convert the stretched size through the ratio. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
4ae2610c24
commit
3acc9edd82
43 changed files with 334 additions and 481 deletions
|
@ -1917,12 +1917,7 @@ impl IndependentFormattingContext {
|
|||
IndependentFormattingContext::Replaced(replaced) => {
|
||||
let size = replaced
|
||||
.contents
|
||||
.used_size_as_if_inline_element(
|
||||
layout.containing_block,
|
||||
&replaced.style,
|
||||
None,
|
||||
&pbm,
|
||||
)
|
||||
.used_size_as_if_inline_element(layout.containing_block, &replaced.style, &pbm)
|
||||
.to_physical_size(container_writing_mode);
|
||||
let fragments = replaced.contents.make_fragments(&replaced.style, size);
|
||||
let content_rect = PhysicalRect::new(pbm_physical_origin, size);
|
||||
|
@ -2383,6 +2378,7 @@ impl<'layout_data> ContentSizesComputation<'layout_data> {
|
|||
self.layout_context,
|
||||
self.containing_block,
|
||||
&LogicalVec2::zero(),
|
||||
false, /* auto_block_size_stretches_to_containing_block */
|
||||
);
|
||||
|
||||
if !inline_formatting_context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue