Skip to content

Commit dac243e

Browse files
jackfranklinDevtools-frontend LUCI CQ
authored andcommitted
RPP: ensure layout shifts are not drawn if track is hidden.
Fixed: 381397891 Change-Id: Ie88471f1b398a9211adc00ec2aa0b001d64bc505 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6055031 Commit-Queue: Jack Franklin <[email protected]> Reviewed-by: Adam Raine <[email protected]>
1 parent 1026f20 commit dac243e

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

front_end/ui/legacy/components/perf_ui/FlameChart.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,8 +2201,13 @@ export class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, type
22012201
}
22022202
this.dispatchEventToListeners(Events.CHART_PLAYABLE_STATE_CHANGED, wideEntryExists);
22032203

2204-
this.#drawCustomSymbols(context, timelineData);
2205-
this.drawMarkers(context, timelineData, markerIndices);
2204+
if (!this.#inTrackConfigEditMode) {
2205+
// In configuration mode, we do not render the actual flame chart, so we
2206+
// can skip checking for any custom symbols on any tracks.
2207+
this.#drawCustomSymbols(context, timelineData);
2208+
// Markers get in the way of the UI for editing, so hide them in edit mode.
2209+
this.drawMarkers(context, timelineData, markerIndices);
2210+
}
22062211

22072212
this.drawEventTitles(context, timelineData, titleIndices, canvasWidth);
22082213

@@ -2822,6 +2827,12 @@ export class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, type
28222827
const entryTotalTime = entryTotalTimes[entryIndex];
28232828
const level = entryLevels[entryIndex];
28242829

2830+
// Skip if the group for this event has been hidden.
2831+
const group = this.dataProvider.groupForEvent?.(entryIndex);
2832+
if (group?.hidden) {
2833+
continue;
2834+
}
2835+
28252836
const unclippedXStart = this.chartViewport.timeToPosition(entryStartTime);
28262837
const unclippedXEnd = this.chartViewport.timeToPosition(entryStartTime + entryTotalTime);
28272838

0 commit comments

Comments
 (0)