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

Side by Side Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 15029002: CrOS Files.app: fix the redraw logic on resize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * This variable is checked in SelectFileDialogExtensionBrowserTest. 8 * This variable is checked in SelectFileDialogExtensionBrowserTest.
9 * @type {number} 9 * @type {number}
10 */ 10 */
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 this.updateWindowState_(); 929 this.updateWindowState_();
930 930
931 // Populate the static localized strings. 931 // Populate the static localized strings.
932 i18nTemplate.process(this.document_, loadTimeData); 932 i18nTemplate.process(this.document_, loadTimeData);
933 933
934 // Initialize the new header and arrange the file list. 934 // Initialize the new header and arrange the file list.
935 if (util.platform.newUI()) { 935 if (util.platform.newUI()) {
936 this.dialogDom_.querySelector('#app-name').innerText = 936 this.dialogDom_.querySelector('#app-name').innerText =
937 chrome.runtime.getManifest().name; 937 chrome.runtime.getManifest().name;
938 this.table_.normalizeColumns(); 938 this.table_.normalizeColumns();
939 this.table_.redraw();
939 } 940 }
940 }; 941 };
941 942
942 /** 943 /**
943 * @private 944 * @private
944 */ 945 */
945 FileManager.prototype.onBreadcrumbClick_ = function(event) { 946 FileManager.prototype.onBreadcrumbClick_ = function(event) {
946 this.directoryModel_.changeDirectory(event.path); 947 this.directoryModel_.changeDirectory(event.path);
947 }; 948 };
948 949
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 FileManager.prototype.onResize_ = function() { 1404 FileManager.prototype.onResize_ = function() {
1404 if (this.listType_ == FileManager.ListType.THUMBNAIL) { 1405 if (this.listType_ == FileManager.ListType.THUMBNAIL) {
1405 var g = this.grid_; 1406 var g = this.grid_;
1406 g.startBatchUpdates(); 1407 g.startBatchUpdates();
1407 setTimeout(function() { 1408 setTimeout(function() {
1408 g.columns = 0; 1409 g.columns = 0;
1409 g.redraw(); 1410 g.redraw();
1410 g.endBatchUpdates(); 1411 g.endBatchUpdates();
1411 }, 0); 1412 }, 0);
1412 } else { 1413 } else {
1414 if (util.platform.newUI()) {
1415 if (this.table_.clientWidth > 0)
mtomasz 2013/05/07 08:37:53 Do we need this? What's the purpose of it? If the
mtomasz 2013/05/07 08:44:58 OK, now I see. My repro steps for this are: 1. Ope
mtomasz 2013/05/07 09:15:34 This check for clientWidth > 0 seem to me unnecess
yoshiki 2013/05/07 09:51:04 We need this check. When this.table_.clientWidth=0
1416 this.table_.normalizeColumns();
1417 }
1413 this.table_.redraw(); 1418 this.table_.redraw();
1414 if (util.platform.newUI())
1415 this.table_.normalizeColumns();
1416 } 1419 }
1417 1420
1418 if (!util.platform.newUI()) 1421 if (!util.platform.newUI())
1419 this.breadcrumbs_.truncate(); 1422 this.breadcrumbs_.truncate();
1420 1423
1421 this.searchBreadcrumbs_.truncate(); 1424 this.searchBreadcrumbs_.truncate();
1422 1425
1423 this.updateWindowState_(); 1426 this.updateWindowState_();
1424 }; 1427 };
1425 1428
(...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after
3637 * Set the flag expressing whether the ctrl key is pressed or not. 3640 * Set the flag expressing whether the ctrl key is pressed or not.
3638 * @param {boolean} flag New value of the flag 3641 * @param {boolean} flag New value of the flag
3639 * @private 3642 * @private
3640 */ 3643 */
3641 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { 3644 FileManager.prototype.setCtrlKeyPressed_ = function(flag) {
3642 this.ctrlKeyPressed_ = flag; 3645 this.ctrlKeyPressed_ = flag;
3643 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); 3646 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange();
3644 this.document_.querySelector('#drive-reload').canExecuteChange(); 3647 this.document_.querySelector('#drive-reload').canExecuteChange();
3645 }; 3648 };
3646 })(); 3649 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698