chrome-devtools-frontend 1.0.1555174 → 1.0.1556696

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/front_end/core/protocol_client/InspectorBackend.ts +1 -1
  2. package/front_end/core/root/Runtime.ts +0 -4
  3. package/front_end/core/sdk/DOMModel.ts +101 -7
  4. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +2 -0
  5. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +75 -7
  6. package/front_end/entrypoints/formatter_worker/Substitute.ts +1 -1
  7. package/front_end/generated/InspectorBackendCommands.ts +1 -1
  8. package/front_end/generated/protocol.ts +0 -1
  9. package/front_end/models/ai_assistance/AiConversation.ts +71 -10
  10. package/front_end/models/ai_assistance/ArtifactsManager.ts +67 -0
  11. package/front_end/models/ai_assistance/ConversationHandler.ts +3 -2
  12. package/front_end/models/ai_assistance/agents/AiAgent.ts +17 -27
  13. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +152 -4
  14. package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
  15. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  16. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +1 -1
  17. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +0 -2
  18. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -1
  19. package/front_end/{ui/components → models}/annotations/AnnotationRepository.ts +4 -4
  20. package/front_end/models/annotations/README.md +7 -0
  21. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -0
  22. package/front_end/models/greendev/Prototypes.ts +56 -0
  23. package/front_end/models/greendev/README.md +5 -0
  24. package/front_end/models/greendev/greendev.ts +5 -0
  25. package/front_end/models/stack_trace/StackTrace.ts +13 -2
  26. package/front_end/models/stack_trace/StackTraceImpl.ts +81 -6
  27. package/front_end/models/stack_trace/StackTraceModel.ts +35 -3
  28. package/front_end/models/trace/extras/TraceTree.ts +4 -2
  29. package/front_end/models/trace/insights/LCPDiscovery.ts +0 -2
  30. package/front_end/models/trace/types/TraceEvents.ts +0 -1
  31. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +116 -70
  32. package/front_end/panels/ai_assistance/aiAssistancePanel.css +16 -0
  33. package/front_end/panels/ai_assistance/components/ArtifactsViewer.ts +159 -0
  34. package/front_end/panels/ai_assistance/components/ChatView.ts +3 -2
  35. package/front_end/panels/ai_assistance/components/CollapsibleAssistanceContentWidget.ts +7 -8
  36. package/front_end/panels/ai_assistance/components/PerformanceAgentFlameChart.ts +15 -8
  37. package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +9 -9
  38. package/front_end/panels/ai_assistance/components/artifactsViewer.css +15 -0
  39. package/front_end/panels/ai_assistance/components/collapsibleAssistanceContentWidget.css +5 -6
  40. package/front_end/panels/application/AppManifestView.ts +263 -205
  41. package/front_end/panels/application/ApplicationPanelSidebar.ts +24 -57
  42. package/front_end/panels/application/OpenedWindowDetailsView.ts +2 -0
  43. package/front_end/panels/application/ServiceWorkersView.ts +2 -0
  44. package/front_end/panels/application/StorageView.ts +1 -0
  45. package/front_end/panels/application/appManifestView.css +48 -0
  46. package/front_end/panels/application/components/ProtocolHandlersView.ts +2 -2
  47. package/front_end/panels/application/preloading/PreloadingView.ts +12 -6
  48. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +230 -237
  49. package/front_end/panels/application/preloading/components/PreloadingGrid.ts +96 -79
  50. package/front_end/panels/application/preloading/components/preloadingGrid.css +26 -29
  51. package/front_end/panels/application/preloading/preloadingView.css +6 -0
  52. package/front_end/panels/common/Annotation.ts +1 -1
  53. package/front_end/panels/common/AnnotationManager.ts +1 -1
  54. package/front_end/panels/common/ExtensionView.ts +1 -0
  55. package/front_end/panels/console/ConsoleContextSelector.ts +74 -9
  56. package/front_end/panels/console/consoleContextSelector.css +31 -29
  57. package/front_end/panels/coverage/coverageListView.css +59 -57
  58. package/front_end/panels/elements/ElementsPanel.ts +1 -1
  59. package/front_end/panels/elements/ElementsTreeElement.ts +39 -1
  60. package/front_end/panels/elements/ElementsTreeOutline.ts +23 -21
  61. package/front_end/panels/elements/TopLayerContainer.ts +26 -91
  62. package/front_end/panels/explain/components/ConsoleInsight.ts +3 -3
  63. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +4 -8
  64. package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +148 -97
  65. package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +1 -1
  66. package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +37 -35
  67. package/front_end/panels/network/NetworkItemView.ts +1 -1
  68. package/front_end/panels/network/NetworkLogView.ts +1 -1
  69. package/front_end/panels/network/NetworkPanel.ts +1 -1
  70. package/front_end/panels/recorder/RecorderController.ts +0 -1
  71. package/front_end/panels/security/SecurityPanelSidebar.ts +5 -0
  72. package/front_end/panels/settings/SettingsScreen.ts +133 -1
  73. package/front_end/panels/settings/settings-meta.ts +24 -0
  74. package/front_end/panels/settings/settingsScreen.css +4 -0
  75. package/front_end/panels/sources/UISourceCodeFrame.ts +3 -17
  76. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -8
  77. package/front_end/panels/timeline/components/TimelineSummary.ts +75 -54
  78. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +18 -26
  79. package/front_end/panels/timeline/components/insights/Cache.ts +12 -8
  80. package/front_end/panels/timeline/components/insights/DOMSize.ts +25 -21
  81. package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +7 -7
  82. package/front_end/panels/timeline/components/insights/FontDisplay.ts +7 -5
  83. package/front_end/panels/timeline/components/insights/ForcedReflow.ts +11 -9
  84. package/front_end/panels/timeline/components/insights/INPBreakdown.ts +7 -6
  85. package/front_end/panels/timeline/components/insights/ImageDelivery.ts +7 -5
  86. package/front_end/panels/timeline/components/insights/InsightRenderer.ts +20 -18
  87. package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +12 -12
  88. package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +7 -7
  89. package/front_end/panels/timeline/components/insights/ModernHTTP.ts +7 -5
  90. package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +15 -13
  91. package/front_end/panels/timeline/components/insights/RenderBlocking.ts +2 -2
  92. package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +15 -14
  93. package/front_end/panels/timeline/components/insights/Table.ts +152 -130
  94. package/front_end/panels/timeline/components/insights/ThirdParties.ts +11 -9
  95. package/front_end/panels/timeline/components/timelineSummary.css +58 -57
  96. package/front_end/panels/timeline/thirdPartyTreeView.css +109 -0
  97. package/front_end/panels/timeline/timelineDetailsView.css +2 -4
  98. package/front_end/panels/timeline/timelinePanel.css +0 -110
  99. package/front_end/third_party/acorn/estree-legacy.d.ts +2 -0
  100. package/front_end/third_party/chromium/README.chromium +1 -1
  101. package/front_end/third_party/puppeteer/README.chromium +2 -2
  102. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/CDPSession.d.ts.map +1 -1
  103. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/CDPSession.js.map +1 -1
  104. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
  105. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
  106. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
  107. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
  108. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  109. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  110. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Connection.d.ts.map +1 -1
  111. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +21 -7
  112. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
  113. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts.map +1 -1
  114. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  115. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  116. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  117. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +15 -6
  119. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/CDPSession.d.ts.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/CDPSession.js.map +1 -1
  121. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
  123. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
  124. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  126. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  127. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Connection.d.ts.map +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +21 -7
  129. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
  130. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -1
  131. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  132. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  133. package/front_end/third_party/puppeteer/package/package.json +2 -2
  134. package/front_end/third_party/puppeteer/package/src/api/CDPSession.ts +1 -2
  135. package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +2 -4
  136. package/front_end/third_party/puppeteer/package/src/api/Frame.ts +2 -4
  137. package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -4
  138. package/front_end/third_party/puppeteer/package/src/bidi/core/Connection.ts +3 -2
  139. package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +29 -10
  140. package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +3 -3
  141. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  142. package/front_end/ui/components/report_view/ReportView.docs.ts +37 -0
  143. package/front_end/ui/components/report_view/ReportView.ts +1 -4
  144. package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
  145. package/front_end/ui/legacy/Floaty.ts +5 -9
  146. package/front_end/ui/legacy/InspectorView.ts +2 -1
  147. package/front_end/ui/legacy/ReportView.ts +5 -4
  148. package/front_end/ui/legacy/TabbedPane.ts +1 -1
  149. package/front_end/ui/legacy/ViewManager.ts +2 -32
  150. package/front_end/ui/legacy/Widget.ts +7 -0
  151. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -1
  152. package/front_end/ui/legacy/reportView.css +0 -24
  153. package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
  154. package/package.json +1 -1
  155. /package/front_end/{ui/components → models}/annotations/AnnotationType.ts +0 -0
  156. /package/front_end/{ui/components → models}/annotations/annotations.ts +0 -0
@@ -1165,71 +1165,38 @@ export class AppManifestTreeElement extends ApplicationPanelTreeElement {
1165
1165
  generateChildren(): void {
1166
1166
  const staticSections = this.view.getStaticSections();
1167
1167
  for (const section of staticSections) {
1168
- const sectionElement = section.getTitleElement();
1169
- const childTitle = section.title();
1170
- const sectionFieldElement = section.getFieldElement();
1171
- const child = new ManifestChildTreeElement(
1172
- this.resourcesPanel, sectionElement, childTitle, sectionFieldElement, section.jslogContext || '');
1173
- this.appendChild(child);
1174
- }
1175
- }
1176
-
1177
- onInvoke(): void {
1178
- this.view.getManifestElement().scrollIntoView();
1179
- UI.ARIAUtils.LiveAnnouncer.alert(i18nString(UIStrings.onInvokeAlert, {PH1: this.listItemElement.title}));
1180
- }
1168
+ const childTitle = section.title;
1169
+ const child = new ApplicationPanelTreeElement(this.resourcesPanel, childTitle, false, section.jslogContext || '');
1170
+ child.onselect = (selectedByUser?: boolean): boolean => {
1171
+ if (selectedByUser) {
1172
+ this.showView(this.view);
1173
+ this.view.scrollToSection(childTitle);
1174
+ }
1175
+ return true;
1176
+ };
1181
1177
 
1182
- showManifestView(): void {
1183
- this.showView(this.view);
1184
- }
1185
- }
1178
+ const icon = createIcon('document');
1179
+ child.setLeadingIcons([icon]);
1186
1180
 
1187
- export class ManifestChildTreeElement extends ApplicationPanelTreeElement {
1188
- #sectionElement: Element;
1189
- #sectionFieldElement: HTMLElement;
1190
- constructor(
1191
- storagePanel: ResourcesPanel, element: Element, childTitle: string, fieldElement: HTMLElement,
1192
- jslogContext: string) {
1193
- super(storagePanel, childTitle, false, jslogContext);
1194
- const icon = createIcon('document');
1195
- this.setLeadingIcons([icon]);
1196
- this.#sectionElement = element;
1197
- this.#sectionFieldElement = fieldElement;
1198
- self.onInvokeElement(this.listItemElement, this.onInvoke.bind(this));
1199
- this.listItemElement.addEventListener('keydown', this.onInvokeElementKeydown.bind(this));
1200
- UI.ARIAUtils.setLabel(
1201
- this.listItemElement, i18nString(UIStrings.beforeInvokeAlert, {PH1: this.listItemElement.title}));
1202
- }
1181
+ child.listItemElement.addEventListener('keydown', (event: Event) => {
1182
+ if ((event as KeyboardEvent).key !== 'Tab' || (event as KeyboardEvent).shiftKey) {
1183
+ return;
1184
+ }
1203
1185
 
1204
- override get itemURL(): Platform.DevToolsPath.UrlString {
1205
- return 'manifest://' + this.title as Platform.DevToolsPath.UrlString;
1186
+ if (this.view.focusOnSection(childTitle)) {
1187
+ event.consume(true);
1188
+ }
1189
+ });
1190
+ UI.ARIAUtils.setLabel(
1191
+ child.listItemElement, i18nString(UIStrings.beforeInvokeAlert, {PH1: child.listItemElement.title}));
1192
+ this.appendChild(child);
1193
+ }
1206
1194
  }
1207
1195
 
1208
1196
  onInvoke(): void {
1209
- (this.parent as AppManifestTreeElement)?.showManifestView();
1210
- this.#sectionElement.scrollIntoView();
1197
+ this.view.getManifestElement().scrollIntoView();
1211
1198
  UI.ARIAUtils.LiveAnnouncer.alert(i18nString(UIStrings.onInvokeAlert, {PH1: this.listItemElement.title}));
1212
1199
  }
1213
- // direct focus to the corresponding element
1214
- onInvokeElementKeydown(event: KeyboardEvent): void {
1215
- if (event.key !== 'Tab' || event.shiftKey) {
1216
- return;
1217
- }
1218
- const checkBoxElement = this.#sectionFieldElement.querySelector('.mask-checkbox');
1219
- let focusableElement: HTMLElement|null = this.#sectionFieldElement.querySelector('[tabindex="0"]');
1220
- if (checkBoxElement?.shadowRoot) {
1221
- focusableElement = checkBoxElement.shadowRoot.querySelector('input') || null;
1222
- } else if (!focusableElement) {
1223
- // special case for protocol handler section since it is a custom Element and has different structure than the others
1224
- focusableElement = this.#sectionFieldElement.querySelector('devtools-protocol-handlers-view')
1225
- ?.shadowRoot?.querySelector('[tabindex="0"]') ||
1226
- null;
1227
- }
1228
- if (focusableElement) {
1229
- focusableElement?.focus();
1230
- event.consume(true);
1231
- }
1232
- }
1233
1200
  }
1234
1201
 
1235
1202
  export class ClearStorageTreeElement extends ApplicationPanelTreeElement {
@@ -153,6 +153,7 @@ export class OpenedWindowDetailsView extends UI.Widget.VBox {
153
153
  this.isWindowClosed = isWindowClosed;
154
154
 
155
155
  this.contentElement.classList.add('frame-details-container');
156
+ // TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
156
157
  this.reportView = new UI.ReportView.ReportView(this.buildTitle());
157
158
 
158
159
  this.reportView.show(this.contentElement);
@@ -220,6 +221,7 @@ export class WorkerDetailsView extends UI.Widget.VBox {
220
221
  this.targetInfo = targetInfo;
221
222
 
222
223
  this.contentElement.classList.add('frame-details-container');
224
+ // TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
223
225
  this.reportView =
224
226
  new UI.ReportView.ReportView(this.targetInfo.title || this.targetInfo.url || i18nString(UIStrings.worker));
225
227
 
@@ -202,6 +202,7 @@ export class ServiceWorkersView extends UI.Widget.VBox implements
202
202
  });
203
203
  this.registerRequiredCSS(serviceWorkersViewStyles);
204
204
 
205
+ // TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
205
206
  this.currentWorkersView = new UI.ReportView.ReportView(i18n.i18n.lockedString('Service workers'));
206
207
  this.currentWorkersView.setBodyScrollable(false);
207
208
  this.contentElement.classList.add('service-worker-list');
@@ -220,6 +221,7 @@ export class ServiceWorkersView extends UI.Widget.VBox implements
220
221
 
221
222
  const othersDiv = this.contentElement.createChild('div', 'service-workers-other-origin');
222
223
  othersDiv.setAttribute('jslog', `${VisualLogging.section('other-origin')}`);
224
+ // TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
223
225
  const othersView = new UI.ReportView.ReportView();
224
226
  othersView.setHeaderVisible(false);
225
227
  othersView.show(othersDiv);
@@ -181,6 +181,7 @@ export class StorageView extends UI.Widget.VBox {
181
181
  [Protocol.Storage.StorageType.Service_workers, 'rgb(255, 167, 36)'], // orange
182
182
  ]);
183
183
 
184
+ // TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
184
185
  this.reportView = new UI.ReportView.ReportView(i18nString(UIStrings.storageTitle));
185
186
  this.reportView.registerRequiredCSS(storageViewStyles);
186
187
 
@@ -39,3 +39,51 @@ select {
39
39
  .inline-button {
40
40
  vertical-align: sub;
41
41
  }
42
+
43
+ devtools-report .report-row {
44
+ margin: var(--sys-size-3) 0 var(--sys-size-3) var(--sys-size-9);
45
+ grid-column: 1 / 3;
46
+
47
+ > devtools-checkbox:first-child {
48
+ margin-left: calc(var(--sys-size-4) * -1);
49
+ }
50
+
51
+ > devtools-icon:first-child {
52
+ /* We have inline icons that would otherwise be mis-aligned */
53
+ margin-inline-start: 0;
54
+ }
55
+ }
56
+
57
+ devtools-report .report-section {
58
+ display: grid;
59
+ grid-column: 1 / 3;
60
+ grid-template-columns: subgrid;
61
+ padding-bottom: var(--sys-size-5);
62
+ border-bottom: 1px solid var(--sys-color-divider);
63
+ margin-bottom: var(--sys-size-5);
64
+ }
65
+
66
+ .image-wrapper,
67
+ .image-wrapper img {
68
+ max-width: 200px;
69
+ max-height: 200px;
70
+ display: block;
71
+ object-fit: contain;
72
+ }
73
+
74
+ .image-wrapper {
75
+ display: inline-block;
76
+ height: fit-content;
77
+ margin-right: 8px;
78
+ }
79
+
80
+ .show-mask img {
81
+ /* The safe zone is a centrally positioned circle, with radius 2/5
82
+ * (40%) of the minimum of the icon's width and height.
83
+ * https://w3c.github.io/manifest/#icon-masks */
84
+ clip-path: circle(40% at 50% 50%);
85
+ }
86
+
87
+ .show-mask .image-wrapper {
88
+ background: var(--image-file-checker);
89
+ }
@@ -144,7 +144,7 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
144
144
  ${renderStatusMessage(input.protocolHandler, input.manifestLink)}
145
145
  <div class="protocol-handlers-row">
146
146
  ${i18nTemplate(UIStrings.needHelpReadOur, {PH1: html`
147
- <x-link href=${PROTOCOL_DOCUMENT_URL} tabindex=0 class="devtools-link" jslog=${
147
+ <x-link href=${PROTOCOL_DOCUMENT_URL} tabindex=0 class="devtools-link" autofocus jslog=${
148
148
  VisualLogging.link('learn-more').track({click: true, keydown: 'Enter|Space'})}>
149
149
  ${i18nString(UIStrings.protocolHandlerRegistrations)}
150
150
  </x-link>`})}
@@ -173,7 +173,7 @@ export class ProtocolHandlersView extends UI.Widget.Widget {
173
173
  #view: View;
174
174
 
175
175
  constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
176
- super(element, {useShadowDom: false});
176
+ super(element, {useShadowDom: false, classes: ['vbox']});
177
177
  this.#view = view;
178
178
  }
179
179
 
@@ -417,7 +417,13 @@ export class PreloadingAttemptView extends UI.Widget.VBox {
417
417
  this.ruleSetSelector = new PreloadingRuleSetSelector(() => this.render());
418
418
  toolbar.appendToolbarItem(this.ruleSetSelector.item());
419
419
 
420
- this.preloadingGrid.addEventListener('select', this.onPreloadingGridCellFocused.bind(this));
420
+ this.preloadingGrid.onSelect = this.onPreloadingGridCellFocused.bind(this);
421
+
422
+ const preloadingGridContainer = document.createElement('div');
423
+ preloadingGridContainer.className = 'preloading-grid-widget-container';
424
+ preloadingGridContainer.style = 'height: 100%';
425
+ this.preloadingGrid.show(preloadingGridContainer, null, true);
426
+
421
427
  render(
422
428
  html`
423
429
  <div class="empty-state">
@@ -433,7 +439,7 @@ export class PreloadingAttemptView extends UI.Widget.VBox {
433
439
  </div>
434
440
  <devtools-split-view sidebar-position="second">
435
441
  <div slot="main" class="overflow-auto" style="height: 100%">
436
- ${this.preloadingGrid}
442
+ ${preloadingGridContainer}
437
443
  </div>
438
444
  <div slot="sidebar" class="overflow-auto" style="height: 100%">
439
445
  ${this.preloadingDetails}
@@ -500,15 +506,15 @@ export class PreloadingAttemptView extends UI.Widget.VBox {
500
506
  ruleSets,
501
507
  };
502
508
  });
503
- this.preloadingGrid.update({rows, pageURL: pageURL()});
509
+ this.preloadingGrid.rows = rows;
510
+ this.preloadingGrid.pageURL = pageURL();
504
511
  this.contentElement.classList.toggle('empty', rows.length === 0);
505
512
 
506
513
  this.updatePreloadingDetails();
507
514
  }
508
515
 
509
- private onPreloadingGridCellFocused(event: Event): void {
510
- const focusedEvent = event as CustomEvent<SDK.PreloadingModel.PreloadingAttemptId>;
511
- this.focusedPreloadingAttemptId = focusedEvent.detail;
516
+ private onPreloadingGridCellFocused({rowId}: {rowId: string}): void {
517
+ this.focusedPreloadingAttemptId = rowId;
512
518
  this.render();
513
519
  }
514
520