tor-browser

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

text-overflow-ellipsis-width-001.html (828B)


      1 <!DOCTYPE html>
      2 <title>Ellipsizing should not affect `offsetWidth` of inline boxes.</title>
      3 <link rel="author" href="kojii@chromium.org">
      4 <link rel="help" href="https://crbug.com/978392">
      5 <link rel="help" href="https://drafts.csswg.org/css-ui-3/#ellipsing-details">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <style>
      9 #ellipsis {
     10  width: 50px;
     11  text-overflow: ellipsis;
     12  overflow: hidden;
     13  white-space: nowrap;
     14 }
     15 </style>
     16 <body>
     17  <div id="normal"><span>This is a test text.</span></div>
     18  <div id="ellipsis"><span>This is a test text.</span></div>
     19 <script>
     20 test(() => {
     21  let normal_child = normal.firstElementChild;
     22  let ellipsis_child = ellipsis.firstElementChild;
     23  assert_equals(normal_child.offsetWidth, ellipsis_child.offsetWidth);
     24 });
     25 </script>
     26 </body>