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

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

Issue 2935011: Initial accounts options page. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: use ListItem directly for now per arv Created 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // require: listselectionmodel.js 5 // require: listselectionmodel.js
6 6
7 /** 7 /**
8 * @fileoverview This implements a list control. 8 * @fileoverview This implements a list control.
9 */ 9 */
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // Handle margin collapsing. 48 // Handle margin collapsing.
49 if (mt < 0 && mb < 0) { 49 if (mt < 0 && mb < 0) {
50 h += Math.min(mt, mb); 50 h += Math.min(mt, mb);
51 } else if (mt >= 0 && mb >= 0) { 51 } else if (mt >= 0 && mb >= 0) {
52 h += Math.max(mt, mb); 52 h += Math.max(mt, mb);
53 } else { 53 } else {
54 h += mt + mb; 54 h += mt + mb;
55 } 55 }
56 56
57 list.removeChild(item); 57 list.removeChild(item);
58 return h; 58 return Math.max(0, h);
59 } 59 }
60 60
61 function getComputedStyle(el) { 61 function getComputedStyle(el) {
62 return el.ownerDocument.defaultView.getComputedStyle(el); 62 return el.ownerDocument.defaultView.getComputedStyle(el);
63 } 63 }
64 64
65 /** 65 /**
66 * Creates a new list element. 66 * Creates a new list element.
67 * @param {Object=} opt_propertyBag Optional properties. 67 * @param {Object=} opt_propertyBag Optional properties.
68 * @constructor 68 * @constructor
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 delete this.cachedItems_[index]; 498 delete this.cachedItems_[index];
499 this.redraw(); 499 this.redraw();
500 } 500 }
501 } 501 }
502 }; 502 };
503 503
504 return { 504 return {
505 List: List 505 List: List
506 } 506 }
507 }); 507 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/shared/js/cr/ui/array_data_model.js ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698