summaryrefslogtreecommitdiffstats
path: root/layout/reftests/columns/zero-height-nondirty-reflow.html
blob: b530e9d64b6fe5676a2b45fd29ef90ab113d19b0 (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
<!DOCTYPE HTML>
<html>
 <head>
  <title>CSS Multi-column Layout Test: multi-column element with zero height</title>
  <!--
  Based on 
  https://github.com/web-platform-tests/wpt/blob/1f346b050d87656a040fa4fdf9f99567164e2a2b/css/css-multicol/multicol-zero-height-001.xht
  by Opera Software ASA.
  -->
  <style>

  html { overflow: hidden } /* suppress scrollbar reflows */

  div#multi-column
  {
  height: 0;
  orphans: 1;
  widows: 1;
  width: 200px;
  border-bottom:1px solid red;

  column-count: 10;
  column-gap: 0;
  display: inline-block;
  }

  div#multi-column > div
  {
  background: #0c0;
  float: left;
  height: 10px;
  width: 20px;
  }
  </style>
 </head>
 <body style="height: 300px; width: 400px;">
  <p>Below should be a 1px tall and 200px wide green line:</p>
  <div style="display: inline">
   <div id="multi-column">
    <div></div>
   </div>
  </div>
  <script>

  /*
   * Cause the multi-column element to be reflowed without being dirty or any resize bits set.
   */
  var e = document.body;
  e.offsetWidth;
  e.style.width = "300px";

  </script>
 </body>
</html>