Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b9bcdf25d8b36f45bafc32d87014b1350b5c14ce
https://github.com/WebKit/WebKit/commit/b9bcdf25d8b36f45bafc32d87014b1350b5c14ce
Author: Alan Baradlay <[email protected]>
Date: 2026-10-02 (Fri, 02 Oct 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/animation/calc-size-height-interpolation-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/animation/interpolate-size-height-composition-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/animation/interpolate-size-height-interpolation-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/animation/interpolate-size-logical-properties-interpolation-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/animation/interpolate-size-width-composition-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/animation/interpolate-size-width-interpolation-expected.txt
M Source/WebCore/rendering/RenderBox.cpp
Log Message:
-----------
[css-values-5 calc-size()] Round the result of the calculation to the nearest
layout unit
https://bugs.webkit.org/show_bug.cgi?id=324506
<rdar://problem/187738774>
Reviewed by Antti Koivisto.
Interpolating between `height: stretch` and `height: calc-size(any, 50px)` at a
progress of 1.1 in a
300px tall container gives the calculation `55px + (-0.1 * size)`.
Multiplying and adding those fractional terms in floating point leaves the
result slightly off:
with `size` as 300px it evaluates to 24.999999999999979, and truncating that
landed on 24.98px rather than 25px.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::resolveCalcSizeLogicalWidth const):
(WebCore::RenderBox::computeSizingKeywordLogicalContentHeightUsingGeneric
const):
*
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/animation/calc-size-height-interpolation-expected.txt:
Canonical link: https://commits.webkit.org/322498@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications