1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +00:00

LibWeb: Don't mark heights as definite in set_content_height()

Height definiteness is now preserved as intended by CSS-SIZING-3
(assuming I've understood it correctly) and not implicitly granted by
layout algorithms when they assign height.

For the specific special/magical cases where some sizes become definite
during layout, the preceding commits have made them explicit in code.

This fixes a number of flex layout issues where we were previously
resolving percentage values against post-layout flex container heights,
but other browsers don't.
This commit is contained in:
Andreas Kling 2024-01-29 16:03:44 +01:00
parent 0dd8458683
commit f963bb4f36
7 changed files with 106 additions and 7 deletions

View file

@ -0,0 +1,30 @@
<!doctype html><style type="text/css">
* {
outline: 1px solid black;
}
.outer {
display: flex;
flex-direction: column;
background: pink;
}
.item {
flex-shrink: 0;
flex-grow: 0;
flex-basis: 100%;
background: orange;
}
.spacer {
width: 120px;
height: 120px;
background: wheat;
}
</style>
<div class="outer">
<div class="item">
<div class="spacer"></div>
</div>
<div>
text text text
</div>
</div>
<div>

View file

@ -0,0 +1,20 @@
<!doctype html><style>
* {
outline: 1px solid black;
}
.flexContainer {
display: flex;
flex-direction: column;
background: pink;
}
.item {
flex-shrink: 0;
height: 50%;
background: orange;
}
.green {
width: 120px;
height: 120px;
background: green;
}
</style><div class="flexContainer"><div class="item"><div class="green">