OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 #test-container span { | 3 #test-container span { |
4 float: left; /* This is the root cause */ | 4 float: left; /* This is the root cause */ |
5 width: 18px; | 5 width: 18px; |
6 height: 18px; | 6 height: 18px; |
7 } | 7 } |
8 </style> | 8 </style> |
9 <div id="test-container"></div> | 9 <div id="test-container"></div> |
10 <script src="../resources/runner.js"></script> | 10 <script src="../resources/runner.js"></script> |
(...skipping 10 matching lines...) Expand all Loading... |
21 container.appendChild(newDiv); | 21 container.appendChild(newDiv); |
22 }; | 22 }; |
23 | 23 |
24 function removeFloats() { | 24 function removeFloats() { |
25 var container = document.getElementById("test-container"); | 25 var container = document.getElementById("test-container"); |
26 if (container.lastChild) container.removeChild(container.lastChild); | 26 if (container.lastChild) container.removeChild(container.lastChild); |
27 } | 27 } |
28 | 28 |
29 function test() { | 29 function test() { |
30 addFloats(); | 30 addFloats(); |
31 PerfTestRunner.forceLayoutOrFullFrame(); | 31 PerfTestRunner.forceLayout(); |
32 removeFloats(); | 32 removeFloats(); |
33 } | 33 } |
34 | 34 |
35 PerfTestRunner.measureRunsPerSecond({ | 35 PerfTestRunner.measureRunsPerSecond({ |
36 description: "Measures performance of removing floats in a block with a lot
of inline children.", | 36 description: "Measures performance of removing floats in a block with a lot
of inline children.", |
37 run: test | 37 run: test |
38 }); | 38 }); |
39 </script> | 39 </script> |
40 </html> | 40 </html> |
OLD | NEW |