<script>
if (window.internals) {
    window.internals.settings.setTextAutosizingEnabled(true);
    window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
}
</script>
<p>
    This tests that line-height adjustments for text autosizing are preserved when anonymous blocks
    are destroyed during incremental layout.
</p>
<div style="width: 600px; line-height: 20px;">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eu nisl leo, vel commodo nibh. Fusce suscipit arcu eu elit vulputate non hendrerit velit consequat.
    <div id="target"></div>
    Etiam venenatis posuere nisl id sagittis. Fusce tincidunt velit at sapien porta ornare. Morbi egestas, diam nec ultricies molestie, est velit ultricies leo, aliquet placerat justo libero id arcu.
</div>
<script>
    document.body.offsetTop;
    var pre = document.querySelector("div#target");
    pre.parentNode.replaceChild(document.createElement("div"), pre);
</script>
