<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - float:right not working consistently across page loads (Loading-related race condition?)"
   href="https://bugs.webkit.org/show_bug.cgi?id=150271#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - float:right not working consistently across page loads (Loading-related race condition?)"
   href="https://bugs.webkit.org/show_bug.cgi?id=150271">bug 150271</a>
              from <span class="vcard"><a class="email" href="mailto:zalan&#64;apple.com" title="zalan &lt;zalan&#64;apple.com&gt;"> <span class="fn">zalan</span></a>
</span></b>
        <pre>It seems to me that we don't properly clean up the tree after display:none is applied on the &lt;div&gt; in the middle.
(This is the output of a slightly modified test reduction with spans instead of buttons) 
&lt;span&gt;foo&lt;/span&gt;&lt;div class=&quot;hidden&quot;&gt;&lt;/div&gt;&lt;div class=&quot;collapseMenu&quot;&gt;&lt;span&gt;bar&lt;/span&gt;

Broken rendering
--AG--- --        RenderBlock  (0.00, 0.00) (1491.00, 20.00) renderer-&gt;(0x12135df18)
------- --          RootInlineBox  (0.00, 2.00) (20.22, 16.00) (0x122fbac78) renderer-&gt;(0x12135df18)
------- --            InlineTextBox  (0.00, 2.00) (20.22, 16.00) (0x122fb23c0) run(0, 3) &quot;foo&quot;
------- --          SPAN RenderInline renderer-&gt;(0x120b73f70) node-&gt;(0x120b5dc98)
------- --            #text RenderText renderer-&gt;(0x120b50960) node-&gt;(0x120b4f370) length-&gt;(3) &quot;foo&quot;
----F-- --        DIV RenderBlock  (1470.52, 20.00) (20.48, 20.00) renderer-&gt;(0x12135d8a0) node-&gt;(0x120b5dd68)
------- --          RootInlineBox  (0.00, 2.00) (20.48, 16.00) (0x122fbad20) renderer-&gt;(0x12135d8a0)
------- --            InlineTextBox  (0.00, 2.00) (20.48, 16.00) (0x122fb2420) run(0, 3) &quot;bar&quot;
------- --          SPAN RenderInline renderer-&gt;(0x120b49000) node-&gt;(0x120b5ddd0)
------- --            #text RenderText renderer-&gt;(0x120b50cc0) node-&gt;(0x120b4f3c0) length-&gt;(3) &quot;bar&quot;


Correct rendering:
------- --        RootInlineBox  (0.00, 2.00) (20.22, 16.00) (0x11d7185e8) renderer-&gt;(0x12135df18)
------- --          InlineTextBox  (0.00, 2.00) (20.22, 16.00) (0x117f1a900) run(0, 3) &quot;foo&quot;
------- --        SPAN RenderInline renderer-&gt;(0x11fbf5820) node-&gt;(0x11fbf5478)
------- --          #text RenderText renderer-&gt;(0x117f4b7e0) node-&gt;(0x122fd2910) length-&gt;(3) &quot;foo&quot;
----F-- --        DIV RenderBlock  (1470.52, 0.00) (20.48, 20.00) renderer-&gt;(0x12135d398) node-&gt;(0x11fbf5548)
------- --          RootInlineBox  (0.00, 2.00) (20.48, 16.00) (0x11d718540) renderer-&gt;(0x12135d398)
------- --            InlineTextBox  (0.00, 2.00) (20.48, 16.00) (0x117f1a8a0) run(0, 3) &quot;bar&quot;
------- --          SPAN RenderInline renderer-&gt;(0x11fbf5888) node-&gt;(0x11fbf55b0)
------- --            #text RenderText renderer-&gt;(0x117f1a420) node-&gt;(0x122fd2960) length-&gt;(3) &quot;bar&quot;</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>