Commit 728c43ce authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

[Files app] Fix wrong removal of .bind() by lebab

These lines were submitted in CL:1490352.

Reported the bug to lebab project:
https://github.com/lebab/lebab/issues/287

Bug: 778674
Change-Id: I09b8b6acbde72f4e0af36c5dd4f8084ac3aef27c
Reviewed-on: https://chromium-review.googlesource.com/c/1493638
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarJoel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636696}
parent 6f524a65
......@@ -300,13 +300,13 @@ Banners.prototype.showLowDriveSpaceWarning_ = function(show, opt_sizeStats) {
const close = this.document_.createElement('div');
close.className = 'banner-close';
box.appendChild(close);
close.addEventListener('click', total => {
close.addEventListener('click', ((total) => {
const values = {};
values[DRIVE_WARNING_DISMISSED_KEY] = total;
chrome.storage.local.set(values);
box.hidden = true;
this.requestRelayout_(100);
});
}).bind(null, opt_sizeStats.totalSize));
}
if (box.hidden != !show) {
......
......@@ -124,7 +124,7 @@ ProgressCenterItemElement.prototype.update = function(item, animated) {
}
// Set track width.
const setWidth = nextWidthFrame => {
const setWidth = ((nextWidthFrame) => {
const currentWidthRate = parseInt(this.track_.style.width, 10);
// Prevent assigning the same width to avoid stopping the animation.
// animated == false may be intended to cancel the animation, so in that
......@@ -135,7 +135,7 @@ ProgressCenterItemElement.prototype.update = function(item, animated) {
this.track_.hidden = false;
this.track_.style.width = nextWidthFrame + '%';
this.track_.classList.toggle('animated', animated);
};
}).bind(null, item.progressRateInPercent);
if (animated) {
this.cancelTransition_ =
......@@ -143,7 +143,7 @@ ProgressCenterItemElement.prototype.update = function(item, animated) {
} else {
// For animated === false, we should call setWidth immediately to cancel the
// animation, otherwise the animation may complete before canceling it.
setWidth(undefined);
setWidth();
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment