summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordbeam <dbeam@chromium.org>2015-09-12 12:28:46 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-12 19:29:32 +0000
commit507d2fc1b0c0552e5a7486b7fda3c16c78d19383 (patch)
tree825f960d4ebe119399a74122bf4207de827a0f07
parent9a72293b18910224e3d649243a1d589ffda5d678 (diff)
downloadchromium_src-507d2fc1b0c0552e5a7486b7fda3c16c78d19383.zip
chromium_src-507d2fc1b0c0552e5a7486b7fda3c16c78d19383.tar.gz
chromium_src-507d2fc1b0c0552e5a7486b7fda3c16c78d19383.tar.bz2
MD Downloads: remove per-item scrollbarWidth handling
R=esprehn@chromium.org BUG=526581 NOTRY=true Review URL: https://codereview.chromium.org/1303363004 Cr-Commit-Position: refs/heads/master@{#348531}
-rw-r--r--chrome/browser/resources/md_downloads/item.js20
-rw-r--r--chrome/browser/resources/md_downloads/manager.css1
-rw-r--r--chrome/browser/resources/md_downloads/manager.js19
3 files changed, 1 insertions, 39 deletions
diff --git a/chrome/browser/resources/md_downloads/item.js b/chrome/browser/resources/md_downloads/item.js
index e16af26..603b1cd 100644
--- a/chrome/browser/resources/md_downloads/item.js
+++ b/chrome/browser/resources/md_downloads/item.js
@@ -34,12 +34,6 @@ cr.define('downloads', function() {
},
},
- scrollbarWidth: {
- observer: 'onScrollbarWidthChange_',
- type: Number,
- value: 0,
- },
-
completelyOnDisk_: {
computed: 'computeCompletelyOnDisk_(' +
'data_.state, data_.file_externally_removed)',
@@ -327,20 +321,6 @@ cr.define('downloads', function() {
},
/** @private */
- onScrollbarWidthChange_: function() {
- if (!this.$)
- return;
-
- var endCap = this.$['end-cap'];
- endCap.style.flexBasis = '';
-
- if (this.scrollbarWidth) {
- var basis = parseInt(getComputedStyle(endCap).flexBasis, 10);
- endCap.style.flexBasis = basis - this.scrollbarWidth + 'px';
- }
- },
-
- /** @private */
onShowClick_: function() {
this.actionService_.show(this.data_.id);
},
diff --git a/chrome/browser/resources/md_downloads/manager.css b/chrome/browser/resources/md_downloads/manager.css
index 96ff9a1..e03c67f 100644
--- a/chrome/browser/resources/md_downloads/manager.css
+++ b/chrome/browser/resources/md_downloads/manager.css
@@ -18,6 +18,7 @@
#panel {
--paper-header-panel-standard-container: {
display: flex;
+ overflow-y: overlay;
};
}
diff --git a/chrome/browser/resources/md_downloads/manager.js b/chrome/browser/resources/md_downloads/manager.js
index c8e73e0..a125498 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;
@@ -193,7 +177,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; });
@@ -216,8 +199,6 @@ cr.define('downloads', function() {
var focusRow = this.focusGrid_.getRowForRoot(item.content);
focusRow.getEquivalentElement(activeControl).focus();
}
-
- this.onResize_();
},
});