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

Unified Diff: ui/file_manager/gallery/js/slide_mode.js

Issue 382143004: Remove repaint callbacks from Viewport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « ui/file_manager/gallery/js/image_editor/viewport.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/slide_mode.js
diff --git a/ui/file_manager/gallery/js/slide_mode.js b/ui/file_manager/gallery/js/slide_mode.js
index bdbe8a2b331b14cad15ff4c4d46c3fa16d0c721c..d0c04b662a8e3ba47aeb98a7d232c4a87d8585a9 100644
--- a/ui/file_manager/gallery/js/slide_mode.js
+++ b/ui/file_manager/gallery/js/slide_mode.js
@@ -82,7 +82,7 @@ SlideMode.prototype.getTitle = function() { return 'GALLERY_SLIDE'; };
* @private
*/
SlideMode.prototype.initListeners_ = function() {
- window.addEventListener('resize', this.onResize_.bind(this), false);
+ window.addEventListener('resize', this.onResize_.bind(this));
};
/**
@@ -868,7 +868,8 @@ SlideMode.prototype.onKeyDown = function(event) {
*/
SlideMode.prototype.onResize_ = function() {
this.viewport_.sizeByFrameAndFit(this.container_);
- this.viewport_.repaint();
+ this.viewport_.update();
+ this.editor_.getBuffer().draw();
};
/**
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/viewport.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698