OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <style> | 2 <style> |
3 .foo { | 3 .foo { |
4 border: 1px solid black; | 4 border: 1px solid black; |
5 padding: 10px; | 5 padding: 10px; |
6 } | 6 } |
7 .foo .bar.baz { | 7 .foo .bar.baz { |
8 color: blue; | 8 color: blue; |
9 } | 9 } |
10 </style> | 10 </style> |
(...skipping 11 matching lines...) Expand all Loading... |
22 run: function() { | 22 run: function() { |
23 var frag = document.createDocumentFragment(); | 23 var frag = document.createDocumentFragment(); |
24 var tmpl = document.querySelector('#tmpl'); | 24 var tmpl = document.querySelector('#tmpl'); |
25 var start = PerfTestRunner.now(); | 25 var start = PerfTestRunner.now(); |
26 var i = 0; | 26 var i = 0; |
27 do { | 27 do { |
28 frag.appendChild(tmpl.content.cloneNode(true));; | 28 frag.appendChild(tmpl.content.cloneNode(true));; |
29 } while (++i < listSize); | 29 } while (++i < listSize); |
30 document.querySelector('#list').appendChild(frag); | 30 document.querySelector('#list').appendChild(frag); |
31 | 31 |
32 PerfTestRunner.forceLayoutOrFullFrame(); | 32 PerfTestRunner.forceLayout(); |
33 return PerfTestRunner.now() - start; | 33 return PerfTestRunner.now() - start; |
34 }, | 34 }, |
35 done: function() { | 35 done: function() { |
36 document.querySelector('#list').innerHTML = ''; | 36 document.querySelector('#list').innerHTML = ''; |
37 } | 37 } |
38 }); | 38 }); |
39 } | 39 } |
40 </script> | 40 </script> |
41 <template id="tmpl"> | 41 <template id="tmpl"> |
42 <div class="foo"> | 42 <div class="foo"> |
43 <div class="bar baz">item</div> | 43 <div class="bar baz">item</div> |
44 </div> | 44 </div> |
45 </template> | 45 </template> |
46 <section id="list"></section> | 46 <section id="list"></section> |
OLD | NEW |