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

Unified Diff: tracing/tracing/ui/timeline_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
« no previous file with comments | « tracing/tracing/ui/timeline_track_view.html ('k') | tracing/tracing/ui/timeline_view_help_overlay.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/timeline_view.html
diff --git a/tracing/tracing/ui/timeline_view.html b/tracing/tracing/ui/timeline_view.html
index 7aeb069d55f3ced54a789b7ec458449dfad48239..f92ae2576af5a03d541f112103c2b4d49b197dad 100644
--- a/tracing/tracing/ui/timeline_view.html
+++ b/tracing/tracing/ui/timeline_view.html
@@ -141,7 +141,8 @@ Polymer({
attached: function() {
this.async(function() {
- this.trackViewContainer_ = this.querySelector('#track_view_container');
+ this.trackViewContainer_ = Polymer.dom(this).querySelector(
+ '#track_view_container');
if (!this.trackViewContainer_)
console.error('missing trackviewContainer');
});
@@ -246,7 +247,8 @@ Polymer({
faviconData = tr.ui.b.FaviconsByHue['blue'];
// Find link if its there
- var link = document.head.querySelector('link[rel="shortcut icon"]');
+ var link = Polymer.dom(document.head).querySelector(
+ 'link[rel="shortcut icon"]');
if (!link) {
link = document.createElement('link');
link.rel = 'shortcut icon';
@@ -345,8 +347,8 @@ Polymer({
},
get viewTitle() {
- return this.titleEl_.textContent.substring(
- this.titleEl_.textContent.length - 2);
+ return Polymer.dom(this.titleEl_).textContent.substring(
+ Polymer.dom(this.titleEl_).textContent.length - 2);
},
set viewTitle(text) {
@@ -369,14 +371,15 @@ Polymer({
var modelInstanceChanged = model != this.model;
var modelValid = model && !model.bounds.isEmpty;
- var importWarningsEl = this.shadowRoot.querySelector('#import-warnings');
- importWarningsEl.textContent = '';
+ var importWarningsEl = Polymer.dom(this.root).querySelector(
+ '#import-warnings');
+ Polymer.dom(importWarningsEl).textContent = '';
// Remove old trackView if the model has completely changed.
if (modelInstanceChanged) {
if (this.railScoreSpan_)
this.railScoreSpan_.model = undefined;
- this.trackViewContainer_.textContent = '';
+ Polymer.dom(this.trackViewContainer_).textContent = '';
if (this.trackView_) {
this.trackView_.viewport.removeEventListener(
'change', this.onViewportChanged_);
« no previous file with comments | « tracing/tracing/ui/timeline_track_view.html ('k') | tracing/tracing/ui/timeline_view_help_overlay.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698