layout/reftests/flexbox/flexbox-minSize-horiz-1-ref.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/flexbox/flexbox-minSize-horiz-1-ref.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,78 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<!--
     1.6 +     Any copyright is dedicated to the Public Domain.
     1.7 +     http://creativecommons.org/publicdomain/zero/1.0/
     1.8 +-->
     1.9 +<html xmlns="http://www.w3.org/1999/xhtml">
    1.10 +  <head>
    1.11 +    <style>
    1.12 +      div.flexbox {
    1.13 +        width: 200px;
    1.14 +        font-size: 8px;
    1.15 +      }
    1.16 +      div.outerContainer {
    1.17 +        border: 1px dotted black;
    1.18 +        height: 42px;
    1.19 +        margin-bottom: 5px;
    1.20 +      }
    1.21 +      div.flexbox > * {
    1.22 +        vertical-align: top;
    1.23 +        display: inline-block;
    1.24 +        margin-right: 20px;
    1.25 +        border: 1px dashed green;
    1.26 +        background: lightblue;
    1.27 +        height: 40px;
    1.28 +      }
    1.29 +      div.childMinSizeIsMinContent > * {
    1.30 +        min-width: -moz-min-content;
    1.31 +      }
    1.32 +      div.childSizeIsMinContent > * {
    1.33 +        width: -moz-min-content;
    1.34 +      }
    1.35 +      div.smallSize      { width: 5px; }
    1.36 +      div.smallFlexBasis { width: 2px; }
    1.37 +      div.zeroWidth      { width: 0; }
    1.38 +
    1.39 +    </style>
    1.40 +  </head>
    1.41 +  <body>
    1.42 +
    1.43 +    <!-- Check that we use the min-content width as a lower-bound when sizing
    1.44 +         flex items. -->
    1.45 +    <div class="flexbox childMinSizeIsMinContent outerContainer">
    1.46 +      <div>abc d e f</div
    1.47 +      ><div class="smallSize">abc d e f</div
    1.48 +      ><div class="smallFlexBasis">abc d e f</div>
    1.49 +    </div>
    1.50 +
    1.51 +    <!-- ... EVEN if our flex container is small and we're overflowing. -->
    1.52 +    <div class="outerContainer smallSize">
    1.53 +      <div class="flexbox childSizeIsMinContent">
    1.54 +        <div>abc d e f</div
    1.55 +        ><div>abc d e f</div
    1.56 +        ><div>abc d e f</div>
    1.57 +      </div>
    1.58 +    </div>
    1.59 +
    1.60 +    <!-- Test that "min-width: 0" on flex items will keep us from clamping to
    1.61 +         the min-content width. (So we can now actually honor small 'width'
    1.62 +         and 'flex-basis' values.) -->
    1.63 +    <div class="flexbox outerContainer">
    1.64 +      <div>abc d e f</div
    1.65 +      ><div class="smallSize">abc d e f</div
    1.66 +      ><div class="smallFlexBasis">abc d e f</div>
    1.67 +    </div>
    1.68 +
    1.69 +    <!-- ... and similarly, when we have a small flex container and we trigger
    1.70 +         shrinking behavior, flex items with "min-width: 0" are allowed to
    1.71 +         shrink past their min-content width. -->
    1.72 +    <div class="outerContainer smallSize">
    1.73 +      <div class="flexbox">
    1.74 +        <div class="zeroWidth">abc d e f</div
    1.75 +        ><div class="zeroWidth">abc d e f</div
    1.76 +        ><div class="zeroWidth">abc d e f</div>
    1.77 +      </div>
    1.78 +    </div>
    1.79 +
    1.80 +  </body>
    1.81 +</html>

mercurial