tor-browser

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

1102175-2.html (1392B)


      1 <!DOCTYPE html>
      2 <html>
      3  <meta charset="utf-8">
      4  <title>CSS-Writing Modes Test: propagation of the writing-mode property from body to root</title>
      5  <link rel="author" title="Ting-Yu Lin" href="tlin@mozilla.com">
      6  <link rel="author" title="Mozilla" href="http://www.mozilla.org/">
      7  <link rel=help href="https://drafts.csswg.org/css-writing-modes-3/#principal-flow">
      8  <link rel="match" href="wm-propagation-body-dynamic-change-002-ref.html">
      9  <meta name=assert content="The writing mode of the newly inserted body must be propagated to the root.">
     10 
     11  <script>
     12  function runTest() {
     13    document.body.offsetHeight;
     14 
     15    var newBody = document.createElement("body");
     16    newBody.id = "new-body";
     17    var oldBody = document.getElementById("old-body");
     18 
     19    /* Insert a new <body> before the old one, which should become the primary <body>. */
     20    document.documentElement.insertBefore(newBody, oldBody);
     21  }
     22  </script>
     23 
     24  <style>
     25  #new-body {
     26    /* This writing-mode should propagate to the root element. */
     27    writing-mode: vertical-rl;
     28    margin: 0;
     29  }
     30 
     31  #old-body {
     32    writing-mode: horizontal-tb;
     33    inline-size: 100px;
     34  }
     35 
     36  div {
     37    background-color: blue;
     38    height: 100px;
     39    width: 100px;
     40  }
     41  </style>
     42 
     43  <body id="old-body" onload="runTest();">
     44    <div></div>
     45    <p>Test passes if you see a blue square in the upper-right corner of the page</p>
     46  </body>
     47 </html>