<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 - Switching between two SVG images with no intrinsic sizes causes them to get the default SVG size instead of the container size"
   href="https://bugs.webkit.org/show_bug.cgi?id=142805">142805</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Switching between two SVG images with no intrinsic sizes causes them to get the default SVG size instead of the container size
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </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>sabouhallawa@apple.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=248890" name="attach_248890" title="test case">attachment 248890</a> <a href="attachment.cgi?id=248890&action=edit" title="test case">[details]</a></span>
test case

Open the attached test case. 

Expected: No red color is displayed and the size of the green rectangle should be 300x100 pixels.

Switching from SVG with intrinsic size to an SVG with no intrinsic size or vice versa seems to work as expected.  The problem happens when switching between two images with no-intrisinc sizes back and forth. In this case we use the old layout of the SVG image but we set the SVG size to the default SVG intrinsic size which is 300x150 pixels. In the attached test case, the container size is 300x100 pixels. The old layout can display the SVG in 300x100 pixels. But because we change the image size to be 300x150 pixels, the SVG gets scaled down by (1,100/150).</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>