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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js

Issue 2486853002: Timeline: remove TimelineModel inferred properties from TracingModel.Event (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
index 6c3893c61147c6c85720cf9824ca7c6698d8adc8..66af5bc06a75b213d5d6014be8ab445df59cb220 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
@@ -714,10 +714,13 @@ WebInspector.TimelineFlameChartDataProvider = class extends WebInspector.Timelin
if (type === WebInspector.TimelineFlameChartEntryType.Event) {
var event = /** @type {!WebInspector.TracingModel.Event} */ (this._entryData[entryIndex]);
- if (event.hasCategory(WebInspector.TimelineModel.Category.LatencyInfo) && event.timeWaitingForMainThread) {
- context.fillStyle = 'hsla(0, 70%, 60%, 1)';
- var width = Math.floor(unclippedBarX - barX + event.timeWaitingForMainThread * timeToPixels);
- context.fillRect(barX, barY + barHeight - 3, width, 2);
+ if (event.hasCategory(WebInspector.TimelineModel.Category.LatencyInfo)) {
+ var timeWaitingForMainThread = WebInspector.TimelineData.forEvent(event);
+ if (timeWaitingForMainThread) {
+ context.fillStyle = 'hsla(0, 70%, 60%, 1)';
+ var width = Math.floor(unclippedBarX - barX + timeWaitingForMainThread * timeToPixels);
+ context.fillRect(barX, barY + barHeight - 3, width, 2);
+ }
}
if (event.warning)
paintWarningDecoration(barX, barWidth - 1.5);

Powered by Google App Engine
This is Rietveld 408576698