Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / css3 / flexbox / repaint.html
blob81d9f7665a6c67c52b7c31c52466fbcb080908d4
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 #flexbox {
6 display: flex;
9 #left {
10 flex: 1;
11 background-color: yellow;
14 #content {
15 flex: 1;
16 background-color: grey;
18 </style>
19 <script src="../../fast/repaint/resources/text-based-repaint.js"></script>
20 <script>
21 // This test makes sure that we repaint the right region of a flexbox when
22 // changing the flex values. Only the middle of the test page should be
23 // repainted. If the top of the test page (above the flexbox) is repainted,
24 // this test fails.
26 function setFlex(id, animationPercentage, start, end) {
27 var flexValue = start + ((end - start) * animationPercentage);
28 document.getElementById(id).style.flex = flexValue + " 0 0px";
31 function step(count) {
32 var animationPercentage = count ? 1 : .9;
33 setFlex("content", animationPercentage, 1, 5);
35 if (!count) {
36 // FIXME: we need a better way of waiting for layout/repainting to happen
37 setTimeout(step.bind(null, 1), 1);
38 } else if (window.testRunner) {
39 finishRepaintTest();
43 window.testIsAsync = true;
44 window.onload = runRepaintTest;
46 function repaintTest() {
47 window.startTime = Date.now();
48 // FIXME: we need a better way of waiting for layout/repainting to happen
49 setTimeout(step.bind(null, 0), 1);
51 </script>
52 </head>
53 <body>
54 <br><br><br><br><br><br>
55 <div id="flexbox">
56 <div id="left"></div>
57 <div id="content">
58 <p style="margin: 0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet. Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula. Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.</p>
59 </div>
60 </body>
61 </html>