Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: third_party/WebKit/PerformanceTests/ShadowDOM/shadow-style-share-attr-selectors.html

Issue 1557953002: Revert unfinished work of "full-frame-measurement" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PerfPaint
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <style> 2 <style>
3 div { 3 div {
4 color: orange; 4 color: orange;
5 } 5 }
6 </style> 6 </style>
7 <script src="../resources/runner.js"></script> 7 <script src="../resources/runner.js"></script>
8 <script> 8 <script>
9 var listSize = 1000; 9 var listSize = 1000;
10 window.onload = function() { 10 window.onload = function() {
11 PerfTestRunner.measureTime({ 11 PerfTestRunner.measureTime({
12 description: "Measures performance of creating and rendering elements with shadow roots from templates (contains attribute selector styles).", 12 description: "Measures performance of creating and rendering elements with shadow roots from templates (contains attribute selector styles).",
13 run: function() { 13 run: function() {
14 var list = document.querySelector('#list'); 14 var list = document.querySelector('#list');
15 var tmpl = document.querySelector("#tmpl"); 15 var tmpl = document.querySelector("#tmpl");
16 list.innerHTML = ''; 16 list.innerHTML = '';
17 var start = PerfTestRunner.now(); 17 var start = PerfTestRunner.now();
18 var i = 0; 18 var i = 0;
19 do { 19 do {
20 var host = document.createElement('div'); 20 var host = document.createElement('div');
21 var root = host.createShadowRoot(); 21 var root = host.createShadowRoot();
22 root.appendChild(tmpl.content.cloneNode(true)); 22 root.appendChild(tmpl.content.cloneNode(true));
23 var light = document.createElement('div'); 23 var light = document.createElement('div');
24 list.appendChild(host); 24 list.appendChild(host);
25 } while (++i < listSize); 25 } while (++i < listSize);
26 26
27 PerfTestRunner.forceLayoutOrFullFrame(); 27 PerfTestRunner.forceLayout();
28 return PerfTestRunner.now() - start; 28 return PerfTestRunner.now() - start;
29 } 29 }
30 }); 30 });
31 } 31 }
32 </script> 32 </script>
33 <template id="tmpl"> 33 <template id="tmpl">
34 <!-- None of these styles match, but that's on purpose --> 34 <!-- None of these styles match, but that's on purpose -->
35 <style> 35 <style>
36 [foo] { 36 [foo] {
37 color: blue; 37 color: blue;
38 } 38 }
39 [bar] { 39 [bar] {
40 color: red; 40 color: red;
41 } 41 }
42 [baz] { 42 [baz] {
43 color: green; 43 color: green;
44 } 44 }
45 </style> 45 </style>
46 <div> 46 <div>
47 <div> 47 <div>
48 <div>item</div> 48 <div>item</div>
49 </div> 49 </div>
50 </div> 50 </div>
51 <content></content> 51 <content></content>
52 </template> 52 </template>
53 <section id="list"></section> 53 <section id="list"></section>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698