<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - SVGs are sometimes offset by 0.5px on retina"
href="https://bugs.webkit.org/show_bug.cgi?id=160956">160956</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>SVGs are sometimes offset by 0.5px on retina
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>OS X 10.10
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>SVG
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jonasmunk@mac.com
</td>
</tr>
<tr>
<th>CC</th>
<td>zimmermann@kde.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=286365" name="attach_286365" title="Minimal test case">attachment 286365</a> <a href="attachment.cgi?id=286365&action=edit" title="Minimal test case">[details]</a></span>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>