RESOLVED DUPLICATE of bug 259702 263145
round(up) incorrect values
https://bugs.webkit.org/show_bug.cgi?id=263145
Summary round(up) incorrect values
Jane Ori
Reported 2023-10-13 15:30:17 PDT
round(up, 1px, 1px) computes to 2px, it should be 1px Here is a reduced test case: https://codepen.io/propjockey/pen/bGOJOQe/3fa426c2617e00b5481f35583b70c1ff?editors=1100 Firefox has a similar bug but theirs also affects round(down) https://bugzilla.mozilla.org/show_bug.cgi?id=1859048
Attachments
Ahmad Saleem
Comment 1 2023-10-14 03:58:48 PDT
I am able to reproduce this bug in WebKit ToT (269337@main) and it is matching 'Firefox Nightly 120', while Chrome Canary 120 is different. I think first need to check web-spec, whether we need to change our behavior to match Chrome or not.
Tim Nguyen (:ntim)
Comment 2 2023-10-14 07:57:26 PDT
I fixed this in bug 259702, can you please retest in Safari Technology Preview if you have the chance? > I am able to reproduce this bug in WebKit ToT (269337@main) and it is matching 'Firefox Nightly 120', while Chrome Canary 120 is different. Ahmad, the expected result is that both bars have the same width. Very strange that you see it match Firefox Nightly, Firefox Nightly has the wrong result on my side.
Tim Nguyen (:ntim)
Comment 3 2023-10-14 07:57:36 PDT
*** This bug has been marked as a duplicate of bug 259702 ***
Ahmad Saleem
Comment 4 2023-10-14 07:58:18 PDT
@Tim, let me attach latest screenshot for reference of what I see.
Ahmad Saleem
Comment 5 2023-10-14 07:59:40 PDT
Ignore me - I think I mixed my window: Reference 1 px is matching with render round(up, 1px, 1px).
Note You need to log in before you can comment on or make changes to this bug.