tor-browser

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

flexbox-resizeviewport-1.xhtml (1314B)


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3     Any copyright is dedicated to the Public Domain.
      4     http://creativecommons.org/publicdomain/zero/1.0/
      5 -->
      6 <!-- Testcase to be sure a flex container gets reflowed properly when its
      7     iframe changes size. -->
      8 <html xmlns="http://www.w3.org/1999/xhtml"
      9      class="reftest-wait">
     10  <head>
     11    <style>
     12      iframe {
     13        width:  75px;
     14        height: 75px;
     15      }
     16    </style>
     17    <script>
     18      function setElementPropertyTo(id, propertyName, propertyValue) {
     19        var elem = document.getElementById(id);
     20        elem.style[propertyName] = propertyValue;
     21      }
     22 
     23      function tweak() {
     24        setElementPropertyTo("a", "width", "50px");
     25        setElementPropertyTo("b", "width", "125px");
     26        setElementPropertyTo("c", "height", "50px");
     27        setElementPropertyTo("d", "height", "125px");
     28        document.documentElement.removeAttribute("class");
     29      }
     30      window.addEventListener("MozReftestInvalidate", tweak, false);
     31    </script>
     32  </head>
     33  <body>
     34    <iframe id="a" src="flexbox-resizeviewport-1-helper.html"/>
     35    <iframe id="b" src="flexbox-resizeviewport-1-helper.html"/>
     36    <br/>
     37    <iframe id="c" src="flexbox-resizeviewport-1-helper.html"/>
     38    <iframe id="d" src="flexbox-resizeviewport-1-helper.html"/>
     39  </body>
     40 </html>