summaryrefslogtreecommitdiffstats
path: root/layout/reftests/table-anonymous-boxes/277995-1.html
blob: e513d6a8fa49bee7cbd5c3a8114dd04f4c3d46f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html class="reftest-wait">
<head>
  <script type="text/javascript" language="javascript">
    function doMore(data) {
      while(data.hasChildNodes()) 
        data.firstChild.remove();
      for (var i = 0; i < 10; i++) {
	append(data);
      }
    }

    function append(data) {
      var row = document.createElement("div");
      row.setAttribute("class", "row");

      var cell = document.createElement("span");
      cell.appendChild(document.createTextNode("More Data"));
      cell.setAttribute("class", "cell");
      row.appendChild(cell);
      data.appendChild(row);
    }

    function doTest() {
      for (var i = 0; i < 10; ++i) {
        document.body.offsetWidth;
        doMore(document.getElementById('data'));
      }
      document.documentElement.className = '';
    }
  </script>
  <style>
    .table {
      display: table;
    }
    .row {
      display: table-row;

    }
    .cell {
      display: table-cell;
    }
  </style>
</head>
<body onload="doTest()">
<table>
  <tr>
    <td>
      <div id="data" class="table">
      </div>
    </td>
  </tr>
</table>
</body>
</html>