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

Unified Diff: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js

Issue 1880283004: [Media Router WebUI] Put sink list in conditional template. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
index 624d10ac4002cbcfd597790c07fb12d750a385ad..4aebf74bb9c72fc4110d74f9d01e790e18416c39 100644
--- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
+++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
@@ -1302,7 +1302,7 @@ Polymer({
onSinkClick_: function(event) {
var clickedSink = (this.isUserSearching_) ?
this.$$('#searchResults').itemForElement(event.target).sinkItem :
- this.$.sinkList.itemForElement(event.target);
+ this.$$('#sinkList').itemForElement(event.target);
this.showOrCreateRoute_(clickedSink);
this.fire('sink-click', {index: event['model'].index});
},
@@ -1634,12 +1634,15 @@ Polymer({
this.$['container-header'].style.marginTop = firstRunFlowHeight + 'px';
this.$['content'].style.marginTop =
firstRunFlowHeight + headerHeight + 'px';
- this.$['sink-list'].style.maxHeight =
- this.dialogHeight_ - headerHeight - firstRunFlowHeight -
- issueHeight - searchHeight + 'px';
- var searchResults = this.$$('#search-results');
- if (searchResults) {
- searchResults.style.maxHeight = this.$['sink-list'].style.maxHeight;
+
+ var sinkList = this.$$('#sink-list');
+ if (sinkList) {
+ sinkList.style.maxHeight =
+ this.dialogHeight_ - headerHeight - firstRunFlowHeight -
+ issueHeight - searchHeight + 'px';
+ var searchResults = this.$$('#search-results');
+ if (searchResults)
+ searchResults.style.maxHeight = sinkList.style.maxHeight;
}
});
},

Powered by Google App Engine
This is Rietveld 408576698