mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00:00
LibWeb: Use correct max-size in intrinsic sizing of column flex layout
Regressed in 72dd37438d
This commit is contained in:
parent
9e23503c9c
commit
2d50dee920
3 changed files with 27 additions and 1 deletions
|
@ -0,0 +1,13 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x116 [BFC] children: not-inline
|
||||
Box <body> at (8,8) content-size 784x100 flex-container(column) [FFC] children: not-inline
|
||||
BlockContainer <div> at (8,8) content-size 784x100 flex-item [BFC] children: inline
|
||||
frag 0 from TextNode start: 0, length: 16, rect: [8,8 126.390625x17] baseline: 13.296875
|
||||
"Start free trial"
|
||||
TextNode <#text>
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]
|
||||
PaintableBox (Box<BODY>) [8,8 784x100]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,8 784x100]
|
||||
TextPaintable (TextNode<#text>)
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html><style>
|
||||
* {
|
||||
outline: 1px solid black;
|
||||
}
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
div {
|
||||
max-width: 100%;
|
||||
height: 100px;
|
||||
}
|
||||
</style><body><div>Start free trial
|
|
@ -1686,7 +1686,7 @@ CSSPixels FlexFormattingContext::calculate_intrinsic_main_size_of_flex_container
|
|||
auto const& computed_max_size = this->computed_main_max_size(item.box);
|
||||
|
||||
auto clamp_min = (!computed_min_size.is_auto() && !computed_min_size.contains_percentage()) ? specified_main_min_size(item.box) : automatic_minimum_size(item);
|
||||
auto clamp_max = (!should_treat_cross_max_size_as_none(item.box) && !computed_max_size.contains_percentage()) ? specified_main_max_size(item.box) : CSSPixels::max();
|
||||
auto clamp_max = (!should_treat_main_max_size_as_none(item.box) && !computed_max_size.contains_percentage()) ? specified_main_max_size(item.box) : CSSPixels::max();
|
||||
|
||||
result = css_clamp(result, clamp_min, clamp_max);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue