Bug 263145
Summary: | round(up) incorrect values | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jane Ori <janeori> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | ahmad.saleem792, karlcow, ntim, simon.fraser |
Priority: | P2 | ||
Version: | Safari 16 | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Jane Ori
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
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)
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)
*** This bug has been marked as a duplicate of bug 259702 ***
Ahmad Saleem
@Tim, let me attach latest screenshot for reference of what I see.
Ahmad Saleem
Ignore me - I think I mixed my window:
Reference 1 px is matching with render round(up, 1px, 1px).