Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / css3 / flexbox / style-change.html
blob01aab5457ee4b100d255bd675b2bb7a76a7657bd
1 <!DOCTYPE html>
2 <html>
3 <style>
4 body {
5 margin: 0;
7 .flexbox {
8 display: flex;
9 background-color: #aaa;
10 position: relative;
13 .flexbox > :nth-child(1) {
14 background-color: blue;
16 .flexbox > :nth-child(2) {
17 background-color: green;
20 .absolute {
21 position: absolute;
22 width: 50px;
23 height: 50px;
24 background-color: yellow !important;
26 </style>
27 <script src="../../resources/check-layout.js"></script>
28 <body>
30 <p>This test verifies that changing order, align-content, align-items, align-self, or justify-content will relayout.</p>
32 <div id="flexbox" class="flexbox" style="width: 300px; height: 300px;">
33 <div id="a" style="flex: 0 0 auto; width: 100px; height: 100px;"></div>
34 <div id="b" style="flex: 0 0 auto; width: 100px; height: 100px;"></div>
35 </div>
36 <script>
38 var flexbox = document.getElementById("flexbox");
39 var aDiv = document.getElementById("a");
40 var bDiv = document.getElementById("b");
42 function checkValues(aXOffset, aYOffset, bXOffset, bYOffset)
44 aDiv.setAttribute("data-offset-x", aXOffset);
45 aDiv.setAttribute("data-offset-y", aYOffset);
46 bDiv.setAttribute("data-offset-x", bXOffset);
47 bDiv.setAttribute("data-offset-y", bYOffset);
48 checkLayout('.flexbox');
51 checkValues(0, 0, 100, 0);
53 flexbox.style.justifyContent = "flex-end";
54 checkValues(100, 0, 200, 0);
56 flexbox.style.alignItems = "flex-end";
57 checkValues(100, 200, 200, 200);
59 bDiv.style.order = -1;
60 checkValues(200, 200, 100, 200);
62 aDiv.style.alignSelf = "flex-start";
63 checkValues(200, 0, 100, 200);
65 flexbox.style.width = "100px";
66 flexbox.style.flexWrap = "wrap";
67 flexbox.style.alignContent = "flex-end";
68 checkValues(0, 200, 0, 100);
70 </script>
72 </body>
73 </html>