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/base/tab_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/base/scatter_chart.html ('k') | tracing/tracing/ui/base/tab_view_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/base/tab_view.html
diff --git a/tracing/tracing/ui/base/tab_view.html b/tracing/tracing/ui/base/tab_view.html
index 48667a7075fe3f9ff3d2605f0932a1a7d032b6bc..8412d282c34c11ccf147a4b7330760e2c362d0a7 100644
--- a/tracing/tracing/ui/base/tab_view.html
+++ b/tracing/tracing/ui/base/tab_view.html
@@ -196,17 +196,17 @@ window.TracingAnalysisTabView = Polymer({
},
get tabsHidden() {
- var ts = this.shadowRoot.querySelector('tab-strip');
+ var ts = Polymer.dom(this.root).querySelector('tab-strip');
return ts.hasAttribute('tabs-hidden');
},
set tabsHidden(tabsHidden) {
tabsHidden = !!tabsHidden;
- var ts = this.shadowRoot.querySelector('tab-strip');
+ var ts = Polymer.dom(this.root).querySelector('tab-strip');
if (tabsHidden)
- ts.setAttribute('tabs-hidden', true);
+ Polymer.dom(ts).setAttribute('tabs-hidden', true);
else
- ts.removeAttribute('tabs-hidden');
+ Polymer.dom(ts).removeAttribute('tabs-hidden');
},
get tabs() {
@@ -239,7 +239,7 @@ window.TracingAnalysisTabView = Polymer({
// selected tab, mark the child as the selected tab, otherwise keep
// the previous selection.
if (this.selectedTab_)
- child.removeAttribute('selected');
+ Polymer.dom(child).removeAttribute('selected');
else
this.setSelectedTabById_(tabObject.id);
}
@@ -295,7 +295,7 @@ window.TracingAnalysisTabView = Polymer({
this.clearSelectedTab_();
this.fire('selected-tab-change');
}
- child.removeAttribute('selected');
+ Polymer.dom(child).removeAttribute('selected');
delete child.selected;
// Remove the observer since we no longer care about this child.
this.splice('tabs_', i, 1);
@@ -389,7 +389,7 @@ window.TracingAnalysisTabView = Polymer({
this.selectedTab_ = this.tabs_[id];
// Disconnect observer while we mutate the child.
this.selectedTab_.observers.forAttributeSelected.disconnect();
- this.selectedTab_.content.setAttribute('selected', 'selected');
+ Polymer.dom(this.selectedTab_.content).setAttribute('selected', 'selected');
// Reconnect the observer to watch for changes in the future.
this.selectedTab_.observers.forAttributeSelected.observe(
this.selectedTab_.content, { attributeFilter: ['selected'] });
@@ -427,7 +427,7 @@ window.TracingAnalysisTabView = Polymer({
if (this.selectedTab_) {
// Disconnect observer while we mutate the child.
this.selectedTab_.observers.forAttributeSelected.disconnect();
- this.selectedTab_.content.removeAttribute('selected');
+ Polymer.dom(this.selectedTab_.content).removeAttribute('selected');
// Reconnect the observer to watch for changes in the future.
this.selectedTab_.observers.forAttributeSelected.observe(
this.selectedTab_.content, { attributeFilter: ['selected'] });
« no previous file with comments | « tracing/tracing/ui/base/scatter_chart.html ('k') | tracing/tracing/ui/base/tab_view_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698