| /* Must be positioned absolute or static, must have margins to push it out view. */ |
| /* Any kind of quote will do, can be either :before or :after */ |
| <p>Bug 109616 - ASSERT(!renderer()->needsLayout()) when calling Element::focus() with generated content</p> |
| This is testing a case where RenderQuote::updateDepth would mark the RenderQuote |
| and its ancestors as needing layout in the middle of a layout of its ancestor. |
| When its ancestor finishes the layout it will mark itself and the ancestors |
| farther up as no longer needing layout. The end result is some subtree |
| needing layout, but the RenderView and possibly other ancestors of the subtree |
| RenderView <- !needsLayout |
| RenderBlock (.focusable) <- needsLayout |
| RenderBlock (generated content) <- needsLayout |
| RenderQuote <- needsLayout |
| <div class="positioned"></div> |
| <div class="focusable" tabindex="1"></div> |
| // .focusable still needs layout at this point, but RenderView doesn't |
| // think any descendants need layout. |
| document.querySelector('.focusable').focus(); |