WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
160956
SVGs are sometimes offset by 0.5px on retina
https://bugs.webkit.org/show_bug.cgi?id=160956
Summary
SVGs are sometimes offset by 0.5px on retina
Jonas Munk
Reported
2016-08-18 00:16:34 PDT
Created
attachment 286365
[details]
Minimal test case Sometimes SVGs are offset by .5 pixels when drawn on retina screen. It looks like it happens randomly based on some vertical pixel-fitting. I would expect the coordinate system for the SVG to start at a full pixel based on the container. This is especially a problem when doing pixel-perfect/pixel-fitted icons for UI - not normally noticeable. I have created a perfect 32x32 square SVG to test with (hopefully) + an example using xlink In the attached test case: 1) The SVGs are drawn showing the problem where the top line in the rect is clipped 2) An image showing how Chrome draws it 3) An image showing how I see it on my machine with Webkit nightly 4) The same SVGs again - but now it draws correctly (probably because the content above makes it land on a full pixel or something) Note it looks like Firefox has a problem with the first SVGs but only on low DPI screen.
Attachments
Minimal test case
(1.73 KB, text/html)
2016-08-18 00:16 PDT
,
Jonas Munk
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Jonas Munk
Comment 1
2016-08-18 01:01:42 PDT
I see now that the problem occurs because of the margins on the headers resulting in a vertical position that does not land on a whole pixel. But I would still expect that the SVGs are drawn from a full pixel.
Ahmad Saleem
Comment 2
2022-06-29 16:31:46 PDT
I am able to reproduce this bug in Safari 15.5 and Safari TP 148 on macOS 12.4. The first SVG have top border finer (thinner) than other borders. All other browsers (Chrome Canary 105 and Firefox Nightly 104) render it fine. Thanks!
Brent Fulgham
Comment 3
2022-07-15 17:24:02 PDT
Confirmed.
Radar WebKit Bug Importer
Comment 4
2022-07-15 17:24:13 PDT
<
rdar://problem/97102392
>
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