Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0ff2e0dd2476cb4bf31a1ad4b046f3c45b5699ec
https://github.com/WebKit/WebKit/commit/0ff2e0dd2476cb4bf31a1ad4b046f3c45b5699ec
Author: Alan Baradlay <[email protected]>
Date: 2026-10-02 (Fri, 02 Oct 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-out-of-flow-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-out-of-flow.html
M Source/WebCore/rendering/RenderBox.cpp
Log Message:
-----------
[css-values-5 calc-size()] Add support for calc-size() on an out-of-flow
positioned box in the inline axis
https://bugs.webkit.org/show_bug.cgi?id=324508
<rdar://problem/187740145>
Reviewed by Antti Koivisto.
<div style="position: relative; width: 400px">
<div style="position: absolute; width: calc-size(max-content, size +
20px)">…</div>
</div>
The max-content width is 100px, so the box is 120px wide rather than 100px. The
block axis already
resolved a keyword basis, since it goes through
computeContentAndScrollbarLogicalHeightUsing().
Test:
imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-out-of-flow.html
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::computeOutOfFlowPositionedLogicalWidthUsing const):
Keeps the width switchOn() answers a keyword-basis calc-size() with and
substitutes it for `size`,
which covers the intrinsic keywords, stretch, and an auto basis with both
insets set.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-out-of-flow.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-out-of-flow-expected.txt:
Added.
Canonical link: https://commits.webkit.org/322528@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications