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

Unified Diff: tracing/tracing/ui/analysis/single_thread_time_slice_sub_view.html

Issue 1928873003: Use Polymer.dom with many dom manipulations. (Closed) Base URL: https://github.com/catapult-project/catapult.git@polymer10-migration
Patch Set: fixes Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: tracing/tracing/ui/analysis/single_thread_time_slice_sub_view.html
diff --git a/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view.html b/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view.html
index 781c060720fbd164c285f4ed40697e79dabf65f5..211d76d0cb5b2aa99784095bf6e85a7bef67ba88 100644
--- a/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view.html
+++ b/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view.html
@@ -115,7 +115,7 @@ Polymer({
var timeSlice = selection[0];
var thread = timeSlice.thread;
- var shadowRoot = this.shadowRoot;
+ var shadowRoot = Polymer.dom(this).root;
shadowRoot.querySelector('#state').textContent = timeSlice.title;
var stateColor = tr.b.ColorScheme.colorsAsStrings[timeSlice.colorId];
shadowRoot.querySelector('#state').style.backgroundColor = stateColor;
@@ -134,7 +134,7 @@ Polymer({
onCpuEl.textContent = '';
var runningInsteadEl = shadowRoot.querySelector('#running-instead');
if (timeSlice.cpuOnWhichThreadWasRunning) {
- runningInsteadEl.parentElement.removeChild(runningInsteadEl);
+ Polymer.dom(runningInsteadEl.parentElement).removeChild(runningInsteadEl);
var cpuLink = document.createElement('tr-ui-a-analysis-link');
cpuLink.selection = new tr.model.EventSet(
@@ -143,7 +143,7 @@ Polymer({
timeSlice.cpuOnWhichThreadWasRunning.userFriendlyName;
Polymer.dom(onCpuEl).appendChild(cpuLink);
} else {
- onCpuEl.parentElement.removeChild(onCpuEl);
+ Polymer.dom(onCpuEl.parentElement).removeChild(onCpuEl);
var cpuSliceThatTookCpu = timeSlice.getCpuSliceThatTookCpu();
if (cpuSliceThatTookCpu) {
@@ -155,7 +155,8 @@ Polymer({
cpuLink.textContent = cpuSliceThatTookCpu.title;
Polymer.dom(runningInsteadEl).appendChild(cpuLink);
} else {
- runningInsteadEl.parentElement.removeChild(runningInsteadEl);
+ Polymer.dom(runningInsteadEl.parentElement).removeChild(
+ runningInsteadEl);
}
}

Powered by Google App Engine
This is Rietveld 408576698