layout/reftests/table-dom/insertColgroupAndRowgroup.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <html class="reftest-wait">
     2 <head>
     4 <style>
     5  colgroup#s { width: 200px; }
     6 </style>
     8 <script>
     9 function boom()
    10 {
    11   document.body.offsetHeight;
    13   var last = document.getElementById("last");
    14   var parent = last.parentNode;
    16   var colgroup = document.createElement("colgroup");
    17   colgroup.setAttribute("id", "s");
    18   parent.insertBefore(colgroup, last);
    20   var newtbody = document.createElement("tbody");
    21   var newrow = document.createElement("tr");
    22   var newcell = document.createElement("td");
    23   newcell.appendChild(document.createTextNode("cell 1,1"));
    24   newrow.appendChild(newcell);
    25   newcell = document.createElement("td");
    26   newcell.appendChild(document.createTextNode("cell 1,2"));
    27   newrow.appendChild(newcell);
    28   newtbody.appendChild(newrow);
    29   parent.insertBefore(newtbody, last);
    31   document.body.offsetHeight;
    32   document.documentElement.className = "";
    33 }
    34 </script>
    36 </head>
    37 <body onload="boom();">
    38 <table border="1">
    39 <colgroup></colgroup>
    40 <tbody id="last"><tr><td>cell 2,1</td><td>cell 2,2</td></tr></tbody>
    41 </table>
    42 </body>
    43 </html>

mercurial