| <style> |
| body, div { |
| margin: 0; |
| width: 320px; |
| } |
| span { |
| background: red; |
| padding-left: 40px; |
| } |
| #first, #second { |
| background: green; |
| line-height: 40px; |
| float:left; |
| width: 160px; |
| } |
| </style> |
| <p> webkit.org/b/115687: Ensure we remove anonymous wrappers if all elements on a line become inline (i.e. excluding floating or positioned).</p> |
| <script src="../../resources/check-layout.js"></script> |
| <div id="container"> |
| <span id="inline" data-offset-x=160></span><div id="first"> </div><div id="second"> </div> |
| </div> |
| <script> |
| document.body.offsetTop; |
| document.getElementById('first').style.float = 'none'; |
| document.getElementById('second').style.float = 'none'; |
| document.body.offsetTop; |
| document.getElementById('first').style.float = 'left'; |
| document.getElementById('second').style.float = 'left'; |
| checkLayout('#inline'); |
| </script> |