1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-collapsed-item-horiz-3.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +<!DOCTYPE html> 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> 1.10 +<head> 1.11 + <title>CSS Test: Testing that strut formation (from visibility:collapse) happens *after* lines have been stretched</title> 1.12 + <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 1.13 + <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#algo-visibility"> 1.14 + <link rel="match" href="flexbox-collapsed-item-horiz-3-ref.html"> 1.15 + <meta charset="utf-8"> 1.16 + <style> 1.17 + .flexContainer { 1.18 + display: flex; 1.19 + flex-wrap: wrap; 1.20 + align-content: stretch; /* Initial value; just here for emphasis */ 1.21 + width: 25px; 1.22 + height: 60px; 1.23 + background: yellow; 1.24 + border: 1px dotted black; 1.25 + float: left; 1.26 + margin: 5px; 1.27 + } 1.28 + .collapsedItem { 1.29 + visibility: collapse; 1.30 + width: 10px; 1.31 + } 1.32 + .shortItem { 1.33 + width: 25px; 1.34 + height: 10px; 1.35 + background: purple; 1.36 + } 1.37 + .tallItem { 1.38 + width: 10px; 1.39 + height: 30px; 1.40 + background: olive; 1.41 + } 1.42 + </style> 1.43 +</head> 1.44 +<body> 1.45 + <!-- In this testcase, the first flex line initially has a cross-size of 1.46 + 10px, and the second flex line has a cross-size of 30px. Both lines are 1.47 + stretched by 10px each (to hit the container's total cross-size, 60px). 1.48 + Then, we handle "visibility:collapse" and convert the collapsed item 1.49 + into a strut with the second line's stretched cross-size (40px), and we 1.50 + restart flex layout. This strut then ends up in the *first* line (since 1.51 + it has 0 main-size), which means both flex lines end up being 40px tall. 1.52 + --> 1.53 + <div class="flexContainer"> 1.54 + <div class="shortItem"></div> 1.55 + <div class="collapsedItem"></div> 1.56 + <div class="tallItem"></div> 1.57 + </div> 1.58 +</body> 1.59 +</html>