table-anonymous-objects-028

Auto-imported from Gecko test 315146-1.xhtml

WeasyPrint

This browser

Flags
dom

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3 <head>
 4   <title>CSS Test: Auto-imported from Gecko test 315146-1.xhtml</title>
 5   <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes">
 7   <meta name="flags" content="dom">
 8 
 9 	<script type="text/javascript">
10 	function DeleteRow(container) {
11 		if (container.firstChild)
12 			container.removeChild(container.firstChild);
13 	}
14 
15 	function AddRow(container) {
16 		var tr = document.createElement("tr");
17 		var td = document.createElement("td");
18 		td.appendChild(document.createTextNode("A cell"));
19 		tr.appendChild(td);
20 		container.appendChild(tr);
21 	}
22 
23         function doTest() {
24           for (var i = 0; i < 10; ++i) {
25             document.body.offsetWidth;
26             AddRow(document.getElementById('table'));
27             document.body.offsetWidth;
28             DeleteRow(document.getElementById('table'));
29           }
30           document.documentElement.className = '';
31         }
32 	</script>
33 </head>
34 <body onload="doTest()">
35 <p>There should be no red below, except for antialiasing issues.</p>
36 <div style="position: relative; font-size: 2em;">
37 <div style="position: absolute; z-index: 2; top: 0; color: green; padding: 1px;">
38 
39 <table id="table" border="5"><tr><td>A cell</td></tr></table>
40 </div>
41 <div style="position: relative; z-index: 1; color: red; padding: 1px;">
42 
43 <table id="table" border="5"><tr><td>A cell</td></tr></table>
44 </div>
45 </div>
46 </body>
47 </html>