Bug 259702
Summary: | [CSS Math Functions] round() is incorrect when number is a multiple of step | ||
---|---|---|---|
Product: | WebKit | Reporter: | Natalie Weizenbaum <nweiz> |
Component: | CSS | Assignee: | Tim Nguyen (:ntim) <ntim> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | janeori, ntim, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 16 | ||
Hardware: | Mac (Apple Silicon) | ||
OS: | macOS 13 | ||
See Also: | https://github.com/web-platform-tests/wpt/pull/41284 |
Natalie Weizenbaum
According to CSS Values and Units 4 (https://drafts.csswg.org/css-values-4/#round-func), for any round() strategy,
> If A is exactly equal to an integer multiple of B, round() resolves to A exactly
However, round(up, 10px, 5px) resolves to 15px instead of 10px as it should.
Tested in Safari 16.6.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/113233588>
Tim Nguyen (:ntim)
Pull request: https://github.com/WebKit/WebKit/pull/16302
Tim Nguyen (:ntim)
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/41284
EWS
Committed 266504@main (58d1ff825f4e): <https://commits.webkit.org/266504@main>
Reviewed commits have been landed. Closing PR #16302 and removing active labels.
Tim Nguyen (:ntim)
*** Bug 263145 has been marked as a duplicate of this bug. ***