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

Side by Side Diff: sky/benchmarks/dom/creation.sky

Issue 759663003: Only allow one shadowRoot. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: ojan review. Created 6 years 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
« no previous file with comments | « no previous file | sky/engine/bindings/core/v8/V8GCController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <sky> 1 <sky>
2 <import src="../resources/runner.sky" as="PerfRunner" /> 2 <import src="../resources/runner.sky" as="PerfRunner" />
3 <script> 3 <script>
4 var sky = document.querySelector("sky"); 4 var sky = document.querySelector("sky");
5 5
6 var widgets = 0; 6 var widgets = 0;
7 var basicElements = 0; 7 var basicElements = 0;
8 var texts = 0; 8 var texts = 0;
9 9
10 var WidgetPrototype = Object.create(HTMLElement.prototype); 10 var WidgetPrototype = Object.create(HTMLElement.prototype);
11 WidgetPrototype.createdCallback = function() { 11 WidgetPrototype.createdCallback = function() {
12 widgets++; 12 widgets++;
13 this.wasCreated = true; 13 this.wasCreated = true;
14 this.wasAttached = false; 14 this.wasAttached = false;
15 this.wasDetached = false; 15 this.wasDetached = false;
16 this.attrsChanged = []; 16 this.attrsChanged = [];
17 this.createShadowRoot(); 17 this.ensureShadowRoot();
18 }; 18 };
19 19
20 WidgetPrototype.attachedCallback = function() { 20 WidgetPrototype.attachedCallback = function() {
21 this.wasAttached = true; 21 this.wasAttached = true;
22 }; 22 };
23 23
24 WidgetPrototype.detachedCallback = function() { 24 WidgetPrototype.detachedCallback = function() {
25 this.wasDetached = true; 25 this.wasDetached = true;
26 }; 26 };
27 27
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // console.log("widgets: " + widgets); 85 // console.log("widgets: " + widgets);
86 // console.log("basic elements: " + basicElements); 86 // console.log("basic elements: " + basicElements);
87 // console.log("texts: " + texts); 87 // console.log("texts: " + texts);
88 // CONSOLE: LOG: widgets: 340 88 // CONSOLE: LOG: widgets: 340
89 // CONSOLE: LOG: basic elements: 1021 89 // CONSOLE: LOG: basic elements: 1021
90 // CONSOLE: LOG: texts: 1020 90 // CONSOLE: LOG: texts: 1020
91 done(); 91 done();
92 }); 92 });
93 </script> 93 </script>
94 </sky> 94 </sky>
OLDNEW
« no previous file with comments | « no previous file | sky/engine/bindings/core/v8/V8GCController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698