1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-table-fixup-1a.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,66 @@ 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 table parts inside of a flex container, triggering 1.11 + table-fixup. We use justify-content:space-between to stick packing 1.12 + space between flex items, so that we can verify that e.g. a contiguous 1.13 + run of <td>s will end up in the same flex item (wrapped in a table). 1.14 +--> 1.15 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.16 + <head> 1.17 + <title>CSS Test: Testing that table cells in a flex container get an anonymous table wrapper that forms the flex item</title> 1.18 + <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> 1.19 + <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-items"/> 1.20 + <link rel="match" href="flexbox-table-fixup-1-ref.xhtml"/> 1.21 + <style> 1.22 + div.flexbox { 1.23 + border: 1px dashed blue; 1.24 + width: 200px; 1.25 + display: flex; 1.26 + justify-content: space-around; 1.27 + } 1.28 + 1.29 + <!-- NOTE: table-fixup pads each td element by 1px on each side. We 1.30 + override that for top & bottom, for simplicity. So the td makes us 1.31 + generate a box that's 2px wider than its contents. --> 1.32 + td { 1.33 + padding-top: 0px; 1.34 + padding-bottom: 0px; 1.35 + } 1.36 + 1.37 + .a { 1.38 + background: lightgreen; 1.39 + width: 48px; 1.40 + } 1.41 + 1.42 + .b { 1.43 + background: yellow; 1.44 + width: 48px; 1.45 + } 1.46 + 1.47 + .c { 1.48 + background: pink; 1.49 + width: 48px; 1.50 + } 1.51 + </style> 1.52 + </head> 1.53 + <body> 1.54 + <!-- Just 2 adjacent table cells (they end up in the same table) --> 1.55 + <div class="flexbox" 1.56 + ><td class="a">cell1</td><td class="b">cell2</td></div> 1.57 + 1.58 + <!-- Table cell followed by tbody (they end up in the same table) --> 1.59 + <div class="flexbox" 1.60 + ><td class="a">cell1</td><tbody class="b">t</tbody></div> 1.61 + 1.62 + <!-- Empty table cell (ends up occupying 2px of width), followed by div, 1.63 + followed by nonempty table cell. (3 flex items). --> 1.64 + <!-- Note: We use "space-between" (instead of "space-around") here because 1.65 + it makes the math cleaner. (100px split 2 ways instead of 3 ways.) --> 1.66 + <div class="flexbox" style="justify-content: space-between" 1.67 + ><td></td><div class="c">div</div><td class="b">cell1</td></div> 1.68 + </body> 1.69 +</html>