Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
|
esprehn
2015/05/04 22:14:39
ditto.
| |
| 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| 5 <title>Adding whitespace to table with anonymous descendant performance test </title> | |
| 6 <script src="../resources/runner.js"></script> | |
| 7 </head> | |
| 8 <body> | |
| 9 <pre id="log"></pre> | |
| 10 <div style="display: table;" id="test"></div> | |
| 11 <script> | |
| 12 var target = document.getElementById("test"); | |
| 13 function test() { | |
| 14 target.innerHTML = '<div style="display: inline-block;"></div>'; | |
|
esprehn
2015/05/04 22:14:38
Why inline blocks? This just makes us create an an
| |
| 15 for (var i = 0; i < 1000; i++) { | |
| 16 var testElement = document.createTextNode(" "); | |
| 17 target.insertBefore(testElement, target.firstChild); | |
| 18 } | |
| 19 document.body.offsetTop; | |
| 20 } | |
| 21 | |
| 22 PerfTestRunner.measureRunsPerSecond({ | |
| 23 description: "Is sensitive to the performance of layout adding white space to a table with anonymous descendants.", | |
| 24 run: test | |
| 25 }); | |
| 26 </script> | |
| 27 </body> | |
| 28 </html> | |
| OLD | NEW |