layout/reftests/table-anonymous-boxes/315146-1.xhtml

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 <?xml version="1.0" encoding="UTF-8"?>
michael@0 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
michael@0 3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
michael@0 4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" class="reftest-wait">
michael@0 5 <head>
michael@0 6 <script type="text/javascript"><![CDATA[
michael@0 7 function DeleteRow(container) {
michael@0 8 if (container.firstChild)
michael@0 9 container.removeChild(container.firstChild);
michael@0 10 }
michael@0 11
michael@0 12 function AddRow(container) {
michael@0 13 var tr = document.createElement("tr");
michael@0 14 var td = document.createElement("td");
michael@0 15 td.appendChild(document.createTextNode("A cell"));
michael@0 16 tr.appendChild(td);
michael@0 17 container.appendChild(tr);
michael@0 18 }
michael@0 19
michael@0 20 function doTest() {
michael@0 21 for (var i = 0; i < 10; ++i) {
michael@0 22 document.body.offsetWidth;
michael@0 23 AddRow(document.getElementById('table'));
michael@0 24 document.body.offsetWidth;
michael@0 25 DeleteRow(document.getElementById('table'));
michael@0 26 }
michael@0 27 document.documentElement.className = '';
michael@0 28 }
michael@0 29 ]]></script>
michael@0 30 </head>
michael@0 31 <body onload="doTest()">
michael@0 32 <table id="table" border="5"><tr><td>A cell</td></tr></table>
michael@0 33 </body>
michael@0 34 </html>

mercurial