<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 - SVG Rectangle strokes thicker than specified, in Safari and Webkit nightly (does not impact simple lines)"
   href="https://bugs.webkit.org/show_bug.cgi?id=152834">152834</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SVG Rectangle strokes thicker than specified, in Safari and Webkit nightly (does not impact simple lines)
          </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>Mac OS X 10.11
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Major
          </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&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>andrejohn.mas&#64;gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>zimmermann&#64;kde.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=268460" name="attach_268460" title="test-case">attachment 268460</a> <a href="attachment.cgi?id=268460&amp;action=edit" title="test-case">[details]</a></span>
test-case

When a 'rect' (rectangle) is drawn in SVG I observe the stroke being thicker than specified 'stroke-width' and the equivalent specified value for a 'line'.

This is only an issue in SVG and specifying shape-rendering=&quot;crispEdges&quot; does not help.

I have not found any work around and this impacts quality of rendered images.

I have not tested for other stroke scenarios.

SVG Sample
----------

  &lt;!-- Line thickness as expected --&gt;
  &lt;svg id=&quot;svg1&quot; style=&quot;width: 200px; height: 200px; background: white&quot; shape-rendering=&quot;crispEdges&quot;&gt;
      &lt;line x1=&quot;0&quot; x2=&quot;200&quot; y1=&quot;20&quot; y2=&quot;20&quot; stroke=&quot;#000000&quot; style=&quot;stroke-width: 1px;&quot;&gt;&lt;/line&gt;
      &lt;line x1=&quot;0&quot; x2=&quot;200&quot; y1=&quot;40&quot; y2=&quot;40&quot; stroke=&quot;#000000&quot; style=&quot;stroke-width: 2px;&quot;&gt;&lt;/line&gt;
  &lt;/svg&gt;

  &lt;!-- Line thickness does not correspond to simple lines --&gt;
  &lt;svg id=&quot;svg2&quot; style=&quot;width: 200px; height: 200px; background: white&quot; shape-rendering=&quot;crispEdges&quot;&gt;
      &lt;rect x=&quot;80&quot; y=&quot;80&quot; width=&quot;40&quot; height=&quot;40&quot; stroke=&quot;#000000&quot; fill=&quot;none&quot; style=&quot;stroke-width: 1px;&quot;&gt;&lt;/rect&gt;
      &lt;rect x=&quot;70&quot; y=&quot;70&quot; width=&quot;60&quot; height=&quot;60&quot; stroke=&quot;#000000&quot; fill=&quot;none&quot; style=&quot;stroke-width: 2px;&quot;&gt;&lt;/rect&gt;
  &lt;/svg&gt;

Browsers Tested In
------------------

I observe this behaviour:
  - Webkit nightly 2016-07-01 (MacOS X 10.11)
  - Safari 9.0.2 (MacOS X 10.11)
  - Safari and other webkit based browsers on iOS 9.2

Behaves as expected:
  - Opera 34 (MacOS X 10.11)
  - Google Chrome 43 (MacOS X 10.11)</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>