tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

trailing-space-in-inline-box.html (1037B)


      1 <!DOCTYPE html>
      2 <title>Preserved trailing spaces in inline boxes should hang</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-text-3/#propdef-white-space">
      4 <link rel="help" href="http://crbug.com/1130310">
      5 <link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <style>
      9 .target {
     10  font-family: Consolas, 'Courier New', Courier, monospace;
     11  font-size: 20px;
     12  width: 5ch;
     13  white-space: pre-wrap;
     14  overflow: auto visible;
     15  border: 1px solid blue;
     16 }
     17 .not-culled span {
     18  background: orange;
     19 }
     20 </style>
     21 <body>
     22  <div class="target">12345 678</div>
     23  <div class="target"><span>12345 678</span></div>
     24  <div class="target not-culled"><span>12345 678</span></div>
     25 <script>
     26 for (let target of document.getElementsByClassName('target')) {
     27  test(() => {
     28    let width = target.offsetWidth;
     29    let scroll_width = target.scrollWidth;
     30    assert_less_than_equal(scroll_width, width);
     31  });
     32 }
     33 </script>
     34 </body>