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

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: addressed comments and rebased 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 00dab63bf21c20d8d681ee801e954357579ca115..41e992b654a52ae239d89e4818e4bf18e6ee5d49 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js
@@ -714,12 +714,15 @@ 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).timeWaitingForMainThread;
+ 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)
+ if (WebInspector.TimelineData.forEvent(event).warning)
paintWarningDecoration(barX, barWidth - 1.5);
}
@@ -754,7 +757,7 @@ WebInspector.TimelineFlameChartDataProvider = class extends WebInspector.Timelin
var type = this._entryType(entryIndex);
return type === WebInspector.TimelineFlameChartEntryType.Frame ||
type === WebInspector.TimelineFlameChartEntryType.Event &&
- !!(/** @type {!WebInspector.TracingModel.Event} */ (this._entryData[entryIndex]).warning);
+ !!WebInspector.TimelineData.forEvent(/** @type {!WebInspector.TracingModel.Event} */ (this._entryData[entryIndex])).warning;
}
/**

Powered by Google App Engine
This is Rietveld 408576698