diff options
Diffstat (limited to 'chrome/browser/resources/file_manager/js/file_manager.js')
-rw-r--r-- | chrome/browser/resources/file_manager/js/file_manager.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js index 815d2ed..ee5bd49 100644 --- a/chrome/browser/resources/file_manager/js/file_manager.js +++ b/chrome/browser/resources/file_manager/js/file_manager.js @@ -2,6 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +const EMPTY_IMAGE_URI = 'data:image/gif;base64,' + + 'R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D'; + +// Thumbnail view is painful without the exif reader. +const ENABLE_THUMBNAIL_VIEW = ENABLE_METADATA; + var g_slideshow_data = null; /** @@ -1402,7 +1408,10 @@ FileManager.prototype = { */ FileManager.prototype.updatePreview_ = function() { // Clear the preview image first, in case the thumbnail takes long to load. - this.previewImage_.src = ''; + // Do not set url to empty string in plugins because it crashes browser, + // instead we use empty 1x1 gif + this.previewImage_.src = EMPTY_IMAGE_URI; + // The transparent-background class is used to display the checkerboard // background for image thumbnails. We don't want to display it for // non-thumbnail preview images. |