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

Side by Side Diff: tracing/tracing/ui/analysis/single_thread_time_slice_sub_view.html

Issue 1923953003: [polymer] Switches .appendChild() to Polymer.dom()...appendChild() (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Created 4 years, 7 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 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/color_scheme.html"> 8 <link rel="import" href="/tracing/base/color_scheme.html">
9 <link rel="import" href="/tracing/base/sorted_array_utils.html"> 9 <link rel="import" href="/tracing/base/sorted_array_utils.html">
10 <link rel="import" href="/tracing/base/utils.html"> 10 <link rel="import" href="/tracing/base/utils.html">
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 onCpuEl.textContent = ''; 134 onCpuEl.textContent = '';
135 var runningInsteadEl = shadowRoot.querySelector('#running-instead'); 135 var runningInsteadEl = shadowRoot.querySelector('#running-instead');
136 if (timeSlice.cpuOnWhichThreadWasRunning) { 136 if (timeSlice.cpuOnWhichThreadWasRunning) {
137 runningInsteadEl.parentElement.removeChild(runningInsteadEl); 137 runningInsteadEl.parentElement.removeChild(runningInsteadEl);
138 138
139 var cpuLink = document.createElement('tr-ui-a-analysis-link'); 139 var cpuLink = document.createElement('tr-ui-a-analysis-link');
140 cpuLink.selection = new tr.model.EventSet( 140 cpuLink.selection = new tr.model.EventSet(
141 timeSlice.getAssociatedCpuSlice()); 141 timeSlice.getAssociatedCpuSlice());
142 cpuLink.textContent = 142 cpuLink.textContent =
143 timeSlice.cpuOnWhichThreadWasRunning.userFriendlyName; 143 timeSlice.cpuOnWhichThreadWasRunning.userFriendlyName;
144 onCpuEl.appendChild(cpuLink); 144 Polymer.dom(onCpuEl).appendChild(cpuLink);
145 } else { 145 } else {
146 onCpuEl.parentElement.removeChild(onCpuEl); 146 onCpuEl.parentElement.removeChild(onCpuEl);
147 147
148 var cpuSliceThatTookCpu = timeSlice.getCpuSliceThatTookCpu(); 148 var cpuSliceThatTookCpu = timeSlice.getCpuSliceThatTookCpu();
149 if (cpuSliceThatTookCpu) { 149 if (cpuSliceThatTookCpu) {
150 var cpuLink = document.createElement('tr-ui-a-analysis-link'); 150 var cpuLink = document.createElement('tr-ui-a-analysis-link');
151 cpuLink.selection = new tr.model.EventSet(cpuSliceThatTookCpu); 151 cpuLink.selection = new tr.model.EventSet(cpuSliceThatTookCpu);
152 if (cpuSliceThatTookCpu.thread) 152 if (cpuSliceThatTookCpu.thread)
153 cpuLink.textContent = cpuSliceThatTookCpu.thread.userFriendlyName; 153 cpuLink.textContent = cpuSliceThatTookCpu.thread.userFriendlyName;
154 else 154 else
155 cpuLink.textContent = cpuSliceThatTookCpu.title; 155 cpuLink.textContent = cpuSliceThatTookCpu.title;
156 runningInsteadEl.appendChild(cpuLink); 156 Polymer.dom(runningInsteadEl).appendChild(cpuLink);
157 } else { 157 } else {
158 runningInsteadEl.parentElement.removeChild(runningInsteadEl); 158 runningInsteadEl.parentElement.removeChild(runningInsteadEl);
159 } 159 }
160 } 160 }
161 161
162 var argsEl = shadowRoot.querySelector('#args'); 162 var argsEl = shadowRoot.querySelector('#args');
163 if (tr.b.dictionaryKeys(timeSlice.args).length > 0) { 163 if (tr.b.dictionaryKeys(timeSlice.args).length > 0) {
164 var argsView = 164 var argsView =
165 document.createElement('tr-ui-a-generic-object-view'); 165 document.createElement('tr-ui-a-generic-object-view');
166 argsView.object = timeSlice.args; 166 argsView.object = timeSlice.args;
167 167
168 argsEl.parentElement.style.display = ''; 168 argsEl.parentElement.style.display = '';
169 argsEl.textContent = ''; 169 argsEl.textContent = '';
170 argsEl.appendChild(argsView); 170 aPolymer.dom(rgsEl).appendChild(argsView);
171 } else { 171 } else {
172 argsEl.parentElement.style.display = 'none'; 172 argsEl.parentElement.style.display = 'none';
173 } 173 }
174 } 174 }
175 }); 175 });
176 </script> 176 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/ui/analysis/single_object_snapshot_sub_view.html ('k') | tracing/tracing/ui/analysis/stacked_pane_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698