summaryrefslogtreecommitdiffstats
path: root/layout/reftests/bugs/346189-1.xul
blob: 62acfb8e9e71da4571a0d3ce75ffb6911e840d9f (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<window
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  width="400"
  height="600">

<vbox style="max-width: 400px;">
  <!-- default: the inner hbox should expand the stack. -->
  <hbox style="height: 20px;">
    <stack flex="1" style="background: yellow;">
      <hbox style="width: 100px; height: 20px; background: blue;" top="0" left="100"/>
    </stack>
    <spacer flex="3" style="background: green;"/>
  </hbox>

  <!-- same as above, with explicit -moz-stack-sizing: stretch-to-fit -->
  <hbox style="height: 20px;">
    <stack flex="1" style="background: yellow;">
      <hbox style="-moz-stack-sizing: stretch-to-fit; width: 100px; height: 20px; background: blue;" top="0" left="100"/>
    </stack>
    <spacer flex="3" style="background: green;"/>
  </hbox>

  <!-- same as above, but with overflow: hidden -->
  <hbox style="height: 20px;">
    <stack flex="1" style="overflow: hidden; background: yellow;">
      <hbox style="-moz-stack-sizing: stretch-to-fit; width: 100px; height: 20px; background: blue;" top="0" left="100"/>
    </stack>
    <spacer flex="3" style="background: green; height: 20px;"/>
  </hbox>

  <!-- inner hbox has stack-sizing: ignore, but the stack doesn't have overflow: hidden set; the stack will stretch
       just enough to include the child, but no more -->
  <hbox style="height: 20px;">
    <stack flex="1" style="background: yellow;">
      <hbox style="-moz-stack-sizing: ignore; width: 100px; height: 20px; background: blue;" top="0" left="100"/>
    </stack>
    <spacer flex="3" style="background: green; height: 20px;"/>
  </hbox>

  <!-- same as above, except stack has overflow: hidden set, so the blue shouldn't be visible -->
  <hbox style="height: 20px;">
    <stack flex="1" style="overflow: hidden; background: yellow;">
      <hbox style="-moz-stack-sizing: ignore; width: 100px; height: 20px; background: blue;" top="0" left="100"/>
    </stack>
    <spacer flex="3" style="background: green; height: 20px;"/>
  </hbox>

  <!-- no flex on the stack, but an explicit size; the child will cause us to resize the stack during Layout -->
  <hbox style="height: 20px;">
    <stack style="width: 100px; background: yellow;">
      <hbox style="width: 100px; height: 20px; background: transparent;" top="0" left="100"/>
    </stack>
    <spacer flex="1" style="background: green;"/>
  </hbox>

  <!-- same as above, but with stack-sizing: ignore; the stack should not be resized -->
  <hbox style="height: 20px;">
    <stack style="width: 100px; background: yellow;">
      <hbox style="-moz-stack-sizing: ignore; width: 100px; height: 20px; background: transparent;" top="0" left="100"/>
    </stack>
    <spacer flex="1" style="background: green;"/>
  </hbox>

</vbox>

</window>