tor-browser

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

line-breaking-atomic-nowrap-001.html (1023B)


      1 <!DOCTYPE html>
      2 <title>CSS Text Test: Check atomic inline+NBSP quirk does not apply if nowrap</title>
      3 <link rel="help" href="https://www.w3.org/TR/css-text-3/#line-break-details">
      4 <link rel="help" href="https://crbug.com/1002442">
      5 <link rel="author" title="Koji Ishii" href="mailto:kojiishi@gmail.com">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <style>
      9 div {
     10  white-space: nowrap;
     11  font-size: 10px;
     12  line-height: 1;
     13  width: 5ch;
     14 }
     15 .inline-block {
     16  display: inline-block;
     17  width: 3ch;
     18  height: 1em;
     19 }
     20 img {
     21  width: 3ch;
     22  height: 1em;
     23 }
     24 </style>
     25 <body>
     26  <div>000<span class="inline-block"></span>&nbsp;111</div>
     27  <div>000<img>&nbsp;111</div>
     28  <div>000&nbsp;<span class="inline-block"></span>111</div>
     29  <div>000&nbsp;<img>111</div>
     30 <script>
     31 (function () {
     32  for (let e of document.getElementsByTagName('div')) {
     33    test(() => {
     34      let height = e.offsetHeight;
     35      assert_equals(Math.round(height / 10), 1);
     36    });
     37  }
     38 })();
     39 </script>
     40 </body>