OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- Lock the page scale factor to prevent rescaling when the content width chan
ges. --> | 2 <!-- Lock the page scale factor to prevent rescaling when the content width chan
ges. --> |
3 <meta name="viewport" content="initial-scale=1.0 minimum-scale=1.0 maximum-scale
=1.0"> | 3 <meta name="viewport" content="initial-scale=1.0 minimum-scale=1.0 maximum-scale
=1.0"> |
4 <script src="../../resources/runner.js"></script> | 4 <script src="../../resources/runner.js"></script> |
5 <body style="overflow:scroll;"> <!-- don't want auto scrollbars to affect the nu
mber of layout passes. --> | 5 <body style="overflow:scroll;"> <!-- don't want auto scrollbars to affect the nu
mber of layout passes. --> |
6 <pre id="log"></pre> | 6 <pre id="log"></pre> |
7 <div id="target" style="position:absolute; top:0; left:0; display:none; -web
kit-columns:2; column-fill:auto; width:40em; height:2em;"> | 7 <div id="target" style="position:absolute; top:0; left:0; display:none; -web
kit-columns:2; column-fill:auto; width:40em; height:2em;"> |
8 <div style="height:1234567890px;">xxxxxxxxxx</div> | 8 <div style="height:1234567890px;">xxxxxxxxxx</div> |
9 </div> | 9 </div> |
10 <script> | 10 <script> |
11 var target = document.getElementById("target"); | 11 var target = document.getElementById("target"); |
12 var style = target.style; | 12 var style = target.style; |
13 | 13 |
14 function test() { | 14 function test() { |
15 style.display = "block"; | 15 style.display = "block"; |
16 PerfTestRunner.forceLayoutOrFullFrame(); | 16 PerfTestRunner.forceLayout(); |
17 | 17 |
18 // Do some hit-testing. | 18 // Do some hit-testing. |
19 document.caretRangeFromPoint(10, 10); | 19 document.caretRangeFromPoint(10, 10); |
20 | 20 |
21 style.display = "none"; | 21 style.display = "none"; |
22 PerfTestRunner.forceLayoutOrFullFrame(); | 22 PerfTestRunner.forceLayout(); |
23 } | 23 } |
24 | 24 |
25 PerfTestRunner.measureRunsPerSecond({ | 25 PerfTestRunner.measureRunsPerSecond({ |
26 description: "Measures performance of multicol layout with many columns.
", | 26 description: "Measures performance of multicol layout with many columns.
", |
27 run: test | 27 run: test |
28 }); | 28 }); |
29 </script> | 29 </script> |
30 </body> | 30 </body> |
OLD | NEW |