tab-size-change-1b.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <!DOCTYPE html>
  2. <html class="reftest-wait">
  3. <head>
  4. <style type="text/css">
  5. body {
  6. font-family: serif;
  7. padding: 2px;
  8. }
  9. span {
  10. padding: 2px;
  11. }
  12. </style>
  13. <script type="text/javascript">
  14. function do_test() {
  15. var elems = ["one","two","three","four","five","six","seven","eight","nine","ten"];
  16. for (key in elems) {
  17. var e = document.getElementById(elems[key]);
  18. e.innerHTML = elems[key];
  19. }
  20. document.documentElement.removeAttribute('class');
  21. };
  22. document.addEventListener("MozReftestInvalidate", do_test, false);
  23. </script>
  24. </head>
  25. <!-- Test for modification of text with preformatted tabs, see
  26. https://bugzilla.mozilla.org/show_bug.cgi?id=631035#c38.
  27. In the first line, the tabs remain at the same offsets but widths will change;
  28. in the second line, their offsets will also change. -->
  29. <body>
  30. <div style="white-space: pre">
  31. <span id="one">iii</span>&#9;<span id="two">iii</span>&#9;<span id="three">mmmmm</span>&#9;<span id="four">mmmm</span>&#9;<span id="five">mmmm</span>
  32. <span id="six">x</span>&#9;<span id="seven">x</span>&#9;<span id="eight">x</span>&#9;<span id="nine">x</span>&#9;<span id="ten">x</span>
  33. </div>
  34. </body>
  35. </html>