1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-whitespace-handling-1a.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 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 + This test verifies that we don't create anonymous flex items around 1.11 + runs of inline content that are _purely_ whitespace. 1.12 + 1.13 + The test uses "white-space: pre", to try to tempt us into honoring 1.14 + that whitespace. (but we should resist that temptation). 1.15 + 1.16 + The test also uses 'justify-content: space-around' to be sure we can 1.17 + tell whether anonymous flex items are being created around the whitespace 1.18 + (since they'd claim a share of the packing space if they were there). 1.19 +--> 1.20 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.21 + <head> 1.22 + <title>CSS Test: Test that anonymous flex items aren't created for pure-whitespace inline content</title> 1.23 + <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> 1.24 + <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-items"/> 1.25 + <link rel="match" href="flexbox-whitespace-handling-1-ref.xhtml"/> 1.26 + <style> 1.27 + div { height: 100px; } 1.28 + div.flexbox { 1.29 + white-space: pre; 1.30 + border: 1px dashed blue; 1.31 + width: 200px; 1.32 + display: flex; 1.33 + justify-content: space-around; 1.34 + } 1.35 + div.a { 1.36 + flex: none; 1.37 + width: 30px; 1.38 + background: lightgreen; 1.39 + } 1.40 + div.b { 1.41 + flex: none; 1.42 + width: 20px; 1.43 + background: lightblue; 1.44 + } 1.45 + img { width: 40px; } 1.46 + </style> 1.47 + </head> 1.48 + <body> 1.49 + <!-- whitespace & tab after flex item --> 1.50 + <div class="flexbox"><div class="a"/> </div> 1.51 + 1.52 + <!-- 2 spaces before flex item --> 1.53 + <div class="flexbox"> <div class="a"/><div class="b"/></div> 1.54 + 1.55 + <!-- newline & whitespace between flex items --> 1.56 + <div class="flexbox"><img src="solidblue.png"/> 1.57 + <img src="solidblue.png"/></div> 1.58 + </body> 1.59 +</html> 1.60 +