intra-level-whitespace-2-ref.html 1.1 KB

1234567891011121314151617181920212223242526272829
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Bug 1099807 - Intra-level whitespace pairing</title>
  6. <link rel="stylesheet" href="common.css">
  7. <style>
  8. body { font-family: monospace; }
  9. .container { border: 1px solid blue; margin: 20px; }
  10. </style>
  11. <style id="style"></style>
  12. </head>
  13. <body>
  14. <span id="ref1">12345</span> <span id="ref2">12345 67890</span>
  15. <div class="container"><ruby><rb>12345</rb> <rb>67890</rb><rt>09876</rt><rt>54321</rt></ruby></div>
  16. <div class="container"><ruby><rb>12345</rb><rb>67890</rb><rt>09876</rt> <rt>54321</rt></ruby></div>
  17. <div class="container"><ruby><rb>12345</rb> <rb>67890</rb><rt>09876</rt> <rt>54321</rt></ruby></div>
  18. <script type="text/javascript">
  19. var ref2 = document.getElementById('ref2');
  20. var style = document.getElementById('style');
  21. var width2 = ref2.getBoundingClientRect().width + 'px';
  22. // This is the same as the script in the corresponding
  23. // testcase, except that here we skip the intermediate
  24. // size and jump straight to the final size.
  25. style.textContent = '.container { width: ' + width2 + '; }';
  26. </script>
  27. </body>
  28. </html>