| Index: Source/devtools/front_end/timeline/TimelineFlameChart.js
|
| diff --git a/Source/devtools/front_end/timeline/TimelineFlameChart.js b/Source/devtools/front_end/timeline/TimelineFlameChart.js
|
| index 6c70e09493503d41c00d374367afdaeaa6ba1683..3246c744018cb7aafa5543acbe0e2f7359875f02 100644
|
| --- a/Source/devtools/front_end/timeline/TimelineFlameChart.js
|
| +++ b/Source/devtools/front_end/timeline/TimelineFlameChart.js
|
| @@ -633,7 +633,42 @@ WebInspector.TracingBasedTimelineFlameChartDataProvider.prototype = {
|
| */
|
| decorateEntry: function(entryIndex, context, text, barX, barY, barWidth, barHeight, offsetToPosition)
|
| {
|
| - return false;
|
| + if (barWidth < 5)
|
| + return false;
|
| +
|
| + var record = this._records[entryIndex];
|
| + var timelineData = this._timelineData;
|
| +
|
| + var category = WebInspector.TimelineUIUtils.styleForTimelineEvent(record.name).category;
|
| + // Paint text using white color on dark background.
|
| + if (text) {
|
| + context.save();
|
| + context.fillStyle = "white";
|
| + context.shadowColor = "rgba(0, 0, 0, 0.1)";
|
| + context.shadowOffsetX = 1;
|
| + context.shadowOffsetY = 1;
|
| + context.font = this._font;
|
| + context.fillText(text, barX + this.textPadding(), barY + barHeight - this.textBaseline());
|
| + context.restore();
|
| + }
|
| +
|
| + if (this._model.eventWarning(record)) {
|
| + context.save();
|
| +
|
| + context.rect(barX, barY, barWidth, this.barHeight());
|
| + context.clip();
|
| +
|
| + context.beginPath();
|
| + context.fillStyle = "red";
|
| + context.moveTo(barX + barWidth - 15, barY + 1);
|
| + context.lineTo(barX + barWidth - 1, barY + 1);
|
| + context.lineTo(barX + barWidth - 1, barY + 15);
|
| + context.fill();
|
| +
|
| + context.restore();
|
| + }
|
| +
|
| + return true;
|
| },
|
|
|
| /**
|
| @@ -642,10 +677,11 @@ WebInspector.TracingBasedTimelineFlameChartDataProvider.prototype = {
|
| */
|
| forceDecoration: function(entryIndex)
|
| {
|
| - return false;
|
| + var record = this._records[entryIndex];
|
| + return !!this._model.eventWarning(record);
|
| },
|
|
|
| - /**
|
| + /**
|
| * @param {number} entryIndex
|
| * @return {?{startTimeOffset: number, endTimeOffset: number}}
|
| */
|
|
|