Bug 263141
| Summary: | @property integer syntax rounds numbers incorrectly | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jane Ori <janeori> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | ntim |
| Priority: | P2 | ||
| Version: | Safari 16 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Jane Ori
Safari is using an away-from-zero rounding strategy to cast number values assigned to an integer property.
Chrome uses the "nearest" strategy that JS's Math.round() uses.
"nearest" is also the default rounding for the round() CSS function
Here is a reduced test case showing the differences:
https://codepen.io/propjockey/pen/vYvMbaX/253c4756c72e962cb10b0c19b396ea37?editors=1100
Thank you!
// Jane
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Tim Nguyen (:ntim)
I switched to using a towards positive infinity rounding strategy in bug 260777. Can you please re-test in STP?
*** This bug has been marked as a duplicate of bug 260777 ***