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

Side by Side Diff: PerformanceTests/ShadowDOM/shadow-style-share-media-query.html

Issue 196133034: Move inline stylesheet cache decision making from StyleSheetContents to StyleEngine (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merged to trunk Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/css/StyleSheetContents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <style>
3 div {
4 color: orange;
5 }
6 </style>
7 <script src="../resources/runner.js"></script> 2 <script src="../resources/runner.js"></script>
8 <script> 3 <script>
9 var listSize = 100; 4 var listSize = 1000;
10 window.onload = function() { 5 window.onload = function() {
11 PerfTestRunner.measureTime({ 6 PerfTestRunner.measureTime({
12 run: function() { 7 run: function() {
13 var list = document.querySelector('#list'); 8 var list = document.querySelector('#list');
14 var tmpl = document.querySelector("#tmpl"); 9 var tmpl = document.querySelector("#tmpl");
15 list.innerHTML = ''; 10 list.innerHTML = '';
16 var start = PerfTestRunner.now(); 11 var start = PerfTestRunner.now();
17 var i = 0; 12 var i = 0;
18 do { 13 do {
19 var host = document.createElement('div'); 14 var host = document.createElement('div');
20 var root = host.createShadowRoot(); 15 var root = host.createShadowRoot();
21 root.appendChild(tmpl.content.cloneNode(true)); 16 root.appendChild(tmpl.content.cloneNode(true));
22 var light = document.createElement('div'); 17 var light = document.createElement('div');
23 list.appendChild(host); 18 list.appendChild(host);
24 } while (++i < listSize); 19 } while (++i < listSize);
25 20
26 document.body.offsetHeight; 21 document.body.offsetHeight;
27 return PerfTestRunner.now() - start; 22 return PerfTestRunner.now() - start;
28 } 23 }
29 }); 24 });
30 } 25 }
31 </script> 26 </script>
32 <template id="tmpl"> 27 <template id="tmpl">
33 <style> 28 <style>
34 .foo .bar .foo.bar.baz { 29 @media (max-width: 600px) {
35 color: blue; 30 div { color: red; }
36 } 31 }
37 .bar.baz { 32 .foo { color: black; }
38 color: red; 33 .bar { color: blue; }
39 } 34 .baz { color: green; }
35 .bat { color: orange; }
40 </style> 36 </style>
41 <div class="foo"> 37 <div>item</div>
42 <div class="bar">
43 <div class="foo bar baz">item</div>
44 </div>
45 </div>
46 <content></content>
47 </template> 38 </template>
48 <section id="list"></section> 39 <section id="list"></section>
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/StyleSheetContents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698