layout/reftests/flexbox/flexbox-position-fixed-2.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/flexbox/flexbox-position-fixed-2.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,71 @@
     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 +<!--
    1.10 +     Testcase with fixed-position children of a flex container.
    1.11 +     In this testcase, we simply specify "position: fixed" without
    1.12 +     actually doing any positioning, to test the "static position" of these
    1.13 +     children.
    1.14 +-->
    1.15 +<html xmlns="http://www.w3.org/1999/xhtml">
    1.16 +  <head>
    1.17 +    <style>
    1.18 +      div.containingBlock {
    1.19 +        top: 15px;
    1.20 +        left: 20px;
    1.21 +        height: 400px;
    1.22 +        position: absolute;
    1.23 +        border: 2px dashed purple;
    1.24 +      }
    1.25 +      .fixedpos {
    1.26 +        position: fixed;
    1.27 +        border: 2px dotted black;
    1.28 +      }
    1.29 +      div.flexbox {
    1.30 +        width: 200px;
    1.31 +        height: 100px;
    1.32 +        display: flex;
    1.33 +      }
    1.34 +      div.a {
    1.35 +        flex: 1 0 auto;
    1.36 +        width: 30px;
    1.37 +        height: 100px;
    1.38 +        background: lightgreen;
    1.39 +      }
    1.40 +      div.b {
    1.41 +        flex: 2 0 auto;
    1.42 +        width: 20px;
    1.43 +        height: 100px;
    1.44 +        background: yellow;
    1.45 +      }
    1.46 +      div.inflex {
    1.47 +        flex: none;
    1.48 +        width: 20px;
    1.49 +        height: 100px;
    1.50 +        background: gray;
    1.51 +      }
    1.52 +      div.noFlexFn {
    1.53 +        width: 15px;
    1.54 +        height: 15px;
    1.55 +        background: teal;
    1.56 +      }
    1.57 +    </style>
    1.58 +  </head>
    1.59 +  <body>
    1.60 +    <div class="containingBlock">
    1.61 +      <!-- First child fixedpos: -->
    1.62 +      <div class="flexbox"><div class="a fixedpos"/><div class="b"/></div>
    1.63 +      <!-- Second child fixedpos: -->
    1.64 +      <div class="flexbox"><div class="a"/><div class="b fixedpos"/></div>
    1.65 +      <!-- Middle child fixedpos: -->
    1.66 +      <div class="flexbox"
    1.67 +           ><div class="a"/><div class="inflex fixedpos"/><div class="b"/></div>
    1.68 +      <!-- Third child fixedpos, w/ inflexible items & justify-content: space-around: -->
    1.69 +      <div class="flexbox" style="justify-content: space-around"
    1.70 +           ><div class="inflex"/><div class="inflex"/><div class="inflex"
    1.71 +          /><div class="noFlexFn fixedpos"/><div class="inflex"/></div>
    1.72 +    </div>
    1.73 +  </body>
    1.74 +</html>

mercurial