<!DOCTYPE html>
<style>#el0::first-letter, #el0:first-child { height: 100px;}</style>
This test passes if it doesn't crash.

<div id='container' contentEditable><a><img><div id="el0" style="display: inline-flex"><pre>AAAAA</pre></div></a></div>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

window.getSelection().selectAllChildren(document.getElementById('container'));
document.execCommand('FormatBlock', false, '<h5>');
</script>
