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

Side by Side Diff: chrome/browser/resources/shared/js/cr/ui/table.js

Issue 9379023: Tweaks for improving file manager performance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Non-trivial merge with trunk Created 8 years, 9 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
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 /** 5 /**
6 * @fileoverview This implements a table control. 6 * @fileoverview This implements a table control.
7 */ 7 */
8 8
9 cr.define('cr.ui', function() { 9 cr.define('cr.ui', function() {
10 const ListSelectionModel = cr.ui.ListSelectionModel; 10 const ListSelectionModel = cr.ui.ListSelectionModel;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 }, 197 },
198 198
199 /** 199 /**
200 * Redraws the table. 200 * Redraws the table.
201 */ 201 */
202 redraw: function(index) { 202 redraw: function(index) {
203 this.list_.redraw(); 203 this.list_.redraw();
204 this.header_.redraw(); 204 this.header_.redraw();
205 }, 205 },
206 206
207 startBatchUpdates: function() {
208 this.list_.startBatchUpdates();
209 this.header_.startBatchUpdates();
210 },
211
212 endBatchUpdates: function() {
213 this.list_.endBatchUpdates();
214 this.header_.endBatchUpdates();
215 },
216
207 /** 217 /**
208 * Resize the table columns. 218 * Resize the table columns.
209 */ 219 */
210 resize: function() { 220 resize: function() {
211 // We resize columns only instead of full redraw. 221 // We resize columns only instead of full redraw.
212 this.list_.resize(); 222 this.list_.resize();
213 this.header_.resize(); 223 this.header_.resize();
214 }, 224 },
215 225
216 /** 226 /**
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 * because table contents can contain controls that can be focused, and for 319 * because table contents can contain controls that can be focused, and for
310 * some purposes (e.g., styling), the table can still be conceptually focused 320 * some purposes (e.g., styling), the table can still be conceptually focused
311 * at that point even though it doesn't actually have the page focus. 321 * at that point even though it doesn't actually have the page focus.
312 */ 322 */
313 cr.defineProperty(Table, 'hasElementFocus', cr.PropertyKind.BOOL_ATTR); 323 cr.defineProperty(Table, 'hasElementFocus', cr.PropertyKind.BOOL_ATTR);
314 324
315 return { 325 return {
316 Table: Table 326 Table: Table
317 }; 327 };
318 }); 328 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698