Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | |
michael@0 | 3 | <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> |
michael@0 | 4 | |
michael@0 | 5 | <window |
michael@0 | 6 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
michael@0 | 7 | width="400" |
michael@0 | 8 | height="600"> |
michael@0 | 9 | |
michael@0 | 10 | <vbox style="max-width: 400px;"> |
michael@0 | 11 | <!-- default: the inner hbox should expand the stack. --> |
michael@0 | 12 | <hbox style="height: 20px;"> |
michael@0 | 13 | <stack flex="1" style="background: yellow;"> |
michael@0 | 14 | <hbox style="width: 100px; height: 20px; background: blue;" top="0" left="100"/> |
michael@0 | 15 | </stack> |
michael@0 | 16 | <spacer flex="3" style="background: green;"/> |
michael@0 | 17 | </hbox> |
michael@0 | 18 | |
michael@0 | 19 | <!-- same as above, with explicit -moz-stack-sizing: stretch-to-fit --> |
michael@0 | 20 | <hbox style="height: 20px;"> |
michael@0 | 21 | <stack flex="1" style="background: yellow;"> |
michael@0 | 22 | <hbox style="-moz-stack-sizing: stretch-to-fit; width: 100px; height: 20px; background: blue;" top="0" left="100"/> |
michael@0 | 23 | </stack> |
michael@0 | 24 | <spacer flex="3" style="background: green;"/> |
michael@0 | 25 | </hbox> |
michael@0 | 26 | |
michael@0 | 27 | <!-- same as above, but with overflow: hidden --> |
michael@0 | 28 | <hbox style="height: 20px;"> |
michael@0 | 29 | <stack flex="1" style="overflow: hidden; background: yellow;"> |
michael@0 | 30 | <hbox style="-moz-stack-sizing: stretch-to-fit; width: 100px; height: 20px; background: blue;" top="0" left="100"/> |
michael@0 | 31 | </stack> |
michael@0 | 32 | <spacer flex="3" style="background: green; height: 20px;"/> |
michael@0 | 33 | </hbox> |
michael@0 | 34 | |
michael@0 | 35 | <!-- inner hbox has stack-sizing: ignore, but the stack doesn't have overflow: hidden set; the stack will stretch |
michael@0 | 36 | just enough to include the child, but no more --> |
michael@0 | 37 | <hbox style="height: 20px;"> |
michael@0 | 38 | <stack flex="1" style="background: yellow;"> |
michael@0 | 39 | <hbox style="-moz-stack-sizing: ignore; width: 100px; height: 20px; background: blue;" top="0" left="100"/> |
michael@0 | 40 | </stack> |
michael@0 | 41 | <spacer flex="3" style="background: green; height: 20px;"/> |
michael@0 | 42 | </hbox> |
michael@0 | 43 | |
michael@0 | 44 | <!-- same as above, except stack has overflow: hidden set, so the blue shouldn't be visible --> |
michael@0 | 45 | <hbox style="height: 20px;"> |
michael@0 | 46 | <stack flex="1" style="overflow: hidden; background: yellow;"> |
michael@0 | 47 | <hbox style="-moz-stack-sizing: ignore; width: 100px; height: 20px; background: blue;" top="0" left="100"/> |
michael@0 | 48 | </stack> |
michael@0 | 49 | <spacer flex="3" style="background: green; height: 20px;"/> |
michael@0 | 50 | </hbox> |
michael@0 | 51 | |
michael@0 | 52 | <!-- no flex on the stack, but an explicit size; the child will cause us to resize the stack during Layout --> |
michael@0 | 53 | <hbox style="height: 20px;"> |
michael@0 | 54 | <stack style="width: 100px; background: yellow;"> |
michael@0 | 55 | <hbox style="width: 100px; height: 20px; background: transparent;" top="0" left="100"/> |
michael@0 | 56 | </stack> |
michael@0 | 57 | <spacer flex="1" style="background: green;"/> |
michael@0 | 58 | </hbox> |
michael@0 | 59 | |
michael@0 | 60 | <!-- same as above, but with stack-sizing: ignore; the stack should not be resized --> |
michael@0 | 61 | <hbox style="height: 20px;"> |
michael@0 | 62 | <stack style="width: 100px; background: yellow;"> |
michael@0 | 63 | <hbox style="-moz-stack-sizing: ignore; width: 100px; height: 20px; background: transparent;" top="0" left="100"/> |
michael@0 | 64 | </stack> |
michael@0 | 65 | <spacer flex="1" style="background: green;"/> |
michael@0 | 66 | </hbox> |
michael@0 | 67 | |
michael@0 | 68 | </vbox> |
michael@0 | 69 | |
michael@0 | 70 | </window> |