<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 - Deeply nested phrasing content is parsed incorrectly"
   href="https://bugs.webkit.org/show_bug.cgi?id=162527">162527</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Deeply nested phrasing content is parsed incorrectly
          </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>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>HTML DOM
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sindre&#64;identu.no
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>cdumez&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Example URL: <a href="http://codepen.io/somebee/pen/mAWBaq">http://codepen.io/somebee/pen/mAWBaq</a>

Steps to reproduce the problem:
1. Write 5 levels of nested phrasing content (the nested tags must be of the same type, but it happens for any phrasing type).
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;TEXT&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;i&gt;TEXT&lt;/i&gt;&lt;/b&gt;
See that this is parsed as expected.

2. Add any attribute to the outermost node:
&lt;b title='top'&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;TEXT&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;i&gt;TEXT&lt;/i&gt;&lt;/b&gt;
See that any children except the first will be parsed outside of the outermost node.

Adding an attribute to a node should not make the html unwrap and restructure the fully valid html.

It works in Firefox and IE. Chrome (all versions of Chrome/Chromium tested) has the same issue.</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>