Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 823b59d3140eeb4533ec60c61d3f00c7a4c8ef68
https://github.com/WebKit/WebKit/commit/823b59d3140eeb4533ec60c61d3f00c7a4c8ef68
Author: Brandon Stewart <[email protected]>
Date: 2026-02-25 (Wed, 25 Feb 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-005-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-005.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-006-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-006.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-007-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-007.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-008-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-008.html
M Source/WebCore/rendering/RenderBlock.cpp
Log Message:
-----------
Absolutely positioned elements with intrinsic height incorrectly resolve
percentage heights of children
https://bugs.webkit.org/show_bug.cgi?id=308648
rdar://171179193
Reviewed by Sammy Gill.
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.
Tests:
imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-005.html
imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-006.html
imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-007.html
imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-008.html
* LayoutTests/TestExpectations:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-005-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-005.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-006-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-006.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-007-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-007.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-008-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/abspos-auto-sizing-fit-content-percentage-008.html:
Added.
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):
Canonical link: https://commits.webkit.org/308226@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications