Skip to content

Commit

Permalink
[RPP] Support non-navigations in layout shift details track
Browse files Browse the repository at this point in the history
Bug: 366049346, 329735547
Change-Id: I7278434ecc4d5177b67efb2762b9bd4d16e1c79e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5878779
Auto-Submit: Connor Clark <[email protected]>
Commit-Queue: Adriana Ixba <[email protected]>
Reviewed-by: Adriana Ixba <[email protected]>
  • Loading branch information
Connor Clark authored and Devtools-frontend LUCI CQ committed Sep 20, 2024
1 parent e049797 commit a340d7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describeWithMockConnection('LayoutShiftDetails', () => {
assert.isNotNull(shiftEvent);

const details = new TimelineComponents.LayoutShiftDetails.LayoutShiftDetails();
await details.setData(shiftEvent, insights, traceData, false);
details.setData(shiftEvent, insights, traceData, false);

assert.isNotNull(details.shadowRoot);
const decorativeChip = details.shadowRoot.querySelector('.timeline-details-chip-decorative-title');
Expand Down
3 changes: 2 additions & 1 deletion front_end/panels/timeline/components/LayoutShiftDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ export class LayoutShiftDetails extends HTMLElement {
}

const ts = TraceEngine.Types.Timing.MicroSeconds(layoutShift.ts - traceEngineData.Meta.traceBounds.min);
const clsInsight = traceInsightsData.get(layoutShift.args.data?.navigationId ?? '')?.data.CumulativeLayoutShift;
const insightsId = layoutShift.args.data?.navigationId ?? TraceEngine.Insights.Types.NO_NAVIGATION;
const clsInsight = traceInsightsData.get(insightsId)?.data.CumulativeLayoutShift;
if (clsInsight instanceof Error) {
return null;
}
Expand Down

0 comments on commit a340d7a

Please sign in to comment.