layout/reftests/flexbox/flexbox-inlinecontent-horiz-1b.xhtml

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

michael@0 1 <?xml version="1.0" encoding="UTF-8"?>
michael@0 2 <!--
michael@0 3 Any copyright is dedicated to the Public Domain.
michael@0 4 http://creativecommons.org/publicdomain/zero/1.0/
michael@0 5 -->
michael@0 6 <!--
michael@0 7 This test inserts a new div into some inline content in a flex container.
michael@0 8 That should split the inline content into two flex items.
michael@0 9 -->
michael@0 10 <html xmlns="http://www.w3.org/1999/xhtml"
michael@0 11 class="reftest-wait">
michael@0 12 <head>
michael@0 13 <link rel="stylesheet" type="text/css" href="ahem.css" />
michael@0 14 <script>
michael@0 15 function tweak() {
michael@0 16 var flexbox = document.getElementsByClassName("flexbox")[0];
michael@0 17 var insertionPoint = flexbox.firstChild.nextSibling.nextSibling;
michael@0 18
michael@0 19 var newDiv = document.createElement("div");
michael@0 20 newDiv.setAttribute("class", "b");
michael@0 21
michael@0 22 flexbox.insertBefore(newDiv, insertionPoint);
michael@0 23
michael@0 24 document.documentElement.removeAttribute("class");
michael@0 25 }
michael@0 26
michael@0 27 window.addEventListener("MozReftestInvalidate", tweak, false);
michael@0 28 </script>
michael@0 29 <style>
michael@0 30 div { height: 100px; }
michael@0 31 div.flexbox {
michael@0 32 font: 10px Ahem;
michael@0 33 width: 200px;
michael@0 34 display: flex;
michael@0 35 }
michael@0 36 div.a {
michael@0 37 flex: 1 0 20px;
michael@0 38 background: lightgreen;
michael@0 39 }
michael@0 40 div.b {
michael@0 41 flex: 2 0 30px;
michael@0 42 background: yellow;
michael@0 43 }
michael@0 44 div.inflex {
michael@0 45 flex: 0 0 20px;
michael@0 46 background: gray;
michael@0 47 }
michael@0 48 </style>
michael@0 49 </head>
michael@0 50 <body>
michael@0 51 <div class="flexbox"
michael@0 52 ><div class="a"/>text<i>italic</i
michael@0 53 ><div class="inflex"/></div>
michael@0 54 </body>
michael@0 55 </html>

mercurial