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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartDataProvider.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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 time = Math.abs(totalTime - selfTime) > eps && selfTime > eps ? 473 time = Math.abs(totalTime - selfTime) > eps && selfTime > eps ?
474 Common.UIString( 474 Common.UIString(
475 '%s (self %s)', Number.millisToString(totalTime, true), Number.m illisToString(selfTime, true)) : 475 '%s (self %s)', Number.millisToString(totalTime, true), Number.m illisToString(selfTime, true)) :
476 Number.millisToString(totalTime, true); 476 Number.millisToString(totalTime, true);
477 } 477 }
478 title = this.entryTitle(entryIndex); 478 title = this.entryTitle(entryIndex);
479 warning = Timeline.TimelineUIUtils.eventWarning(event); 479 warning = Timeline.TimelineUIUtils.eventWarning(event);
480 } else if (type === Timeline.TimelineFlameChartEntryType.Frame) { 480 } else if (type === Timeline.TimelineFlameChartEntryType.Frame) {
481 var frame = /** @type {!TimelineModel.TimelineFrame} */ (this._entryData[e ntryIndex]); 481 var frame = /** @type {!TimelineModel.TimelineFrame} */ (this._entryData[e ntryIndex]);
482 time = Common.UIString( 482 time = Common.UIString(
483 '%s ~ %.0f\u2009fps', Number.preciseMillisToString(frame.duration, 1), (1000 / frame.duration)); 483 '%s ~ %.0f\xa0fps', Number.preciseMillisToString(frame.duration, 1), ( 1000 / frame.duration));
484 title = frame.idle ? Common.UIString('Idle Frame') : Common.UIString('Fram e'); 484 title = frame.idle ? Common.UIString('Idle Frame') : Common.UIString('Fram e');
485 if (frame.hasWarnings()) { 485 if (frame.hasWarnings()) {
486 warning = createElement('span'); 486 warning = createElement('span');
487 warning.textContent = Common.UIString('Long frame'); 487 warning.textContent = Common.UIString('Long frame');
488 } 488 }
489 } else { 489 } else {
490 return null; 490 return null;
491 } 491 }
492 var element = createElement('div'); 492 var element = createElement('div');
493 var root = UI.createShadowRootWithCoreStyles(element, 'timeline/timelineFlam echartPopover.css'); 493 var root = UI.createShadowRootWithCoreStyles(element, 'timeline/timelineFlam echartPopover.css');
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 */ 892 */
893 eventByIndex(entryIndex) { 893 eventByIndex(entryIndex) {
894 return this._entryType(entryIndex) === Timeline.TimelineFlameChartEntryType. Event ? 894 return this._entryType(entryIndex) === Timeline.TimelineFlameChartEntryType. Event ?
895 /** @type {!SDK.TracingModel.Event} */ (this._entryData[entryIndex]) : 895 /** @type {!SDK.TracingModel.Event} */ (this._entryData[entryIndex]) :
896 null; 896 null;
897 } 897 }
898 }; 898 };
899 899
900 Timeline.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs = 0.001; 900 Timeline.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs = 0.001;
901 Timeline.TimelineFlameChartDataProvider._indexSymbol = Symbol('index'); 901 Timeline.TimelineFlameChartDataProvider._indexSymbol = Symbol('index');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698