mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
layout: Respect alignment when sizing replaced abspos (#35085)
If an absolutely position element which is replaced has `justify-self` or `align-self` set to `stretch`, and no inset is `auto` on that axis, then an automatic size should behave as `stretch`, not as `fit-content`. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
2965b2fda7
commit
f6c166533e
9 changed files with 92 additions and 69 deletions
|
@ -161,16 +161,19 @@ impl taffy::LayoutPartialTree for TaffyContainerContext<'_> {
|
|||
style,
|
||||
independent_context
|
||||
.preferred_aspect_ratio(&pbm.padding_border_sums),
|
||||
&Sizes::new(
|
||||
option_f32_to_size(content_box_known_dimensions.height),
|
||||
Size::Initial,
|
||||
Size::Initial,
|
||||
),
|
||||
&Sizes::new(
|
||||
option_f32_to_size(content_box_known_dimensions.width),
|
||||
Size::Initial,
|
||||
Size::Initial,
|
||||
),
|
||||
LogicalVec2 {
|
||||
block: &Sizes::new(
|
||||
option_f32_to_size(content_box_known_dimensions.height),
|
||||
Size::Initial,
|
||||
Size::Initial,
|
||||
),
|
||||
inline: &Sizes::new(
|
||||
option_f32_to_size(content_box_known_dimensions.width),
|
||||
Size::Initial,
|
||||
Size::Initial,
|
||||
),
|
||||
},
|
||||
Size::FitContent.into(),
|
||||
pbm.padding_border_sums + pbm.margin.auto_is(Au::zero).sum(),
|
||||
)
|
||||
.to_physical_size(self.style.writing_mode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue