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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * @implements {UI.Searchable} 5 * @implements {UI.Searchable}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Profiler.HeapProfileView = class extends Profiler.ProfileView { 8 Profiler.HeapProfileView = class extends Profiler.ProfileView {
9 /** 9 /**
10 * @param {!Profiler.SamplingHeapProfileHeader} profileHeader 10 * @param {!Profiler.SamplingHeapProfileHeader} profileHeader
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 return Number.withThousandsSeparator(value); 265 return Number.withThousandsSeparator(value);
266 } 266 }
267 267
268 /** 268 /**
269 * @override 269 * @override
270 * @param {number} value 270 * @param {number} value
271 * @param {!Profiler.ProfileDataGridNode} node 271 * @param {!Profiler.ProfileDataGridNode} node
272 * @return {string} 272 * @return {string}
273 */ 273 */
274 formatPercent(value, node) { 274 formatPercent(value, node) {
275 return Common.UIString('%.2f\u2009%%', value); 275 return Common.UIString('%.2f\xa0%%', value);
276 } 276 }
277 277
278 /** 278 /**
279 * @override 279 * @override
280 * @param {!Profiler.ProfileDataGridNode} node 280 * @param {!Profiler.ProfileDataGridNode} node
281 * @return {?Element} 281 * @return {?Element}
282 */ 282 */
283 linkifyNode(node) { 283 linkifyNode(node) {
284 return this._profileView.linkifier().maybeLinkifyConsoleCallFrame( 284 return this._profileView.linkifier().maybeLinkifyConsoleCallFrame(
285 this._profileView.target(), node.profileNode.callFrame, 'profile-node-fi le'); 285 this._profileView.target(), node.profileNode.callFrame, 'profile-node-fi le');
(...skipping 30 matching lines...) Expand all
316 return this._profile.root.total; 316 return this._profile.root.total;
317 } 317 }
318 318
319 /** 319 /**
320 * @override 320 * @override
321 * @param {number} value 321 * @param {number} value
322 * @param {number=} precision 322 * @param {number=} precision
323 * @return {string} 323 * @return {string}
324 */ 324 */
325 formatValue(value, precision) { 325 formatValue(value, precision) {
326 return Common.UIString('%s\u2009KB', Number.withThousandsSeparator(value / 1 e3)); 326 return Common.UIString('%s\xa0KB', Number.withThousandsSeparator(value / 1e3 ));
327 } 327 }
328 328
329 /** 329 /**
330 * @override 330 * @override
331 * @return {!PerfUI.FlameChart.TimelineData} 331 * @return {!PerfUI.FlameChart.TimelineData}
332 */ 332 */
333 _calculateTimelineData() { 333 _calculateTimelineData() {
334 /** 334 /**
335 * @param {!SDK.ProfileNode} node 335 * @param {!SDK.ProfileNode} node
336 * @return {number} 336 * @return {number}
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 pushEntryInfoRow(Common.UIString('Self size'), Number.bytesToString(node.sel f)); 395 pushEntryInfoRow(Common.UIString('Self size'), Number.bytesToString(node.sel f));
396 pushEntryInfoRow(Common.UIString('Total size'), Number.bytesToString(node.to tal)); 396 pushEntryInfoRow(Common.UIString('Total size'), Number.bytesToString(node.to tal));
397 var linkifier = new Components.Linkifier(); 397 var linkifier = new Components.Linkifier();
398 var link = linkifier.maybeLinkifyConsoleCallFrame(this._target, node.callFra me); 398 var link = linkifier.maybeLinkifyConsoleCallFrame(this._target, node.callFra me);
399 if (link) 399 if (link)
400 pushEntryInfoRow(Common.UIString('URL'), link.textContent); 400 pushEntryInfoRow(Common.UIString('URL'), link.textContent);
401 linkifier.dispose(); 401 linkifier.dispose();
402 return Profiler.ProfileView.buildPopoverTable(entryInfo); 402 return Profiler.ProfileView.buildPopoverTable(entryInfo);
403 } 403 }
404 }; 404 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698