WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
195401
Transform scale() combined with a devicePixelRatio creates roundoff errors
https://bugs.webkit.org/show_bug.cgi?id=195401
Summary
Transform scale() combined with a devicePixelRatio creates roundoff errors
Tom Dezentje
Reported
2019-03-06 23:35:56 PST
When a browser has a devicePixelRatio with decimals there seems to be a roundoff error. As shown in the following example:
https://jsfiddle.net/xb813adh
The red bar is always 100px and scales accordingly. The blue bar is 1px width scaled with a transform. It should always be the same width as the red bar. When zooming in the width of the blue bar stays the same for 1, 1.10 and 1.25. After that it stays the same until a scale of 2. Changing the example to scale 50px 2 times gives minor roundoff errors but is still incorrect. Seen here:
https://jsfiddle.net/y9jg10hp/
Other browsers show the correct working.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-03-06 23:36:48 PST
<
rdar://problem/48667104
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug