Bug 308648
| Summary: | Absolutely positioned elements with intrinsic height incorrectly resolve percentage heights of children | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Brandon <brandonstewart> |
| Component: | CSS | Assignee: | Brandon <brandonstewart> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | koivisto, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Brandon
When an absolutely positioned element has an intrinsic height value
(fit-content, min-content, max-content), its children with percentage
heights (e.g. height: 100%) should treat the parent's height as
indefinite, since the parent's height depends on the content being
sized. Instead, availableLogicalHeightForPercentageComputation() was
treating any non-auto height as definite, causing percentage heights
to resolve against the containing block's height rather than being
treated as auto.
This caused HeadlessUI popover panels (which use height: fit-content
on an absolutely positioned flex container) to collapse to the
navbar's height instead of sizing to their content.
The fix excludes intrinsic height values from the "specified height"
check in availableLogicalHeightForPercentageComputation(), so they
are treated as indefinite for percentage resolution of children.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/171179193>
Brandon
Pull request: https://github.com/WebKit/WebKit/pull/59424
EWS
Committed 308226@main (823b59d3140e): <https://commits.webkit.org/308226@main>
Reviewed commits have been landed. Closing PR #59424 and removing active labels.