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

Unified Diff: chrome/browser/resources/md_downloads/manager.js

Issue 1303363004: MD Downloads: remove per-item scrollbarWidth handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thank you, ojan! Created 5 years, 3 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 | « chrome/browser/resources/md_downloads/manager.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_downloads/manager.js
diff --git a/chrome/browser/resources/md_downloads/manager.js b/chrome/browser/resources/md_downloads/manager.js
index 563cd1b6daba5c34d43a4ff37ce3f9bbae0e9e52..a8c36b02207ce1c9cc6b151d346de4ab1016f3e7 100644
--- a/chrome/browser/resources/md_downloads/manager.js
+++ b/chrome/browser/resources/md_downloads/manager.js
@@ -18,12 +18,6 @@ cr.define('downloads', function() {
},
},
- ready: function() {
- window.addEventListener('resize', this.onResize_.bind(this));
- // onResize_() doesn't need to be called immediately here because it's
- // guaranteed to be called again shortly when items are received.
- },
-
/**
* @return {number} A guess at how many items could be visible at once.
* @private
@@ -73,16 +67,6 @@ cr.define('downloads', function() {
},
/** @private */
- onResize_: function() {
- // TODO(dbeam): expose <paper-header-panel>'s #mainContainer in Polymer.
- var container = this.$.panel.$.mainContainer;
- var scrollbarWidth = container.offsetWidth - container.clientWidth;
- this.items_.forEach(function(item) {
- item.scrollbarWidth = scrollbarWidth;
- });
- },
-
- /** @private */
rebuildFocusGrid_: function() {
var activeElement = this.shadowRoot.activeElement;
@@ -186,7 +170,6 @@ cr.define('downloads', function() {
if (loadTimeData.getBoolean('allowDeletingHistory'))
this.$.toolbar.downloadsShowing = this.hasDownloads_;
- this.onResize_();
this.$.panel.classList.remove('loading');
var allReady = this.items_.map(function(i) { return i.readyPromise; });
@@ -209,8 +192,6 @@ cr.define('downloads', function() {
var focusRow = this.focusGrid_.getRowForRoot(item.content);
focusRow.getEquivalentElement(activeControl).focus();
}
-
- this.onResize_();
},
});
« no previous file with comments | « chrome/browser/resources/md_downloads/manager.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698