[webkit-changes] [WebKit/WebKit] 58d1ff: [CSS Math Functions] round() is incorrect when num...
Tim Nguyen
noreply at github.com
Tue Aug 1 21:05:14 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 58d1ff825f4e6920efe7fe6a8762d8c84cedf76e
https://github.com/WebKit/WebKit/commit/58d1ff825f4e6920efe7fe6a8762d8c84cedf76e
Author: Tim Nguyen <ntim at apple.com>
Date: 2023-08-01 (Tue, 01 Aug 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-computed-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-computed.html
M Source/WebCore/platform/calc/CalcOperator.h
Log Message:
-----------
[CSS Math Functions] round() is incorrect when number is a multiple of step
https://bugs.webkit.org/show_bug.cgi?id=259702
rdar://113233588
Reviewed by Simon Fraser.
In Safari 16.6, round(up, 10px, 5px) resolves to 15px instead of 10px as it should.
>From https://drafts.csswg.org/css-values-4/#round-func:
> If A is exactly equal to an integer multiple of B, round() resolves to A exactly
Also add WPT for https://drafts.csswg.org/css-values/#round-infinities
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-computed.html:
* Source/WebCore/platform/calc/CalcOperator.h:
(WebCore::evaluateCalcExpression):
Canonical link: https://commits.webkit.org/266504@main
More information about the webkit-changes
mailing list