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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/coverage/CoverageListView.js

Issue 2781193002: DevTools: Adopt nbsp as unit & thousands separator for broader font support (Closed)
Patch Set: update all uses of thinsp. rebaseline tests. Created 3 years, 8 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) 2017 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2017 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 Coverage.CoverageListView = class extends UI.VBox { 5 Coverage.CoverageListView = class extends UI.VBox {
6 constructor() { 6 constructor() {
7 super(true); 7 super(true);
8 this.registerRequiredCSS('coverage/coverageListView.css'); 8 this.registerRequiredCSS('coverage/coverageListView.css');
9 var columns = [ 9 var columns = [
10 {id: 'url', title: Common.UIString('URL'), width: '300px', fixedWidth: fal se, sortable: true}, 10 {id: 'url', title: Common.UIString('URL'), width: '300px', fixedWidth: fal se, sortable: true},
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 cell.textContent = Coverage.CoverageListView._typeToString(this._coverag eInfo.type()); 193 cell.textContent = Coverage.CoverageListView._typeToString(this._coverag eInfo.type());
194 break; 194 break;
195 case 'size': 195 case 'size':
196 cell.textContent = Number.withThousandsSeparator(this._coverageInfo.size () || 0); 196 cell.textContent = Number.withThousandsSeparator(this._coverageInfo.size () || 0);
197 break; 197 break;
198 case 'unusedSize': 198 case 'unusedSize':
199 var unusedSize = this._coverageInfo.unusedSize() || 0; 199 var unusedSize = this._coverageInfo.unusedSize() || 0;
200 var unusedSizeSpan = cell.createChild('span'); 200 var unusedSizeSpan = cell.createChild('span');
201 var unusedPercentsSpan = cell.createChild('span', 'percent-value'); 201 var unusedPercentsSpan = cell.createChild('span', 'percent-value');
202 unusedSizeSpan.textContent = Number.withThousandsSeparator(unusedSize); 202 unusedSizeSpan.textContent = Number.withThousandsSeparator(unusedSize);
203 unusedPercentsSpan.textContent = Common.UIString('%.1f\u2009%%', unusedS ize / this._coverageInfo.size() * 100); 203 unusedPercentsSpan.textContent = Common.UIString('%.1f\xa0%%', unusedSiz e / this._coverageInfo.size() * 100);
204 break; 204 break;
205 case 'bars': 205 case 'bars':
206 var barContainer = cell.createChild('div', 'bar-container'); 206 var barContainer = cell.createChild('div', 'bar-container');
207 var unusedSizeBar = barContainer.createChild('div', 'bar bar-unused-size '); 207 var unusedSizeBar = barContainer.createChild('div', 'bar bar-unused-size ');
208 unusedSizeBar.style.width = Math.ceil(100 * this._coverageInfo.unusedSiz e() / this._maxSize) + '%'; 208 unusedSizeBar.style.width = Math.ceil(100 * this._coverageInfo.unusedSiz e() / this._maxSize) + '%';
209 var usedSizeBar = barContainer.createChild('div', 'bar bar-used-size'); 209 var usedSizeBar = barContainer.createChild('div', 'bar bar-used-size');
210 usedSizeBar.style.width = Math.ceil(100 * this._coverageInfo.usedSize() / this._maxSize) + '%'; 210 usedSizeBar.style.width = Math.ceil(100 * this._coverageInfo.usedSize() / this._maxSize) + '%';
211 } 211 }
212 return cell; 212 return cell;
213 } 213 }
214 }; 214 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698