tor-browser

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

block-ellipsis-repaint-002.html (1215B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <meta charset="utf-8">
      4 <title>CSS Overflow: line-clamp ellipsis repaint tests</title>
      5 <link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com">
      6 <link rel="help" href="https://drafts.csswg.org/css-overflow-4/#block-ellipsis">
      7 <link rel="match" href="reference/block-ellipsis-repaint-002-ref.html">
      8 <meta name="assert" content="This test makes sure that, if the line with the ellipsis gets moved vertically because the height of previous lines grows, the ellipsis moves correspondingly; and that this happens even when the height of the line-clamp container does not change.">
      9 <script src="/common/reftest-wait.js"></script>
     10 <style>
     11 .clamp {
     12  line-clamp: 2;
     13  border: 1px solid black;
     14  padding: 4px;
     15  background-color: yellow;
     16  height: 3.5lh;
     17 }
     18 </style>
     19 
     20 <p>The ellipsis should appear right after the end of the second line.</p>
     21 
     22 <div class="clamp">
     23  <span id="line1">Line 1</span> <br>
     24  Line 2 <br>
     25  Line 3
     26 </div>
     27 
     28 <script>
     29  window.onload = () => {
     30    requestAnimationFrame(() => {
     31      requestAnimationFrame(() => {
     32        document.getElementById("line1").style.lineHeight = "2lh";
     33        takeScreenshot();
     34      });
     35    });
     36  };
     37 </script>