tor-browser

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

image-srcset-isize.html (1142B)


      1 <!doctype html>
      2 <html reftest-zoom="2" class="reftest-wait">
      3 <title>CSS Test: srcset intrinsic size isn't confused</title>
      4 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
      5 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1149357">
      6 <style>
      7 .image-container {
      8  display: inline;
      9 }
     10 .content-container {
     11  display: inline-block;
     12 }
     13 .flex-container {
     14  align-items: center;
     15  display: flex;
     16 }
     17 </style>
     18 <script>
     19  // reftest-zoom is only applied at onload, so ensure the source-selection
     20  // has happened after that
     21  function clearWait() {
     22    document.documentElement.classList.remove("reftest-wait");
     23  }
     24  window.addEventListener("load", function() {
     25    setTimeout(function() {
     26      var img = document.querySelector("img");
     27      img.onload = clearWait;
     28      img.onerror = clearWait;
     29      img.src = img.src;
     30    }, 0);
     31  });
     32 </script>
     33 <div class="flex-container">
     34  <div class="image-container">
     35    <img srcset="50.png 0.5x, 100.png 1x, 200.png 2x, 300.png 3x, 400.png">
     36  </div>
     37  <div class="content-container">
     38    Should see me right by the side of the image.
     39  </div>
     40 </div>
     41 </html>