layout/reftests/w3c-css/submitted/flexbox/flexbox-whitespace-handling-1a.xhtml

Fri, 16 Jan 2015 04:50:19 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 04:50:19 +0100
branch
TOR_BUG_9701
changeset 13
44a2da4a2ab2
permissions
-rw-r--r--

Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <!--
     3      Any copyright is dedicated to the Public Domain.
     4      http://creativecommons.org/publicdomain/zero/1.0/
     5 -->
     6 <!--
     7      This test verifies that we don't create anonymous flex items around
     8      runs of inline content that are _purely_ whitespace.
    10      The test uses "white-space: pre", to try to tempt us into honoring
    11      that whitespace. (but we should resist that temptation).
    13      The test also uses 'justify-content: space-around' to be sure we can
    14      tell whether anonymous flex items are being created around the whitespace
    15      (since they'd claim a share of the packing space if they were there).
    16 -->
    17 <html xmlns="http://www.w3.org/1999/xhtml">
    18   <head>
    19     <title>CSS Test: Test that anonymous flex items aren't created for pure-whitespace inline content</title>
    20     <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
    21     <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-items"/>
    22     <link rel="match" href="flexbox-whitespace-handling-1-ref.xhtml"/>
    23     <style>
    24       div { height: 100px; }
    25       div.flexbox {
    26         white-space: pre;
    27         border: 1px dashed blue;
    28         width: 200px;
    29         display: flex;
    30         justify-content: space-around;
    31       }
    32       div.a {
    33         flex: none;
    34         width: 30px;
    35         background: lightgreen;
    36       }
    37       div.b {
    38         flex: none;
    39         width: 20px;
    40         background: lightblue;
    41       }
    42       img { width: 40px; }
    43     </style>
    44   </head>
    45   <body>
    46     <!-- whitespace & tab after flex item -->
    47     <div class="flexbox"><div class="a"/> 	</div>
    49     <!-- 2 spaces before flex item -->
    50     <div class="flexbox">  <div class="a"/><div class="b"/></div>
    52     <!-- newline & whitespace between flex items  -->
    53     <div class="flexbox"><img src="solidblue.png"/>
    54       <img src="solidblue.png"/></div>
    55   </body>
    56 </html>

mercurial