display-first-line-002.html (948B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>Display flex first line with floated first letter</title> 4 <link rel="help" href="https://crbug.com/1097595"> 5 <link rel="match" href="display-first-line-002-ref.html"> 6 <style id="styleElm"> 7 #victim::first-line { display:flex; } 8 #victim::first-letter { float:right; } 9 </style> 10 11 <!-- The contenteditable DIV is just here to trigger legacy layout 12 fallback, and a DCHECK failure identical to the one in the bug 13 report. If we remove it, we'll get NG layout, and then it will 14 actually DCHECK-fail inside NG inline layout code instead. --> 15 <div contenteditable></div> 16 17 <p>The word "PASS" should be seen below. There should be no DCHECK 18 failure.</p> 19 <div id="child" style="display:none;"></div> 20 <div id="victim" style="width:fit-content;"> 21 SPAS 22 </div> 23 <script> 24 document.body.offsetTop; 25 styleElm.appendChild(child); 26 document.body.offsetTop; 27 victim.style.color = "blue"; 28 </script>