ruby-overhang-no-overlap.html (711B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <link rel="help" href="https://crbug.com/329776386"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <style> 7 p { 8 font-size: 10px; 9 } 10 ruby { 11 font-size: 40px; 12 } 13 </style> 14 15 <p> 16 <ruby>安<rt>ān</rt></ruby>〓<ruby>装<rt>zhuāng</rt></ruby>〓<ruby>窗<rt>chuāng</rt></ruby>〓<ruby>户<rt>hù</rt></ruby> 17 </p> 18 19 <script> 20 test(() => { 21 const rts = document.querySelectorAll('rt'); 22 const bounds2 = rts[1].getBoundingClientRect(); 23 const bounds3 = rts[2].getBoundingClientRect(); 24 assert_less_than_equal(Math.round(bounds2.right), Math.round(bounds3.left)); 25 }, "Annotations should not be overlapped"); 26 </script>